/* Design de Mouette : la piste B « Escale » (maquettes « Mouette – 2 pistes de refonte », 24/11/2026), clair et sombre.
   Clair : fond sable, cartes blanches très arrondies, encre #1a2233 pour le texte et les cartes fortes, mandarine #ff7a45 pour l'action principale (texte encre dessus : 6,2:1).
   Sombre : bleu nuit #111723, mandarine #ff8a5b. Les groupes gardent leur couleur, en tuiles teintées.
   Les noms des variables (--bg, --surface, --text, --muted, --border, --primary…) sont ceux d'avant : les pages d'administration en profitent sans changement ; `--sun` (ancien jaune) vaut la mandarine.
   Polices : Bricolage Grotesque (titres) et Figtree (texte), fichiers .woff2 servis par l'application (`assets/fonts/`, licence OFL, précachés par le service worker : aucune requête vers un tiers) ;
   JetBrains Mono (chiffres) si l'appareil l'a. */

@font-face { font-family: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/bricolage-grotesque-latin-opsz-normal-k0HXNf5.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("../fonts/bricolage-grotesque-latin-ext-opsz-normal-HOPDPv1.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; }
@font-face { font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("../fonts/figtree-latin-wght-normal-Dj9csJy.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900; src: url("../fonts/figtree-latin-ext-wght-normal-iZEjIKs.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 {
    --bg: #f4f1ea;
    --surface: #ffffff;
    --surface-2: #eee9df;
    --text: #1a2233;
    --muted: #5b6474;
    --border: #e3dccd;
    --field-border: #8f8878;   /* bord des champs, étoiles éteintes, pastilles de couleur : 3,5:1 au moins sur les fonds clairs (WCAG 1.4.11, US-H2b) ; --border est un simple filet */
    --primary: #ff7a45;
    --primary-ink: #b4441a;   /* mandarine lisible en texte sur fond clair (la mandarine pleine ne l'est pas) : 7:1 sur le sable */
    --primary-text: #1a2233;  /* texte posé SUR la mandarine */
    --danger: #b42318;
    --warn-bg: #ffefc9;
    --warn-text: #6e4300;
    --ok-bg: #ddf1e2;
    --ok-text: #1a5e35;
    --danger-bg: #fee2e2;
    --danger-text: #7f1d1d;
    --star: #b45309;
    --star-fill: #c26a06;      /* étoile pleine : 3,4 à 3,9:1 sur les fonds clairs */
    --panel: rgba(255, 255, 255, .96);
    --shadow: 0 12px 32px rgba(26, 34, 51, .14), 0 2px 8px rgba(26, 34, 51, .06);
    --shadow-sm: 0 4px 14px rgba(26, 34, 51, .12);
    --radius: 24px;
    --radius-sm: 16px;
    --font-sans: "Figtree Variable", "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Bricolage Grotesque Variable", "Bricolage Grotesque", "Figtree Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --ink: #1a2233;
    --on-ink: #ffffff;
    --sun: #ff7a45;
    --on-sun: #1a2233;
    --coral: #ff8a6b;
    --mint: #35c98b;
    --lilac: #b79cff;
    --nav-bg: #1a2233;       /* barre de vues mobile : pastille encre, onglet actif mandarine (texte encre : 6,2:1) */
    --nav-text: #c4cbd8;
    --nav-on-bg: #ff7a45;
    --nav-on-text: #1a2233;
    --seg-bg: #eee9df;       /* sélecteur Liste · Mixte · Carte */
    --seg-text: #3d4657;
    --seg-on-bg: #1a2233;
    --seg-on-text: #ffffff;
    color-scheme: light;
}

/* Sombre : celui de l'appareil, sauf choix contraire du bouton d'apparence (`data-theme` sur <html>, contrôleur `theme`). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111723;
        --surface: #1a2232;
        --surface-2: #243046;
        --text: #f2f4f8;
        --muted: #a6b0c2;
        --border: #2c3850;
        --field-border: #6b7690;
        --primary: #ff8a5b;
        --primary-ink: #ffa47f;
        --primary-text: #1a2233;
        --danger: #ff8a80;
        --warn-bg: #3a2c10;
        --warn-text: #fbd98a;
        --ok-bg: #173226;
        --ok-text: #9be2b1;
        --danger-bg: #450a0a;
        --danger-text: #fecaca;
        --star: #fbbf24;
        --star-fill: #fbbf24;
        --panel: rgba(26, 34, 50, .96);
        --shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .05);
        --shadow-sm: 0 4px 14px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .05);
        --nav-bg: #2a3651;
        --nav-text: #b5bfd1;
        --nav-on-bg: #ff8a5b;
        --nav-on-text: #1a2233;
        --seg-bg: #1a2232;
        --seg-text: #c4cbd8;
        --seg-on-bg: #ff8a5b;
        --seg-on-text: #1a2233;
        --ink: #232e44;
        --on-ink: #f2f4f8;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #111723;
    --surface: #1a2232;
    --surface-2: #243046;
    --text: #f2f4f8;
    --muted: #a6b0c2;
    --border: #2c3850;
    --field-border: #6b7690;
    --primary: #ff8a5b;
    --primary-ink: #ffa47f;
    --primary-text: #1a2233;
    --danger: #ff8a80;
    --warn-bg: #3a2c10;
    --warn-text: #fbd98a;
    --ok-bg: #173226;
    --ok-text: #9be2b1;
    --danger-bg: #450a0a;
    --danger-text: #fecaca;
    --star: #fbbf24;
    --star-fill: #fbbf24;
    --panel: rgba(26, 34, 50, .96);
    --shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .05);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, .4), 0 0 0 1px rgba(255, 255, 255, .05);
    --nav-bg: #2a3651;
    --nav-text: #b5bfd1;
    --nav-on-bg: #ff8a5b;
    --nav-on-text: #1a2233;
    --seg-bg: #1a2232;
    --seg-text: #c4cbd8;
    --seg-on-bg: #ff8a5b;
    --seg-on-text: #1a2233;
    --ink: #232e44;
    --on-ink: #f2f4f8;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}
body:has(.shell) { overflow: hidden; }

a { color: var(--primary-ink); }
code { font-family: var(--font-mono); font-size: .9em; word-break: break-all; }
h1, h2, h3 { line-height: 1.25; margin: 0; font-family: var(--font-display); letter-spacing: -.01em; }

/* ===== Éléments communs : pastilles flottantes, boutons ronds, avatar ===== */
.brand-chip {
    display: inline-flex; align-items: center; gap: .6rem; min-height: 3rem; padding: .25rem 1rem .25rem .4rem;
    background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px);
    color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none;
}
.brand-chip img { border-radius: 9px; }
.tools { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .3rem; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.icon-btn {
    display: inline-grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: var(--text); font: inherit; list-style: none; text-decoration: none; cursor: pointer;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn--solid { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.icon-btn--solid:hover { background: var(--surface); }
.icon-btn--sm { margin-block: -.4rem; }
.avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--surface-2); color: var(--text); font-family: var(--font-display); font-weight: 700; text-decoration: none; }
.theme-ico { display: grid; place-items: center; }
.theme-ico--moon, [data-theme="dark"] .theme-ico--sun { display: none; }
[data-theme="dark"] .theme-ico--moon { display: grid; }
.ico { flex: none; }

/* ===== Pages classiques (administration, formulaires, compte) ===== */
.appbar { position: static; z-index: 10; padding-top: env(safe-area-inset-top, 0); }
@media (min-width: 40rem) { .appbar { position: sticky; top: 0; } }
.appbar__inner {
    display: flex; align-items: center; gap: .75rem; max-width: 44rem; margin: 0 auto;
    padding: .75rem max(1rem, env(safe-area-inset-right)) .25rem max(1rem, env(safe-area-inset-left));
}
.appbar__nav { display: none; align-items: center; gap: .25rem; margin-left: auto; }
.appbar .tools { margin-left: auto; }
.appbar__nav + .tools { margin-left: 0; }
.appbar__nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .9rem; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; text-decoration: none; }
.appbar__nav a:hover { background: var(--panel); color: var(--text); }
.appbar__nav a[aria-current="page"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
@media (min-width: 40rem) { .appbar__nav { display: flex; } }
body:has(.page--wide) .appbar__inner { max-width: 72rem; }
/* Bureau : les pages classiques portent la barre du haut des pages « carte » (`_shell_top`, même marges que `.shell--c`) ; l'`appbar` mobile disparaît. */
.appbar-wide { display: none; }
@media (min-width: 56.25rem) {
    .appbar { display: none; }
    .appbar-wide { display: block; position: sticky; top: 0; z-index: 10; padding: 0 1.5rem .5rem; background: var(--bg); }
}

.page { max-width: 44rem; margin: 0 auto; padding: 1rem max(1rem, env(safe-area-inset-right)) calc(6.5rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left)); }
@media (min-width: 56.25rem) { .page { padding-bottom: 3rem; } }
.page--narrow { max-width: 26rem; padding-top: 2.5rem; padding-bottom: 3rem; }
.page--wide { max-width: 72rem; }

.topbar { margin-bottom: 1.25rem; }
.topbar__title { font-size: 1.75rem; }
.topbar__sub { margin: .25rem 0 0; color: var(--muted); }
.breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: .25rem; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.section-title { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }

.hero { text-align: center; margin-bottom: 1.5rem; }
.hero__logo { display: block; margin: 0 auto .75rem; border-radius: 22px; }
.hero__title { font-size: 1.9rem; }
.hero__text { margin: .25rem 0 0; color: var(--muted); }
.foot { text-align: center; color: var(--muted); font-size: .875rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card__title { font-size: 1.25rem; margin-bottom: .5rem; }
.card__title--sm { font-size: 1.05rem; }
.card__text { margin: 0 0 1rem; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.list__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: inherit; }
.list__row:hover { border-color: var(--primary); }
.list__text { display: grid; gap: .25rem; justify-items: start; }
.list__text small { color: var(--muted); }
.list__go { color: var(--muted); font-size: 1.5rem; }

/* Compte */
.menu-card { padding: .35rem; }
.menu-card__row { display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 3.5rem; padding: .5rem .75rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.menu-card__row:hover { background: var(--surface-2); }
.menu-card__row--danger { color: var(--danger); }
.menu-card__ico { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: var(--surface-2); }
.menu-card__text { display: grid; flex: 1; min-width: 0; font-weight: 700; }
.menu-card__text small { color: var(--muted); font-weight: 400; }
/* Page Compte, « Sur cet appareil » (US-F3a) */
.device-card__title { margin: 0 0 .25rem; font-size: 1.05rem; }
.device-card__text { margin: 0 0 .75rem; color: var(--muted); }
.device-card__list { display: grid; gap: .5rem; margin: 0 0 1rem; }
.device-card__list > div { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr; gap: .75rem; }
.device-card__list dt { color: var(--muted); }
.device-card__list dd { margin: 0; overflow-wrap: anywhere; }
.device-card__problems { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.device-card__problems[hidden] { display: none; }
.device-card__problem { padding: .6rem .75rem; border-radius: 8px; background: var(--danger-bg); color: var(--danger-text); }
.device-card__problem p { margin: 0 0 .5rem; overflow-wrap: anywhere; }
.device-card__problem-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.device-card__problem-actions .btn { min-height: 2.75rem; }
.device-card__subtitle { margin: 0 0 .5rem; font-size: 1rem; }
.device-card__locate[hidden] { display: none; }
.device-card__problem--locate { background: var(--warn-bg); color: var(--warn-text); }
.device-card__candidates { display: grid; gap: .5rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.device-card__candidates .btn { width: 100%; min-height: 2.75rem; text-align: left; white-space: normal; }

/* Formulaires */
.form { display: grid; gap: 1rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.field { display: grid; gap: .25rem; }
.field label { font-weight: 600; }
.field__hint { color: var(--muted); font-size: .875rem; }
.field__error { margin: 0; color: var(--danger); font-size: .875rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], select, textarea {
    width: 100%; min-height: 2.75rem; padding: .65rem .85rem; font: inherit; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--field-border); border-radius: var(--radius-sm);
}
option { background: var(--surface); color: var(--text); }
/* Anneau de focus en `--primary-ink` (5 à 10:1 sur les fonds) et non en cyan plein (2,1 à 2,4:1 en clair) : WCAG 1.4.11 demande 3:1 (US-H2). */
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
input:disabled { opacity: .6; }
/* Champs « fichier » (photos, GPX, import, photo pour l'IA) : zone en pointillés, bouton « Sélect. fichiers » en pastille pleine, nom du fichier en discret. Le champ natif est gardé (clavier, lecteurs d'écran, appareil photo sur mobile). */
input[type="file"] {
    box-sizing: border-box; width: 100%; max-width: 100%; min-height: 3.5rem; padding: .5rem .75rem; font: inherit; font-size: .9rem; color: var(--muted);
    background: transparent; border: 1.5px dashed var(--field-border); border-radius: var(--radius-sm); cursor: pointer;
}
input[type="file"]:hover { background: var(--surface-2); border-color: var(--primary-ink); }
input[type="file"]::file-selector-button {
    margin-right: .75rem; padding: .55rem 1rem; font: inherit; font-weight: 700; color: var(--primary-text); background: var(--primary);
    border: 0; border-radius: 999px; cursor: pointer;
}
input[type="file"]:hover::file-selector-button { filter: brightness(1.06); }
input[type="file"]:disabled { cursor: not-allowed; }
input[type="file"]:disabled::file-selector-button { cursor: not-allowed; }
.check { display: flex; gap: .75rem; align-items: center; min-height: 2.75rem; font-weight: 400 !important; }
.check input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--primary); }

/* Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .65rem 1.1rem; font: inherit; font-weight: 700; text-align: center;
    border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--primary-text); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.btn--danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.btn--quiet { background: transparent; color: var(--text); }
.btn--quiet:hover { background: var(--surface-2); }

/* Messages et pastilles */
.alert { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: var(--radius-sm); }
.alert--ok { background: var(--ok-bg); color: var(--ok-text); }
.alert--warn { background: var(--warn-bg); color: var(--warn-text); }
.alert--danger { background: var(--danger-bg); color: var(--danger-text); }
.badge { display: inline-block; padding: .1rem .6rem; font-size: .8rem; font-weight: 600; border-radius: 999px; background: var(--border); color: var(--muted); }
.badge--ok { background: var(--ok-bg); color: var(--ok-text); }
.badge--warn { background: var(--warn-bg); color: var(--warn-text); }
.badge--danger { background: var(--danger-bg); color: var(--danger-text); }

.details { background: var(--surface-2); border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1rem; }
.details summary { min-height: 2.75rem; padding-block: .6rem; box-sizing: border-box; cursor: pointer; font-weight: 600; }
.details__list { padding-left: 1.25rem; }

[hidden] { display: none !important; }

/* ===== IA : clés, utilisation, budget (copié d'Écureuil et adapté aux variables de Mouette) ===== */
:root { --ai-mistral: #E8743B; --ai-gemini: #4F7FD1; --ai-groq: #2E9E6B; }
.ai-dot { display: inline-block; width: .7rem; height: .7rem; margin-right: .4rem; vertical-align: -.05rem; border-radius: 3px; background: var(--muted); }
.ai-dot--mistral { background: var(--ai-mistral); }
.ai-dot--gemini { background: var(--ai-gemini); }
.ai-dot--groq { background: var(--ai-groq); }
.ai-dot--failed { background: var(--danger); }
.ai-hero { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; border-radius: 16px; }
.ai-hero--on { background: var(--ok-bg); }
.ai-hero--off { background: var(--danger-bg); color: var(--danger); }
.ai-hero__icon { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; font-weight: 700; color: #fff; background: var(--muted); }
.ai-hero__icon--mistral { background: var(--ai-mistral); }
.ai-hero__icon--gemini { background: var(--ai-gemini); }
.ai-hero__icon--groq { background: var(--ai-groq); }
.ai-hero__icon--off { background: var(--danger); }
.ai-hero__text { display: grid; gap: .1rem; min-width: 0; line-height: 1.35; }
.ai-hero__text strong { font-weight: 700; }
.ai-hero--on .ai-hero__sub { color: var(--ok-text); font-weight: 600; font-size: .925rem; overflow-wrap: anywhere; }
.ai-hero--off .ai-hero__sub { font-weight: 600; font-size: .925rem; }
.ai-section__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.ai-section__head .card__title { margin: 0; }
.ai-section__head + .card__text { margin-top: .6rem; }
.ai-periods { display: inline-flex; gap: .2rem; padding: .2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.ai-periods__item { display: grid; place-items: center; min-width: 3.4rem; min-height: 2.75rem; padding: 0 .9rem; border-radius: 999px; font-size: .9rem; font-weight: 700; color: var(--text); text-decoration: none; }
.ai-periods__item:hover { background: var(--surface); }
.ai-periods__item.is-active { color: var(--primary-text); background: var(--primary); }
.ai-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr)); gap: .75rem; margin-top: 1rem; }
.ai-kpi { display: grid; align-content: start; gap: .1rem; padding: .85rem 1rem; border-radius: 12px; background: var(--bg); }
.ai-kpi__label { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ai-kpi__value { font-size: 1.7rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ai-kpi__hint { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.ai-tabs { display: flex; gap: .25rem; margin: 1.25rem 0 1rem; overflow-x: auto; border-bottom: 1px solid var(--border); }
.ai-tabs__tab { display: inline-flex; align-items: center; flex: none; min-height: 2.75rem; padding: 0 1rem; margin-bottom: -1px; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 700; color: var(--muted); text-decoration: none; }
.ai-tabs__tab:hover { color: var(--text); }
.ai-tabs__tab.is-active { color: var(--text); border-bottom-color: var(--primary); }
.ai-chart__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: .9rem; color: var(--muted); font-size: .85rem; font-weight: 600; }
.ai-chart__body { display: flex; gap: .6rem; }
.ai-chart__yaxis { display: flex; flex-direction: column; justify-content: space-between; min-width: 1.8rem; height: 13rem; color: var(--muted); font-size: .72rem; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; transform: translateY(.3em); }
.ai-chart__plot { position: relative; flex: 1; min-width: 0; padding-bottom: 1.5rem; }
.ai-chart__grid { position: absolute; inset: 0 0 1.5rem 0; display: flex; flex-direction: column-reverse; justify-content: space-between; pointer-events: none; }
.ai-chart__grid span { display: block; height: 0; border-top: 1px dashed var(--border); }
.ai-chart__grid span:first-child { border-top: 1px solid color-mix(in srgb, var(--text) 28%, transparent); }
.ai-chart__bars { position: relative; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); column-gap: clamp(1px, .5%, 6px); height: 13rem; margin: 0; padding: 0; list-style: none; }
.ai-bar { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 4px 4px 0 0; }
.ai-bar:hover, .ai-bar:focus-visible { background: var(--bg); }
.ai-bar__stack { display: flex; flex: 1; flex-direction: column-reverse; justify-content: flex-start; width: 100%; max-width: 2.2rem; margin: 0 auto; }
.ai-seg { position: relative; overflow: hidden; width: 100%; min-height: 2px; border-top: 1px solid var(--surface); }
.ai-seg:last-child { border-radius: 3px 3px 0 0; }
.ai-seg--mistral { background: var(--ai-mistral); }
.ai-seg--gemini { background: var(--ai-gemini); }
.ai-seg--groq { background: var(--ai-groq); }
.ai-seg__failed { position: absolute; left: 0; right: 0; top: 0; background: var(--danger); }
.ai-bar__label { position: absolute; top: 100%; left: 50%; margin-top: .4rem; transform: translateX(-50%); color: var(--muted); font-size: .7rem; white-space: nowrap; pointer-events: none; }
.ai-bar--empty .ai-bar__stack { flex: none; height: 2px; min-height: 2px; background: var(--border); border-radius: 2px; }
.ai-tip { display: none; position: absolute; z-index: 5; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); gap: .15rem; min-width: 9.5rem; padding: .5rem .7rem; color: var(--tip-ink); background: var(--tip-bg); border-radius: 8px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); font-size: .8rem; white-space: nowrap; pointer-events: none; }
.ai-tip strong { font-size: .82rem; }
.ai-tip__total { margin-top: .15rem; padding-top: .25rem; border-top: 1px solid color-mix(in srgb, var(--tip-ink) 25%, transparent); font-weight: 600; }
.ai-bar:hover .ai-tip, .ai-bar:focus-visible .ai-tip { display: grid; }
.ai-bar--late .ai-tip { left: auto; right: 0; transform: none; }
.ai-chart__empty { margin: .75rem 0 0; text-align: center; }
.ai-note { margin: .75rem 0 0; font-size: .85rem; }
.ai-feat__scroll { overflow-x: auto; }
.ai-feat__table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: .92rem; }
.ai-feat__table th, .ai-feat__table td { padding: .55rem .6rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.ai-feat__table thead th { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.ai-feat__table tbody th { min-width: 11rem; font-weight: 600; }
.ai-feat__table tfoot th, .ai-feat__table tfoot td { border-top: 2px solid var(--border); border-bottom: 0; font-weight: 700; }
.ai-feat__table .ai-feat__num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-feat__tokens { width: 34%; min-width: 11rem; }
.ai-feat__tokens strong { font-variant-numeric: tabular-nums; }
.ai-feat__tokens .ai-feat__bar + strong { display: block; margin-top: .2rem; }
.ai-feat__bar { height: .7rem; overflow: hidden; border-radius: 999px; background: var(--bg); }
.ai-feat__fill { display: flex; height: 100%; min-width: 3px; overflow: hidden; border-radius: 999px; }
.ai-feat__fill > span { display: block; min-width: 2px; height: 100%; }
.ai-feat__fail { display: block; margin-top: .1rem; color: var(--danger); font-size: .75rem; font-weight: 600; }
.ai-feat__row--unassigned th, .ai-feat__row--unassigned td { color: var(--muted); }
.ai-hist__table { min-width: 44rem; }
.ai-hist__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-hist__ok { color: var(--muted); }
.ai-hist__fail { display: inline; margin: 0; font-weight: 700; }
.ai-err__table { min-width: 48rem; }
.ai-err__message { min-width: 18rem; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.4; }
.ai-legend { display: grid; gap: .4rem; margin: .8rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--muted); }
.ai-legend li { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem; }
.ai-legend .badge { flex: none; }
.ai-keys { display: grid; gap: .75rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.ai-keys__empty { display: grid; gap: .2rem; padding: 1.25rem; border: 1.5px dashed var(--border); border-radius: 12px; text-align: center; }
.ai-key { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; padding: 1rem; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); }
.ai-key--active { border-color: var(--primary); background: color-mix(in srgb, var(--ok-bg) 45%, var(--bg)); }
.ai-key--fallback { border-color: color-mix(in srgb, var(--warn-text) 40%, transparent); background: color-mix(in srgb, var(--warn-bg) 40%, var(--bg)); }
.ai-key__logo { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-weight: 700; color: #fff; background: var(--muted); }
.ai-key__logo--mistral { background: var(--ai-mistral); }
.ai-key__logo--gemini { background: var(--ai-gemini); }
.ai-key__logo--groq { background: var(--ai-groq); }
.ai-key__main { display: flex; flex-direction: column; gap: .4rem; min-width: 0; line-height: 1.4; }
.ai-key__title { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-height: 2.6rem; font-size: 1.05rem; }
.ai-key__meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.ai-chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; padding: .15rem .65rem; border-radius: 999px; font-size: .85rem; overflow-wrap: anywhere; background: var(--surface); }
.ai-chip__k { font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.ai-chip code { font-size: .85rem; }
.ai-key__comment { margin: 0; overflow-wrap: anywhere; font-style: italic; color: var(--muted); }
.ai-key__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; }
.ai-key__actions form { flex: 1 1 10rem; }
.ai-key__actions .btn { width: 100%; }
.ai-key__edit { grid-column: 1 / -1; }
.ai-key__edit > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; cursor: pointer; list-style: none; font-weight: 700; color: var(--primary-ink); }
.ai-key__edit > summary::-webkit-details-marker { display: none; }
.ai-key__edit > summary .icon { width: 1.1rem; height: 1.1rem; }
.ai-key__edit > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.ai-key__edit[open] { padding-top: .25rem; border-top: 1.5px dashed var(--border); }
.ai-key__edit .form { max-width: 32rem; margin-top: .4rem; }
.ai-key__edit .form__actions .btn { width: auto; }
.ai-add > summary { display: flex; align-items: center; gap: .7rem; min-height: 3rem; cursor: pointer; list-style: none; font-size: 1.15rem; font-weight: 700; }
.ai-add > summary::-webkit-details-marker { display: none; }
.ai-add__plus { font-size: 1.2rem; line-height: 1; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--primary-text); background: var(--primary); transition: transform .2s; }
.ai-add__plus .icon { width: 1.1rem; height: 1.1rem; }
.ai-add[open] .ai-add__plus { transform: rotate(45deg); }
.ai-add__panel { max-width: 36rem; margin-top: 1rem; }
.ai-add__panel .alert { margin-bottom: 1rem; }
@media (min-width: 24rem) and (max-width: 63.99rem) {
    .ai-kpi:last-child { grid-column: span 2; }
}
@media (max-width: 39.99rem) {
    .ai-chart__bars, .ai-chart__yaxis { height: 10rem; }
    .ai-kpi__value { font-size: 1.4rem; }
}
@media (min-width: 40rem) {
    .ai-key__actions, .ai-key__edit { grid-column: 2; }
    .ai-key__actions form { flex: 0 0 auto; }
    .ai-key__actions .btn { width: auto; }
    .ai-key__delete { margin-left: auto; }
}
@media (min-width: 64rem) {
    .ai-section { padding: 1.75rem 1.75rem 1.5rem; }
}
.ai-quotas__list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.ai-quota-row { --tint: var(--ok-bg); --ink: var(--ok-text); display: grid; gap: .55rem; padding: .9rem 1rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ai-quota-row[data-level="low"] { border-color: color-mix(in srgb, var(--warn-text) 30%, var(--border)); }
.ai-quota-row[data-level="empty"] { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.ai-quota-row__head { display: flex; align-items: center; gap: .75rem; }
.ai-quota-row__icon { font-size: 1.2rem; display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; color: var(--ink); background: var(--tint); }
.ai-quota-row__title { flex: 1 1 auto; min-width: 0; }
.ai-quota-row__name { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.ai-quota-row__where { margin: .1rem 0 0; color: var(--muted); font-size: .85rem; font-weight: 600; }
.ai-quota-row__figure { flex: none; margin: 0; text-align: right; line-height: 1.1; }
.ai-quota-row__figure strong { font-size: 1.65rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--ink) 85%, var(--text)); }
.ai-quota-row__of { color: var(--muted); font-weight: 600; }
.ai-quota-row__left { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
.ai-quota-row__bar { height: .6rem; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--ink) 16%, var(--bg)); }
.ai-quota-row__fill { display: block; width: calc(var(--p, 0) * 100%); height: 100%; border-radius: inherit; background: var(--ink); transition: width .3s ease; }
.ai-quota-row__desc { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1.4; }
.ai-quota-row__reset { margin: 0; font-size: .875rem; font-weight: 700; color: color-mix(in srgb, var(--ink) 80%, var(--text)); }
.ai-quota-row__reset[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .ai-quota-row__fill { transition: none; }
}

/* Utilitaires et éléments de formulaire utilisés par la config IA */
:root { --tip-bg: #1e293b; --tip-ink: #f8fafc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tip-bg: #e2e8f0; --tip-ink: #0b1220; } }
:root[data-theme="dark"] { --tip-bg: #e2e8f0; --tip-ink: #0b1220; }
.muted { color: var(--muted); }
.skip-link { position: fixed; z-index: 1000; top: .75rem; left: .75rem; padding: .65rem 1rem; font-weight: 700; color: var(--text); background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); transform: translateY(-300%); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.btn--sm { padding: .5rem 1rem; }
.choices { display: grid; gap: .5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.choices legend { padding: 0; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.choice { position: relative; display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; appearance: none; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice:has(input:focus-visible) { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.choice:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.ai-audio-help { margin: 0 0 1rem; font-size: .875rem; }
.ai-section { margin-bottom: 1rem; }
.ai-quotas { margin-bottom: 1rem; }
input[type="text"]::placeholder, input[type="search"]::placeholder { color: var(--muted); opacity: .8; }

/* ===== Carte (US-A1) : fond neutre tant que les tuiles ne sont pas là (hors ligne, panne, Leaflet absent) ===== */
.map { display: grid; gap: .5rem; }
.map__canvas, .map__canvas.leaflet-container {
    height: min(60vh, 28rem); min-height: 16rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: color-mix(in srgb, var(--muted) 12%, var(--surface)); font-family: var(--font-sans);
}
.map__notice { margin: 0; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; }
.map__hint { margin: 0; color: var(--muted); font-size: .9rem; }
.map__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.map__locate-status { margin: 0; flex: 1 1 12rem; color: var(--muted); font-size: .875rem; }

/* Position en direct (US-S1) */
.geo-watch { display: grid; gap: .5rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.geo-watch__title { margin: 0; font-size: 1.05rem; }
.geo-watch__main { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.geo-watch__main .btn { flex: 0 0 auto; }
.geo-watch__heading { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.geo-watch__status { margin: 0; min-height: 1.4em; color: var(--muted); font-size: .9rem; }
.geo-watch__help { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 400; }
.map-btn { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer; }
.map-btn:disabled { opacity: .5; cursor: progress; }
/* Plan · Satellite (US-J12) : enfoncé = satellite actif. Dans la barre de la carte, un bouton sous l'autre. */
.map-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); }
.map__tools .map-btn + .map-btn { margin-top: .5rem; }

/* Suivre ma position (US-R2) : « Recentrer » n'apparaît que lorsque la carte a été déplacée à la main pendant le suivi ; pictogramme ET texte. Sur la carte plein écran, il se pose à gauche de la colonne de boutons, sous la bulle d'état. */
.map-recenter { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: 999px; background: var(--primary); color: var(--primary-text); font: inherit; font-size: .9rem; font-weight: 700; box-shadow: var(--shadow-sm); cursor: pointer; white-space: nowrap; }
.map-recenter[hidden] { display: none; }
.shell .map__tools .map-recenter, .shell--c .map__tools .map-recenter { position: absolute; right: 3.5rem; top: 3.5rem; }

/* Ma progression sur la trace en grand (US-R2) : parcouru, restant, et « Hors itinéraire » avec un pictogramme (jamais la couleur seule). */
.track-follow { display: grid; gap: .5rem; }
.track-follow[hidden] { display: none; }
.track-follow__off { display: flex; align-items: flex-start; gap: .5rem; margin: 0; padding: .5rem .65rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; font-weight: 600; }
.track-follow__off[hidden] { display: none; }
.track-follow__off .ico { flex: none; margin-top: .1rem; }

/* Sélecteur de fonds de carte (fiche d'un point) : le bouton « couches » (un `.map-btn`) en haut à droite, et sous lui la liste des fonds, un bouton radio chacun. */
.basemap-control { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; border: 0; background: none; box-shadow: none; }
.basemap-control .map-btn[aria-expanded="true"] { background: var(--primary); color: var(--primary-text); }
.basemap-control__list { margin: 0; padding: .25rem; min-width: 0; max-width: min(20rem, calc(100vw - 4.5rem)); max-height: 10rem; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius-sm); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); } /* 10 rem de liste sur la carte de 17 rem du mobile : au-delà, elle défile */
.basemap-control__list[hidden] { display: none; }
.basemap-control__option { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .35rem .75rem; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.25; cursor: pointer; }
.basemap-control__option:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.basemap-control__option input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--primary); }
.basemap-control__option:has(input:checked) { font-weight: 600; }
.basemap-control__option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: -2px; }
.basemap-control__group { margin: 0; padding: 0; min-width: 0; border: 0; }
.basemap-control__group + .basemap-control__group { margin-top: .25rem; padding-top: .25rem; border-top: 1px solid var(--border); }
.basemap-control__title { padding: .25rem .75rem 0; font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 56.25rem) { .basemap-control__list { max-height: calc(min(34rem, 100dvh - 8rem) - 5rem); } } /* la carte de la fiche est plus haute sur grand écran */

/* Repères : un disque à la couleur du groupe, bordé de blanc, dans un halo (la maquette). `--pin` est posée par le contrôleur ; la page d'un groupe suit `--group-color`. */
.map-pin { background: none; border: 0; }
.map-pin__dot { display: block; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; border: 3px solid #fff; background: var(--pin, #09b7da); box-shadow: 0 1px 4px rgba(0, 0, 0, .45); transition: transform .15s; }
.map-pin.is-selected .map-pin__dot { transform: scale(1.4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 1px 6px rgba(0, 0, 0, .6); }
.shell .map-pin__dot { width: 14px; height: 14px; margin: 4px; border-width: 2px; color: var(--pin, #09b7da); background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 28%, transparent); }
.shell .map-pin::before { content: ""; position: absolute; inset: -10px; } /* zone tactile de 42 px autour du disque */
.shell .map-pin.is-selected .map-pin__dot { transform: scale(1.55); box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 32%, transparent), 0 2px 8px rgba(14, 26, 34, .35); }
.group-page .map-pin__dot { color: var(--group-color, var(--pin, #09b7da)); background: currentColor; } /* suit un changement de couleur du groupe sans recharger (US-B3, US-E2) */
.map-cluster { background: none; border: 0; }
.map-cluster__disc {
    display: grid; place-items: center; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 3px solid #fff; background: var(--pin, #066f86); color: #fff;
    font-weight: 700; font-size: .95rem; line-height: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); box-shadow: 0 0 0 5px color-mix(in srgb, var(--pin, #066f86) 28%, transparent), 0 1px 4px rgba(0, 0, 0, .45);
}
.map-cluster:focus-visible .map-cluster__disc { outline: 2px solid #0f172a; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow { transition: none; } .map-pin__dot { transition: none; } }
.map-me { background: none; border: 0; pointer-events: none; }
.map-me__dot { display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 3px solid #fff; background: #2563eb; box-shadow: 0 0 0 1px rgba(15, 23, 42, .25), 0 1px 4px rgba(0, 0, 0, .45); }

/* Bulle d'un marqueur : une carte claire (la bulle de Leaflet reste claire même en thème sombre) ; sur la page d'un groupe, c'est l'étiquette sombre de la maquette. */
.leaflet-popup-content-wrapper { border-radius: var(--radius-sm); }
.map-popup { color: #0f172a; }
.map-popup__address { margin: .25rem 0 .5rem; font-size: .85rem; color: #475569; overflow-wrap: anywhere; }
.map-popup__group { margin: .15rem 0 0; font-size: .8rem; color: #475569; }
.map-popup__actions { display: flex; gap: .5rem; margin: .5rem 0 0; }
.map-popup__link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .85rem; border-radius: var(--radius-sm); border: 1px solid #066f86; color: #066f86; font-weight: 600; text-decoration: none; }
.map-popup__link--primary { background: #09b7da; border-color: #09b7da; color: #02222b; }
.leaflet-container a.map-popup__link { color: #066f86; }
.leaflet-container a.map-popup__link--primary { color: #02222b; }
.group-page .leaflet-popup-content-wrapper, .group-page .leaflet-popup-tip { background: #0e1a22; color: #fff; }
.group-page .leaflet-popup-content { margin: .5rem .85rem; }
.group-page .map-popup { color: #fff; }
.group-page .map-popup__group, .group-page .map-popup__address, .group-page .map-popup__actions, .group-page .leaflet-popup-close-button { display: none; }

/* Commandes de Leaflet aux couleurs de l'application ; zones tactiles de 44 px. */
.leaflet-touch .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; }
.leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--muted); border-radius: 8px 0 0 0; }
.leaflet-container .leaflet-control-attribution a { color: var(--primary-ink); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--panel); color: var(--text); border-color: var(--border); }
/* Carte en mode sombre (US-H1) : les tuiles OpenStreetMap sont claires ; on inverse seulement le volet des tuiles (les marqueurs, dans un autre volet, gardent leurs couleurs).
   Pas pour une imagerie (satellite, topographique) : `map_controller.js` pose `map__canvas--imagery` sur tout fond qui n'est pas le plan. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map__canvas:not(.map__canvas--imagery) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9); } }
:root[data-theme="dark"] .map__canvas:not(.map__canvas--imagery) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9); }

/* ===== Groupes : puces, lignes, formulaire (garde-fous des écrans de création et de modification) ===== */
.group-status { min-height: 1.5rem; margin: 0 0 .5rem; color: var(--ok-text); font-size: .9rem; font-weight: 600; }
.group-status:empty { min-height: 0; margin: 0; }
.field__warn { margin: 0; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; }
.group-empty { margin: .5rem 0 1rem; color: var(--muted); }

/* Description d'un groupe (US-J1) : Markdown rendu par le serveur. Les titres du texte sont déjà descendus à h3 et plus. */
/* Voyages liés à un groupe : bandeau en tête du volet du groupe, avec un lien vers chaque voyage. */
.group-trips { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; padding: .65rem .9rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 12%, var(--bg)); }
.group-trips__ico { display: inline-flex; flex: none; color: var(--primary); }
.group-trips__text { flex: 1; min-width: 0; }
.group-trips__title { margin: 0; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.group-trips__list { margin: .1rem 0 0; padding: 0; list-style: none; font-weight: 600; }
.group-trips__list a { display: inline-block; min-height: 1.75rem; line-height: 1.75rem; overflow-wrap: anywhere; }
.group-trips__meta { font-weight: 400; color: var(--muted); font-size: .85rem; }
.group-trips__go { flex: none; }
@media (max-width: 480px) { .group-trips { flex-wrap: wrap; } .group-trips__go { width: 100%; justify-content: center; } }
.group-desc { margin: 0 0 1rem; padding: .25rem .9rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.group-desc > summary { display: flex; align-items: center; min-height: 2.75rem; cursor: pointer; list-style: none; }
.group-desc > summary::-webkit-details-marker { display: none; }
.group-desc > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.group-desc:not([open]) > summary::after { transform: rotate(-90deg); }
.group-desc__title { margin: 0; font-size: .95rem; font-weight: 700; }
.markdown { padding-bottom: .5rem; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.5; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h3, .markdown h4, .markdown h5, .markdown h6 { margin: 1rem 0 .35rem; font-size: 1rem; line-height: 1.3; }
.markdown p, .markdown ul, .markdown ol, .markdown blockquote, .markdown pre { margin: 0 0 .6rem; }
.markdown ul, .markdown ol { padding-left: 1.4rem; }
.markdown a { color: var(--primary-ink); text-decoration: underline; }
.markdown blockquote { padding-left: .8rem; border-left: 3px solid var(--border); color: var(--muted); }
.card blockquote { margin: 0; padding-left: .8rem; border-left: 3px solid var(--border); color: var(--muted); overflow-wrap: anywhere; } /* texte reçu de « Partager » (US-G5) */
.markdown code { font-size: .9em; }
.markdown pre { overflow-x: auto; padding: .6rem .75rem; background: var(--surface); border-radius: 8px; }
.group-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .15rem; }
.group-item { display: flex; align-items: center; gap: .25rem; }

/* Archives (US-J2) : bouton sous la liste des groupes, qui ouvre l'accueil des groupes archivés (`?vue=archives`). */
.group-archives { display: flex; align-items: center; gap: .5rem; width: fit-content; min-height: 2.75rem; margin: 0 0 1rem; padding: 0 .25rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.group-archives[hidden] { display: none; }
.group-archives:hover { color: var(--text); }
.group-archives__count { font-weight: 400; }

/* Vue « Archives » de l'accueil : même page, sans ce qui crée ou ajoute (`data-home-only`) ; le retour aux groupes (`data-archives-only`) n'existe que là. */
.home-page--archives [data-home-only], .home-page--archives .add-btn { display: none !important; }
.home-page:not(.home-page--archives) [data-archives-only] { display: none !important; }
.panel__back { display: inline-flex; align-items: center; gap: .25rem; }
.group-row { --group-color: var(--primary); display: flex; align-items: center; flex: 1; min-width: 0; gap: .85rem; min-height: 3.5rem; padding: .35rem .5rem; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.group-row:hover { background: var(--surface-2); }
.group-row.is-new { animation: group-new 1.6s ease-out; }
@keyframes group-new { from { background: color-mix(in srgb, var(--group-color) 28%, var(--surface)); } to { background: transparent; } }
.group-row__text { display: grid; flex: 1; min-width: 0; gap: .05rem; }
.group-row__name { min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.group-row__count { color: var(--muted); font-size: .85rem; }
.group-row__go { display: none; color: var(--muted); }
/* Pastille de groupe : un carré arrondi à la couleur du groupe, avec son emoji. */
.tile { position: relative; display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--group-color, var(--primary)); font-size: 1.35rem; line-height: 1; }
.group-row:not(.has-icon) .tile::after, .panel__head .tile:not(.has-icon)::after { content: ""; width: .85rem; height: .85rem; border-radius: 50%; background: rgba(255, 255, 255, .9); }
/* Case « montrer sur la carte » (bureau). */
.group-check { position: relative; display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; cursor: pointer; }
.group-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; appearance: none; }
.group-check__box { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--border); border-radius: 8px; color: transparent; transition: background .15s; }
.group-check input:checked + .group-check__box { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.group-check input:focus-visible + .group-check__box { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
/* « Annuler » après une suppression (US-B4). */
.undo { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.undo__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.undo .btn { min-height: 2.75rem; }
.palette { margin: 0; padding: 0; border: 0; min-width: 0; }
.palette legend { padding: 0; margin-bottom: .35rem; font-weight: 600; }
.palette__swatches { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Voyages (US-V1) : le choix du groupe des lieux. */
.trip-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.trip-group legend { padding: 0; margin-bottom: .25rem; font-weight: 600; }
/* Mes voyages (US-V2) : rubriques (en cours, à venir, passés, sans date, archivés) et lignes de voyage. */
.trip-section { margin: 0 0 1.25rem; }
.trip-section__title { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 700; }
.trip-section--archived > summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; }
.trip-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.trip-row { display: grid; gap: .15rem; min-height: 3.25rem; padding: .85rem 1rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.trip-row:hover { background: var(--surface-2); }
.trip-row__name { font-weight: 700; overflow-wrap: anywhere; }
.trip-row__dates, .trip-row__meta, .trip-row__route { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.trip-row__route[hidden] { display: none; }
.swatch { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; appearance: none; }
.swatch__dot { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 12px; background: var(--swatch, var(--primary)); color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); transition: box-shadow .15s ease; }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.swatch input:checked + .swatch__dot::after { content: "✓"; }
.swatch input:focus-visible + .swatch__dot { outline: 2px solid var(--primary-ink); outline-offset: 4px; }
.icon-picks { display: flex; flex-wrap: wrap; gap: .25rem; }
.icon-pick { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; font-size: 1.4rem; line-height: 1; background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; }
.icon-pick:hover { border-color: var(--primary); }
@media (prefers-reduced-motion: reduce) { .group-row.is-new { animation: none; } .swatch__dot, .group-check__box { transition: none; } }

/* ===== Liste des points d'un groupe (US-E1 à US-E5, US-C5) ===== */
.point-list { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.point-item { position: relative; display: flex; flex-direction: column; border-radius: var(--radius-sm); } /* colonne : barre du haut (« Y aller », tracé), puis la ligne (bouton) qui prend toute la hauteur de la carte, même étirée par sa voisine de grille */
.point-item > .point-row { flex: 1 1 auto; }
.point-item[hidden] { display: none; } /* ligne écartée par la recherche (US-E5) : `display: grid` ci-dessus l'emporterait sur l'attribut */
.point-item.is-selected { background: color-mix(in srgb, var(--group-color, var(--primary)) 14%, transparent); } /* point sélectionné (US-E3) */
.point-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot name side" "dot meta side"; column-gap: .75rem; align-items: center;
    width: 100%; min-height: 3.5rem; padding: .5rem .6rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.point-row:hover { background: var(--surface-2); }
/* Point avec aperçu de carte (US-J18) : la carte de la zone en bandeau pleine largeur (rognée en hauteur à l'AFFICHAGE, centrée sur le repère, au milieu de l'image gardée), puis le nom et les repères ;
   « Y aller » est posé en pastille sur le bandeau. */
.point-item--thumb { overflow: hidden; }
.point-item--thumb > .point-row { align-content: start; }
.point-row--thumb { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "thumb thumb thumb" "dot name side" "dot meta side"; row-gap: .1rem; }
.point-row--thumb .point-row__side { grid-row: 2 / 4; }
.shell--c .point-row--thumb { min-height: 0; }
.point-row__thumb { grid-area: thumb; width: calc(100% + 1.2rem); height: 8rem; margin: -.5rem -.6rem .5rem; object-fit: cover; background: var(--surface-2); }
/* Barre du haut de TOUTES les vignettes : le lien du tracé (s'il y en a un) à gauche, « Y aller » à droite. Sans image, c'est la première ligne de la carte ; avec image (carte ou slider), elle est posée dessus. */
.point-item__bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .5rem 0; }
.point-item__bar > .point-item__link { margin-left: auto; }
.point-item--thumb .point-item__bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none; } /* les clics sur l'image passent au travers ; seuls les liens les gardent */
.point-item--thumb .point-item__bar > a { pointer-events: auto; }
.point-item--thumb .point-item__link { min-height: 2.25rem; padding: 0 .7rem; gap: .15rem; display: inline-flex; align-items: center; background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.point-item--thumb .point-item__link:hover { background: var(--surface-2); }
.point-item.is-selected .point-row:hover { background: transparent; }
/* Point avec photos (US-J17) : le bandeau devient un slider (`point-slider`), HORS du bouton de la ligne. Les images défilent côte à côte (scroll-snap, glisser du doigt) :
   les photos dans l'ordre d'ajout, puis la carte de la zone. Rognées à l'AFFICHAGE seulement (`object-fit: cover`) : la fiche montre la photo entière. Flèches et pastilles : voir `point-slider`. */
.point-slider { position: relative; background: var(--surface-2); }
.point-slider__track { display: flex; height: 8rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: pointer; }
.point-slider__track::-webkit-scrollbar { display: none; }
.point-slider__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.point-slider__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.point-slider__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; transform: translateY(-50%); border: 0; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); opacity: .85; cursor: pointer; }
.point-slider__nav[hidden] { display: none; }
.point-slider__nav:hover, .point-slider__nav:focus-visible { opacity: 1; }
.point-slider__nav--prev { left: .5rem; }
.point-slider__nav--next { right: .5rem; }
.point-slider__dots { position: absolute; left: 0; right: 0; bottom: .45rem; display: flex; justify-content: center; gap: .3rem; pointer-events: none; }
.point-slider__dot { width: .4rem; height: .4rem; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.point-slider__dot.is-active { background: #fff; transform: scale(1.25); }
.point-row--slider { padding-top: .6rem; }
.shell--c .point-row--slider { min-height: 0; }
@media (hover: none) { .point-slider__nav { width: 2.25rem; height: 2.25rem; } } /* au doigt : un peu plus grand à viser */
@media (prefers-reduced-motion: no-preference) { .point-slider__dot { transition: transform .15s ease, background-color .15s ease; } }
.point-row__dot { grid-area: dot; align-self: start; width: .6rem; height: .6rem; margin-top: .5rem; border-radius: 50%; background: var(--group-color, var(--primary)); }
.point-row__name { grid-area: name; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.point-row__meta { grid-area: meta; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.point-row__side { grid-area: side; grid-row: 1 / 3; display: grid; justify-items: end; align-content: center; gap: .1rem; font-family: var(--font-mono); font-size: .8rem; }
.point-row__dist { color: var(--muted); } /* distance depuis ma position (US-E4) */
.mark--rating { color: var(--star); font-weight: 700; }
.mark--fav { display: inline-grid; color: #ef5d6c; }
.mark--fav .ico { fill: currentColor; }
.point-item__link { display: grid; place-items: center; width: 2.5rem; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.point-item__track[hidden] { display: none; } /* modèle de la page hors ligne : `display: grid` l'emporterait sur l'attribut */
.point-item__link:hover { background: var(--surface-2); color: var(--text); }
.point-filter { position: relative; display: flex; align-items: center; gap: .5rem; margin: .25rem 0 .75rem; }
.point-filter__icon { position: absolute; left: .9rem; display: grid; color: var(--muted); pointer-events: none; }
.point-filter input { flex: 1 1 auto; min-width: 0; width: auto; padding-left: 2.6rem; }
.point-filter input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* « Effacer » est déjà là : pas de croix en double */
.point-filter__clear { flex: none; min-height: 2.75rem; }
.point-filter__result { margin: 0 0 .5rem; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
/* Puces de filtre : favoris, note minimale, étiquette. Ce sont les cases et les listes d'avant, habillées en puces. */
.point-marks { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.pick { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: 0 .85rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: .9rem; font-weight: 600; cursor: pointer; }
.pick input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; appearance: none; }
.pick:has(input:checked) { background: var(--text); color: var(--surface); }
.pick:focus-within { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.pick--select select { width: auto; min-height: 2.5rem; padding: 0 .2rem; border: 0; background: transparent; color: inherit; font-weight: 600; appearance: none; cursor: pointer; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem 0 .35rem; color: var(--muted); font-size: .9rem; }
.point-sort { display: inline-flex; align-items: center; gap: .25rem; }
.point-sort select { width: auto; min-height: 2.5rem; padding: 0 .25rem; border: 0; background: transparent; color: var(--text); font-weight: 600; cursor: pointer; }
.point-sort__status { margin: 0 0 .5rem; padding: .5rem .75rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; }

/* Fiche d'un point (US-C1) : liste de faits « libellé / valeur » et mini-carte. */
.point-page .topbar__title { overflow-wrap: anywhere; }
.point-facts { display: grid; gap: .25rem; margin: 0; }
.point-facts__row { display: grid; gap: .1rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.point-facts__row:first-child { border-top: 0; padding-top: 0; }
.point-facts dt { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.point-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.markdown--raw { white-space: pre-wrap; } /* repli hors ligne : texte brut, retours à la ligne gardés */
.point-facts__link { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.point-facts__coords { margin-right: .5rem; font-variant-numeric: tabular-nums; user-select: all; }
.point-facts__status { display: block; min-height: 1.25rem; color: var(--text); font-size: .875rem; font-weight: 600; }
.point-facts__status:empty { min-height: 0; }
/* Déplacer ou copier un point (US-C4) : les messages n'ont pas la marge basse de .alert (l'espacement vient de la grille du formulaire). */
.point-page .choice__text small { font-weight: 400; }
.map--mini .map__canvas, .map--mini .map__canvas.leaflet-container { height: 14rem; min-height: 12rem; }
.map--mini.map--track .map__canvas, .map--mini.map--track .map__canvas.leaflet-container { height: 22rem; min-height: 16rem; } /* itinéraire GPX (US-G6) : plus de place pour voir la balade */
.point-page .point-track__summary { margin: 0 0 .25rem; }
/* « Y aller » de la fiche (US-G1) */
/* « Partager » de la fiche (US-G2) */
.point-share { display: grid; gap: .5rem; margin-top: 1rem; justify-items: start; }
.point-share__status { font-size: .875rem; }

/* Ajout d'un point (US-D1) : onglets (motif ARIA « tabs »), carte commune, résultats d'adresse, résumé de la position. */
.point-new { --group-color: var(--primary); }
.point-new .topbar__title { overflow-wrap: anywhere; }
.point-new .breadcrumb a { overflow-wrap: anywhere; } /* modification (US-C2) : le nom du point, sans espace, ne doit pas élargir la page */
.point-new .map-pin__dot { background: var(--group-color, var(--pin, #09b7da)); }
.point-new .map-pin--preview .map-pin__dot { transform: scale(1.25); }
.point-new .map__canvas, .point-new .map__canvas.leaflet-container { height: 16rem; min-height: 12rem; }
.point-new .map__canvas.is-picking, .point-new .map__canvas.is-picking .leaflet-interactive { cursor: crosshair; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); }
.point-new .field__hint:empty { display: none; }
.point-new .form > * { min-width: 0; } /* un enfant de la grille ne doit pas élargir la carte sur un écran étroit */
.tabs__tab { flex: 1; min-width: 0; min-height: 2.75rem; padding: .5rem .35rem; font: inherit; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.tabs__panel[hidden] { display: none; }

/* Onglet Carte (US-D5) : mode « Poser un repère » / « Viser au centre », réticule central, repère déplaçable. */
.mode-toggle { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mode-toggle__btn { flex: 1; min-width: 0; min-height: 2.75rem; padding: .5rem; font: inherit; font-weight: 600; color: var(--muted); background: var(--bg); border: 0; cursor: pointer; }
.mode-toggle__btn + .mode-toggle__btn { border-left: 1px solid var(--border); }
.mode-toggle + label { margin-top: .75rem; }
.mode-toggle__btn[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--primary) 18%, var(--surface)); box-shadow: inset 0 -3px 0 var(--primary); }
.live-coords { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.live-coords:empty { display: none; }
.map-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.locate-shortcut { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.locate-shortcut .field__hint, .locate-shortcut .field__error { margin: 0; }
.map__reticle { position: absolute; left: 50%; top: 50%; z-index: 650; width: 34px; height: 34px; margin: -17px 0 0 -17px; box-sizing: border-box; border: 3px solid var(--group-color, #09b7da); border-radius: 50%; box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px #fff; pointer-events: none; }
.map__reticle::before, .map__reticle::after { content: ""; position: absolute; background: var(--group-color, #09b7da); box-shadow: 0 0 0 1px #fff; }
.map__reticle::before { left: 50%; top: -12px; bottom: -12px; width: 2px; margin-left: -1px; }
.map__reticle::after { top: 50%; left: -12px; right: -12px; height: 2px; margin-top: -1px; }
.point-new .map-pin.map-pin--grab { display: flex; align-items: center; justify-content: center; cursor: grab; } /* zone tactile de 44 px autour du disque de 22 px */
.point-new .map-pin.map-pin--grab:active { cursor: grabbing; }
.map-pin--grab:focus-visible { outline: none; }
.map-pin--grab:focus-visible .map-pin__dot { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #0f172a; }
.inline-field { display: flex; gap: .5rem; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field .btn { flex: none; }
.results { display: grid; gap: .35rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.results__item { display: block; width: 100%; min-height: 2.75rem; padding: .6rem .75rem; font: inherit; color: var(--text); text-align: left; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.results__item:hover { border-color: var(--primary); }
.results__item[aria-pressed="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.position { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; margin: 0; padding: .6rem .75rem; border-radius: 8px; background: var(--bg); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.position__label { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
textarea { resize: vertical; }

/* Bandeau « Mise à jour disponible » (US-F2) : fixé en bas, au-dessus du bouton + (z-index 20). */
.sw-update {
    position: fixed; z-index: 30; margin: 0;
    left: max(.75rem, env(safe-area-inset-left)); right: max(.75rem, env(safe-area-inset-right)); bottom: max(.75rem, env(safe-area-inset-bottom));
    max-width: 32rem; margin-inline: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

/* Bandeau d'état du réseau (US-F7) : même emplacement que « Mise à jour disponible » ; remonté au-dessus de lui quand les deux sont visibles. */
.net-status {
    position: fixed; z-index: 30; display: flex; align-items: center; gap: .5rem;
    left: 50%; transform: translateX(-50%); bottom: max(.75rem, env(safe-area-inset-bottom)); max-width: calc(100% - 1.5rem);
    padding: .35rem .5rem .35rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.net-status[data-state="offline"] { background: var(--warn-bg); color: var(--warn-text); }
.net-status[data-state="online"] { background: var(--ok-bg); color: var(--ok-text); }
.net-status[data-state="sync"] { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.net-status[data-state="sync"] .net-status__dot { animation: net-status-pulse 1.2s ease-in-out infinite; }
@keyframes net-status-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .net-status[data-state="sync"] .net-status__dot { animation: none; } }
.net-status__dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.net-status__text { min-width: 0; overflow-wrap: anywhere; }
.net-status .btn { flex: none; min-height: 2.75rem; }
.sw-update:not([hidden]) ~ .net-status { bottom: calc(max(.75rem, env(safe-area-inset-bottom)) + 5.5rem); }

/* Déconnexion (US-F8) : choix d'effacer la copie locale. Boutons pleine largeur, zones tactiles de 2,75 rem. */
.logout-dialog { width: min(28rem, calc(100% - 1.5rem)); padding: 1.25rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.logout-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.logout-dialog__title { margin: 0 0 .5rem; font-size: 1.15rem; }
.logout-dialog p { margin: 0 0 .75rem; }
.logout-dialog__status { color: var(--danger); font-weight: 600; }
.logout-dialog__status[hidden] { display: none; }
.logout-dialog__actions { display: grid; gap: .5rem; margin-top: 1rem; }
.logout-dialog__actions .btn { min-height: 2.75rem; }

/* Favori, note en étoiles et étiquettes (US-C5). Toutes les zones tactiles font au moins 2,75 rem (44 px) ; couleur des étoiles : `--star` (contraste suffisant en clair et en sombre). */
.icon-star { flex: none; vertical-align: -.2em; margin-right: .35rem; color: var(--star); }
.rating-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.rating-field legend { padding: 0; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.stars { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.stars__row { position: relative; display: flex; flex-direction: row-reverse; justify-content: flex-end; } /* étoiles dans le DOM de 5 à 1 : `~` allume celles « avant » la choisie */
.stars__row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.stars__row label { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; font-size: 1.75rem; line-height: 1; color: var(--muted); cursor: pointer; }
.stars__row input:checked ~ label, .stars__row label:hover, .stars__row label:hover ~ label { color: var(--star); }
.stars__row input:focus-visible + label { outline: 3px solid var(--primary-ink); outline-offset: -3px; border-radius: 8px; }
.stars__none { margin: 0; }
.marks { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.marks__fav { display: inline-flex; align-items: center; }
.marks__fav[aria-pressed="true"] { border-color: var(--star); }
.marks__fav[aria-pressed="true"] .icon-star path { fill: currentColor; }
.marks__status { min-height: 1.25rem; margin: 0; font-size: .875rem; font-weight: 600; }
.marks__status:empty { min-height: 0; }
.rate { display: flex; }
.rate__star { min-width: 2.75rem; min-height: 2.75rem; padding: 0; font: inherit; font-size: 1.75rem; line-height: 1; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.rate__star.is-on { color: var(--star); }
.rate__star:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: -3px; border-radius: 8px; }
.rate__star:disabled, .marks__fav:disabled { opacity: .6; cursor: progress; }
.tag-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-block; padding: .1rem .6rem; font-size: .85rem; font-weight: 600; border-radius: 999px; background: var(--border); color: var(--text); }
.tag--sm { padding: 0 .5rem; font-size: .75rem; }
.point-row__marks { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; font-size: .85rem; }
.mark--rating { color: var(--star); letter-spacing: .05em; }
.mark--fav .icon-star { margin-right: 0; }
.point-marks { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin-bottom: .5rem; }
.point-marks[hidden] { display: none; }
.point-marks__row { display: flex; align-items: center; gap: .5rem; }
.point-marks__row label { font-weight: 600; font-size: .9rem; }
.point-marks__row select { width: auto; min-height: 2.75rem; }

/* ===================================================================================================================================
   Pages « carte » (accueil, groupe, point) : la carte occupe l'écran, les volets flottent dessus.
   Bureau (≥ 900 px) : barre du haut (logo, recherche, apparence + compte), volet à gauche, aperçu / fiche à droite.
   Mobile : barre de recherche, puces, feuille du bas, barre d'onglets.
   =================================================================================================================================== */
.shell { --controls-top: 8.75rem; position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.shell:has(.group-page) { --controls-top: 5.25rem; }
.stage { display: contents; }
.shell__map { position: absolute; inset: 0; z-index: 0; }
.shell .map { display: block; }
.shell .map__canvas, .shell .map__canvas.leaflet-container { height: 100%; min-height: 0; border: 0; border-radius: 0; }

/* Barre du haut */
.shell__top { position: absolute; z-index: 20; top: calc(env(safe-area-inset-top, 0px) + 1.5rem); left: 1.5rem; right: 1.5rem; display: grid; grid-template-columns: 1fr minmax(0, 31rem) 1fr; align-items: start; gap: 1rem; pointer-events: none; }
.shell__top > * { pointer-events: auto; }
.shell__top .brand-chip { justify-self: start; }
.shell__top .tools { justify-self: end; }
.shell__top--narrow { display: none; }
.chips { display: none; }
.searchbox { position: relative; display: flex; align-items: center; min-height: 3rem; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.searchbox__icon { position: absolute; left: 1rem; display: grid; color: var(--muted); pointer-events: none; }
.searchbox__logo { display: none; position: absolute; left: .4rem; top: 50%; transform: translateY(-50%); }
.searchbox__logo img { display: block; border-radius: 10px; }
.searchbox input[type="search"] { min-height: 3rem; padding: .6rem 1rem .6rem 2.9rem; border: 0; border-radius: var(--radius); background: transparent; font-size: .95rem; text-overflow: ellipsis; }
.searchbox input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.searchbox__results { position: absolute; top: calc(100% + .5rem); left: 0; right: 0; z-index: 30; max-height: 50dvh; margin: 0; padding: .35rem; overflow-y: auto; list-style: none; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.searchbox__results a { display: grid; min-height: 2.75rem; padding: .45rem .75rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.searchbox__results a:hover, .searchbox__results a:focus-visible { background: var(--surface-2); }
.searchbox__results small, .searchbox__empty { color: var(--muted); }
.searchbox__empty { padding: .75rem; }

/* Volets */
.panel {
    position: absolute; z-index: 10; left: 1.5rem; top: 6.25rem; bottom: 1.5rem; display: flex; flex-direction: column; width: 25rem; max-width: calc(100vw - 3rem);
    background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(16px); overflow: hidden;
}
.panel--list { width: 25.5rem; }
.panel__grip { display: none; }
.panel__handle { display: none; }
.panel__head { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem .75rem; }
.panel__titles { flex: 1; min-width: 0; }
.panel__title { font-size: 1.65rem; overflow-wrap: anywhere; }
.panel__sub { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.locate-note { overflow-wrap: anywhere; }
.locate-note[hidden] { display: none; }
.panel__body { flex: 1; min-height: 0; padding: .25rem 1.25rem 1rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.panel__foot { display: flex; justify-content: center; padding: .5rem 1.25rem 1rem; }
.panel__head .panel__new { display: none; }
.panel__admin { margin: 1rem 0 0; font-size: .9rem; }
.link-btn { min-height: 2.75rem; padding: 0 .5rem; border: 0; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.link-btn:hover { color: var(--primary-ink); }
.btn-pill { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 .6rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.panel--list .panel__head { padding-inline: 1rem; gap: .6rem; }

/* Menu « ⋯ » du groupe */
.menu { position: relative; }
.menu__list { position: absolute; top: calc(100% + .35rem); right: 0; z-index: 20; display: grid; min-width: 14.5rem; padding: .35rem; background: var(--surface); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.menu__list button, .menu__list a { display: flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .75rem; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.menu__list a { text-decoration: none; }
.menu__list button:hover, .menu__list a:hover { background: var(--surface-2); }
.menu__list a[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.menu__list .is-danger { color: var(--danger); }

/* Aperçu du point sélectionné (page d'un groupe) */
.peek { position: absolute; z-index: 11; right: 1.5rem; top: 6.25rem; width: 23rem; max-height: calc(100dvh - 7.75rem); padding: 1.25rem; overflow-y: auto; background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.peek__close { position: absolute; top: .6rem; right: .6rem; }
.peek__title { padding-right: 2.75rem; font-size: 1.65rem; overflow-wrap: anywhere; }
.peek__title a { color: var(--text); text-decoration: none; }
.peek__sub { margin: .25rem 0 .5rem; color: var(--muted); }
.peek__sub:empty { display: none; }
.peek__rate { display: flex; align-items: center; gap: 1rem; margin: 0 0 1rem; color: var(--star-fill); font-size: 1.15rem; letter-spacing: .1em; }
.peek__rate:not(:has(:not([hidden]))) { display: none; }
.peek__dist { display: inline-flex; align-items: center; padding: .2rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--tint-blue) 16%, var(--surface)); color: var(--tint-blue); font-size: .85rem; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.peek__narrow { display: none; } /* mot court des tuiles : seulement sur mobile (feuille du bas) */
.peek__fav { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .9rem; font-weight: 600; letter-spacing: 0; }
.peek__fav .ico { color: #ef5d6c; fill: currentColor; }
.peek__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.peek__actions .btn { flex: 1; }
/* Météo (US-J7) : sur bureau, une ligne à part sous « Y aller » et « Ouvrir la fiche » ; sur mobile, à côté de « Y aller » (voir plus bas). */
.peek__actions .peek__weather { flex: 1 1 100%; }
/* Boussole (US-R1) : à côté de « Météo » (même rang) ; sur mobile, icône seule comme « Autour de… » (voir plus bas). */
.peek__actions .peek__compass { flex: 1 1 100%; }
/* Autour de… (US-J9) : sur bureau, une ligne à part avec son texte ; sur mobile, un bouton carré à côté de « Y aller » et « Météo » (voir plus bas). */
.peek__actions .peek__around { flex: 1 1 100%; }
.peek__weather-note { margin: -.25rem 0 .75rem; }
.btn[aria-disabled="true"], .action[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.peek__modes { display: flex; gap: .5rem; margin-bottom: .75rem; }
/* Mode de déplacement (US-J6) : fiche et aperçu. Le mode gardé est inversé et précédé d'une coche (jamais la couleur seule). */
.mode-link { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: .3rem; min-height: 2.75rem; padding: 0 .5rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 700; text-align: center; text-decoration: none; }
.mode-link:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.mode-link[aria-current="true"] { background: var(--text); color: var(--surface); }
.mode-link[aria-current="true"]::before { content: "✓"; }
.peek__facts { margin: 0; }
.peek__row { display: grid; gap: .1rem; padding: .7rem 0; border-top: 1px solid var(--border); }
.peek__row dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.peek__row dd { margin: 0; overflow-wrap: anywhere; }
.peek__note { white-space: pre-wrap; } /* texte simple : le Markdown de la note y est dépouillé de sa syntaxe (`plainNote`, points.js) */
.peek__status { display: block; font-size: .85rem; font-weight: 600; }
.peek__status:empty { display: none; }
.list-pill { display: none; }

/* Commandes de la carte : zoom, ma position. */
.shell .leaflet-top.leaflet-left { top: auto; bottom: 2.25rem; left: auto; right: 1.5rem; }
.shell .leaflet-top .leaflet-control { margin: 0; }
.shell .leaflet-bar { border: 0; box-shadow: none; background: none; }
.shell .leaflet-bar a.leaflet-control-zoom-in, .shell .leaflet-bar a.leaflet-control-zoom-out { margin-top: .5rem; border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.shell .map__tools { position: absolute; z-index: 5; right: 1.5rem; bottom: 8.75rem; display: block; }
.shell .map__locate-status { position: absolute; right: 3.5rem; top: 1.375rem; transform: translateY(-50%); width: max-content; max-width: 16rem; padding: .35rem .6rem; border-radius: 10px; background: var(--panel); box-shadow: var(--shadow-sm); font-size: .8rem; }
.stage:has(.peek:not([hidden])) .leaflet-top.leaflet-left, .stage:has(.peek:not([hidden])) .map__tools { right: 25.5rem; }
.shell .map__notice { position: absolute; z-index: 5; top: 5.25rem; left: 50%; transform: translateX(-50%); width: min(30rem, calc(100% - 3rem)); box-shadow: var(--shadow-sm); text-align: center; }
.shell .map__hint { position: absolute; z-index: 5; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(22rem, calc(100% - 3rem)); padding: .85rem 1rem; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); text-align: center; }
.shell__notices { position: absolute; z-index: 40; top: 5.5rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; width: min(32rem, calc(100% - 1.5rem)); pointer-events: none; }
.shell__notices > * { margin: 0; pointer-events: auto; box-shadow: var(--shadow-sm); }
.shell__notices:empty, .shell__notices:not(:has(*:not([hidden]))) { display: none; }

/* Fiche d'un point : page qui défile (voir « Page d'un point » plus bas) */
.point-page__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .5rem; }
.group-tag { display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding: 0 .7rem; border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 700; text-decoration: none; }
.group-tag__dot, .group-chip__dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--group-color, var(--primary)); }
.point-page__title { font-size: 1.9rem; overflow-wrap: anywhere; }
.point-page__sub { margin: .25rem 0 0; color: var(--muted); }
.point-page__meta { margin: 1rem 0 0; color: var(--muted); font-size: .85rem; }
.marks { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin: .75rem 0 1rem; }
.rate { display: flex; margin-left: -.35rem; }
.rate__star { min-width: 2.25rem; font-size: 1.6rem; color: var(--field-border); }
.rate__star.is-on { color: var(--star-fill); }
.marks__fav { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .5rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.marks__fav[aria-pressed="true"] { color: #ef5d6c; }
.marks__fav[aria-pressed="true"] .ico { fill: currentColor; }
.marks__fav:disabled { opacity: .6; cursor: progress; }
.marks__status { flex-basis: 100%; }
.marks .alert { flex-basis: 100%; margin: 0; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.actions__ctl { display: contents; }
.action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 4.25rem; padding: .5rem .25rem; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.action:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.action--primary { order: 1; background: var(--primary); color: var(--primary-text); }
.action--primary:hover { background: var(--primary); filter: brightness(1.06); }
.action--share { order: 2; }
.action--edit { order: 3; }
.action--danger { order: 4; color: var(--danger); }
.actions__modes { grid-column: 1 / -1; order: 5; display: flex; gap: .5rem; }
.actions__note { grid-column: 1 / -1; order: 6; margin: 0; }
/* Météo (US-J7) : une ligne pleine largeur sous les modes de déplacement, puis sa phrase hors ligne. */
.action--weather { grid-column: 1 / -1; order: 7; flex-direction: row; min-height: 2.75rem; }
.actions__note--weather { order: 8; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0 0; }
.stat { display: flex; flex-direction: column-reverse; padding: .75rem .9rem; border-radius: 14px; background: var(--surface-2); }
.stat dd { margin: 0; font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; white-space: nowrap; }
.stat dt { color: var(--muted); font-size: .8rem; }
.facts { margin: 1rem 0 0; }
.facts__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--border); }
.facts__row dt { flex: none; color: var(--muted); }
.facts__row dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.facts__coords { margin-right: .25rem; user-select: all; }
.fold { border-top: 1px solid var(--border); }
.fold > summary { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; list-style: none; font-weight: 700; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "›"; color: var(--muted); font-size: 1.4rem; transition: transform .15s; }
.fold[open] > summary::after { transform: rotate(90deg); }
.fold__body { padding-bottom: 1rem; }
.fold .alert { margin: 0 0 .75rem; }

/* Barre d'onglets (mobile) */
.tabbar { display: none; }

/* ===== Mobile ===== */
@media (max-width: 56.24rem) {
    .shell__top { top: calc(env(safe-area-inset-top, 0px) + .75rem); left: .75rem; right: .75rem; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
    .shell__top--wide { display: none; }
    .shell__top .brand-chip { display: none; }
    .searchbox { grid-area: 1 / 1; }
    .searchbox__icon { display: none; }
    .searchbox__logo { display: block; }
    .searchbox input[type="search"] { padding-left: 3.6rem; padding-right: 3.4rem; }
    .shell__top .tools { position: relative; z-index: 1; grid-area: 1 / 1; align-self: center; margin-right: .4rem; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
    .shell__top .tools .icon-btn { display: none; } /* l'apparence se change dans l'onglet « Compte » */
    .chips { grid-column: 1; display: flex; gap: .5rem; padding: .1rem .1rem .35rem; overflow-x: auto; scrollbar-width: none; }
    .chip { display: inline-flex; flex: none; align-items: center; gap: .45rem; min-height: 2.5rem; padding: 0 .9rem; border: 0; border-radius: var(--radius-sm); background: var(--panel); box-shadow: var(--shadow-sm); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
    .chip[aria-pressed="true"] { background: var(--text); color: var(--surface); }
    .chip__dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--group-color, var(--primary)); }
    .chip sup { font-size: .7rem; }
    .shell__top--narrow { display: flex; align-items: center; gap: .5rem; }
    .group-chip { display: flex; flex: 1; align-items: center; gap: .5rem; min-width: 0; min-height: 2.75rem; margin: 0; padding: 0 1rem; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); font-family: var(--font-display); font-weight: 700; }
    .group-chip__count { margin-left: auto; color: var(--muted); font-family: var(--font-mono); font-size: .85rem; font-weight: 400; }

    /* Feuille du bas */
    .panel { left: 0; right: 0; top: auto; bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; max-height: 44dvh; border-radius: 28px 28px 0 0; }
    .panel--list { width: auto; display: none; }
    .is-expanded .panel--list { display: flex; height: 60dvh; max-height: none; }
    .shell--map-only .panel { display: none; }
    .panel__grip { display: block; width: 2.5rem; height: .3rem; margin: .6rem auto 0; border-radius: 99px; background: var(--border); }
    .panel__head { padding: .6rem 1.1rem .5rem; }
    .panel__title { font-size: 1.5rem; }
    .panel:not(.panel--list) .panel__sub { display: none; }
    .panel__all, .panel__foot { display: none; }
    .panel--list .panel__foot { display: flex; padding-block: .25rem .5rem; }
    .panel__head .panel__new { display: inline-flex; }
    .panel__body { padding-inline: 1.1rem; }
    .group-row__go { display: grid; }
    .group-check { display: none; }

    .list-pill { position: absolute; z-index: 12; left: 50%; bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; transform: translateX(-50%); border: 0; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
    .stage:has(.peek:not([hidden])) .list-pill { bottom: calc(5.75rem + 14.5rem + env(safe-area-inset-bottom, 0px)); }
    .is-expanded .list-pill { bottom: calc(5rem + 60dvh + .75rem + env(safe-area-inset-bottom, 0px)); }
    .peek { left: .75rem; right: .75rem; top: auto; bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)); width: auto; max-height: none; padding: 1rem 1.1rem; border-radius: 20px; overflow: visible; }
    .is-expanded .peek { display: none; }
    .peek__title { font-size: 1.3rem; }
    .peek__facts, .peek__sheet { display: none; }
    .peek__actions, .peek__modes { margin: .5rem 0 0; }
    .peek__actions .peek__weather { flex: 1; } /* US-J7 : « Ouvrir la fiche » est caché, « Météo » prend sa place à côté de « Y aller » : l'aperçu ne gagne pas de ligne */
    .peek__actions .btn { padding-inline: .6rem; } /* US-J9 : trois boutons sur une ligne, même à 320 px */
    .peek__actions .peek__compass { flex: none; width: 2.75rem; padding: 0; } /* US-R1 : icône seule, le texte reste lu par les lecteurs d'écran */
    .peek__actions .peek__around { flex: none; width: 2.75rem; padding: 0; } /* US-J9 : icône seule (3 boutons sur une ligne, même à 320 px) ; le texte reste lu par les lecteurs d'écran */
    .peek__compass-text, .peek__around-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
    .peek__weather-note { margin: .5rem 0 0; }
    .stage:has(.peek:not([hidden]) .peek__weather-note:not([hidden])) .list-pill { bottom: calc(5.75rem + 14.5rem + 2.75rem + env(safe-area-inset-bottom, 0px)); } /* hors ligne, l'aperçu gagne la phrase d'explication */
    .peek__rate { margin-bottom: .25rem; }

    /* Commandes de la carte : colonne à droite, sous les puces. */
    .shell .leaflet-top.leaflet-left { top: var(--controls-top); bottom: auto; right: .75rem; }
    .shell .map__tools { top: calc(var(--controls-top) + 6.7rem); bottom: auto; right: .75rem; }
    .stage:has(.peek:not([hidden])) .leaflet-top.leaflet-left, .stage:has(.peek:not([hidden])) .map__tools { right: .75rem; }
    .shell .map__notice { top: calc(var(--controls-top) - .25rem); left: .75rem; right: 4rem; width: auto; transform: none; }
    .shell__notices { top: calc(var(--controls-top) - .5rem); left: .75rem; right: 4rem; width: auto; transform: none; }
    .shell .leaflet-control-attribution { margin-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
    .shell .map__hint { top: 40%; }

    .tabbar {
        position: fixed; z-index: 30; left: .9rem; right: .9rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); height: 4rem;
        display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .25rem; padding: .35rem; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); backdrop-filter: blur(16px);
    }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; border-radius: 16px; color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
    .tabbar a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
    .tabbar a[aria-current="page"] .ico { color: var(--primary-ink); }
    .sw-update { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
    .net-status { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
    .sw-update:not([hidden]) ~ .net-status { bottom: calc(10.5rem + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 56.25rem) {
    .panel--list { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .fold > summary::after { transition: none; } }

/* Catégories de points (US-J4). La couleur vient de `--group-color`, posée par le contrôleur `tint` sur la ligne ou la pastille ; le nom est toujours écrit à côté (US-H2). */
.category-dot { flex: none; width: .9rem; height: .9rem; border-radius: 50%; background: var(--group-color, var(--primary)); }
.category-chip { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; overflow-wrap: anywhere; }
.category-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.category-row { display: flex; align-items: center; gap: .85rem; min-height: 3.25rem; padding: .35rem .5rem; border-radius: var(--radius-sm); }
.category-row:hover { background: var(--surface-2); }
.category-row__text { display: grid; flex: 1; min-width: 0; gap: .05rem; }
.category-row__name { font-family: var(--font-display); font-weight: 700; overflow-wrap: anywhere; }
.category-row__count { color: var(--muted); font-size: .85rem; }

/* Voir par catégorie (US-J5). `.is-by-category` (posée par `point-list` sur la page) fait suivre aux points de la liste et aux repères la couleur de leur catégorie (`--cat`) ;
   sans `--cat` (point sans catégorie), ils gardent celle du groupe. Les puces tiennent lieu de légende : leur pastille apparaît dès que la page est colorée par catégorie (toujours, quand il y a des catégories). */
.group-page.is-by-category .point-row__dot { background: var(--cat, var(--group-color, var(--primary))); }
.group-page.is-by-category .map-pin__dot { color: var(--cat, var(--group-color, var(--pin, #09b7da))); background: currentColor; }
.category-box { display: grid; gap: .6rem; margin-bottom: .75rem; }
.category-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.category-chip-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: 0 .85rem; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.category-chip-btn:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.category-chip-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--primary); }
.category-chip-btn__count { color: var(--muted); font-weight: 500; }
.category-chip-btn .category-dot { display: none; }
.group-page.is-by-category .category-chip-btn .category-dot { display: block; }
.category-box__hint { margin: 0; }
/* Autour de… (US-J9) : menu « Autour de… » et curseur de rayon, dans la feuille « Filtres ». Cibles de 44 px au moins. */
.around-box { display: grid; gap: .25rem; }
.around-box__radius { display: flex; align-items: center; gap: .75rem; }
.around-box__radius label { flex: none; font-size: .9rem; font-weight: 600; }
.around-box__radius input[type="range"] { flex: 1 1 auto; box-sizing: border-box; min-width: 0; min-height: 2.75rem; margin: 0; padding: 0; accent-color: var(--primary); }
.around-box__radius output { flex: none; min-width: 3.5rem; font-family: var(--font-mono); font-size: .9rem; text-align: right; }
.around-box__hint, .around-box .point-sort__status { margin: 0; }
/* Le cercle du rayon sur la carte (tirets) : le tracé est posé par Leaflet ; la classe permet de l'adapter sans toucher au code. */
.map-around { pointer-events: none; }
.map-popup__category { display: flex; align-items: center; gap: .4rem; margin: .15rem 0 0; font-size: .8rem; color: #475569; }

/* ===== Fiche d'un point : la carte en tête de page, pleine largeur, et par-dessus (bureau) la carte du titre, Modifier / Supprimer, les chiffres de l'itinéraire et les commandes de la carte.
   Dessous : deux colonnes sur bureau (note, photos, aperçu à gauche ; navigation, infos, IA, options à droite) ; sur mobile tout s'empile : carte, titre, chiffres, actions, puis les cartes dans l'ordre de `order`. ===== */
.point-view .breadcrumb { margin: 0 0 .5rem; }
.point-view__back { gap: .25rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.point-view__back:hover { color: var(--text); }
.point-view .card__title--sm { margin-bottom: .75rem; }
.point-view .point-more { padding-block: .25rem; }
.point-view .point-more > .fold:first-child, .point-view .point-more > .fold-row:first-child { border-top: 0; } /* le filet sépare deux rubriques : pas au-dessus de la première (« Mode rando ici ») */
.point-view .point-note .markdown { padding-bottom: 0; font-size: 1rem; line-height: 1.55; text-align: left; }
.point-view .point-note .markdown h3 { font-size: 1.05rem; }
.point-view .point-page__meta { margin: 0 0 1rem; text-align: center; }

/* La tête (mobile d'abord) : carte, titre, chiffres, actions, l'un sous l'autre. */
.point-stage { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.point-stage > .point-map { order: 1; margin: 0; }
.point-stage > .point-hero { order: 2; }
.point-stage > .point-stats { order: 3; }
.point-stage > .point-hero__actions { order: 4; }
.point-stage .point-hero { margin: 0; padding: .25rem .25rem 0; border: 0; background: none; border-radius: 0; }
.point-hero .point-page__top { margin-bottom: .6rem; }
.point-view .point-page__title { font-size: clamp(1.7rem, 6vw, 2rem); line-height: 1.12; letter-spacing: -.02em; }
.point-hero .marks { margin: .5rem 0 0; }
.point-hero .alert { margin: .75rem 0 0; }
.point-hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.point-hero__actions .btn { gap: .4rem; min-height: 2.75rem; }
.point-hero__expand { display: none; } /* mobile : « Agrandir » de la carte ouvre la feuille ; le lien vers la trace en grand est dans cette feuille */

/* Chiffres de l'itinéraire : des pastilles sombres (distance, D+, D−), lisibles sur la carte comme sur le fond de la page. */
.point-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.point-stats .stat { padding: .6rem .85rem; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--on-ink) 14%, transparent), var(--shadow-sm); }
.point-stats .stat dd { font-size: 1.15rem; line-height: 1.25; }
.point-stats .stat dt { color: color-mix(in srgb, var(--on-ink) 78%, transparent); font-size: .75rem; }

/* Sous la tête. Mobile : les deux colonnes s'effacent et chaque carte prend son rang ; bureau : voir plus bas. */
.point-view__grid { display: flex; flex-direction: column; }
.point-view__col { display: contents; }
.point-nav-card { order: 1; }
.point-note { order: 2; }
.point-infos { order: 3; }
.point-photos, .point-photos-note { order: 4; }
.point-nearby { order: 6; }
.point-more { order: 7; }
.point-view__grid .point-page__meta { order: 8; }

/* L'encart de la carte : `isolation` garde les volets de Leaflet (z-index jusqu'à 1000) sous la barre du haut quand la page défile. */
.point-map { position: relative; padding: 0; overflow: hidden; isolation: isolate; }
.point-map .map { display: block; }
.point-map .map__canvas, .point-map .map__canvas.leaflet-container { height: 17rem; min-height: 14rem; border: 0; border-radius: 0; }
.point-map .map--track .map__canvas, .point-map .map--track .map__canvas.leaflet-container { height: 22rem; }
.point-map .map__notice { margin: .5rem; }

/* « Agrandir » : sur mobile, la carte s'ouvre en FEUILLE qui monte du bas, sur toute la largeur (convention AGENTS.md, comme l'aperçu d'un point) ; sur bureau, la carte de la fiche est déjà grande :
   le bouton et la feuille n'existent pas, et seul le lien vers la trace en grand (points avec itinéraire, `.point-hero__expand`, avec Modifier et Supprimer) reste. */
.map-expand--sheet, .map-sheet { display: none; }
.map-sheet { position: fixed; inset: auto 0 0 0; z-index: 40; width: 100%; max-width: none; height: 92dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; color: var(--text); background: var(--surface); border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .35); }
.map-sheet::backdrop { background: rgba(0, 0, 0, .5); }
.map-sheet[open] { display: flex; flex-direction: column; animation: peek-sheet-up .22s ease-out; }
.map-sheet__head { position: relative; display: flex; align-items: center; gap: .5rem; padding: 1.4rem .75rem .5rem 1.1rem; }
.map-sheet__head::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
.map-sheet__title { margin: 0; font-size: 1.25rem; }
.map-sheet__close { margin-left: auto; }
.map-sheet__track { margin-left: auto; min-height: 2.75rem; }
.map-sheet__track + .map-sheet__close { margin-left: 0; }
.map-sheet__body { position: relative; flex: 1; min-height: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
/* La feuille est dans `.point-map` : les sélecteurs repartent de lui pour l'emporter sur la hauteur de la mini-carte. */
.point-map .map-sheet__body .map { display: block; height: 100%; }
.point-map .map-sheet__body .map__canvas, .point-map .map-sheet__body .map__canvas.leaflet-container, .point-map .map-sheet__body .map--track .map__canvas, .point-map .map-sheet__body .map--track .map__canvas.leaflet-container { height: 100%; min-height: 0; border: 0; border-radius: 0; }
.point-map .map-sheet__body .map__notice { position: absolute; z-index: 1001; left: .75rem; right: .75rem; bottom: 2.25rem; margin: 0; box-shadow: var(--shadow-sm); text-align: center; }
html:has(.map-sheet[open]) { overflow: hidden; }
@media (max-width: 56.24rem) {
    .point-map .map-expand--sheet { display: inline-flex; }
}
@media (min-width: 56.25rem) { .map-sheet, .map-sheet[open] { display: none; } }
@media (prefers-reduced-motion: reduce) { .map-sheet[open] { animation: none; } }

/* Navigation : une rangée qui passe à la ligne. « Y aller » et les modes prennent toute la largeur, « Météo » et « Partager » se partagent la suivante (seul, « Météo » la prend entière). */
/* Carte « Y aller » de la fiche (et de la page publique d'un point) : un seul gros bouton, le mode de déplacement en commutateur à icônes juste dessous,
   puis une rangée d'actions secondaires légères (Météo · Partager · Autour d'ici) sous un filet. Les enveloppes des contrôleurs restent en `display: contents`.
   Le mode gardé est plein (couleur du sélecteur de vues) ; `aria-current` le dit aux lecteurs d'écran. */
.point-nav { display: grid; gap: .75rem; }
.point-nav .actions__ctl { display: contents; }
.point-nav .action--primary { order: 1; flex-direction: row; min-height: 3.5rem; font-size: 1rem; }
.point-nav .actions__modes { order: 2; gap: .15rem; padding: .25rem; border-radius: 999px; background: var(--surface-2); }
.point-nav .mode-link { min-height: 2.5rem; padding: 0 .35rem; border-radius: 999px; background: none; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.point-nav .mode-link:hover { background: none; color: var(--text); }
.point-nav .mode-link[aria-current="true"] { background: var(--seg-on-bg); color: var(--seg-on-text); }
.point-nav .mode-link[aria-current="true"]::before { content: none; }
/* Cinq actions en grille de colonnes égales (avant : des largeurs inégales selon le libellé) ; les messages prennent toute la ligne. */
.point-nav__more { order: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .25rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.point-nav__more > .actions__ctl { display: flex; flex-wrap: wrap; min-width: 0; }
.point-nav__more--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* page publique d'un point : deux actions */
.point-nav__more > .actions__ctl[hidden] { display: none; }
.point-nav__more .action > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.point-nav__more .action { order: 0; flex: 1 1 0; box-sizing: border-box; min-width: 0; min-height: 3.5rem; flex-direction: column; gap: .3rem; padding: .5rem .25rem; background: none; color: var(--text); font-size: .8rem; }
.point-nav__more .action:hover, .point-nav__more .share-menu[open] > summary { background: var(--surface-2); }
.point-nav__more .action .ico { color: var(--primary-ink, var(--primary)); }
.point-nav__more .share-menu { flex: 1 1 0; min-width: 0; }
.point-nav__more .share-menu > summary { width: 100%; list-style: none; }
.point-nav__more .share-menu > summary::-webkit-details-marker { display: none; }
.point-nav__more .actions__note { flex: 1 1 100%; order: 5; margin: 0; }
/* Un message (météo hors ligne, partage) passe sous la grille, sur toute la largeur, au lieu d'écraser sa colonne. */
.point-nav__more > .actions__ctl:has(> .actions__note:not([hidden]):not(:empty)) { display: contents; }
.point-nav__more > .actions__ctl:has(> .actions__note:not([hidden]):not(:empty)) > .actions__note { grid-column: 1 / -1; order: 9; }
.point-nav__more .point-share__status:empty { display: none; }
.menu__list .is-danger .ico { color: var(--danger); }
/* Point partagé (lien public actif) : un point vert sur l'icône « Partager ». */
.point-nav__more .action--share { position: relative; }
.point-nav__more .share-menu:has(.point-share__stop:not([hidden])) > .action--share::after { content: ""; position: absolute; top: .35rem; left: calc(50% + .7rem); width: .7rem; height: .7rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--ok-text, #1e7a43); }
@media (max-width: 23rem) { .point-nav .mode-link .ico { display: none; } } /* très petit écran : le libellé suffit */
/* Mobile : conformément à AGENTS.md, le menu s'ouvre en feuille qui monte du bas, sur toute la largeur ; sur grand écran c'est un menu déroulant sous le bouton. */
@media (max-width: 56.24rem) {
    .share-menu .menu__list {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; min-width: 0;
        padding: 1.4rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); border-radius: 1.75rem 1.75rem 0 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
        animation: peek-sheet-up .22s ease-out;
    }
    .share-menu .menu__list::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
    .share-menu .menu__list button { min-height: 3.25rem; }
}
@media (prefers-reduced-motion: reduce) { .share-menu .menu__list { animation: none; } }
@media (min-width: 56.25rem) {
    /* La tête : une carte de 26 à 34 rem de haut, et par-dessus, aux quatre coins, ce qui était au-dessus et à côté. */
    .point-stage { display: block; position: relative; margin-bottom: 1.25rem; }
    .point-stage .point-map .map__canvas, .point-stage .point-map .map__canvas.leaflet-container,
    .point-stage .point-map .map--track .map__canvas, .point-stage .point-map .map--track .map__canvas.leaflet-container { height: clamp(26rem, 58dvh, 34rem); }
    /* Le cadrage de la carte évite la carte du titre (`--map-cover-left`, en px : voir `map_controller.js`). */
    .point-stage .point-map { --map-cover-left: 464px; }
    .point-stage .point-hero { position: absolute; z-index: 3; top: 1rem; left: 1rem; box-sizing: border-box; width: min(27rem, 42%); max-height: calc(100% - 2rem); overflow-y: auto; padding: 1.25rem 1.5rem 1.35rem; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
    .point-view .point-page__title { font-size: clamp(1.7rem, 2.3vw, 2.15rem); }
    .point-hero__actions { position: absolute; z-index: 3; top: 1rem; right: 1rem; display: flex; gap: .5rem; }
    .point-hero__actions .btn { background: var(--panel); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
    .point-hero__actions .btn:hover { background: var(--surface); }
    .point-hero__actions .btn--danger { color: var(--danger); }
    .point-hero__expand { display: inline-flex; }
    .point-stage > .point-stats { position: absolute; z-index: 3; left: 1rem; bottom: 1rem; display: flex; gap: .5rem; }
    /* Les commandes de la carte passent en bas à droite : le zoom au-dessus du bouton « couches », dont la liste se déplie vers le haut. Seule la carte de la page : celle de la feuille mobile garde les siennes. */
    .point-map > .map .leaflet-top.leaflet-right { top: auto; bottom: 1.75rem; }
    .point-map > .map .leaflet-top.leaflet-left { top: auto; left: auto; right: 0; bottom: 5.9rem; }
    .point-map > .map .leaflet-top.leaflet-left .leaflet-control { margin-left: 0; margin-right: 10px; }
    .point-map > .map .basemap-control { flex-direction: column-reverse; }
    /* Le curseur « Explorer le tracé » : en bas, entre les chiffres de l'itinéraire et les commandes. */
    .point-stage .point-map .sp__bottom { left: 29rem; right: 5rem; bottom: 1.25rem; justify-items: end; }
    .point-stage .point-map .sp__scrub { justify-self: end; width: 100%; max-width: 26rem; }

    /* Dessous : deux colonnes. */
    .point-view__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); align-items: start; column-gap: 1.25rem; }
    .point-view__col { display: block; min-width: 0; }
    .point-view__col--a { grid-column: 1; }
    .point-view__col--b { grid-column: 2; }
}

/* Carte « Infos » : pas de titre, trois lignes aérées ; la catégorie est une pastille de sa couleur (le nom reste écrit). */
.point-infos .facts { margin: 0; }
.point-infos .facts__row { padding: 1rem 0; }
.point-infos .facts__row:first-child { border-top: 0; padding-top: .25rem; }
.point-infos .facts__row:last-child { padding-bottom: .25rem; }
.point-infos .facts__row dt { font-size: 1rem; }
.point-infos .facts__coords { font-size: .85rem; }
.point-infos .icon-btn--sm { background: var(--surface-2); border-radius: 12px; }
.point-infos .icon-btn--sm:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.point-infos .category-chip { padding: .2rem .75rem; border-radius: 999px; font-size: .85rem; background: color-mix(in srgb, var(--group-color, var(--primary)) 16%, var(--surface)); color: color-mix(in srgb, var(--group-color, var(--primary)) 45%, var(--text)); }
.point-infos .tag { font-size: .85rem; }

/* « Que faire autour ? » : pictogramme IA et pastille « IA » dans le titre. */
.point-nearby .nearby > summary { padding: 0 .9rem; font-size: .92rem; }
.point-nearby__title { display: flex; align-items: center; gap: .5rem; }
.point-nearby__title .ico { flex: none; color: var(--primary-ink, var(--primary)); }
.badge-ai { padding: .05rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--primary-ink); font-family: var(--font-sans); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }

/* Photos : une mosaïque (la première plus grande dès qu'il y en a trois), « Ajouter des photos » en bouton (le champ de fichier reste dans la page, caché à l'œil, et garde le clavier). */
.point-photos .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 8.5rem; }
.point-photos .photo-grid__item { aspect-ratio: auto; }
.point-photos .photo-grid__item:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (min-width: 40rem) {
    .point-photos .photo-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 10rem; }
    .point-photos .photo-grid__item { grid-column: span 2; }
    .point-photos .photo-grid__item:first-child:nth-last-child(odd) { grid-column: span 8; }
    .point-photos .photo-grid__item:first-child:nth-last-child(2), .point-photos .photo-grid__item:first-child:nth-last-child(2) + .photo-grid__item { grid-column: span 4; }
    .point-photos .photo-grid__item:first-child:nth-last-child(3), .point-photos .photo-grid__item:first-child:nth-last-child(5) { grid-column: span 4; }
    .point-photos .photo-grid__item:first-child:nth-last-child(5) ~ .photo-grid__item:nth-child(n+4) { grid-column: span 4; }
}
.photo-add { position: relative; justify-items: start; }
.photo-add label { cursor: pointer; }
.photo-add input[type="file"] { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; }
.photo-add:has(input:focus-visible) label { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.photo-add:has(input:disabled) label { opacity: .5; cursor: not-allowed; }

/* ===== Trace en grand (US-J11) : carte plein écran (coquille `.shell`), barre du haut et volet de lecture ===== */
.shell--track { --controls-top: 4.75rem; }
.track-top { position: absolute; z-index: 20; top: calc(env(safe-area-inset-top, 0px) + 1rem); left: 1rem; right: 1rem; display: flex; align-items: center; gap: .6rem; pointer-events: none; }
.track-top > * { pointer-events: auto; }
.track-top .tools { margin-left: auto; }
.track-top__chip { display: flex; align-items: center; min-width: 0; min-height: 2.75rem; margin: 0; padding: 0 1rem; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); font-family: var(--font-display); font-weight: 700; }
.track-top__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-panel { position: absolute; z-index: 10; left: 1rem; bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem); display: grid; gap: .75rem; box-sizing: border-box; width: 24rem; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 6.5rem); overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem; border-radius: 20px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.track-panel__title { font-size: 1.1rem; overflow-wrap: anywhere; }
.track-panel .stats { margin: 0; gap: .4rem; }
.track-panel .stat { padding: .55rem .65rem; }
.track-panel .stat dd { font-size: 1rem; }
.track-panel__hint { margin: 0; }
.track-panel__foot { display: grid; gap: .5rem; justify-items: start; }
.track-panel__foot .field__hint { margin: 0; }
.track-slider { display: grid; gap: .1rem; }
.track-slider label { color: var(--muted); font-size: .8rem; font-weight: 700; }
.track-slider input[type="range"] { box-sizing: border-box; width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--primary); }
.track-slider input[type="range"]:disabled { opacity: .5; }
/* Repères de la trace : l'arrivée (damier) et le repère posé en touchant la ligne (anneau sombre, halo cyan : se distingue du point bleu de « Ma position »). */
.map-end { background: none; border: 0; pointer-events: none; }
.map-end__flag { display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 3px solid #fff; background: conic-gradient(#0e1a22 25%, #fff 0 50%, #0e1a22 0 75%, #fff 0); box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 1px 4px rgba(0, 0, 0, .45); }
.map-cursor { background: none; border: 0; pointer-events: none; }
.map-cursor__ring { display: block; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 4px solid #fff; background: #0e1a22; box-shadow: 0 0 0 4px rgba(9, 183, 218, .65), 0 2px 8px rgba(0, 0, 0, .5); }
/* « Agrandir » : sur la mini-carte de la fiche, qui a un itinéraire ; à gauche du bouton « couches » du sélecteur de fonds. Au-dessus des commandes de Leaflet (z-index 1000) dans le contexte d'empilement de `.point-map`. */
.map-expand { position: absolute; z-index: 1001; top: .75rem; right: 4.25rem; gap: .4rem; min-height: 2.75rem; background: var(--panel); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
@media (max-width: 56.24rem) {
    .track-top { left: .75rem; right: .75rem; top: calc(env(safe-area-inset-top, 0px) + .75rem); }
    .track-panel { left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 62dvh; padding: 1rem 1.1rem calc(env(safe-area-inset-bottom, 0px) + 1rem); border-radius: 24px 24px 0 0; }
    /* Le volet est au bas de l'écran : l'attribution OpenStreetMap reste visible au-dessus de lui (hauteur publiée par `track-view`). */
    .shell--track .leaflet-control-attribution { margin-bottom: var(--map-cover-bottom, 0px); }
}

/* Import de points (US-G4) : liste à cocher de l'aperçu. Les doublons possibles portent un avertissement écrit (la couleur ne porte jamais seule l'information, US-H2). */
.import-actions { margin: 1rem 0 .25rem; }
.import-notices { margin: .5rem 0; padding-left: 1.25rem; color: var(--muted); font-size: .875rem; }
.import-skipped { margin: .5rem 0; }
.import-skipped summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.import-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .25rem; }
.import-item { border-radius: var(--radius-sm); }
.import-item:hover { background: var(--surface-2); }
.import-item label { display: flex; gap: .75rem; align-items: flex-start; min-height: 2.75rem; padding: .5rem; cursor: pointer; }
.import-item input { flex: none; width: 1.25rem; height: 1.25rem; margin: .15rem 0 0; accent-color: var(--primary); }
.import-item__body { display: grid; gap: .15rem; min-width: 0; }
.import-item__name { font-weight: 700; overflow-wrap: anywhere; }
.import-item__sub { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.import-item__warn { margin-top: .15rem; padding: .4rem .65rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; overflow-wrap: anywhere; }

/* Photos d'un point (US-J17) : vignettes carrées (rognées à l'AFFICHAGE seulement : la photo gardée garde ses proportions), image en grand dans un <dialog>. */
.point-photos .alert { margin: .75rem 0 0; }
.point-photos .field { margin-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.photo-grid__item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.photo-grid__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-grid__open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-grid__remove { position: absolute; top: .3rem; right: .3rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, .55); cursor: pointer; }
.photo-grid__remove:hover:not(:disabled) { background: rgba(0, 0, 0, .75); }
.photo-grid__remove:disabled { opacity: .5; cursor: not-allowed; }
.photo-dialog { width: min(calc(100% - 1.5rem), 60rem); max-height: calc(100dvh - 1.5rem); padding: .5rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.photo-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.photo-dialog__img { display: block; width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; border-radius: var(--radius-sm); background: var(--surface-2); }
.photo-dialog form { margin: .5rem 0 0; }
.photo-dialog__close { width: 100%; min-height: 2.75rem; }

/* Partage par lien (US-J14) : gestion du lien et page publique en lecture seule */
.share-link { display: grid; gap: .75rem; margin: 1rem 0; }
.share-link__url { display: block; padding: .75rem; border-radius: var(--radius-sm); background: var(--surface-2); overflow-wrap: anywhere; user-select: all; font-size: .9rem; }
.share-link__actions, .share-link__manage { display: flex; flex-wrap: wrap; gap: .5rem; }
.shared .topbar .brand-chip { margin-bottom: .75rem; }
.shared__point { display: grid; gap: .5rem; }
.shared__point > * { margin: 0; }
.shared__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; color: var(--muted); font-size: .9rem; }
.shared__category { display: inline-flex; align-items: center; gap: .375rem; }
.shared__dot { width: .75rem; height: .75rem; border-radius: 50%; background: var(--group-color, var(--muted)); }
.shared__address { color: var(--muted); }
.shared__note { overflow-wrap: anywhere; }
.shared__hint { margin: .75rem 0 0; }
.shared__coords { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.shared__coords code { user-select: all; }
/* Page publique d'un point (US-J15) : la carte d'itinéraire est la même que dans la fiche (`.map--mini.map--track`) ; la molette fait défiler la page. */
.shared__track { display: grid; gap: .5rem; }
.shared__track > * { margin: 0; }
.shared__track .btn { justify-self: start; }
.shared__name-link { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.shared__name-link:hover, .shared__name-link:focus-visible { color: var(--primary-ink); }

/* Pastilles de couleur (US-H2b) : un filet intérieur à 3:1 au moins délimite chaque pastille, même quand sa couleur est pâle sur le fond (cyan, orange et vert sont sous 3:1 sur blanc).
   La couleur n'est de toute façon jamais seule : le nom du groupe ou de la catégorie est écrit à côté (WCAG 1.4.1). */
.point-row__dot, .group-tag__dot, .group-chip__dot, .chip__dot, .category-dot, .shared__dot, .swatch__dot, .tile { box-shadow: inset 0 0 0 1px var(--field-border); }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* « Que faire autour ? » (US-I6), fiche d'un point : suggestions de l'IA rendues par /api/ai/nearby (position vérifiée par géocodage, le reste à vérifier).
   Plus de boîte dans la boîte : un en-tête repliable, le formulaire à plat (envie + rayon sur une ligne, un seul bouton), le texte long replié, des fiches de lieu aérées. */
.nearby > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; box-sizing: border-box; min-height: 3rem; padding: 0 1rem; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 600; cursor: pointer; list-style: none; }
.nearby > summary::-webkit-details-marker { display: none; }
.nearby > summary::after { content: "▾"; flex: none; color: var(--muted); transition: transform .15s; }
.nearby[open] > summary::after { transform: rotate(180deg); }
.nearby__form { display: grid; gap: .75rem; margin-top: 1rem; }
.nearby__row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: .75rem; align-items: end; }
.nearby__info > summary { display: inline-block; min-height: 2.75rem; padding-block: .7rem; box-sizing: border-box; color: var(--muted); font-size: .875rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.nearby__info .field__hint { margin: 0 0 .25rem; }
.nearby__go { width: 100%; min-height: 3rem; }
.nearby .field__hint:empty { display: none; }
.nearby-notice { margin: 1.25rem 0 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.nearby-list { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .75rem; }
.nearby-item { display: grid; justify-items: start; gap: .35rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.nearby-item__head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; width: 100%; }
.nearby-item__title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.nearby-item__dist { flex: none; color: var(--primary-ink); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.nearby-item__tag { padding: .1rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-ink); font-size: .75rem; font-weight: 700; }
.nearby-item__summary { margin: .15rem 0 0; }
.nearby-item__address { margin: 0; color: var(--muted); font-size: .8rem; }
.nearby-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.nearby-item__other { color: var(--muted); font-size: .875rem; text-underline-offset: 3px; }
.nearby-item__other:hover { color: var(--text); }
@media (max-width: 24rem) { .nearby__row { grid-template-columns: 1fr; } }

/* ===================================================================================================================================
   Design C « Lagon × Cap » : accueil et page d'un groupe (`.shell--c`), barre de vues à pastilles, sélecteur Liste · Mixte · Carte.
   Mobile : en-tête, sélecteur, petite carte, liste, barre de vues flottante en bas. Bureau (≥ 900 px) : barre du haut (logo, recherche, vues, Ajouter),
   liste à gauche et carte à droite. La carte n'est plus plein écran : elle est une vue parmi d'autres (`data-view` sur `.shell`, contrôleur `view`).
   La trace en grand (`.shell--track`) garde sa mise en page flottante d'origine.
   =================================================================================================================================== */

/* ----- Barre de vues (Groupes · Liste · Carte · Compte) : en bas sur mobile, en haut sur bureau ----- */
.mnav { display: flex; gap: .25rem; padding: .375rem; background: var(--nav-bg); border-radius: 999px; box-shadow: var(--shadow); }
.mnav a { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 3rem; min-height: 3rem; padding: 0 .85rem; border-radius: 999px; color: var(--nav-text); font-size: .875rem; font-weight: 700; text-decoration: none; }
.mnav a span { display: none; }
.mnav a[aria-current="page"] { background: var(--nav-on-bg); color: var(--nav-on-text); }
.mnav a[aria-current="page"] span { display: inline; }
.mnav a:not([aria-current="page"]):hover { background: rgba(255, 255, 255, .1); }
.mnav a:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.mnav--bottom { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; gap: 0; padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom, 0px)); border-radius: 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .25); }
/* Mobile : une vraie barre d'onglets, sur toute la largeur, collée au bas (zone sûre comprise) ; chaque onglet = un picto et son nom dessous, l'actif sur fond jaune. */
.mnav--bottom a { flex: 1; flex-direction: column; gap: .15rem; min-width: 0; min-height: 3.25rem; padding: .25rem; border-radius: 1rem; font-size: .7rem; line-height: 1.1; }
.mnav--bottom a span { display: block; }
.mnav--top { display: none; }
@media (min-width: 56.25rem) {
    .mnav--bottom { display: none; }
    .mnav--top { display: flex; box-shadow: none; }
    .mnav--top a { padding: 0 1.1rem; }
    .mnav--top a span { display: inline; }
}

/* ----- Boutons « Ajouter » : jaune soleil. Bureau : dans la barre du haut ; mobile : bouton flottant au-dessus de la barre de vues ----- */
.add-btn, .add-fab { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: 0 1.3rem; border: 0; border-radius: 999px; background: var(--sun); color: var(--on-sun); font: inherit; font-family: var(--font-display); font-weight: 700; text-decoration: none; cursor: pointer; }
.add-btn:hover, .add-fab:hover { filter: brightness(1.05); }
.add-fab { position: fixed; z-index: 25; right: .9rem; bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px)); min-height: 3.5rem; padding: 0 1.4rem; box-shadow: 0 8px 20px rgba(11, 31, 39, .28); }
.add-btn { display: none; }
.shell--c:has(.peek:not([hidden])) .add-fab { display: none; }
@media (min-width: 56.25rem) { .add-btn { display: inline-flex; } .add-fab { display: none; } }

/* ----- Mise en page : une grille (mobile : une colonne) ----- */
.shell--c { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; padding: calc(env(safe-area-inset-top, 0px) + .75rem) .75rem calc(5rem + env(safe-area-inset-bottom, 0px)); }
.shell--c .mtop { grid-area: top; }
.shell--c .gheader { grid-area: head; }
.shell--c .seg { grid-area: seg; }
.shell--c .panel { grid-area: panel; }
.shell--c .shell__map { grid-area: map; }
.shell--c .peek { grid-area: map; }
.shell--c .shell__top--narrow, .shell--c .list-pill { display: none; }
.shell--c:has(.home-page) { grid-template-rows: auto minmax(0, 1fr) 8.5rem; grid-template-areas: "top" "panel" "map"; }
.shell--c.shell--map-only:has(.home-page) { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top" "map"; }
.shell--c.shell--map-only .panel { display: none; }
.shell--c:has(.group-page) { --map-h: 11rem; grid-template-rows: auto auto var(--map-h) minmax(0, 1fr); grid-template-areas: "head" "seg" "map" "panel"; }
.shell--c[data-view="carte"]:has(.group-page) { grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head" "seg" "map"; }
.shell--c[data-view="carte"] .panel { display: none; }
/* « Liste » : la carte reste montée (Leaflet a besoin d'une taille), mais invisible et hors de la mise en page. */
.shell--c[data-view="liste"]:has(.group-page) { grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "head" "seg" "panel"; }
.shell--c[data-view="liste"] .shell__map, .shell--c.shell--list .shell__map { position: absolute; top: 0; left: 0; width: 100%; height: 11rem; visibility: hidden; pointer-events: none; }
.shell--c.shell--list:has(.home-page) { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top" "panel"; }
@media (min-width: 56.25rem) {
    .shell--c { padding: 0 1.5rem 1.5rem; gap: 1rem; }
    .shell--c:has(.home-page) { grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top top" "panel map"; }
    .shell--c.shell--map-only:has(.home-page) { grid-template-areas: "top top" "map map"; }
    .shell--c.shell--list:has(.home-page) { grid-template-areas: "top top" "panel map"; }
    .shell--c:has(.group-page) { grid-template-columns: minmax(22rem, 27rem) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top top" "head head" "panel map"; }
    .shell--c .seg { grid-area: head; justify-self: end; align-self: center; }
    .shell--c[data-view="carte"]:has(.group-page) { grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top top" "head head" "map map"; }
    /* Liste seule : la liste occupe les deux colonnes, centrée ; la carte reste dans sa case, invisible. Sur l'accueil, la carte reste visible à droite. */
    .shell--c[data-view="liste"] .shell__map, .shell--c.shell--list .shell__map { position: relative; top: auto; left: auto; width: auto; height: auto; }
    .shell--c.shell--list .shell__map { visibility: visible; pointer-events: auto; }
    /* Sans ce bloc, la règle mobile `[data-view="liste"]` (plus spécifique que `.shell--c:has(.group-page)`) restait en vigueur : une seule colonne, sans zone « top » (la barre du haut
       tombait en bas) et un en-tête écrasé. Liste seule : une colonne pleine largeur ; les points y sont en GRILLE de cartes (autant de colonnes que la largeur en permet). */
    .shell--c[data-view="liste"]:has(.group-page) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top" "head" "panel"; }
    .shell--c[data-view="liste"]:has(.group-page) .panel { grid-column: 1 / -1; justify-self: stretch; width: auto; }
    .shell--c[data-view="liste"]:has(.group-page) .point-list { grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1rem; }
    .shell--c[data-view="liste"]:has(.group-page) .point-filter { max-width: 36rem; }
    .shell--c .peek { align-self: end; justify-self: start; position: relative; top: auto; right: auto; z-index: 11; width: min(26rem, calc(100% - 1.5rem)); margin: .75rem; }
    .shell--c[data-view="liste"] .peek { grid-area: panel; }
}

/* ----- Barre du haut ----- */
.mtop { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.mtop__brand { display: inline-flex; align-items: center; gap: .6rem; flex: none; color: var(--text); font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.mtop__brand img { border-radius: 10px; }
.mtop__brand span { display: none; }
.mtop .searchbox { flex: 1; min-width: 0; max-width: 48rem; min-height: 3.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: none; backdrop-filter: none; }
.mtop .searchbox__icon { left: 1.1rem; }
.mtop .searchbox input[type="search"] { min-height: 3.25rem; padding: .6rem 1.1rem .6rem 3rem; border-radius: 999px; font-size: 1rem; }
.mtop .tools { padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
.mtop .tools .icon-btn { display: none; }
.mtop .avatar { width: 3rem; height: 3rem; background: var(--lilac); color: var(--ink); }
.mtop--wide { display: none; }
.shell--c .chips { display: none; }
@media (max-width: 56.24rem) {
    .shell--c.shell--map-only .chips { display: flex; position: absolute; z-index: 15; top: calc(env(safe-area-inset-top, 0px) + 4.75rem); left: .75rem; right: .75rem; }
}
@media (min-width: 56.25rem) {
    .mtop, .mtop--wide { display: flex; gap: 1rem; padding-top: 1rem; }
    .mtop__brand { width: 10rem; }
    .mtop__brand span { display: inline; }
    .mtop .searchbox { flex: 1 1 24rem; }
    .mtop .mnav { flex: none; }
    .mtop .tools .icon-btn { display: inline-grid; }
    .mtop .tools { gap: .5rem; }
}

/* ----- Volets : une page qui défile (mobile) ou une colonne (bureau), plus de carte dessous ----- */
.shell--c .panel { position: static; display: flex; flex-direction: column; width: auto; max-width: none; max-height: none; min-height: 0; background: transparent; border-radius: 0; box-shadow: none; backdrop-filter: none; overflow: hidden; }
.shell--c .panel[hidden] { display: none; }
.shell--c .panel__grip { display: none; }
.shell--c .panel__head { padding: .25rem .25rem .5rem; }
.shell--c .panel__title { font-size: 2rem; }
.shell--c .panel__body { padding: .25rem .25rem 1rem; }
.shell--c .panel__foot, .shell--c .panel__all { display: none; }
.shell--c .shell__map { position: relative; z-index: 0; isolation: isolate; min-height: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 1.6rem; background: var(--surface-2); }
.shell--c .shell__map .map__canvas, .shell--c .shell__map .map__canvas.leaflet-container { position: absolute; inset: 0; height: 100%; }
.shell--c .map__tools { position: absolute; top: .75rem; right: .75rem; bottom: auto; display: flex; flex-direction: column; gap: .5rem; }
.shell--c .map__locate-status { right: 3.5rem; top: 1.375rem; }
.shell--c .leaflet-top.leaflet-left { top: auto; bottom: 1rem; left: auto; right: .75rem; }
.shell--c .stage:has(.peek:not([hidden])) .leaflet-top.leaflet-left, .shell--c .stage:has(.peek:not([hidden])) .map__tools { right: .75rem; }
.shell--c .stage:has(.peek:not([hidden])) .leaflet-top.leaflet-left { bottom: 1rem; }
.shell--c .map__notice { top: .75rem; left: .75rem; right: 4rem; width: auto; transform: none; }
.shell--c .leaflet-control-attribution { margin-bottom: 0; }
@media (max-width: 56.24rem) {
    .shell--c .leaflet-top.leaflet-left { display: none; } /* pincer pour zoomer : les boutons + − prennent la place de la petite carte */
    .shell--c .shell__map .map__hint { top: 50%; padding: .5rem .75rem; font-size: .8rem; }
    /* La carte de l'accueil se touche (déplacer, pincer, double appui) : sa rangée est de hauteur fixe, elle ne retient donc pas le défilement du volet. Boutons « Ma position » et « Suivre » : seulement en plein écran. */
    .shell--c:has(.home-page):not(.shell--map-only) .map__tools { display: none; }
}
.map-open { position: absolute; z-index: 6; right: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 1.1rem; border-radius: 999px; background: var(--sun); color: var(--on-sun); font-family: var(--font-display); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-sm); }
.shell--map-only .map-open { display: none; }
.shell--c .map-btn { box-shadow: var(--shadow-sm); }

/* ----- Accueil : actions rapides, groupes en tuiles colorées ----- */
.qa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1.25rem; }
.qa__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 6rem; padding: .75rem .4rem; border: 1px solid var(--border); border-radius: 1.4rem; background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.qa__item:hover { border-color: var(--primary); }
.qa__ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 1rem; color: #0b1f27; }
.qa__ico--sun { background: var(--sun); }
.qa__ico--cyan { background: #09b7da; }
.qa__ico--coral { background: var(--coral); }
.qa__ico--green { background: var(--mint); }
.qa__ico--blue { background: var(--sky, #dbeafe); }
@media (min-width: 56.25rem) {
    .qa__item { flex-direction: row; justify-content: flex-start; gap: .85rem; min-height: 4.75rem; padding: .75rem 1.1rem; font-family: var(--font-display); font-size: 1rem; text-align: left; }
}
.section-head { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .75rem; margin: 0 0 .75rem; }
.section-head__title { flex: 1; font-size: 1.25rem; }
.section-head .panel__sub { order: 3; flex-basis: 100%; margin: 0; }
.section-head .panel__sub:empty { display: none; }
.group-pick { margin: 0 0 .75rem; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--sun); color: var(--on-sun); font-weight: 700; }
.group-pick[hidden] { display: none; }
.group-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0 0 1rem; padding: 0; list-style: none; }
@media (min-width: 56.25rem) { .group-list { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; } }
.group-item { position: relative; }
.group-row { --on-group: #0b1f27; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: .6rem; min-height: 6.75rem; height: 100%; padding: .9rem 1rem; border-radius: 1.6rem; background: var(--group-color, var(--primary)); color: var(--on-group); }
.group-row:hover { background: var(--group-color, var(--primary)); filter: brightness(1.06); }
.group-row .tile { width: 2.4rem; height: 2.4rem; border-radius: .9rem; background: rgba(255, 255, 255, .5); font-size: 1.2rem; }
.group-row:not(.has-icon) .tile::after { background: var(--on-group); opacity: .75; }
.group-row__text { flex: none; width: 100%; }
.group-row__name { font-size: 1.1rem; }
.group-row__count { color: inherit; font-weight: 600; opacity: .85; }
.group-row__go { display: none; }
.group-check { position: absolute; top: .45rem; right: .45rem; }
.group-check__box { background: rgba(255, 255, 255, .6); border-color: transparent; }
@media (max-width: 56.24rem) { .group-check { display: none; } }
.shell--c .panel__new, .shell--c .section-head .link-btn { min-height: 2.75rem; border-radius: 999px; }
.shell--c .panel__new { padding: 0 1rem; background: var(--surface-2); }
.shell--c .section-head .link-btn { color: var(--primary-ink); }
.shell--c .section-head .panel__new { display: inline-flex; }
.shell--c .section-head .panel__all { display: inline-flex; }
@media (max-width: 56.24rem) { .shell--c .section-head .panel__all { display: none; } } /* les cases « sur la carte » n'existent qu'à partir de 900 px */

/* ----- Liste de tous les points ----- */
.chiprow { display: flex; gap: .5rem; margin: 0 0 .9rem; padding: 0 .25rem; overflow-x: auto; scrollbar-width: none; }
.nearpick { display: flex; align-items: center; gap: .75rem; margin: 0 0 .9rem; padding: 0 .25rem; }
.nearpick[hidden] { display: none; }
.nearpick__label { display: inline-flex; flex: none; align-items: center; gap: .35rem; color: var(--muted); font-size: .875rem; font-weight: 600; }
.nearpick__opts { display: flex; flex: 1; min-width: 0; gap: .15rem; padding: .2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.nearpick__opt { flex: 1 0 auto; min-height: 2.5rem; min-width: 2.75rem; padding: 0 .8rem; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.nearpick__opt small { font-size: .75rem; font-weight: 600; opacity: .7; }
.nearpick__opt:hover { background: var(--surface); }
.nearpick__opt[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .nearpick__opt[aria-pressed="true"] { background: var(--sun); color: var(--on-sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nearpick__opt[aria-pressed="true"] { background: var(--sun); color: var(--on-sun); } }
@media (prefers-reduced-motion: reduce) { .nearpick__opt { transition: none; } }
.fchip { display: inline-flex; flex: none; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
[data-theme="dark"] .fchip[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fchip[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); color: var(--on-sun); } }
/* Une grille : autant de colonnes que la largeur du volet en permet (une seule sur un petit écran, plusieurs sur ordinateur) ; les cartes d'une même rangée ont la même hauteur. */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.pcard { position: relative; display: flex; flex-direction: column; padding: 0 0 .3rem; overflow: hidden; border: 1px solid var(--border); border-radius: 1.4rem; background: var(--surface); } /* colonne : barre du haut (tracé, « Y aller »), puis le texte */
.pcard__main { display: flex; flex: 1; align-items: center; gap: .75rem; min-width: 0; min-height: 3.75rem; padding: .35rem .9rem; border-radius: 1.1rem; color: var(--text); text-decoration: none; }
.pcard__bar { flex: none; width: .6rem; height: 2.6rem; border-radius: .3rem; background: var(--group-color, var(--primary)); }
.pcard__text { display: grid; flex: 1; min-width: 0; }
.pcard__text strong { font-family: var(--font-display); font-size: 1.02rem; overflow-wrap: anywhere; }
.pcard__text small { color: var(--muted); overflow-wrap: anywhere; }
.pcard__fav { flex: none; display: inline-grid; color: var(--star-fill); }
.pcard__fav .ico { fill: currentColor; }
.pcard__dist { flex: none; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; }
.pcard__go, .go-btn { display: inline-grid; flex: none; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--primary); color: var(--primary-text); text-decoration: none; }
.pcard__go:hover, .go-btn:hover { filter: brightness(1.06); }
/* Barre du haut : le lien du tracé à gauche (s'il y en a un), « Y aller » à droite ; sans image, première ligne de la carte ; avec image, pastilles posées dessus. */
.pcard__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .7rem 0; }
.pcard .pcard__go { display: inline-flex; width: auto; height: auto; min-height: 2.5rem; gap: .15rem; margin-left: auto; padding: 0 .8rem 0 .95rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 700; }
.pcard .pcard__go:hover { background: var(--primary); color: var(--primary-text); filter: none; }
.pcard__track { display: grid; flex: none; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--surface-2); color: var(--primary-ink, var(--primary)); text-decoration: none; }
.pcard__track:hover { background: var(--primary); color: var(--primary-text); }
/* Carte avec aperçu de carte (US-J18) : bandeau en tête (la zone du point, rognée à l'affichage), « Y aller » en pastille dessus, puis le nom ; sans image, un bandeau à la couleur du groupe. */
.pcard--thumb { display: flex; }
.pcard__thumb { display: block; height: 7.5rem; background: var(--surface-2); }
.pcard__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcard__thumb--empty { background: color-mix(in srgb, var(--group-color, var(--primary)) 24%, var(--surface-2)); }
.pcard--thumb .pcard__main { min-height: 3.25rem; padding: .5rem .9rem; }
.pcard--thumb .pcard__bar { height: 2.2rem; }
.pcard--thumb .pcard__top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; pointer-events: none; } /* les clics sur l'image passent au travers ; seuls les liens les gardent */
.pcard--thumb .pcard__top > a { pointer-events: auto; border: 1px solid rgba(255, 255, 255, .55); background: color-mix(in srgb, var(--surface) 84%, transparent); color: var(--text); -webkit-backdrop-filter: blur(8px) saturate(1.4); backdrop-filter: blur(8px) saturate(1.4); box-shadow: 0 2px 10px rgba(0, 0, 0, .28); }
.pcard--thumb .pcard__top > a:hover { border-color: transparent; background: var(--primary); color: var(--primary-text); }
.pcard--thumb .pcard__track { color: var(--primary-ink, var(--primary)); }
.pcard--thumb .pcard__track:hover { color: var(--primary-text); }

/* ----- Page d'un groupe : en-tête, sélecteur de vue, menu « ⋯ » ----- */
.shell--c .gheader { display: flex; align-items: center; gap: .6rem; min-width: 0; padding: 0; }
.gheader .panel__titles { flex: 1; min-width: 0; }
.gheader .panel__title { font-size: 1.55rem; }
.gheader .tile { width: 2.9rem; height: 2.9rem; border-radius: 1rem; }
.gheader .icon-btn, .gheader .menu > summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.gheader__share { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; }
.gheader__share span { display: none; }
@media (min-width: 56.25rem) { .shell--c .gheader { padding: .25rem 20rem 0 0; } .gheader__share span { display: inline; } .gheader .panel__title { font-size: 1.9rem; } }
.seg { display: flex; gap: .15rem; padding: .25rem; background: var(--seg-bg); border-radius: 1.2rem; }
.seg button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; padding: 0 1rem; border: 0; border-radius: .95rem; background: none; color: var(--seg-text); font: inherit; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--seg-on-bg); color: var(--seg-on-text); }
.seg button:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
@media (min-width: 56.25rem) { .seg button { flex: none; } }
.menu__list { min-width: 17rem; padding: .5rem; border-radius: 1.2rem; z-index: 40; }
.menu__label { margin: .6rem .75rem .15rem; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.menu__sep { margin: .4rem .5rem; border: 0; border-top: 1px solid var(--border); }
.menu__list small { display: block; color: var(--muted); font-size: .75rem; font-weight: 500; }

/* ----- Liste des points d'un groupe : cartes, filtres en puces, accès direct à la fiche ----- */
.shell--c .point-list { gap: .6rem; }
.shell--c .point-item { border: 1px solid var(--border); border-radius: 1.4rem; background: var(--surface); box-shadow: 0 1px 2px rgba(11, 31, 39, .05); transition: box-shadow .2s ease, border-color .2s ease; }
.shell--c .point-item.is-selected { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm); } /* anneau de 1 px en plus du filet : même épaisseur qu'avant, sans décaler la liste */
.shell--c .point-row { min-height: 4rem; padding: .7rem .95rem; column-gap: .8rem; border-radius: 1.3rem; }
.shell--c .point-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.shell--c .point-item.is-selected .point-row:hover { background: transparent; }
.shell--c .point-row__dot { width: .4rem; height: auto; min-height: 2.25rem; margin: 0; align-self: stretch; border-radius: .3rem; } /* la barre de couleur épouse la hauteur du texte (adresse sur 2 lignes comprise) */
.shell--c .point-row__name { font-family: var(--font-display); font-size: 1.06rem; line-height: 1.25; letter-spacing: -.01em; }
.shell--c .point-row__meta { margin-top: .1rem; font-size: .84rem; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } /* adresse : 2 lignes au plus (la fiche l'affiche en entier) */
.shell--c .point-row__dist { padding: .15rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .75rem; font-weight: 600; white-space: nowrap; } /* pas de `display` ici : l'attribut `hidden` doit continuer à le cacher */
.shell--c .point-row { align-content: center; } /* si la colonne de droite est haute, le nom et l'adresse restent groupés au lieu de s'écarter */
.shell--c .point-row__side { gap: .2rem; }
.shell--c .mark--rating { padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--star-fill) 14%, transparent); }
/* Vignette avec bandeau (carte ou photos) : bandeau plus haut, texte aéré, « Y aller » en pastille de verre sur l'image, filet entre l'image et le texte. */
.shell--c .point-row--thumb, .shell--c .point-row--slider { padding: .7rem .95rem .85rem; }
.shell--c .point-row--thumb { row-gap: .15rem; }
.shell--c .point-row__thumb { width: calc(100% + 1.9rem); height: 9rem; margin: -.7rem -.95rem .75rem; border-bottom: 1px solid var(--border); }
.shell--c .point-slider { border-bottom: 1px solid var(--border); }
.shell--c .point-slider__track { height: 9rem; }
.shell--c .point-slider::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3rem; background: linear-gradient(to top, rgba(0, 0, 0, .42), transparent); pointer-events: none; } /* voile sous les pastilles : elles restent lisibles sur une photo claire */
.shell--c .point-slider__dots { z-index: 1; bottom: .6rem; }
.shell--c .point-slider__dot { width: .4rem; height: .4rem; background: rgba(255, 255, 255, .7); box-shadow: none; }
.shell--c .point-slider__dot.is-active { width: 1.1rem; border-radius: 999px; background: #fff; transform: none; }
@media (prefers-reduced-motion: no-preference) { .shell--c .point-slider__dot { transition: width .2s ease, background-color .15s ease; } }
.shell--c .point-slider__nav { background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
@media (hover: hover) {
    .shell--c .point-item:hover { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--group-color, var(--primary)) 40%, var(--border)); }
    .shell--c .point-item.is-selected:hover { border-color: var(--primary); }
    .shell--c .point-slider__nav { opacity: 0; transition: opacity .15s ease; } /* les flèches n'apparaissent qu'au survol (ou au clavier) ; au doigt, elles restent visibles */
    .shell--c .point-item:hover .point-slider__nav, .shell--c .point-slider__nav:focus-visible { opacity: .95; }
}
.shell--c .point-item__bar { padding: .7rem .7rem 0; }
.shell--c .point-item--thumb .point-item__link { min-height: 2.5rem; margin: 0; padding: 0 .8rem 0 .95rem; border: 1px solid rgba(255, 255, 255, .55); background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(8px) saturate(1.4); backdrop-filter: blur(8px) saturate(1.4); box-shadow: 0 2px 10px rgba(0, 0, 0, .28); }
.shell--c .point-item--thumb .point-item__link:hover { border-color: transparent; background: var(--primary); color: var(--primary-text); }
.shell--c .point-item__link { display: inline-flex; align-items: center; justify-content: center; gap: .15rem; width: auto; min-height: 2.5rem; margin: 0; padding: 0 .8rem 0 .95rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; font-weight: 700; }
.shell--c .point-item__link:hover { background: var(--primary); color: var(--primary-text); }
.shell--c .point-filter input { min-height: 3rem; border-radius: 999px; }
.shell--c .point-marks, .shell--c .category-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.shell--c .pick, .shell--c .category-chip-btn { min-height: 2.75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); flex: none; }
.shell--c .pick:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
[data-theme="dark"] .shell--c .pick:has(input:checked) { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.shell--c .category-box__hint, .shell--c .around-box__hint { display: none; }

/* ----- Point sélectionné : feuille du bas (mobile) ou carte sur la carte (bureau) ----- */
.shell--c .peek { z-index: 28; max-height: none; border: 1px solid var(--border); border-radius: 1.6rem; background: var(--surface); backdrop-filter: none; }
.shell--c .peek__title { font-size: 1.35rem; }
.shell--c .peek__actions .btn { min-height: 3rem; border-radius: 999px; }
.shell--c .peek__actions .peek__sheet { order: 1; }
.shell--c .peek__actions [data-point-peek-target="go"] { order: 2; }
.shell--c .peek__actions .peek__weather, .shell--c .peek__actions .peek__compass, .shell--c .peek__actions .peek__around { order: 3; }
@media (max-width: 56.24rem) {
    .shell--c .peek { position: fixed; left: .75rem; right: .75rem; top: auto; bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px)); width: auto; margin: 0; padding: 1rem 1.1rem; overflow: visible; box-shadow: var(--shadow); }
    .shell--c .peek__actions .peek__sheet { display: inline-flex; }
    .shell--c .peek__actions .peek__weather, .shell--c .peek__actions .peek__compass { flex: 1 1 40%; }
}
@media (min-width: 56.25rem) { .shell--c .peek { max-height: calc(100% - 1.5rem); overflow-y: auto; box-shadow: var(--shadow); } }

/* ----- Mobile : l'aperçu d'un point est une FEUILLE qui monte du bas de l'écran, sur toute la largeur -----
   Convention (AGENTS.md) : sur mobile, une action sur un point (aperçu, choix) s'ouvre ainsi, jamais en carte flottante. Aperçu d'un point : « Y aller en <mode> » (gros), le mode de déplacement en commutateur arrondi juste dessous,
   puis les tuiles « Fiche », « Météo », « Boussole », « Autour ». Au-dessus de la barre de vues (z-index) : la feuille la recouvre, « ✕ » la ferme. */
@keyframes peek-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 56.24rem) {
    .shell--c .peek {
        left: 0; right: 0; bottom: 0; z-index: 40; width: auto; max-height: 82dvh; margin: 0;
        padding: 1.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
        overflow-y: auto; overscroll-behavior: contain;
        border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0;
        box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
        animation: peek-sheet-up .22s ease-out;
    }
    .shell--c .peek::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
    .shell--c .peek__close { top: .9rem; right: .75rem; }
    .shell--c .peek__title { font-size: 1.4rem; }
    /* Lecture de haut en bas : QUI (titre, adresse, distance), COMMENT Y ALLER (gros bouton + mode juste dessous), puis les outils du point en 4 tuiles (fiche, météo, boussole, autour), puis les détails.
       La feuille est une grille de 4 colonnes ; les enveloppes `.peek__ctl` et `.peek__actions` disparaissent (`display: contents`) pour que chaque bouton prenne sa place. */
    .shell--c .peek { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: .5rem; }
    .shell--c .peek:not(:has(.peek__around)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .shell--c .peek__ctl, .shell--c .peek__actions { display: contents; }
    .shell--c .peek__title, .shell--c .peek__sub, .shell--c .peek__rate, .shell--c .peek__modes, .shell--c .peek__facts, .shell--c .peek__weather-note { grid-column: 1 / -1; margin: 0; }
    .shell--c .peek { row-gap: .35rem; }
    .shell--c .peek__rate { margin-bottom: .1rem; }
    .shell--c .peek__actions .peek__go, .shell--c .peek__actions [data-point-peek-target="go"] { order: 1; grid-column: 1 / -1; min-height: 3.5rem; margin-top: .65rem; font-size: 1.05rem; }
    .shell--c .peek__modes { order: 2; margin-bottom: .5rem; }
    .shell--c .peek__actions .peek__sheet, .shell--c .peek__actions .peek__weather, .shell--c .peek__actions .peek__compass, .shell--c .peek__actions .peek__around { order: 3; } /* plus précis que les `order` des règles de bureau plus haut */
    .shell--c .peek__weather-note { order: 4; }
    .shell--c .peek__facts { order: 5; margin-top: .4rem; }
    .shell--c .peek__actions .btn { flex: none; width: 100%; padding-inline: .25rem; white-space: nowrap; }
    .shell--c .peek__actions .peek__go, .shell--c .peek__actions [data-point-peek-target="go"] { padding-inline: .75rem; }
    /* Tuiles : pictogramme au-dessus d'un mot court (le nom complet reste lu par les lecteurs d'écran). */
    .shell--c .peek__actions .peek__sheet, .shell--c .peek__actions .peek__weather, .shell--c .peek__actions .peek__compass, .shell--c .peek__actions .peek__around {
        display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 4.1rem; border-radius: 1.1rem; font-size: .8rem; line-height: 1.1;
    }
    .shell--c .peek__weather:last-child { grid-column: auto; }
    .shell--c .peek__compass-text, .shell--c .peek__around-text { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; }
    .shell--c .peek__wide { display: none; }
    .shell--c .peek__narrow { display: inline; }
    .shell--c .is-expanded .peek, .shell--c.is-expanded .peek { display: none; } /* liste dépliée : l'aperçu reste caché (la grille ci-dessus ne doit pas le réafficher) */
    .shell--c .peek__modes { gap: .15rem; padding: .25rem; border-radius: 999px; background: var(--seg-bg); }
    .shell--c .peek__modes .mode-link { min-height: 2.5rem; border-radius: 999px; background: none; }
    .shell--c .peek__modes .mode-link[aria-current="true"] { background: var(--seg-on-bg); color: var(--seg-on-text); }
    .shell--c .peek__facts { display: block; }
}
@media (prefers-reduced-motion: reduce) { .shell--c .peek { animation: none; } }

/* ----- Pages classiques : barre de vues en haut de l'en-tête, boutons et cartes plus arrondis ----- */
.appbar__inner .mnav--top { margin-right: auto; }
.card { border-radius: var(--radius); }
.btn { border-radius: 999px; }

/* ----- Administration : services externes (US-H5) -----
   Bilan en haut, puis une carte par service : chiffre du jour, 14 jours en barres (cyan = appels, corail = erreurs), derniers succès et erreur.
   Les barres sont décoratives : les mêmes nombres sont dans le tableau « Détail par jour ». L'état est toujours écrit (pastille), jamais porté par la couleur seule. */
.ext-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: .5rem; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
.ext-hero__icon { display: grid; flex: none; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--surface); color: var(--muted); font: 700 1.5rem/1 var(--font-display); }
.ext-hero__icon::before { content: "…"; }
.ext-hero__title { margin: 0; font-family: var(--font-display); font-size: 1.35rem; }
.ext-hero__text { margin: .15rem 0 0; }
.ext-hero--ok { background: var(--ok-bg); color: var(--ok-text); }
.ext-hero--ok .ext-hero__icon { background: var(--mint); color: var(--ink); }
.ext-hero--ok .ext-hero__icon::before { content: "✓"; }
.ext-hero--warn { background: var(--warn-bg); color: var(--warn-text); }
.ext-hero--warn .ext-hero__icon { background: var(--sun); color: var(--on-sun); }
.ext-hero--warn .ext-hero__icon::before { content: "!"; }
.ext-hero--danger { background: var(--danger-bg); color: var(--danger-text); }
.ext-hero--danger .ext-hero__icon { background: var(--coral); color: var(--ink); }
.ext-hero--danger .ext-hero__icon::before { content: "!"; }

.ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: .75rem; margin-bottom: 1rem; }
.ext-card { --ext-accent: var(--border); display: flex; flex-direction: column; min-width: 0; padding: 1.2rem 1.2rem .25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 4px 0 var(--ext-accent); }
.ext-card--ok { --ext-accent: var(--mint); }
.ext-card--warn { --ext-accent: var(--sun); }
.ext-card--danger { --ext-accent: var(--coral); }
.ext-card__head { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.ext-card__name { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.ext-card__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; margin: .75rem 0 0; }
.ext-card__big strong { font-family: var(--font-mono); font-size: 2.25rem; font-weight: 700; line-height: 1; }
.ext-card__big > span { color: var(--muted); font-size: .9rem; }
.ext-card__err { color: var(--danger); font-weight: 600; }
.ext-card__sum { margin: .6rem 0 0; color: var(--muted); font-size: .85rem; }
.ext-card .fold { margin-top: auto; }
.ext-card .fold > summary { min-height: 2.75rem; font-size: .9rem; }

.ext-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .65rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.ext-pill__dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.ext-pill--ok { background: var(--ok-bg); color: var(--ok-text); }
.ext-pill--warn { background: var(--warn-bg); color: var(--warn-text); }
.ext-pill--danger { background: var(--danger-bg); color: var(--danger-text); }

.ext-spark { display: flex; align-items: flex-end; gap: 3px; height: 3.5rem; margin-top: .9rem; }
.ext-spark__col { display: flex; flex: 1; align-items: flex-end; min-width: 0; height: 100%; }
.ext-spark__bar { display: flex; flex-direction: column; width: 100%; min-height: 4px; overflow: hidden; border-radius: 4px 4px 2px 2px; background: var(--primary); }
.ext-spark__bar--empty { height: 4px; background: var(--border); }
.ext-spark__bar--ko { background: var(--coral); }
.ext-spark__ko { display: block; width: 100%; background: var(--coral); }
.ext-spark__axis { display: flex; justify-content: space-between; margin: .25rem 0 0; color: var(--muted); font-size: .72rem; }

.ext-facts { display: grid; gap: .65rem; margin: .85rem 0 .5rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.ext-fact { display: flex; flex-direction: column; gap: .1rem; font-size: .9rem; }
.ext-fact dt { color: var(--muted); font-size: .8rem; }
.ext-fact dd { margin: 0; font-weight: 600; }
.ext-code { display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: 6px; background: var(--danger-bg); color: var(--danger-text); font: 600 .78rem var(--font-mono); }

.ext-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ext-table th, .ext-table td { padding: .35rem .25rem; border-bottom: 1px solid var(--border); }
.ext-table thead th { color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-align: right; text-transform: uppercase; }
.ext-table thead th:first-child, .ext-table tbody th { text-align: left; }
.ext-table tbody th { font-weight: 500; }
.ext-table td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.ext-table__bad { color: var(--danger); font-weight: 700; }

.ext-intro { max-width: 46rem; margin: 0 0 .75rem; color: var(--muted); }
.ext-more__list { display: grid; gap: .3rem; margin: 0; padding-left: 1.1rem; color: var(--muted); }

/* Saisie Markdown (US-J19) : barre d'outils au-dessus d'un champ texte (`markdown-editor`). Boutons de 2,75 rem de haut au minimum (cible tactile), défilement horizontal si l'écran est étroit. */
.md-tools { display: flex; gap: .25rem; margin: 0 0 .35rem; padding: 0; overflow-x: auto; }
.md-tools__btn { flex: none; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .65rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.md-tools__btn:hover { background: var(--surface); }
.md-tools__btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ===== Fiche partagée d'un point, maquette B : carte en fond + volet (mobile), colonne latérale + carte (≥ 56 rem) ===== */
.shared--point.sp, .shared--group.sp { max-width: none; padding: 0; }
.sp__wrap { display: flex; flex-direction: column; min-height: 100dvh; }
.sp__map { position: relative; isolation: isolate; display: block; height: 46dvh; min-height: 18rem; }
.sp__map .map__canvas, .sp__map .map__canvas.leaflet-container { height: 100%; min-height: 0; border: 0; border-radius: 0; }
.sp__map .map__tools { position: absolute; top: .75rem; right: .75rem; z-index: 1100; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: .5rem; }
.sp__map .map__tools .map-btn + .map-btn { margin-top: 0; }
.sp__map .map__locate-status { position: absolute; top: 0; right: 3.5rem; width: 12rem; flex: none; padding: .4rem .6rem; border-radius: var(--radius-sm); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.sp__map .map__notice { position: absolute; left: .75rem; right: 4.5rem; top: .75rem; z-index: 1100; }
.sp__fabs { position: absolute; left: .75rem; bottom: 2.25rem; z-index: 1100; }
.map-btn--label { width: auto; gap: .5rem; padding: 0 1rem; font: inherit; font-size: .9rem; font-weight: 700; }
.sp__map.is-fullscreen { position: fixed; inset: 0; z-index: 3000; height: auto; min-height: 0; }
.sp__map.is-fullscreen .sp__fabs { bottom: max(1rem, env(safe-area-inset-bottom, 0px)); left: max(.75rem, env(safe-area-inset-left)); }
html.has-fullscreen-map, html.has-fullscreen-map body { overflow: hidden; }

.sp__sheet { position: relative; z-index: 1; flex: 1; margin-top: -1.5rem; padding: 1.75rem max(1rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left)); display: grid; align-content: start; gap: .75rem; background: var(--bg); border-top: 1px solid var(--border); border-radius: 1.5rem 1.5rem 0 0; }
.sp__sheet::before { content: ""; position: absolute; top: .55rem; left: 50%; width: 2.5rem; height: .25rem; margin-left: -1.25rem; border-radius: 2px; background: var(--border); }
.sp__sheet > * { margin: 0; }
.sp__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sp__top .brand-chip { box-shadow: none; background: var(--surface-2); min-height: 2.75rem; font-size: 1rem; }
.sp__top .icon-btn { min-width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--border); background: var(--surface); }
.sp__title { font-size: 1.6rem; }
.sp__sheet .point-nav { margin-top: .25rem; }

.sp__acc { border-top: 1px solid var(--border); }
.sp__acc > summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.25rem; font-weight: 700; cursor: pointer; list-style: none; }
.sp__acc > summary::-webkit-details-marker { display: none; }
.sp__acc > summary::after { content: ""; flex: none; width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.sp__acc[open] > summary::after { transform: rotate(-135deg); }
.sp__sum { margin-left: auto; color: var(--muted); font-weight: 400; font-size: .9rem; }
.sp__acc-body { padding-bottom: .75rem; }
.sp__acc--coords { padding-top: .75rem; }

@media (min-width: 56rem) {
    .sp__wrap { display: grid; grid-template-columns: 26.25rem minmax(0, 1fr); height: 100dvh; min-height: 0; }
    .sp__map { order: 2; height: 100%; }
    .sp__sheet { order: 1; margin-top: 0; padding-top: 1.25rem; overflow-y: auto; border-top: 0; border-right: 1px solid var(--border); border-radius: 0; }
    .sp__sheet::before { display: none; }
    .sp__fabs { bottom: 1.75rem; }
}

/* Page publique d'un groupe : en-tête (pastille d'icône teintée, compteurs) et liste de points en cartes à liseré de couleur (catégorie, sinon groupe). */
.sg__head { display: flex; align-items: center; gap: .85rem; margin-top: .25rem; }
.sg__head > * { margin: 0; }
.sg__head-text { display: grid; gap: .4rem; min-width: 0; }
.sg__head .sp__title { overflow-wrap: anywhere; }
.sg__icon { display: grid; place-items: center; flex: none; width: 3.5rem; height: 3.5rem; border-radius: 18px; font-size: 1.75rem; background: color-mix(in srgb, var(--group-color, var(--primary)) 20%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--group-color, var(--primary)) 55%, transparent); }
.sg__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.sg__chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 1.75rem; padding: 0 .7rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .85rem; }
.sg__chip--quiet { background: none; box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
.sg__section { display: grid; gap: .6rem; margin-top: .5rem; }
.sg__heading { font-size: 1.05rem; }
.sg__empty { margin: 0; padding: 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.sg__list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.sg__item { position: relative; display: grid; gap: .7rem; padding: 1rem 1rem .8rem 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.4rem; box-shadow: 0 1px 2px rgba(11, 31, 39, .05); transition: box-shadow .2s ease, border-color .2s ease; }
.sg__item::before { content: ""; position: absolute; top: 1rem; bottom: 1rem; left: .6rem; width: .3rem; border-radius: .3rem; background: var(--group-color, var(--border)); } /* liseré : couleur de la catégorie, sinon du groupe */
.sg__item > * { margin: 0; }
.sg__main { display: grid; gap: .45rem; min-width: 0; }
.sg__main > * { margin: 0; }
.sg__row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.sg__name { font-size: 1.1rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sg__rating { flex: none; padding: .1rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--star-fill) 14%, transparent); color: var(--star); font-family: var(--font-mono); font-size: .8rem; font-weight: 700; line-height: 1.6; }
.sg__tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.sg__tag { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.75rem; padding: 0 .65rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 600; }
.sg__tag--category { background: color-mix(in srgb, var(--group-color, var(--muted)) 16%, var(--surface)); }
.sg__address { display: flex; align-items: flex-start; gap: .4rem; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.sg__address .ico { margin-top: .15rem; }
.sg__note { border-top: 1px solid var(--border); }
.sg__note > summary { display: flex; align-items: center; gap: .5rem; min-height: 2.5rem; color: var(--muted); font-size: .9rem; font-weight: 700; cursor: pointer; list-style: none; }
.sg__note > summary::-webkit-details-marker { display: none; }
.sg__note > summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.sg__note[open] > summary::after { transform: rotate(-135deg); }
/* Trois actions de même poids visuel : « Y aller » (mandarine), « Carte » (centre la carte), « Fiche » (page publique du point). */
.sg__actions { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: .45rem; }
.sg__go { display: contents; }
.sg__btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-height: 2.75rem; padding: 0 .5rem; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.sg__btn:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.sg__btn--primary { background: var(--primary); color: var(--primary-text); }
.sg__btn--primary:hover { background: var(--primary); filter: brightness(1.06); }
.sg__btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sg__coords { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .25rem; margin-top: -.15rem; color: var(--muted); font-size: .8rem; }
.sg__coords code { user-select: all; }
@media (hover: hover) { .sg__item:hover { border-color: color-mix(in srgb, var(--group-color, var(--primary)) 40%, var(--border)); box-shadow: var(--shadow-sm); } }
@media (prefers-reduced-motion: reduce) { .sg__item, .sg__note > summary::after { transition: none; } }

/* Picto « itinéraire GPX » sur les vignettes et lignes de points */
.mark--track { display: inline-grid; color: var(--primary-ink, var(--primary)); }
/* Pastille « itinéraire GPX » en haut à gauche du bandeau, face au bouton « Y aller » (haut à droite) */
.point-item__track { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--surface-2); color: var(--primary-ink, var(--primary)); text-decoration: none; }
.point-item__track:hover { background: var(--primary); color: var(--primary-text); }
.point-item--thumb .point-item__track { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.shell--c .point-item__track { width: 2.5rem; height: 2.5rem; }
.shell--c .point-item--thumb .point-item__track { border: 1px solid rgba(255, 255, 255, .55); background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(8px) saturate(1.4); backdrop-filter: blur(8px) saturate(1.4); box-shadow: 0 2px 10px rgba(0, 0, 0, .28); }
.shell--c .point-item--thumb .point-item__track:hover { border-color: transparent; background: var(--primary); color: var(--primary-text); }
.shell--c .point-item--thumb > .point-row { align-content: start; }
.shell--c .point-item:not(.point-item--thumb) > .point-row { padding-top: .5rem; min-height: 0; } /* sans image : la ligne suit la barre du haut, sans trou */ /* l'image reste en haut, le texte juste dessous, même si la carte est étirée */

/* Curseur « Explorer le tracé » posé sur la carte : visible en même temps que le repère, sur mobile comme en plein écran */
.sp__bottom { position: absolute; left: .75rem; right: .75rem; bottom: 2.25rem; z-index: 1100; display: grid; gap: .5rem; justify-items: start; pointer-events: none; }
.sp__bottom > * { pointer-events: auto; }
.sp__bottom .sp__fabs { position: static; }
.sp__map--track { height: 58dvh; }
.sp__scrub { justify-self: stretch; padding: .5rem .85rem .25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sp__scrub-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.75rem; }
.sp__scrub-head label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.sp__scrub-clear { min-height: 2rem; padding: 0 .6rem; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.sp__scrub-hint { margin: 0; font-size: .85rem; color: var(--muted); }
.sp__vals { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin: 0; }
.sp__vals > div { display: flex; flex-direction: column-reverse; }
.sp__vals > div[hidden] { display: none; }
.sp__vals dd { margin: 0; font-family: var(--font-mono); font-size: .95rem; font-weight: 700; white-space: nowrap; }
.sp__vals dt { color: var(--muted); font-size: .72rem; }
.sp__scrub input[type="range"] { box-sizing: border-box; width: 100%; min-height: 2.5rem; margin: 0; accent-color: var(--primary); }
.sp__scrub input[type="range"]:disabled { opacity: .5; }
.sp__map.is-fullscreen .sp__bottom { bottom: max(1rem, env(safe-area-inset-bottom, 0px)); }
@media (min-width: 56rem) {
    .sp__map--track { height: 100%; }
    .sp__bottom { bottom: 1.75rem; }
    .sp__scrub { max-width: 30rem; }
}

/* Version compacte sur la carte : bouton d'agrandissement réduit à son pictogramme, panneau du curseur plus bas */
.sp__bottom { gap: .4rem; }
.sp__bottom .map-btn--label { width: 2.5rem; height: 2.5rem; padding: 0; gap: 0; border-radius: 12px; }
.sp__bottom .map-btn--label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sp__scrub { padding: .3rem .7rem .1rem; border-radius: 12px; }
.sp__scrub-head { min-height: 1.4rem; }
.sp__scrub-head label { font-size: .75rem; }
.sp__scrub-clear { min-height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
.sp__scrub-hint { font-size: .75rem; line-height: 1.2; }
.sp__vals dd { font-size: .85rem; }
.sp__vals dt { font-size: .68rem; }
.sp__scrub input[type="range"] { min-height: 2rem; }

/* Bouton qui affiche ou cache le curseur du tracé (à côté de « Agrandir ») */
.sp__bottom .sp__fabs { display: flex; gap: .4rem; }
.sp__bottom .map-btn--icon.is-off { background: var(--panel); color: var(--muted); }
.sp__bottom .map-btn--icon:not(.is-off) { background: var(--primary); color: var(--primary-text); }

/* Fiche d'un point : le curseur du tracé sur la mini-carte (et dans la feuille mobile) */
.point-map .map { position: relative; }
.point-map .sp__bottom { bottom: 1.5rem; }
.point-map .sp__scrub { max-width: 30rem; }

/* Choisir une zone sur la carte (US-V5) : la carte, les trois façons de donner le centre, puis la feuille du bas (mobile) ou une carte sous la carte (grand écran). */
.trip-pick { display: grid; gap: .75rem; margin: 0 0 1.25rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.trip-pick .card__title, .trip-pick .card__text { margin: 0; }
.trip-pick .map-pin__dot { background: var(--primary); }
.trip-pick .map-pin--preview .map-pin__dot { transform: scale(1.25); }
.trip-pick__map .map__canvas, .trip-pick__map .map__canvas.leaflet-container { height: 20rem; min-height: 14rem; }
.trip-pick__map .map__canvas.is-picking, .trip-pick__map .map__canvas.is-picking .leaflet-interactive { cursor: crosshair; }
.trip-pick__fields { display: grid; gap: 1rem; }
.trip-pick .field__hint:empty { display: none; }
.trip-sheet { display: grid; gap: .75rem; padding: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.trip-sheet[hidden] { display: none; }
.trip-sheet__title { margin: 0; font-size: 1.1rem; font-weight: 700; }
.trip-sheet__facts { display: grid; gap: .35rem; margin: 0; }
.trip-sheet__facts > div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.trip-sheet__facts dt { flex: 0 0 4.5rem; color: var(--muted); }
.trip-sheet__facts dd { flex: 1 1 10rem; min-width: 0; margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trip-sheet__facts dd:empty { display: none; }
.trip-sheet__form { display: grid; gap: .75rem; }
.trip-sheet__summary { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.trip-sheet__summary:empty { display: none; }
.stepper { display: flex; align-items: stretch; gap: .5rem; }
.stepper__btn { flex: 0 0 auto; min-width: 3rem; min-height: 2.75rem; font-size: 1.35rem; line-height: 1; }
.stepper__input.stepper__input, input[type="text"].stepper__input { flex: 0 1 5rem; width: 5rem; text-align: center; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.trip-zones { display: grid; gap: .25rem; }
.trip-zones[hidden] { display: none; }
.trip-zones__title { margin: 0; font-size: .95rem; font-weight: 700; }
.trip-zones__list { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.trip-zones__list li { overflow-wrap: anywhere; }
/* Enchaîner les zones (US-V7) : pastilles numérotées de la carte et de la liste (couleur propre à chaque zone, texte blanc : contraste vérifié), bandeau « où ensuite ? ». */
.map-zone-icon { display: flex; align-items: center; justify-content: center; background: none; border: 0; }
.map-zone, .zone-chip { display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--zone, #475569); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.map-zone { width: 2rem; height: 2rem; border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .45); font-size: .95rem; }
.zone-chip { width: 1.75rem; height: 1.75rem; font-size: .85rem; }
.map-zone-icon:focus { outline: none; }
.map-zone-icon:focus-visible .map-zone { outline: 3px solid #0f172a; outline-offset: 2px; }
.leaflet-tooltip.map-route__tip { padding: .2rem .5rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.trip-zones__item { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 2.75rem; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.trip-zones__item:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.trip-chain { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0; }
.trip-chain__text { flex: 1 1 12rem; min-width: 0; margin: 0; font-weight: 600; }
.trip-chain__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.trip-chain .btn { min-height: 2.75rem; }
.trip-sheet--actions .form__actions { display: grid; gap: .5rem; }
/* Modifier, réordonner, dupliquer et supprimer une zone (US-V8) : poignée de la liste (44 px, glissée au doigt : pas de défilement de la page dessus), ligne en cours de glissement. */
.trip-zones__row { display: flex; align-items: stretch; gap: .35rem; }
.trip-zones__row .trip-zones__item { flex: 1 1 auto; width: auto; min-width: 0; }
.zone-handle { flex: 0 0 auto; display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.zone-handle:active { cursor: grabbing; }
.trip-zones__row.is-dragging { position: relative; z-index: 1; border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.trip-zones__row.is-dragging .trip-zones__item, .trip-zones__row.is-dragging .zone-handle { border-color: var(--primary); }
@media (min-width: 56.25rem) {
    .trip-pick__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
/* Mobile (AGENTS.md) : l'action sur la zone s'ouvre en feuille qui monte du bas, sur toute la largeur, au-dessus de la barre d'onglets ; boutons de 3,25 rem. */
@media (max-width: 56.24rem) {
    .trip-sheet {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
        padding: 1.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
        border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0;
        background: var(--surface); box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
        animation: peek-sheet-up .22s ease-out;
    }
    .trip-sheet::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
    .trip-sheet .form__actions .btn { width: 100%; min-height: 3.25rem; }
    .trip-sheet--actions { z-index: 46; } /* au-dessus de la feuille de la zone, si les deux sont ouvertes */
    .trip-pick.has-sheet { padding-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .trip-sheet { animation: none; } }

/* Vue d'ensemble d'un voyage (US-V10) : dates et totaux, mini-carte, frise des zones (pastille de couleur, nom, dates, nuits, compteurs), bouton « Ajouter une zone ». */
.trip-overview { display: grid; gap: 1rem; margin: 0 0 1.25rem; }
.trip-overview__head { display: grid; gap: .15rem; margin: 0; }
.trip-overview__dates { margin: 0; font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.trip-overview__totals { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.trip-overview__map .map__canvas, .trip-overview__map .map__canvas.leaflet-container { height: 16rem; min-height: 12rem; }
.trip-stops-block { display: grid; gap: .5rem; }
.trip-stops { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.trip-stop { display: grid; gap: .35rem; padding: .35rem .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.trip-stop__link { display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; padding: .25rem; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); }
.trip-stop__link:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.trip-stop__text { display: grid; gap: .1rem; min-width: 0; }
.trip-stop__name { font-weight: 700; overflow-wrap: anywhere; }
.trip-stop__when, .trip-stop__nights { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trip-stop__counters { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0 .25rem .25rem; list-style: none; }
.trip-stop__counters[hidden] { display: none; }
.trip-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; }
.trip-chip.is-alert { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; font-weight: 600; }
/* Zone de passage (0 nuit) : plus petite, sans compteurs. */
.trip-stop.is-pass { padding: .1rem .5rem; border-style: dashed; }
.trip-stop.is-pass .zone-chip { width: 1.4rem; height: 1.4rem; font-size: .75rem; }
.trip-stop.is-pass .trip-stop__name { font-weight: 600; font-size: .95rem; }
.trip-zone-title { display: flex; align-items: center; gap: .6rem; overflow-wrap: anywhere; }
/* « Ajouter une zone » : fixé au-dessus de la barre d'onglets sur mobile (comme `.add-fab`), dans la page sur grand écran. */
.trip-overview { padding-bottom: 4.5rem; }
@media (min-width: 56.25rem) {
    .trip-overview { padding-bottom: 0; }
    .trip-add { display: inline-flex; position: static; justify-self: start; box-shadow: none; } /* `.add-fab` est masqué sur grand écran : celui-ci reste, dans la page */
}

/* Rayon d'une zone (US-V9) : curseur à crans et saisie en km sur une ligne. */
.radius-field { display: flex; align-items: center; gap: .75rem; }
.radius-field__slider { flex: 1 1 auto; box-sizing: border-box; min-width: 0; min-height: 2.75rem; margin: 0; padding: 0; accent-color: var(--primary); }
input[type="text"].radius-field__input { flex: 0 0 5rem; width: 5rem; text-align: center; font-variant-numeric: tabular-nums; }

/* Lieux d'une zone (US-V11 à V15). */
.alert--info { background: color-mix(in srgb, var(--primary) 12%, var(--bg)); color: inherit; }
.alert--info[hidden], .trip-out[hidden] { display: none; }
.trip-for { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
.trip-for__label { color: var(--muted); }
.trip-out { display: grid; gap: .5rem; margin: 0; }
.trip-out p { margin: 0; }
.trip-place-fields { display: grid; gap: .75rem; margin: 0; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.trip-place-fields legend { padding: 0 .35rem; font-weight: 700; }
.trip-place-fields__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.trip-nights { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.trip-night { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; padding: .4rem .6rem; border-radius: var(--radius-sm); background: var(--surface-2, rgba(127, 127, 127, .08)); overflow-wrap: anywhere; }
.trip-night.is-alert, .trip-day__night.is-alert { background: var(--warn-bg); color: var(--warn-text); }
.trip-night.is-overlap { border: 2px dashed var(--warn-text); }
.trip-night__label { font-weight: 600; font-variant-numeric: tabular-nums; }
.trip-day { display: grid; gap: .4rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.trip-day:first-child { border-top: 0; }
.trip-day__title { margin: 0; font-size: .95rem; font-weight: 700; }
.trip-day__night { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: 0; padding: .35rem .6rem; border-radius: var(--radius-sm); background: var(--surface-2, rgba(127, 127, 127, .08)); font-size: .9rem; overflow-wrap: anywhere; }
.trip-places { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.trip-place { display: flex; align-items: center; gap: .65rem; width: 100%; min-height: 3rem; padding: .45rem .65rem; border: 1px solid var(--border); border-left: 4px solid var(--kind, #475569); border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.trip-place:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.trip-place__icon { flex: 0 0 auto; font-size: 1.25rem; }
.trip-place__body { display: grid; min-width: 0; }
.trip-place__kind { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.trip-place__title { font-weight: 600; overflow-wrap: anywhere; }
.trip-place__detail { font-size: .85rem; color: var(--muted); }
.trip-place__detail:empty { display: none; }
.trip-zone__map .map__canvas, .trip-zone__map .map__canvas.leaflet-container { height: 18rem; min-height: 12rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.sheet-grid > .btn { min-height: 3.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Choix du type d'un lieu : pictogramme dans un carré de la couleur du type (comme dans la liste), libellé et une ligne d'aide. */
.sheet-grid > .sheet-kind, .sheet-list > .sheet-kind { display: flex; align-items: center; justify-content: flex-start; gap: .65rem; min-height: 4rem; padding: .5rem .65rem; border-radius: 18px; text-align: left; white-space: normal; }
.sheet-kind__icon { flex: 0 0 2.5rem; display: grid; place-items: center; height: 2.5rem; border-radius: 12px; background: var(--kind, #475569); color: #fff; font-size: 1.2rem; }
.sheet-kind__text { display: grid; min-width: 0; line-height: 1.25; }
.sheet-kind__text small { color: var(--muted); font-size: .78rem; font-weight: 400; overflow-wrap: anywhere; }
.sheet-grid > .sheet-kind.is-suggested { grid-column: 1 / -1; border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); }
.sheet-target { margin: -.25rem 0 .6rem; }
/* Façon de situer le lieu : une colonne de lignes pleine largeur, les façons rares repliées sous « Autres façons ». */
.sheet-list { display: grid; gap: .5rem; }
.sheet-list > .sheet-kind { min-height: 3.5rem; }
.sheet-list > .sheet-kind .sheet-kind__icon { background: var(--kind, var(--surface-2, #475569)); }
.sheet-more { margin-top: .6rem; }
.sheet-more > summary { padding: .5rem .25rem; color: var(--muted); font-weight: 600; cursor: pointer; }
.sheet-more > .sheet-list { margin-top: .4rem; }
.sheet-grid + .form__actions, .sheet-more + .form__actions { margin-top: .75rem; }
.trip-zone-sheet .form__actions { display: grid; gap: .5rem; }
.trip-picker { display: grid; gap: .35rem; max-height: 45dvh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.trip-picker__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .75rem; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.trip-picker__row.is-inside { border-left: 4px solid var(--primary); }
.trip-picker__row .check { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.trip-picker__row select { flex: 0 0 auto; min-height: 2.75rem; }
.trip-picker__filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.trip-picker__filters select { min-height: 2.75rem; }
.trip-stop__actions { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0 0; }
.trip-stop__actions:not(:has(> :not([hidden]))) { display: none; }
@media (max-width: 56.24rem) {
    .trip-zone-sheet { z-index: 47; }
}

/* Idées, statut et fiche d'un lieu (US-V16 à V18). Statut : pictogramme et texte, jamais la couleur seule (H2). */
.trip-place-row { display: flex; align-items: stretch; gap: .35rem; }
.trip-place-row .trip-place { flex: 1 1 auto; width: auto; min-width: 0; }
.trip-status { flex: 0 0 auto; min-width: 2.75rem; min-height: 2.75rem; padding: .25rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.trip-status--to_book { border-style: dashed; font-weight: 600; }
.trip-status--booked { border-width: 2px; font-weight: 600; }
.trip-status:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.trip-idea__suggest, .trip-idea { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; margin: .25rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.trip-ideas .trip-places { gap: .25rem; }
.trip-place-card { display: grid; gap: .75rem; }
.trip-place-card .card__title { margin: 0; overflow-wrap: anywhere; }
.trip-place-facts dt { flex-basis: 7rem; }
.trip-place-edit, .trip-place-link { display: grid; gap: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.trip-place-edit[hidden], .trip-place-link[hidden] { display: none; }

/* Programme jour par jour (US-V20, V21) : onglets des jours qui défilent à l'horizontale, poignée de glisser-déposer, cible de dépôt. */
.trip-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .5rem; padding: 0 0 .35rem; }
.trip-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .35rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .9rem; white-space: nowrap; cursor: pointer; }
.trip-tab[aria-selected="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); font-weight: 700; }
.trip-tab__count { min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; background: color-mix(in srgb, currentColor 16%, transparent); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.trip-tab.is-drop-target, .trip-place-row.is-drop-target { outline: 3px dashed var(--primary); outline-offset: 2px; }
.trip-place-row.is-drop-target.is-drop-after { outline-style: solid; }
.trip-place-row.is-dragging { opacity: .6; }
.trip-handle { align-self: stretch; }
.trip-day__actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.trip-day__empty { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: var(--muted); }
.trip-day__empty p { margin: 0; }
.trip-ideas-pick { display: grid; gap: .35rem; }
.trip-ideas-pick[hidden] { display: none; }

/* Carte du voyage (US-V24), programme (US-V23), jour sur la carte (US-V22). */
.trip-fullmap { display: grid; gap: .6rem; }
.trip-fullmap__map .map__canvas, .trip-fullmap__map .map__canvas.leaflet-container { height: 62dvh; min-height: 18rem; }
.trip-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.trip-filters__label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.trip-chip-filter { min-height: 2.75rem; padding: .3rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .9rem; cursor: pointer; }
.trip-chip-filter[aria-pressed="true"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 16%, transparent); font-weight: 700; }
.trip-chip-filter[aria-pressed="true"]::before { content: "✓ "; }
.trip-map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.trip-map-tools select { min-height: 2.75rem; }
.trip-map-list { display: grid; gap: .75rem; }
.trip-map-list[hidden] { display: none; }
.trip-place-row.is-current .trip-place { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.trip-day__legs { font-size: .9rem; }
.trip-day__legs summary { cursor: pointer; font-weight: 600; }
.map-pin__dot.map-pin__dot--glyph { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; font-size: .85rem; line-height: 1; }

/* ===== Pages voyages : piste « carte d'abord » (maquettes B). Les couleurs viennent des variables du thème : clair et sombre suivent l'appareil.
   Mobile : titre, carte, onglets (Lieux · Nuits · Infos) puis les lieux. Bureau (≥ 56,25 rem) : deux colonnes, la carte reste fixe à droite. ===== */
.page--trip .topbar__title { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.page--trip .trip-zone-title .zone-chip { width: 2.5rem; height: 2.5rem; font-size: 1.2rem; font-family: var(--font-display); }
.page--trip .topbar .form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }

/* Une zone : grille « titre, carte, panneau » */
.tz { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "map" "panel"; column-gap: 1.5rem; }
.tz__head { grid-area: head; min-width: 0; }
.tz__map { grid-area: map; position: relative; display: flex; flex-direction: column; min-width: 0; margin-bottom: 1rem; }
.tz__panel { grid-area: panel; min-width: 0; }
.tz .trip-zone__map { position: relative; flex: 1 1 auto; min-height: 0; }
.tz .trip-zone__map .map__canvas, .tz .trip-zone__map .map__canvas.leaflet-container { height: 16rem; min-height: 12rem; border-radius: var(--radius); }
.tz__hint { margin: .5rem .25rem 0; font-size: .8rem; }
.tz .map__tools { position: absolute; z-index: 1100; top: .75rem; right: .75rem; }
.tz-tabs { display: flex; gap: .25rem; margin: 0 0 1rem; padding: .25rem; background: var(--seg-bg); border-radius: 999px; }
.tz-tabs[hidden] { display: none; }
.tz-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.75rem; padding: 0 .75rem; border: 0; border-radius: 999px; background: transparent; color: var(--seg-text); font: inherit; font-size: .9rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.tz-tab[aria-selected="true"] { background: var(--seg-on-bg); color: var(--seg-on-text); }
.tz-tab:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.tz-tab__n { font-variant-numeric: tabular-nums; font-weight: 700; opacity: .85; }
.tz-tab__n:empty { display: none; }
.tz-tab__n.is-alert::after { content: " !"; }
.tz-panel[hidden] { display: none; }
.tz-panel + .tz-panel { margin-top: 1.5rem; }
.tz-tabs:not([hidden]) ~ .tz-panel + .tz-panel { margin-top: 0; }
.tz-panel__title { margin: 0 0 .6rem; font-size: 1rem; font-family: var(--font-display); }

/* Lieux : une carte par lieu, pictogramme dans un carré de la couleur du type, statut en pastille */
.trip-place-row { gap: .25rem; align-items: center; }
.trip-place { gap: .8rem; min-height: 4rem; padding: .6rem .75rem; border: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.trip-place:hover { background: var(--surface-2); }
.trip-place__icon { flex: 0 0 2.9rem; display: grid; place-items: center; height: 2.9rem; border-radius: 14px; background: var(--kind, #475569); color: #fff; font-size: 1.3rem; }
.trip-place__kind { font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.trip-place__title { font-size: 1rem; }
.trip-place-row .zone-handle { width: 1.5rem; border: 0; background: none; }
.trip-status { border-radius: 999px; align-self: center; }
.trip-status--booked { border-color: transparent; background: color-mix(in srgb, var(--primary) 82%, #fff); color: var(--primary-text); }
.trip-places { gap: .6rem; }
.trip-night { padding: .65rem .85rem; border-radius: 14px; }
.trip-night:not(.is-alert) { background: var(--ok-bg); color: var(--ok-text); }

/* Feuille d'action sur grand écran : posée sur la carte, en bas, plutôt qu'insérée dans la grille */
@media (min-width: 56.25rem) {
    .page--trip .topbar__title { font-size: 2.25rem; }
    .tz { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); grid-template-areas: "head map" "panel map"; grid-template-rows: auto 1fr; align-items: start; }
    .tz__map { position: sticky; top: 5.5rem; height: calc(100dvh - 7rem); margin-bottom: 0; }
    /* La carte remplit la colonne (un `display: grid` étirait les lignes : carte à mi-hauteur, bouton « couches » loin dessous) ; « Ajouter » et « couches » passent au-dessus des volets de Leaflet (z-index 400 à 1000). */
    .tz .trip-zone__map { display: block; }
    .tz .trip-zone__map .map__canvas, .tz .trip-zone__map .map__canvas.leaflet-container { height: 100%; border-radius: 28px; }
    .tz .tz__add { display: inline-flex; position: absolute; z-index: 1100; top: 1rem; right: 1rem; bottom: auto; box-shadow: var(--shadow-sm); }
    .tz .map__tools { top: 5rem; right: 1rem; }
    .tz > .trip-sheet { grid-area: map; position: sticky; bottom: 1rem; z-index: 30; align-self: end; justify-self: center; width: min(26rem, calc(100% - 2rem)); margin-bottom: 1rem; background: var(--surface); box-shadow: var(--shadow); }
}

/* Vue d'ensemble : bandeau des dates, frise reliée, carte à droite sur grand écran */
.page--trip .trip-overview__head { background: var(--nav-bg); color: #f4fbfd; border-color: transparent; border-radius: 24px; padding: 1rem 1.15rem; }
.page--trip .trip-overview__dates { font-family: var(--font-display); font-size: 1.3rem; }
.page--trip .trip-overview__totals { color: var(--nav-text); }
.page--trip .trip-overview__map .map__canvas, .page--trip .trip-overview__map .map__canvas.leaflet-container { border-radius: 22px; }
.page--trip .trip-stops { gap: .6rem; }
.page--trip .trip-stop { position: relative; border-radius: 18px; padding: .4rem .6rem; }
.page--trip .trip-stop:not(:last-child)::after { content: ""; position: absolute; left: 1.725rem; top: 100%; width: 2px; height: .6rem; margin-left: -1px; background: var(--border); }
.page--trip .zone-chip { font-family: var(--font-display); }
.page--trip .trip-stop .zone-chip { width: 2.5rem; height: 2.5rem; font-size: 1.05rem; }
.page--trip .trip-stop__name { font-family: var(--font-display); font-size: 1.1rem; }
.page--trip .trip-chip { background: var(--surface-2); border-color: transparent; }
.page--trip .trip-ideas { border-style: dashed; border-radius: 18px; }
@media (min-width: 56.25rem) {
    .page--trip .trip-overview { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); align-items: start; column-gap: 1.5rem; }
    .page--trip .trip-overview > * { grid-column: 1; }
    .page--trip .trip-overview > .trip-overview__map { grid-column: 2; grid-row: 1 / span 8; position: sticky; top: 5.5rem; align-self: start; }
    .page--trip .trip-overview__map .map__canvas, .page--trip .trip-overview__map .map__canvas.leaflet-container { height: calc(100dvh - 7.5rem); border-radius: 28px; }
}

/* Mes voyages : une carte par voyage, plusieurs colonnes sur grand écran */
.page--trip .trip-section__title { color: var(--muted); font-size: .95rem; }
.page--trip .trip-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: .75rem; }
.page--trip .trip-row { gap: .25rem; padding: 1rem 1.15rem; border-radius: 22px; }
.page--trip .trip-row__name { font-family: var(--font-display); font-size: 1.2rem; }
.page--trip .trip-row__route { color: var(--text); font-weight: 600; }
.page--trip .trip-row:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* Carte du voyage et programme */
@media (min-width: 56.25rem) {
    .page--trip .trip-fullmap__map .map__canvas, .page--trip .trip-fullmap__map .map__canvas.leaflet-container { height: calc(100dvh - 19rem); min-height: 22rem; border-radius: 28px; }
}

/* Programme jour par jour (US-V23), piste « carte d'abord » : un titre par zone, puis un jour = une pastille de date et une carte ; les lieux sont des cartes
   comme sur la page d'une zone. Un jour vide est une ligne en pointillés ; la nuit est une pastille (verte : un toit, jaune : sans hébergement). */
.trip-programme { display: grid; gap: 1rem; max-width: 56rem; }
.trip-programme__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.trip-programme__head .card__title { margin: 0; font-family: var(--font-display); font-size: 1.4rem; }
.trip-programme__summary { margin: 0; color: var(--muted); font-size: .9rem; }
.trip-programme__summary.is-alert { color: var(--warn-text); background: var(--warn-bg); padding: .1rem .65rem; border-radius: 999px; font-weight: 600; }
.trip-programme__summary[hidden] { display: none; }
.trip-programme__days { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: .75rem .6rem; margin: 0; padding: 0; list-style: none; }
.trip-programme__days.has-bands { grid-template-columns: 3.1rem minmax(0, 1fr) repeat(var(--lanes, 1), 2.6rem); }
@media (min-width: 40.0625rem) {
    .trip-programme__days { grid-template-columns: 3.8rem minmax(0, 1fr); column-gap: .9rem; }
    .trip-programme__days.has-bands { grid-template-columns: 3.8rem minmax(0, 1fr) repeat(var(--lanes, 1), minmax(9rem, 12.5rem)); }
}
.trip-pzone { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin: .75rem 0 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.trip-pzone:first-child { margin-top: 0; }
.trip-pzone a { color: var(--text); text-underline-offset: .2em; }
.trip-pzone__nights { font: 400 .85rem var(--font-sans); color: var(--muted); }
.trip-pday { display: contents; }
.trip-pday__date { grid-column: 1; display: flex; flex-direction: column; align-items: center; }
.trip-pday__date::after { content: ""; flex: 1 1 auto; width: 2px; margin: .25rem 0 -.75rem; background: var(--border); }
.trip-pday.is-last .trip-pday__date::after { display: none; }
.trip-pday__pill { align-self: stretch; display: grid; justify-items: center; padding: .4rem 0; border-radius: 16px; background: var(--surface-2); line-height: 1.15; }
.trip-pday__pill b { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.trip-pday__pill small { font-size: .72rem; font-weight: 600; color: var(--muted); }
.trip-pday__body { grid-column: 2; min-width: 0; display: grid; gap: .6rem; padding: .75rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; }
.trip-pday.is-transition .trip-pday__body { border-color: var(--primary); }
.trip-pday.is-empty .trip-pday__body { padding: .55rem .9rem; gap: .15rem; background: transparent; border-style: dashed; }
.trip-pday__head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; }
.trip-pday__title { margin: 0; font-family: var(--font-display); font-size: 1rem; }
.trip-pband { position: relative; min-width: 0; border-radius: 16px; border: 1px solid var(--zone, var(--border)); background: color-mix(in srgb, var(--zone, var(--primary)) 16%, var(--surface)); }
.trip-pband::before { content: ""; position: absolute; inset: 0 auto 0 0; width: .35rem; border-radius: 16px 0 0 16px; background: var(--zone, var(--primary)); }
.trip-pband--gap { border-style: dashed; border-color: var(--warn-text); background: var(--warn-bg); }
.trip-pband--gap::before { background: var(--warn-text); opacity: .6; }
.trip-pband__inner { display: grid; align-content: start; gap: .35rem; height: 100%; padding: .6rem .6rem .6rem .95rem; }
.trip-pband__link { display: grid; gap: .1rem; min-width: 0; color: inherit; text-decoration: none; }
.trip-pband--gap .trip-pband__link { height: 100%; padding: .6rem .6rem .6rem .95rem; color: var(--warn-text); align-content: start; }
.trip-pband__link:hover .trip-pband__title { text-decoration: underline; text-underline-offset: .2em; }
.trip-pband__link:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.trip-pband__title { font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; }
.trip-pband__meta { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.trip-pband--gap .trip-pband__meta { color: inherit; }
.trip-pband__addr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trip-pband__go { justify-self: start; min-height: 2.25rem; }
@media (min-width: 40.0625rem) {
    /* Le contenu de la bande reste en vue quand le séjour est long. */
    .trip-pband__inner, .trip-pband--gap .trip-pband__link { position: sticky; top: 5rem; height: auto; }
}
@media (max-width: 40rem) {
    /* Étroite : seule la bande colorée et le nom, écrit à la verticale (un toucher ouvre la fiche). */
    .trip-pband__inner { height: 100%; padding: .5rem .2rem .5rem .6rem; }
    .trip-pband__link { writing-mode: vertical-rl; max-height: 100%; }
    .trip-pband--gap .trip-pband__link { padding: .5rem .2rem .5rem .6rem; }
    .trip-pband__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-height: 100%; }
    .trip-pband__meta, .trip-pband__go { display: none; }
}
.trip-pday__empty { margin: 0; color: var(--muted); font-size: .9rem; }
.trip-pday__stage { display: grid; gap: .5rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.trip-pday__head + .trip-pday__stage, .trip-pday__leg + .trip-pday__stage { border-top: 0; padding-top: 0; }
.trip-pday__part { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin: 0; font-size: .9rem; font-weight: 700; }
.trip-pday__stay { font-weight: 400; font-size: .82rem; color: var(--muted); }
.trip-pday__checkout { margin: 0; font-size: .82rem; color: var(--muted); }

.trip-pday__places { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.trip-pplace { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: 14px; background: var(--surface-2); color: inherit; text-decoration: none; }
.trip-pplace:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
.trip-pplace:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.trip-pplace__time { flex: 0 0 auto; min-width: 2.75rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.trip-pplace__icon { flex: 0 0 2.4rem; display: grid; place-items: center; height: 2.4rem; border-radius: 12px; background: var(--kind, #475569); color: #fff; }
.trip-pplace__body { flex: 1 1 auto; min-width: 0; display: grid; }
.trip-pplace__title { font-weight: 600; overflow-wrap: anywhere; }
.trip-pplace__detail, .trip-pplace__address { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.trip-pplace__status { flex: 0 0 auto; padding: .15rem .65rem; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.trip-pplace__status--booked { border-color: transparent; background: color-mix(in srgb, var(--primary) 82%, #fff); color: var(--primary-text); }
.trip-pplace__status--to_book { border-style: dashed; }
@media (max-width: 40rem) {
    .trip-pday__body { padding: .65rem .7rem; }
    .trip-pplace { flex-wrap: wrap; }
    .trip-pplace__status { margin-left: 3.1rem; }
}

/* Distances à vol d'oiseau (US-V25) : une ligne discrète sous le lieu ou la zone ; le signal « zones très éloignées » garde pictogramme et texte, la couleur n'est qu'un renfort. */
.trip-place__dist, .trip-pplace__dist { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.trip-place__dist:empty { display: none; }
.trip-stop__leg { margin: 0; padding: 0 .25rem .25rem; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trip-stop__leg[hidden] { display: none; }
.trip-pday__leg { margin: 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.trip-stop__leg.is-alert, .trip-pday__leg.is-alert { padding: .2rem .7rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }

/* « Y aller », météo de la zone et mes points autour d'ici (US-V26) */
.trip-pplace-row { display: flex; align-items: center; gap: .5rem; }
.trip-pplace-row > .trip-pplace { flex: 1 1 auto; min-width: 0; }
.trip-pplace__go { flex: 0 0 auto; min-height: 2.75rem; white-space: nowrap; }
.trip-weather { display: grid; gap: .35rem; justify-items: start; margin: .75rem 0 1rem; }
.trip-weather .btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.trip-weather .field__hint { margin: 0; }
.trip-around { display: grid; gap: .5rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.trip-around__row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.trip-around__text { min-width: 0; overflow-wrap: anywhere; }
.trip-around__row .btn { flex: 0 0 auto; min-height: 2.75rem; }
@media (max-width: 40rem) {
    .trip-pplace-row { flex-wrap: wrap; }
    .trip-pplace__go { margin-left: 3.1rem; }
    .trip-around__row { flex-wrap: wrap; }
}


/* ---- Voyages, suite (US-V27 à V41) ---------------------------------------------------------------------------------------------------------------------------------------- */

/* « À réserver » (US-V28) */
.trip-bookings { display: grid; gap: .75rem; }
.trip-bookings__list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.trip-booking { display: grid; gap: .2rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.trip-booking__title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.trip-booking__meta { margin: 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.trip-booking__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 0; }
.trip-booking__actions .btn, .trip-booking__ref .btn { min-height: 2.75rem; }
.trip-booking__ref { display: grid; gap: .35rem; margin-top: .35rem; }
.trip-bookings__booked > summary { cursor: pointer; }
.trip-row__booking { font-size: .85rem; color: var(--warn-text); }

/* Contrôles du programme (US-V29) : pictogramme et texte, la couleur n'est qu'un renfort. */
.trip-checks__list { display: grid; gap: .4rem; margin: .25rem 0; padding: 0; list-style: none; }
.trip-check { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: .4rem .6rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); overflow-wrap: anywhere; }
.trip-check a { color: inherit; font-weight: 600; }
.trip-check.is-ok { background: var(--ok-bg); color: var(--ok-text); }
.trip-check--nopoint { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.trip-check .btn { min-height: 2.25rem; margin-left: auto; }
.trip-checks__booking { margin: .25rem 0; font-weight: 600; }
.trip-checks__info > summary { cursor: pointer; color: var(--muted); }

/* Budget (US-V30) */
.trip-budget { display: grid; gap: .75rem; }
.trip-budget__total { margin: 0 0 .5rem; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.trip-budget__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.trip-budget__table th, .trip-budget__table td { padding: .4rem .3rem; border-bottom: 1px solid var(--border); text-align: left; }
.trip-budget__table td:last-child, .trip-budget__table th:last-child { text-align: right; }
.trip-budget__table td:nth-child(2), .trip-budget__table th:nth-child(2) { text-align: center; }

/* Pense-bête (US-V31) */
.trip-checklist__list { display: grid; gap: .35rem; margin: .25rem 0 .75rem; padding: 0; list-style: none; }
.trip-checklist__item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-height: 2.75rem; }
.trip-checklist__item input[type="checkbox"] { width: 1.3rem; height: 1.3rem; }
.trip-checklist__item.is-done label { text-decoration: line-through; color: var(--muted); }
.trip-checklist__item.is-late .trip-checklist__due { color: var(--warn-text); font-weight: 600; }
.trip-checklist__due { font-size: .85rem; color: var(--muted); }
.trip-checklist__item .btn { margin-left: auto; }
.trip-checklist__add { display: grid; gap: .5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .trip-checklist__add { grid-template-columns: 2fr 1fr auto; align-items: end; } }

/* Voyage en cours sur l'accueil (US-V38) */
.trip-today { margin-bottom: 1rem; }
.trip-today__list { display: grid; gap: .3rem; margin: .25rem 0; padding-left: 1.1rem; }
.trip-today .card__title { display: flex; align-items: center; gap: .4rem; }

/* Temps de trajet estimés (US-V27) */
.trip-route__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .5rem; font-size: .9rem; }
.trip-route { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-left: .35rem; }
.trip-route .btn { min-height: 2.25rem; }
.trip-route__out { font-size: .85rem; color: var(--text); }
.trip-pplace__leg { flex-basis: 100%; margin: 0 0 0 3.1rem; font-size: .85rem; color: var(--muted); }

/* Que faire ici ? (US-V40) et Proposer un parcours (US-V41) */
.trip-nearby, .trip-suggest { margin: .75rem 0; }
.trip-nearby > summary { cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.trip-nearby__list, .trip-suggest__list { display: grid; gap: .5rem; margin: .5rem 0; padding: 0; list-style: none; }
.trip-nearby__item, .trip-suggest__item { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow-wrap: anywhere; }
.trip-suggest__item input[type="text"] { flex: 1 1 10rem; min-height: 2.75rem; }
.trip-suggest__item input[type="number"] { width: 4.5rem; min-height: 2.75rem; }
.trip-nearby__item .btn, .trip-suggest__item .btn { min-height: 2.75rem; }

/* Page d'une zone, onglet « Infos » : la zone en carte (lieu en grand, centre et rayon en pastilles), bloc repliable et titres au même style. */
.tz-zone-card { display: grid; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tz-facts { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .6rem; margin: 0; }
.tz-facts__place { grid-column: 1 / -1; }
.tz-facts__place dd { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.tz-facts__place .ico { flex: 0 0 auto; margin-top: .08rem; color: var(--primary-ink); }
.tz-facts__stat { min-width: 0; padding: .55rem .8rem; border-radius: 14px; background: var(--surface-2); }
.tz-facts__stat dt { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tz-facts__stat dd { margin: .1rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tz-zone-card__note { padding-top: .8rem; border-top: 1px solid var(--border); }
.tz-zone-card__note > :first-child { margin-top: 0; }
.tz-zone-card__note > :last-child { margin-bottom: 0; }

/* « Que faire ici ? » : bloc repliable en carte (titre en gras, chevron) */
.tz-panel .trip-nearby { margin: .75rem 0; padding: 0 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.tz-panel .trip-nearby[open] { padding-bottom: 1rem; }
.tz-panel .trip-nearby > summary { display: flex; align-items: center; justify-content: flex-start; gap: .5rem; min-height: 3rem; margin: 0; list-style: none; font-family: var(--font-sans); font-size: 1rem; font-weight: 700; }
.tz-panel .trip-nearby > summary::-webkit-details-marker { display: none; }
.tz-panel .trip-nearby > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.4rem; transition: transform .15s; }
.tz-panel .trip-nearby[open] > summary::after { transform: rotate(90deg); }
.tz-panel .trip-nearby > summary .ico { color: var(--primary-ink); }
@media (prefers-reduced-motion: reduce) { .tz-panel .trip-nearby > summary::after { transition: none; } }

/* « Mes points autour d'ici » : titre de section, état vide en cadre pointillé */
.tz-panel h3.tz-section-title { margin: 1.5rem 0 .6rem; }
.tz-empty { margin: 0; padding: .9rem 1rem; border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent); border-radius: var(--radius-sm); font-size: .9rem; }

/* Voyage déplié : page publique (US-V34) ; la page HTML autonome (US-V35) a sa propre feuille, en ligne. */
.trip-out { display: grid; gap: .75rem; }
.trip-out-zone { padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.trip-out-zone__title { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.trip-out-chip { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%; background: var(--zone, #0b6e4f); color: #fff; font-size: .85rem; }
.trip-out-zone__when, .trip-out-day__night, .trip-out-day__empty, .trip-out-place__kind, .trip-out-place__where { margin: .15rem 0; font-size: .9rem; color: var(--muted); }
.trip-out-days, .trip-out-places { margin: 0; padding: 0; list-style: none; }
.trip-out-day { padding: .5rem 0; border-top: 1px solid var(--border); }
.trip-out-day__title { margin: .15rem 0; font-size: 1rem; }
.trip-out-place { margin: .4rem 0 .4rem .4rem; padding-left: .6rem; border-left: 3px solid var(--border); }
.trip-out-place__title { margin: 0; overflow-wrap: anywhere; }
.trip-out-place__time { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ===================================================================================================================================
   Piste B « Escale » (maquettes « Mouette – 2 pistes de refonte », 24/11/2026) : chaleureuse et tactile. Les jetons de couleur et les polices sont en tête de fichier ;
   cette couche reprend la navigation, l'accueil, la vue d'ensemble d'un voyage et la fiche d'un point. Elle vient après le reste : elle l'emporte à spécificité égale.
   - Navigation : une pastille « Accueil · Points · Outils » dans la barre du haut (bureau) ; une barre flottante encre en bas (mobile), avec « + » au centre.
   - Accueil : grand titre, raccourcis en pastilles, prochain voyage en carte encre, groupes en tuiles teintées de leur couleur ; la carte à droite (bureau) ou en tête, sous une feuille (mobile).
   - Voyage : bandeau encre, onglets en pastilles, « Jour par jour », étapes en cartes reliées par la distance, carte collante à droite.
   - Fiche d'un point : carte en grand à gauche et colonne du titre et des actions à droite (bureau) ; sur mobile, « Y aller » devient une barre flottante.
   Contrastes : texte encre sur mandarine 6,2:1 (clair) et 6,9:1 (sombre) ; texte blanc sur encre 15:1 ; teintes de groupe à 16 % sous du texte encre ou blanc (≥ 7:1).
   =================================================================================================================================== */
:root {
    --tint-blue: #1d5fa0; --tint-pink: #b3264a; --tint-green: #1e7a43; --tint-violet: #5b3fc4;
    --hero-soft: rgba(255, 255, 255, .13);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tint-blue: #8cc4ff; --tint-pink: #ff9ab0; --tint-green: #7fd9a0; --tint-violet: #bfaeff; --hero-soft: rgba(255, 255, 255, .1); } }
:root[data-theme="dark"] { --tint-blue: #8cc4ff; --tint-pink: #ff9ab0; --tint-green: #7fd9a0; --tint-violet: #bfaeff; --hero-soft: rgba(255, 255, 255, .1); }

h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-weight: 800; }
.card { border-radius: var(--radius); }
.btn--primary { color: var(--primary-text); }

/* ----- Marque : le logo (public/icons/icon-192.png : carré arrondi mandarine, mouette en origami) ----- */
.brand-mark { display: block; flex: none; width: 2.5rem; height: 2.5rem; border-radius: .9rem; object-fit: contain; }
.brand-chip, .mtop__brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.brand-chip { padding-left: .3rem; }

/* ----- Navigation ----- */
.mnav--top { gap: .2rem; padding: .25rem; background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.mnav--top a { min-height: 2.75rem; padding: 0 1rem; color: var(--text); font-size: .95rem; }
.mnav--top a span { display: inline; }
.mnav--top a[aria-current="page"] { background: var(--text); color: var(--bg); }
.mnav--top a:not([aria-current="page"]):hover { background: var(--surface-2); }
.mnav--top a:focus-visible { outline-color: var(--primary-ink); }
@media (max-width: 56.24rem) {
    /* Mobile : une barre flottante, arrondie, au-dessus de la zone sûre ; le « + » central ajoute un point. */
    .mnav--bottom {
        left: .75rem; right: .75rem; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); align-items: center; gap: .15rem;
        min-height: 4.25rem; padding: .35rem .45rem; border-radius: 999px; background: var(--nav-bg); box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    }
    .mnav--bottom a { position: relative; gap: .2rem; min-height: 3.5rem; border-radius: 999px; color: var(--nav-text); font-size: .7rem; font-weight: 700; }
    .mnav--bottom a[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
    .mnav--bottom a[aria-current="page"]::after { content: ""; position: absolute; bottom: .3rem; width: .3rem; height: .3rem; border-radius: 50%; background: var(--primary); }
    .mnav--bottom a[aria-current="page"] span { padding-bottom: .3rem; }
    .mnav--bottom .mnav__add { flex: 0 0 3.5rem; width: 3.5rem; height: 3.5rem; min-height: 0; padding: 0; background: var(--primary); color: var(--primary-text); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
    .mnav--bottom .mnav__add:hover { background: var(--primary); filter: brightness(1.06); }
    .mnav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    /* Les pages laissent la place de la barre ; les boutons flottants passent au-dessus. */
    .shell--c { padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)); }
    .add-fab { bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); background: var(--primary); color: var(--primary-text); }
    .page { padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px)); }
    /* Le « + » de la barre mène déjà à l'ajout d'un point dans ce groupe. */
    .shell--c:has(.group-page) .add-fab { display: none; }
}

/* ----- Barre du haut (bureau) : logo, vues, recherche, « Ajouter un point », apparence, compte ----- */
.mtop .avatar, .appbar .avatar { background: var(--ink); color: var(--on-ink); }
.mtop .searchbox { border-radius: 999px; }
.add-btn { background: var(--primary); color: var(--primary-text); font-family: var(--font-sans); font-weight: 800; }
@media (min-width: 56.25rem) {
    .mtop, .mtop--wide { align-items: center; padding-top: 1rem; }
    .mtop__brand { width: auto; gap: .55rem; font-size: 1.4rem; }
    .mtop .mnav { order: 1; }
    .mtop .searchbox { order: 2; flex: 1 1 18rem; max-width: none; }
    .mtop .add-btn { order: 3; min-height: 3.25rem; padding: 0 1.4rem; }
    .mtop .tools { order: 4; }
    .mtop .avatar { width: 3.25rem; height: 3.25rem; font-size: 1.1rem; }
}

/* ----- Accueil ----- */
.home-page .panel__title { font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
/* Raccourcis : des pastilles, une pastille ronde teintée pour le pictogramme. */
.qa { display: flex; flex-wrap: nowrap; gap: .5rem; margin: 0 -.25rem 1.25rem; padding: 0 .25rem; overflow-x: auto; scrollbar-width: none; }
.qa__item { flex: none; flex-direction: row; justify-content: flex-start; gap: .6rem; min-height: 3.25rem; padding: .3rem 1.15rem .3rem .3rem; border-radius: 999px; font-family: var(--font-sans); font-size: .95rem; white-space: nowrap; }
.qa__item:hover { border-color: var(--field-border); }
.qa__ico { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: color-mix(in srgb, currentColor 15%, var(--surface)); }
.qa__ico--sun { color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
.qa__ico--cyan { color: var(--tint-blue); background: color-mix(in srgb, var(--tint-blue) 15%, var(--surface)); }
.qa__ico--coral { color: var(--tint-pink); background: color-mix(in srgb, var(--tint-pink) 15%, var(--surface)); }
.qa__ico--green { color: var(--tint-green); background: color-mix(in srgb, var(--tint-green) 15%, var(--surface)); }
.qa__ico--blue { color: var(--tint-blue); background: color-mix(in srgb, var(--tint-blue) 15%, var(--surface)); }
@media (min-width: 56.25rem) { .qa { flex-wrap: wrap; overflow: visible; } .qa__item { min-height: 3.5rem; font-family: var(--font-sans); font-size: 1rem; } }

/* Prochain voyage ou voyage en cours : une carte encre. */
.trip-today { padding: 1.4rem 1.5rem; border: 0; border-radius: 28px; background: var(--ink); color: var(--on-ink); }
.trip-today .card__title { margin: .15rem 0 .35rem; color: inherit; font-size: clamp(1.6rem, 5vw, 2.1rem); font-weight: 800; line-height: 1.05; }
.trip-today a:not(.btn) { color: inherit; }
.trip-today p { margin: .25rem 0; }
.trip-today__eyebrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 !important; font-weight: 600; font-size: .95rem; opacity: .9; }
.trip-today__badge { padding: .3rem .85rem; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-family: var(--font-display); font-weight: 800; }
.trip-today__dates { opacity: .85; }
.trip-today__stops { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; padding: 0; list-style: none; }
.trip-today__stops li { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; padding: .2rem .85rem .2rem .25rem; border-radius: 999px; background: var(--hero-soft); font-weight: 600; font-size: .9rem; }
.trip-today__stops .zone-chip { width: 1.75rem; height: 1.75rem; box-shadow: 0 0 0 2px var(--ink); font-family: var(--font-display); }
.trip-today .form__actions { margin-top: .9rem; }
.trip-today__link { background: var(--primary); color: var(--primary-text); }
.trip-today__link:hover { filter: brightness(1.06); }

/* Groupes : des tuiles teintées de leur couleur, le pictogramme dans un carré plein. */
.group-row { min-height: 8.5rem; padding: 1rem 1.1rem; border-radius: 24px; background: color-mix(in srgb, var(--group-color, var(--primary)) 16%, var(--surface)); color: var(--text); }
.group-row:hover { background: color-mix(in srgb, var(--group-color, var(--primary)) 24%, var(--surface)); filter: none; }
.group-row .tile { width: 3rem; height: 3rem; border-radius: 1rem; background: var(--group-color, var(--primary)); color: var(--on-group); font-size: 1.35rem; }
.group-row__name { font-size: 1.1rem; line-height: 1.2; }
.group-row__count { color: var(--muted); font-weight: 600; opacity: 1; }
.group-check__box { background: var(--surface); border-color: var(--field-border); }
.section-head__title { font-size: 1.6rem; font-weight: 700; }
.group-pick { background: var(--primary); color: var(--primary-text); border-radius: 999px; }
.map-open { background: var(--surface); color: var(--text); font-family: var(--font-sans); font-weight: 700; box-shadow: var(--shadow-sm); }
.shell--c .shell__map { border: 0; border-radius: 28px; }

@media (min-width: 56.25rem) {
    .shell--c:has(.home-page) { grid-template-columns: minmax(0, 3fr) minmax(22rem, 2fr); gap: 1.5rem; }
    .shell--c:has(.home-page) .panel__head { padding-top: 1rem; }
    .group-list { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 1rem; }
    .group-row { min-height: 9.5rem; }
    .map-open { right: 1rem; bottom: 1rem; min-height: 3rem; padding: 0 1.25rem; }
}
/* Mobile : la carte en tête, la recherche et le compte posés dessus, puis le contenu dans une feuille arrondie. */
@media (max-width: 56.24rem) {
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) {
        grid-template-rows: var(--home-map-h, 16rem) minmax(0, 1fr); grid-template-areas: "map" "panel"; gap: 0; padding: 0; /* `--home-map-h` : poignée du volet (`home-sheet`) */
    }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .shell__map { border-radius: 0; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .mtop { grid-area: map; align-self: start; z-index: 5; padding: calc(env(safe-area-inset-top, 0px) + .75rem) .75rem 0; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .mtop__brand { display: none; }
    .mtop .searchbox__icon { display: grid; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .mtop .searchbox { box-shadow: var(--shadow-sm); border-color: transparent; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .mtop .avatar { box-shadow: var(--shadow-sm); }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .map-open { bottom: 2.4rem; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel--home {
        position: relative; inset: auto; z-index: 2; margin-top: -1.75rem; padding-top: 1.1rem; border-radius: 1.75rem 1.75rem 0 0; background: var(--bg); box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
    }
    /* Poignée du volet : un vrai bouton (`home-sheet`) qui agrandit ou réduit la carte ; zone tactile de 4 × 1,75 rem autour du trait. */
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__handle {
        position: absolute; z-index: 3; top: 0; left: 50%; display: block; width: 4.5rem; height: 1.75rem; margin-left: -2.25rem; padding: 0; border: 0; background: none; cursor: grab; touch-action: none;
    }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__handle::before { content: ""; position: absolute; top: .55rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--field-border); }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__handle:active { cursor: grabbing; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__handle:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: -2px; border-radius: 999px; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__head, .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__body { padding-inline: 1rem; }
    .shell--c:has(.home-page):not(.shell--map-only):not(.shell--list) .panel__body { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
    .group-row { min-height: 7.75rem; }
}

/* ----- Voyage : bandeau, onglets, jour par jour, étapes ----- */
.trip-hero { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 1.1rem 1.4rem 1.5rem; border-radius: 30px; background: var(--ink); color: var(--on-ink); }
.trip-hero .breadcrumb { margin: 0; color: inherit; }
.trip-hero__crumb a { gap: .3rem; color: inherit; font-weight: 600; text-decoration: none; opacity: .9; }
.trip-hero__crumb a:hover { opacity: 1; text-decoration: underline; }
.trip-hero__main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; }
.trip-hero__titles { flex: 1 1 18rem; min-width: 0; }
.page--trip .trip-hero .topbar__title { color: inherit; font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.trip-hero .topbar__sub { margin-top: .5rem; color: inherit; opacity: .85; }
.trip-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.trip-hero__btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.9rem; padding: 0 1.1rem; border: 0; border-radius: 999px; background: var(--hero-soft); color: var(--on-ink); font: inherit; font-weight: 700; list-style: none; text-decoration: none; cursor: pointer; }
.trip-hero__btn::-webkit-details-marker { display: none; }
.trip-hero__btn:hover { background: rgba(255, 255, 255, .22); }
.trip-hero__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.trip-hero__btn--icon { width: 2.9rem; padding: 0; }
.trip-hero__menu .menu__list { color: var(--text); }
.trip-hero__add { min-height: 2.9rem; }
.trip-nav { display: flex; gap: .5rem; margin: 0 0 1.25rem; padding: .1rem; overflow-x: auto; scrollbar-width: none; }
.trip-nav__tab { display: inline-flex; flex: none; align-items: center; min-height: 2.75rem; padding: 0 1.15rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.trip-nav__tab:hover { border-color: var(--field-border); }
.trip-nav__tab[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.trip-section-title, .page--trip .trip-zones__title { margin: 0 0 .75rem; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; }
.page--trip .trip-zones__title { font-size: 1.25rem; }

/* Jour par jour */
.trip-days { margin: 0 0 1.5rem; }
.trip-days__list { display: flex; gap: .5rem; margin: 0 -1rem; padding: .15rem 1rem .35rem; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.trip-days__list > li { display: flex; flex: none; scroll-snap-align: start; }
.day-cell { display: flex; flex-direction: column; gap: .4rem; box-sizing: border-box; width: 5.25rem; min-height: 6.75rem; padding: .7rem .6rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; }
.day-cell:hover { border-color: var(--field-border); }
.day-cell__wd { color: var(--muted); font-size: .8rem; font-weight: 600; }
.day-cell__num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.day-cell__bar { height: .35rem; border-radius: 99px; background: var(--zone, var(--border)); }
.day-cell__note { display: flex; align-items: center; justify-content: space-between; gap: .25rem; color: var(--muted); font-size: .75rem; font-weight: 700; line-height: 1.2; }
.day-cell.is-empty, .day-cell.is-alert { border-color: color-mix(in srgb, var(--warn-text) 45%, var(--border)); }
.day-cell.is-empty .day-cell__note, .day-cell.is-alert .day-cell__note { color: var(--warn-text); }
.day-cell.is-today { box-shadow: 0 0 0 2px var(--primary-ink); }
@media (min-width: 56.25rem) {
    .trip-days__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr)); margin: 0; padding: 0; overflow: visible; }
    .day-cell { flex: 1; width: auto; }
}

/* Dates et totaux : une rangée de pastilles sous le bandeau. */
.page--trip .trip-overview__head { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); }
.page--trip .trip-overview__dates, .page--trip .trip-overview__totals { margin: 0; padding: .45rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-family: var(--font-sans); font-size: .95rem; font-weight: 700; }
.page--trip .trip-overview__dates:empty { display: none; }

/* Étapes : une carte par zone, la distance depuis la précédente en pastille entre deux cartes. */
.page--trip .trip-stops { gap: 0; }
.page--trip .trip-stop { display: flex; flex-direction: column; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.page--trip .trip-stop:not(:last-child)::after { content: none; }
.page--trip .trip-stop + .trip-stop { margin-top: .75rem; }
.page--trip .trip-stop:has(.trip-stop__leg:not([hidden])) { margin-top: 0; }
.page--trip .trip-stop__leg { position: relative; align-self: flex-start; margin: .6rem 0 .6rem 1.5rem; padding: .35rem .85rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; font-weight: 600; }
.page--trip .trip-stop__leg::before { content: ""; position: absolute; left: -.85rem; top: -.6rem; bottom: -.6rem; width: 3px; border-radius: 2px; background: var(--border); }
.page--trip .trip-stop__leg.is-alert { background: var(--warn-bg); color: var(--warn-text); }
.trip-stop__card { display: grid; gap: .75rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); }
.page--trip .trip-stop__link { gap: .9rem; padding: 0; }
.page--trip .trip-stop__link:hover { background: none; }
.page--trip .trip-stop__link:hover .trip-stop__name { text-decoration: underline; }
.page--trip .trip-stop .zone-chip { width: 2.75rem; height: 2.75rem; font-size: 1.15rem; font-weight: 800; }
.page--trip .trip-stop__text { flex: 1; }
.page--trip .trip-stop__name { font-size: 1.35rem; line-height: 1.15; }
.trip-stop__go { display: grid; flex: none; margin-left: auto; color: var(--muted); }
.page--trip .trip-stop__counters { padding: 0; }
.page--trip .trip-chip { min-height: 2rem; padding: .2rem .8rem; border: 0; background: var(--surface-2); color: var(--text); font-weight: 600; }
.page--trip .trip-chip--lodging { background: var(--ok-bg); color: var(--ok-text); }
.page--trip .trip-chip.is-alert { background: var(--warn-bg); color: var(--warn-text); }
.page--trip .trip-chip--booking { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--primary-ink); }
.page--trip .trip-stop__actions { margin: 0; }
.page--trip .trip-stop__actions:not(:has(a:not([hidden]))) { display: none; }
.trip-stop__lodging { background: var(--text); color: var(--bg); }
.trip-stop__lodging:hover { filter: brightness(1.15); }
.page--trip .trip-stop.is-pass { padding: 0; border-style: none; }
.page--trip .trip-stop.is-pass .trip-stop__card { padding: .7rem 1.1rem; border-style: dashed; }
.page--trip .trip-stop.is-pass .zone-chip { width: 2.25rem; height: 2.25rem; font-size: .95rem; }
.page--trip .trip-stop.is-pass .trip-stop__name { font-size: 1.1rem; }
.page--trip .trip-ideas { border-radius: 26px; }
.trip-add-more { display: flex; flex: 1; align-items: center; justify-content: center; gap: .5rem; min-height: 3.5rem; border: 2px dashed var(--field-border); border-radius: 26px; color: var(--text); font-weight: 700; text-decoration: none; }
.trip-add-more:hover { background: var(--surface); }
.trip-overview__more { margin: 0; }
.page--trip .trip-overview__map .map__canvas, .page--trip .trip-overview__map .map__canvas.leaflet-container { border-radius: 28px; }
.trip-extras { display: grid; gap: 1rem; margin-top: 1.5rem; }
.trip-extras > .card { margin: 0; border-radius: 26px; }
.trip-extras .trip-checklist__add { grid-template-columns: minmax(0, 1fr); align-items: stretch; } /* une colonne étroite : les champs l'un sous l'autre */
@media (min-width: 56.25rem) {
    .page--trip .trip-overview { grid-template-columns: minmax(0, 3fr) minmax(20rem, 2fr); column-gap: 1.75rem; }
    .trip-add { display: none; } /* bureau : « Ajouter une zone » est dans le bandeau */
    .trip-extras { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
}

/* ----- Fiche d'un point ----- */
.point-view__layout { display: flex; flex-direction: column; gap: 1rem; }
.point-view__main, .point-view__side, .point-view__media { display: contents; }
.point-view .card { margin: 0; border-radius: 26px; }
.point-view__crumb { order: 0; margin: 0; }
.point-view__back { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 1rem 0 .6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; }
.point-view__back:hover { border-color: var(--field-border); color: var(--text); }
.point-view .point-map { order: 1; border: 0; border-radius: 28px; }
.point-view .point-hero { order: 2; }
.point-view .point-nav-card { order: 3; }
.point-view .point-stats { order: 4; }
.point-view .point-hero__expand { order: 4; display: none; } /* mobile : la feuille de la carte porte « Trace détaillée » */
.point-view .point-note { order: 5; }
.point-view .point-photos, .point-view .point-photos-note { order: 6; }
.point-view .point-infos { order: 7; }
.point-view .point-nearby { order: 9; }
.point-view .point-more { order: 10; }
.point-view .point-page__meta { order: 11; }

/* Titre : pastille du groupe teintée de sa couleur, grand titre, étoiles et favori. */
.point-view .point-hero { padding: .25rem .25rem 0; border: 0; background: none; }
.point-view .group-tag { min-height: 2.25rem; padding: 0 .9rem 0 .7rem; border-radius: 999px; background: color-mix(in srgb, var(--group-color, var(--primary)) 18%, var(--surface)); color: var(--text); }
.point-view .group-tag__dot { width: .7rem; height: .7rem; }
.point-view .point-page__title { font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.point-view .rate__star { min-width: 2.75rem; min-height: 2.75rem; font-size: 1.8rem; }
.point-view .marks { justify-content: space-between; }
.point-view .marks__fav { min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; background: var(--surface-2); }
.point-view .marks__fav[aria-pressed="true"] { background: color-mix(in srgb, var(--tint-pink) 15%, var(--surface)); color: var(--tint-pink); }

/* « Y aller » et ses voisins. */
.point-view .point-nav-card { padding: 1.25rem; }
.point-view .point-nav .action--primary { min-height: 3.75rem; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-size: 1.15rem; font-weight: 800; }
.point-view .point-nav .actions__modes { background: var(--surface-2); }
.point-view .point-nav__more { gap: .25rem; padding-top: 1rem; }
.point-view .point-nav__more .action { min-height: 4.75rem; gap: .4rem; font-size: .8rem; font-weight: 700; }
.point-view .point-nav__more .action .ico { box-sizing: content-box; width: 1.3rem; height: 1.3rem; padding: .85rem; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.point-view .point-nav__more .action--weather .ico { background: color-mix(in srgb, var(--tint-blue) 15%, var(--surface)); color: var(--tint-blue); }
.point-view .point-nav__more .action--share .ico { background: color-mix(in srgb, var(--primary) 22%, var(--surface)); color: var(--primary-ink); }
.point-view .point-nav__more .action--around .ico { background: color-mix(in srgb, var(--tint-green) 15%, var(--surface)); color: var(--tint-green); }
.point-view .point-nav__more .action--compass .ico { background: color-mix(in srgb, var(--tint-pink) 13%, var(--surface)); color: var(--tint-pink); }
.point-view .point-nav__more .action--edit .ico { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.point-view .point-nav__more .action:hover, .point-view .point-nav__more .share-menu[open] > summary { background: none; }
.point-view .point-nav__more .action:hover .ico { filter: brightness(.95); }

/* Chiffres de l'itinéraire : des tuiles claires. */
.point-view .point-stats .stat { padding: .65rem .9rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: none; }
.point-view .point-stats .stat dd { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.point-view .point-stats .stat dt { color: var(--muted); font-weight: 600; }
.map-chip { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-sm); }
.point-view .point-nearby { background: color-mix(in srgb, var(--tint-violet) 12%, var(--surface)); border-color: transparent; }
.point-view .point-nearby__title .ico { color: var(--tint-violet); }
.point-view .point-more { padding: .25rem 1.25rem; }
.fold-row { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 3.25rem; padding: 0; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.fold-row--danger { color: var(--danger); }
.fold-row:hover { text-decoration: underline; }

@media (max-width: 56.24rem) {
    .point-view .point-map > .map .map__canvas, .point-view .point-map > .map .map__canvas.leaflet-container { height: 18rem; } /* `>` : pas la carte ouverte dans la feuille (`map-sheet`), qui prend toute sa hauteur */
    .point-view .point-nav-card { padding: 0; border: 0; background: none; }
    .point-view .point-nav__more { padding-top: 0; border-top: 0; }
    /* La fiche (et non le lieu d'un voyage qui l'affiche) : « Y aller » et le mode de déplacement en barre flottante, au bas de l'écran ; la barre de navigation lui laisse la place. */
    body:has(.point-page) .mnav--bottom { display: none; }
    .point-page .point-nav > .actions__ctl:first-child {
        position: fixed; z-index: 30; left: .75rem; right: .75rem; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
        display: flex; align-items: center; gap: .35rem; padding: .35rem; border-radius: 999px; background: var(--nav-bg); box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    }
    .point-page .point-nav > .actions__ctl:first-child .action--primary { order: 2; flex: 1; min-height: 3.4rem; font-size: 1.1rem; }
    .point-page .point-nav > .actions__ctl:first-child .actions__modes { order: 1; flex: none; gap: .1rem; padding: 0; background: none; }
    .point-page .point-nav > .actions__ctl:first-child .mode-link { flex: none; width: 3rem; min-height: 3.4rem; padding: 0; color: var(--nav-text); }
    .point-page .point-nav > .actions__ctl:first-child .mode-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .point-page .point-nav > .actions__ctl:first-child .mode-link[aria-current="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
    .point-page .point-nav > .actions__ctl:first-child .mode-link .ico { display: block; }
}
@media (min-width: 56.25rem) {
    .point-view__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem); align-items: start; gap: 1.75rem; }
    .point-view__main, .point-view__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
    .point-view__media { display: block; position: relative; }
    .point-view .point-map > .map .map__canvas, .point-view .point-map > .map .map__canvas.leaflet-container { height: clamp(26rem, 62dvh, 38rem); }
    .point-view .point-stats { position: absolute; z-index: 3; top: 1rem; left: 1rem; display: flex; gap: .5rem; margin: 0; }
    .point-view .point-stats .stat { border-color: transparent; box-shadow: var(--shadow-sm); }
    .point-view .point-hero__expand { position: absolute; z-index: 3; top: 1rem; right: 1rem; display: inline-flex; }
    .point-view .point-hero { padding: 1.5rem; border: 1px solid var(--border); border-radius: 30px; background: var(--surface); }
    .point-view .point-page__title { font-size: clamp(2rem, 2.6vw, 2.6rem); }
    .point-view .point-photos .photo-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* Impression du programme (US-V35) : ni barres ni boutons, une zone par page, liens lisibles, A4. */
@media print {
    .appbar, .appbar-wide, .mnav, .mnav--bottom, .topbar .form__actions, .topbar .breadcrumb, .share-menu, .add-fab, .trip-route__bar, .trip-route .btn, .trip-pplace__go,
    .install-hint, .net-banner, [data-trip-actions-target="banner"], .group-status, .trip-programme__footer { display: none !important; }
    body, .page { background: #fff !important; color: #000 !important; }
    .page { max-width: none !important; padding: 0 !important; margin: 0 !important; }
    .trip-pzone { break-before: page; }
    .trip-pzone:first-child { break-before: auto; }
    .trip-pday, .trip-pplace-row { break-inside: avoid; }
    .trip-pplace, .trip-pday__body { box-shadow: none !important; border-color: #999 !important; }
    a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
    @page { size: A4; margin: 15mm; }
}

/* ----- Bouton « Apparence » d'un groupe : un menu pour la couleur et l'icône (emoji, drapeaux) ----- */
.look { position: relative; }
.look__label { font-weight: 600; }
.look__btn { display: inline-flex; align-items: center; gap: .75rem; justify-self: start; min-height: 3rem; padding: .3rem .9rem .3rem .35rem; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--field-border); border-radius: 999px; cursor: pointer; }
.look__btn:hover { border-color: var(--primary); }
.look__btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.look__btn[aria-expanded="true"] .look__chev { transform: rotate(180deg); }
.look__chev { flex: none; color: var(--muted); transition: transform .15s ease; }
.look__preview { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--swatch, var(--primary)); box-shadow: inset 0 0 0 1px var(--field-border); }
.look__glyph { font-size: 1.3rem; line-height: 1; }
.look__panel { position: absolute; z-index: 30; top: calc(100% + .35rem); left: 0; display: grid; gap: 1rem; width: min(30rem, 100%); max-height: min(30rem, 70vh); overflow-y: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overscroll-behavior: contain; }
.look__panel[hidden] { display: none; }
.look__icon { display: grid; gap: .25rem; }
.look__icon label { font-weight: 600; }
.look__icon-row { display: flex; gap: .5rem; align-items: center; }
.look__icon-row input { flex: 1; min-width: 0; }
.look__catalog { display: grid; gap: .9rem; }
.look__section { display: grid; gap: .35rem; }
.look__title { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.look__done { position: sticky; bottom: 0; justify-self: end; }
@media (prefers-reduced-motion: reduce) { .look__chev { transition: none; } }

/* Feuille « Que voulez-vous faire ? » du « + » de la barre mobile (US-S8, templates/_add_sheet.html.twig, contrôleur `add-sheet`) : monte du bas sur toute la largeur (AGENTS.md), coins du haut arrondis,
   boutons en grille de 2 colonnes de 3,25 rem, texte sur une ligne. Au-dessus de la barre flottante (z-index 30) et des feuilles de page (40-46). Le « + » n'existe que sur mobile : la feuille aussi. */
.add-sheet-host { display: contents; }
.add-sheet[hidden] { display: none; }
.add-sheet__backdrop, .filter-sheet__backdrop { position: fixed; inset: 0; z-index: 48; background: rgba(10, 16, 28, .45); }
.add-sheet__panel, .filter-sheet__panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 49; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 1.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0;
    background: var(--surface); color: var(--text); box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
    animation: peek-sheet-up .22s ease-out;
}
.add-sheet__panel::before, .filter-sheet__panel::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
.add-sheet__title { margin: 0 0 .75rem; font-size: 1.1rem; font-weight: 700; }
.add-sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.add-sheet__item { min-height: 3.25rem; padding-inline: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-sheet__item[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.add-sheet__panel .form__actions { margin: .75rem 0 0; }
.add-sheet__cancel { width: 100%; min-height: 3.25rem; }
@media (min-width: 56.25rem) { .add-sheet { display: none; } }
@media (prefers-reduced-motion: reduce) { .add-sheet__panel, .filter-sheet__panel { animation: none; } }

/* Feuille « Filtres » (point-list) : même feuille du bas que ci-dessus sur mobile ; sur bureau (pas de barre mobile) une boîte centrée sans poignée. Le bouton à côté de la recherche porte la pastille du nombre de filtres actifs. */
.filter-sheet[hidden] { display: none; }
.filter-sheet__body { display: grid; gap: .5rem; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.25rem; padding: 0 .25rem; border-bottom: 1px solid var(--border); font-weight: 600; cursor: pointer; }
.filter-row__label { display: inline-flex; align-items: center; gap: .6rem; }
.filter-row select { width: auto; max-width: 58%; min-height: 2.75rem; margin: 0; }
.filter-row--check input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--primary); }
.filter-sheet .around-box__radius { padding: .25rem .25rem .5rem; }
.filter-sheet__actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: .5rem; margin-top: 1rem; }
.filter-sheet__actions .btn { min-height: 3.25rem; }
.point-filter__filters { position: relative; display: grid; flex: none; place-items: center; width: 3rem; min-height: 3rem; padding: 0; border-radius: 50%; }
.point-filter__filters[hidden] { display: none; }
.point-filter__filters.is-active { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); box-shadow: inset 0 0 0 2px var(--primary); }
.point-filter__badge { position: absolute; top: -.2rem; right: -.2rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; box-sizing: border-box; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-size: .72rem; font-weight: 700; line-height: 1.2rem; text-align: center; }
@media (min-width: 56.25rem) {
    .filter-sheet__panel { top: 50%; right: auto; bottom: auto; left: 50%; width: min(28rem, 92vw); border: 1px solid var(--border); border-radius: 1.25rem; transform: translate(-50%, -50%); animation: none; }
    .filter-sheet__panel::before { display: none; }
}

/* Feuille « Boussole » (US-R1, templates/_compass_sheet.html.twig, contrôleur `compass`) : monte du bas sur toute la largeur (AGENTS.md), coins du haut arrondis ; sur bureau, un panneau centré en bas.
   Au-dessus de la barre flottante (z-index 30), des feuilles de page (40-46) et de l'aperçu ; au même niveau que la feuille du « + » (48-49), jamais ouvertes ensemble.
   La flèche tourne par `--compass-angle` (posé par le CSSOM) ; l'animation n'existe que si la personne ne demande pas de réduire les mouvements. */
.compass-host { display: contents; }
.compass-sheet[hidden] { display: none; }
.compass-sheet__backdrop { position: fixed; inset: 0; z-index: 48; background: rgba(10, 16, 28, .45); }
.compass-sheet__panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 49; display: grid; justify-items: center; gap: .35rem; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 1.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); text-align: center;
    border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0;
    background: var(--surface); color: var(--text); box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
    animation: peek-sheet-up .22s ease-out;
}
.compass-sheet__panel::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
.compass-sheet__title { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; font-size: 1.1rem; font-weight: 700; }
.compass-sheet__name { margin: 0; max-width: 100%; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.compass-sheet__name:empty { display: none; }
.compass-sheet__dial { position: relative; display: grid; place-items: center; width: min(62vw, 12rem); aspect-ratio: 1; margin: .5rem 0; }
.compass-sheet__dial > * { grid-area: 1 / 1; }
.compass-sheet__arrow { width: 100%; height: 100%; transform: rotate(var(--compass-angle, 0deg)); color: var(--primary-ink, var(--primary)); }
.compass-sheet__arrow[hidden], .compass-sheet__arrived[hidden], .compass-sheet__north[hidden] { display: none; }
.compass-sheet__ring { fill: none; stroke: var(--border); stroke-width: 3; }
.compass-sheet__needle { fill: currentColor; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.compass-sheet__arrow[data-waiting="true"] { opacity: .35; }
.compass-sheet__arrow[data-uncertain="true"] .compass-sheet__needle { fill: none; stroke-dasharray: 5 4; } /* cap incertain : flèche creuse en pointillés (le texte le dit aussi) */
.compass-sheet__north { align-self: start; justify-self: center; z-index: 1; margin-top: -.15rem; padding: 0 .35rem; border-radius: 99px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 700; }
.compass-sheet__arrived { color: var(--primary-ink, var(--primary)); }
.compass-sheet__distance { margin: 0; font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.compass-sheet__direction { margin: 0; font-weight: 700; }
.compass-sheet__accuracy, .compass-sheet__status { margin: 0; color: var(--muted); font-size: .9rem; }
.compass-sheet__accuracy:empty, .compass-sheet__status:empty, .compass-sheet__direction:empty { display: none; }
.compass-sheet__panel .check { justify-self: stretch; justify-content: center; }
.compass-sheet__actions { display: grid; width: 100%; gap: .5rem; margin-top: .5rem; }
.compass-sheet__actions .btn { width: 100%; min-height: 3.25rem; }
.compass-sheet__actions [hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .compass-sheet__arrow { transition: transform .25s linear; } }
@media (prefers-reduced-motion: reduce) { .compass-sheet__panel { animation: none; } }
@media (min-width: 56.25rem) {
    .compass-sheet__panel { left: 50%; right: auto; bottom: 1.5rem; width: 26rem; max-width: calc(100vw - 2rem); margin-left: -13rem; border: 1px solid var(--border); border-radius: 1.75rem; }
}

/* Page « Outils » (US-S8, /outils) : les modules qui n'ont pas d'onglet. Seuls les modules qui existent y sont listés. */
.menu-card__row[aria-disabled="true"] { cursor: default; opacity: .65; }
.menu-card__row[aria-disabled="true"]:hover { background: transparent; }
.menu-card__soon { flex: none; padding: .15rem .6rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .8rem; font-weight: 600; }

/* Page « Mode rando » (US-R5 à R7, /rando) : pensée pour dehors, au soleil et avec des gants. Gros caractères, fort contraste (encre sur blanc, pas de gris clair pour les chiffres), boutons de 3,25 rem,
   blocs empilés et repliables (`<details>`). Aucune carte obligatoire. */
.rando { display: grid; gap: 1rem; }
.rando .topbar { margin-bottom: 0; }
.rando .card { margin: 0; }
.rando-block__title { display: flex; align-items: center; gap: .55rem; margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.rando-block__summary { display: flex; align-items: center; justify-content: space-between; min-height: 3.25rem; list-style: none; cursor: pointer; }
.rando-block__summary::-webkit-details-marker { display: none; }
.rando-block__summary::after { content: "›"; color: var(--muted); font-size: 1.6rem; transform: rotate(90deg); transition: transform .15s; }
.rando-block:not([open]) > .rando-block__summary::after { transform: none; }
.rando-block[open] > .rando-block__summary { margin-bottom: .5rem; }
.rando-place__name { margin: .5rem 0 0; font-size: 1.3rem; font-weight: 800; overflow-wrap: anywhere; }
.rando-place__coords { margin: .25rem 0 0; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; user-select: all; overflow-wrap: anywhere; }
.rando-place__coords:empty { display: none; }
.rando-place__detail { margin: .25rem 0 0; color: var(--muted); }
.rando-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem; margin-top: .9rem; }
.rando-actions .btn, .rando-missing .btn { min-height: 3.25rem; white-space: nowrap; }
.rando-actions [hidden] { display: none; }
.rando-check { margin-top: .5rem; }
.rando-status { margin: .5rem 0 0; font-weight: 600; }
.rando-status:empty { display: none; }
.rando-empty { margin: 0; font-size: 1.05rem; }
.rando-stats { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.rando-stats .stat dd { font-size: 1.3rem; white-space: normal; }
.rando-stats .stat dt { color: var(--text); font-size: .85rem; font-weight: 600; }
.rando-date { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rando-date label { font-weight: 700; }
.rando-date input { min-height: 3.25rem; padding: .4rem .75rem; border: 1px solid var(--field-border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; }
.rando-sun__left { margin: .9rem 0 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.rando-badge { display: inline-block; margin: 0 0 .5rem; padding: .2rem .7rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); font-weight: 700; font-size: .9rem; }
.rando-missing { display: grid; gap: .5rem; margin-bottom: .75rem; }
.rando-missing p { margin: 0; font-weight: 600; }
.rando-profile__chart { width: 100%; overflow: hidden; touch-action: pan-y; }
.rando-profile__chart:empty { display: none; }
.profile-chart { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: pan-y; user-select: none; } /* glisser de côté pose le repère, glisser vers le haut fait défiler la page */
.profile-chart__grid line { stroke: var(--border); stroke-width: 1; }
.profile-chart__grid text, .profile-chart__mark-label { fill: var(--text); font-family: var(--font-sans); font-size: 12px; }
.profile-chart__mark-label { font-weight: 700; }
.profile-chart__area { fill: color-mix(in srgb, var(--primary) 28%, transparent); }
.profile-chart__line { fill: none; stroke: var(--primary-ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.profile-chart__mark { stroke: var(--surface); stroke-width: 2; }
.profile-chart__mark--high { fill: var(--danger); }
.profile-chart__mark--low { fill: #2563eb; }
.profile-chart__cursor line { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 3; }
.profile-chart__cursor circle { fill: var(--surface); stroke: var(--text); stroke-width: 3; }
.rando-slider { margin-top: .5rem; }
.rando-read { margin-top: .5rem; }
.rando-sentence { margin: .9rem 0 0; font-size: 1rem; line-height: 1.5; }
.rando-sentence:empty { display: none; }
.rando-table-wrap { overflow-x: auto; }
.rando-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rando-table th, .rando-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--border); text-align: right; }
.rando-table th:first-child { text-align: left; }
.rando-table thead th { color: var(--muted); font-size: .85rem; }
.rando-attribution { margin: .25rem 0 0; }
.point-more__rando { text-decoration: none; }
.point-more__rando small { font-weight: 400; }

/* Marées (US-N9, page `/marees`) : reprend les blocs de « Mode rando » ; couleurs par variables (clair et sombre). Pleine et basse mer se distinguent par le texte et ▲ ▼, pas par la seule couleur. */
.tides-search { margin-top: .9rem; }
.tides-places { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.tides-places:empty { display: none; }
.tides-places .btn { min-height: 2.75rem; max-width: 100%; overflow-wrap: anywhere; }
.tides-saved { margin-top: .9rem; }
.tides-saved h3 { margin: 0; font-size: .95rem; }
.tides-days { display: flex; gap: .4rem; margin-top: 1rem; padding-bottom: .25rem; overflow-x: auto; }
.tides-day { flex: none; min-height: 2.75rem; white-space: nowrap; }
.tides-chart { display: block; width: 100%; height: auto; margin-top: .5rem; }
.tides-chart__zero { stroke: var(--field-border); stroke-width: 1; stroke-dasharray: 4 4; }
.tides-chart__line { fill: none; stroke: var(--tint-blue); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tides-chart__mark { fill: var(--tint-blue); stroke: var(--surface); stroke-width: 2; }
.tides-chart__mark--low { fill: var(--surface); stroke: var(--tint-blue); }
.tides-chart__now { stroke: var(--primary-ink); stroke-width: 2; }
.tides .rando-table td { white-space: nowrap; }
.tides .rando-table th, .tides .rando-table td { padding-inline: .3rem; }
.tides-chart__hour { fill: var(--muted); font-family: var(--font-sans); font-size: 10px; }
.tides-time { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; }

/* Conditions du jour (page `/conditions`) : reprend les blocs de « Mode rando » et des marées ; les niveaux (UV, air) sont écrits, la couleur ne les dit jamais seule. */
.cond, .cond-report { grid-template-columns: minmax(0, 1fr); }
.cond-report { display: grid; gap: 1rem; }
.cond-report[hidden], .cond [hidden] { display: none; }
.cond-now { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.cond-now__icon { font-size: 3.5rem; line-height: 1; }
.cond-now__temp { margin: 0; font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1.1; }
.cond-now__sky { margin: 0; font-size: 1.15rem; font-weight: 700; }
.cond-advice { display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.cond-advice li { display: flex; gap: .6rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 600; }
.cond-hours { display: flex; gap: .5rem; margin: .75rem 0 0; padding: 0 0 .5rem; overflow-x: auto; list-style: none; }
.cond-hour { position: relative; display: flex; flex: none; flex-direction: column; align-items: center; gap: .2rem; min-width: 5.25rem; padding: .6rem .5rem; border-radius: 14px; background: var(--surface-2); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cond-hour__time { font-weight: 700; }
.cond-hour__icon { font-size: 1.6rem; }
.cond-hour__temp { font-size: 1.05rem; }
.cond-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .5rem; }
.cond-pair__label { margin: 0; color: var(--muted); font-size: .85rem; }
.cond-level { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .25rem 0 0; }
.cond-big { font-family: var(--font-display); font-size: 2.25rem; font-weight: 800; line-height: 1.1; }
.cond .rando-table-wrap { margin-top: .5rem; }
.cond-table th:first-child { overflow-wrap: anywhere; }
.cond-table td { white-space: nowrap; }
.cond-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .5rem; margin: .75rem 0; padding: 0; list-style: none; }
.cond-links__item { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .1rem; width: 100%; height: 100%; min-height: 3.5rem; text-align: left; }
.cond-links__item small { font-weight: 400; }

/* « Atteignable en… » (US-R8) : réglages sur une ligne quand la place le permet ; le périmètre est tracé sur la carte (classe `map-area`). */
.isochrone__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; }
.isochrone__result { margin-top: .5rem; }
.isochrone__title { margin: 0; font-weight: 700; }
.isochrone__count { margin: .25rem 0 0; }
.isochrone__result .alert { margin: .5rem 0 0; }
.isochrone__result .field__hint { margin: .25rem 0 0; }
.isochrone__result .field__hint:empty { display: none; }

/* Suivi en direct (US-N5, page « Mode rando ») : carte du chemin parcouru, état bien visible. */
.rando-record__state { margin: 0; font-weight: 800; font-size: 1.1rem; }
.rando-record__state[data-state="recording"] { color: var(--danger); }
.rando-banner p { margin: 0 0 .5rem; }
.rando-confirm { margin-top: .5rem; padding: .75rem; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger-text); }
.rando-confirm p { margin: 0 0 .5rem; }

/* Suivi en direct (US-N5) : carte avec ses commandes POSÉES DESSUS (comme les cartes plein écran de l'accueil), puis un panneau des boutons et des chiffres. Plein écran : `rando-fullscreen`. */
.rando-live { display: grid; gap: .75rem; margin-top: .75rem; }
.rando-map { position: relative; display: block; isolation: isolate; } /* `isolation` : les volets de Leaflet (z-index jusqu'à 1000) restent sous la barre du haut quand la page défile */
.rando-map .map__canvas, .rando-map .map__canvas.leaflet-container { height: min(62vh, 30rem); min-height: 18rem; }
.rando-map .map__notice { position: absolute; z-index: 1000; top: .6rem; left: 3.4rem; right: 3.6rem; box-shadow: var(--shadow-sm); }
/* Colonne d'outils en bas à droite, au-dessus de l'attribution : plein écran, ma position, suivre ; « Recentrer » et l'état du suivi se posent au-dessus. */
.rando-tools { position: absolute; z-index: 1000; right: .6rem; bottom: 1.9rem; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; pointer-events: none; }
.rando-tools > * { pointer-events: auto; }
.rando-tools .map__tools { display: contents; } /* les deux groupes de `map` se rangent dans la même colonne ([hidden] l'emporte tant que la carte n'est pas là) */
.rando-tools .map-btn { width: 3rem; height: 3rem; border-radius: 999px; }
.rando-tools .map-btn__ico { display: grid; place-items: center; }
.rando-tools .map__locate-status { flex: none; max-width: min(15rem, 70vw); margin: 0; padding: .4rem .7rem; border-radius: var(--radius-sm); background: var(--panel); box-shadow: var(--shadow-sm); color: var(--text); font-size: .85rem; text-align: right; }
/* Pastille « Pluie en direct » en bas à gauche : un interrupteur, l'heure de l'image dessous. */
.rando-radar { position: absolute; z-index: 1000; left: .6rem; bottom: 1.9rem; display: grid; justify-items: start; gap: .3rem; max-width: calc(100% - 5rem); pointer-events: none; }
.rando-radar > * { pointer-events: auto; }
.rando-radar__chip { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .3rem .85rem .3rem .45rem; border-radius: 999px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 700; font-size: .9rem; cursor: pointer; }
.rando-radar__label { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.rando-radar__switch { appearance: none; position: relative; flex: none; width: 2.4rem; height: 1.4rem; margin: 0; border-radius: 999px; background: var(--field-border); cursor: pointer; transition: background .15s; }
.rando-radar__switch::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.rando-radar__switch:checked { background: #2563eb; }
.rando-radar__switch:checked::after { transform: translateX(1rem); }
.rando-radar__switch:focus-visible { outline: 3px solid var(--primary-ink); outline-offset: 2px; }
.rando-radar__switch:disabled { opacity: .5; cursor: not-allowed; }
.rando-radar__time, .rando-radar__status { margin: 0; padding: .25rem .65rem; border-radius: 999px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rando-radar__status { border-radius: var(--radius-sm); font-weight: 600; }
.rando-radar__time:empty, .rando-radar__status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .rando-radar__switch, .rando-radar__switch::after { transition: none; } }
.rando-live__panel { display: grid; gap: .6rem; }
.rando-live__panel .rando-actions { margin-top: 0; }
.rando-live__panel .rando-stats { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); margin: 0; }
.rando-live__panel .rando-status { margin: 0; }
.rando-live__last { margin: 0; }

/* Plein écran : la carte bord à bord, le panneau en feuille arrondie dessous ; la barre de vues mobile (z-index 30) reste par-dessus, la barre du haut collante (bureau) reste visible. */
.rando-live.is-fullscreen {
    position: fixed; z-index: 25; left: 0; right: 0; top: var(--rando-full-top, 0px); bottom: 0; margin: 0;
    display: flex; flex-direction: column; gap: 0; background: var(--bg);
    padding-bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px)); /* la barre de vues flottante : 4,25 rem + son écart au bord */
}
.rando-live.is-fullscreen .rando-map { flex: 1 1 auto; min-height: 0; }
.rando-live.is-fullscreen .rando-map .map__canvas, .rando-live.is-fullscreen .rando-map .map__canvas.leaflet-container { height: 100%; min-height: 0; border: 0; border-radius: 0; }
.rando-live.is-fullscreen .rando-map .leaflet-top { top: env(safe-area-inset-top, 0px); }
.rando-live.is-fullscreen .rando-live__panel {
    position: relative; z-index: 1; gap: .45rem; margin-top: -1.1rem; padding: .75rem .75rem .6rem;
    border-radius: 1.4rem 1.4rem 0 0; background: var(--surface); box-shadow: 0 -8px 24px rgba(0, 0, 0, .18);
}
.rando-live.is-fullscreen .rando-actions { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.rando-live.is-fullscreen .rando-actions .btn { min-height: 3rem; }
.rando-live.is-fullscreen .rando-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
.rando-live.is-fullscreen .rando-stats .stat { padding: .35rem .4rem; border-radius: 10px; }
.rando-live.is-fullscreen .rando-stats .stat dd { font-size: .95rem; }
.rando-live.is-fullscreen .rando-stats .stat dt { font-size: .68rem; }
.rando-live.is-fullscreen .rando-live__last { display: none; }
.rando-live.is-fullscreen .rando-status { font-size: .85rem; }
.rando-live.is-fullscreen .rando-tools, .rando-live.is-fullscreen .rando-radar { bottom: 2.6rem; } /* au-dessus du bord arrondi du panneau */
@media (min-width: 56.25rem) {
    .rando-live.is-fullscreen { padding-bottom: 0; } /* pas de barre de vues en bas sur bureau */
    .rando-live.is-fullscreen .rando-live__panel { padding: .75rem 1.5rem 1rem; }
}

/* Poignée des feuilles du bas (`sheet-swipe`) : une zone de prise invisible, centrée sur le trait gris (`::before`), pour tirer la feuille vers le bas et la fermer. Mobile seulement ;
   étroite (9 rem) pour ne jamais couvrir un bouton « Fermer » ou un titre. */
.sheet-grip { display: none; }
@media (max-width: 56.24rem) {
    .sheet-grip { display: block; position: absolute; z-index: 5; top: 0; left: 50%; width: 9rem; height: 1.5rem; margin-left: -4.5rem; touch-action: none; cursor: grab; }
}

/* ----- Formulaire d'un point : bloc IA à part, en violet (comme « Que faire autour ? »), et section « Où se trouve le point ? » ----- */
.ai-fill { display: grid; gap: .9rem; margin-bottom: 1rem; background: color-mix(in srgb, var(--tint-violet) 10%, var(--surface)); border-color: color-mix(in srgb, var(--tint-violet) 28%, transparent); }
.ai-fill__head { display: flex; align-items: flex-start; gap: .8rem; }
.ai-fill__ico { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--tint-violet); color: #fff; }
.ai-fill__title { margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--tint-violet); }
.ai-fill__sub { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
/* Deux volets côte à côte ; celui qu'on ouvre prend toute la largeur. */
.ai-fill__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.ai-fill__choice { border: 1px solid color-mix(in srgb, var(--tint-violet) 30%, transparent); border-radius: var(--radius-sm); background: var(--surface); }
.ai-fill__choice[open] { grid-column: 1 / -1; }
.ai-fill__choice > summary { display: flex; align-items: center; gap: .55rem; min-height: 3.25rem; padding: .5rem .85rem; list-style: none; cursor: pointer; font-weight: 700; color: var(--text); }
.ai-fill__choice > summary::-webkit-details-marker { display: none; }
.ai-fill__choice > summary::after { content: "›"; margin-left: auto; color: var(--tint-violet); font-size: 1.4rem; line-height: 1; transition: transform .15s; }
.ai-fill__choice[open] > summary::after { transform: rotate(90deg); }
.ai-fill__choice > summary:focus-visible { outline: 3px solid var(--tint-violet); outline-offset: 2px; border-radius: var(--radius-sm); }
.ai-fill__choice-ico { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 10px; background: color-mix(in srgb, var(--tint-violet) 14%, var(--surface)); color: var(--tint-violet); }
.ai-fill__choice .field { margin: 0; padding: 0 .85rem .85rem; }
.btn--ai { background: var(--tint-violet); color: #fff; }
.btn--ai:hover { filter: brightness(1.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--ai, :root:not([data-theme="light"]) .ai-fill__ico { color: #1b1530; } }
:root[data-theme="dark"] .btn--ai, :root[data-theme="dark"] .ai-fill__ico { color: #1b1530; } /* violet clair en sombre : texte foncé, contraste suffisant */
@media (prefers-reduced-motion: reduce) { .ai-fill__choice > summary::after { transition: none; } }
@media (max-width: 22rem) { .ai-fill__choices { grid-template-columns: 1fr; } } /* très petit écran : les deux choix l'un sous l'autre */

.form-section__title { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.form-section__title .ico { color: var(--group-color, var(--primary)); }
/* Le bouton « Plan / Satellite » est posé SUR la carte (en haut à droite), au lieu d'une rangée vide sous elle. */
.point-new__map { position: relative; display: block; isolation: isolate; }
.point-new__map .point-new__tools { position: absolute; z-index: 1000; top: .6rem; right: .6rem; margin: 0; }
/* « Utiliser ma position » : le raccourci le plus courant sur le terrain, en grand avec son pictogramme. */
.locate-shortcut { align-items: stretch; }
.locate-shortcut__btn { width: 100%; min-height: 3.25rem; gap: .5rem; border: 1.5px solid var(--group-color, var(--primary)); background: color-mix(in srgb, var(--group-color, var(--primary)) 10%, var(--surface)); }
.locate-shortcut__btn .ico { color: var(--group-color, var(--primary)); }
.position { align-items: center; border: 1px solid var(--border); }
.position__label { display: inline-flex; align-items: center; gap: .3rem; }

/* ----- Accueil : « Mes groupes », tuiles dégradées, pastille à initiale, case « sur la carte » discrète (rendu retravaillé le 25/11/2026) ----- */
.section-head { gap: .4rem .6rem; margin-bottom: 1rem; }
.section-head__title { letter-spacing: -.02em; }
.section-head .panel__sub { color: var(--muted); font-size: .9rem; font-weight: 600; }
.shell--c .section-head .link-btn { display: inline-flex; align-items: center; gap: .45rem; padding: 0 1rem; background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.shell--c .section-head .link-btn:hover { background: color-mix(in srgb, var(--primary) 24%, var(--surface)); color: var(--primary-ink); }
.shell--c .section-head .panel__new { gap: .4rem; padding: 0 1.15rem; background: var(--primary); color: var(--primary-text); font-weight: 700; box-shadow: 0 6px 14px -8px var(--primary); }
.shell--c .section-head .panel__new:hover { filter: brightness(1.06); }

.group-list { gap: .85rem; }
.group-row {
    position: relative; overflow: hidden; isolation: isolate; min-height: 7.75rem; padding: 1rem 1.1rem; border-radius: 22px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--group-color, var(--primary)) 26%, var(--surface)), color-mix(in srgb, var(--group-color, var(--primary)) 9%, var(--surface)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color, var(--primary)) 30%, transparent);
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.group-row::before { content: ""; position: absolute; z-index: -1; right: -2.4rem; bottom: -2.8rem; width: 8.5rem; height: 8.5rem; border-radius: 50%; background: color-mix(in srgb, var(--group-color, var(--primary)) 20%, transparent); }
.group-row:hover, .group-row:focus-visible {
    background: linear-gradient(155deg, color-mix(in srgb, var(--group-color, var(--primary)) 34%, var(--surface)), color-mix(in srgb, var(--group-color, var(--primary)) 14%, var(--surface)));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color, var(--primary)) 45%, transparent), 0 12px 22px -12px color-mix(in srgb, var(--group-color, var(--primary)) 70%, transparent);
    transform: translateY(-2px);
}
.group-row .tile { width: 3rem; height: 3rem; border-radius: 1rem; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--group-color, var(--primary)) 80%, transparent); }
.group-row.has-initial .tile::after { content: none; }
.group-row.has-initial .tile [data-slot="icon"] { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; line-height: 1; }
.group-row__name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.01em; }
.group-row__count { display: inline-flex; align-items: center; gap: .4rem; margin-top: .15rem; font-size: .85rem; font-weight: 600; }
.group-row__count::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--group-color, var(--primary)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--group-color, var(--primary)) 30%, transparent); }
/* Groupe sans point : tuile en pointillés, plus légère. */
.group-row.is-empty { background: color-mix(in srgb, var(--group-color, var(--primary)) 6%, var(--surface)); box-shadow: none; outline: 2px dashed color-mix(in srgb, var(--group-color, var(--primary)) 45%, transparent); outline-offset: -2px; }
.group-row.is-empty::before { display: none; }
.group-row.is-empty .tile { opacity: .85; box-shadow: none; }
.group-row.is-empty .group-row__count::before { background: transparent; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--group-color, var(--primary)) 55%, transparent); }
.group-row.is-empty:hover { box-shadow: none; background: color-mix(in srgb, var(--group-color, var(--primary)) 12%, var(--surface)); }
/* Flèche d'ouverture : seulement au survol ou au clavier, là où il y a une souris. */
.group-row__go { position: absolute; right: .85rem; bottom: .85rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; }
.group-row:hover .group-row__go, .group-row:focus-visible .group-row__go { opacity: 1; transform: none; }
@media (hover: none) { .group-row__go { display: none; } }

/* Case « sur la carte » : une pastille ronde neutre (plus de carré mandarine qui jure sur les teintes) ; décochée, la tuile s'estompe. */
.group-check { top: .6rem; right: .6rem; width: 2.5rem; height: 2.5rem; }
.group-check__box { width: 1.5rem; height: 1.5rem; border: 2px solid color-mix(in srgb, var(--group-color, var(--primary)) 55%, var(--surface)); border-radius: 50%; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.group-check:hover .group-check__box { background: var(--surface); }
.group-check input:checked + .group-check__box { background: var(--text); border-color: var(--text); color: var(--surface); }
.group-item:has(.group-check input:not(:checked)) .group-row { opacity: .6; }
.group-item:has(.group-check input:not(:checked)) .group-row:hover { opacity: .85; }

.group-archives { display: inline-flex; min-height: 2.5rem; padding: 0 1rem 0 .85rem; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: .9rem; }
.group-archives[hidden] { display: none; }
.panel__admin { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.panel__admin a { color: var(--muted); font-weight: 600; text-decoration: none; }
.panel__admin a:hover { color: var(--primary-ink); text-decoration: underline; }

@media (min-width: 56.25rem) {
    .group-list { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
    .group-row { min-height: 9.5rem; padding: 1.1rem 1.2rem; border-radius: 26px; }
    .group-row .tile { width: 3.2rem; height: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) { .group-row, .group-row__go { transition: none; } .group-row:hover, .group-row:focus-visible { transform: none; } }

/* ----- Donner rendez-vous (US-T7) : formulaire, résultat, liste des rendez-vous actifs (la liste sert aussi à la page Compte) ----- */
.meeting-form { gap: 1.25rem; }
.meeting-choices { display: grid; gap: .5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.meeting-choices legend { margin-bottom: .5rem; padding: 0; font-weight: 600; }
.meeting-choices--where { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meeting-choices--validity { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.meeting-choice { position: relative; display: grid; cursor: pointer; font-weight: 600; }
.meeting-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.meeting-choice > span { display: flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-align: center; line-height: 1.25; }
.meeting-choices--where .meeting-choice > span { flex-direction: column; gap: .35rem; min-height: 5.25rem; }
.meeting-choice input:checked + span { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.meeting-choice input:focus-visible + span { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.meeting-choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.meeting-position { gap: .5rem; }
.meeting-position .btn { min-height: 3.25rem; }
.meeting-position__status { margin: 0; text-align: center; }
.meeting-position[data-found] .meeting-position__status { padding: .6rem .85rem; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-text); font-weight: 600; }
.meeting-counter { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.meeting-privacy { display: flex; gap: .65rem; margin: 0; font-size: .875rem; }
.meeting-privacy svg { flex: none; }
.meeting-submit { width: 100%; min-height: 3.25rem; }
.meeting-form__foot { margin: -.5rem 0 0; text-align: center; }
.meeting-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; text-align: center; }
.meeting-result p, .meeting-result h3 { margin: 0; }
.meeting-result__badge { display: grid; place-items: center; justify-self: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--ok-bg); color: var(--ok-text); }
.meeting-result__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.meeting-result__actions .btn { min-height: 3.25rem; white-space: nowrap; }
.meeting-result__wide { grid-column: 1 / -1; }
/* Le lien sur une ligne (coupé par des points de suspension : « Copier » prend l'adresse entière). */
.meeting-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem .5rem; padding: .35rem .35rem .35rem .85rem; border-radius: var(--radius-sm); background: var(--surface-2); text-align: left; }
.meeting-link code { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
.meeting-link .btn { background: var(--surface); }
.meeting-link__status { grid-column: 1 / -1; font-size: .85rem; font-weight: 600; }
.meeting-link__status:empty { display: none; }
.meeting-active { margin-top: 1.75rem; }
.meeting-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.meeting-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.meeting-item--empty { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding-block: 1.5rem; border-style: dashed; background: none; }
.meeting-item p { margin: 0; }
.meeting-item__head { display: flex; align-items: center; gap: .85rem; }
.meeting-item__ico { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--primary) 20%, var(--surface)); color: var(--primary-ink); }
.meeting-item__text { min-width: 0; }
.meeting-item__name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.meeting-item__message { padding: .6rem .8rem; border-left: 3px solid var(--primary); overflow-wrap: anywhere; }
.meeting-item__expiry { color: var(--muted); font-size: .875rem; }
.meeting-item__stop { width: 100%; min-height: 3rem; }
.meeting-result[hidden], [data-controller="meeting"] .form[hidden] { display: none; }

/* ----- Page Outils (US-S8) : grande carte « Voyages », puis tuiles sur deux colonnes ; chaque outil a sa couleur (`--accent`). ----- */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.tool { --accent: var(--tint-blue); display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; min-width: 0; padding: 1rem; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--surface)); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool--rando { --accent: var(--tint-green); }
.tool--markers { --accent: var(--tint-violet); }
.tool--meeting { --accent: var(--tint-pink); }
.tool--tides { --accent: var(--tint-blue); }
.tool--conditions { --accent: var(--tint-pink); }
.tool--sun { --accent: var(--primary-ink); }
.tool--cartographer { --accent: var(--tint-green); }
.tool__ico { display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem; margin-bottom: .5rem; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.tool__name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tool__desc { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.tool__tag { margin-top: auto; padding: .15rem .6rem; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tool__desc + .tool__tag { position: relative; top: .35rem; margin-bottom: .35rem; }
/* La grande carte encre : pictogramme mandarine. */
.tool--hero { grid-column: 1 / -1; padding: 1.25rem; border-color: var(--border); background: var(--ink); color: var(--on-ink); }
.tool--hero .tool__ico { width: 3.75rem; height: 3.75rem; background: var(--primary); color: var(--primary-text); }
.tool--hero .tool__name { font-size: 1.75rem; }
.tool--hero .tool__desc { color: inherit; opacity: .85; font-size: 1rem; }
.tool--hero .tool__tag { background: var(--hero-soft); color: inherit; }
/* Dernière tuile seule sur sa ligne : toute la largeur. */
.tool:last-child:nth-child(even) { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .tool { transition: none; } .tool:hover { transform: none; } }
/* ----- Page « Soleil et lune » (US-N10, /soleil) : carte « Soleil » (lever, coucher, courbe du jour sur des tranches de lumière, curseur d'heure), cartes Matin et Soir, carte « Lune » sur fond de nuit.
   La courbe et la carte « Lune » gardent des couleurs fixes, sombres dans les deux thèmes (texte clair dessus : ≥ 7:1) ; le reste suit le thème. Les tranches se lisent aussi par la légende et la phrase sous la courbe,
   jamais par la seule couleur. ----- */
.sun { --sky-night: #0f1830; --sky-blue: #2f5cb5; --sky-dusk: #7a56a6; --sky-golden: #e9983a; --sky-day: #4f98d6; --moon-lit: #f6efd6; }
.sun > *, .sun-body > * { min-width: 0; }
.sun-body { display: grid; gap: 1rem; }
.sun-date { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.sun-date input { flex: 1 1 9rem; min-width: 0; min-height: 3.25rem; padding: .4rem .75rem; border: 1px solid var(--field-border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 1.05rem; }
.sun-date__step { width: 3.25rem; min-height: 3.25rem; padding: 0; font-size: 1.6rem; line-height: 1; }
.sun-hero__day { margin: .9rem 0 0; color: var(--muted); font-weight: 600; }
.sun-hero__day::first-letter { text-transform: uppercase; }
.sun-hero__left { margin: .15rem 0 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
.sun-big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.sun-big__item { display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem; border: 1px solid color-mix(in srgb, var(--sky-golden) 45%, var(--surface)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--sky-golden) 16%, var(--surface)); }
.sun-big__item--set { border-color: color-mix(in srgb, var(--sky-dusk) 45%, var(--surface)); background: color-mix(in srgb, var(--sky-dusk) 14%, var(--surface)); }
.sun-big__label { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sun-big__time { font-family: var(--font-display); font-size: clamp(2rem, 9vw, 2.6rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }

.sun-chart { margin-top: 1rem; padding: .35rem .25rem .1rem; overflow: hidden; border-radius: var(--radius-sm); background: linear-gradient(180deg, #19244a, var(--sky-night)); }
.sun-chart:empty { display: none; }
.sun-chart__svg { display: block; width: 100%; height: auto; }
.sun-band--night { fill: var(--sky-night); }
.sun-band--blue { fill: var(--sky-blue); }
.sun-band--dusk { fill: var(--sky-dusk); }
.sun-band--golden { fill: var(--sky-golden); }
.sun-band--day { fill: var(--sky-day); }
.sun-chart__horizon { stroke: rgba(255, 255, 255, .85); stroke-width: 1; stroke-dasharray: 5 4; }
.sun-chart__tick { stroke: rgba(255, 255, 255, .5); stroke-width: 1; }
.sun-chart__hour { fill: #d3dbec; font-family: var(--font-sans); font-size: 10px; }
.sun-chart__event { stroke: rgba(255, 255, 255, .45); stroke-width: 1; stroke-dasharray: 2 3; }
.sun-chart__event-label { fill: #fff; font-family: var(--font-sans); font-size: 10px; font-weight: 700; }
.sun-chart__line { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(10, 16, 34, .6)); }
.sun-chart__cursor { stroke: rgba(255, 255, 255, .7); stroke-width: 1; stroke-dasharray: 3 3; }
.sun-chart__sun { fill: #ffd76a; stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 0 5px rgba(255, 215, 106, .75)); }
.sun-chart__sun[data-band="night"], .sun-chart__sun[data-band="blue"] { fill: #cfd9f2; filter: drop-shadow(0 0 4px rgba(190, 205, 240, .6)); }
.sun-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .6rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .8rem; font-weight: 600; }
.sun-legend__item::before { content: ""; display: inline-block; width: .7rem; height: .7rem; margin-right: .35rem; border-radius: 3px; background: var(--dot); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 30%, transparent); vertical-align: -.05rem; }
.sun-legend__item--night { --dot: var(--sky-night); }
.sun-legend__item--blue { --dot: var(--sky-blue); }
.sun-legend__item--dusk { --dot: var(--sky-dusk); }
.sun-legend__item--golden { --dot: var(--sky-golden); }
.sun-legend__item--day { --dot: var(--sky-day); }

.sun-scrub { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; }
.sun-scrub label { font-weight: 700; }
.sun-scrub input[type="range"] { flex: 1; min-width: 0; height: 2.75rem; margin: 0; accent-color: var(--primary); }
.sun-scrub .btn { flex: none; min-height: 2.75rem; }
.sun-scrub [hidden] { display: none; }
.sun-now { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; }
.sun-now__text { margin: 0; font-size: 1.05rem; font-weight: 700; }
.sun-compass { flex: none; width: 5rem; height: 5rem; }
.sun-compass__ring { fill: none; stroke: var(--field-border); stroke-width: 3; }
.sun-compass__north { fill: var(--muted); font-size: 13px; font-weight: 700; font-family: var(--font-sans); }
.sun-compass__needle { transform: rotate(var(--sun-azimuth, 0deg)); transform-origin: 50px 50px; }
.sun-compass__needle path { fill: var(--primary-ink); stroke: var(--primary-ink); stroke-width: 2; stroke-linejoin: round; }
.sun-compass[data-below="true"] .sun-compass__needle path { fill: none; stroke-dasharray: 4 3; } /* soleil couché : flèche creuse (le texte le dit aussi) */
.sun-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sun-facts .stat { justify-content: flex-end; }
.sun-facts .stat dd { font-size: 1.15rem; }
.sun-delta:empty { display: none; }
.sun-delta { margin: .5rem 0 0; }
.sun-hero .form__actions { margin: 0; }
.sun-hero .form__actions:has([hidden]) { display: none; }

.sun-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.sun-day-card .card__title { margin: 0 0 .5rem; }
.sun-rows { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.sun-row { display: grid; grid-template-columns: .85rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; min-height: 2.9rem; padding: .35rem .6rem; border-radius: 12px; }
.sun-row--strong { background: var(--surface-2); }
.sun-row__dot { width: .85rem; height: .85rem; border-radius: 50%; background: var(--dot); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent); }
.sun-row__label { font-weight: 600; }
.sun-row--strong .sun-row__label { font-weight: 800; }
.sun-row__time { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; text-align: right; white-space: nowrap; }
.sun-row--blue { --dot: var(--sky-blue); }
.sun-row--dusk { --dot: var(--sky-dusk); }
.sun-row--golden, .sun-row--rise { --dot: var(--sky-golden); }
.sun-row--set { --dot: var(--sky-dusk); }

/* Lune : nuit étoilée, disque dessiné en SVG (partie éclairée = chemin calculé), prochaines phases, calendrier du mois. */
.rando .sun-moon { position: relative; overflow: hidden; border-color: #26335a; color: #eef1f8; background: radial-gradient(ellipse 120% 70% at 10% -10%, #263a6e 0%, transparent 60%), linear-gradient(180deg, #0f1730, #0a1022); }
.sun-moon::before { content: ""; position: absolute; inset: 0 0 auto; height: 13rem; pointer-events: none; opacity: .85; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent);
    background: radial-gradient(1.2px 1.2px at 8% 12%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 22% 30%, #fff 60%, transparent 62%), radial-gradient(1.5px 1.5px at 38% 7%, #fff 60%, transparent 62%),
        radial-gradient(1px 1px at 55% 22%, #fff 60%, transparent 62%), radial-gradient(1.2px 1.2px at 71% 10%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 86% 27%, #fff 60%, transparent 62%),
        radial-gradient(1.4px 1.4px at 94% 8%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 14% 47%, #fff 60%, transparent 62%), radial-gradient(1px 1px at 64% 41%, #fff 60%, transparent 62%); }
.sun-moon > * { position: relative; }
.sun-moon button:focus-visible { outline-color: #ffb597; }
.sun-moon__now { display: flex; align-items: center; gap: 1.25rem; margin-top: .75rem; }
.sun-moon__disc { flex: none; width: clamp(6.5rem, 30vw, 8.5rem); height: auto; filter: drop-shadow(0 0 16px rgba(255, 244, 205, .28)); }
.sun-moon__dark { fill: #1d2746; }
.sun-moon__mare { fill: rgba(120, 104, 66, .2); }
.sun-moon__rim { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.sun-moon__name { margin: 0; font-family: var(--font-display); font-size: clamp(1.35rem, 6vw, 1.75rem); font-weight: 800; line-height: 1.15; }
.sun-moon__fact { margin: .35rem 0 0; color: #d3dbec; font-weight: 600; }
.sun-moon__when { margin: .2rem 0 0; color: #b4bfd6; font-size: .9rem; }
.sun-moon__sub { margin: 1.4rem 0 .5rem; color: #d3dbec; font-family: var(--font-sans); font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sun-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.sun-phase { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.sun-phase--full { background: rgba(255, 226, 150, .14); }
.sun-phase .sun-mini { flex: none; width: 2.4rem; height: 2.4rem; }
.sun-phase__text { display: grid; min-width: 0; }
.sun-phase__name { font-weight: 700; }
.sun-phase__date { color: #d3dbec; font-size: .85rem; }
.sun-phase__in { color: #ffb597; font-size: .8rem; font-weight: 700; }
.sun-mini__dark { fill: #2a3560; }
.sun-mini__lit { fill: var(--moon-lit); }
.sun-month__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1.4rem; }
.sun-month__head .sun-moon__sub { margin: 0; text-align: center; }
.sun-month__head .sun-moon__sub::first-letter { text-transform: uppercase; }
.sun-month__nav { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.sun-month__nav:hover { background: rgba(255, 255, 255, .18); }
.sun-month__dow, .sun-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.sun-month__dow { margin-top: .6rem; color: #b4bfd6; font-size: .75rem; font-weight: 700; text-align: center; }
.sun-month { margin-top: .25rem; }
.sun-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 3.2rem; padding: .25rem 0; border: 1.5px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .05); color: #eef1f8; font: inherit; cursor: pointer; }
.sun-day:hover { background: rgba(255, 255, 255, .12); }
.sun-day--blank { background: none; pointer-events: none; }
.sun-day .sun-mini { width: 1.6rem; height: 1.6rem; }
.sun-day__n { color: #d3dbec; font-size: .8rem; font-weight: 600; }
.sun-day.is-phase { border-color: rgba(246, 239, 214, .55); }
.sun-day.is-today .sun-day__n { color: #ffb597; font-weight: 800; text-decoration: underline; }
.sun-day[aria-pressed="true"] { border-color: #ff8a5b; background: rgba(255, 138, 91, .2); }
.sun-moon__hint { margin: .75rem 0 0; color: #b4bfd6; font-size: .85rem; }

/* Lien « Soleil et lune » de la page « Mode rando » (le bloc « Soleil » d'US-R6 est sorti vers /soleil). */
.rando-sunlink__text { margin: .25rem 0 0; }
.rando-sunlink .form__actions { margin: .75rem 0 0; }
.rando-sunlink__go { width: 100%; min-height: 3.25rem; }


/* Repères temporaires (US-N4) : page `/reperes` et encart « Mes repères » de l'accueil (contrôleur `markers`). Couleurs par variables : clair et sombre suivent le thème.
   Chaque type a sa couleur d'accent (`--accent`) : liseré de la carte, pastille du pictogramme. */
.markers__types { display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.markers__types legend { margin-bottom: .5rem; padding: 0; font-weight: 600; }
/* Types en pastilles : le bouton radio reste dans la page (clavier, lecteur d'écran), seulement invisible. */
.markers__types .check { position: relative; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600 !important; }
.markers__types .check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.markers__types .check:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 20%, var(--surface)); }
.markers__types .check:has(input:focus-visible) { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.markers__list { margin-top: 1.5rem; }
.markers-home { margin-bottom: 1rem; }
.marker-list { display: grid; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.marker-card { --accent: var(--tint-blue); display: grid; gap: .75rem; padding: 1rem; border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 1px 2px rgba(14, 26, 34, .08); }
.marker-card--bike { --accent: var(--primary-ink); }
.marker-card--tent { --accent: var(--tint-green); }
.marker-card--meeting { --accent: var(--tint-pink); }
.marker-card--other { --accent: var(--tint-violet); }
.marker-card__head { display: flex; align-items: center; gap: .85rem; }
.marker-card__text { flex: 1; min-width: 0; }
.marker-card__title { margin: 0; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.marker-card__meta { margin: .15rem 0 0; color: var(--muted); font-size: .875rem; }
.marker-card__dist { flex: none; margin: 0; padding: .3rem .75rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.marker-card__note { margin: 0; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); overflow-wrap: anywhere; }
.marker-card__photo { display: block; width: 100%; max-height: 13rem; border-radius: var(--radius-sm); object-fit: cover; }
.marker-card__actions { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .5rem; }
.marker-card__actions > span { display: contents; } /* l'enveloppe du contrôleur `compass-open` ne compte pas dans la grille */
.marker-card__actions .btn { width: 100%; min-height: 3rem; white-space: nowrap; }
.marker-card__more { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.marker-card__link { min-height: 2.5rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.marker-card__link:hover { color: var(--text); }
.marker-card__link--danger { margin-left: auto; color: var(--danger); }
.marker-card__link:focus-visible { outline: 2px solid var(--primary-ink); outline-offset: 2px; border-radius: 4px; }
.marker-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; color: var(--tint-blue); background: color-mix(in srgb, var(--tint-blue) 16%, var(--surface)); }
.marker-ico--bike { color: var(--primary-ink); background: color-mix(in srgb, var(--primary) 22%, var(--surface)); }
.marker-ico--tent { color: var(--tint-green); background: color-mix(in srgb, var(--tint-green) 16%, var(--surface)); }
.marker-ico--meeting { color: var(--tint-pink); background: color-mix(in srgb, var(--tint-pink) 16%, var(--surface)); }
.marker-ico--other { color: var(--tint-violet); background: color-mix(in srgb, var(--tint-violet) 16%, var(--surface)); }

/* « Mes repères » de l'accueil, en compact : une ligne par repère (pastille, nom et « Marqué il y a… », distance « à 1,1 km », « Y aller », « Boussole », corbeille), qui passe sur deux lignes seulement quand la place manque. */
.markers-home .marker-list { gap: .5rem; }
.markers-home .marker-card { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; padding: .55rem .75rem; border-left-width: 4px; }
.markers-home .marker-card__head { flex: 1 1 14rem; min-width: 0; gap: .65rem; }
.markers-home .marker-ico { width: 2.25rem; height: 2.25rem; }
.markers-home .marker-ico svg { width: 1.2rem; height: 1.2rem; }
.markers-home .marker-card__title { font-size: 1rem; }
.markers-home .marker-card__meta { margin-top: 0; font-size: .8rem; }
.markers-home .marker-card__dist { padding: .15rem .6rem; font-size: .85rem; }
.markers-home .marker-card__actions { display: flex; flex: 0 0 auto; gap: .4rem; }
.markers-home .marker-card__actions .btn { width: auto; min-height: 2.5rem; padding: 0 1.1rem; }
.markers-home .marker-card__more { margin-left: auto; padding: 0; border-top: 0; }
.markers-home .marker-card__link--danger { margin-left: 0; }
.markers-home__sub { order: 3; flex-basis: 100%; margin: 0; color: var(--muted); font-size: .9rem; }
.markers-home__tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: 0 0 .75rem; }
.markers-home__tools .field__hint { margin: 0; }
.markers-home__tools .field__hint:empty { display: none; }
.markers-home__tools .btn, .markers__list .btn { display: inline-flex; align-items: center; gap: .4rem; }
/* Boutons à pictogramme (Y aller, Boussole, distances) et corbeille de l'accueil. */
.btn__ico { display: inline-flex; flex: none; }
.marker-card__actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.marker-card__soon { color: var(--text); font-weight: 600; }
.marker-card__trash { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; border-radius: 999px; color: var(--muted); text-decoration: none; }
.marker-card__trash:hover { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.marker-card__link.is-confirming { padding: 0 .9rem; border-radius: 999px; background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); font-weight: 700; text-decoration: none; }
/* Pictogramme des repères sur la carte : une pastille carrée avec une lettre, distincte des ronds des points. */
.map-temp { background: none; border: 0; }
.map-temp__chip { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; box-sizing: border-box; border: 2px solid #fff; border-radius: 7px; background: #1d4ed8; color: #fff; font: 700 .85rem/1 system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); }
.map-temp__chip--tent { background: #15803d; }
.map-temp__chip--bike { background: #b45309; }
.map-temp__chip--meeting { background: #be185d; }
.map-temp__chip--other { background: #475569; }
/* Lecture de la position avant d'enregistrer un repère (US-N4) : progression, puis choix si la précision reste médiocre. */
.markers__fix { display: grid; gap: .6rem; padding: .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.markers__fix[hidden] { display: none; }
.markers__fix-text { margin: 0; font-weight: 600; }
.markers__fix-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.markers__fix-actions .btn { width: 100%; min-height: 3rem; }
.markers__fix-actions [hidden] { display: none; }
.markers__choices { display: grid; gap: .5rem; }
.markers__choices .btn { width: 100%; min-height: 3rem; overflow-wrap: anywhere; }
.markers__choices:not([hidden]) ~ .markers__fix-actions .btn { grid-column: 1 / -1; }

/* ===================================================================================================================================
   Compte, Administration, Comptes : même langage « Escale » (sable, encre, mandarine), retravaillé pour lire d'un coup d'œil.
   - /compte : une carte encre (initiale, adresse, type) en tête, puis des groupes de réglages titrés.
   - /admin : tuiles groupées (services connectés, gestion) avec l'état du service écrit en toutes lettres.
   - /admin/comptes : chiffres du haut, invitation, puis une ligne par compte qui s'ouvre (type, suppression).
   Tout passe par les variables : le sombre suit sans règle de plus. Texte sur encre 15:1 ; mandarine lisible `--primary-ink` sur teinte à 20 % ≥ 4,6:1.
   =================================================================================================================================== */

/* Titre d'un groupe (compte, administration, liste des comptes) : phrase, pas de capitales. */
.menu-group { margin-top: 1.5rem; }
.menu-group .menu-card { margin-bottom: 0; }
.account-meetings, .menu-group + .device-card { margin-top: 1.5rem; } /* même espace qu'entre deux `.menu-group` : une carte qui suit la dernière rubrique du menu (rendez-vous actifs, « Sur cet appareil » quand il n'y a pas de rendez-vous) */
.menu-group__title { margin: 0 0 .5rem .25rem; color: var(--muted); font-size: 1rem; font-weight: 700; }

/* ----- /compte ----- */
.me-card { display: flex; align-items: center; gap: 1rem; margin-bottom: 0; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); }
.me-card__avatar { display: grid; place-items: center; flex: none; width: 3.75rem; height: 3.75rem; border-radius: 50%; background: var(--sun); color: var(--on-sun); font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; }
.me-card__who { min-width: 0; }
.me-card__email { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; overflow-wrap: anywhere; }
.me-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .35rem 0 0; color: color-mix(in srgb, var(--on-ink) 80%, transparent); font-size: .9rem; }
.me-card__pill { padding: .1rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--on-ink) 16%, transparent); color: var(--on-ink); font-size: .8rem; font-weight: 600; }
.menu-card--solo { margin-top: 1.5rem; }
.menu-card__row:focus-visible { outline-offset: -2px; }

/* « Sur cet appareil » : lignes séparées, valeurs en gras. Le contrôleur `device-storage` remplit les mêmes éléments qu'avant. */
.device-card__title { font-size: 1.15rem; }
.device-card__list { gap: 0; }
.device-card__list > div { padding: .55rem 0; border-top: 1px solid var(--border); }
.device-card__list dd { font-weight: 600; }

/* ----- /admin : tuiles ----- */
.admin-grid { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.admin-grid > li { display: flex; }
@media (min-width: 36rem) { .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-tile { display: flex; flex: 1; align-items: flex-start; gap: .9rem; min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
.admin-tile:hover { border-color: var(--primary); }
.admin-tile__ico { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: var(--surface-2); }
.admin-tile__text { display: grid; flex: 1; align-content: start; justify-items: start; gap: .3rem; min-width: 0; }
.admin-tile__text strong { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; }
.admin-tile__text small { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.admin-tile__text .ext-pill { margin-top: .15rem; white-space: normal; }
.admin-tile > .ico:last-child { margin-top: .75rem; color: var(--muted); }

/* ----- /admin/comptes ----- */
.badge--admin { background: var(--ink); color: var(--on-ink); }
.badge--premium { background: color-mix(in srgb, var(--primary) 20%, var(--surface)); color: var(--primary-ink); }

.acc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
@media (min-width: 36rem) { .acc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.acc-stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .1rem; padding: .75rem .9rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.acc-stat dd { margin: 0; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.acc-stat dt { color: var(--muted); font-size: .85rem; font-weight: 600; line-height: 1.3; }

.acc-invite__row { display: grid; gap: .75rem; }
@media (min-width: 36rem) { .acc-invite__row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.acc-sub { margin: 1.25rem 0 .5rem; font-size: 1rem; }
.acc-pending { display: grid; gap: .5rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.acc-pending__item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.acc-pending__ico { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--surface); color: var(--muted); }
.acc-pending__text { display: grid; flex: 1; min-width: 0; }
.acc-pending__text strong { overflow-wrap: anywhere; }
.acc-pending__text small { color: var(--muted); font-size: .85rem; }

.acc-list { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.acc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.acc[open] { border-color: color-mix(in srgb, var(--text) 24%, var(--border)); }
.acc__head { display: flex; align-items: center; gap: .85rem; min-height: 4rem; padding: .7rem 1rem; border-radius: var(--radius); list-style: none; cursor: pointer; }
.acc__head::-webkit-details-marker { display: none; }
.acc__head::after { content: "›"; flex: none; color: var(--muted); font-size: 1.4rem; transition: transform .15s; }
.acc[open] > .acc__head::after { transform: rotate(90deg); }
.acc__head:hover { background: var(--surface-2); }
.acc__head .badge { flex: none; }
.acc__avatar { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface-2); color: var(--text); font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent); }
.acc__avatar--admin { background: var(--ink); color: var(--on-ink); }
.acc__avatar--premium { background: var(--sun); color: var(--on-sun); }
.acc__id { display: grid; flex: 1; min-width: 0; }
.acc__email { font-weight: 700; overflow-wrap: anywhere; }
.acc__you { margin-left: .45rem; padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.acc__meta { color: var(--muted); font-size: .85rem; }
.acc__body { display: grid; gap: 1rem; margin: 0 1rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.acc__title { margin: 0 0 .5rem; font-size: .95rem; }
.acc__warn { margin: 0; color: var(--muted); font-size: .9rem; }

.acc__danger { padding: 0 .9rem; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.acc__danger > summary { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; color: var(--danger); font-weight: 700; list-style: none; cursor: pointer; }
.acc__danger > summary::-webkit-details-marker { display: none; }
.acc__danger > summary::after { content: "›"; font-size: 1.4rem; transition: transform .15s; }
.acc__danger[open] > summary::after { transform: rotate(90deg); }
.acc__danger[open] { padding-bottom: .9rem; }
.acc__danger .form { margin-top: .25rem; }

@media (prefers-reduced-motion: reduce) {
    .acc__head::after, .acc__danger > summary::after { transition: none; }
}

/* ---- Groupes partagés entre comptes (`GroupShare`) ---------------------------------------------------------------------------------------------
   Un groupe reçu se reconnaît sans lire : tuile plus claire cerclée d'un trait plein à la couleur du groupe (les groupes vides sont en pointillés), pastille « Lecture seule » / « Édition »
   et nom du propriétaire. Un groupe à moi que d'autres voient porte seulement la pastille « Partagé · n ». La couleur ne porte jamais seule l'information : la pastille dit les droits. */
.group-shared { margin: 0 0 1rem; }
.group-shared .section-head__title { display: inline-flex; align-items: center; gap: .45rem; }
.group-row__owner { color: var(--muted); font-size: .8rem; font-weight: 600; overflow-wrap: anywhere; }
.group-row__badge { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-start; max-width: 100%; padding: .15rem .6rem; border-radius: 999px; background: var(--surface); color: var(--text); font-size: .75rem; font-weight: 700; line-height: 1.4; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color, var(--primary)) 55%, transparent); }
.group-row__badge[hidden] { display: none; }
.group-row__badge.is-read { background: transparent; color: var(--muted); }
.group-row.is-shared { background: color-mix(in srgb, var(--group-color, var(--primary)) 9%, var(--surface)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--group-color, var(--primary)) 60%, transparent); }
.group-row.is-shared::before { display: none; }
.group-row.is-shared:hover, .group-row.is-shared:focus-visible { background: color-mix(in srgb, var(--group-color, var(--primary)) 16%, var(--surface)); }
.group-row.is-shared .tile { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px color-mix(in srgb, var(--group-color, var(--primary)) 60%, transparent); }

/* Page d'un groupe partagé : bandeau sous l'en-tête (propriétaire, droits) et pastille à côté du nom. */
.group-access { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--group-color, var(--primary)) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color, var(--primary)) 40%, transparent); font-size: .92rem; }
.group-access[hidden] { display: none; }
.group-access__ico { flex: none; margin-top: .1rem; }
.group-access__text { display: grid; gap: .1rem; min-width: 0; }
.group-access__title { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.group-access__sub { margin: 0; color: var(--muted); }
.group-access__go { margin-left: auto; align-self: center; white-space: nowrap; font-weight: 700; }

/* Lignes de l'écran « Partager » : une personne, ses droits, « Retirer ». */
.share-people__add { margin: .5rem 0 1.25rem; }
.share-people__title { margin: 1rem 0 .25rem; }
.share-people { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.share-person { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.share-person__who { display: grid; flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.share-person__role select { min-height: 2.5rem; }
.share-link__title { margin-top: 1.5rem; }

/* Fiche d'un point en lecture seule, ou sans droit de suppression : les commandes d'écriture disparaissent (le serveur refuse de toute façon). */
.point-view__wrap.is-readonly [data-edit-only] { display: none !important; }
.point-view__wrap.no-delete [data-delete-only] { display: none !important; }
.point-view__wrap.move-locked [data-move-option] { display: none !important; }
.point-author { margin: 0; color: var(--muted); font-size: .85rem; }
.point-author[hidden] { display: none; }
.group-page[data-access="edit"] [data-owner-only], .group-page[data-access="read"] [data-owner-only] { display: none !important; }
.group-page[data-access="read"] [data-write-only], .group-page[data-access="read"] .add-btn, .group-page[data-access="read"] .add-fab { display: none !important; }
.group-page[data-access="owner"] [data-shared-only] { display: none !important; }


/* Mode économie de batterie et de données (US-S11, assets/saver.js) : `html[data-saver="on"]`, posé par un petit script de base.html.twig puis par saver.js.
   Photos et aperçus de carte : leurs <img> sont `loading="lazy"` ; sans boîte (display: none) le navigateur ne les charge jamais. Une photo se charge quand on l'ouvre en grand. */
/* Pastille batterie de la barre du haut : cachée sauf mode actif. Les règles `.mtop .tools .icon-btn` (affichage des boutons de la barre) sont plus précises qu'un simple `.saver-chip` : d'où le `!important` du cas caché. */
.saver-chip { color: var(--primary-ink); }
html:not([data-saver="on"]) .tools .saver-chip { display: none !important; }
html[data-saver="on"] .tools .saver-chip { display: inline-grid; }
html[data-saver="on"] *, html[data-saver="on"] *::before, html[data-saver="on"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html[data-saver="on"] .point-row__thumb, html[data-saver="on"] .point-slider { display: none; }
html[data-saver="on"] .photo-grid__open img { display: none; }
html[data-saver="on"] .photo-grid__open::after { content: "Afficher la photo"; display: grid; place-items: center; height: 100%; padding: .25rem; text-align: center; color: var(--muted); font-size: .8rem; }

/* Préférences (US-S7, US-S11) : une carte par réglage (pastille d'icône, titre, une phrase, puis le contrôle). Les choix sont de vrais boutons radio (`.pref-opt__input`, cachés) dessinés par `.pref-opt__body` :
   segments (`.pref-seg`, 2 ou 3 choix courts), cartes (`.pref-choices`, choix avec un exemple), pastilles (`.pref-pills`, une série de valeurs). Gabarit : templates/account/preferences.html.twig. */
.prefs { display: grid; gap: 1rem; }
.prefs .card { margin-bottom: 0; }
.prefs__status { position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); z-index: 30; transform: translateX(-50%); margin: 0; padding: .5rem 1.1rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok-text); font-size: .9rem; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-sm); }
.prefs__status:empty { display: none; }
.prefs__status::before { content: "✓ "; }
.prefs__foot { display: flex; justify-content: center; padding: .25rem 0 .5rem; }
.pref { display: grid; gap: .85rem; scroll-margin-top: 5rem; }
.pref--saver:target { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 28%, transparent); }
.pref__head { display: flex; align-items: center; gap: .9rem; }
.pref__ico { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 14px; background: color-mix(in srgb, var(--primary) 16%, var(--surface-2)); color: var(--primary-ink); }
.pref__titles { min-width: 0; }
.pref__title { margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.pref__desc { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; }
.pref__group { min-width: 0; margin: 0; padding: 0; border: 0; }
.pref__hint { margin: 0; color: var(--muted); font-size: .85rem; }
.pref__preview { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; margin: 0; padding: .6rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); font-family: var(--font-mono); font-size: .9rem; }
.pref__preview-label { color: var(--muted); font-family: var(--font-sans); font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pref__note { margin: 0; padding: .6rem .9rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: .875rem; }
.pref__note[hidden] { display: none; }
.pref__select { width: 100%; min-height: 3rem; }

.pref-opt { display: block; min-width: 0; cursor: pointer; }
.pref-opt__input:focus-visible + .pref-opt__body { outline: 2px solid var(--primary-ink); outline-offset: 2px; }
.pref-opt__label { font-weight: 700; }
.pref-opt__hint { color: var(--muted); font-family: var(--font-mono); font-size: .85rem; }

.pref-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .2rem; padding: .25rem; border-radius: 1.2rem; background: var(--seg-bg); }
.pref-seg .pref-opt__body { display: grid; place-items: center; min-height: 2.75rem; padding: 0 .6rem; border-radius: .95rem; color: var(--seg-text); text-align: center; transition: background .15s, color .15s; }
.pref-seg .pref-opt:hover .pref-opt__body { background: color-mix(in srgb, var(--seg-text) 10%, transparent); }
.pref-seg .pref-opt__input:checked + .pref-opt__body { background: var(--seg-on-bg); color: var(--seg-on-text); }

.pref-choices { display: grid; gap: .5rem; }
.pref-choices .pref-opt__body { position: relative; display: grid; gap: .1rem; padding: .7rem .9rem .7rem 2.75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, background .15s; }
.pref-choices .pref-opt__body::before { content: ""; position: absolute; left: .95rem; top: 50%; width: 1.2rem; height: 1.2rem; margin-top: -.6rem; box-sizing: border-box; border: 2px solid var(--field-border); border-radius: 50%; }
.pref-choices .pref-opt:hover .pref-opt__body { border-color: var(--field-border); }
.pref-choices .pref-opt__input:checked + .pref-opt__body { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 9%, var(--surface)); }
.pref-choices .pref-opt__input:checked + .pref-opt__body::before { border-color: var(--primary-ink); background: radial-gradient(circle, var(--primary-ink) 0 38%, transparent 42%); }

.pref-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pref-pills .pref-opt__body { display: inline-grid; place-items: center; min-height: 2.75rem; padding: 0 1.1rem; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); transition: background .15s, color .15s; }
.pref-pills .pref-opt:hover .pref-opt__body { border-color: var(--field-border); }
.pref-pills .pref-opt__input:checked + .pref-opt__body { border-color: var(--seg-on-bg); background: var(--seg-on-bg); color: var(--seg-on-text); }

.pref-state { display: flex; align-items: baseline; gap: .55rem; margin: 0; padding: .65rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: .9rem; }
.pref-state::before { content: ""; flex: none; width: .6rem; height: .6rem; border: 2px solid currentColor; border-radius: 50%; }
.pref-state[data-active="true"] { background: var(--ok-bg); color: var(--ok-text); font-weight: 600; }
.pref-state[data-active="true"]::before { background: currentColor; }
.pref__more { display: grid; gap: .25rem; }
.pref__more > summary { display: flex; align-items: center; min-height: 2.75rem; color: var(--primary-ink); font-weight: 700; cursor: pointer; }
.pref__more ul { display: grid; gap: .45rem; margin: 0 0 .75rem; padding-left: 1.15rem; font-size: .9rem; }
.pref-seg--3 .pref-opt__body { padding: 0 .25rem; font-size: .92rem; }
.tides > * { min-width: 0; } /* grille : la rangée des jours défile dans sa carte au lieu d'élargir la page */

/* Liste des points, SANS image visible (point sans aperçu de carte, ou mode économie `html[data-saver="on"]` qui masque la carte et le slider mais garde la classe `--thumb`) :
   la barre du haut n'est plus posée sur une image (elle recouvrait alors le nom). « Y aller » (et le tracé GPX s'il existe) passent dans une colonne à droite de la ligne, centrés
   verticalement : ronds de 2,75 rem (cible tactile) avec l'icône seule sur mobile ; pastille avec le libellé dès 640 px. Le nom garde toute la largeur restante. */
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) > .point-row { grid-column: 1; grid-row: 1; min-height: 4.25rem; padding: .8rem .35rem .8rem .95rem; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot name side" "dot meta side"; row-gap: 0; }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__bar { grid-column: 2; grid-row: 1; position: static; display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 0 .75rem 0 .15rem; pointer-events: auto; }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link,
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__track { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 2.75rem; height: 2.75rem; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link { background: color-mix(in srgb, var(--primary) 16%, var(--surface)); color: var(--primary-ink, var(--primary)); }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__track { background: var(--surface-2); color: var(--muted); }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link:hover,
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__track:hover { border: 0; background: var(--primary); color: var(--primary-text); }
.shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* libellé lu par les lecteurs d'écran (l'`aria-label` du lien le dit aussi) */
@media (min-width: 640px) {
    .shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link { width: auto; height: 2.5rem; gap: .15rem; padding: 0 .8rem 0 .95rem; }
    .shell--c :is(.point-item:not(.point-item--thumb), html[data-saver="on"] .point-item--thumb) .point-item__link > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* Épingle d'une vignette (point gardé en haut de son groupe) : un bouton rond posé dans la barre de la vignette, à côté du lien « tracé » dont il reprend l'aspect et les emplacements (`point-item__track`). */
.point-item--thumb .point-item__bar > button { pointer-events: auto; }
.point-item__pin { padding: 0; border: 0; font: inherit; cursor: pointer; }
.point-item__pin[aria-pressed="true"] { background: var(--primary) !important; color: var(--primary-text) !important; }
.point-item__pin[aria-pressed="true"] .ico { fill: currentColor; }
.point-item__pin:disabled { opacity: .6; cursor: progress; }

/* Double authentification par e-mail : champ du code (grands chiffres espacés) et pastille « 2FA » de la liste des comptes. */
.two-factor__code { font-size: 1.5rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.badge--2fa { background: var(--surface-2); color: var(--muted); }
.pref__block { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.pref__sub { margin: 0 0 .25rem; font-size: 1rem; }


/* Cartographe (`/cartographe`, templates/cartographer/index.html.twig, contrôleur `cartographer`) : une grande carte, une recherche de lieu, et la feuille « Ajouter ce point ».
   Mobile (AGENTS.md) : la feuille monte du bas, sur toute la largeur, coins du haut arrondis, animation `peek-sheet-up`, poignée tirable (`sheet-swipe`), au-dessus de la barre flottante (z-index 30).
   Bureau (≥ 56,25 rem) : une carte posée en bas à droite, SANS fond assombri : la carte reste visible et le repère déplaçable pendant qu'on remplit. */
.carto { display: grid; gap: .6rem; }
.carto .topbar { margin-bottom: 0; }
.carto-search { display: flex; gap: .5rem; align-items: stretch; }
.carto-search__input { flex: 1 1 auto; min-width: 0; min-height: 2.75rem; padding: .5rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.carto-search__input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.carto-search__btn { flex: none; min-height: 2.75rem; }
.carto-search__status { margin: 0; }
.carto-results { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.carto-results[hidden] { display: none; }
.carto-results__item { display: block; width: 100%; min-height: 2.75rem; padding: .5rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.carto-results__item:hover { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.carto-results__item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.carto-map { position: relative; isolation: isolate; } /* `isolation` : les volets de Leaflet (z-index jusqu'à 1000) restent sous la barre du haut quand la page défile */
.carto-map .map__canvas, .carto-map .map__canvas.leaflet-container { height: calc(100dvh - 19rem); min-height: 20rem; }
.carto-map .map__notice { position: absolute; z-index: 1000; top: .6rem; left: 3.4rem; right: 3.6rem; box-shadow: var(--shadow-sm); }
.carto-map .map__canvas.is-picking { cursor: crosshair; }
.carto .basemap-control__list { max-height: min(60dvh, 26rem); } /* beaucoup de fonds et de surcouches : la liste est plus haute que sur la fiche d'un point (10 rem) */
.carto-toast { margin: 0; }
.carto-toast[hidden] { display: none; }
.carto-sheet[hidden] { display: none; }
.carto-sheet__backdrop { position: fixed; inset: 0; z-index: 48; background: rgba(10, 16, 28, .45); }
.carto-sheet__panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 49; max-height: 82dvh; overflow-y: auto; overscroll-behavior: contain;
    padding: 1.6rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    border: 0; border-top: 1px solid var(--border); border-radius: 1.75rem 1.75rem 0 0;
    background: var(--surface); color: var(--text); box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
    animation: peek-sheet-up .22s ease-out;
}
.carto-sheet__panel:focus { outline: none; }
.carto-sheet__panel::before { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 99px; background: var(--border); }
.carto-sheet__title { margin: 0 0 .25rem; font-size: 1.1rem; font-weight: 700; }
.carto-sheet__coords { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; user-select: all; overflow-wrap: anywhere; }
.carto-sheet__meta { margin: .15rem 0 0; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.carto-sheet__form { display: grid; gap: .6rem; margin-top: .75rem; }
.carto-sheet__form input[type="text"], .carto-sheet__form select, .carto-sheet__form textarea { width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
.carto-sheet__form textarea { min-height: 4.5rem; resize: vertical; }
.carto-sheet__more summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; color: var(--primary-ink); font-weight: 600; }
.carto-sheet__actions { display: flex; }
.carto-sheet__submit { flex: 1 1 auto; min-height: 3.25rem; }
.carto-sheet__tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .75rem; }
.carto-sheet__tools .btn { min-height: 3.25rem; padding-inline: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carto-sheet__tools a[hidden] { display: none; }
.carto-sheet__conditions { width: 100%; min-height: 3.25rem; margin-top: .75rem; }
.carto-sheet__status { min-height: 1.2em; margin: .5rem 0 0; }
@media (min-width: 56.25rem) {
    .carto-map .map__canvas, .carto-map .map__canvas.leaflet-container { height: calc(100dvh - 15rem); min-height: 26rem; }
    .carto-sheet__backdrop { display: none; }
    .carto-sheet__panel { left: auto; right: 1.25rem; bottom: 1.25rem; width: 24rem; max-width: calc(100vw - 2.5rem); max-height: calc(100dvh - 3rem); padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); animation: none; }
    .carto-sheet__panel::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .carto-sheet__panel { animation: none; } }
