/*
 * L'app Carnet Catalan — au style du site (carnet-catalan-pro/style.css :root, relevé le 2026-09-28) :
 * papier et encre, or pour les repères, bleu marine pour l'action principale, teal réservé au vivant.
 * Sombre = l'assistant (comme le rail du chat du site), clair = le magazine.
 */
:root {
    --papier: #F9F8F6;
    --encre: #14201C;
    --encre-2: #1B2A25;
    --encre-bord: #3A4A44;
    --texte-2: #5B5646;
    --texte-3: #746C5A; /* 4,9:1 sur papier (WCAG AA) ; #7A7260 était à 4,49 */
    --clair-sur-encre: #E7E3D8;
    --gris-sur-encre: #8E9892;
    --or: #C89445;
    --or-clair: #E3B563;
    --or-texte: #946A20; /* or lisible en petit texte : 4,6:1 sur papier ; #B8862F n'était qu'à 3:1 */
    --creme: #F6EEDD;
    --marine: #385A70;
    --teal: #4FA8C9;
    --teal-fonce: #1F7299; /* 5:1 sur papier ; #2A8FB8 n'était qu'à 3,5:1 */
    --bord: #E3DCC8;

    --titres: 'Merriweather', Georgia, serif;
    --textes: 'Inter', system-ui, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;

    --h-entete: calc(56px + env(safe-area-inset-top));
    --h-pastilles: 46px;
    --h-onglets: calc(60px + env(safe-area-inset-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--papier); }
body { font-family: var(--textes); font-size: 15px; line-height: 1.55; color: var(--encre); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }

.app { position: fixed; inset: 0; overflow: hidden; }

/* ── En-tête : le mot-symbole du site, souligné d'or ─────────────────────────────────────────────── */
.entete {
    position: absolute; left: 0; right: 0; top: 0; height: var(--h-entete); z-index: 1001;
    padding: env(safe-area-inset-top) 16px 0 16px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--papier);
}
.logo { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: var(--encre); }
.logo-nom { font-family: var(--titres); font-size: 21px; line-height: 1.1; align-self: flex-start; }
.logo-filet { width: 84%; height: 1.5px; background: var(--or); margin-top: 3px; }
.logo-tag { font-family: var(--mono); font-size: 5.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.entete-droite { display: flex; align-items: center; gap: 12px; }
.tout-le-66 { border: 0; background: none; padding: 10px 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-texte); }
.avatar {
    width: 34px; height: 34px; border-radius: 17px; background: #ECE8DF; color: var(--encre);
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; font-size: 13px;
}

/* ── Pastilles des envies ────────────────────────────────────────────────────────────────────────── */
.pastilles {
    position: absolute; left: 0; right: 0; top: var(--h-entete); height: var(--h-pastilles); z-index: 1001;
    display: flex; gap: 6px; padding: 2px 16px 0 16px; overflow-x: auto; scrollbar-width: none;
    background: var(--papier); border-bottom: 1px solid var(--bord);
}
.pastilles::-webkit-scrollbar { display: none; }
.pastille {
    flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: 3px; border: 1px solid var(--bord); background: #fff;
    font-family: var(--mono); font-size: 11.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.pastille.est-active { background: var(--encre); color: var(--papier); border-color: var(--encre); }

/* ── Carte ───────────────────────────────────────────────────────────────────────────────────────── */
.carte { position: absolute; left: 0; right: 0; top: calc(var(--h-entete) + var(--h-pastilles)); bottom: var(--h-onglets); background: #EEEAE0; z-index: 1; }
.leaflet-container { font-family: var(--textes); background: #EEEAE0; }
.leaflet-control-attribution { font-family: var(--mono); font-size: 8.5px !important; background: rgba(249, 248, 246, 0.8) !important; }
.leaflet-tooltip.etiquette {
    background: transparent; border: 0; box-shadow: none; padding: 0;
    font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre);
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff;
    transition: opacity 0.3s;
}
.leaflet-tooltip.etiquette::before { display: none; }
.carte.zoom-faible .leaflet-tooltip.etiquette { font-size: 8px; letter-spacing: 0.02em; }
.carte.secteur-actif .leaflet-tooltip.etiquette:not(.est-actif) { opacity: 0; }
.marqueur-conteneur { background: none; border: 0; }
.marqueur {
    width: 28px; height: 28px; border-radius: 14px; border: 2px solid #fff; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 12px; font-weight: 600; box-shadow: 0 2px 6px rgba(20, 32, 28, 0.35);
    transition: transform 0.2s;
}
.marqueur-conteneur.est-surligne { z-index: 1000 !important; }
.marqueur-conteneur.est-surligne .marqueur { transform: scale(1.3); }

/* ── Panneau ─────────────────────────────────────────────────────────────────────────────────────── */
.panneau {
    position: absolute; left: 0; right: 0; bottom: var(--h-onglets); height: 50%; z-index: 1000;
    display: flex; flex-direction: column;
    background: var(--papier); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(20, 32, 28, 0.16);
    transition: height 0.32s cubic-bezier(.2, .7, .2, 1), background-color 0.2s;
}
.panneau.glisse { transition: none; }
.panneau.sombre { background: var(--encre); color: var(--clair-sur-encre); }
.panneau-poignee { flex-shrink: 0; height: 22px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.panneau-poignee span { width: 40px; height: 4px; border-radius: 2px; background: #D0C7AF; }
.panneau.sombre .panneau-poignee span { background: var(--encre-bord); }
.panneau-corps { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 18px 16px; }

.kicker { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--or-texte); }
.cle { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-3); }
.titre-section { font-family: var(--titres); font-size: 21px; font-weight: 700; margin: 2px 0 0 0; text-align: center; }
.filet { display: block; width: 40px; height: 2px; background: var(--or); margin: 8px auto 14px auto; }
.attente, .vide, .indice, .mention { font-size: 12.5px; color: var(--texte-2); }
.indice { text-align: center; font-family: var(--mono); font-size: 10.5px; color: var(--texte-3); margin: 12px 0 0 0; }
.mention { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texte-3); margin: 4px 0 0 0; }

.p-entete { display: flex; align-items: center; gap: 10px; padding: 0 0 12px 0; }
.p-entete-textes { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.p-titre { font-family: var(--titres); font-size: 20px; font-weight: 700; line-height: 1.25; margin: 1px 0 0 0; }
.p-sous-titre { font-family: var(--mono); font-size: 10.5px; color: var(--texte-3); margin-top: 2px; }
.retour {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--bord); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; color: var(--encre); padding: 0;
}
.retour-sombre { background: transparent; border-color: var(--encre-bord); color: var(--clair-sur-encre); }
.p-bloc { display: flex; flex-direction: column; gap: 12px; }
.p-bloc > .kicker { margin-top: 6px; }

/* Tuiles « Que cherchez-vous ? » — celles de l'accueil du site */
.tuiles { display: grid; gap: 7px; }
.tuiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tuiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tuile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-height: 84px; padding: 10px 4px; border: 1px solid var(--bord); border-radius: 4px; background: #fff;
}
.tuile-ic { width: 36px; height: 36px; border-radius: 18px; background: var(--creme); color: var(--or); display: inline-flex; align-items: center; justify-content: center; }
.tuile-t { font-family: var(--titres); font-weight: 700; font-size: 9.5px; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; line-height: 1.3; }
.tuile:active { background: var(--creme); }

/* Secteur */
.meteo { display: flex; gap: 1px; background: var(--bord); border: 1px solid var(--bord); border-radius: 4px; overflow: hidden; }
.meteo-case { flex: 1; min-width: 0; background: #fff; padding: 8px 10px; display: flex; flex-direction: column; }
.meteo-val { font-family: var(--mono); font-size: 13px; }
.conseil { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 4px; background: #EAF3F8; font-size: 13px; line-height: 1.5; }
.conseil-marque { color: #1D5C74; flex-shrink: 0; margin-top: 1px; }
.lien-envie { border: 0; background: none; padding: 0; font-family: var(--mono); font-size: 11px; color: var(--marine); text-decoration: underline; text-underline-offset: 3px; }
.portrait { font-family: var(--titres); font-size: 14px; line-height: 1.75; color: #2A332F; }
.portrait p { margin: 0 0 10px 0; }
.pastilles-bloc { display: flex; flex-wrap: wrap; gap: 6px; }
.pitch { font-family: var(--titres); font-size: 14.5px; line-height: 1.7; color: #2A332F; margin: 0; }

/* Suggestions : la console du rail du site */
.suggestions { display: flex; flex-direction: column; gap: 6px; }
.suggestion {
    text-align: left; padding: 11px 12px; border-radius: 2px; border: 1px solid var(--encre-bord); background: var(--encre);
    color: var(--clair-sur-encre); font-family: var(--mono); font-size: 12px; line-height: 1.4;
}
.suggestion span { color: var(--teal); }

/* ── Réponse (panneau sombre) ────────────────────────────────────────────────────────────────────── */
.p-entete-sombre { position: sticky; top: 0; z-index: 2; background: var(--encre); margin: 0 -16px; padding: 0 16px 12px 16px; }
.assistant-nom { font-family: var(--titres); font-weight: 700; font-size: 14px; color: var(--papier); }
.assistant-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.nouvelle { border: 1px solid var(--encre-bord); background: transparent; color: var(--or-clair); border-radius: 2px; padding: 7px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.fil { display: flex; flex-direction: column; gap: 18px; }
.fil-vide { font-family: var(--titres); font-size: 14px; line-height: 1.7; color: var(--clair-sur-encre); margin: 0; }
.tour { display: flex; flex-direction: column; gap: 12px; }
.tour-question {
    align-self: flex-end; max-width: 86%; margin: 0; padding: 9px 12px; border: 1px solid var(--encre-bord); border-radius: 2px;
    font-family: var(--mono); font-size: 12.5px; line-height: 1.45; color: var(--or-clair);
}
.tour-attente { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--gris-sur-encre); }
.points-attente i { display: inline-block; width: 4px; height: 4px; margin-left: 4px; border-radius: 2px; background: var(--teal); animation: clignote 1.2s infinite; }
.points-attente i:nth-child(2) { animation-delay: 0.2s; }
.points-attente i:nth-child(3) { animation-delay: 0.4s; }
@keyframes clignote { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .points-attente i { animation: none; opacity: 0.8; } .panneau { transition: none; } }
.tour-reponse { font-family: var(--titres); font-size: 14px; line-height: 1.75; color: var(--clair-sur-encre); }
.tour-reponse p { margin: 0 0 10px 0; }
.tour-reponse ul { margin: 0 0 10px 0; padding-left: 18px; }
.tour-reponse strong { color: #fff; }
.tour-reponse a { color: var(--or-clair); text-underline-offset: 3px; }
.tour-erreur { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--clair-sur-encre); }
.tour-erreur p { margin: 0; }
.relance { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.relance p { width: 100%; margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--or-clair); }
.relance-option { border: 1px solid var(--encre-bord); background: var(--encre-2); color: var(--clair-sur-encre); border-radius: 3px; padding: 7px 10px; font-family: var(--mono); font-size: 11.5px; }
.relance-option small { color: var(--gris-sur-encre); margin-left: 3px; }

/* Outils (carte, fiche) : des cartons clairs dans le fil sombre — la donnée du magazine */
.outil { background: var(--papier); color: var(--encre); border-radius: 4px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.outil-carte:not(.est-active) { opacity: 0.75; }
.outil-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.outil-compte { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-fonce); white-space: nowrap; }
.liste-points { list-style: none; margin: 0; padding: 0; }
.liste-points li { display: flex; align-items: flex-start; gap: 6px; border-bottom: 1px solid var(--bord); }
.liste-points li:last-child { border-bottom: 0; }
.ligne-point { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 0; background: none; padding: 10px 0; border-radius: 3px; transition: background-color 0.3s; }
.ligne-point.est-surligne { background: var(--creme); }
.num { width: 22px; height: 22px; border-radius: 11px; color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.ligne-textes { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ligne-nom { font-family: var(--titres); font-size: 14px; font-weight: 700; line-height: 1.35; }
.ligne-sous { font-family: var(--mono); font-size: 10.5px; color: var(--texte-2); }
.ligne-lien { flex-shrink: 0; padding: 11px 0 0 4px; font-family: var(--mono); font-size: 10.5px; color: var(--marine); text-decoration: none; }
.fiche-photo { margin: -12px -12px 4px -12px; }
.fiche-photo img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 4px 4px 0 0; }
.fiche-photo figcaption { font-family: var(--mono); font-size: 9.5px; color: var(--texte-3); padding: 4px 12px 0 12px; }
.fiche-nom { font-family: var(--titres); font-size: 18px; font-weight: 700; line-height: 1.3; }
.fiche-lignes { margin: 0; border-top: 1px solid var(--bord); }
.fiche-lignes div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bord); font-size: 12.5px; }
.fiche-lignes dt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-3); padding-top: 2px; }
.fiche-lignes dd { margin: 0; text-align: right; }
.fiche-lignes a { color: var(--marine); }
.fiche-lien { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--marine); text-decoration: none; }
.sources ul { list-style: none; margin: 6px 0 0 0; padding: 0; }
.sources li { padding: 6px 0; border-bottom: 1px solid var(--encre-bord); }
.sources a { font-family: var(--titres); font-size: 13px; color: var(--clair-sur-encre); text-decoration: none; }

.bouton-or {
    display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px;
    border: 1px solid var(--or); border-radius: 2px; background: transparent; color: var(--or-texte); text-decoration: none;
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
}
.panneau.sombre .bouton-or { color: var(--or-clair); border-color: var(--or-clair); }

/* ── Barre de question : la console du site ──────────────────────────────────────────────────────── */
.question { flex-shrink: 0; position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px 12px 14px; background: var(--encre); }
.question-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.question-chevron { position: absolute; left: 27px; font-family: var(--mono); color: var(--teal); font-size: 14px; pointer-events: none; }
.question input {
    flex: 1; min-width: 0; height: 44px; padding: 0 12px 0 28px; border-radius: 2px; border: 1px solid var(--encre-bord); background: var(--encre-2);
    color: var(--papier); font-family: var(--mono); font-size: 16px; /* 16 px : pas de zoom automatique sur iOS */
}
.question input::placeholder { color: var(--gris-sur-encre); font-size: 13px; }
.question input:focus { outline: none; border-color: var(--or); }
.question-envoyer { width: 44px; height: 44px; border: 1px solid var(--encre-bord); border-radius: 2px; background: transparent; color: var(--or-clair); display: inline-flex; align-items: center; justify-content: center; padding: 0; }

/* ── Mon carnet ──────────────────────────────────────────────────────────────────────────────────── */
.carnet { position: absolute; left: 0; right: 0; top: calc(var(--h-entete) + var(--h-pastilles)); bottom: var(--h-onglets); overflow-y: auto; padding: 22px 16px 24px 16px; background: var(--papier); z-index: 1000; }
.carnet-tete .titre-section { text-align: left; font-size: 24px; }
.carnet-tete .filet { margin: 8px 0 18px 0; }
.carnet-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; align-items: flex-start; }
.liste-carnet { list-style: none; margin: 0; padding: 0; width: 100%; }
.ligne-carnet { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--bord); background: none; padding: 12px 0; }
.ligne-carnet .ligne-textes { flex: 1; }
.reprendre { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--marine); white-space: nowrap; }
.carnet-bientot { font-size: 12.5px; color: var(--texte-2); line-height: 1.55; padding: 12px; border: 1px dashed #D0C7AF; border-radius: 4px; margin: 0; }

/* ── Onglets ─────────────────────────────────────────────────────────────────────────────────────── */
.onglets { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h-onglets); z-index: 1002; display: flex; padding-bottom: env(safe-area-inset-bottom); background: var(--papier); border-top: 1px solid var(--bord); }
.onglet { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--texte-3); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.onglet[aria-current] { color: var(--encre); box-shadow: inset 0 2px 0 var(--or); }

/* ── Bandeau (hors ligne, session) ───────────────────────────────────────────────────────────────── */
.bandeau {
    position: absolute; left: 12px; right: 12px; top: calc(var(--h-entete) + var(--h-pastilles) + 10px); z-index: 1003;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 4px;
    background: var(--encre); color: var(--clair-sur-encre); font-size: 12.5px; box-shadow: 0 4px 16px rgba(20, 32, 28, 0.25);
}
.bandeau .bouton-or { min-height: 34px; color: var(--or-clair); border-color: var(--or-clair); }

/* ── Grand écran : le panneau devient une colonne à gauche ───────────────────────────────────────── */
@media (min-width: 960px) {
    .panneau { top: calc(var(--h-entete) + var(--h-pastilles)); bottom: var(--h-onglets); right: auto; width: 420px; height: auto !important; border-radius: 0; box-shadow: 1px 0 0 var(--bord); }
    .panneau-poignee { display: none; }
    .panneau-corps { padding-top: 16px; }
    .p-entete-sombre { padding-top: 4px; }
    .carnet { left: 0; right: auto; width: 520px; box-shadow: 1px 0 0 var(--bord); }
}

/* ── Fiche (phase 2) : bandeau sombre comme les pages d'espace du site, puis le détail sur papier ───── */
.panneau-fiche .panneau-poignee { background: var(--encre); border-radius: 14px 14px 0 0; }
.panneau-fiche .panneau-poignee span { background: var(--encre-bord); }
.bandeau-fiche { background: var(--encre); color: var(--clair-sur-encre); margin: 0 -16px; padding: 0 16px 18px 16px; display: flex; flex-direction: column; gap: 8px; }
.bandeau-fiche .p-entete { padding-bottom: 4px; }
.kicker-clair { color: var(--or-clair); }
.attente-sombre { color: var(--gris-sur-encre); margin: 6px 0 0 0; }
.bandeau-date { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-clair); }
.bandeau-nom { font-family: var(--titres); font-size: 23px; font-weight: 700; line-height: 1.25; color: var(--papier); margin: 0; }
.bandeau-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-mh { font-family: var(--mono); font-size: 10.5px; color: var(--or-clair); border: 1px solid var(--or-clair); border-radius: 2px; padding: 2px 6px; }
.badge-statut { font-family: var(--mono); font-size: 10.5px; color: #F2B8A8; border: 1px solid #B2403A; border-radius: 2px; padding: 2px 6px; }
.bandeau-chiffres { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--clair-sur-encre); }
.fiche-photo-grande { margin: 0 -16px; }
.fiche-photo-grande img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.fiche-photo-grande figcaption { font-family: var(--mono); font-size: 9.5px; color: var(--texte-3); padding: 4px 16px 0 16px; }
.fiche-photo-grande figcaption a { color: inherit; }
.fiche-corps { padding-top: 14px; }
.actions { display: flex; gap: 6px; }
.action {
    flex: 1; min-width: 0; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    padding: 8px 2px; border: 1px solid var(--bord); border-radius: 4px; background: #fff; color: var(--encre); text-decoration: none;
    font-size: 11.5px; font-weight: 500;
}
.action.est-active { background: #FBF3E4; border-color: var(--or); color: #6B4A12; }
.fiche-horaires { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.fiche-horaires .mono { font-family: var(--mono); font-size: 12.5px; }
.fiche-horaires summary { font-family: var(--mono); font-size: 11px; color: var(--marine); cursor: pointer; margin-top: 4px; }
.fiche-horaires ul { list-style: none; margin: 6px 0 0 0; padding: 0; font-family: var(--mono); font-size: 11.5px; color: var(--texte-2); }
.etiquette-fiche { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: 3px; background: #EFE9DA; }
.fiche-texte { font-family: var(--titres); font-size: 14px; line-height: 1.75; color: #2A332F; }
.fiche-texte p { margin: 0 0 10px 0; }
.fiche-texte-merimee { border-left: 0; padding: 12px; background: var(--creme); border-radius: 4px; }
.fiche-texte-titre { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #6B4A12; }
.fiche-source { font-family: var(--textes); font-size: 11.5px; line-height: 1.5; color: var(--texte-3); margin: 0; }
.fiche-source a { color: var(--marine); }
.fiche-date { margin: 0; font-family: var(--mono); font-size: 15px; color: var(--or-texte); }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chiffre { padding: 8px 10px; border: 1px solid var(--bord); border-radius: 4px; background: #fff; display: flex; flex-direction: column; min-width: 0; }
.chiffre-val { font-family: var(--mono); font-size: 14px; }
button.ligne-lien, button.fiche-lien { border: 0; background: none; cursor: pointer; text-align: left; padding-left: 4px; }
button.fiche-lien { padding: 0; }
.fiche-corps > .fiche-lien { margin-top: 4px; }

/* ── Carnet : compte, à venir, gardés ────────────────────────────────────────────────────────────── */
.carnet-compte { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin-bottom: 22px; border: 1px solid var(--bord); border-radius: 4px; background: #fff; }
.compte-nom { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--titres); font-size: 16px; font-weight: 700; }
.form-compte { display: flex; flex-direction: column; gap: 10px; }
.form-compte label { display: flex; flex-direction: column; gap: 4px; }
.form-compte input { height: 44px; padding: 0 12px; border: 1px solid var(--bord); border-radius: 3px; background: var(--papier); font-family: var(--textes); font-size: 16px; color: var(--encre); }
.form-compte input:focus { outline: none; border-color: var(--or); }
.form-erreur { margin: 0; min-height: 1em; font-size: 12.5px; color: #B2403A; }
.bouton-principal { min-height: 46px; border: 0; border-radius: 4px; background: var(--marine); color: var(--papier); font-weight: 600; font-size: 14.5px; }
.bouton-principal:disabled { opacity: 0.6; }
.lien-discret { align-self: flex-start; border: 0; background: none; padding: 4px 0; font-family: var(--mono); font-size: 11px; color: var(--marine); text-decoration: underline; text-underline-offset: 3px; }
.date-carnet { width: 52px; flex-shrink: 0; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--or-texte); text-transform: uppercase; }

/* ── Listes des envies (phase 3) : les filtres des explorateurs du site, en pastilles ────────────── */
.filtre { display: flex; flex-direction: column; gap: 5px; }
.filtre-options { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px 16px; }
.filtre-options::-webkit-scrollbar { display: none; }
.pastille-filtre { height: 30px; font-size: 11px; padding: 0 10px; }
.pastille-filtre small { font-size: 10px; color: var(--texte-3); }
.pastille-filtre.est-active small { color: var(--gris-sur-encre); }
.point { display: inline-block; width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.compte-liste { margin: 2px 0 0 0; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-fonce); }
.liste-lieux .ligne-carnet { align-items: flex-start; }
.point-liste { width: 12px; height: 12px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--bord); flex-shrink: 0; margin-top: 4px; }
.badge-mh-clair { font-family: var(--mono); font-size: 9.5px; color: #8A6424; border: 1px solid var(--or); border-radius: 2px; padding: 0 4px; margin-left: 4px; white-space: nowrap; }
a.ligne-carnet { color: inherit; text-decoration: none; }
.leaflet-tooltip.bulle-lieu { font-family: var(--titres); font-size: 12px; font-weight: 700; border-radius: 3px; border: 0; box-shadow: 0 2px 8px rgba(20, 32, 28, 0.25); }

/* ── Agenda (phase 4) ────────────────────────────────────────────────────────────────────────────── */
.periodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--encre); border-radius: 3px; overflow: hidden; }
.periode { height: 36px; border: 0; border-left: 1px solid var(--bord); background: #fff; font-family: var(--mono); font-size: 11px; }
.periode:first-child { border-left: 0; }
.periode.est-active { background: var(--encre); color: var(--papier); }
.dates { display: flex; gap: 8px; }
.dates label { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dates input { height: 40px; padding: 0 8px; border: 1px solid var(--bord); border-radius: 3px; background: #fff; font-family: var(--mono); font-size: 14px; color: var(--encre); }
.jour-agenda { margin: 10px 0 0 0; padding-bottom: 4px; border-bottom: 1px solid var(--or); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--or-texte); }
.entete-bloc { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; }
.ligne-evenement .date-carnet { width: auto; min-width: 52px; white-space: nowrap; }
/* Agenda : l'heure en tête de ligne quand la source la donne, sinon la pastille de couleur du genre. */
.heure-agenda { width: 44px; flex-shrink: 0; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--or-texte); padding-top: 2px; }
.date-carnet small { display: block; font-size: 10px; font-weight: 500; text-transform: none; opacity: .8; }

/* ── Terrain (phase 5) : emporter une rando, se situer sur le tracé ─────────────────────────────── */
.terrain { display: flex; flex-direction: column; gap: 10px; }
.bouton-emporter { display: flex; align-items: center; justify-content: center; gap: 10px; }
.terrain-note { margin: -4px 0 0 0; text-align: center; font-size: 11.5px; color: var(--texte-2); }
.terrain-pret { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 12px; border: 1px solid var(--marine); border-radius: 4px; background: #fff; font-size: 13px; color: var(--marine); }
.terrain-progres { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 4px; background: #EFE9DA; }
.terrain-progres .mono { font-family: var(--mono); font-size: 12px; }
.barre { display: block; height: 4px; background: #D9D0B8; border-radius: 2px; overflow: hidden; }
.barre i { display: block; height: 4px; width: 0; background: var(--marine); transition: width 0.2s; }
.bouton-gps { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--teal-fonce); border-radius: 4px; background: #fff; color: #1D5C74; font-weight: 500; font-size: 13.5px; }
.bouton-gps.est-actif { background: #1D5C74; color: #fff; }
.gps-etat { margin: -4px 0 0 0; min-height: 1em; text-align: center; font-family: var(--mono); font-size: 12px; color: #1D5C74; }
.ligne-terrain { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--bord); }
.ligne-terrain .ligne-carnet { border-bottom: 0; flex: 1; min-width: 0; }
.ligne-terrain .lien-discret { flex-shrink: 0; }
.terrain-coche { width: 22px; height: 22px; border-radius: 11px; background: var(--marine); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Installation (phase 6) ──────────────────────────────────────────────────────────────────────── */
.encart-installer { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px 0; padding: 12px 14px; border-radius: 4px; background: var(--creme); border: 1px solid #E3CFA6; }
.encart-installer p { margin: 0; font-size: 13px; line-height: 1.5; }
.encart-actions { display: flex; align-items: center; gap: 14px; }
.encart-actions .bouton-principal { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.etapes { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; line-height: 1.55; }
.etapes li::marker { font-family: var(--mono); font-weight: 600; color: var(--or-texte); }
.icone-inline { vertical-align: -3px; color: #0A66D1; }
.rappels { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 12px 14px; border-radius: 4px; background: var(--creme); border: 1px solid #E3CFA6; }
.rappels p { margin: 0; font-size: 13px; line-height: 1.5; }
.rappels .bouton-or { min-height: 38px; background: #fff; }
.ligne-installer { border: 1px solid var(--bord) !important; border-radius: 4px; padding: 12px !important; margin: -8px 0 22px 0; background: #fff; }

.p-titre:focus, .bandeau-nom:focus, .titre-section:focus { outline: none; }

/* Le calque des points ne prend les clics que quand une liste est affichée ; les zones des secteurs, elles, les
   laissent alors passer (cf. carte.secteursCliquables). */
.leaflet-lieux-pane canvas { pointer-events: none; }
.carte.secteurs-inertes .leaflet-lieux-pane canvas { pointer-events: auto; }
.carte.secteurs-inertes .leaflet-overlay-pane path.zone-secteur { pointer-events: none; }
