/*
 * La démonstration (templates/demo.php), par-dessus accueil.css.
 *
 * Chaque scène a un état final, celui que décrit cette feuille sans aucune
 * classe : c'est ce que voit qui n'exécute pas le script, ou qui a demandé
 * moins de mouvement. demo.js pose « est-depart » (l'état initial), puis les
 * classes de chaque temps, et les retire toutes à la fin : la scène retombe
 * sur son état final sans saut.
 *
 * Les miniatures (la photo, la page publique) sont mesurées en em : une
 * seule taille de police les met à l'échelle, du viseur à la vignette.
 */

@font-face { font-family: 'Caveat'; font-weight: 600; font-display: swap; src: url('../fonts/caveat-600.woff2') format('woff2'); }
@font-face { font-family: 'Noto Serif'; font-weight: 500; font-display: swap; src: url('../fonts/noto-serif-500.woff2') format('woff2'); }
@font-face { font-family: 'Noto Serif'; font-weight: 600; font-display: swap; src: url('../fonts/noto-serif-600.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 600; font-display: swap; src: url('../fonts/playfair-display-600.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-weight: 700; font-display: swap; src: url('../fonts/playfair-display-700.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 500; font-display: swap; src: url('../fonts/cormorant-garamond-500.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-weight: 600; font-display: swap; src: url('../fonts/cormorant-garamond-600.woff2') format('woff2'); }

:root {
  --d-kraft: #FAF6EE;
  --d-bord: #E8DEC9;
  --d-filet: #f0e9dc;
  --d-encre: #181c1e;
  --d-texte: #57423b;
  --d-primaire: #a13c17;
  --d-primaire-vif: #c2542d;
  --d-rose: #fbeee8;
  --d-vert: #2f784d;
  --d-degrade: linear-gradient(90deg, #d96136, #b54622);
  --d-ombre: 0 28px 50px -28px rgba(74, 46, 26, .45);
  --d-texte-police: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --d-titre-police: 'Epilogue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------- En-tête */

.demo-entete {
  padding: 48px 16px 36px;
  text-align: center;
  background: radial-gradient(120% 100% at 50% 0%, #f8e8db 0%, rgba(250, 246, 238, 0) 72%);
}
.demo-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--d-bord);
  font: 700 12px/16px var(--d-texte-police); color: var(--d-encre);
  box-shadow: 0 2px 8px rgba(74, 46, 26, .06);
}
.demo-badge__point { width: 8px; height: 8px; border-radius: 50%; background: var(--d-vert); animation: demo-pouls 2.2s ease-out infinite; }
.demo-entete h1 {
  margin: 16px auto 12px; max-width: 20ch;
  font: 700 32px/38px var(--d-titre-police); letter-spacing: -0.02em; color: var(--d-encre);
}
.demo-entete h1 + p { max-width: 34rem; margin: 0 auto; font: 400 16px/24px var(--d-texte-police); color: var(--d-texte); }
@media (min-width: 768px) {
  .demo-entete { padding: 72px 24px 48px; }
  .demo-entete h1 { font-size: 48px; line-height: 54px; }
  .demo-entete h1 + p { font-size: 18px; line-height: 28px; }
}

/* ------------------------------------------------------------- Onglets */

.demo { padding-bottom: 24px; }
.demo-onglets { display: flex; justify-content: center; gap: 8px; padding: 0 16px; margin: 0 auto 32px; }
.demo-onglet {
  display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--d-bord); background: #fff; color: var(--d-texte);
  font: 600 14px/1 var(--d-texte-police); cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.demo-onglet .material-symbols-outlined { font-size: 18px; }
.demo-onglet:hover { border-color: var(--d-primaire-vif); color: var(--d-encre); }
.demo-onglet[aria-selected="true"] { background: var(--d-primaire); border-color: var(--d-primaire); color: #fff; box-shadow: 0 10px 20px -10px rgba(161, 60, 23, .8); }
.demo-onglet:focus-visible, .demo-puce:focus-visible, .demo-bouton:focus-visible, .demo-valider:focus-visible { outline: 3px solid rgba(194, 84, 45, .45); outline-offset: 2px; }
@media (max-width: 359px) { .demo-onglet { padding: 0 10px; gap: 4px; } }
/* Sans le script, pas d'onglets : les trois étapes se suivent. */
html:not(.js) .demo-onglets, html:not(.js) [data-suivant], html:not(.js) [data-valider], html:not(.js) .demo-choix, html:not(.js) .demo-quotidien { display: none; }

/* -------------------------------------------------------------- Étapes */

.demo-etape {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  display: grid; gap: 24px;
  grid-template-areas: "texte" "scene" "actions";
}
.demo-etape:focus { outline: none; }
.demo-etape[hidden] { display: none; }
html:not(.js) .demo-etape + .demo-etape { margin-top: 72px; }
.demo-etape > .demo-texte { grid-area: texte; }
.demo-etape > .demo-scene { grid-area: scene; }
.demo-actions { grid-area: actions; }
@media (min-width: 1024px) {
  .demo-etape { grid-template-columns: 5fr 7fr; grid-template-areas: "texte scene" "actions scene"; column-gap: 64px; row-gap: 28px; align-items: center; }
  .demo-etape > .demo-texte { align-self: end; }
  .demo-actions { align-self: start; }
}

.demo-repere { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.demo-repere__icone { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--d-rose); color: var(--d-primaire); font-size: 22px; }
.demo-repere__num { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--d-bord); background: #fff; font: 700 12px/16px var(--d-texte-police); color: var(--d-encre); }
.demo-texte h2 { margin-bottom: 12px; font: 700 28px/34px var(--d-titre-police); letter-spacing: -0.015em; color: var(--d-encre); }
.demo-texte > p { font: 400 16px/24px var(--d-texte-police); color: var(--d-texte); }
@media (min-width: 1024px) { .demo-texte h2 { font-size: 34px; line-height: 40px; } .demo-texte > p { font-size: 17px; line-height: 27px; } }
.demo-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font: 500 14px/20px var(--d-texte-police); color: var(--d-texte); }
.demo-note .material-symbols-outlined { flex: none; font-size: 19px; color: var(--d-primaire); }
.demo-note + .demo-note { margin-top: 8px; }
/* Scanner son propre écran n'a de sens que depuis un ordinateur. */
.demo-note--ordinateur { display: none; }
@media (min-width: 1024px) { .demo-note--ordinateur { display: flex; } }

.demo-supports { display: grid; gap: 8px; margin-top: 14px; }
.demo-supports li { display: flex; align-items: center; gap: 10px; font: 600 15px/20px var(--d-texte-police); color: var(--d-encre); }
.demo-supports .material-symbols-outlined { flex: none; width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--d-bord); color: var(--d-primaire); font-size: 18px; }

/* -------------------------------------------------------------- Boutons */

.demo-bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 12px;
  background: var(--d-primaire); color: #fff; text-decoration: none;
  font: 600 15px/1 var(--d-texte-police); cursor: pointer;
  box-shadow: 0 12px 22px -12px rgba(161, 60, 23, .85);
  transition: background .15s, transform .15s;
}
.demo-bouton:hover { background: var(--d-primaire-vif); transform: translateY(-1px); }
.demo-bouton .material-symbols-outlined { font-size: 19px; }
@media (max-width: 639px) { .demo-actions .demo-bouton { width: 100%; } }
.demo-rassure { display: flex; align-items: center; gap: 6px; margin-top: 12px; font: 500 13px/18px var(--d-texte-police); color: var(--d-texte); }
.demo-rassure .material-symbols-outlined { font-size: 17px; color: var(--d-vert); }
.demo-exemple { margin-top: 14px; }
.demo-exemple a { display: inline-flex; align-items: center; gap: 4px; font: 600 14px/20px var(--d-texte-police); color: var(--d-primaire); text-decoration: none; }
.demo-exemple a:hover { text-decoration: underline; }
.demo-exemple .material-symbols-outlined { font-size: 17px; }
@media (min-width: 1024px) { .demo-exemple { display: none; } }

/* --------------------------------------------------------------- Scènes */

.demo-scene {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  min-height: 300px; padding: 20px 14px;
  border-radius: 24px; border: 1px solid var(--d-bord);
  background: linear-gradient(160deg, #f7eee2 0%, #efe2cf 100%);
}
@media (min-width: 640px) { .demo-scene { padding: 32px 28px; } }

/* --- Étape 1 : l'appareil photo ----------------------------------------- */

.demo-appareil { position: relative; width: 100%; max-width: 500px; padding: 10px 10px 12px; border-radius: 22px; background: #101315; box-shadow: var(--d-ombre); }
.demo-appareil__haut { display: flex; justify-content: space-between; padding: 2px 6px 10px; font: 600 11px/1 var(--d-texte-police); letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.demo-appareil__mode { color: #ffd60a; }
.demo-viseur {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3.5;
  display: grid; place-items: center; border-radius: 12px;
  /* Le comptoir sous la carte : du bois sombre, éclairé d'en haut. */
  background: radial-gradient(120% 90% at 50% 20%, #8a6446 0%, #5d3f2a 55%, #3a271a 100%);
}
.demo-cliche { position: relative; width: 76%; font-size: clamp(8.5px, 2.75vw, 13.5px); transform-origin: 50% 50%; }
/* Le reflet du plafonnier sur la photo. */
.demo-cliche::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 38%); }
.demo-coin { position: absolute; width: 26px; height: 26px; border: 0 solid #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.demo-coin--1 { left: 7%; top: 7%; border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 9px; }
.demo-coin--2 { right: 7%; top: 7%; border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 9px; }
.demo-coin--3 { left: 7%; bottom: 7%; border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 9px; }
.demo-coin--4 { right: 7%; bottom: 7%; border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 9px; }
.demo-mise-au-point { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 2px solid #ffd60a; border-radius: 6px; opacity: 0; }
.demo-eclair { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.demo-toast {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); color: var(--d-encre); white-space: nowrap;
  font: 700 13px/1 var(--d-texte-police); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.est-pris .demo-toast { transition: opacity .3s, transform .3s; }
.demo-toast .material-symbols-outlined { font-size: 18px; color: var(--d-vert); }
.demo-appareil__bas { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0; }
.demo-galerie { width: 36px; height: 36px; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .85); background: #2d3833; transition: background .3s; }
[data-support="papier"] .demo-galerie { background: #f4ecdd; }
.demo-declencheur { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #fff; background: radial-gradient(circle, #fff 0 58%, transparent 60%); }
.demo-appareil__pdf { width: 36px; text-align: center; font: 700 11px/1 var(--d-texte-police); letter-spacing: .06em; color: rgba(255, 255, 255, .75); }

/* Le temps de la photo : mise au point, déclenchement, « Photo prise ». */
.est-depart .demo-cliche { filter: blur(3px); transform: scale(1.07); }
.est-depart .demo-coin--1 { left: 3%; top: 3%; }
.est-depart .demo-coin--2 { right: 3%; top: 3%; }
.est-depart .demo-coin--3 { left: 3%; bottom: 3%; }
.est-depart .demo-coin--4 { right: 3%; bottom: 3%; }
.est-depart .demo-mise-au-point { animation: demo-mise-au-point 1s ease-out .1s both; }
.est-depart:not(.est-pris) .demo-toast { opacity: 0; transform: translate(-50%, 10px); }
.est-depart:not(.est-pris) .demo-galerie { background: #3a3f43; }
.est-depart.est-net .demo-cliche { filter: none; transform: none; transition: filter .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.est-depart.est-net .demo-coin { transition: left .6s ease, top .6s ease, right .6s ease, bottom .6s ease; }
.est-depart.est-net .demo-coin--1 { left: 7%; top: 7%; }
.est-depart.est-net .demo-coin--2 { right: 7%; top: 7%; }
.est-depart.est-net .demo-coin--3 { left: 7%; bottom: 7%; }
.est-depart.est-net .demo-coin--4 { right: 7%; bottom: 7%; }
.est-flash .demo-eclair { animation: demo-eclair .5s ease-out both; }
.est-flash .demo-declencheur { animation: demo-appui .3s ease-out; }

/* --- Les cartes photographiées ------------------------------------------ */

.demo-support { position: relative; padding: 1em 1.3em 1.15em; }
.demo-support__titre { text-align: center; line-height: 1; }
.demo-support__ligne { display: flex; align-items: baseline; gap: .45em; margin-top: .45em; line-height: 1.1; }
.demo-support__ligne > span { white-space: nowrap; }
.demo-support__ligne i { flex: 1 1 auto; min-width: 1em; transform: translateY(-.2em); }
.demo-support__ligne b { font-weight: inherit; white-space: nowrap; }
.demo-support__colonnes { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 2.4em; text-align: right; }
.demo-support__ligne--entete { margin-top: .2em; }
.demo-support__ligne--entete b { margin-left: auto; }
.demo-support__desc { line-height: 1.15; }

.demo-support--ardoise {
  border: .7em solid #8e6137; border-radius: .7em;
  background-color: #2d3833;
  background-image: radial-gradient(ellipse 60% 50% at 28% 30%, rgba(255, 255, 255, .08), transparent 70%), radial-gradient(ellipse 50% 40% at 78% 72%, rgba(255, 255, 255, .05), transparent 70%);
  box-shadow: inset 0 0 0 .15em #6c4724, inset 0 0 2.4em rgba(0, 0, 0, .35), 0 1.4em 2em -1em rgba(0, 0, 0, .6);
  color: rgba(255, 255, 255, .93); font-family: 'Caveat', 'Bradley Hand', cursive; font-weight: 600;
  text-shadow: 0 0 1px rgba(255, 255, 255, .35);
  transform: rotate(-1.5deg);
}
.demo-support--ardoise .demo-support__titre { font-size: 2.1em; }
.demo-support--ardoise .demo-support__ligne { font-size: 1.45em; }
.demo-support--ardoise .demo-support__ligne i { border-bottom: .12em dotted rgba(255, 255, 255, .45); }
.demo-support--ardoise .demo-support__desc { font-size: 1.05em; color: rgba(255, 255, 255, .62); }

.demo-support--papier {
  border-radius: .25em; background: #fffdf7;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 49.6%, rgba(0, 0, 0, .05) 50%, rgba(0, 0, 0, 0) 50.6%), linear-gradient(135deg, rgba(255, 255, 255, .7), rgba(120, 90, 60, .07));
  box-shadow: 0 1.4em 2em -1em rgba(0, 0, 0, .65);
  color: #2b2522; font-family: 'Playfair Display', Georgia, serif;
  transform: rotate(1.2deg);
}
.demo-support--papier .demo-support__titre { padding-bottom: .35em; margin-bottom: .25em; border-bottom: 1px solid #d8cdbb; font-size: 1.6em; font-weight: 700; letter-spacing: .02em; }
.demo-support--papier .demo-support__ligne { font-size: 1.12em; font-weight: 600; }
.demo-support--papier .demo-support__ligne i { border-bottom: 1px dotted #b9ab95; }
.demo-support--papier .demo-support__ligne--entete { font-family: var(--d-texte-police); font-size: .78em; font-weight: 700; color: #8a7d6c; }
.demo-support--papier .demo-support__desc { margin-top: .1em; font-family: var(--d-texte-police); font-size: .82em; font-style: italic; color: #75695b; }

/* Le prix qu'un doigt a effacé : la lecture le marquera « à vérifier ». */
.demo-efface { position: relative; filter: blur(.06em); opacity: .55; }
.demo-efface::after { content: ''; position: absolute; left: -.3em; right: -.3em; top: .1em; bottom: -.05em; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
.demo-support--papier .demo-efface::after { background: radial-gradient(ellipse at 50% 50%, rgba(150, 105, 60, .38), rgba(150, 105, 60, 0) 70%); }

/* --- Le choix de la carte ----------------------------------------------- */

.demo-choix { width: 100%; max-width: 500px; }
.demo-choix__titre { margin-bottom: 8px; font: 700 13px/18px var(--d-texte-police); color: var(--d-encre); }
.demo-choix__liste { display: flex; flex-wrap: wrap; gap: 6px; }
.demo-puce {
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--d-bord); background: rgba(255, 255, 255, .8); color: var(--d-texte);
  font: 600 13px/1 var(--d-texte-police); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.demo-puce:hover { border-color: var(--d-primaire-vif); color: var(--d-encre); }
.demo-puce[aria-pressed="true"] { background: var(--d-encre); border-color: var(--d-encre); color: #fff; }

/* --- Étape 2 : la lecture ------------------------------------------------- */

.demo-fenetre { width: 100%; max-width: 540px; overflow: hidden; border-radius: 18px; border: 1px solid var(--d-bord); background: #fff; box-shadow: var(--d-ombre); }
.demo-fenetre__barre { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--d-filet); }
.demo-fenetre__barre i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.demo-fenetre__barre i:nth-child(2) { background: #febc2e; }
.demo-fenetre__barre i:nth-child(3) { background: #28c840; }
.demo-lecture__corps { padding: 14px 16px 16px; }
@media (min-width: 640px) { .demo-lecture__corps { padding: 18px 22px 20px; } }
.demo-lecture__tete { display: flex; align-items: center; gap: 12px; }
.demo-lecture__vignette { position: relative; flex: none; width: 62px; height: 62px; overflow: hidden; border-radius: 12px; background: #5d3f2a; display: grid; place-items: center; }
.demo-lecture__mini { width: 120%; font-size: 3.2px; pointer-events: none; }
.demo-rayon { position: absolute; left: 6%; right: 6%; top: 0; height: 2px; border-radius: 1px; background: #d96136; box-shadow: 0 0 10px 3px rgba(217, 97, 54, .6); opacity: 0; }
.demo-lecture__etat { display: flex; align-items: center; gap: 8px; font: 700 16px/22px var(--d-texte-police); color: var(--d-encre); }
.demo-lecture__sous { margin-top: 2px; font: 500 13px/18px var(--d-texte-police); color: var(--d-texte); }
.demo-tourne { display: none; flex: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #f0d7cb; border-top-color: var(--d-primaire); animation: demo-tourne .8s linear infinite; }
.demo-si-cours { display: none; }
.est-depart:not(.est-fini) .demo-tourne, .est-depart:not(.est-fini) .demo-si-cours { display: inline-block; }
.est-depart:not(.est-fini) .demo-si-fini { display: none; }
.est-depart:not(.est-fini) .demo-rayon { animation: demo-balayage 1.3s ease-in-out infinite; }

.demo-progression { height: 6px; margin: 14px 0 12px; overflow: hidden; border-radius: 3px; background: #f3ece1; }
.demo-progression span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--d-degrade); transition: width .45s ease; }

.demo-coches { display: grid; gap: 2px; counter-reset: none; }
.demo-coches li { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; font: 600 14px/20px var(--d-texte-police); color: var(--d-encre); }
.demo-coches small { font-weight: 500; font-size: 13px; color: var(--d-texte); }
.demo-coches small::before { content: '— '; color: #c7b8a6; }
.demo-coche { position: relative; flex: none; width: 20px; height: 20px; margin-top: 0; border-radius: 50%; background: var(--d-primaire); }
.demo-coche::after { content: ''; position: absolute; left: 7px; top: 4px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.est-depart .demo-coches li:not(.est-fait) { color: #9c8f80; }
.est-depart .demo-coches li:not(.est-fait) small { visibility: hidden; }
.est-depart .demo-coches li:not(.est-fait) .demo-coche { background: transparent; box-shadow: inset 0 0 0 2px #e6dccd; }
.est-depart .demo-coches li:not(.est-fait) .demo-coche::after { opacity: 0; }
.est-depart .demo-coches li.est-fait .demo-coche { animation: demo-coche .35s ease-out; }

.demo-lus { margin-top: 12px; padding-top: 6px; border-top: 1px solid var(--d-filet); }
.demo-lu { position: relative; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 0; border-bottom: 1px dashed #eee5d7; }
.demo-lu__nom { flex: 1 1 auto; min-width: 0; font: 600 14px/18px var(--d-texte-police); color: var(--d-encre); }
.demo-lu__nom small { display: block; font-weight: 500; font-size: 12px; color: var(--d-texte); }
.demo-lu__prix { flex: none; font: 700 14px/18px var(--d-texte-police); font-variant-numeric: tabular-nums; color: var(--d-encre); white-space: nowrap; }
.demo-lu__doute { flex: none; padding: 3px 8px; border-radius: 6px; background: #ffddba; color: #673d00; font: 700 12px/16px var(--d-texte-police); white-space: nowrap; }
.demo-lu--douteux { margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; background: rgba(255, 221, 186, .28); }
/* La ligne pas encore lue : une barre grise parcourue d'un reflet. */
.est-depart .demo-lu:not(.est-lu) > * { visibility: hidden; }
.est-depart .demo-lu:not(.est-lu)::before,
.est-depart .demo-lu:not(.est-lu)::after { content: ''; position: absolute; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px; background: linear-gradient(90deg, #efe7da 0%, #efe7da 38%, #faf6ef 50%, #efe7da 62%, #efe7da 100%); background-size: 300% 100%; animation: demo-reflet 1.3s linear infinite; }
.est-depart .demo-lu:not(.est-lu)::before { left: 0; width: 58%; }
.est-depart .demo-lu:not(.est-lu)::after { right: 0; width: 18%; }
.est-depart .demo-lu.est-lu > * { animation: demo-apparition .35s ease-out both; }
.est-depart .demo-lu--douteux:not(.est-lu) { background: none; }

.demo-bilan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #f7f2ea; }
.est-fini .demo-bilan { transition: opacity .35s, transform .35s; }
.demo-bilan__texte { display: flex; align-items: center; gap: 6px; font: 700 13.5px/18px var(--d-texte-police); color: var(--d-encre); }
.demo-bilan__texte .material-symbols-outlined { font-size: 18px; color: var(--d-vert); }
.demo-valider { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--d-bord); background: #fff; color: var(--d-primaire); font: 700 13px/1 var(--d-texte-police); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.demo-valider:hover { border-color: var(--d-primaire-vif); }
.est-depart:not(.est-fini) .demo-bilan { opacity: 0; transform: translateY(6px); }
.est-depart.est-fini .demo-lu--douteux { animation: demo-insiste 1.4s ease-in-out 2; }
.demo-si-verifie { display: none; }
.est-verifie .demo-si-doute { display: none; }
.est-verifie .demo-si-verifie { display: inline; }
.est-verifie .demo-lu__doute { background: #d8efe1; color: #1f5c3b; }
.est-verifie .demo-lu--douteux { background: none; }
.est-verifie .demo-valider { border-color: #d8efe1; background: #d8efe1; color: #1f5c3b; cursor: default; }

/* --- Étape 3 : la table, le chevalet, le téléphone ---------------------- */

.demo-scene--table {
  flex-direction: row; min-height: 520px; padding: 28px 12px;
  /* La nappe : un vichy terracotta très léger, celui des vidéos. */
  background-color: #f6efe2;
  background-image: repeating-linear-gradient(0deg, rgba(181, 70, 34, .06) 0 22px, transparent 22px 44px), repeating-linear-gradient(90deg, rgba(181, 70, 34, .06) 0 22px, transparent 22px 44px);
}
.demo-chevalet {
  position: absolute; z-index: 2; left: 6px; bottom: 18px; width: 108px;
  padding: 10px 8px 8px; border-radius: 14px; background: #fff; text-align: center;
  box-shadow: 6px 14px 22px rgba(74, 46, 26, .25); transform: rotate(-5deg);
}
.est-qr .demo-chevalet { transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.demo-chevalet__marque { display: flex; align-items: center; justify-content: center; gap: 6px; font: 800 14px/1 var(--d-titre-police); color: #1f2933; }
.demo-chevalet__marque .logo__embleme { filter: none; }
.demo-chevalet__qr { position: relative; width: 84px; height: 84px; margin: 7px auto 5px; }
.demo-chevalet__qr svg { display: block; width: 100%; height: 100%; }
.demo-chevalet > p:last-child { font: 600 10px/1.3 var(--d-texte-police); color: var(--d-texte); }
@media (min-width: 640px) {
  .demo-chevalet { left: calc(50% - 250px); bottom: 40px; width: 150px; }
  .demo-chevalet__qr { width: 118px; height: 118px; }
}

.demo-telephone { position: relative; flex: none; width: 236px; padding: 8px; border-radius: 40px; background: #1f2933; box-shadow: inset 0 0 0 2px #3a4753, 0 34px 50px -26px rgba(31, 41, 51, .7); }
.demo-telephone::before { content: ''; position: absolute; z-index: 3; top: 16px; left: 50%; width: 62px; height: 18px; margin-left: -31px; border-radius: 10px; background: #05080a; }
.demo-ecran { position: relative; height: 470px; overflow: hidden; border-radius: 32px; background: #fff; font-size: 9.6px; }
.demo-ecran__page { position: absolute; inset: 0; }
/* Sur un téléphone, le téléphone de la démo s'écarte vers la droite : le chevalet ne cache plus la carte. */
.demo-scene--table .demo-telephone { margin-left: 64px; }
@media (min-width: 640px) {
  .demo-scene--table .demo-telephone { width: 262px; margin-left: 120px; }
  .demo-scene--table .demo-ecran { height: 520px; font-size: 10.6px; }
}

.est-depart:not(.est-qr) .demo-chevalet { opacity: 0; transform: translate(-24px, 18px) rotate(-12deg); }
.est-scan .demo-chevalet .demo-rayon { animation: demo-balayage .9s ease-in-out 2; }
.est-depart .demo-chevalet__qr::after { content: ''; position: absolute; inset: -7px; border-radius: 10px; box-shadow: 0 0 0 2px #d96136; opacity: 0; }
.est-scan .demo-chevalet__qr::after { animation: demo-cible 1.8s ease-out both; }
.est-depart:not(.est-ouverte) .demo-page { opacity: 0; transform: translateY(1.6em); }
/* En attendant la carte, l'écran montre l'adresse qui s'ouvre, comme le navigateur du téléphone. */
.est-depart .demo-ecran::before { content: 'appeto.fr'; position: absolute; z-index: 1; left: 50%; top: 4.2em; transform: translateX(-50%); padding: .55em 1.3em; border-radius: 999px; background: #eef0f2; color: #1f2933; font: 700 1.15em/1 var(--d-texte-police); letter-spacing: .01em; }
.est-depart.est-ouverte .demo-ecran::before { opacity: 0; transition: opacity .3s; }
.est-depart.est-ouverte .demo-page { transition: opacity .45s ease, transform .55s cubic-bezier(.2, .8, .2, 1); }
.est-depart:not(.est-ouverte) .demo-plat { opacity: 0; transform: translateY(.8em); }
.est-depart.est-ouverte .demo-plat { transition: opacity .4s ease, transform .45s ease; transition-delay: calc(var(--rang, 0) * 110ms + 250ms); }

/* --- La page publique en miniature, et ses quatre habillages ------------ */

.demo-page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--fond); color: var(--ink); font-family: var(--d-texte-police); }
.demo-page__haut { padding: 3.6em 1.5em 1em; border-bottom: 1px solid var(--bord); background: var(--fond); }
.demo-page__nom { font-family: var(--serif); font-weight: var(--poids-titre); font-size: 1.75em; line-height: 1.1; }
.demo-page__lieu { margin-top: .3em; font-weight: 700; font-size: .85em; letter-spacing: .14em; text-transform: uppercase; color: var(--lieu, var(--prim)); }
.demo-page__corps { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 1.3em 1.5em 8em; }
.demo-page__titre { font-family: var(--serif); font-weight: var(--poids-titre); font-size: 2.5em; line-height: 1.05; }
.demo-page__filtres { margin-top: .9em; padding: .85em; border: 1px solid var(--bord); border-radius: var(--r-lg); background: var(--carte); }
.demo-page__puces { display: flex; gap: .4em; overflow: hidden; white-space: nowrap; }
.demo-page__puces span { flex: none; padding: .45em .85em; border: 1px solid var(--bord); border-radius: var(--r-md); background: var(--carte-claire); color: var(--var); font-weight: 600; font-size: .95em; line-height: 1.2; }
.demo-page__puces .est-active { border-color: var(--prim); background: var(--prim); color: var(--sur-prim); }
.demo-page__compte { margin-top: .75em; font-size: .95em; color: var(--var); }
.demo-page__compte b { color: var(--ink); }
.demo-page__rubrique { margin-top: 1.3em; padding-bottom: .4em; border-bottom: 1px solid var(--bord); font-family: var(--serif); font-weight: var(--poids-titre); font-size: 1.55em; line-height: 1.15; }
.demo-page__rubrique small { margin-left: .35em; font-family: var(--d-texte-police); font-weight: 500; font-size: .55em; color: var(--var); }
.demo-plat { margin-top: .95em; }
.demo-plat__ligne { display: flex; align-items: baseline; gap: .45em; }
.demo-plat__nom { font-family: var(--serif); font-weight: var(--poids-plat); font-size: var(--taille-plat); line-height: 1.2; }
.demo-plat__ligne i { flex: 1 1 auto; min-width: 1em; border-bottom: 1px dashed var(--pointille); transform: translateY(-.3em); }
.demo-plat__prix { margin-left: auto; font-weight: 700; font-size: 1.08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-plat__tailles { display: flex; flex-wrap: wrap; gap: .1em 1em; margin-top: .15em; font-size: .98em; color: var(--var); }
.demo-plat__tailles b { color: var(--ink); font-weight: 700; }
.demo-plat__desc { margin-top: .2em; font-size: .98em; line-height: 1.35; color: var(--var); }
.demo-plat__allergenes { display: flex; flex-wrap: wrap; gap: .3em; margin-top: .5em; }
.demo-plat__allergenes span { padding: .2em .55em; border-radius: .4em; background: var(--tag-fond); color: var(--tag-encre); font-weight: 600; font-size: .8em; line-height: 1.3; }
.demo-plat__epuise { display: none; align-self: center; padding: .25em .55em; border-radius: .35em; background: var(--ink); color: var(--fond); font-weight: 700; font-size: .78em; white-space: nowrap; }
.demo-plat.est-epuise .demo-plat__epuise { display: inline-block; animation: demo-apparition .3s ease-out; }
.demo-plat.est-epuise .demo-plat__ligne i { visibility: hidden; }
.demo-plat.est-epuise .demo-plat__nom, .demo-plat.est-epuise .demo-plat__prix, .demo-plat.est-epuise .demo-plat__tailles b { text-decoration: line-through; opacity: .55; }
.demo-page__actions { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; padding: .75em .9em 1.4em; border-top: 1px solid var(--bord); background: var(--carte-claire); }
.demo-page__actions > span { display: flex; flex-direction: column; align-items: center; gap: .25em; padding: .55em 0; border-radius: .8em; background: var(--fond); color: var(--ink); font-weight: 700; font-size: .85em; }
.demo-page__actions .material-symbols-outlined { font-size: 1.6em; }
.demo-page__actions svg { width: 1.6em; height: 1.6em; }
.demo-page__whatsapp svg { color: #25d366; }
.demo-page__actions .demo-page__aller { background: var(--prim); color: var(--sur-prim); }

.demo-theme-coastal { --fond: #faf7f2; --carte: #fff; --carte-claire: #fff; --bord: #ede6dd; --prim: #00685f; --sur-prim: #fff; --ink: #0f172a; --var: #5a5047; --pointille: #cdbfae; --serif: 'Noto Serif', Georgia, serif; --poids-titre: 500; --poids-plat: 600; --taille-plat: 1.32em; --tag-fond: rgba(186, 26, 26, .08); --tag-encre: #93000a; --r-md: .7em; --r-lg: 1em; }
.demo-theme-bistrot { --fond: #f5f0e8; --carte: #fff; --carte-claire: #fff; --bord: #e2d9cc; --prim: #1a365d; --sur-prim: #fff; --ink: #1e232a; --var: #6b6357; --pointille: #c9bdaa; --lieu: #b45309; --serif: 'Playfair Display', Georgia, serif; --poids-titre: 600; --poids-plat: 600; --taille-plat: 1.3em; --tag-fond: rgba(186, 26, 26, .1); --tag-encre: #8d1616; --r-md: .7em; --r-lg: 1em; }
.demo-theme-editorial { --fond: #fdfbf7; --carte: transparent; --carte-claire: #fdfbf7; --bord: #e8e4dc; --prim: #1d5c58; --sur-prim: #fff; --ink: #1a1a1a; --var: #66615b; --pointille: #d8d3c9; --serif: 'Cormorant Garamond', Garamond, Georgia, serif; --poids-titre: 500; --poids-plat: 600; --taille-plat: 1.55em; --tag-fond: transparent; --tag-encre: #66615b; --r-md: 0; --r-lg: 0; }
.demo-theme-editorial .demo-page__titre { font-size: 2.9em; }
.demo-theme-editorial .demo-page__filtres { padding: .85em 0; border-width: 1px 0; }
.demo-theme-editorial .demo-plat__allergenes span { box-shadow: inset 0 0 0 1px var(--bord); }
.demo-theme-nocturne { --fond: #0a1118; --carte: #111a24; --carte-claire: #111a24; --bord: #1e293b; --prim: #14b8a6; --sur-prim: #0a1118; --ink: #f1f6fb; --var: #9aa8b6; --pointille: #33445a; --lieu: #f59e0b; --serif: 'Noto Serif', Georgia, serif; --poids-titre: 500; --poids-plat: 600; --taille-plat: 1.32em; --tag-fond: rgba(248, 113, 113, .12); --tag-encre: #fca5a5; --r-md: .7em; --r-lg: 1em; }

/* ------------------------------------------------- Au quotidien */

/* Après les trois étapes, la quatrième promesse, centrée : le texte, puis les deux écrans côte à côte. */
.demo-quotidien { max-width: 960px; margin: 88px auto 0; padding: 0 16px; }
.demo-quotidien > .demo-texte { max-width: 40rem; margin: 0 auto 28px; text-align: center; }
.demo-quotidien .demo-repere { justify-content: center; }
@media (min-width: 1024px) { .demo-quotidien { margin-top: 120px; } }
.demo-duo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px;
  padding: 22px 14px; border-radius: 24px; border: 1px solid var(--d-bord);
  background: linear-gradient(160deg, #f7eee2 0%, #efe2cf 100%);
}
@media (min-width: 640px) { .demo-duo { flex-wrap: nowrap; padding: 32px 28px; gap: 28px; } }

.demo-service { flex: 0 1 340px; width: 100%; max-width: 340px; padding: 14px; border-radius: 18px; border: 1px solid #e2e5ea; background: #f7f8fa; color: #1f2933; font-family: var(--d-texte-police); box-shadow: var(--d-ombre); }
.demo-service__titre { font: 800 19px/24px var(--d-titre-police); }
.demo-service__aide { margin: 4px 0 12px; font-size: 13px; line-height: 18px; color: #6b7280; }
.demo-service__liste { overflow: hidden; border-radius: 12px; border: 1px solid #e2e5ea; background: #fff; }
.demo-service__plat { display: flex; align-items: stretch; border-top: 1px solid #e2e5ea; transition: background .2s; }
.demo-service__plat:first-child { border-top: 0; }
.demo-service__plat button { flex: 1 1 auto; min-width: 0; min-height: 50px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.demo-service__plat button:focus-visible { outline: 3px solid rgba(194, 84, 45, .45); outline-offset: -3px; }
.demo-service__nom { flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.demo-service__etat { flex: none; font-size: 11.5px; color: #6b7280; white-space: nowrap; }
.demo-service__interrupteur { position: relative; flex: none; width: 42px; height: 25px; border-radius: 999px; background: #2f784d; transition: background .15s; }
.demo-service__interrupteur::after { content: ''; position: absolute; top: 3px; left: 20px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: left .15s; }
.demo-service__prix { flex: none; min-width: 62px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; border-left: 1px solid #e2e5ea; font-weight: 700; font-size: 12.5px; color: #a13c17; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-service__plat[data-epuise="1"] { background: #fbf3f3; }
.demo-service__plat[data-epuise="1"] .demo-service__nom { color: #6b7280; text-decoration: line-through; }
.demo-service__plat[data-epuise="1"] .demo-service__etat { padding: 2px 6px; border-radius: 5px; background: #1f2933; color: #fff; font-weight: 700; }
.demo-service__plat[data-epuise="1"] .demo-service__interrupteur { background: #c9ced6; }
.demo-service__plat[data-epuise="1"] .demo-service__interrupteur::after { left: 3px; }
/* Tant que personne n'a touché : le premier interrupteur appelle le doigt. */
.demo-quotidien:not(.est-touche) .demo-service__plat:first-child .demo-service__interrupteur { animation: demo-appel 1.9s ease-out infinite; }

/* Sur un téléphone, la carte des clients passe au-dessus de l'écran « En service » : en touchant un plat, on voit sa ligne changer juste au-dessus. */
.demo-telephone--petit { order: -1; width: 220px; }
.demo-telephone--petit .demo-ecran { height: 430px; font-size: 9px; }
@media (min-width: 640px) { .demo-telephone--petit { order: 0; width: 236px; } .demo-telephone--petit .demo-ecran { height: 470px; font-size: 9.6px; } }
/* La mise à jour s'annonce sur l'encoche, comme une notification du téléphone : elle ne cache aucun plat. */
.demo-maj { position: absolute; z-index: 4; left: 50%; top: 6px; transform: translate(-50%, -6px); padding: 6px 12px; border-radius: 999px; background: #05080a; color: #fff; font: 700 11px/1 var(--d-texte-police); white-space: nowrap; opacity: 0; pointer-events: none; }
.demo-maj.est-vue { animation: demo-maj 2.4s ease both; }

/* ------------------------------------------------------- Fin */

.demo-fin { max-width: 760px; margin: 88px auto 96px; padding: 0 16px; }
.demo-fin__carte { padding: 40px 22px; border-radius: 24px; border: 1px solid var(--d-bord); background: #fff; text-align: center; box-shadow: 0 30px 60px -44px rgba(74, 46, 26, .55); }
.demo-fin__carte h2 { margin-bottom: 12px; font: 700 28px/34px var(--d-titre-police); letter-spacing: -0.015em; color: var(--d-encre); }
.demo-fin__carte > p:not(.demo-rassure) { max-width: 30rem; margin: 0 auto 24px; font: 400 16px/24px var(--d-texte-police); color: var(--d-texte); }
.demo-fin__carte .demo-rassure { display: block; }
.demo-fin__carte .demo-rassure .material-symbols-outlined { margin-right: 4px; vertical-align: -4px; }
@media (min-width: 768px) { .demo-fin__carte { padding: 52px 40px; } .demo-fin__carte h2 { font-size: 34px; line-height: 40px; } }

/* -------------------------------------------------- Mouvements */

@keyframes demo-pouls { 0% { box-shadow: 0 0 0 0 rgba(47, 120, 77, .5); } 70%, 100% { box-shadow: 0 0 0 8px rgba(47, 120, 77, 0); } }
@keyframes demo-mise-au-point { 0% { opacity: 0; transform: scale(1.5); } 30% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes demo-eclair { 0% { opacity: 0; } 18% { opacity: .92; } 100% { opacity: 0; } }
@keyframes demo-appui { 50% { transform: scale(.88); } }
@keyframes demo-tourne { to { transform: rotate(360deg); } }
@keyframes demo-balayage { 0% { top: 6%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
@keyframes demo-reflet { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes demo-apparition { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes demo-coche { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes demo-insiste { 50% { background-color: rgba(255, 221, 186, .7); } }
@keyframes demo-cible { 0% { opacity: 0; transform: scale(1.15); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes demo-appel { 0% { box-shadow: 0 0 0 0 rgba(47, 120, 77, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(47, 120, 77, 0); } }
@keyframes demo-maj { 0% { opacity: 0; transform: translate(-50%, -6px); } 12%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  .demo-badge__point, .demo-quotidien:not(.est-touche) .demo-service__plat:first-child .demo-service__interrupteur { animation: none; }
  .demo-onglet, .demo-bouton, .demo-puce, .demo-service__interrupteur, .demo-service__interrupteur::after { transition: none; }
  .demo-maj.est-vue { animation: none; opacity: 1; transform: translate(-50%, 0); }
}
