/* Couleurs du logo de l'Agglomération (« Maubeuge Creative Cities » : main en dégradé jaune, orange,
   rouge, magenta, prune ; texte prune), relevées sur le logo du règlement de consultation le
   26/11/2026. Titres très gras (Poppins, hébergée ici), pictos ronds. Samara : portrait illustré
   (trois images : sourire, parole, clignement), généré pour le prototype.
   Repères de conception (benchmark du 26/11/2026) : réponses sans bulle et texte qui apparaît mot à
   mot (AI SDK, Streamdown), « Samara réfléchit » en reflet (AI Elements), fiche de lieu à la Komoot,
   carnet de tampons et défis à la Smartify, animations courtes (< 300 ms), en ease-out, sur
   transform et opacity seulement (Emil Kowalski, Rauno Freiberg), ressorts en linear().
   Réglages : sombre, contraste, daltonisme, lecture facilitée, animations réduites, trois tailles de
   texte. Mise en page : téléphone (dès 320 px), paysage, tablette, ordinateur. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("/polices/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("/polices/poppins-700.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 800; font-display: swap; src: url("/polices/poppins-800.woff2") format("woff2"); }

/* ---------- couleurs et mouvements ---------- */
:root {
  --accent: #6e2c6b;          /* prune du logo : fonds forts (en-tête, bulles du visiteur) */
  --accent-fonce: #4f1d4e;
  --accent-clair: #a63259;    /* magenta du logo */
  --accent-texte: #6e2c6b;    /* texte ou bord accentué sur une surface */
  --vif: #ffdc00;             /* jaune du logo */
  --vif-fonce: #f4a700;       /* orange du logo */
  --degrade: linear-gradient(120deg, #ffdc00 0%, #f4a700 22%, #e95f49 45%, #d63538 60%, #a63259 80%, #6e2c6b 100%);
  --sur-accent: #ffffff;
  --sur-vif: #2a1530;
  --fond: #fbf7f5;
  --surface: #ffffff;
  --doux: #f6edf4;            /* fonds légers */
  --encre: #2a1530;
  --encre-douce: #66546c;
  --bord: #eadbe6;
  --surligne: rgba(255, 220, 0, .5);
  --en-ligne: #16a34a;
  --ombre: 0 1px 2px rgba(42, 21, 48, .06), 0 8px 24px rgba(42, 21, 48, .08);
  --ombre-forte: 0 2px 6px rgba(42, 21, 48, .08), 0 18px 40px rgba(110, 44, 107, .2);
  --taille: 1rem;
  --interligne: 1.55;
  --espacement: normal;
  --mots: normal;
  --titres: "Poppins", "Segoe UI", system-ui, sans-serif;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rayon: 22px;
  --gouttiere: max(16px, env(safe-area-inset-left));
  /* mouvements : sortie douce, ressort léger, rebond du tampon */
  --sortie: cubic-bezier(.23, 1, .32, 1);
  --tiroir: cubic-bezier(.32, .72, 0, 1);
  --rebond: cubic-bezier(.5, 1.25, .75, 1.25);
  --ressort: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}
@supports (animation-timing-function: linear(0, 1)) {
  :root { --ressort: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1); }
}
:root[data-sombre] {
  --accent: #7a3277; --accent-fonce: #5a215a; --accent-clair: #b23c66; --accent-texte: #f0b6e6;
  --fond: #160c19; --surface: #22142a; --doux: #301d38; --encre: #fbf1f8; --encre-douce: #cdb8cf;
  --bord: #45304d; --surligne: rgba(255, 220, 0, .25);
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35); --ombre-forte: 0 18px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
:root[data-daltonien] {
  --accent: #0057b0; --accent-fonce: #003f80; --accent-clair: #2f7fd6; --accent-texte: #0057b0;
  --vif: #ffb000; --vif-fonce: #e08e00; --doux: #e3eefb; --bord: #c9d8ee; --en-ligne: #0057b0; --surligne: rgba(255, 176, 0, .4);
}
:root[data-daltonien][data-sombre] { --accent-texte: #8cc4ff; --doux: #1d2a44; --bord: #34496e; }
:root[data-contraste] {
  --accent: #4a1248; --accent-fonce: #300a2f; --accent-clair: #4a1248; --accent-texte: #4a1248; --vif: #ffe733;
  --fond: #ffffff; --surface: #ffffff; --doux: #ffffff; --encre: #000000; --encre-douce: #1c1c1c; --bord: #000000;
}
:root[data-contraste][data-sombre] { --accent-texte: #ffffff; --fond: #000000; --surface: #000000; --doux: #000000; --encre: #ffffff; --encre-douce: #f0f0f0; --bord: #ffffff; }
:root[data-contraste][data-daltonien] { --accent: #003a75; --accent-texte: #003a75; --vif: #ffc233; }
:root[data-taille="2"] { --taille: 1.15rem; }
:root[data-taille="3"] { --taille: 1.32rem; }
:root[data-lecture] { --interligne: 1.85; --espacement: .05em; --mots: .14em; --texte: Verdana, Tahoma, "Segoe UI", sans-serif; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--texte); font-size: var(--taille); line-height: var(--interligne);
  letter-spacing: var(--espacement); word-spacing: var(--mots);
  color: var(--encre); background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
button, textarea, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
h1, h2 { font-family: var(--titres); line-height: 1.15; margin: 0; }
:root[data-lecture] h1, :root[data-lecture] h2 { font-family: var(--texte); line-height: 1.35; }
:focus-visible { outline: 3px solid var(--vif-fonce); outline-offset: 2px; }
:root[data-contraste] :focus-visible { outline: 3px solid var(--encre); }
.visuellement-cache, .evitement:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement:focus { position: fixed; top: 8px; left: 8px; z-index: 30; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.bandeau-mode { font-size: .72em; text-align: center; background: var(--vif); color: var(--sur-vif); padding: 3px; margin: 0; font-weight: 600; }

/* ---------- Samara : couleurs du réglage, respiration, clignement, parole ---------- */
.s-corps { fill: var(--accent); }
.s-bande { fill: var(--vif); }
.s-vague { stroke: var(--vif-fonce); stroke-dasharray: 10 4; }
.s-goutte, .s-yeux, .s-bouche, .s-pupille { transform-box: fill-box; transform-origin: center; }
.s-goutte { transform-origin: 50% 100%; }
.s-bouche { opacity: var(--parle, 0); transform: scaleY(.35); }
.s-sourire { opacity: calc(1 - var(--parle, 0)); }
.parle { --parle: 1; --parole: running; }

/* ---------- en-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 10; color: var(--sur-accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-fonce) 100%);
  padding: 6px var(--gouttiere) 8px; padding-top: max(6px, env(safe-area-inset-top));
  box-shadow: 0 6px 20px rgba(110, 44, 107, .2);
}
.entete-ligne { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 1240px; margin: 0 auto; }
.marque { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-family: var(--titres); font-weight: 700; font-size: 1.02em; white-space: nowrap; letter-spacing: -.01em; }
.marque svg { color: var(--vif); flex: none; }
.marque b { color: var(--vif); font-weight: 800; }
.outils { display: flex; align-items: center; gap: 6px; }
.pepites { margin: 0; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-family: var(--titres); font-weight: 700; font-size: .82em; color: var(--vif); font-variant-numeric: tabular-nums; }
.pepites:empty { display: none; }
.pepites.gagne { animation: bondir .5s var(--rebond); }
.langues { display: flex; gap: 2px; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 3px; }
.langues button {
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent;
  display: grid; place-items: center; transition: background-color .2s var(--sortie), transform .15s var(--sortie);
}
.langues button svg { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55); opacity: .72; filter: saturate(.75); transition: opacity .2s, filter .2s, transform .25s var(--ressort); }
.langues button:hover svg { opacity: 1; filter: none; }
.langues button:active { transform: scale(.92); }
.langues button[aria-pressed="true"] { background: var(--vif); }
.langues button[aria-pressed="true"] svg { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--sur-vif); transform: scale(1.04); }
.bouton-menu { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: var(--sur-accent); display: grid; place-items: center; transition: background-color .2s; }
.bouton-menu:hover, .bouton-menu[aria-expanded="true"] { background: rgba(255, 255, 255, .26); }
.menu {
  position: absolute; right: var(--gouttiere); top: calc(100% + 6px); background: var(--surface); color: var(--encre);
  border: 1px solid var(--bord); border-radius: 18px; box-shadow: var(--ombre-forte); padding: 6px; width: min(300px, calc(100vw - 32px)); display: grid;
  transform-origin: top right; animation: deplier .22s var(--sortie);
}
.menu[hidden] { display: none; }
.menu button { display: flex; align-items: center; gap: 10px; min-height: 48px; text-align: left; padding: 8px 12px; border: 0; border-radius: 12px; background: none; font-weight: 600; }
.menu button svg { color: var(--accent-texte); flex: none; }
.menu button:hover { background: var(--doux); }


/* ---------- page ---------- */
.page { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 0 var(--gouttiere); display: flex; flex-direction: column; }
.chat { flex: 1; display: flex; flex-direction: column; }
body[data-conversation="oui"] .accueil { display: none; }

/* ---------- accueil ---------- */
.accueil { text-align: center; padding: 18px 0 8px; }
.accueil > * { animation: monter .5s var(--sortie) both; }
.accueil > :nth-child(2) { animation-delay: .06s; }
.accueil > :nth-child(3) { animation-delay: .1s; }
.accueil > :nth-child(4) { animation-delay: .14s; }
.accueil > :nth-child(5) { animation-delay: .2s; }
.accueil > :nth-child(6) { animation-delay: .26s; }
.accueil > :nth-child(7) { animation-delay: .3s; }
.guide {
  width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, var(--surface) 0%, var(--doux) 70%);
  box-shadow: 0 0 0 5px var(--fond), 0 0 0 8px var(--vif), var(--ombre-forte);
  view-transition-name: samara;
}
.guide::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--vif); opacity: 0; animation: onde 3.2s var(--sortie) 1s infinite; }
.guide::after { content: ""; position: absolute; right: 6px; bottom: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--en-ligne); border: 3px solid var(--fond); }
.guide-avatar { width: 94px; height: 94px; overflow: visible; }
.surtitre { margin: 10px 0 4px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--titres); font-size: .7em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-texte); }
.point-vert { width: 7px; height: 7px; border-radius: 50%; background: var(--en-ligne); box-shadow: 0 0 0 3px color-mix(in srgb, var(--en-ligne) 25%, transparent); }
.accueil h1 { font-size: clamp(1.55em, 7vw, 2.15em); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.accueil-texte { margin: 8px auto 18px; max-width: 30em; color: var(--encre-douce); font-size: .96em; text-wrap: pretty; }

/* ---------- carte du lieu ---------- */
.lieu {
  text-align: left; color: var(--sur-accent); border-radius: 26px; padding: 16px 18px 16px; position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--accent-clair) -10%, var(--accent) 45%, var(--accent-fonce) 110%);
  box-shadow: var(--ombre-forte);
}
.lieu::before { content: ""; position: absolute; z-index: -1; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--vif); opacity: .13; }
.lieu::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 46px; opacity: .14;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='20' viewBox='0 0 80 20'%3E%3Cpath d='M0 10c10-8 20-8 30 0s20 8 30 0 15-6 20-4' fill='none' stroke='%23ffffff' stroke-width='3'/%3E%3C/svg%3E") repeat-x 0 50% / 80px 20px;
  animation: courant 9s linear infinite;
}
.lieu.change { animation: carte-change .45s var(--sortie); }
.lieu-etape { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--titres); font-size: .7em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--vif); }
.lieu-numero { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--vif); color: var(--sur-vif); font-size: 1.15em; letter-spacing: 0; }
.lieu h2 { font-size: 1.36em; font-weight: 800; letter-spacing: -.015em; margin: 6px 0 10px; text-wrap: balance; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.etiquettes li { display: inline-flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 4px 10px 4px 8px; font-size: .8em; font-weight: 600; }
.etiquettes li svg { color: var(--vif); flex: none; }
.lieu p { margin: 0 0 12px; font-size: .93em; text-wrap: pretty; }
.lieu details { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 4px 12px; font-size: .86em; margin-bottom: 14px; }
.lieu summary { cursor: pointer; font-weight: 700; min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; }
.lieu summary::-webkit-details-marker { display: none; }
.lieu summary::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s var(--sortie); }
.lieu details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.lieu details[open] > :not(summary) { animation: monter .3s var(--sortie) both; }
.lieu details p { margin: 4px 0 10px; }
.lieu a { color: inherit; text-underline-offset: 3px; }
.lieu-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* progression : la Sambre et ses escales */
.progression { display: flex; align-items: center; flex: 1 1 120px; }
.progression :is(span, button) { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .7); flex: none; position: relative; transition: background-color .3s, border-color .3s; }
.progression :is(span, button).vue { background: var(--vif); border-color: var(--vif); }
.progression :is(span, button).ici { box-shadow: 0 0 0 4px rgba(255, 220, 0, .35); animation: pulsation 2.4s var(--sortie) infinite; }
.progression i { flex: 1; height: 3px; min-width: 14px; border-radius: 3px; background: rgba(255, 255, 255, .28); position: relative; overflow: hidden; }
.progression i::after { content: ""; position: absolute; inset: 0; background: var(--vif); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--sortie); }
.progression i.vue::after { transform: none; }

/* ---------- tuiles des questions (dans « Explorer ») ---------- */
.raccourcis-grands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.carte-question {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 104px; padding: 14px;
  border-radius: 20px; border: 1.5px solid var(--bord); background: var(--surface); text-align: left; box-shadow: var(--ombre);
  font-family: var(--titres); font-weight: 700; font-size: .9em; line-height: 1.25; color: var(--encre); overflow-wrap: anywhere;
  transition: transform .25s var(--ressort), border-color .2s, box-shadow .2s;
  animation: monter .45s var(--sortie) both;
}
.carte-question:nth-child(2) { animation-delay: .05s; }
.carte-question:nth-child(3) { animation-delay: .1s; }
.carte-question:nth-child(4) { animation-delay: .15s; }
.carte-question:hover { transform: translateY(-3px); border-color: var(--accent-texte); box-shadow: var(--ombre-forte); }
.carte-question:active { transform: scale(.97); }
.carte-question .rond { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--doux); color: var(--accent-texte); transition: transform .3s var(--ressort); }
.carte-question:hover .rond { transform: rotate(-8deg) scale(1.08); }
.carte-question.defi { background: linear-gradient(160deg, var(--vif) 0%, var(--vif-fonce) 100%); border-color: transparent; color: var(--sur-vif); }
.carte-question.defi .rond { background: rgba(27, 18, 56, .1); color: var(--sur-vif); }
.carte-question.defi .rond svg { animation: scintiller 2.6s ease-in-out infinite; }

/* ---------- conversation ---------- */
.fil { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 14px 0 6px; }
.fil:empty::before { content: attr(data-vide); align-self: center; margin: auto; padding: 24px; text-align: center; color: var(--encre-douce); font-size: .9em; }
.ligne { display: flex; gap: 10px; animation: monter .35s var(--sortie) both; }
.ligne.visiteur { justify-content: flex-end; }
.ligne.assistant { align-items: flex-start; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--doux); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.avatar svg { width: 28px; height: 28px; overflow: visible; }
.colonne { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; max-width: 600px; }
.nom { display: flex; align-items: center; gap: 6px; min-height: 34px; font-family: var(--titres); font-size: .78em; font-weight: 700; color: var(--encre); }
.nom small { font-family: var(--texte); font-weight: 600; font-size: .85em; color: var(--accent-texte); background: var(--doux); padding: 1px 7px; border-radius: 999px; }
.bulle { white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.ligne.assistant .bulle { padding: 0 2px; font-size: 1.02em; }
.ligne.assistant .bulle strong { font-weight: 700; color: var(--accent-texte); }
.ligne.visiteur .bulle {
  padding: 10px 15px; border-radius: 20px 20px 6px 20px; max-width: min(85%, 520px);
  background: var(--accent); color: var(--sur-accent); box-shadow: 0 4px 14px rgba(110, 44, 107, .22);
  animation: arriver .35s var(--ressort) both; transform-origin: 100% 100%;
}
/* mots qui arrivent pendant l'écriture */
.mot-neuf { animation: mot .26s var(--sortie) both; }
/* phrase en cours de lecture */
.phrase { border-radius: 4px; transition: background-color .25s, box-shadow .25s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.phrase.lue { background: var(--surligne); box-shadow: 0 0 0 2px var(--surligne); }

/* Samara réfléchit : reflet qui balaie le texte */
.reflexion {
  display: inline-block; font-weight: 600; color: transparent;
  background: linear-gradient(90deg, var(--encre-douce) 0%, var(--encre-douce) 35%, var(--accent-clair) 50%, var(--encre-douce) 65%, var(--encre-douce) 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; animation: reflet 1.6s linear infinite;
}

.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; animation: monter .3s var(--sortie) both; }
.actions button {
  min-height: 38px; min-width: 40px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--bord); background: var(--surface);
  color: var(--encre-douce); font-size: .8em; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .2s var(--ressort), background-color .2s, color .2s, border-color .2s;
}
.actions button:hover:not(:disabled) { border-color: var(--accent-texte); color: var(--accent-texte); }
.actions button:active:not(:disabled) { transform: scale(.93); }
.actions button:disabled { opacity: .5; cursor: default; }
.actions [data-pouce] { padding: 4px 9px; }
.actions [data-pouce="bas"] svg { transform: scaleY(-1); }
.actions [data-pouce][aria-pressed="true"] { background: var(--vif); border-color: var(--vif-fonce); color: var(--sur-vif); opacity: 1; animation: bondir .45s var(--rebond); }

/* lecteur « Écouter » */
.ecouter { position: relative; }
.ecouter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); padding-right: 14px; }
.ecouter[aria-pressed="true"]:hover:not(:disabled) { color: var(--sur-accent); }
.ondes { display: none; align-items: center; gap: 2px; height: 14px; }
.ondes i { width: 3px; height: 100%; border-radius: 2px; background: var(--vif); transform: scaleY(.3); animation: onde-son .9s ease-in-out infinite; }
.ondes i:nth-child(2) { animation-delay: -.3s; }
.ondes i:nth-child(3) { animation-delay: -.6s; }
.ondes i:nth-child(4) { animation-delay: -.15s; }
.ecouter[data-etat="lecture"] .ondes { display: inline-flex; }
.ecouter[data-etat="lecture"] .ecouter-picto, .ecouter[data-etat="prepare"] .ecouter-picto { display: none; }
.ecouter[data-etat="prepare"] .ecouter-anneau { display: inline-block; }
.ecouter-anneau { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tourner .8s linear infinite; }
.ecouter-progres { font-variant-numeric: tabular-nums; opacity: .85; font-size: .9em; }

.relances { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.relances button {
  min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--accent-texte) 35%, transparent); background: var(--surface);
  color: var(--accent-texte); font-size: .84em; font-weight: 600; text-align: left; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .2s var(--ressort), background-color .2s, border-color .2s; animation: monter .35s var(--sortie) both;
}
.relances button::before { content: "↳"; opacity: .6; }
.relances button:nth-child(2) { animation-delay: .06s; }
.relances button:nth-child(3) { animation-delay: .12s; }
.relances button:hover { background: var(--doux); border-color: var(--accent-texte); }
.relances button:active { transform: scale(.96); }

/* escale tamponnée : un vrai tampon, encre et rebond */
.tampon {
  align-self: stretch; display: flex; gap: 14px; align-items: center; position: relative; overflow: hidden;
  background: var(--surface); border: 1.5px solid var(--bord); border-radius: 22px; padding: 12px 16px; box-shadow: var(--ombre);
  animation: monter .35s var(--sortie) both, secousse .35s ease-out .45s;
}
.tampon::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--vif); }
.tampon-rond {
  flex: none; width: 64px; height: 64px; border-radius: 50%; position: relative;
  border: 3px solid var(--accent-texte); color: var(--accent-texte); display: grid; place-items: center; text-align: center;
  font-family: var(--titres); font-weight: 800; line-height: 1; transform: rotate(-10deg);
  animation: tamponner .5s var(--rebond) .1s both;
}
.tampon-rond::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1.5px dashed var(--accent-texte); opacity: .6; }
.tampon-rond span { font-size: .5em; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 2px; }
.tampon-rond b { font-size: 1.5em; }
.tampon strong { display: block; font-family: var(--titres); color: var(--accent-texte); }
.tampon p { margin: 2px 0 0; font-size: .86em; color: var(--encre-douce); }
.info {
  align-self: center; max-width: 100%; background: var(--vif); color: var(--sur-vif); font-family: var(--titres); font-weight: 600; font-size: .8em;
  padding: 7px 16px; border-radius: 999px; text-align: center; box-shadow: var(--ombre); animation: arriver .45s var(--ressort) both;
}
.info.erreur { background: var(--surface); color: var(--encre); border: 1.5px solid var(--bord); }
/* conversation en cours de traduction : messages estompés, pastille « je traduis… » */
.fil.traduction .ligne .bulle, .fil.traduction .relances { opacity: .45; transition: opacity .3s; }
.traduction-info { background: var(--surface); border: 1.5px solid var(--bord); }

/* défi : grandes cartes de réponse */
.defi-carte { background: var(--surface); border: 1.5px solid var(--bord); border-radius: 22px; padding: 14px; box-shadow: var(--ombre); white-space: normal; }
.defi-titre { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-family: var(--titres); font-size: .72em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-texte); }
.defi-titre svg { color: var(--vif-fonce); }
.defi-question { margin: 0 0 12px; font-family: var(--titres); font-weight: 700; font-size: 1.02em; line-height: 1.3; }
.choix { display: grid; gap: 8px; }
.choix button {
  min-height: 52px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 12px; border-radius: 16px;
  border: 1.5px solid var(--bord); background: var(--fond); font-weight: 600; transition: transform .2s var(--ressort), border-color .2s, background-color .2s;
  animation: monter .35s var(--sortie) both;
}
.choix button:nth-child(2) { animation-delay: .05s; }
.choix button:nth-child(3) { animation-delay: .1s; }
.choix .lettre { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--bord); font-family: var(--titres); font-size: .8em; font-weight: 800; color: var(--accent-texte); }
.choix button:hover:not(:disabled) { border-color: var(--accent-texte); transform: translateX(3px); }
.choix button:active:not(:disabled) { transform: scale(.98); }
.choix button:disabled { cursor: default; }
.choix button.bonne { background: var(--vif); border-color: var(--vif-fonce); color: var(--sur-vif); animation: bondir .5s var(--rebond); }
.choix button.bonne .lettre { background: var(--sur-vif); color: var(--vif); border-color: var(--sur-vif); }
.choix button.bonne::after { content: "✓"; margin-left: auto; font-weight: 800; font-size: 1.2em; }
.choix button.mauvaise { opacity: .7; text-decoration: line-through; animation: non .4s ease-in-out; }
.choix button.mauvaise::after { content: "✗"; margin-left: auto; font-weight: 800; }
.choix button.autre { opacity: .45; }
.pepite-volante { position: fixed; z-index: 45; width: 26px; height: 26px; color: var(--vif-fonce); pointer-events: none; filter: drop-shadow(0 2px 4px rgba(27, 18, 56, .3)); }

/* ---------- saisie ---------- */
.pied { position: sticky; bottom: 0; z-index: 9; background: linear-gradient(to top, var(--fond) 78%, transparent); padding: 14px 0 max(8px, env(safe-area-inset-bottom)); }
.vers-le-bas {
  position: absolute; left: 50%; top: -34px; translate: -50% 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--bord); background: var(--surface); color: var(--accent-texte); box-shadow: var(--ombre-forte);
  display: grid; place-items: center; animation: arriver .3s var(--ressort) both;
}
.vers-le-bas[hidden] { display: none; }
.saisie {
  display: flex; gap: 8px; align-items: flex-end; padding: 5px 5px 5px 4px; border-radius: 28px;
  background: var(--surface); border: 1.5px solid var(--bord); box-shadow: var(--ombre-forte); transition: border-color .2s, box-shadow .2s;
}
.saisie:focus-within { border-color: var(--accent-texte); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-texte) 14%, transparent), var(--ombre-forte); }
.saisie textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 130px; padding: 10px 12px; border: 0; background: transparent; font-size: max(16px, 1em); line-height: 1.4; }
.saisie textarea:focus { outline: none; }
.saisie textarea::placeholder { color: var(--encre-douce); opacity: .8; }
.saisie button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: var(--vif); display: grid; place-items: center; transition: transform .25s var(--ressort), opacity .2s, background-color .2s; }
.saisie button:not(:disabled):hover { background: var(--accent-fonce); }
.saisie button:active:not(:disabled) { transform: scale(.88); }
.saisie button:disabled { opacity: .3; cursor: default; transform: scale(.9); }
.mention { margin: 6px 0 0; text-align: center; font-size: .68em; color: var(--encre-douce); }
.quota { font-weight: 700; color: var(--accent-texte); }

/* ---------- fenêtres : réglages et avis ---------- */
dialog { border: 0; border-radius: 26px; padding: 22px; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); color: var(--encre); box-shadow: var(--ombre-forte); }
dialog[open] { animation: fenetre .3s var(--tiroir); }
dialog::backdrop { background: rgba(10, 6, 24, .55); backdrop-filter: blur(3px); }
dialog h2 { margin: 4px 0 14px; font-size: 1.2em; font-weight: 800; }
dialog .actions { justify-content: flex-end; margin-top: 16px; }
dialog .actions button { min-height: 48px; padding: 8px 22px; border-radius: 999px; border: 0; background: var(--accent); color: var(--sur-accent); font-size: .92em; }
dialog .actions button:hover:not(:disabled) { color: var(--sur-accent); background: var(--accent-fonce); }
dialog .actions .secondaire { background: var(--doux); color: var(--encre); }
dialog .actions .secondaire:hover:not(:disabled) { background: var(--bord); color: var(--encre); }
.panneau fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.panneau legend { font-weight: 700; margin-bottom: 8px; }
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segments button { min-height: 52px; border-radius: 16px; border: 1.5px solid var(--bord); background: var(--fond); font-family: var(--titres); font-weight: 800; transition: border-color .2s, background-color .2s; }
.segments button[aria-checked="true"] { border-color: var(--accent-texte); background: var(--doux); color: var(--accent-texte); }
.segments .a2 { font-size: 1.25em; }
.segments .a3 { font-size: 1.5em; }
.interrupteurs { display: grid; gap: 6px; }
.interrupteurs button { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; min-height: 58px; padding: 8px 12px; border-radius: 16px; border: 1.5px solid var(--bord); background: var(--fond); transition: border-color .2s; }
.interrupteurs strong { display: block; font-size: .92em; }
.interrupteurs small { display: block; color: var(--encre-douce); font-size: .78em; }
.interrupteurs i { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--bord); position: relative; transition: background-color .2s; }
.interrupteurs i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--ressort); }
.interrupteurs button[aria-checked="true"] { border-color: var(--accent-texte); }
.interrupteurs button[aria-checked="true"] i { background: var(--accent); }
.interrupteurs button[aria-checked="true"] i::after { transform: translateX(18px); }
.aide-reglages { margin: 12px 0 0; font-size: .78em; color: var(--encre-douce); }
#dialogue-avis { text-align: center; }
.avis-avatar { width: 72px; height: 72px; overflow: visible; }
.etoiles { display: flex; justify-content: center; gap: 2px; margin-bottom: 12px; }
.etoiles button { min-width: 46px; min-height: 46px; border: 0; background: none; color: var(--bord); display: grid; place-items: center; transition: transform .25s var(--ressort), color .15s; }
.etoiles button:active { transform: scale(.85); }
.etoiles button.allumee { color: var(--vif-fonce); animation: bondir .4s var(--rebond); }
#dialogue-avis label { display: block; text-align: left; font-size: .85em; }
#dialogue-avis textarea { width: 100%; border-radius: 14px; border: 1.5px solid var(--bord); background: var(--fond); padding: 10px; margin-top: 4px; font-size: max(16px, 1em); }

.confettis { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confettis i { position: absolute; left: 50%; top: 40%; width: 9px; height: 14px; border-radius: 3px; }
.confettis i.goutte { width: 12px; height: 12px; border-radius: 0 50% 50% 50%; }
.confettis i.rond { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- animations (toutes coupées si l'on réduit les animations) ---------- */
@keyframes monter { from { opacity: 0; transform: translateY(10px); } }
@keyframes arriver { from { opacity: 0; transform: scale(.85); } }
@keyframes mot { from { opacity: 0; filter: blur(4px); transform: translateY(2px); } }
@keyframes deplier { from { opacity: 0; transform: scale(.92) translateY(-6px); } }
@keyframes fenetre { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes onde { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.35); } }
@keyframes courant { to { background-position-x: 80px; } }
@keyframes respirer { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5px) scale(1.025, .985); } }
@keyframes cligner { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes regarder { 0%, 40%, 100% { transform: translate(0, 0); } 50%, 70% { transform: translate(-1.2px, -.6px); } }
@keyframes parler { 0% { transform: scaleY(.35) scaleX(1); } 100% { transform: scaleY(1.05) scaleX(.85); } }
@keyframes rebondir-parle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-1.5px) scale(1.03, .97); } }
@keyframes vagues { to { stroke-dashoffset: -28; } }
@keyframes reflet { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes tamponner { 0% { opacity: 0; transform: scale(1.6) rotate(8deg); } 100% { opacity: 1; transform: scale(1) rotate(-10deg); } }
@keyframes secousse { 0%, 100% { transform: none; } 30% { transform: translate(-1.5px, 1px) rotate(-.3deg); } 60% { transform: translate(1.5px, -1px) rotate(.3deg); } }
@keyframes bondir { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes non { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes pulsation { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 220, 0, .4); } 50% { box-shadow: 0 0 0 7px rgba(255, 220, 0, 0); } }
@keyframes onde-son { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes tourner { to { transform: rotate(360deg); } }
@keyframes scintiller { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(14deg) scale(1.12); } }
@keyframes carte-change { 0% { opacity: .4; transform: translateY(8px) scale(.98); } }

/* Samara vit : seulement si le visiteur n'a pas demandé moins de mouvement */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-calme]) .s-goutte { animation: respirer 3.6s ease-in-out infinite; }
  :root:not([data-calme]) .s-yeux { animation: cligner 4.8s infinite; }
  :root:not([data-calme]) .s-pupille { animation: regarder 7s ease-in-out infinite; }
  :root:not([data-calme]) .s-vague { animation: vagues 2.4s linear infinite; }
  :root:not([data-calme]) .s-bouche { animation: parler .18s ease-in-out infinite alternate; animation-play-state: var(--parole, paused); }
  :root:not([data-calme]) .parle .s-goutte { animation: rebondir-parle .36s ease-in-out infinite; }
}

/* transition entre l'accueil et la conversation (navigateurs qui la connaissent) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--sortie); }

/* animations coupées : réglage du téléphone ou réglage de la page */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confettis { display: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
:root[data-calme] *, :root[data-calme] *::before, :root[data-calme] *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
:root[data-calme] .confettis { display: none; }

/* ---------- toutes les tailles d'écran ---------- */
/* téléphones : en-tête resserré pour que tout tienne (marque, pépites, drapeaux, menu) */
@media (max-width: 440px) {
  .outils { gap: 4px; }
  .marque { font-size: .95em; }
  .marque svg { display: none; }
  .pepites { padding: 0 8px 0 6px; }
  .langues { gap: 0; padding: 2px; }
  .langues button { width: 34px; height: 34px; }
  .langues button svg { width: 23px; height: 23px; }
  .bouton-menu { width: 38px; height: 38px; }
}
/* « choisissez une question à gauche » : n'a de sens qu'en deux colonnes */
@media not ((min-width: 960px) and (min-height: 560px)) {
  .fil:empty { padding: 0; }
  .fil:empty::before { content: none; }
}
/* très petits téléphones */
@media (max-width: 359px) {
  :root { --gouttiere: 10px; }
  .marque { font-size: .88em; }
  .marque svg { display: none; }
  .langues button { width: 32px; height: 34px; }
  .langues button svg { width: 21px; height: 21px; }
  .bouton-menu { width: 36px; height: 36px; }
  .pepites { padding: 0 7px; }
  .raccourcis-grands { gap: 8px; }
  .carte-question { min-height: 92px; padding: 11px; font-size: .85em; }
}
/* panneau des réglages en bas de l'écran sur téléphone */
@media (max-width: 599px) {
  .panneau { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 26px 26px 0 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .panneau[open] { animation: tiroir .38s var(--tiroir); }
}
@keyframes tiroir { from { transform: translateY(100%); } }
/* téléphone couché : hauteur réduite */
@media (orientation: landscape) and (max-height: 520px) {
  .entete { padding-top: 4px; padding-bottom: 4px; }
  .guide { width: 76px; height: 76px; }
  .guide-avatar { width: 58px; height: 58px; }
  .accueil-texte { margin: 2px 0 6px; }
  .raccourcis-grands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .carte-question { min-height: 86px; }
  .mention { display: none; }
}
/* tablettes */
@media (min-width: 600px) {
  .raccourcis-grands { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .carte-question { min-height: 118px; }
}
/* ordinateurs et grandes tablettes couchées : deux colonnes, chacune défile seule */
@media (min-width: 960px) and (min-height: 560px) {
  body { height: 100dvh; overflow: hidden; }
  .entete { padding-left: 24px; padding-right: 24px; }
  .page { max-width: 1240px; display: grid; grid-template-columns: minmax(320px, 410px) minmax(0, 1fr); gap: 28px; padding: 20px 24px 0; min-height: 0; flex: 1; }
  body[data-conversation="oui"] .accueil { display: block; }
  .accueil { overflow-y: auto; padding: 6px 6px 24px; scrollbar-width: thin; }
  .raccourcis-grands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat { position: relative; min-height: 0; background: var(--surface); border: 1.5px solid var(--bord); border-bottom: 0; border-radius: 28px 28px 0 0; overflow: hidden; box-shadow: var(--ombre); }
  .fil { overflow-y: auto; padding: 24px 28px 10px; scrollbar-width: thin; }
  .tampon, .choix button, .defi-carte, .relances button, .actions button { background: var(--fond); }
  .pied { position: relative; background: var(--surface); padding: 12px 28px 14px; border-top: 1.5px solid var(--bord); }
  .saisie { box-shadow: none; background: var(--fond); }
}
@media (min-width: 1600px) {
  .page { max-width: 1400px; grid-template-columns: 450px minmax(0, 1fr); }
}
@media print {
  .entete, .pied, .confettis { display: none; }
}

/* ---------- ajouts du 26/11 (soir) : escales cliquables, sources, liens officiels ---------- */
/* escales cliquables sur la carte du lieu : zone de toucher agrandie sans grossir le point */
/* sources et liens officiels sous la réponse (CCTP : provenance explicitement indiquée) */
.sources { margin: 0; font-size: .74em; color: var(--encre-douce); }
.liens-officiels { display: flex; flex-wrap: wrap; gap: 6px; }
.lien-officiel {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 7px 14px; border-radius: 14px;
  background: var(--doux); color: var(--accent-texte); font-weight: 700; font-size: .86em; text-decoration: none;
  border: 1.5px solid transparent; transition: border-color .2s, transform .2s var(--ressort);
}
.lien-officiel:hover { border-color: var(--accent-texte); }
.lien-officiel:active { transform: scale(.97); }
.actions .en-savoir-plus { color: var(--accent-texte); }
/* mentions et confidentialité */
.panneau-texte p { margin: 0 0 10px; font-size: .9em; }
.panneau-texte .a-valider { font-size: .75em; color: var(--encre-douce); font-style: italic; }

/* ---------- Samara illustrée : trois images superposées ---------- */
.samara-photo { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #fdf8f4; }
.samara-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
.sp-parle, .sp-cligne { opacity: 0; }
.guide-avatar { display: block; width: 104px; height: 104px; }
.guide { overflow: hidden; background: #fdf8f4; box-shadow: 0 0 0 5px var(--fond), 0 0 0 8px transparent, var(--ombre-forte); }
.guide::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; padding: 4px; background: var(--degrade); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 1; animation: none; }
.avatar { width: 38px; height: 38px; padding: 0; overflow: hidden; background: #fdf8f4; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent-clair); }
.avis-avatar { display: block; width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--vif); }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-calme]) .samara-photo .sp-cligne { animation: cligner-photo 5.2s infinite; }
  :root:not([data-calme]) .samara-photo .sp-base { animation: respirer-photo 4s ease-in-out infinite; }
  :root:not([data-calme]) .samara-photo .sp-parle, :root:not([data-calme]) .samara-photo .sp-cligne { animation-name: cligner-photo; }
  :root:not([data-calme]) .parle .samara-photo .sp-parle { animation: parler-photo .34s steps(1, end) infinite; }
  :root:not([data-calme]) .parle .samara-photo { animation: hocher .9s ease-in-out infinite; }
}
.parle .samara-photo .sp-parle { opacity: 1; }
:root[data-calme] .parle .samara-photo .sp-parle { opacity: 0; }
@keyframes cligner-photo { 0%, 94%, 100% { opacity: 0; } 95%, 98% { opacity: 1; } }
@keyframes parler-photo { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes respirer-photo { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025) translateY(-1px); } }
@keyframes hocher { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2deg); } 70% { transform: rotate(2deg); } }

/* ---------- carte du lieu : photo, dégradé du logo ---------- */
.lieu { background: linear-gradient(150deg, var(--accent-clair) -20%, var(--accent) 50%, var(--accent-fonce) 115%); }
.lieu-photo { margin: -16px -18px 14px; position: relative; }
.lieu-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lieu-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 5px; background: var(--degrade); }
.lieu-photo figcaption { position: absolute; right: 8px; bottom: 10px; font-size: .62em; color: #fff; background: rgba(0, 0, 0, .45); padding: 2px 8px; border-radius: 999px; }
.entete { position: relative; }
.entete::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--degrade); pointer-events: none; }

/* ---------- bandeau d'information de l'Agglomération ---------- */
.bandeau-info { display: flex; align-items: flex-start; gap: 10px; text-align: left; margin: 8px var(--gouttiere) 10px; padding: 10px 14px; border-radius: 14px; background: #fff7cc; color: #2a1530; border-left: 5px solid var(--vif-fonce); font-size: .88em; line-height: 1.45; }
.bandeau-info.alerte { background: #fde8e8; border-left-color: #c62f33; }
.bandeau-info p { margin: 0; }
.bandeau-info svg { flex: none; margin-top: 1px; color: #8a5a00; }
.bandeau-info.alerte svg { color: #b3261e; }
.bandeau-info[hidden] { display: none; }

/* ---------- plan des escales et rappel ---------- */
.carte-plan { margin: 10px 0 4px; border-radius: 18px; overflow: hidden; box-shadow: var(--ombre); max-width: 460px; }
.plan-escales { width: 100%; height: auto; display: block; font-family: var(--titres); }
.plan-fond { fill: #f2f6f5; }
.plan-riviere { fill: none; stroke: #7fb6d6; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.plan-frontiere { fill: none; stroke: #b9a7b6; stroke-width: 1.5; stroke-dasharray: 5 4; }
.plan-parcours { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .7; }
.plan-point { fill: var(--accent); stroke: #fff; stroke-width: 3; }
.plan-escale.ici .plan-point { fill: var(--accent-clair); }
.plan-halo { fill: rgba(255, 220, 0, .6); }
.plan-numero { fill: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }
.plan-nom { fill: #2a1530; font-size: 12px; font-weight: 700; paint-order: stroke; stroke: #f2f6f5; stroke-width: 4px; pointer-events: none; }
.plan-ici { fill: #a63259; font-size: 11px; font-weight: 700; paint-order: stroke; stroke: #f2f6f5; stroke-width: 4px; pointer-events: none; }
.plan-legende, .plan-nord { fill: #66546c; font-size: 10px; font-weight: 600; }
.plan-source { fill: #66546c; font-size: 8px; font-family: system-ui, sans-serif; }
.plan-echelle { stroke: #66546c; stroke-width: 2; }
.plan-escale[role="button"] { cursor: pointer; }
.plan-escale[role="button"]:focus-visible { outline: none; }
.plan-escale[role="button"]:focus-visible .plan-point, .plan-escale[role="button"]:hover .plan-point { stroke: var(--vif-fonce); stroke-width: 4; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-calme]) .plan-halo { animation: halo 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } }
@keyframes halo { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.25); opacity: .5; } }
.rappel { display: block; margin: 8px 0 2px; padding: 9px 12px; border-radius: 12px; background: var(--doux); font-size: .86em; line-height: 1.45; }
.rappel svg { vertical-align: -3px; margin-right: 6px; color: var(--accent-texte); }


/* ---------- accueil allégé (retour de Mathis, 27/11) : six tuiles compactes, le reste dans le menu ---------- */
.accueil-texte { margin-bottom: 14px; }
.raccourcis-grands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.raccourcis-grands .carte-question { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 60px; padding: 10px 12px; font-size: .86em; border-radius: 16px; }
.raccourcis-grands .carte-question .rond { width: 34px; height: 34px; border-radius: 11px; flex: none; }
.raccourcis-grands .carte-question:nth-child(5) { animation-delay: .2s; }
.raccourcis-grands .carte-question:nth-child(6) { animation-delay: .25s; }
@media (min-width: 600px) { .raccourcis-grands { grid-template-columns: repeat(3, minmax(0, 1fr)); } .raccourcis-grands .carte-question { min-height: 64px; } }
@media (min-width: 960px) and (min-height: 560px) { .raccourcis-grands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (orientation: landscape) and (max-height: 520px) { .raccourcis-grands { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- menu de la visite ---------- */
.menu { min-width: min(300px, calc(100vw - 32px)); }
.menu-titre { margin: 8px 12px 2px; font-family: var(--titres); font-size: .68em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-douce); }
.menu-titre:first-child { margin-top: 2px; }
.menu button > span { display: flex; flex-direction: column; line-height: 1.25; }
.menu button small { font-weight: 500; font-size: .8em; color: var(--encre-douce); }

/* ---------- panneaux du menu : plan et escales, défis, infos pratiques ---------- */
.panneau-visite { width: min(520px, calc(100vw - 32px)); }
.panneau-corps { display: flex; flex-direction: column; gap: 14px; }
.panneau-visite .carte-plan { max-width: none; margin: 0; }
.liste-escales { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.liste-escales li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px; border: 1.5px solid var(--bord); border-radius: 18px; background: var(--fond); }
.liste-escales li.ici { border-color: var(--accent-texte); background: var(--doux); }
.liste-escales strong { display: block; font-family: var(--titres); font-size: .95em; }
.liste-escales small { display: block; color: var(--encre-douce); font-size: .8em; font-weight: 600; margin-top: 1px; }
.liste-escales p { margin: 6px 0 0; font-size: .88em; line-height: 1.45; }
.rond-escale { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--bord); font-family: var(--titres); font-weight: 800; font-size: .9em; color: var(--encre-douce); }
.rond-escale.vue { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.rond-escale.gagne { background: var(--vif); border-color: var(--vif-fonce); color: var(--sur-vif); }
.bouton-lien, .bouton-defi { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--accent-texte); background: var(--surface); color: var(--accent-texte); font-weight: 700; font-size: .85em; }
.bouton-defi { background: var(--vif); border-color: var(--vif-fonce); color: var(--sur-vif); }
.etat-defi.defi-fait { color: #1d7a46; }
.panneau-corps h3 { margin: 0 0 4px; font-family: var(--titres); font-size: .9em; }
.panneau-corps section p { margin: 0; font-size: .9em; line-height: 1.5; }
.etiquettes.claires li { background: var(--doux); border-color: var(--bord); color: var(--encre); }
.etiquettes.claires li svg { color: var(--accent-texte); }
/* Sur téléphone, l'essentiel tient dans le premier écran : Samara, le lieu et sa quête. */
@media (max-width: 599px) {
  .accueil { padding-top: 10px; }
  .lieu-photo img { aspect-ratio: 5 / 2; }
  .lieu h2 { margin: 4px 0 8px; font-size: 1.22em; }
  .lieu .etiquettes { margin-bottom: 8px; }
}
