/* Projet 17 : habillage du jeu (porte B du 17/10/2026 : atelier ivoire en isometrie, maquette en derive lente,
   balayage lumineux sur les mots cles, frappe de pointeuse pour les phrases secondaires).
   Les couleurs viennent de la marque (contenu/marque-*.js), posees en variables par affichage.js. */
@font-face { font-family: "Readex Pro"; font-weight: 300; src: url("../polices/readex-pro-300.ttf"); font-display: swap; }
@font-face { font-family: "Readex Pro"; font-weight: 360; src: url("../polices/readex-pro-360.ttf"); font-display: swap; }
@font-face { font-family: "Readex Pro"; font-weight: 600; src: url("../polices/readex-pro-600.ttf"); font-display: swap; }
@font-face { font-family: "Saira Condensed"; font-weight: 600; src: url("../polices/saira-condensed-600.ttf"); font-display: swap; }

:root {
  --fond: #F6F0E3; --fond-profond: #EDE4D0; --feuille: #FFFCF5; --filet: #D8CBAE;
  --encre: #0B1626; --encre-douce: #46536A; --or: #906818; --or-encre: #7A5610; --lumiere: #F8C850; --signal: #084098;
  --lecture: "Readex Pro", "Segoe UI", system-ui, sans-serif;
  --instrument: "Saira Condensed", "Arial Narrow", sans-serif;
  --rayon: 12px; --rayon-piece: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--fond); color: var(--encre); font-family: var(--lecture); font-weight: 360; font-size: 18px; line-height: 1.55; overflow-x: hidden; }

/* Decor : la photographie de l'atelier en derive lente, floutee, sous un voile ivoire qui protege la lecture */
.decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.decor img { position: absolute; width: 110%; height: 110%; left: -5%; top: -5%; object-fit: cover; filter: blur(4px) saturate(0.85); opacity: 0.55; }
.decor .lumiere { position: absolute; width: 70vmax; height: 55vmax; right: -15vmax; top: -20vmax; border-radius: 50%; background: radial-gradient(circle, rgba(248,200,80,0.32), transparent 65%); }
.decor .voile { position: absolute; inset: 0; background: linear-gradient(90deg, var(--fond) 0%, rgba(246,240,227,0.94) 48%, rgba(246,240,227,0.55) 100%); }

/* Structure */
.cadre { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.entete { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--filet); background: rgba(255,252,245,0.75); }
.entete img { height: 34px; width: auto; }
.entete .chantier { font-family: var(--instrument); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--or-encre); font-size: 16px; }
.entete .etape { margin-left: auto; color: var(--encre-douce); font-size: 16px; }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 48px; }
.commandes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 10px 24px; border-top: 1px solid var(--filet); background: rgba(255,252,245,0.75); }

/* Textes */
.surtitre { font-family: var(--instrument); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); font-size: 16px; margin: 0 0 6px; }
h1, h2 { font-weight: 600; line-height: 1.12; margin: 0 0 16px; color: var(--encre); }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(28px, 4.4vw, 46px); }
p { margin: 0 0 14px; max-width: 70ch; }
.accroche { font-size: clamp(20px, 2.4vw, 26px); color: var(--encre-douce); }
.mention { font-size: 16px; color: var(--encre-douce); }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.alerte { border-left: 5px solid var(--or); background: var(--feuille); padding: 12px 16px; border-radius: var(--rayon-piece); }

/* Balayage lumineux (porte B) : l'or d'encre, traverse une fois par un reflet dore */
.cle { background-image: linear-gradient(105deg, var(--or-encre) 0%, var(--or-encre) 40%, var(--lumiere) 50%, var(--or-encre) 60%, var(--or-encre) 100%);
  background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: var(--or-encre); -webkit-text-fill-color: transparent; }
/* Frappe de pointeuse : chaque mot est un bloc insecable, la ligne ne se coupe jamais dans un mot */
.frappe .mot { display: inline-block; white-space: nowrap; }

/* Boutons et cartes */
button { font: inherit; cursor: pointer; }
.bouton { min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 2px solid var(--encre); background: var(--feuille); color: var(--encre); font-weight: 600; }
.bouton.principal { background: var(--lumiere); border-color: var(--or); color: #1A1200; }
.bouton:focus-visible, .carte-choix:focus-visible, .zone:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.bouton[disabled] { opacity: 0.45; cursor: not-allowed; }
.commandes .bouton { min-height: 44px; padding: 6px 16px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.liste-objectifs { margin: 0 0 18px; padding-left: 22px; }
.liste-objectifs li { margin-bottom: 6px; }

/* Video et son texte de repli */
.video { width: 100%; max-width: 960px; aspect-ratio: 16 / 9; background: var(--encre); border-radius: var(--rayon); }
.texte-video { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 20px 24px; max-width: 900px; font-size: 20px; }

/* Gemba */
.gemba-grille { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.scene-ilot { position: relative; width: 100%; aspect-ratio: 1672 / 941; background: var(--fond-profond); border: 1px solid var(--filet); border-radius: var(--rayon); overflow: hidden; }
.scene-ilot .ilot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.repere { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--or); background: var(--lumiere); color: #1A1200; font-weight: 600; box-shadow: 0 0 0 6px rgba(248,200,80,0.25); }
.repere.vu { background: var(--feuille); color: var(--or-encre); box-shadow: none; }
.repere.ouvert { border-color: var(--signal); }
.liste-zones { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: zone; }
.liste-zones li { counter-increment: zone; }
.zone { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--filet); background: var(--feuille); color: var(--encre); }
.zone::before { content: counter(zone) ". "; font-weight: 600; color: var(--or-encre); }
.panneau { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 18px 20px; margin-bottom: 18px; }
.panneau h3, .colonne h3 { margin: 0 0 8px; font-size: 22px; }
.choix-gaspillages { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-gaspillages .bouton { min-height: 44px; padding: 6px 14px; font-weight: 360; border-width: 1px; }
.regard { border-left: 4px solid var(--or); padding-left: 12px; }
.carnet { margin: 0 0 8px; padding-left: 20px; }
@media (max-width: 900px) { .gemba-grille { grid-template-columns: minmax(0, 1fr); } .repere { width: 32px; height: 32px; font-size: 16px; pointer-events: none; } }

/* Reponses, personnages, consequences */
.consequence { background: var(--feuille); border: 1px solid var(--filet); border-left: 6px solid var(--signal); border-radius: var(--rayon-piece); padding: 12px 16px; max-width: 900px; }
.personnage { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.pastille { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--fond-profond); border: 2px solid var(--or); display: grid; place-items: center; font-weight: 600; font-size: 22px; color: var(--or-encre); }
.pastille.photo { width: 64px; height: 64px; object-fit: cover; }
.replique { font-size: clamp(19px, 2.2vw, 23px); max-width: 60ch; }
.reponses { display: grid; gap: 12px; max-width: 900px; margin: 14px 0; }
.carte-choix { text-align: left; min-height: 56px; padding: 14px 18px; border-radius: var(--rayon); border: 2px solid var(--filet); background: var(--feuille); color: var(--encre); }
.carte-choix:hover:not([disabled]) { border-color: var(--or); }
.carte-choix[disabled] { cursor: default; opacity: 0.6; }
.carte-choix.retenue { opacity: 1; border-color: var(--or); box-shadow: inset 6px 0 0 var(--lumiere); }
.reunion h3, .semaine h3 { margin: 22px 0 6px; font-size: 22px; }
.checklist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; max-width: 760px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 8px; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon-piece); padding: 10px 12px; }
.checklist input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--or); }
.retour-point { grid-column: 2; margin: 4px 0 0; color: var(--or-encre); font-size: 16px; }
.carte-imprevu, .carte-creneaux { background: rgba(255,252,245,0.85); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 16px 20px; margin: 16px 0; max-width: 960px; }
.formulaire-creneau { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.formulaire-creneau select { min-height: 44px; padding: 6px 10px; border-radius: var(--rayon-piece); border: 1px solid var(--encre-douce); background: var(--feuille); font: inherit; }
.creneaux-places { padding-left: 22px; }
.creneaux-places li { margin-bottom: 6px; }
.bouton.petit { min-height: 44px; padding: 4px 14px; font-size: 16px; font-weight: 360; }
.compte-rendu { font-weight: 600; color: var(--signal); }

/* Tableau de bord et miroir */
.deux-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.indicateurs { width: 100%; border-collapse: collapse; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); overflow: hidden; }
.indicateurs caption { text-align: left; font-weight: 600; font-size: 20px; padding: 0 0 8px; }
.indicateurs th, .indicateurs td { padding: 10px 12px; border-bottom: 1px solid var(--filet); text-align: left; }
.indicateurs thead th { font-family: var(--instrument); letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px; color: var(--encre-douce); }
.indicateurs td.maintenant { font-weight: 600; color: var(--or-encre); }
.indicateurs.compacte { max-width: 420px; margin: 8px 0 18px; }
.courbe { width: 100%; max-width: 760px; height: auto; background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); }
.jauges, .personnes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; max-width: 760px; }
.barre { display: block; height: 10px; border-radius: 5px; background: var(--fond-profond); overflow: hidden; margin-top: 4px; }
.barre span { display: block; height: 100%; background: var(--or); }
.decisions-miroir { padding-left: 22px; max-width: 900px; }
.decisions-miroir > li { margin-bottom: 12px; }
.decisions-miroir ul { margin: 4px 0 0; padding-left: 18px; color: var(--encre-douce); }

/* Fin, certificat, demo */
a.bouton { display: inline-flex; align-items: center; text-decoration: none; }
.notes { display: flex; flex-wrap: wrap; gap: 16px; }
.note { margin: 0; padding: 14px 20px; border-radius: var(--rayon); background: var(--feuille); border: 2px solid var(--or); font-weight: 600; font-size: 22px; }
.note-cas { font-weight: 600; }
.correction li, .badges li { margin-bottom: 10px; }
.champ { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
.champ input { min-height: 44px; padding: 8px 12px; border-radius: var(--rayon-piece); border: 1px solid var(--encre-douce); font: inherit; background: var(--feuille); min-width: min(100%, 320px); }
.certificat { background: var(--feuille); border: 3px double var(--or); border-radius: var(--rayon); padding: 28px; max-width: 820px; text-align: center; }
.certificat img { height: 54px; width: auto; }
.certificat h3 { font-size: clamp(26px, 3.4vw, 36px); margin: 12px 0; }
.synthese { background: rgba(255,252,245,0.85); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 16px 20px; margin: 24px 0; max-width: 900px; }
.kits a { color: var(--signal); font-weight: 600; display: inline-block; min-height: 44px; padding: 10px 0; }
@media print {
  .decor, .entete, .commandes { display: none !important; }
  body { background: #fff; }
  body[data-impression="certificat"] #scene > * { display: none; }
  body[data-impression="certificat"] #scene .fin > *:not(.certificat) { display: none; }
  body[data-impression="certificat"] #scene .fin { display: block; }
  body[data-impression="synthese"] #scene .fin > *:not(.synthese) { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  main { padding: 20px 16px 36px; }
  .entete { padding: 10px 16px; }
  .entete .etape { display: none; }
  .commandes { justify-content: center; padding: 8px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Version 2 (19/10/2026) : préparer la mission, quiz de connaissances */
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 18px 0; }
.format { background: var(--feuille); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 16px 18px; min-width: 0; }
.format h4 { margin: 0 0 4px; }
.format video, .format audio { width: 100%; margin-top: 8px; }
.texte-capsule summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.texte-capsule p { max-width: 65ch; }
.question-quiz { border: 1px solid var(--filet); border-radius: var(--rayon); padding: 14px 18px; margin: 0 0 18px; max-width: 900px; background: var(--feuille); }
.question-quiz legend { font-weight: 600; padding: 0 6px; }
.question-quiz.juste { border-left: 6px solid var(--or); }
.question-quiz.faux { border-left: 6px solid var(--signal); }
.carte-choix.bonne { opacity: 1; border-color: var(--or); }
.retour-quiz { border-top: 1px solid var(--filet); padding-top: 10px; }

/* Lexique (19/10/2026) : boite de dialogue native, lisible sur telephone. */
dialog.lexique { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid var(--filet); border-radius: 12px; background: var(--feuille); color: var(--encre); padding: 20px 24px; }
dialog.lexique::backdrop { background: rgba(11, 22, 38, 0.45); }
dialog.lexique .notion { border-top: 1px solid var(--filet); padding-top: 8px; }
dialog.lexique h3 { margin: 6px 0 4px; }
