/* Maquette administrable Studio Merci · V2.
   Trois couches qui ne se mélangent pas :
   1. LE SITE (la feuille blanche) : gris purs, coins carrés, Helvetica, une seule couleur d'accent orange.
   2. L'OUTIL (tout autour) : gris ardoise, coins arrondis, police système, bleu réservé à « montrer » (sélection, focus).
   3. LES PERSONNES : pétrole = Julien (J), framboise = Samira (S) ; consigne = carte pétrole pâle, échanges = bulles.
   Aucun élément de la future charte ni du site d'inspiration. */

:root {
  color-scheme: light;
  /* outil */
  --t-fond: #E9ECF0; --t-panneau: #F7F8FA; --t-surface: #FFFFFF; --t-surface-2: #F0F2F5; --t-surface-3: #E3E7EC;
  --t-trait: #DDE1E7; --t-trait-champ: #808999;
  --t-texte: #1A2030; --t-texte-2: #525B6B; --t-texte-3: #636B7A;
  --t-encre: #1A2030; --t-encre-survol: #2C3446; --t-encre-appui: #0F131C;
  --t-bleu: #2257D6; --t-bleu-fonce: #1A47B5; --t-bleu-pale: #EAF0FD; --t-bleu-voile: rgb(34 87 214 / .5);
  --t-focus: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--t-bleu);
  --t-vide-texte: #5D6676; --t-vide-trait: #808999;
  --t-vide-hachure: repeating-linear-gradient(135deg, #EEF1F5 0 6px, #FFFFFF 6px 12px);
  --t-vide-hachure-noir: repeating-linear-gradient(135deg, #22262E 0 6px, #111111 6px 12px);
  /* états */
  --e-propose: #6B7383; --e-propose-texte: #454D5B; --e-propose-fond: #EEF0F3;
  --e-encours: #B26A00; --e-encours-texte: #8A4B00; --e-encours-fond: #FFF2DC;
  --e-valide: #1C8043; --e-valide-texte: #11632F; --e-valide-fond: #E3F3E8;
  --e-erreur: #C0272D; --e-erreur-texte: #A3161D; --e-erreur-fond: #FDECEC;
  /* personnes */
  --cresto: #0B6A75; --cresto-pale: #E6F3F4; --cresto-trait: #9CCBD0;
  --cresta: #A8216A; --cresta-pale: #FBECF3; --cresta-trait: #E3A9C6;
  /* typo, rayons, ombres, tailles */
  --t-police: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --t-r-1: 4px; --t-r-2: 6px; --t-r-3: 8px; --t-r-4: 12px;
  --t-ombre-1: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .10);
  --t-ombre-2: 0 4px 12px rgb(16 24 40 / .12), 0 1px 3px rgb(16 24 40 / .08);
  --t-ombre-3: 0 16px 48px rgb(16 24 40 / .24);
  --t-ombre-feuille: 0 0 0 1px rgb(26 32 48 / .10), 0 2px 8px rgb(16 24 40 / .08), 0 12px 32px rgb(16 24 40 / .06);
  --t-barre-h: 48px; --t-menu-l: 240px; --t-insp-l: 360px; --t-marge-zone: 44px;
  --t-d-1: 100ms; --t-d-2: 160ms; --t-d-3: 220ms; --t-courbe: cubic-bezier(.2, 0, 0, 1); --t-courbe-sortie: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-d-1: 0ms; --t-d-2: 0ms; --t-d-3: 0ms; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--t-fond); color: var(--t-texte); font: 14px/21px var(--t-police); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #CFDCFB; color: var(--t-texte); }
:focus-visible { outline: none; box-shadow: var(--t-focus); }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-20 { width: 20px; height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: 12px var(--t-police); border: 1px solid var(--t-trait-champ); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; }
.chargement { padding: 40px; color: var(--t-texte-2); }

/* ---------- connexion ---------- */
.connexion { background: var(--t-fond); }
.porte { max-width: 400px; margin: 14vh auto; padding: 32px; background: var(--t-surface); border-radius: var(--t-r-4); box-shadow: var(--t-ombre-2); }
.porte h1 { font: 600 22px/28px var(--t-police); margin: 0 0 6px; display: grid; gap: 2px; }
.porte h1 span { font-weight: 400; font-size: 14px; color: var(--t-texte-2); }
.porte-texte { color: var(--t-texte-2); margin: 0 0 24px; }
.porte form { display: grid; gap: 14px; }
.porte label { display: grid; gap: 4px; font-weight: 600; font-size: 12px; color: var(--t-texte-2); }
.porte input { height: 40px; padding: 0 12px; border: 1px solid var(--t-trait-champ); border-radius: var(--t-r-2); font-size: 15px; font-weight: 400; color: var(--t-texte); }
.porte input:focus { border-color: var(--t-bleu); box-shadow: var(--t-focus); outline: none; }
.porte button { height: 40px; border: 0; border-radius: var(--t-r-2); background: var(--t-encre); color: #fff; font-weight: 600; cursor: pointer; }
.err { color: var(--e-erreur-texte); }

/* ---------- boutons et contrôles de l'outil ---------- */
.btn, .btn-p, .btn-d, .btn-danger, .btn-ic {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--t-r-2); border: 1px solid transparent; font: 500 13px/1 var(--t-police); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background-color var(--t-d-1), color var(--t-d-1);
}
.btn { background: #fff; border-color: #C9CED6; color: var(--t-texte); }
.btn:hover { background: var(--t-surface-2); }
.btn-p { background: var(--t-encre); color: #fff; font-weight: 600; }
.btn-p:hover { background: var(--t-encre-survol); }
.btn-p:active { background: var(--t-encre-appui); }
.btn-d { background: none; color: var(--t-texte-2); }
.btn-d:hover { background: var(--t-surface-2); color: var(--t-texte); }
.btn-danger { background: #fff; border-color: #F1C4C7; color: var(--e-erreur-texte); }
.btn-danger:hover { background: var(--e-erreur-fond); }
.btn-ic { width: 28px; height: 28px; padding: 0; background: none; color: var(--t-texte-2); }
.btn-ic:hover { background: var(--t-surface-2); color: var(--t-texte); }
.btn-petit { height: 24px; padding: 0 8px; font-size: 12px; }
button:disabled { opacity: .45; cursor: default; }
.lien-outil { text-align: left; color: var(--t-bleu-fonce); text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

.champ, .zone-texte, select.choix {
  width: 100%; min-height: 32px; padding: 6px 10px; border: 1px solid var(--t-trait-champ); border-radius: var(--t-r-2);
  background: #fff; font: 14px/21px var(--t-police); color: var(--t-texte);
}
.zone-texte { min-height: 64px; resize: vertical; field-sizing: content; max-height: 40vh; }
.zone-texte[rows="1"] { min-height: 36px; }
.champ:focus, .zone-texte:focus, select.choix:focus { border-color: var(--t-bleu); box-shadow: var(--t-focus); outline: none; }
.champ::placeholder, .zone-texte::placeholder { color: var(--t-texte-3); }
.etiquette { display: block; font: 600 12px/16px var(--t-police); color: var(--t-texte-2); margin-bottom: 4px; }
.aide { font-size: 12px; line-height: 16px; color: var(--t-texte-3); margin: 4px 0 0; }

.segment { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; background: var(--t-surface-2); border-radius: var(--t-r-3); }
.segment button { height: 28px; min-width: 28px; padding: 0 10px; border: 0; border-radius: var(--t-r-2); background: none; color: var(--t-texte-2); font: 500 13px/1 var(--t-police); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segment button[aria-pressed="true"] { background: #fff; color: var(--t-texte); font-weight: 600; box-shadow: var(--t-ombre-1); }
.interrupteur { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.interrupteur input { appearance: none; width: 32px; height: 18px; border-radius: 999px; background: var(--t-trait-champ); position: relative; cursor: pointer; flex: none; margin: 0; transition: background-color var(--t-d-2); }
.interrupteur input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform var(--t-d-2) var(--t-courbe); }
.interrupteur input:checked { background: var(--t-encre); }
.interrupteur input:checked::after { transform: translateX(14px); }

/* pastilles, badges */
.statut { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; font: 600 12px/1 var(--t-police); white-space: nowrap; }
.statut.st-proposition { background: var(--e-propose-fond); color: var(--e-propose-texte); }
.statut.st-en-cours { background: var(--e-encours-fond); color: var(--e-encours-texte); }
.statut.st-valide { background: var(--e-valide-fond); color: var(--e-valide-texte); }
.puce-st { width: 14px; height: 14px; flex: none; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; font: 600 11px/1 var(--t-police); font-variant-numeric: tabular-nums; background: var(--t-surface-3); color: var(--t-texte-2); }
.badge.de-cresto { background: var(--cresto); color: #fff; }
.badge.de-cresta { background: var(--cresta); color: #fff; }
.hors-site { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border: 1px dashed currentColor; border-radius: var(--t-r-1); font: 500 10.5px/1 var(--t-police); letter-spacing: .04em; text-transform: uppercase; }
.pastille-p { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 700 11px/1 var(--t-police); flex: none; }
.pastille-p.cresto { background: var(--cresto); }
.pastille-p.cresta { background: var(--cresta); }

/* ---------- disposition de l'application ---------- */
.corps-app { overflow: hidden; }
.app { display: grid; height: 100vh; height: 100dvh;
  grid-template: "barre barre barre" var(--t-barre-h) "plan zone insp" minmax(0, 1fr) / var(--t-menu-l) minmax(0, 1fr) var(--t-insp-l); }
.app.apercu { grid-template-columns: 0 minmax(0, 1fr) 0; }
.app.apercu .plan, .app.apercu .insp { display: none; }

/* barre du haut */
.barre { grid-area: barre; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--t-surface); border-bottom: 1px solid var(--t-trait); min-width: 0; }
.barre-g, .barre-c, .barre-d { display: flex; align-items: center; gap: 8px; min-width: 0; }
.barre-c { margin-inline: auto; }
.barre-g .marque { font-weight: 600; white-space: nowrap; }
.barre-g .fil-ariane { color: var(--t-texte-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-g .sep { color: var(--t-texte-3); }
.sel-version { height: 26px; padding: 0 22px 0 8px; border: 1px solid #C9CED6; border-radius: 999px; font: 500 12px/1 var(--t-police); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23525B6B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 7px center; appearance: none; cursor: pointer; }
.sauve { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t-texte-3); white-space: nowrap; }
.sauve.encours .ic { animation: tourne 800ms linear infinite; }
.sauve.err { background: var(--e-encours-fond); color: var(--e-encours-texte); border-radius: 999px; padding: 2px 8px; font-weight: 600; }
@keyframes tourne { to { transform: rotate(360deg); } }
.moi-btn { width: 28px; height: 28px; border-radius: 50%; border: 0; color: #fff; font: 700 12px/1 var(--t-police); cursor: pointer; }
.moi-btn.cresto { background: var(--cresto); }
.moi-btn.cresta { background: var(--cresta); }
.btn-messages { position: relative; }
.btn-messages .badge { position: absolute; top: -4px; right: -6px; }
.seul-etroit { display: none; }

/* menu latéral (plan) */
.plan { grid-area: plan; background: var(--t-panneau); border-right: 1px solid var(--t-trait); display: flex; flex-direction: column; min-height: 0; }
.plan-defile { overflow: auto; flex: 1; padding-bottom: 12px; }
.progres { padding: 16px; border-bottom: 1px solid var(--t-trait); }
.progres-titre { font-weight: 600; margin: 0 0 8px; }
.barre-prog { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--e-propose-fond); }
.barre-prog i { display: block; height: 100%; }
.barre-prog .v { background: var(--e-valide); } .barre-prog .c { background: var(--e-encours); }
.progres-chiffres { margin: 6px 0 0; font-size: 12px; color: var(--t-texte-2); }
.jalon { display: flex; gap: 8px; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--t-texte-2); }
.jalon strong { color: var(--t-texte); font-weight: 600; }
.groupe-titre { margin: 16px 0 4px; padding: 0 16px; font: 600 11px/16px var(--t-police); letter-spacing: .06em; text-transform: uppercase; color: var(--t-texte-3); }
.plan ul { list-style: none; margin: 0; padding: 0 8px; }
.plan li + li { margin-top: 2px; }
.el { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; border: 0; border-radius: var(--t-r-2); background: none; color: var(--t-texte); text-align: left; cursor: pointer; font: 14px/19px var(--t-police); }
.el:hover { background: var(--t-surface-2); }
.el[aria-current="true"] { background: var(--t-bleu-pale); color: var(--t-bleu-fonce); font-weight: 600; }
.el .num { width: 18px; color: var(--t-texte-3); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.el .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el .ic { color: var(--t-texte-2); }
.el[aria-current="true"] .ic { color: var(--t-bleu-fonce); }
.el .compte { font-size: 12px; color: var(--t-texte-3); font-variant-numeric: tabular-nums; }
.el.masquee .nom { color: var(--t-texte-3); }
.el .attend { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.el .attend.de-cresto { color: var(--cresto); } .el .attend.de-cresta { color: var(--cresta); }
.sous { padding-left: 12px !important; }
.plan-bas { border-top: 1px solid var(--t-trait); padding: 8px; display: grid; gap: 4px; }
.plan-bas .btn { width: 100%; }

/* zone centrale */
.zone { grid-area: zone; overflow: auto; padding: 32px var(--t-marge-zone) 96px; scroll-padding-top: 24px; position: relative; min-width: 0; }
.bandeau-fige { position: sticky; top: -32px; z-index: 6; margin: -32px calc(-1 * var(--t-marge-zone)) 24px; padding: 8px 16px; background: var(--t-encre); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bandeau-fige .btn { background: #fff; color: var(--t-encre); border-color: #fff; }

/* inspecteur */
.insp { grid-area: insp; background: var(--t-surface); border-left: 1px solid var(--t-trait); display: flex; flex-direction: column; min-height: 0; }
.insp-tete { padding: 14px 16px 0; }
.insp-l1 { display: flex; align-items: center; gap: 8px; }
.insp-l1 .num { font: 600 12px/1 var(--t-police); color: var(--t-texte-3); font-variant-numeric: tabular-nums; }
.insp-l1 h2 { margin: 0; font: 600 15px/20px var(--t-police); flex: 1; min-width: 0; }
.insp-l1 input.nom-section { flex: 1; min-width: 0; height: 28px; border: 1px solid transparent; border-radius: var(--t-r-2); padding: 0 6px; font: 600 15px/20px var(--t-police); background: none; }
.insp-l1 input.nom-section:hover { border-color: var(--t-trait); }
.insp-l1 input.nom-section:focus { border-color: var(--t-bleu); box-shadow: var(--t-focus); outline: none; background: #fff; }
.insp-l2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.insp-l2 .meta { font-size: 12px; color: var(--t-texte-3); }
.insp-l3 { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 600 12px/16px var(--t-police); }
.insp-l3.de-cresto { color: var(--cresto); } .insp-l3.de-cresta { color: var(--cresta); }
.rouverte { margin-top: 8px; font-size: 12px; color: var(--e-encours-texte); background: var(--e-encours-fond); border-radius: var(--t-r-2); padding: 4px 8px; }
.onglets { display: flex; gap: 4px; padding: 0 8px; margin-top: 12px; border-bottom: 1px solid var(--t-trait); }
.onglet { position: relative; height: 40px; padding: 0 10px; border: 0; background: none; color: var(--t-texte-2); font: 500 13px/1 var(--t-police); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.onglet:hover { color: var(--t-texte); }
.onglet[aria-selected="true"] { color: var(--t-texte); font-weight: 600; }
.onglet[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--t-encre); border-radius: 2px; }
.insp-corps { flex: 1; overflow: auto; padding: 16px; }
.vide-etat { text-align: center; padding: 32px 16px; color: var(--t-texte-2); }
.vide-etat .rond { width: 48px; height: 48px; border-radius: 50%; background: var(--t-surface-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--t-texte-2); }
.vide-etat h3 { margin: 0 0 4px; font: 600 14px/20px var(--t-police); color: var(--t-texte); }
.vide-etat p { margin: 0 auto; max-width: 28em; }
.groupe { margin-bottom: 20px; }
.groupe:last-child { margin-bottom: 0; }
.groupe > .etiquette { margin-bottom: 6px; }
.rangee { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.separe { border-top: 1px solid var(--t-trait); padding-top: 16px; }

/* consigne : carte pétrole pâle, la parole de Julien */
.consigne-carte { background: var(--cresto-pale); border: 1px solid var(--cresto-trait); border-radius: var(--t-r-3); padding: 14px 16px; font: 15px/24px var(--t-police); color: var(--t-texte); }
.consigne-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 12px/16px var(--t-police); color: var(--cresto); }
.consigne-tete .hors-site { margin-left: auto; }
.consigne-partie { margin: 0 0 12px; }
.consigne-partie:last-child { margin-bottom: 0; }
.consigne-partie h4 { margin: 0 0 2px; font: 600 12px/16px var(--t-police); color: var(--cresto); }
.consigne-partie p { margin: 0; white-space: pre-wrap; }
.mots { margin-top: 12px; font-size: 14px; line-height: 21px; color: var(--t-texte-2); }
.mots summary { cursor: pointer; font-weight: 600; color: var(--cresto); }
.mots p { white-space: pre-wrap; margin: 6px 0 0; }
.questions { margin-top: 16px; display: grid; gap: 12px; }
.questions h3 { margin: 0; font: 600 13px/18px var(--t-police); display: flex; align-items: center; gap: 8px; }
.question { border: 1px solid var(--t-trait); border-radius: var(--t-r-3); padding: 12px; }
.question.repondue { border-color: #B9DEC6; background: #F7FBF8; }
.question p { margin: 0 0 8px; font: 14px/21px var(--t-police); }
.question .qui { font-size: 12px; color: var(--t-texte-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.reco { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--t-r-2); background: var(--cresto-pale); color: var(--t-texte); font-size: 13px; }

/* échanges : bulles */
.fil { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.msg { max-width: 88%; justify-self: start; }
.msg.moi { justify-self: end; }
.msg.change { margin-top: 12px; }
.msg-tete { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: var(--t-texte-3); }
.msg.moi .msg-tete { justify-content: flex-end; }
.msg-tete .auteur { font-weight: 600; }
.msg.cresto .auteur { color: var(--cresto); } .msg.cresta .auteur { color: var(--cresta); }
.bulle { padding: 8px 12px; border-radius: var(--t-r-4); font: 14px/21px var(--t-police); overflow-wrap: anywhere; }
.msg.cresto .bulle { background: var(--cresto-pale); border-top-left-radius: 4px; }
.msg.cresta .bulle { background: var(--cresta-pale); border-top-left-radius: 4px; }
.msg.moi .bulle { border-top-left-radius: var(--t-r-4); border-top-right-radius: 4px; }
.fil.regle .bulle { background: var(--t-surface-2); }
.bulle img, .saisie img { display: block; max-height: 200px; max-width: 100%; width: auto; margin: 6px 0; border: 1px solid var(--t-trait); border-radius: var(--t-r-2); }
.bulle a { color: var(--t-bleu-fonce); }
img.envoi { opacity: .45; }
.msg-actions { display: flex; gap: 2px; justify-content: flex-end; margin-top: 2px; opacity: 0; transition: opacity var(--t-d-1); }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.nouveau-sep { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font: 600 11px/1 var(--t-police); letter-spacing: .06em; text-transform: uppercase; }
.nouveau-sep::before, .nouveau-sep::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.nouveau-sep.de-cresto { color: var(--cresto); } .nouveau-sep.de-cresta { color: var(--cresta); }
.saisie { min-height: 72px; max-height: 200px; overflow: auto; padding: 8px 12px; border: 1px solid var(--t-trait-champ); border-radius: var(--t-r-3); font: 14px/21px var(--t-police); background: #fff; overflow-wrap: anywhere; }
.saisie:focus { border-color: var(--t-bleu); box-shadow: var(--t-focus); outline: none; }
.saisie:empty::before { content: attr(data-ph); color: var(--t-texte-3); pointer-events: none; }
.saisie-bas { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.saisie-bas .astuce { margin-left: auto; font-size: 12px; color: var(--t-texte-3); }
.histo { margin-top: 20px; border-top: 1px solid var(--t-trait); padding-top: 12px; }
.histo summary { cursor: pointer; font-weight: 600; }
.histo .bulle { background: var(--t-surface-2) !important; }
.histo-v { font: 600 11px/16px var(--t-police); letter-spacing: .06em; text-transform: uppercase; color: var(--t-texte-3); margin: 12px 0 6px; }

/* ---------- espaces de préparation (centre, couche outil) ---------- */
.esp { max-width: 860px; margin: 0 auto; }
.esp-tete { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.esp-tete h1 { margin: 0; font: 600 22px/28px var(--t-police); }
.esp-tete p { margin: 4px 0 0; color: var(--t-texte-2); font-size: 14px; line-height: 21px; max-width: 60ch; }
.esp-tete .hors-site { margin-left: auto; color: var(--t-texte-3); flex: none; margin-top: 6px; }
.carte { background: var(--t-surface); border: 1px solid var(--t-trait); border-radius: var(--t-r-3); padding: 16px; margin-bottom: 12px; }
.carte h2 { margin: 0 0 8px; font: 600 15px/20px var(--t-police); display: flex; align-items: center; gap: 8px; }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.bienvenue { background: var(--cresto-pale); border-color: var(--cresto-trait); font: 15px/24px var(--t-police); }
.bienvenue p { margin: 0 0 10px; }
.liste-plate { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.liste-plate li { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: var(--t-r-2); }
.liste-plate li:hover { background: var(--t-surface-2); }
.liste-plate .quand { margin-left: auto; font-size: 12px; color: var(--t-texte-3); white-space: nowrap; }
.decision .options { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.option { min-height: 32px; padding: 4px 12px; border-radius: var(--t-r-2); border: 1px solid #C9CED6; background: #fff; cursor: pointer; font: 13px/18px var(--t-police); text-align: left; }
.option:hover { background: var(--t-surface-2); }
.option[aria-pressed="true"] { background: var(--t-encre); border-color: var(--t-encre); color: #fff; font-weight: 600; }
.decision.prise h2 .ic { color: var(--e-valide); }
.liste-plate li.tache { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 10px; align-items: start; padding: 8px; border-radius: var(--t-r-2); }
.tache:hover { background: var(--t-surface-2); }
.tache input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--e-valide); cursor: pointer; }
.tache .texte { font: 14px/21px var(--t-police); }
.tache.faite .texte { color: var(--t-texte-2); }
.tache .meta { grid-column: 2 / -1; font-size: 12px; color: var(--t-texte-3); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tache .urgent { color: var(--e-erreur-texte); font-weight: 600; }
.tache .echeance { font-size: 12px; color: var(--t-texte-2); white-space: nowrap; }
.depot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.idee { display: flex; align-items: flex-start; gap: 8px; }
.idee .zone-texte { min-height: 36px; }
.serp { border: 1px solid var(--t-trait); border-radius: var(--t-r-3); padding: 12px 14px; font-family: Arial, sans-serif; }
.serp .u { font-size: 12px; color: #4d5156; }
.serp .t { font-size: 18px; line-height: 1.3; color: #1a0dab; margin: 2px 0; }
.serp .d { font-size: 13px; line-height: 1.5; color: #4d5156; }

/* ---------- la feuille : le site ---------- */
.cadre { position: relative; margin-inline: auto; box-shadow: var(--t-ombre-feuille); background: #fff; }
.cadre-bureau { max-width: 1440px; border-radius: 10px; }
.cadre-bureau::before { content: ""; display: block; height: 28px; border-radius: 10px 10px 0 0; border-bottom: 1px solid var(--t-trait);
  background: radial-gradient(circle 4px at 16px 50%, #C9CED6 98%, transparent), radial-gradient(circle 4px at 30px 50%, #C9CED6 98%, transparent), radial-gradient(circle 4px at 44px 50%, #C9CED6 98%, transparent), var(--t-surface-2); }
.cadre-mobile { width: 390px; max-width: 100%; border-radius: 38px; box-shadow: 0 0 0 10px var(--t-encre), var(--t-ombre-feuille); padding-top: 44px; }
.cadre-mobile::before { content: ""; position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 100px; height: 26px; border-radius: 999px; background: #000; }
.cadre-mobile .s-pied { border-radius: 0 0 38px 38px; }
.cadre-bureau .s-pied { border-radius: 0 0 10px 10px; }

.site {
  container: site / inline-size;
  --s-police: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --s-encre: #111111; --s-texte-2: #4D4D4D; --s-texte-3: #666666; --s-fond: #FFFFFF; --s-fond-2: #F4F4F4; --s-fond-noir: #111111;
  --s-trait: #E2E2E2; --s-trait-champ: #767676; --s-media: #E9E9E9; --s-media-motif: #BDBDBD; --s-media-texte: #595959;
  --s-accent: #FF5A1F; --s-max: 1200px;
  position: relative; background: var(--s-fond); color: var(--s-encre); font-family: var(--s-police);
}
.site > * {
  --s-display: clamp(44px, 23.7px + 5.65cqi, 96px); --s-h2: clamp(30px, 19.8px + 2.83cqi, 56px); --s-h3: clamp(20px, 18.4px + .43cqi, 24px);
  --s-chiffre: clamp(32px, 14px + 7cqi, 80px); --s-lead: clamp(18px, 16.4px + .43cqi, 22px); --s-corps: clamp(16px, 15.2px + .22cqi, 18px);
  --s-petit: clamp(13px, 12.6px + .11cqi, 14px); --s-section-y: clamp(56px, 27.8px + 7.83cqi, 128px); --s-marge: clamp(16px, -2.8px + 5.22cqi, 64px);
  --s-gouttiere: clamp(16px, 12.9px + .87cqi, 24px); --s-bloc-gap-y: clamp(40px, 30.6px + 2.61cqi, 64px); --s-sous-mb: clamp(32px, 19.5px + 3.48cqi, 64px);
  --s-cta-mt: clamp(32px, 25.7px + 1.74cqi, 48px);
}
.site ::selection { background: #FFD4C2; }
.site [contenteditable] { caret-color: var(--s-accent); }

/* en-tête du site */
.s-entete { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; padding: 12px var(--s-marge); border-bottom: 1px solid var(--s-trait); }
.s-logo { min-width: 120px; min-height: 32px; border: 1.5px solid var(--s-encre); display: grid; place-items: center; padding: 4px 10px; font: 700 13px/1.2 var(--s-police); letter-spacing: .02em; }
.s-menu { display: flex; gap: 28px; flex-wrap: wrap; font: 500 15px/1 var(--s-police); }
.s-menu span { padding: 4px 0; }
.s-menu-ic { display: none; width: 44px; height: 44px; place-items: center; }
.s-menu-ic i { display: block; width: 22px; height: 2px; background: var(--s-encre); box-shadow: 0 -7px 0 var(--s-encre), 0 7px 0 var(--s-encre); }
@container site (width < 1100px) { .s-menu { gap: 18px; font-size: 14px; } .s-entete { gap: 16px; } }
@container site (width < 900px) { .s-menu { display: none; } .s-menu-ic { display: grid; } }
@container site (width < 720px) {
  .s-entete { min-height: 56px; }
  .s-entete .s-boutons { display: none; }
}

/* section du site */
.s { position: relative; padding-block: var(--s-section-y); background: var(--s-fond); }
.s + .s { border-top: 1px solid var(--s-trait); }
.s.f-gris { background: var(--s-fond-2); }
.s.f-noir { background: var(--s-fond-noir); color: #fff; }
.s.f-gris + .s, .s + .s.f-gris, .s.f-noir + .s, .s + .s.f-noir { border-top-color: transparent; }
.s-contenu { max-width: calc(var(--s-max) + 2 * var(--s-marge)); margin-inline: auto; padding-inline: var(--s-marge); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-gouttiere); }
.s-contenu > * { grid-column: 1 / -1; min-width: 0; }
.s-sur, .s-titre { grid-column: 1 / span 9; }
.s-sous { grid-column: 1 / span 8; }
@container site (width < 720px) { .s-contenu { grid-template-columns: repeat(4, minmax(0, 1fr)); } .s-contenu > * { grid-column: 1 / -1 !important; } }
.s-sur { margin: 0 0 16px; font: 700 13px/1.2 var(--s-police); letter-spacing: .12em; text-transform: uppercase; }
.s.accent .s-sur:not(.vide)::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .5em; background: var(--s-accent); vertical-align: -1px; }
.s-titre { margin: 0 0 20px; font: 700 var(--s-h2)/1.08 var(--s-police); letter-spacing: -.02em; max-width: 18em; text-wrap: balance; }
.s-sous { margin: 0 0 var(--s-sous-mb); font: 400 var(--s-lead)/1.45 var(--s-police); color: var(--s-texte-2); max-width: 34em; }
.s.f-noir .s-sous { color: #C7C7C7; }
.s-sur:last-child, .s-titre:last-child, .s-sous:last-child { margin-bottom: 0; }
.s--accroche .s-titre { grid-column: 1 / span 11; font-size: var(--s-display); line-height: .98; letter-spacing: -.035em; max-width: 12em; }
.s--accroche { min-height: min(78cqi, 640px); display: flex; align-items: center; }
.s--accroche .s-contenu { width: 100%; }
.s.accent.s--accroche .s-titre:not(.vide) { text-decoration: underline; text-decoration-color: var(--s-accent); text-decoration-thickness: .11em; text-underline-offset: .14em; text-decoration-skip-ink: none; }
.s--generique { text-align: center; }
.s--generique .s-sur, .s--generique .s-titre, .s--generique .s-sous { grid-column: 1 / -1; margin-inline: auto; }
.s-sur, .s-titre, .s-sous, .b-titre, .b-texte, .s-btn, .s-logo, .s-menu span { white-space: pre-wrap; overflow-wrap: anywhere; }

/* blocs : nombre libre, n par ligne */
.s-blocs { --n: 3; --bloc-min: 13rem; display: grid; gap: var(--s-bloc-gap-y) var(--s-gouttiere);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--bloc-min), (100% - (var(--n) - 1) * var(--s-gouttiere)) / var(--n))), 1fr)); }
.s-blocs.n1 { --n: 1; } .s-blocs.n2 { --n: 2; } .s-blocs.n3 { --n: 3; } .s-blocs.n4 { --n: 4; } .s-blocs.n5 { --n: 5; --bloc-min: 9rem; } .s-blocs.n6 { --n: 6; --bloc-min: 7rem; }
.s-blocs.chiffres { --bloc-min: 10rem; }
.s--generique .s-blocs { grid-template-columns: 1fr; max-width: 34em; margin-inline: auto; width: 100%; }
.b { position: relative; min-width: 0; }
.b-titre { margin: 0 0 8px; font: 700 var(--s-h3)/1.25 var(--s-police); letter-spacing: -.01em; }
.b-texte { margin: 0; font: 400 var(--s-corps)/1.6 var(--s-police); max-width: 38em; }
.s.f-noir .b-texte { color: #E5E5E5; }
.b-chiffre { font: 700 var(--s-chiffre)/1 var(--s-police); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0 0 8px;  overflow-wrap: anywhere; min-width: 0; }
.s.accent .b-chiffre:not(.vide) { color: var(--s-encre); text-decoration: underline; text-decoration-color: var(--s-accent); text-decoration-thickness: .08em; text-underline-offset: .12em; }
.b-liste { list-style: none; margin: 0; padding: 0; font: 400 var(--s-corps)/1.6 var(--s-police); }
.b-liste li + li { margin-top: 4px; }
.s--generique .b-titre { font: 700 13px/1.2 var(--s-police); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
.s--generique .b-texte, .s--generique .b-liste { font-size: var(--s-lead); max-width: none; }
/* classes de type de bloc en bt-… : elles ne doivent pas se confondre avec .b-texte, .b-chiffre, .b-liste (les textes) */
.bt-citation .b-texte { font: 400 var(--s-lead)/1.5 var(--s-police); padding-left: 1em; text-indent: -.45em; }
.bt-citation .b-texte:not(.vide)::before { content: "« "; } .bt-citation .b-texte:not(.vide)::after { content: " »"; }
.bt-citation .b-titre { order: 2; font: 400 var(--s-petit)/1.4 var(--s-police); color: var(--s-texte-2); margin: 12px 0 0 1em; }
.bt-citation { display: flex; flex-direction: column; }

/* emplacements de médias, fil de fer crédible */
.m { position: relative; margin-bottom: 20px; background: var(--s-media); display: grid; place-items: center; overflow: hidden; }
.m-legende { position: absolute; left: 12px; bottom: 10px; font: 700 11px/1.2 var(--s-police); letter-spacing: .08em; text-transform: uppercase; color: var(--s-media-texte); max-width: calc(100% - 24px); }
.m-image { aspect-ratio: 4 / 3; }
.s-blocs.n1 .m-image { aspect-ratio: 16 / 9; }
.m-image svg { width: 40px; height: 40px; fill: var(--s-media-motif); }
.m-video { aspect-ratio: 16 / 9; background: #1A1A1A; }
.m-video .lecture { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; }
.m-video .lecture::after { content: ""; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.m-video .prog { position: absolute; left: 16px; right: 16px; bottom: 16px; height: 2px; background: #5C5C5C; }
.m-video .prog::before { content: ""; display: block; width: 30%; height: 100%; background: #fff; }
.m-video .m-legende { color: #BDBDBD; bottom: 26px; }
.m-son { height: 72px; background: none; border: 1px solid var(--s-trait); display: flex; align-items: center; gap: 16px; padding: 0 16px; place-items: initial; }
.s.f-noir .m-son { border-color: #333; }
.m-son .rond { width: 40px; height: 40px; border-radius: 50%; background: var(--s-encre); flex: none; display: grid; place-items: center; }
.s.f-noir .m-son .rond { background: #fff; }
.m-son .rond::after { content: ""; border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.s.f-noir .m-son .rond::after { border-left-color: #111; }
.m-son .onde { flex: 1; height: 32px; background: repeating-linear-gradient(90deg, var(--s-media-motif) 0 3px, transparent 3px 5px);
  -webkit-mask: linear-gradient(90deg, #000, #000); clip-path: polygon(0 45%, 6% 20%, 12% 60%, 18% 10%, 24% 50%, 30% 25%, 36% 70%, 42% 5%, 48% 55%, 54% 30%, 60% 65%, 66% 15%, 72% 50%, 78% 35%, 84% 70%, 90% 20%, 100% 50%, 100% 100%, 0 100%); }
.m-son .duree { font: 400 13px/1 var(--s-police); color: var(--s-texte-2); font-variant-numeric: tabular-nums; }
.m-logo { aspect-ratio: 3 / 2; background: var(--s-fond-2); }
.m-logo::before { content: ""; width: 54px; height: 14px; background: radial-gradient(circle 7px at 7px 7px, var(--s-media-motif) 98%, transparent), linear-gradient(var(--s-media-motif), var(--s-media-motif)) 18px 3px / 36px 8px no-repeat; }
.m-form { display: grid; gap: 16px; background: none; place-items: stretch; }
.m-form label { display: grid; gap: 6px; font: 600 14px/1.2 var(--s-police); }
.m-form i { display: block; height: 48px; border: 1px solid var(--s-trait-champ); }
.m-form i.grand { height: 120px; }
.m-form .consent { display: flex; gap: 10px; align-items: center; font: 400 13px/1.4 var(--s-police); color: var(--s-texte-2); }
.m-form .consent::before { content: ""; width: 20px; height: 20px; border: 1px solid var(--s-trait-champ); flex: none; }
.s-btn { white-space: nowrap !important; display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; background: transparent; color: inherit; font: 700 16px/1.2 var(--s-police); border: 2px solid currentColor; }
.s-boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s-cta-mt); }
.s-boutons .s-btn:first-child { background: var(--s-accent); border-color: var(--s-accent); color: #111; }
.s-entete .s-boutons { margin: 0; }
.s-entete .s-btn { min-height: 40px; padding: 8px 20px; font-size: 15px; }
.s--generique .s-boutons { justify-content: center; }
.b-rdv .s-btn { margin-top: 16px; }

/* pied de page du site */
.s-pied { position: relative; background: var(--s-fond-noir); color: #fff; padding: 64px var(--s-marge) 32px; }
.s-pied .s-contenu { padding: 0; }
.s-pied .b-titre { font: 700 13px/1.2 var(--s-police); letter-spacing: .12em; text-transform: uppercase; color: #B3B3B3; }
.s-pied .b-texte { font-size: 15px; color: #fff; }
.s-pied .legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid #333; font: 400 13px/1.5 var(--s-police); color: #B3B3B3; }

/* masquée sur le site (visible dans l'outil, grisée) */
.s.masquee > .s-contenu { opacity: .45; }
.marque-masquee { position: absolute; top: 12px; left: 50%; translate: -50% 0; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--t-surface); color: var(--t-texte-2); box-shadow: var(--t-ombre-1); font: 600 12px/1 var(--t-police); }

/* ---------- intrusions de l'outil dans la feuille (disparaissent en Aperçu) ---------- */
.ecrire [data-sel] { cursor: pointer; }
.ecrire .s:hover, .ecrire .s-entete:hover, .ecrire .s-pied:hover { outline: 1px solid var(--t-bleu-voile); outline-offset: -1px; }
.s.sel, .s-entete.sel, .s-pied.sel { outline: 2px solid var(--t-bleu) !important; outline-offset: -2px; z-index: 2; }
.onglet-s { position: absolute; top: 0; left: 0; z-index: 4; display: none; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 0 0 var(--t-r-2) 0; background: var(--t-bleu); color: #fff; font: 600 12px/1 var(--t-police); }
.sel > .onglet-s { display: inline-flex; }
.actions-s { position: absolute; top: 8px; right: 8px; z-index: 5; display: none; gap: 2px; padding: 2px; background: var(--t-surface); border: 1px solid var(--t-trait); border-radius: var(--t-r-3); box-shadow: var(--t-ombre-2); color: var(--t-texte); font-family: var(--t-police); }
.sel > .actions-s { display: flex; }
.marge-g, .marge-d { position: absolute; top: 24px; z-index: 3; }
.marge-g { left: calc(-1 * var(--t-marge-zone) + 8px); }
.marge-d { right: calc(-1 * var(--t-marge-zone) + 6px); }
.cadre-mobile .marge-g { left: -48px; } .cadre-mobile .marge-d { right: -46px; }
.epingle { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--cresto); background: #fff; color: var(--cresto); font: 700 11px/1 var(--t-police); cursor: pointer; display: grid; place-items: center; }
.epingle.nouvelle { background: var(--cresto); color: #fff; }
.compteur-m { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--t-trait-champ); background: #fff; color: var(--t-texte-3); font: 600 11px/1 var(--t-police); cursor: pointer; }
.compteur-m.de-cresto { background: var(--cresto); border-color: var(--cresto); color: #fff; }
.compteur-m.de-cresta { background: var(--cresta); border-color: var(--cresta); color: #fff; }
.compteur-m .ic { width: 13px; height: 13px; }
.b.actif { outline: 1.5px solid var(--t-bleu); outline-offset: 6px; }
.barre-b { position: absolute; top: -36px; right: 0; z-index: 5; display: none; gap: 1px; padding: 2px; background: var(--t-surface); border: 1px solid var(--t-trait); border-radius: var(--t-r-2); box-shadow: var(--t-ombre-2); color: var(--t-texte); font-family: var(--t-police); }
.barre-b .btn-ic { width: 24px; height: 24px; }
.barre-b .ic { width: 14px; height: 14px; }
.sel .b:hover > .barre-b, .sel .b:focus-within > .barre-b, .sel .b.actif > .barre-b { display: flex; }
.accord { display: inline-flex; margin-top: 10px; height: 20px; align-items: center; padding: 0 8px; border-radius: 999px; font: 600 11px/1 var(--t-police); background: var(--e-propose-fond); color: var(--e-propose-texte); }
.accord.a-oui { background: var(--e-valide-fond); color: var(--e-valide-texte); }
.accord.a-demande { background: var(--e-encours-fond); color: var(--e-encours-texte); }
.ajout-b { min-height: 120px; border: 1.5px dashed var(--t-vide-trait); border-radius: var(--t-r-3); background: var(--t-vide-hachure); color: var(--t-texte-2); font: 500 13px/1.3 var(--t-police); display: grid; place-items: center; gap: 4px; cursor: pointer; padding: 12px; }
.ajout-b:hover { color: var(--t-bleu-fonce); border-color: var(--t-bleu); }
.s.f-noir .ajout-b { background: var(--t-vide-hachure-noir); color: #C8CED8; }
.inserer-s { position: relative; height: 0; z-index: 4; }
.inserer-s button { position: absolute; left: 50%; top: -12px; translate: -50% 0; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--t-bleu); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity var(--t-d-2); }
.inserer-s button .ic { width: 14px; height: 14px; stroke-width: 2.5; }
.inserer-s:hover button, .inserer-s button:focus-visible { opacity: 1; }
.inserer-s::before { content: ""; position: absolute; inset: -8px 0; }
.inserer-s:hover::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--t-bleu); }

/* champs modifiables et « à écrire » */
.site [contenteditable] { border-radius: 2px; outline: 1px dashed transparent; outline-offset: 4px; transition: outline-color var(--t-d-1); }
.ecrire .site [contenteditable]:hover { outline-color: var(--t-vide-trait); }
.site [contenteditable]:focus { outline: 2px solid var(--t-bleu); outline-offset: 4px; box-shadow: 0 0 0 6px #fff; }
.vide { background: var(--t-vide-hachure); outline: 1px dashed var(--t-vide-trait) !important; outline-offset: 4px; min-width: 6em; }
.vide::before { content: attr(data-ph); color: var(--t-vide-texte); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; text-decoration: none; pointer-events: none; }
.s-titre.vide::before { font-weight: 700; }
.f-noir .vide, .s-pied .vide { background: var(--t-vide-hachure-noir); }
.f-noir .vide::before, .s-pied .vide::before { color: #B8C0CC; }
.vide:focus::before { opacity: .55; }
.b-chiffre.vide { min-width: 0; } .b-chiffre.vide::before { font-size: .6em; }

/* compteur de mots, toasts, fenêtres, menus surgissants */
#compteur { position: fixed; z-index: 40; left: 50%; bottom: 16px; translate: -50% 0; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--t-surface); border: 1px solid var(--t-trait); box-shadow: var(--t-ombre-1); font: 12px/26px var(--t-police); color: var(--t-texte-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
#compteur .hors { color: var(--e-encours-texte); }
#toast { position: fixed; z-index: 60; left: 50%; bottom: 72px; translate: -50% 0; max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--t-r-3); background: var(--t-encre); color: #fff; box-shadow: var(--t-ombre-3); font: 13px/20px var(--t-police); }
#toast button { background: none; border: 0; color: #A9C1FF; text-decoration: underline; cursor: pointer; font: 600 13px/1 var(--t-police); padding: 0; white-space: nowrap; }
.dlg { border: 0; border-radius: var(--t-r-4); padding: 24px; width: min(560px, calc(100vw - 32px)); background: var(--t-surface); box-shadow: var(--t-ombre-3); color: var(--t-texte); font: 14px/21px var(--t-police); }
.dlg::backdrop { background: rgb(13 17 26 / .48); }
.dlg h2 { margin: 0 32px 8px 0; font: 600 17px/24px var(--t-police); }
.dlg p { margin: 0 0 12px; }
.dlg .fermer { position: absolute; top: 12px; right: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.dlg .champ, .dlg .zone-texte { margin-bottom: 12px; }
.dlg textarea[readonly] { width: 100%; min-height: 160px; }
.pop { position: fixed; z-index: 50; min-width: 220px; max-width: 360px; max-height: 60vh; overflow: auto; padding: 4px; background: var(--t-surface); border: 1px solid var(--t-trait); border-radius: var(--t-r-3); box-shadow: var(--t-ombre-2); }
.pop button, .pop a { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: var(--t-r-2); background: none; text-align: left; cursor: pointer; color: var(--t-texte); font: 13px/18px var(--t-police); text-decoration: none; }
.pop button:hover, .pop a:hover, .pop button:focus-visible { background: var(--t-surface-2); }
.pop .vide-pop { padding: 12px; color: var(--t-texte-2); }
.pop hr { border: 0; border-top: 1px solid var(--t-trait); margin: 4px 0; }
.pop .msg-pop { display: grid; grid-template-columns: 20px 1fr auto; gap: 2px 8px; align-items: start; }
.pop .msg-pop small { grid-column: 2 / -1; color: var(--t-texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exports { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.exports li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--t-surface-2); border-radius: var(--t-r-3); padding: 10px 12px; }
.exports small { color: var(--t-texte-2); }
.chip { display: inline-block; margin-top: 4px; font: 600 12px/18px var(--t-police); border-radius: 999px; padding: 0 8px; }
.chip.ok { background: var(--e-valide-fond); color: var(--e-valide-texte); }
.chip.non { background: #fff; border: 1px solid var(--t-trait-champ); }
.chip.maj { background: var(--e-encours-fond); color: var(--e-encours-texte); }
.notice ol { padding-left: 20px; margin: 0; display: grid; gap: 8px; }

/* ---------- Aperçu : la page comme un visiteur ---------- */
.apercu .zone { padding: 0; background: #fff; }
.apercu .cadre-bureau { max-width: none; border-radius: 0; box-shadow: none; }
.apercu .cadre-bureau::before { display: none; }
.apercu .cadre-bureau .s-pied { border-radius: 0; }
.apercu .cadre-mobile { margin: 32px auto; }
.apercu .zone:has(.cadre-mobile) { background: var(--t-fond); }
.apercu .s.masquee, .apercu .onglet-s, .apercu .actions-s, .apercu .marge-g, .apercu .marge-d, .apercu .inserer-s, .apercu .marque-masquee { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .apercu .s--generique .defile { height: min(80cqi, 560px); overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
  .apercu .s--generique .defile > .s-blocs { animation: generique 34s linear infinite; padding-top: min(80cqi, 560px); }
  .apercu .s--generique .defile:hover > .s-blocs { animation-play-state: paused; }
}
@keyframes generique { to { transform: translateY(-100%); } }

/* ---------- écrans plus étroits : panneaux en tiroirs ---------- */
.voile { display: none; }
@media (max-width: 1279px) {
  .app { grid-template-columns: var(--t-menu-l) minmax(0, 1fr) 0; }
  .insp { position: fixed; z-index: 30; top: var(--t-barre-h); right: 0; bottom: 0; width: min(var(--t-insp-l), 100vw); box-shadow: var(--t-ombre-3); transform: translateX(105%); transition: transform var(--t-d-3) var(--t-courbe); }
  .app.insp-ouvert .insp { transform: none; }
  .seul-etroit.btn-insp { display: inline-flex; }
}
@media (max-width: 899px) {
  .app { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .plan { position: fixed; z-index: 31; top: var(--t-barre-h); left: 0; bottom: 0; width: min(300px, 88vw); box-shadow: var(--t-ombre-3); transform: translateX(-105%); transition: transform var(--t-d-3) var(--t-courbe); }
  .app.plan-ouvert .plan { transform: none; }
  .app.plan-ouvert .voile, .app.insp-ouvert .voile { display: block; position: fixed; inset: var(--t-barre-h) 0 0 0; z-index: 29; background: rgb(13 17 26 / .32); }
  .seul-etroit.btn-plan { display: inline-flex; }
  .barre-g .fil-ariane, .barre-g .sep { display: none; }
}
@media (max-width: 599px) {
  .zone { padding: 0 0 96px; background: #fff; }
  .cadre-bureau, .cadre-mobile { max-width: none; width: auto; border-radius: 0; box-shadow: none; padding-top: 0; }
  .cadre-bureau::before, .cadre-mobile::before { display: none; }
  .marge-g, .marge-d { display: none; }
  .esp { padding: 16px; }
  .zone:has(.esp) { background: var(--t-fond); }
  .insp { top: auto; left: 0; width: 100%; height: 78dvh; border-radius: var(--t-r-4) var(--t-r-4) 0 0; transform: translateY(105%); }
  .app.insp-ouvert .insp { transform: none; }
  .barre-c .seg-cadre, .barre-d .sauve-texte, .barre .marque, .barre .lib, .barre .btn-aide { display: none; }
  .barre { gap: 4px; padding: 0 6px; }
  .barre-c { margin: 0 0 0 auto; flex: none; }
  .barre .segment { flex-wrap: nowrap; }
  .barre-c .segment button { padding: 0 8px; }
  .barre-g { flex: 1 1 auto; }
}
@media (pointer: coarse) {
  .btn, .btn-p, .btn-d, .btn-danger, .el, .option, .segment button { min-height: 44px; }
  .btn-ic { width: 44px; height: 44px; }
  .msg-actions { opacity: 1; }
  .inserer-s button { opacity: 1; }
}

/* utilitaires (pas d'attribut style en ligne : la CSP les interdit) */
.u-mt10 { margin-top: 10px; } .u-mt12 { margin-top: 12px; } .u-mt16 { margin-top: 16px; }
.u-mb8 { margin-bottom: 8px; } .u-mb10 { margin-bottom: 10px; } .u-mb12 { margin-bottom: 12px; }
.u-mla { margin-left: auto; } .u-f1 { flex: 1; min-width: 0; } .u-w160 { width: 160px; flex: none; } .u-w16 { width: 16px; display: inline-block; }
.u-op1 { opacity: 1 !important; } .u-entre { justify-content: space-between; } .u-gris { color: var(--t-texte-3); }
.liste-el { margin-top: 8px !important; }

/* ---------- impression : la feuille seule ---------- */
@media print {
  .barre, .plan, .insp, .onglet-s, .actions-s, .marge-g, .marge-d, .inserer-s, .ajout-b, .barre-b, #toast, #compteur, .marque-masquee { display: none !important; }
  .app { display: block; height: auto; }
  .corps-app { overflow: visible; }
  .zone { overflow: visible; padding: 0; }
  .cadre { box-shadow: none; }
  .cadre-bureau::before { display: none; }
  .vide { display: none; }
  .s { break-inside: avoid; }
}

/* champs vides présents en Écrire mais visibles seulement dans la section sélectionnée (pas de saut de page) */
.ecrire .s:not(.sel) .vide, .ecrire .s-entete:not(.sel) .vide, .ecrire .s-pied:not(.sel) .vide,
.ecrire .s:not(.sel) .ajout-b, .ecrire .s-pied:not(.sel) .ajout-b, .ecrire .s:not(.sel) .b-vide, .ecrire .s-pied:not(.sel) .b-vide { display: none; }
.ecrire .s:not(.sel) .s-boutons:not(:has(.s-btn:not(.vide))) { display: none; }
/* Aperçu : aucune trace de l'outil */
.apercu .sel, .apercu .actif { outline: 0 !important; box-shadow: none !important; }
/* panneau de droite inutile sur certains écrans */
.app.sans-insp { grid-template-columns: var(--t-menu-l) minmax(0, 1fr) 0; }
.app.sans-insp .insp { display: none; }
.btn-fermer-insp { margin-right: 4px; }
/* iPad paysage : le plan devient le tiroir, le panneau de droite reste */
@media (min-width: 900px) and (max-width: 1279px) {
  .app { grid-template-columns: 0 minmax(0, 1fr) 320px; --t-insp-l: 320px; }
  .app.sans-insp { grid-template-columns: 0 minmax(0, 1fr) 0; }
  .insp { position: static; transform: none; box-shadow: none; width: auto; }
  .plan { position: fixed; z-index: 31; top: var(--t-barre-h); left: 0; bottom: 0; width: min(300px, 88vw); box-shadow: var(--t-ombre-3); transform: translateX(-105%); transition: transform var(--t-d-3) var(--t-courbe); }
  .app.plan-ouvert .plan { transform: none; }
  .app.plan-ouvert .voile { display: block; position: fixed; inset: var(--t-barre-h) 0 0 0; z-index: 29; background: rgb(13 17 26 / .32); }
  .seul-etroit.btn-plan { display: inline-flex; }
  .seul-etroit.btn-insp, .seul-etroit.btn-fermer-insp { display: none; }
}
@media (max-width: 899px) { .seul-etroit.btn-fermer-insp { display: inline-flex; } }

/* formulaire de contact, écrit en blocs : une question par bloc */
.s-blocs:has(> .bt-champ) { max-width: 720px; }
.f-libelle { font: 600 16px/1.3 var(--s-police) !important; margin-bottom: 8px; }
.f-saisie { height: 48px; border: 1px solid var(--s-trait-champ); }
.bt-champ:has(.f-libelle.s-titre) .f-saisie { height: 120px; }
.f-options { display: flex; flex-wrap: wrap; gap: 8px; }
.f-options span { border: 1px solid var(--s-trait-champ); padding: 10px 16px; font: 400 15px/1.2 var(--s-police); }
.f-choix { font-size: 15px !important; color: var(--s-texte-2); }
.f-message { border: 1px dashed var(--s-trait-champ); padding: 20px; }
.f-legende { display: block; margin-bottom: 8px; font: 700 11px/1.2 var(--s-police); letter-spacing: .08em; text-transform: uppercase; color: var(--s-media-texte); }
.f-mention { font-size: var(--s-petit) !important; color: var(--s-texte-2); }

/* glisser-déposer des sections dans le plan */
li[data-glisse] { cursor: grab; }
li[data-glisse].glisse { opacity: .4; }
li[data-glisse].glisse-av { box-shadow: 0 -2px 0 0 var(--t-bleu); }
li[data-glisse].glisse-ap { box-shadow: 0 2px 0 0 var(--t-bleu); }
li[data-glisse] { position: relative; }
li[data-glisse]::before { content: '⋮⋮'; position: absolute; left: -6px; top: 50%; transform: translateY(-50%); letter-spacing: -2px; font-size: 15px; line-height: 1; color: var(--t-texte-3); opacity: .55; pointer-events: none; }
li[data-glisse]:hover::before { opacity: 1; color: var(--t-bleu); }

/* mode d'emploi par rubriques */
.dlg-aide { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
.aide-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--t-trait-champ); }
.aide-onglet { border: 0; border-radius: var(--t-r-2); padding: 5px 10px; background: none; color: var(--t-texte-2); font: 500 13px/18px var(--t-police); cursor: pointer; }
.aide-onglet:hover { background: var(--t-surface-2); }
.aide-onglet[aria-selected="true"] { background: var(--t-bleu-pale); color: var(--t-bleu-fonce); font-weight: 600; }
.aide-panneau h3 { margin: 0 0 8px; font: 600 15px/22px var(--t-police); }
.aide-panneau dl { margin: 0; display: grid; gap: 12px; }
.aide-panneau dt { font-weight: 600; }
.aide-panneau dd { margin: 2px 0 0; color: var(--t-texte-2); }

/* ---------- « Lance-moi l'histoire » (en-tête du site, onglet Histoire, barre de lecture) ---------- */
.s-histoire { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-left: auto; padding: 0 4px; border: 0; background: none; color: inherit; font: 600 15px/1.2 var(--s-police); white-space: nowrap; cursor: pointer; }
.s-histoire .ic { width: 32px; height: 32px; padding: 9px; border-radius: 999px; background: var(--s-accent); color: #111; fill: currentColor; }
.s-histoire:hover span, .s-histoire:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }
.s-entete .s-histoire + .s-boutons { margin-left: 0; }
@container site (width < 720px) { .s-histoire span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .s-histoire .ic { width: 40px; height: 40px; padding: 12px; } }
.histoire-etapes { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
.histoire-barre { position: fixed; z-index: 40; left: 50%; bottom: 20px; translate: -50% 0; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 8px 8px 16px; background: var(--t-encre); color: #fff; border-radius: 999px; box-shadow: var(--t-ombre-3); font-size: 13px; }
.histoire-barre .btn, .histoire-barre .btn-ic { background: rgb(255 255 255 / .12); color: #fff; border-color: transparent; }
.histoire-barre .btn-p { background: #fff; color: var(--t-encre); }
.histoire-barre .ic { fill: none; }
.histoire-barre [data-act="histoire-pause"] .ic, .histoire-barre [data-act="histoire-lancer"] .ic { fill: currentColor; }
.histoire-barre kbd { background: transparent; color: #fff; border-color: rgb(255 255 255 / .5); }
.hb-txt { white-space: nowrap; margin-right: 4px; }
@media (width < 520px) { .hb-txt, .histoire-barre kbd { display: none; } }
.esp .carte + .carte { margin-top: 16px; }
.histoire-reglages.on { border-color: var(--t-bleu); box-shadow: inset 3px 0 0 var(--t-bleu); }
.carte h2 .ic[href], .histoire-reglages h2 .ic, .carte h2 .ic { flex: none; }
.histoire-champs { gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.compte.on { color: var(--t-bleu-fonce); font-weight: 600; }
.deroule { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: none; }
.deroule li { border-left: 2px solid var(--t-trait); margin-left: 11px; }
.deroule li .el, .deroule li.bout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; }
.deroule li.bout { color: var(--t-texte-2); font-size: 13px; }
.deroule .num { min-width: 20px; color: var(--t-texte-2); font-variant-numeric: tabular-nums; }
.deroule li.saute .nom { text-decoration: line-through; color: var(--t-texte-2); }
.deroule li.arret { border-left-color: var(--t-bleu); }
.deroule li.arret .compte { color: var(--t-bleu-fonce); }
.alerte-histoire { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--t-r-3); background: #FFF4E5; color: #7A4100; font-size: 13px; }
.alerte-histoire span { flex: 1; }
/* scénario de l'histoire : pistes, déroulé, cartons plein écran, barre façon film */
.pastille-h { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--t-surface-2); color: var(--t-texte-2); font: 600 12px/18px var(--t-police); }
.pastille-h.ok { background: #E7F6EC; color: #1C6B37; }
.pistes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.piste { padding: 12px; border: 1px solid var(--t-trait); border-radius: var(--t-r-3); }
.piste.on { border-color: var(--t-bleu); background: var(--t-bleu-pale); }
.piste .aide { margin: 6px 0 8px; }
.piste .champ { width: 100%; margin-top: 4px; background: #fff; }
.piste-l { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--t-encre); color: #fff; font: 700 12px/1 var(--t-police); }
/* barre du scénario : reste en haut pendant qu'on fait défiler les pistes et le déroulé */
.histoire-actions { position: sticky; top: -32px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 -12px 16px; padding: 12px; background: var(--t-fond); border-bottom: 1px solid var(--t-trait); }
.histoire-actions .pastille-h { margin-right: 4px; }
.deroule li.pl { padding: 4px 0 4px 10px; }
.pl-tete { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.pl-nom { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; font: inherit; color: var(--t-texte); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.pl-nom:hover { text-decoration: underline; }
.pl-actions { display: inline-flex; gap: 2px; opacity: .55; }
.pl:hover .pl-actions, .pl:focus-within .pl-actions { opacity: 1; }
.pl-champs { display: grid; gap: 6px; margin: 4px 0 6px 30px; }
.pl.scene { border-left-color: var(--cresta, #C2185B); background: linear-gradient(90deg, rgb(194 24 91 / .06), transparent 60%); }
.pl.scene .pl-nom { font-weight: 600; }
.pl.saute .pl-nom { text-decoration: line-through; color: var(--t-texte-2); }
.pl-post { margin: 2px 0 6px 30px; font-size: 13px; color: var(--t-bleu-fonce); }
.pl-case { width: 18px; height: 18px; }
.histoire-carton { position: fixed; inset: 0; z-index: 35; display: grid; place-content: center; gap: 14px; padding: 32px; text-align: center; background: #111; color: #fff; animation: carton-in .5s ease-out; }
.histoire-carton.ouverture { background: #000; }
.histoire-carton.postgen { background: var(--s-accent, #FF6B35); color: #111; }
.histoire-carton.scene { background: #1D1D1F; }
.hc-sous { margin: 0; font: 600 13px/1 var(--s-police, var(--t-police)); letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.hc-titre { margin: 0; max-width: 18ch; font: 800 clamp(32px, 6vw, 72px)/1.05 var(--s-police, var(--t-police)); }
.hc-texte { margin: 0 auto; max-width: 46ch; font: 400 18px/1.5 var(--s-police, var(--t-police)); opacity: .9; white-space: pre-wrap; }
.hc-media { display: inline-flex; align-items: center; gap: 10px; margin: 8px auto 0; padding: 14px 18px; border: 1px dashed rgb(255 255 255 / .5); border-radius: 8px; font-size: 14px; opacity: .85; }
@keyframes carton-in { from { opacity: 0; } }

/* Téléphone : lecture seule, quatre vues (classique, expérience, formulaire, menu) */
.app.mobile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "barre" "zone"; grid-template-rows: var(--t-barre-h) minmax(0, 1fr); }
.app.mobile .plan, .app.mobile .insp, .app.mobile .voile { display: none; }
.app.mobile .zone { padding: 0 0 96px; background: #fff; }
.app.mobile .barre { padding: 0 8px; }
.mob-seg { flex: 1; flex-wrap: nowrap; }
.mob-seg button { flex: 1; justify-content: center; padding: 0 4px; }
.mob-pages { padding: 8px 12px; background: var(--t-fond); border-bottom: 1px solid var(--t-trait); }
.mob-pages select { width: 100%; min-height: 44px; font-size: 16px; }   /* 16 px : sous ce corps, Safari iOS zoome la page au toucher */
.mob-menu { min-height: 70dvh; padding: 0 var(--s-marge, 20px) 32px; background: var(--s-fond, #fff); }
.mob-menu-tete { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.mob-x { width: 44px; height: 44px; display: grid; place-items: center; }
.mob-menu ul { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; gap: 4px; }
.mob-menu li { font: 700 28px/1.2 var(--s-police); padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .12); }
.mob-menu li.aide { font: 400 15px/1.4 var(--s-police); border: 0; }
.mob-menu .s-boutons { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 16px; }
/* pistes ajoutées : cartes dans la même grille, carte « Ajouter une piste » */
.piste { display: flex; flex-direction: column; }
.piste-actions { display: flex; gap: 2px; margin-top: auto; padding-top: 8px; opacity: .5; }
.piste:hover .piste-actions, .piste:focus-within .piste-actions { opacity: 1; }
.piste-l.perso { background: var(--cresta); }
.piste-l.perso .ic { width: 13px; height: 13px; }
.piste.perso .piste-titre { margin: 10px 0 6px; font-weight: 600; background: #fff; }
.piste.perso .zone-texte { background: #fff; }
.piste.perso.on { border-color: var(--cresta); background: var(--cresta-pale); }
.piste-ajout { padding: 0; border-style: dashed; }
.piste-ajout button { flex: 1; display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 150px; padding: 16px; border: 0; border-radius: inherit; background: none; color: var(--t-texte-2); font: inherit; text-align: center; cursor: pointer; }
.piste-ajout button:hover { background: var(--t-surface-2); color: var(--t-texte); }
.piste-ajout button span { font-size: 13px; max-width: 30ch; }
/* Aperçu de l'histoire : barre compacte sur une ligne, fondus, outil masqué pendant la lecture */
.histoire-barre { min-height: 48px; padding: 6px 6px 6px 16px; background: rgb(17 20 28 / .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.histoire-barre .btn-ic { width: 36px; height: 36px; border-radius: 999px; }
.histoire-barre.avec-film { width: min(640px, calc(100vw - 32px)); }
.hb-chap { flex: 0 1 180px; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-piste { position: relative; flex: 1; min-width: 80px; height: 4px; margin: 0 6px; border-radius: 2px; background: rgb(255 255 255 / .2); }
.hb-piste b { position: absolute; top: -3px; width: 2px; height: 10px; background: rgb(255 255 255 / .45); }
.hb-piste b:first-child { display: none; }
.hb-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: var(--s-accent, #FF6B35); transition: width .25s linear; }
.hb-son { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: rgb(255 255 255 / .12); cursor: help; }
.histoire-carton.fondu { background: #000; }
.histoire-carton.sort { animation: carton-out .35s ease-in forwards; }
@keyframes carton-out { to { opacity: 0; } }
.histoire-en-cours .barre { visibility: hidden; }
/* Téléphone, test du 26/11 : cibles au doigt, aperçu cliquable, histoire plein écran, mention vide signalée */
@media (pointer: coarse) { .histoire-barre .btn-ic, .hb-son { flex: none; width: 44px; height: 44px; } }
.app.mobile.histoire-en-cours { grid-template-rows: 0 minmax(0, 1fr); }   /* la barre cachée ne garde pas sa place */
.histoire-carton > * { animation: carton-in .4s .3s ease-out both; }   /* le texte arrive sur le noir, pas sur la page claire */
button.s-btn, button.s-menu-ic, button.mob-x { cursor: pointer; }
button.s-menu-ic, button.mob-x { padding: 0; border: 0; background: none; color: inherit; }
.mob-menu li:has(> button) { padding: 0; }
.mob-menu li button { width: 100%; padding: 12px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.f-attente { padding: 10px 12px; border: 1px dashed var(--s-trait-champ); color: var(--s-media-texte); }

/* Popup « hooooola Cresta !!! » (retour arrière avec des modifications non enregistrées) */
.dlg-partir .hola { margin: 0 32px 4px 0; font: 900 italic 26px/30px var(--t-police); color: var(--cresta); letter-spacing: .01em; transform: rotate(-2deg); transform-origin: left; }

/* « Merci la vie !!! » : case de BD déchirée avec Julien, à chaque validation */
.mlv { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgb(13 17 26 / .35); cursor: pointer; animation: mlv-fond 3.4s ease both; }
.mlv-case { position: relative; width: min(300px, 70vw); animation: mlv-entree .55s cubic-bezier(.2, 1.6, .4, 1) both, mlv-gigote .5s steps(2) .55s 5;   /* saccades d'animation image par image, fait main */ }
.mlv-img { display: block; transform: rotate(-2deg); filter: drop-shadow(6px 8px 0 rgb(0 0 0 / .35)); }
.mlv-img img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.mlv-bulle { position: absolute; left: 50%; top: -22%; margin: 0; padding: 12px 18px; white-space: nowrap; background: #fff; color: #111; border: 4px solid #111; border-radius: 50%;
  font: 900 italic 24px/1.1 "Comic Sans MS", "Chalkboard SE", var(--t-police); text-transform: uppercase; transform: translateX(-30%) rotate(-6deg); box-shadow: 4px 4px 0 #111;
  animation: mlv-bulle .4s cubic-bezier(.2, 1.8, .4, 1) .35s both; }
.mlv-bulle::after { content: ""; position: absolute; left: 22%; bottom: -22px; border: 12px solid transparent; border-top: 18px solid #111; border-left-width: 4px; }
.mlv-pow { position: absolute; right: -14%; bottom: 8%; padding: 10px 12px; background: #FFE600; color: #D8152F; border: 3px solid #111; font: 900 22px/1 var(--t-police); transform: rotate(12deg);
  clip-path: polygon(50% 0, 61% 30%, 98% 18%, 72% 46%, 100% 70%, 64% 66%, 56% 100%, 44% 70%, 8% 88%, 30% 56%, 0 30%, 38% 34%); padding: 26px 22px; animation: mlv-pow .3s ease-out .6s both; }
@keyframes mlv-fond { 0%, 100% { opacity: 0; } 8%, 88% { opacity: 1; } }
@keyframes mlv-entree { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: scale(1) rotate(-3deg); opacity: 1; } }
@keyframes mlv-gigote { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.03); } }
@keyframes mlv-bulle { from { transform: translateX(-30%) rotate(-6deg) scale(0); } to { transform: translateX(-30%) rotate(-6deg) scale(1); } }
@keyframes mlv-pow { from { transform: rotate(12deg) scale(0); } to { transform: rotate(12deg) scale(1); } }

/* Barre « Enregistrer / Annuler » : fixée en haut, visible tant qu'une modification n'est pas enregistrée */
#barre-enr { position: fixed; top: calc(var(--t-barre-h, 56px) + 8px); left: 50%; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 32px); padding: 8px 8px 8px 14px; background: var(--e-encours-fond); color: var(--e-encours-texte); border: 2px solid var(--e-encours); border-radius: var(--t-r-4); box-shadow: var(--t-ombre-3); font: 14px/20px var(--t-police); }
#barre-enr[hidden] { display: none; }
#barre-enr .be-txt { display: flex; align-items: center; gap: 8px; margin-right: 4px; }
#barre-enr.envoi .btn-p { opacity: .7; }
#barre-enr.secoue { animation: be-secoue .5s ease; }
@keyframes be-secoue { 0%, 100% { transform: translateX(-50%); } 20%, 60% { transform: translateX(calc(-50% - 8px)); } 40%, 80% { transform: translateX(calc(-50% + 8px)); } }

/* ---------- « Go envoyer à Julien » (Cresta), récap d'un envoi, liens des blocs ---------- */
.btn-go { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 2px solid #111; border-radius: 999px; background: #c6ff00; color: #111; font: inherit; font-weight: 800; letter-spacing: .01em; cursor: pointer; box-shadow: 0 0 0 3px rgba(198,255,0,.35), 0 2px 10px rgba(120,200,0,.45); white-space: nowrap; }
.btn-go:hover { background: #d8ff4d; }
.btn-go:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.btn-go:disabled { opacity: .6; cursor: wait; }
.btn-go svg { width: 16px; height: 16px; }
@media (max-width: 1100px) { .barre-d .btn-go { padding: 6px 10px; font-size: 13px; } }
.b-url { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: 8px; padding: 3px 9px; border-radius: 999px; background: var(--t-surface-2); color: var(--t-texte-2); font-size: 12px; text-decoration: none; overflow: hidden; }
.b-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-url svg { width: 13px; height: 13px; flex: none; }
.recap-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.u-inline { display: inline; margin: 0; }
.recap-mot { margin: 6px 0 10px; padding: 10px 14px; border-left: 3px solid #c6ff00; background: var(--t-surface-2); white-space: pre-wrap; }
.consigne { white-space: pre-wrap; font-size: 12px; padding: 12px; border-radius: 8px; background: var(--t-surface-2); max-height: 260px; overflow: auto; }
.recap-md { line-height: 1.55; overflow-wrap: anywhere; }
.recap-md h2 { margin: 24px 0 8px; font-size: 20px; }
.recap-md h3 { margin: 20px 0 6px; font-size: 17px; }
.recap-md h4 { margin: 16px 0 4px; font-size: 15px; }
.recap-md p { margin: 0 0 8px; }
.recap-md ul { margin: 0 0 10px; padding-left: 20px; }
.recap-md li.sous { margin-left: 18px; }
.recap-md hr { border: 0; border-top: 1px solid var(--t-trait); margin: 18px 0; }
.liste-plate li.act { flex-wrap: wrap; }
.liste-plate li.act small { flex-basis: 100%; color: var(--t-texte-2); white-space: pre-line; }
