/* 5. La cordonnerie Le Bon Pas : son propre habit, cuir et vert bouteille, pour ne pas se confondre avec le cabinet. */
.boutique { --vert: #1f3f3a; --cuir-b: #8f4315; --bois: #a9743f; --bois-fonce: #6f4520; position: relative; background: #fffaf0; color: #2b1d14; }
.scene { border-radius: 6px; box-shadow: 0 0 0 2px rgb(31 63 58 / .16); min-width: 0; }
.boutique .b-bouton { position: relative; min-height: 64px; padding: 0 34px; border: 0; border-radius: 8px; background: var(--vert); color: #fff6e0; font: 700 1.25rem/1 var(--texte); }
.boutique .b-bouton:hover { background: #17302c; }
html[data-motion="reduce"] .boutique .b-bouton[data-appui], html[data-motion="reduce"] .boutique .b-bouton:active { background: #0e211e; }
.boutique .b-bouton--petit { min-height: 48px; padding: 0 22px; font-size: 1.0625rem; }
.b-note { min-height: 1.5em; font-size: 1.0625rem; }
.boutique :focus-visible { outline-color: var(--cuir-b); }
/* le bois du comptoir et des étagères : un fil, une arête claire */
.s-bouton::before, .vitrine::after, .s-champ::before, .sur-comptoir::before { content: ""; position: absolute; inset: auto 0 0; background: repeating-linear-gradient(91deg, rgb(60 30 8 / .1) 0 3px, transparent 3px 41px, rgb(255 220 160 / .08) 41px 44px, transparent 44px 97px), linear-gradient(#c99257, var(--bois) 10%, var(--bois-fonce)); box-shadow: inset 0 3px 0 rgb(255 226 170 / .6); }

/* Bouton à états : un ticket de dépôt sur le comptoir, la paire à côté */
.s-bouton { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 260px); gap: 12px 48px; justify-content: center; align-items: end; min-height: 400px; padding: 36px 28px 44px; overflow: hidden; background: linear-gradient(#f3e6cb, #ead5ae); }
.s-bouton::before { height: 78px; }
.ticket { position: relative; display: grid; gap: 14px; justify-items: center; padding: 22px 26px 18px; background: #fffaf0; box-shadow: 0 14px 26px rgb(70 38 10 / .3); }
.ticket::after { content: ""; position: absolute; inset: 100% 0 auto; height: 9px; background: radial-gradient(circle at 9px 0, #fffaf0 8px, transparent 8.5px) 0 0 / 18px 9px; }
.ticket-tete { display: flex; justify-content: space-between; width: 100%; font: italic 800 1.25rem/1 var(--titre); }
.ticket-tete span + span { font: 500 1rem/1.2 var(--texte); }
.b-ligne { display: flex; justify-content: space-between; gap: 24px; width: 100%; border-bottom: 2px dotted #b99; padding-bottom: 8px; }
.ticket .b-bouton { margin-top: 4px; }
.comptoir-paire { position: relative; width: 100%; }
.b-mots { display: grid; place-items: center; overflow: hidden; overflow: clip; }
.b-mots span { grid-area: 1 / 1; white-space: nowrap; padding: 4px 0; }
.b-mots [data-mot="1"], .b-mots [data-mot="2"], .b-mots[data-etat="1"] [data-mot="0"], .b-mots[data-etat="2"] [data-mot="0"] { opacity: 0; }
.b-mots[data-etat="1"] [data-mot="1"], .b-mots[data-etat="2"] [data-mot="2"] { opacity: 1; }

/* Erreur de champ : le registre des dépôts, papier ligné et marge rouge */
.s-champ { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 24px 40px; align-items: end; min-height: 400px; padding: 32px clamp(20px, 4vw, 56px) 40px; overflow: hidden; background: linear-gradient(#e9efe6, #d5e0d4); }
.s-champ::before { height: 62px; }
.registre { position: relative; display: grid; gap: 8px; padding: 20px 26px 12px 56px; border-radius: 4px 10px 10px 4px; background: linear-gradient(90deg, transparent 39px, rgb(179 38 30 / .45) 39px 41px, transparent 41px), repeating-linear-gradient(#fffdf6 0 31px, #dfe6ea 31px 32px); box-shadow: 0 16px 30px rgb(30 50 40 / .28), inset 10px 0 12px -10px rgb(60 40 20 / .4); }
.registre-tete { display: flex; justify-content: space-between; font: italic 800 1.25rem/1 var(--titre); margin-bottom: 8px; }
.registre-tete span { font: 500 1rem/1.2 var(--texte); }
.registre label { font-weight: 700; line-height: 1.35; }
.registre input { display: block; width: 100%; margin-top: 8px; min-height: 56px; padding: 0 16px; border: 2px solid #7a6a5c; border-radius: 8px; background: #fff; color: #2b1d14; font-size: 1.1875rem; transition: border-color var(--courte), box-shadow var(--courte); }
.registre input[aria-invalid="true"] { border-color: #b3261e; box-shadow: inset 6px 0 0 #b3261e; }
.b-erreur { color: #9a1c15; font-weight: 700; }
html:not([data-motion]) .b-erreur { display: none; }
.b-porte { justify-self: start; margin-top: 6px; }
.registre-paire { position: relative; width: 100%; }

/* Réussite : un tampon rond */
.s-reussite { width: min(400px, 100%); aspect-ratio: 1; border-radius: 50%; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; padding: 24px; outline: 2px dashed #1f6b4c; outline-offset: -14px; box-shadow: 0 18px 40px rgb(80 60 20 / .22); }
.coche { width: 42%; aspect-ratio: 1; overflow: visible; }
.coche-fond { fill: #dfeee4; }
.coche-cercle, .coche-trait { fill: none; stroke: #1f6b4c; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; }
.r-titre { font: 800 1.75rem/1.1 var(--titre); } .r-detail { line-height: 1.35; }
.confetti { opacity: 0; position: absolute; left: 50%; top: 38%; width: 12px; height: 18px; }

/* Menu, au-dessus d'une vitrine */
.b-barre { display: flex; align-items: center; gap: clamp(14px, 3vw, 40px); padding: 14px clamp(16px, 3vw, 40px); background: var(--vert); color: #fff6e0; position: relative; z-index: 2; }
.b-marque { font: italic 800 1.5rem/1 var(--titre); white-space: nowrap; }
.b-lien { margin-left: auto; }
.b-menu { position: relative; }
.b-menu-bouton { min-height: 46px; padding: 0 16px; background: transparent; border: 2px solid rgb(255 246 224 / .6); border-radius: 8px; font-weight: 700; white-space: nowrap; }
.b-menu-bouton:hover, .b-menu-bouton[aria-expanded="true"] { background: #fff6e0; color: var(--vert); }
.b-menu .b-menu-bouton:focus-visible { outline-color: #ffd891; }
.b-menu-liste { position: absolute; left: 0; top: calc(100% + 8px); width: 270px; padding: 8px; background: #fff; color: #2b1d14; border-radius: 10px; box-shadow: 0 14px 40px rgb(20 30 28 / .28); transform-origin: 18px 0; }
.b-menu-liste a, .b-menu-liste li > span { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 6px; text-decoration: none; font-weight: 500; }
.b-menu-liste a:hover { background: #f1e6d2; }
.b-menu-liste a:focus-visible { outline-offset: -3px; }
.s-menu { overflow: hidden; background: #f3e6cb; }
.vitrine { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 1.15fr 1fr; gap: 0 3%; align-items: end; min-height: 262px; padding: 24px clamp(16px, 3vw, 40px) 34px; background: radial-gradient(60% 90% at 62% 0%, #fff6dc, transparent), linear-gradient(#f0e0bf, #e4cb9c); }
.vitrine::after { height: 40px; }
.vitrine svg { position: relative; z-index: 1; width: 100%; }
.b-sous { align-self: start; max-width: 14ch; font: 600 1.35rem/1.3 var(--titre); color: #5c3c28; }

/* Élément partagé */
.s-paires { display: grid; min-height: 420px; padding: clamp(16px, 2.4vw, 32px); overflow: hidden; }
.p-liste { grid-area: 1 / 1; display: grid; gap: 10px; align-content: center; }
.p-liste button { width: 100%; display: grid; grid-template-columns: 132px 1fr auto; gap: 18px; align-items: center; text-align: left; padding: 6px 14px 6px 8px; background: none; border: 0; border-bottom: 2px solid #e6d8c0; border-radius: 0; transition: background-color var(--courte); }
.p-liste button:hover { background: #f6ecd9; }
.p-vignette { display: block; width: 132px; height: 108px; }
.p-vignette svg, .p-partagee svg, .p-autre svg { width: 100%; height: 100%; }
.p-liste b { font: 700 1.25rem/1.2 var(--titre); }
.p-fiche { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
html[data-motion] .p-fiche { grid-area: 1 / 1; pointer-events: none; }
html[data-motion] .p-texte { pointer-events: auto; }
.p-grande { aspect-ratio: 240 / 196; background: radial-gradient(70% 60% at 45% 30%, #fbf1da, #ecdab6); border-radius: 10px; }
.p-partagee { display: none; }
html[data-motion] .p-partagee, html[data-motion] .p-autre { display: block; position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.p-texte :is(h3, h5) { font: 800 1.75rem/1.1 var(--titre); margin-bottom: 8px; }
.p-texte p { margin-bottom: 16px; }
html[data-motion] [data-paire="0"] [data-fiche]:not([data-fiche="0"]),
html[data-motion] [data-paire="1"] [data-fiche]:not([data-fiche="1"]),
html[data-motion] [data-paire="2"] [data-fiche]:not([data-fiche="2"]) { display: none; }
html:not([data-motion]) .p-fiche { display: block; margin-top: 20px; }
html:not([data-motion]) .p-grande, html:not([data-motion]) [data-retour] { display: none; }

/* Lignes sous masque */
.s-lignes { background: radial-gradient(60% 110% at 84% 70%, #2f5a52, transparent) #1f3f3a; color: #fff3da; padding: clamp(40px, 5vw, 80px) var(--marge); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; overflow: hidden; }
.l-titre { position: relative; font: 900 clamp(1.9rem, 5.6vw, 6.6rem)/1.02 var(--titre); letter-spacing: -.03em; }
.l-masque { display: block; overflow: hidden; overflow: clip; padding-bottom: .16em; margin-bottom: -.14em; }
.l-ligne { display: block; white-space: nowrap; }
.l-suite { grid-column: 1; font-size: 1.3125rem; max-width: 40ch; }
.s-lignes .l-bottine { grid-column: 2; grid-row: 1 / 3; width: min(27vw, 440px); --cuir: #c9742f; --cuir-fonce: #8d4517; --semelle: #2a1a10; --elastique: #14100c; }

/* Scène par étapes : l'établi du cordonnier */
.s-etapes { background: radial-gradient(70% 60% at 36% 34%, #f8ecd2, #e6d0a4); overflow: hidden; padding: 0; }
.s-etapes svg { display: block; width: 100%; max-height: calc(100vh - 170px); }
.e-cap { position: absolute; left: 18px; top: 14px; font: 700 1.1875rem/1.2 var(--titre); color: #5c3416; }
@media (max-width: 900px) { .s-etapes { border-radius: 0; } .s-etapes svg { max-height: 36vh; } }
/* sans JavaScript, sans chronologie : la bottine finie, posée sur l'établi */
html:not([data-motion]) .s-etapes :is(.e-cap, [data-piece="bottine-retournee"], [data-piece="alene"], [data-piece="aiguille"], [data-piece^="pince"], [data-piece="spatule"], [data-piece="terne"], [data-piece="griffes"], [data-piece="brosse"]) { display: none; }

/* Carte inclinée */
.s-carte { touch-action: pan-y; min-height: 420px; display: grid; place-items: center; background: radial-gradient(60% 80% at 50% 45%, #4a3a2c, #17130f); perspective: 900px; overflow: hidden; padding: 28px 16px; }
.c-ensemble { position: relative; width: min(440px, 100%); perspective: 900px; }
.c-ombre, .c-ombre i { position: absolute; inset: 0; }
.c-ombre { inset: 26px 10px -22px; }
.c-ombre i { border-radius: 26px; background: rgb(0 0 0 / .5); box-shadow: 0 0 34px 14px rgb(0 0 0 / .5); }
.c-porte, .c-carte { transform-style: preserve-3d; }
.c-carte { position: relative; width: 100%; aspect-ratio: 1.62; border-radius: 18px; padding: clamp(22px, 5%, 26px); background: linear-gradient(150deg, #84441a, #55270b); color: #fff0d4; display: grid; grid-template-rows: auto auto 1fr auto; gap: 4px; outline: 2px dashed rgb(255 240 212 / .45); outline-offset: -10px; overflow: hidden; }
.c-carte > p, .c-carte > div { position: relative; }
.c-nom { font: italic 900 clamp(1.5rem, 6vw, 2.2rem)/1 var(--titre); }
.c-phrase { font-size: 1.0625rem; line-height: 1.25; }
.c-pas { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; align-items: center; }
.c-pas svg { height: clamp(34px, 11vw, 62px); width: 100%; fill: #ffd891; overflow: visible; }
/* gauche, droite, et un tampon jamais tout à fait droit ni également encré */
.c-pas svg:nth-of-type(odd) { transform: rotate(-5deg); opacity: .96; }
.c-pas .vide { fill: none; stroke: #ffd891; stroke-width: 2.5; stroke-dasharray: 5 4; }
.c-pied { font-size: 1rem; }
.c-reflet { position: absolute; inset: -60%; background: radial-gradient(closest-side, rgb(255 236 200 / .2), transparent 60%); opacity: 0; pointer-events: none; }
/* mouvement réduit : elle s'éclaire au survol, sans pencher */
.c-lumiere { position: absolute; inset: 0; background: linear-gradient(150deg, rgb(255 226 170 / .16), rgb(255 226 170 / .05)); opacity: 0; pointer-events: none; }
.c-carte::after { content: ""; position: absolute; inset: 0; background: rgb(255 226 170 / .14); opacity: 0; transition: opacity var(--courte); pointer-events: none; }
@media (hover: hover) { html[data-motion="reduce"] .s-carte:hover .c-carte::after { opacity: 1; } }
html[data-motion="reduce"] .s-carte:active .c-carte::after { opacity: 1; }
.c-pointeur { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px; border: 4px solid #fff; border-radius: 50%; opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  .s-bouton { grid-template-columns: minmax(0, 1fr) 96px; gap: 0 8px; padding-inline: 14px; }
  .s-bouton .ticket { padding-inline: 16px; }
  .s-champ { grid-template-columns: minmax(0, 1fr); padding-inline: 14px; }
  .registre-paire { width: 150px; justify-self: end; margin-top: -12px; }
  .vitrine { grid-template-columns: 1fr 1.1fr 1fr; } .vitrine .b-sous { grid-column: 1 / -1; max-width: none; font-size: 1.1rem; }
}
@media (max-width: 560px) {
  .s-bouton { grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
  .comptoir-paire { width: 150px; justify-self: end; }
  .p-liste { align-content: stretch; }
  .p-liste button { grid-template-columns: 92px 1fr auto; gap: 10px; padding-right: 2px; }
  .p-vignette { width: 92px; height: 75px; } .p-liste b { font-size: 1.0625rem; }
  .p-fiche { grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: center; } .p-grande { width: 74%; justify-self: center; }
  .p-texte :is(h3, h5) { font-size: 1.4rem; } .p-texte p { margin-bottom: 10px; }
  .s-paires { min-height: 490px; }
  .s-lignes { grid-template-columns: minmax(0, 1fr); }
  .s-lignes .l-bottine { grid-column: 1; grid-row: auto; width: 46vw; justify-self: end; }
  .l-titre { font-size: 8.6vw; }
  .registre { padding: 16px 14px 8px 30px; background: linear-gradient(90deg, transparent 17px, rgb(179 38 30 / .45) 17px 19px, transparent 19px), repeating-linear-gradient(#fffdf6 0 31px, #dfe6ea 31px 32px); }
  .b-marque { font-size: 1.25rem; } .s-menu .b-lien { display: none; }
  .s-menu .b-barre { justify-content: space-between; }
  .s-menu .b-menu-liste { left: auto; right: 0; transform-origin: calc(100% - 18px) 0; width: 250px; }
  .s-carte { min-height: 330px; }
  .s-bouton .b-bouton { padding: 0 20px; }
}
