/* Montserrat hébergée localement (SIL Open Font License, voir fonts/OFL.txt) : aucune requête vers Google */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }

/* ===== Socle commun MyConnecting : charte orange #FF4B00 / violet #4E006E, Montserrat ===== */
/* Une seule apparence, claire, conforme à la charte (fond blanc, dégradés très légers). */
:root {
  --orange: #FF4B00;
  --orange-ink: #D63F00;      /* orange lisible sur blanc pour le texte courant */
  --violet: #4E006E;
  --ink: #2A1235;             /* encre : violet très sombre */
  --ink-2: #6A5674;           /* texte secondaire, gris teinté violet */
  --paper: #FFFFFF;
  --mist: #FAF6FC;            /* voile violet */
  --peach: #FFF6F1;           /* voile orange */
  --line: #ECE3F0;
  --line-2: #DCCDE3;
  --good: #4E006E;
  --f: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(78, 0, 110, .06), 0 8px 24px -12px rgba(78, 0, 110, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f); font-weight: 400; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
strong, b { font-weight: 600; }
em { font-style: italic; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-ink); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.row-between { justify-content: space-between; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -8px rgba(255, 75, 0, .7); }
.btn-primary:hover:not([disabled]) { background: #E84400; }
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: #3E0058; }
.btn-ghost { background: transparent; color: var(--violet); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-copy { background: var(--violet); color: #fff; min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-copy.is-ok { background: var(--orange); }

/* Bloc à copier */
.copybox { position: relative; border: 1.5px dashed var(--line-2); border-radius: 12px; background: var(--mist); padding: 14px 14px 12px; display: grid; gap: 10px; }
.copybox-text { white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.copybox .btn-copy { justify-self: start; }

/* Texte multiligne */
.ml-line { overflow-wrap: anywhere; }
.ml-gap { height: .7em; }

/* Verdicts */
.vf-out:empty { display: none; }
.vf-out { margin-top: 10px; display: grid; gap: 8px; }
.verdict { border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.verdict.is-good { background: var(--mist); border-left: 3px solid var(--violet); }
.verdict.is-bad { background: var(--peach); border-left: 3px solid var(--orange); }
.jeu-consigne { font-weight: 600; margin-bottom: 12px; }

/* Notions / FOCUS */
.notions { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.notion { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.notion-letter { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 20px; }
.notion-body { min-width: 0; }
.notion-body strong { display: block; color: var(--violet); margin-bottom: 2px; }
.notion-body p { font-size: 14.5px; color: var(--ink-2); }

/* Cartes à retourner */
.cartes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.carte { position: relative; min-height: 120px; border: 0; padding: 0; background: none; perspective: 900px; text-align: left; }
.carte-face { position: absolute; inset: 0; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; backface-visibility: hidden; transition: transform .5s cubic-bezier(.2, .7, .2, 1); font-size: 14.5px; }
.carte-recto { background: var(--violet); color: #fff; font-weight: 600; font-size: 15.5px; }
.carte-recto::after { content: "Retourner"; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.carte-num { font-size: 12px; opacity: .7; }
.carte-verso { background: var(--peach); color: var(--ink); border: 1.5px solid #FFD3BF; transform: rotateY(180deg); justify-content: center; }
.carte.is-flipped .carte-recto { transform: rotateY(-180deg); }
.carte.is-flipped .carte-verso { transform: rotateY(0); }

/* Chips de réponse */
.vf { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: vf; }
.vf-item { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); counter-increment: vf; }
.vf-q { font-weight: 600; margin-bottom: 10px; }
.vf-q::before { content: counter(vf) ". "; color: var(--orange-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--paper); font-weight: 600; font-size: 14px; color: var(--violet); }
.chip:hover:not([disabled]) { border-color: var(--violet); }
.chip[disabled] { cursor: default; opacity: .55; }
.chip.is-right { background: var(--violet); color: #fff; border-color: var(--violet); opacity: 1; }
.chip.is-wrong { background: var(--peach); border-color: var(--orange); color: var(--orange-ink); opacity: 1; text-decoration: line-through; }

/* QCM */
.qcm-q { font-weight: 600; margin-bottom: 10px; }
.qcm-opts { display: grid; gap: 8px; }
.qcm-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); }
.qcm-opt:hover:not([disabled]) { border-color: var(--violet); }
.qcm-opt[disabled] { cursor: default; }
.qcm-key { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mist); color: var(--violet); font-weight: 600; font-size: 14px; }
.qcm-opt.is-right { border-color: var(--violet); background: var(--mist); }
.qcm-opt.is-right .qcm-key { background: var(--violet); color: #fff; }
.qcm-opt.is-wrong { border-color: var(--orange); background: var(--peach); }

/* Ordre */
.ordre-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 12px 0 8px; }
.ordre-slots { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: os; }
.ordre-slots li { counter-increment: os; display: flex; gap: 10px; align-items: stretch; }
.ordre-slots li::before { content: counter(os); flex: none; width: 28px; display: grid; place-items: center; font-weight: 600; color: var(--orange-ink); }
.ordre-slots li.ordre-empty { color: var(--ink-2); font-style: italic; font-size: 14.5px; }
.ordre-slots li.ordre-empty::before { content: none; }
.ordre-pool { display: grid; gap: 8px; }
.ordre-piece, .ordre-placed { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--paper); font-size: 15px; width: 100%; display: flex; gap: 10px; align-items: baseline; }
.ordre-piece:hover, .ordre-placed:hover { border-color: var(--violet); }
.ordre-placed { background: var(--mist); }
.ordre-label { font-weight: 600; color: var(--violet); }
.ordre-placed .ordre-label { display: none; }
.ordre-placed.is-right .ordre-label { display: inline; }
.ordre-placed.is-right { border-color: var(--violet); }
.ordre-placed.is-wrong { border-color: var(--orange); background: var(--peach); }

/* Erreurs */
.err-doc { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--paper); line-height: 1.9; box-shadow: var(--shadow); }
.err-title { font-weight: 600; color: var(--violet); margin-bottom: 6px; }
.err-seg { display: inline; border: 0; padding: 2px 3px; margin: 0 -1px; border-radius: 4px; background: transparent; text-align: left; font-size: 15.5px; line-height: 1.9; border-bottom: 1.5px dotted var(--line-2); }
.err-seg:hover { background: var(--mist); }
.err-seg.is-found { background: #FFE2D4; border-bottom-color: var(--orange); text-decoration: line-through; text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.err-seg.is-nope { animation: nope .35s ease; }
@keyframes nope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.err-count { font-weight: 600; color: var(--violet); }
.err-notes { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.err-notes li::marker { color: var(--orange); font-weight: 600; }

/* Relier */
.rel-cols { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.rel-col { display: grid; gap: 8px; align-content: start; }
.rel-item { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--paper); font-size: 14.5px; min-height: 44px; }
.rel-left { font-weight: 600; color: var(--violet); }
.rel-item.is-sel { border-color: var(--orange); box-shadow: 0 0 0 3px #FFE2D4; }
.rel-item.is-paired { border-style: solid; }
.rel-item.c0 { border-color: var(--violet); background: var(--mist); }
.rel-item.c1 { border-color: var(--orange); background: var(--peach); }
.rel-item.c2 { border-color: #8A4AA3; background: #F5ECF8; }
.rel-item.c3 { border-color: #FF8A57; background: #FFF0E8; }
.rel-item.c4 { border-color: #B58AC6; background: #FBF5FD; }
.rel-left.is-right::after { content: "  ✓"; color: var(--violet); }
.rel-left.is-wrong { text-decoration: underline wavy var(--orange); }

/* Trous */
.trous-text { line-height: 2.4; font-size: 16px; }
.trou { min-height: 38px; margin: 0 4px; padding: 4px 8px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--mist); font-weight: 600; color: var(--violet); max-width: 100%; }
.trou.is-right { border-color: var(--violet); }
.trou.is-wrong { border-color: var(--orange); background: var(--peach); }

/* Mots cachés */
.motscaches { --mc: 36px; }
.mc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.mc-def { font-size: 15px; margin-bottom: 6px; }
.mc-len { color: var(--ink-2); font-size: 13px; }
.mc-cells { display: flex; overflow-x: auto; padding-bottom: 2px; }
.mc-pad { flex: none; }
.mc-cell { flex: none; width: var(--mc); height: var(--mc); margin-right: 3px; text-align: center; font-weight: 600; font-size: 17px; text-transform: uppercase; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--paper); color: var(--ink); padding: 0; }
.mc-cell.is-key { background: #FFE9DE; border-color: var(--orange); }
.mc-cell.is-right { border-color: var(--violet); }
.mc-cell.is-wrong { border-color: var(--orange); }
@media (max-width: 420px) { .motscaches { --mc: 30px; } }

/* Réécriture / champs */
.field { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--paper); font-size: 15.5px; line-height: 1.5; resize: vertical; }
.field:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px #EADCF0; }
.field-label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; color: var(--violet); }
.situation, .demande-ratee { padding: 12px 14px; border-radius: 10px; background: var(--mist); margin-bottom: 8px; }
.situation-label, .corrige-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.ratee { font-style: italic; color: var(--orange-ink); font-weight: 600; }
.checks { display: grid; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--violet); flex: none; }
.corrige { margin-top: 14px; }

/* Défi */
.defi { display: grid; gap: 12px; }
details.voir { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
details.voir summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--violet); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.voir summary::-webkit-details-marker { display: none; }
details.voir summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--orange); }
details.voir[open] summary::after { content: "–"; }
.voir-body { padding: 0 14px 14px; font-size: 15px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Calendrier de l'avent · charte Encre & Signal, photos de Noël ===== */
/* Règles : Montserrat partout, titres 700, aucun dégradé, photos sous filtre violet,
   un seul signal orange par écran (la case du jour). */
h1, h2, h3, h4 { font-weight: 700; }
.btn { font-weight: 700; }

/* Emplacements visuels : photo + filtre violet transparent (comme le master) */
.visuel { position: relative; overflow: hidden; background: var(--violet) center / cover no-repeat; isolation: isolate; }
.visuel::before { content: ""; position: absolute; inset: 0; background: rgba(78, 0, 110, var(--voile, .52)); z-index: 0; pointer-events: none; }
.visuel > * { position: relative; z-index: 1; }
.slot-tag { position: absolute !important; z-index: 3 !important; top: 8px; right: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: var(--violet); border: 1.5px dashed var(--violet); border-radius: 6px; padding: 3px 7px; pointer-events: none; }
.slot-tag { display: none !important; }

/* Bandeau de relecture */
.review { background: var(--ink); color: #fff; font-size: 14px; }
.review .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding-block: 10px; }
.review strong { font-weight: 700; }
.review label { display: inline-flex; gap: 8px; align-items: center; }
.review select { background: #fff; color: var(--violet); border: 0; border-radius: 8px; padding: 6px 8px; font-weight: 600; }

/* En-tête */
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; flex-wrap: wrap; }
.logo { height: 28px; width: auto; display: block; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--violet); color: #fff; }

/* Surtitre avec carré orange (marqueur du master) */
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.kicker::before { content: ""; width: 9px; height: 9px; background: var(--orange); flex: none; }

/* Couverture */
.hero { color: #fff; --voile: .5; }
.hero .wrap { display: grid; gap: 18px; padding-block: clamp(36px, 7vw, 80px) 28px; }
.hero .kicker { color: #fff; }
.hero-title { font-size: clamp(40px, 7.4vw, 84px); font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: #fff; max-width: 12ch; }
.hero-sub { max-width: 58ch; font-size: clamp(16px, 2vw, 18px); color: #F1E4F7; }
.hero-sub strong { color: #fff; }
.marque { margin-top: 6px; font-size: 14px; line-height: 1.45; }
.marque b { display: block; font-weight: 700; color: #fff; }
.marque i { color: #E6D3EF; }
#snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* Tableau de bord */
.board { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: stretch; margin-top: 10px; }
.stat { background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 12px 16px; box-shadow: var(--shadow); min-width: 0; }
.stat-label { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--violet); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-value small { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.phrase { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.phrase-word { display: inline-flex; gap: 3px; }
.tile { width: 24px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--mist); color: transparent; border-bottom: 2px solid var(--line-2); transition: background .3s, color .3s; }
.tile.is-on { background: var(--violet); color: #fff; border-bottom-color: var(--violet); }
.tile.is-fixed { background: transparent; color: var(--violet); border: 0; width: 8px; }
.tile.is-new { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@media (max-width: 720px) { .board { grid-template-columns: 1fr 1fr; } .board .stat-phrase { grid-column: 1 / -1; } .tile { width: 20px; height: 26px; font-size: 13px; } }

/* Itinéraire en quatre étapes (sommaire Mer) */
.itin { padding-block: 44px 8px; }
.itin .kicker { color: var(--violet); }
.itin h2 { font-size: clamp(24px, 3.4vw, 34px); color: var(--violet); margin: 8px 0 22px; }
.itin-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; }
.itin-list li a { display: grid; gap: 10px; text-decoration: none; color: inherit; }
.itin-photo { aspect-ratio: 16 / 10; border-radius: 10px; --voile: .18; }
.itin-photo::before { transition: background .2s; }
.itin-list a:hover .itin-photo::before { background: rgba(78, 0, 110, .05); }
.itin-dot { display: flex; align-items: center; gap: 0; margin: 4px 0 2px; }
.itin-dot::before { content: ""; width: 12px; height: 12px; border-radius: 999px; background: var(--violet); flex: none; }
.itin-dot::after { content: ""; height: 2px; background: var(--violet); flex: 1; opacity: .35; }
.itin-num { font-size: 20px; font-weight: 700; color: var(--violet); }
.itin-etape { font-weight: 700; color: var(--violet); font-size: 15px; }
.itin-theme { font-size: 14px; color: var(--ink-2); }
@media (max-width: 720px) { .itin-list { grid-template-columns: 1fr 1fr; } }

/* Intercalaire de semaine */
.semaine { margin-top: 36px; scroll-margin-top: 16px; }
.inter { border-radius: 16px; color: #fff; padding: clamp(18px, 3vw, 28px); min-height: 200px; display: grid; align-content: end; gap: 6px; --voile: .55; }
.inter-num { font-size: clamp(54px, 8vw, 88px); font-weight: 700; line-height: .9; letter-spacing: -0.04em; }
.inter-rule { width: min(360px, 60%); height: 1px; background: rgba(255, 255, 255, .7); margin: 10px 0 6px; }
.inter .kicker { color: #fff; font-size: 11px; }
.inter h3 { font-size: clamp(24px, 3.6vw, 34px); }
.inter p { color: #F1E4F7; font-size: 15px; }

/* Grille des cases */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(118px, auto); grid-auto-flow: dense; gap: 12px; margin-top: 12px; }
.door { position: relative; border: 0; padding: 0; background: none; perspective: 1100px; text-align: left; min-height: 118px; border-radius: var(--r); }
.door.w2 { grid-column: span 2; }
.door.h2 { grid-row: span 2; }
.door-inside, .door-leaf { position: absolute; inset: 0; border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.door-inside { background: var(--mist); border: 1px solid var(--line); }
.door-inside .letter { font-size: 34px; font-weight: 700; color: var(--violet); line-height: 1; }
.door-inside .letter.flake { color: var(--violet); opacity: .55; }
.door-inside .t { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.door-leaf { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); transform-origin: left center; transition: transform .7s cubic-bezier(.3, .7, .2, 1), box-shadow .2s; backface-visibility: hidden; }
.door:hover .door-leaf { box-shadow: 0 2px 4px rgba(78, 0, 110, .08), 0 14px 30px -14px rgba(78, 0, 110, .35); }
.door .n { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; color: var(--violet); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.door .meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink-2); }
.door .tag { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.door.is-weekend .door-leaf { background: var(--mist); }
.door.is-locked .n { color: #CDBED5; }
.door.is-locked { cursor: not-allowed; }
.door.is-locked .door-leaf { box-shadow: none; background: #FCFAFD; }
.door.is-today .door-leaf { border: 2px solid var(--orange); box-shadow: 0 0 0 5px rgba(255, 75, 0, .12), var(--shadow); }
.door.is-today .n, .door.is-today .tag { color: var(--orange-ink); }
.door.is-open .door-leaf { transform: rotateY(-82deg); box-shadow: none; }
.door.is-finale .door-leaf { border: 0; color: #fff; --voile: .5; }
.door.is-finale .n { color: #fff; font-size: clamp(56px, 7vw, 96px); }
.door.is-finale .meta, .door.is-finale .tag { color: #fff; }
.door.is-finale.is-locked .n { color: rgba(255, 255, 255, .6); }
.door.is-finale.is-locked .door-leaf { --voile: .68; }
.lock { width: 14px; height: 14px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(100px, auto); gap: 8px; } .door { min-height: 100px; } .door-inside .t { font-size: 11.5px; } }

/* Kit décideur : aplat violet, sans dégradé */
.kit { margin: 44px 0 44px; border-radius: 22px; background: var(--violet); color: #fff; padding: clamp(20px, 4vw, 36px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.kit h2 { font-size: clamp(24px, 3.4vw, 34px); }
.kit p { color: #F1E4F7; }
.kit .kicker { color: #fff; }
.kit .copybox { background: #fff; border-color: transparent; }
.kit-list { margin: 14px 0 0; padding-left: 18px; display: grid; gap: 6px; color: #F1E4F7; }
.kit-list li::marker { color: #fff; }
.kit .block-title { color: #fff; }
.kit .block-title::after { background: rgba(255, 255, 255, .3); }
@media (max-width: 820px) { .kit { grid-template-columns: 1fr; } }

/* Pied de page : bloc marque + logo à droite */
.foot { border-top: 1px solid var(--line); background: var(--paper); margin-top: 40px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; padding-block: 22px; font-size: 13.5px; color: var(--ink-2); }
.foot .marque b { color: var(--violet); }
.foot .marque i { color: var(--ink-2); }
.foot q { font-style: italic; color: var(--violet); }
.foot .logo { height: 22px; }

/* Fenêtre de case */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(42, 18, 53, .5); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); opacity: 0; transition: opacity .25s; }
.sheet-bg.is-in { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; background: var(--paper); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(42, 18, 53, .25); transform: translateY(30px); transition: transform .35s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet-bg.is-in .sheet { transform: translateY(0); }
@media (min-width: 760px) { .sheet-bg { align-items: center; padding: 24px; } .sheet { border-radius: 22px; max-height: 88vh; } }
.sheet-cover { color: #fff; padding: 22px 20px 20px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; min-height: 170px; --voile: .58; }
.sheet-gate { color: var(--ink); }
.sheet-head { padding: 18px 20px 10px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sheet-day { display: flex; gap: 16px; align-items: flex-end; }
.sheet-num { font-size: 64px; line-height: .85; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.sheet-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #F1E4F7; margin-bottom: 4px; }
.sheet-head .sheet-kicker { color: var(--ink-2); }
.sheet h2 { font-size: clamp(22px, 3.4vw, 28px); }
.sheet-cover h2 { color: #fff; }
.sheet-head h2 { color: var(--violet); }
.close { width: 44px; height: 44px; flex: none; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--violet); display: grid; place-items: center; align-self: flex-start; }
.close svg { width: 18px; height: 18px; }
.sheet-body { padding: 20px 20px 24px; display: grid; gap: 20px; }
.accroche { font-size: 18px; line-height: 1.5; color: var(--ink); }
.block-title { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--violet); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.block-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tools { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.regle { position: relative; padding: 18px 18px 18px 20px; border-radius: 14px; background: var(--mist); border-left: 4px solid var(--violet); }
.regle p { font-size: 17px; font-weight: 700; color: var(--violet); }
.regle .block-title { margin-bottom: 6px; }
.org { padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--violet); }
.sheet-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-top: 4px; }
.nav-btns { display: flex; gap: 8px; }
.done-zone { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.stamp { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 14px; border: 3px solid var(--violet); border-radius: 10px; color: var(--violet); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-6deg); font-size: 13px; line-height: 1.2; }
.stamp b { font-size: 26px; color: var(--violet); letter-spacing: 0; }
.stamp.is-new { animation: stamp .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes stamp { 0% { transform: rotate(-6deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }

/* Dans la fenêtre, le bouton principal est le seul signal orange */
.sheet .copybox .btn-copy.is-ok { background: var(--violet); }

/* Finale */
.finale-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink); }
.pick[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }
.pick[disabled] { opacity: .4; }
.reveal { text-align: center; padding: 28px 16px; border-radius: 18px; color: #fff; display: grid; gap: 12px; justify-items: center; --voile: .6; }
.reveal .phrase { justify-content: center; }
.reveal .tile { background: rgba(255, 255, 255, .16); border-bottom-color: rgba(255, 255, 255, .35); }
.reveal .tile.is-on { background: #fff; color: var(--violet); border-bottom-color: #fff; }
.reveal .tile.is-fixed { color: #fff; }
.reveal p { color: #F1E4F7; max-width: 46ch; }
.reveal .kicker { color: #fff; }

/* Inscription (version suivie) */
.gate { display: grid; gap: 10px; }
.gate .check { font-size: 13.5px; color: var(--ink-2); }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); text-align: center; }
#toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* Ajustements : semaine sur 7 colonnes, du lundi au dimanche */
.grid { grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-flow: row; }
.door.col-2 { grid-column-start: 2; }
.door.is-finale .door-leaf { background-position: 62% 45%; }
.door .slot-tag { top: auto; bottom: 34px; right: 8px; }
.sheet-cover .slot-tag { top: auto; bottom: 8px; }
.reveal .tile.is-fixed { background: transparent; border: 0; }
.reveal .btn-primary { background: #fff; color: var(--violet); box-shadow: none; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .door.col-2 { grid-column-start: auto; } }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Photos de Noël déjà sombres : voile plus léger */
.visuel { --voile: .38; }
.hero { --voile: .3; }
.inter { --voile: .42; }
.itin-photo { --voile: .12; }
.sheet-cover { --voile: .45; }
.reveal { --voile: .5; }
.door.is-finale .door-leaf { --voile: .38; }

/* Lien de reprise */
.hero .btn-reprise { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); min-height: 40px; padding: 8px 16px; font-size: 14px; }
.hero .btn-reprise:hover { border-color: #fff; }
.reprise-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }


/* ===== Ajouts version dynamique (plugin WordPress), dans la charte Encre & Signal ===== */
/* Compte dans l'en-tête */
.top-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.account { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.account strong { color: var(--violet); font-weight: 700; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
@media (max-width: 560px) {
  .top .wrap { padding-block: 14px; gap: 12px; }
  .top .wrap { flex-wrap: nowrap; }
  .top-right { width: auto; flex-wrap: nowrap; }
  .seg button { padding: 8px 10px; font-size: 13px; }
  .account .btn-sm { padding: 6px 12px; font-size: 13px; }
  .account > span { display: none; }
}
/* Bouton de connexion dans la couverture (à la place de « Continuer sur un autre appareil ») */
/* Appel à l'action principal : orange de la charte, texte large et gras (contraste suffisant sur l'orange) */
.compte-cta { display: grid; justify-items: start; gap: 8px; }
.hero .btn-compte { background: var(--orange); color: #fff; border: 0; min-height: 54px; padding: 12px 26px; font-size: 18.7px; font-weight: 700; letter-spacing: .01em; box-shadow: 0 10px 24px -10px rgba(255, 75, 0, .85), 0 0 0 0 rgba(255, 75, 0, .45); animation: cta-halo 2.8s ease-out 1.2s 3; }
.hero .btn-compte:hover { background: var(--orange-ink); transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(255, 75, 0, .9); }
.hero .btn-compte:active { transform: translateY(0); }
.hero .btn-compte:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn-fleche { display: inline-block; transition: transform .2s ease; }
.hero .btn-compte:hover .btn-fleche { transform: translateX(4px); }
.compte-aide { font-size: 13px; color: #F1E4F7; }
@keyframes cta-halo { 0% { box-shadow: 0 10px 24px -10px rgba(255, 75, 0, .85), 0 0 0 0 rgba(255, 75, 0, .5); } 70%, 100% { box-shadow: 0 10px 24px -10px rgba(255, 75, 0, .85), 0 0 0 14px rgba(255, 75, 0, 0); } }
@media (max-width: 560px) { .compte-cta { justify-items: stretch; } .hero .btn-compte { width: 100%; font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { .hero .btn-compte { animation: none; } .btn-fleche { transition: none; } }
.hero .compte-ok { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: #F1E4F7; }
.hero .compte-ok b { color: #fff; }

/* Connexion */
.login-ok { display: grid; gap: 12px; padding: 18px; border-radius: 14px; background: var(--mist); border-left: 4px solid var(--violet); }
.login-ok strong { color: var(--violet); font-size: 17px; font-weight: 700; }
.nudge { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--mist); font-size: 14.5px; }
.hp { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-box { margin-top: 12px; min-height: 65px; }
.form-error { margin: 6px 0 0; padding: 10px 12px; border-left: 3px solid var(--orange); border-radius: 0 10px 10px 0; background: var(--peach); color: var(--orange-ink); font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.form-error:empty { display: none; }
.app-error { margin: 20px 0; padding: 14px 16px; border-radius: 12px; background: var(--peach); border-left: 3px solid var(--orange); }

/* Cases */
.door.is-locked .door-inside { visibility: hidden; }
/* Case faite : le battant disparaît après l'animation d'ouverture (pivoté, il déborderait sur la case voisine) */
.door.is-done .door-leaf { transform: rotateY(-82deg); opacity: 0; visibility: hidden; transition: transform .7s cubic-bezier(.3, .7, .2, 1), opacity .3s .5s, visibility 0s .8s; }
.door.is-done .door-inside { border-color: var(--line-2); }
.done-badge { position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 700; color: var(--violet); background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; z-index: 2; }

/* Finale terminée : photo du grand jour sous filtre violet, trophée et phrase révélée */
.door.is-finale .door-inside { color: #fff; justify-content: space-between; gap: 10px; border: 0; padding: 16px 18px; background-position: 62% 45%; }
.door.is-finale .door-inside .trophy { color: #fff; line-height: 0; }
.door.is-finale .door-inside .finale-txt { display: grid; gap: 4px; }
.door.is-finale .door-inside .finale-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.door.is-finale .door-inside .finale-kicker::before { content: ""; width: 8px; height: 8px; background: var(--orange); flex: none; }
.door.is-finale .door-inside .t { color: #fff; font-size: clamp(15px, 1.8vw, 20px); font-weight: 700; line-height: 1.2; }
.door.is-finale .done-badge { background: #fff; border-color: #fff; color: var(--violet); }
.finale-top { display: flex; align-items: flex-start; gap: 14px; padding-right: 64px; }
.finale-score { display: grid; line-height: 1.1; font-size: 14px; color: #F1E4F7; padding-top: 6px; }
.finale-score b { font-size: 30px; color: #fff; font-weight: 700; }
.finale-score small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #F1E4F7; margin-top: 3px; }
.mini-phrase { display: flex; flex-wrap: wrap; gap: 6px 10px; align-content: center; }
.mini-word { display: inline-flex; gap: 3px; }
.mini-tile { width: 22px; height: 28px; border-radius: 5px; display: grid; place-items: center; background: #fff; color: var(--violet); font-weight: 700; font-size: 14px; }
.mini-tile.is-fixed { width: 7px; background: transparent; color: #fff; }
@media (max-width: 900px) { .mini-tile { width: 18px; height: 24px; font-size: 12px; } }
@media (max-width: 560px) {
  .door.is-finale .door-inside { padding: 12px; gap: 8px; }
  .door.is-finale .door-inside .trophy svg { width: 54px; height: 54px; }
  .finale-top { gap: 8px; padding-right: 48px; }
  .finale-score b { font-size: 22px; }
  .mini-phrase { gap: 4px 6px; }
  .mini-tile { width: 13px; height: 18px; font-size: 10px; border-radius: 3px; }
  .mini-tile.is-fixed { width: 4px; }
}

/* Chargement */
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -3px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: spin 1.6s linear infinite !important; } }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 30px 0; color: var(--violet); font-weight: 700; }
.sheet-body > .loading { min-height: 220px; }
.done-zone .loading { justify-content: flex-start; padding: 8px 0; font-size: 14.5px; }
#semaines > .loading, #semaines > .app-error { margin-top: 36px; }
.btn.is-loading, .btn.is-loading[disabled] { opacity: 1; cursor: progress; }
#semaines.is-busy { opacity: .5; pointer-events: none; transition: opacity .2s; }
.review select[disabled] { opacity: .6; }
/* Colonne de départ de chaque semaine (lundi = 1) */
.door.col-3 { grid-column-start: 3; } .door.col-4 { grid-column-start: 4; } .door.col-5 { grid-column-start: 5; } .door.col-6 { grid-column-start: 6; } .door.col-7 { grid-column-start: 7; }
@media (max-width: 900px) { .door.col-3, .door.col-4, .door.col-5, .door.col-6, .door.col-7 { grid-column-start: auto; } }
.door-inside > .slot-tag { display: none; }
/* Entreprise remplie automatiquement par le lien */
.org-auto { display: grid; gap: 4px; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--mist); font-weight: 700; color: var(--ink); }
.org-auto .field-label { margin: 0; }
/* Personnalisation entreprise : pastille en tête de couverture */
.hero-org { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 7px 14px 7px 10px; border-radius: 999px; background: #fff; color: var(--violet); font-size: 14px; line-height: 1.3; box-shadow: var(--shadow); }
.hero-org b { font-weight: 700; }
.hero-org-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--mist); flex: none; }
@media (max-width: 560px) { .hero-org { font-size: 13px; } }
/* Rappel du matin : carte avec interrupteur, sous le tableau de bord de la couverture */
#hero-compte:empty { display: none; }
.rappel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; width: 100%; background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 12px 16px; box-shadow: var(--shadow); }
.rappel-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mist); color: var(--violet); flex: none; }
.rappel.is-on .rappel-ico { background: var(--violet); color: #fff; }
.rappel-txt { display: grid; gap: 2px; flex: 1; min-width: 200px; font-size: 14.5px; color: var(--ink-2); }
.rappel-txt b { font-size: 15px; font-weight: 700; color: var(--violet); }
.rappel-ctrl { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.rappel-etat { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.rappel.is-on .rappel-etat { color: var(--violet); }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; border: 0; padding: 0; background: var(--line-2); transition: background .2s; }
.switch.is-on { background: var(--violet); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(42, 18, 53, .3); transition: transform .2s; }
.switch.is-on .switch-knob { transform: translateX(22px); }
.switch.is-busy { opacity: .6; cursor: progress; }
@media (max-width: 560px) { .rappel { gap: 10px; } .rappel-ctrl { margin-left: 54px; } }
.kit-copies { display: grid; gap: 18px; align-content: start; }
/* Notifications : orange doux, lisible sur fond clair comme sur les photos */
#toast { background: #FFF1EA; color: #A33300; border: 1.5px solid #FFB48F; border-radius: 14px; padding: 12px 18px 12px 16px; font-weight: 700; line-height: 1.45; box-shadow: 0 10px 30px -10px rgba(42, 18, 53, .35), 0 2px 6px rgba(42, 18, 53, .08); display: flex; gap: 10px; align-items: flex-start; text-align: left; width: max-content; max-width: min(560px, calc(100% - 32px)); }
#toast::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; background: var(--orange); }
/* Pastille « case faite » : même orange doux que les notifications */
.done-badge { background: #FFF1EA; border-color: #FFB48F; color: #A33300; }
.door.is-finale .done-badge { background: #FFF1EA; border-color: #FFF1EA; color: #A33300; }
