/* La mémoire vivante : charte Kanon (Inter, un seul accent, surfaces blanches), grands caractères pour tous les âges. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/vendor/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --accent: #2563EB; --accent-fonce: #1D4ED8; --texte: #111827; --fond: #FFFFFF; --fond-doux: #F9FAFB;
  --texte2: #4B5563; --discret: #6B7280; --bord: #E5E7EB; --bord-fort: #D1D5DB;
  --ok: #047857; --ok-fond: #ECFDF5; --alerte: #92400E; --alerte-fond: #FFFBEB; --erreur: #B91C1C; --erreur-fond: #FEF2F2;
  --police: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --echelle: 1.12; --r: 8px; --entete: 72px; --onglets: 0px;
  --ombre: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --ombre-haute: 0 4px 12px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(var(--echelle) * 100%); -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete) + 16px); }
body {
  margin: 0; font-family: var(--police); font-size: 1.0625rem; line-height: 1.6; color: var(--texte); background: var(--fond);
  -webkit-font-smoothing: antialiased; padding-bottom: var(--onglets);
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: var(--accent-fonce); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--texte2); }
.small { font-size: .9rem; }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1[tabindex="-1"]:focus { outline: none; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
section.bloc { padding-block: clamp(48px, 7vw, 88px); }
section.doux { background: var(--fond-doux); border-block: 1px solid var(--bord); }

/* ---------- Entête et navigation (une seule ligne) ---------- */
.entete { position: sticky; top: 0; z-index: 900; height: var(--entete); background: var(--fond); border-bottom: 1px solid var(--bord); }
.entete .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; color: var(--texte); text-decoration: none; white-space: nowrap; font-size: 1.15rem; }
.logo svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { white-space: nowrap; padding: 10px 14px; border-radius: var(--r); color: var(--texte2); text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { color: var(--texte); background: var(--fond-doux); }
.nav a[aria-current='page'] { color: var(--texte); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }

@media (max-width: 1060px) { .nav a[href="/a-propos"] { display: none; } .nav a { padding-inline: 10px; } .entete .wrap { gap: 12px; } }
.onglets { display: none; }
@media (max-width: 860px) {
  :root { --entete: 60px; --onglets: 68px; }
  .nav, .entete .cta-entete, .entete .compte { display: none; }
  .entete .wrap { justify-content: space-between; }
  .onglets {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; inset: auto 0 0 0; height: var(--onglets); z-index: 950;
    background: var(--fond); border-top: 1px solid var(--bord); padding-bottom: env(safe-area-inset-bottom);
  }
  .onglets a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .8rem; font-weight: 600; color: var(--texte2); text-decoration: none; min-height: 44px; }
  .onglets a svg { width: 26px; height: 26px; }
  .onglets a[aria-current='page'] { color: var(--accent-fonce); }
  .onglets a.principal { color: #fff; }
  .onglets a.principal span.pastille { background: var(--accent); border-radius: 9999px; width: 44px; height: 44px; display: grid; place-items: center; margin-top: -14px; box-shadow: var(--ombre-haute); }
  .onglets a.principal span.txt { color: var(--accent-fonce); }
}

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; border-radius: var(--r); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-fonce); }
.btn-secondary { background: transparent; color: #374151; border-color: var(--bord-fort); }
.btn-secondary:hover { border-color: #9CA3AF; color: var(--texte); }
.btn-ghost { background: transparent; color: var(--accent-fonce); padding-inline: 12px; }
.btn-ghost:hover { background: var(--fond-doux); }
.btn-danger { background: transparent; color: var(--erreur); border-color: #FCA5A5; }
.btn-danger:hover { background: var(--erreur-fond); }
.btn-lg { min-height: 60px; padding: 14px 30px; font-size: 1.15rem; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 22px; height: 22px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.champ { margin-bottom: 22px; }
.champ > label, .champ > .etiquette, legend.etiquette { display: block; font-weight: 600; margin-bottom: 6px; font-size: 1rem; }
.aide { display: block; color: var(--texte2); font-size: .92rem; margin: -2px 0 8px; font-weight: 400; max-width: 62ch; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--bord-fort); border-radius: var(--r); font: inherit; font-size: 1rem;
  color: var(--texte); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .duo { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.choix { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--bord); border-radius: var(--r); margin-bottom: 8px; cursor: pointer; background: #fff; min-height: 56px; }
.choix:hover { border-color: var(--bord-fort); }
.choix:has(input:checked) { border-color: var(--accent); background: #EFF6FF; }
.choix input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.choix.off { opacity: .55; cursor: not-allowed; }
.choix small { display: block; color: var(--texte2); font-size: .88rem; }
.compteur { text-align: right; color: var(--discret); font-size: .85rem; margin-top: 4px; }

/* ---------- Cartes, pastilles ---------- */
.carte-info { border: 1px solid var(--bord); border-radius: var(--r); background: #fff; padding: 22px; box-shadow: var(--ombre); }
.carte-info:hover { box-shadow: var(--ombre-haute); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 9999px; font-size: .82rem; font-weight: 600; background: #F3F4F6; color: #374151; white-space: nowrap; }
.badge.bleu { background: #EFF6FF; color: var(--accent-fonce); }
.badge.vert { background: var(--ok-fond); color: var(--ok); }
.badge.ambre { background: var(--alerte-fond); color: var(--alerte); }
.badge.rouge { background: var(--erreur-fond); color: var(--erreur); }
.badge.fantome { background: #fff; color: #5B21B6; border: 1.5px dashed #7C3AED; }
.point-theme { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--accent)); }
.notice { padding: 14px 18px; border-radius: var(--r); background: var(--alerte-fond); color: var(--alerte); border: 1px solid #FDE68A; margin-bottom: 16px; }
.notice.info { background: #EFF6FF; color: #1E3A8A; border-color: #BFDBFE; }
.notice.ok { background: var(--ok-fond); color: var(--ok); border-color: #A7F3D0; }
.notice.err { background: var(--erreur-fond); color: var(--erreur); border-color: #FECACA; }

.liste-voix { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.voix { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.voix h3 { margin: 0; }
.voix .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .9rem; color: var(--texte2); }
.voix p { margin: 0; color: var(--texte2); font-size: .98rem; }

/* ---------- Accueil ---------- */
.heros { min-height: min(80vh, 760px); display: grid; align-items: center; padding-block: 40px; background: linear-gradient(#fff, var(--fond-doux)); }
.heros .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.heros p.lead { font-size: 1.3rem; color: var(--texte2); max-width: 36em; }
.heros .illustration { background: #fff; border: 1px solid var(--bord); border-radius: 12px; padding: 12px; box-shadow: var(--ombre-haute); }
.chiffres { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 32px; color: var(--texte2); }
.chiffres strong { display: block; font-size: 1.8rem; color: var(--texte); line-height: 1.1; letter-spacing: -0.02em; }
@media (max-width: 860px) { .heros .wrap { grid-template-columns: 1fr; } .heros { min-height: 0; } }

.frise { list-style: none; margin: 0; padding: 0; counter-reset: etape; max-width: 640px; }
.frise li { position: relative; padding: 0 0 28px 64px; counter-increment: etape; font-size: 1.15rem; }
.frise li::before {
  content: counter(etape); position: absolute; left: 0; top: -4px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
.frise li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 44px; bottom: 6px; width: 2px; background: var(--bord-fort); }
.duo-section { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .duo-section { grid-template-columns: 1fr; } }
.grand-encart { background: #111827; color: #fff; border-radius: 12px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.grand-encart h2 { color: #fff; }
.grand-encart p { color: #D1D5DB; }
.grand-encart .btn-secondary { color: #fff; border-color: #6B7280; }
.grand-encart .btn-secondary:hover { border-color: #fff; }
.exemples { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.exemples li { padding: 6px 14px; border: 1.5px dashed #9CA3AF; border-radius: 9999px; color: #E5E7EB; font-size: .95rem; }
@media (max-width: 860px) { .grand-encart { grid-template-columns: 1fr; } }
.themes-grille { display: flex; flex-wrap: wrap; gap: 10px; }
.puce { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; min-height: 44px; border: 1px solid var(--bord-fort); border-radius: 9999px; background: #fff; color: var(--texte); text-decoration: none; font-weight: 500; font: inherit; cursor: pointer; }
.puce:hover { border-color: #9CA3AF; }
.puce[aria-pressed='true'], .puce.actif { background: #EFF6FF; border-color: var(--accent); color: var(--accent-fonce); font-weight: 600; }
.puce .point-theme { background: var(--c); }

footer.pied { border-top: 1px solid var(--bord); padding: 36px 0 28px; color: var(--texte2); font-size: .95rem; background: #fff; }
footer.pied .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.pied a { color: var(--texte2); }

/* ---------- Assistant « Raconter » ---------- */
.progres { display: flex; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.progres li { flex: 1; height: 6px; border-radius: 3px; background: var(--bord); }
.progres li.fait { background: var(--accent); }
.progres li.ici { background: var(--accent); opacity: .55; }
.etape-titre { color: var(--texte2); font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.tuiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin: 20px 0; }
.tuile {
  display: flex; align-items: center; gap: 14px; text-align: left; font: inherit; font-weight: 600; color: var(--texte); min-height: 76px; padding: 14px 18px;
  background: #fff; border: 1.5px solid var(--bord-fort); border-radius: var(--r); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.tuile:hover { border-color: var(--c, var(--accent)); box-shadow: var(--ombre-haute); }
.tuile[aria-pressed='true'] { border-color: var(--c, var(--accent)); background: #F8FAFF; box-shadow: 0 0 0 2px var(--c, var(--accent)); }
.tuile .point-theme { width: 16px; height: 16px; }
.tuile.libre { border-style: dashed; }
.bas-assistant { position: sticky; bottom: var(--onglets); background: linear-gradient(to top, #fff 70%, transparent); padding: 18px 0 14px; margin-top: 24px; display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; z-index: 5; }

.amorce { background: var(--fond-doux); border: 1px solid var(--bord); border-radius: var(--r); padding: 18px 20px; margin-bottom: 24px; }
.amorce p { font-size: 1.25rem; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.enregistreur { text-align: center; padding: 28px 16px; border: 1px solid var(--bord); border-radius: 12px; background: #fff; box-shadow: var(--ombre); }
.micro {
  width: 128px; height: 128px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; cursor: pointer; display: inline-grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(37,99,235,.14); transition: background .15s, box-shadow .15s;
}
.micro:hover { background: var(--accent-fonce); }
.micro svg { width: 56px; height: 56px; }
.micro.en-cours { background: #B91C1C; box-shadow: 0 0 0 10px rgba(185,28,28,.16); }
.micro.en-pause { background: #92400E; box-shadow: 0 0 0 10px rgba(146,64,14,.16); }
@media (prefers-reduced-motion: no-preference) {
  .micro.en-cours { animation: pouls 1.6s ease-in-out infinite; }
  @keyframes pouls { 50% { box-shadow: 0 0 0 20px rgba(185,28,28,.06); } }
}
.chrono { font-size: 2.6rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 16px 0 4px; }
.niveau { display: flex; gap: 4px; justify-content: center; align-items: flex-end; height: 40px; margin-bottom: 12px; }
.niveau i { width: 6px; background: var(--accent); border-radius: 3px; height: 4px; transition: height .08s; }
.etat-rec { font-weight: 600; margin-bottom: 14px; min-height: 1.6em; }
.enregistreur audio { width: 100%; margin: 14px 0; }
.ou { display: flex; align-items: center; gap: 14px; color: var(--discret); margin: 28px 0 18px; font-size: .95rem; }
.ou::before, .ou::after { content: ''; flex: 1; height: 1px; background: var(--bord); }

/* ---------- Sélecteur de lieux ---------- */
.carte-saisie { height: 360px; border: 1px solid var(--bord-fort); border-radius: var(--r); margin: 12px 0; z-index: 1; }
.resultats { list-style: none; margin: 8px 0; padding: 0; border: 1px solid var(--bord); border-radius: var(--r); overflow: hidden; }
.resultats li button { width: 100%; text-align: left; font: inherit; font-size: .98rem; padding: 12px 14px; min-height: 48px; background: #fff; border: 0; border-bottom: 1px solid var(--bord); cursor: pointer; }
.resultats li:last-child button { border-bottom: 0; }
.resultats li button:hover { background: var(--fond-doux); }
.fiche-lieu { border: 1px solid var(--accent); border-radius: var(--r); padding: 20px; background: #fff; margin: 16px 0; box-shadow: var(--ombre); }
.lieux-ajoutes { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.lieux-ajoutes li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--bord); border-radius: var(--r); background: #fff; flex-wrap: wrap; }
.lieux-ajoutes li > div { min-width: 0; }
details.plus { margin: 0 0 18px; border: 1px solid var(--bord); border-radius: var(--r); padding: 4px 16px; background: var(--fond-doux); }
details.plus > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
details.plus[open] > summary { margin-bottom: 10px; }

/* ---------- Carte publique ---------- */
body.page-carte { overflow: hidden; padding-bottom: 0; }
.carte-page { position: fixed; inset: var(--entete) 0 var(--onglets) 0; display: grid; grid-template-columns: 420px 1fr; }
.carte-page .panneau { overflow-y: auto; background: #fff; border-right: 1px solid var(--bord); padding: 18px 18px 40px; z-index: 5; }
.carte-page #carte { height: 100%; z-index: 1; background: #E5E7EB; }
.panneau .recherche { position: sticky; top: -18px; background: #fff; padding: 18px 0 10px; margin: -18px 0 8px; z-index: 3; }
.panneau h2 { font-size: 1.15rem; margin-bottom: 8px; }
.groupe-filtre { margin: 0 0 16px; }
.groupe-filtre > .etiquette { font-weight: 600; font-size: .95rem; margin-bottom: 8px; display: block; }
.groupe-filtre .themes-grille { gap: 6px; }
.groupe-filtre .puce { padding: 4px 12px; min-height: 40px; font-size: .92rem; }
.bascule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px dashed #7C3AED; border-radius: var(--r); background: #FAF5FF; cursor: pointer; margin-bottom: 16px; }
.bascule input { width: 22px; height: 22px; accent-color: #7C3AED; flex: none; margin-top: 2px; }
.bascule small { display: block; color: var(--texte2); }
.nb-resultats { color: var(--texte2); font-size: .95rem; margin: 8px 0 12px; }
.liste-compacte { display: grid; gap: 10px; }
.liste-compacte .carte-info { padding: 14px 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.liste-compacte h3 { font-size: 1.05rem; margin: 0 0 4px; }
.liste-compacte p { margin: 4px 0 0; font-size: .95rem; color: var(--texte2); }
.bouton-panneau { display: none; }
@media (max-width: 860px) {
  .carte-page { grid-template-columns: 1fr; }
  .carte-page .panneau {
    position: absolute; inset: auto 0 0 0; max-height: 72%; border-right: 0; border-top: 1px solid var(--bord); border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,.14); transform: translateY(100%); visibility: hidden;
  }
  .carte-page.ouvert .panneau { transform: none; visibility: visible; }
  .bouton-panneau { display: inline-flex; position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 6; box-shadow: var(--ombre-haute); }
  .carte-page.ouvert .bouton-panneau { display: none; }
  .poignee { display: flex !important; }
}
@media (prefers-reduced-motion: no-preference) { @media (max-width: 860px) { .carte-page .panneau { transition: transform .25s ease-out, visibility .25s; } } }
.poignee { display: none; justify-content: space-between; align-items: center; margin: -6px 0 6px; }

.pin { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.pin.fantome { background: #fff; border: 3px dashed var(--c); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); position: relative; }
.pin.fantome::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--c); opacity: .35; }
.grappe { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); color: var(--accent-fonce); font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); font-size: 1rem; }
.leaflet-popup-content { font-family: var(--police); font-size: 1rem; line-height: 1.45; margin: 14px 16px; min-width: 220px; }
.leaflet-popup-content h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.leaflet-popup-content p { margin: 0 0 8px; }
.legende { background: #fff; padding: 10px 14px; border-radius: var(--r); box-shadow: var(--ombre-haute); font-size: .85rem; line-height: 1.9; }
.legende .pin { display: inline-block; width: 16px; height: 16px; vertical-align: middle; margin-right: 6px; border-width: 2px; }
.legende .pin.fantome::after { inset: 2px; }

/* ---------- Fiche d'un souvenir ---------- */
.fiche h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.fiche .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.lecteur { background: var(--fond-doux); border: 1px solid var(--bord); border-radius: var(--r); padding: 16px; margin: 18px 0; }
.lecteur audio { width: 100%; }
.lecteur.verrou { border-color: var(--accent); background: #EFF6FF; }
.entete .compte { white-space: nowrap; }
.lieu-ligne { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--bord); }
.lieu-ligne:first-child { border-top: 0; }
.lieu-ligne .pin { width: 20px; height: 20px; margin-top: 4px; flex: none; border-width: 2px; }
.lieu-ligne .ancien { color: #5B21B6; font-weight: 600; font-size: .95rem; }
.recit { white-space: pre-wrap; max-width: 66ch; font-size: 1.1rem; line-height: 1.75; }
.voisins { display: grid; gap: 8px; margin-top: 12px; }
.voisins a { display: block; padding: 12px 14px; border: 1px solid var(--bord); border-radius: var(--r); text-decoration: none; color: inherit; background: #fff; }
.voisins a:hover { border-color: var(--bord-fort); box-shadow: var(--ombre); }
.carte-mini { height: 280px; border: 1px solid var(--bord); border-radius: var(--r); margin: 16px 0; z-index: 1; }

/* ---------- Territoire ---------- */
.fil { color: var(--texte2); font-size: .95rem; margin-bottom: 8px; }
.barres { display: grid; gap: 8px; max-width: 560px; }
.barre { display: grid; grid-template-columns: 170px 1fr 36px; gap: 10px; align-items: center; font-size: .95rem; }
.barre .rail { height: 12px; border-radius: 6px; background: #F3F4F6; overflow: hidden; }
.barre .rail i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--accent)); }
@media (max-width: 560px) { .barre { grid-template-columns: 120px 1fr 28px; } }
.perdus { display: grid; gap: 12px; }
.perdu { border: 1px solid var(--bord); border-left: 4px solid #7C3AED; border-radius: var(--r); padding: 16px 20px; background: #fff; }
.perdu.existe { border-left-color: var(--bord-fort); }
.perdu h3 { margin: 0 0 4px; }
.perdu .noms { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: .98rem; margin: 8px 0; }
.perdu .noms dt { color: var(--texte2); } .perdu .noms dd { margin: 0; font-weight: 600; }
table.dico { width: 100%; border-collapse: collapse; max-width: 760px; }
table.dico th, table.dico td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--bord); }
table.dico th { color: var(--texte2); font-size: .9rem; }

/* ---------- Espace auteur, administration ---------- */
.rangee { display: grid; gap: 12px; }
.souvenir { display: grid; gap: 10px; }
.souvenir h3 { margin: 0; }
.lien-prive { display: flex; gap: 8px; flex-wrap: wrap; }
.lien-prive input { flex: 1; min-width: 200px; }
.onglets-admin { display: flex; gap: 4px; border-bottom: 1px solid var(--bord); margin-bottom: 24px; flex-wrap: wrap; }
.onglets-admin button { padding: 12px 18px; font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--texte2); cursor: pointer; min-height: 48px; border-bottom: 3px solid transparent; }
.onglets-admin button[aria-selected='true'] { color: var(--texte); border-bottom-color: var(--accent); }
.edition { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.edition iframe { width: 100%; height: 78vh; border: 1px solid var(--bord-fort); border-radius: var(--r); background: #fff; position: sticky; top: calc(var(--entete) + 12px); }
@media (max-width: 1000px) { .edition { grid-template-columns: 1fr; } .edition iframe { height: 60vh; position: static; } }
.palette { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.palette input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1px solid var(--bord-fort); border-radius: var(--r); background: #fff; cursor: pointer; }

/* ---------- Divers ---------- */
.toast-zone { position: fixed; z-index: 3000; left: 50%; transform: translateX(-50%); bottom: calc(var(--onglets) + 16px); display: grid; gap: 8px; width: min(560px, 100% - 32px); pointer-events: none; }
.toast { pointer-events: auto; padding: 14px 18px; border-radius: var(--r); background: #111827; color: #fff; box-shadow: var(--ombre-haute); font-weight: 500; }
.toast.err { background: #991B1B; }
.toast.ok { background: #065F46; }
.modal-fond { position: fixed; inset: 0; z-index: 2500; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 24px; width: min(520px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.modal h2 { font-size: 1.4rem; }
.chargement { color: var(--texte2); padding: 32px 0; text-align: center; }
.vide { text-align: center; padding: 40px 16px; color: var(--texte2); border: 1.5px dashed var(--bord-fort); border-radius: var(--r); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .entete, .onglets, .bas-assistant, footer.pied { display: none; } }
