:root {
    
    --marine: #0b203c;
    --marine-2: #123454;
    --ride: #1b9df0;
    --ride-encre: #0f76c4;
    --ecume: #6fd3e6;

    --fond: #f4f7fa;
    --surface: #ffffff;
    --surface-2: #e9f1f7;
    --ombre: rgba(11, 32, 60, .06);

    --reussi-fond: #e6f7ec;
    --reussi-texte: #17603a;
    --reussi-bord: #9ad9b3;
    --alerte-fond: #fff1ec;
    --alerte-texte: #8a3b28;

    --blue-deep: var(--marine);
    
    --titre: #0b203c;
    --blue: var(--ride-encre);
    --blue-light: var(--ecume);
    --sand: #eef4f9;
    --green: #2e8b57;
    --red: #c0392b;
    --accent: #ff7a45;
    --accent-dark: #e5502c;
    --text: #16283a;
    --muted: #5b7386;
    --border: #d6e2ec;
    --radius: 12px;
    --navbar-height: 68px;
    --font-heading: 'Outfit', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --bs-primary: var(--ride-encre);
    --bs-primary-rgb: 15, 118, 196;
    --bs-link-color: var(--ride-encre);
    --bs-link-hover-color: var(--marine);
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--text);
    --bs-border-radius: .6rem;
    --bs-border-radius-lg: .85rem;
    --bs-border-radius-sm: .42rem;
    --bs-body-bg: var(--fond);
    --bs-emphasis-color: var(--text);
    color-scheme: light;
}

:root[data-theme="sombre"] {
    --marine: #0a1826;
    --marine-2: #12293f;
    --ride: #3fb0f5;
    --ride-encre: #5cbdf7;
    --ecume: #7fdcec;

    --fond: #0d1720;
    --surface: #142330;
    --surface-2: #1c3040;
    --ombre: rgba(0, 0, 0, .4);

    --blue-deep: #0a1826;
    --titre: #e8f1f8;
    --blue: #5cbdf7;
    --blue-light: #7fdcec;
    --sand: #16242f;
    --text: #e8f1f8;
    --muted: #9db4c4;
    --border: #27404f;

    --reussi-fond: #14372a;
    --reussi-texte: #7fd6a3;
    --reussi-bord: #2c6a4b;
    --alerte-fond: #3a1f18;
    --alerte-texte: #ffab8f;

    --bs-primary: #3fb0f5;
    --bs-primary-rgb: 63, 176, 245;
    --bs-link-color: #6fc9fa;
    --bs-link-hover-color: #9adcfd;
    --bs-body-color: var(--text);
    --bs-body-bg: var(--fond);
    --bs-emphasis-color: var(--text);
    --bs-secondary-color: var(--muted);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) {
        --marine: #0a1826;
        --marine-2: #12293f;
        --ride: #3fb0f5;
        --ride-encre: #5cbdf7;
        --ecume: #7fdcec;

        --fond: #0d1720;
        --surface: #142330;
        --surface-2: #1c3040;
        --ombre: rgba(0, 0, 0, .4);

        --blue-deep: #0a1826;
        --titre: #e8f1f8;
        --blue: #5cbdf7;
        --blue-light: #7fdcec;
        --sand: #16242f;
        --text: #e8f1f8;
        --muted: #9db4c4;
        --border: #27404f;

        --reussi-fond: #14372a;
        --reussi-texte: #7fd6a3;
        --reussi-bord: #2c6a4b;
        --alerte-fond: #3a1f18;
        --alerte-texte: #ffab8f;

        --bs-primary: #3fb0f5;
        --bs-primary-rgb: 63, 176, 245;
        --bs-link-color: #6fc9fa;
        --bs-link-hover-color: #9adcfd;
        --bs-body-color: var(--text);
        --bs-body-bg: var(--fond);
        --bs-emphasis-color: var(--text);
        --bs-secondary-color: var(--muted);
        color-scheme: dark;
    }
}

body {
    
    background: var(--fond);
    color: var(--text);
    min-height: 100vh;
    
    display: flex;
    flex-direction: column;
}
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

h1, h2, h3, h4, .navbar-brand, .fw-heading { font-family: var(--font-heading); }

.site-navbar {
    background: var(--blue-deep);
    box-shadow: 0 1px 0 rgba(11,61,85,.12);
    min-height: var(--navbar-height);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-navbar .navbar-brand { letter-spacing: -.01em; }
.site-navbar .nav-link {
    color: #eaf6fb;
    font-weight: 500;
    position: relative;
    transition: color .15s ease;
}
.site-navbar .nav-link:hover { color: #fff; }
.site-navbar .nav-item .nav-link:not(.nav-admin-link)::after {
    content: '';
    position: absolute;
    left: .5rem; right: .5rem; bottom: -2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .18s ease;
}
.site-navbar .nav-item .nav-link:not(.nav-admin-link):hover::after { transform: scaleX(1); }
.nav-user-label { color: #cfeaf5; }
.nav-admin-link {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff !important;
    border-radius: 8px;
    padding: .3rem .8rem !important;
    font-weight: 600;
}
.nav-admin-link:hover { filter: brightness(1.05); }

.site-main:has(.map-page), .site-main:has(.add-spot-page), .site-main:has(.auth-page) { padding: 0; }

.hero {
    position: relative;
    background: linear-gradient(165deg, var(--blue-deep) 0%, #10557a 100%);
    overflow: hidden;
    padding-bottom: 3.5rem;
}
.hero__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.hero__text { flex: 1 1 420px; color: #fff; }
.hero__eyebrow {
    display: inline-block;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.3);
    color: #eaf6fb;
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .8rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}
.hero__text h1 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.12;
    margin: 0 0 1rem;
    
    text-wrap: balance;
    font-weight: 800;
    letter-spacing: -.01em;
}
.hero__tagline {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #dcecf3;
    max-width: 42ch;
    margin: 0 0 1.75rem;
}
.hero__stats { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hero-stat__value {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
}
.hero-stat__label { font-size: .78rem; color: #bcdbe8; }
.hero__actions { display: flex; gap: .85rem; flex-wrap: wrap; }
.btn-cta {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    transition: background .15s ease;
}
.btn-cta:hover, .btn-cta:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}
.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.55);
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

.hero__map {
    flex: 1 1 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.hero__marque {
    width: 100%;
    max-width: 440px;
    height: auto;
    
    margin-bottom: -1.75rem;
    
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .35));
}
.hero-map__svg { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.hero-map__shape { stroke: rgba(255,255,255,.55); stroke-width: 1.6; stroke-linejoin: round; }
.hero-pin { transform-box: fill-box; transform-origin: center; }
.hero-pin__dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.hero-pin__pulse {
    fill: var(--accent);
    opacity: .45;
    transform-box: fill-box;
    transform-origin: center;
    animation: heroPulse 2.6s ease-out infinite;
}
@keyframes heroPulse {
    0%   { transform: scale(.3); opacity: .55; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

.hero__wave {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 70px;
    background-repeat: repeat-x;
    background-size: 1440px 70px;
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath fill='%23f5efe3' d='M0,40 C240,90 480,0 720,20 C960,40 1200,90 1440,40 L1440,70 L0,70 Z'%3E%3C/path%3E%3C/svg%3E");
}

.page-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 2px var(--ombre);
    position: relative;
}
.muted { color: var(--muted); }

.site-main > .container, .site-main > .container-fluid { position: relative; }
.site-main > .container > h1:first-child,
.site-main > .container > .h3:first-child {
    position: relative;
    padding-left: .95rem;
}
.site-main > .container > h1:first-child::before,
.site-main > .container > .h3:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: .15em; bottom: .15em;
    width: 4px;
    border-radius: 999px;
    background: var(--blue);
}

.btn { font-weight: 600; }
.btn-primary { transition: filter .15s ease; }
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.06); }
.btn-outline-secondary { font-weight: 600; }

.form-control:focus, .form-select:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 .2rem rgba(72,192,217,.25);
}
.form-label { font-weight: 600; color: var(--titre); font-size: .92rem; }

.table thead th {
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--muted);
    border-bottom-width: 1px;
    font-weight: 700;
}

.admin-card {
    background: linear-gradient(155deg, var(--surface), var(--surface-2));
    border: 1px solid #dfeef3;
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    text-align: center;
    transition: transform .15s ease, box-shadow .15s ease;
}
.admin-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(11,61,85,.1); }
.admin-card__value { display: block; font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; color: var(--titre); }
.admin-card__label { font-size: .78rem; color: var(--muted); font-weight: 600; }

.pastille-admin { background: #f2a516; color: #3a2600; }
.pastille-moderateur { background: #2b8fd0; color: #fff; }

.site-footer {
    background: linear-gradient(180deg, transparent, rgba(15,111,168,.06));
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.auth-page {
    display: flex;
    min-height: calc(100vh - var(--navbar-height));
}
.auth-panel {
    flex: 1 1 46%;
    background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue) 55%, var(--blue-light) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.auth-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: .12;
    pointer-events: none;
}
.auth-panel__brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}
.auth-panel__title {
    font-family: var(--font-heading);
    font-weight: 800;
    text-wrap: balance;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    position: relative;
    max-width: 20ch;
}
.auth-panel__tagline {
    color: #dcecf3;
    max-width: 34ch;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
}
.auth-features { list-style: none; padding: 0; margin: 0; position: relative; }
.auth-features li {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .85rem;
    color: #eaf6fb;
    font-weight: 500;
}
.auth-features li .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.15);
    border-radius: 8px;
    flex-shrink: 0;
}
.auth-form-side {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: var(--sand);
}
.auth-form-card { width: 100%; max-width: 420px; }
.auth-form-card .page-card { border: none; box-shadow: 0 10px 34px rgba(11,61,85,.12); }

@media (max-width: 900px) {
    .auth-page { flex-direction: column; min-height: auto; }
    .auth-panel { padding: 2.5rem 1.75rem; }
    .auth-panel__tagline, .auth-features { display: none; }
}

.map-page {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    min-height: 500px;
    
    scroll-margin-top: var(--navbar-height);
}
#map {
    flex: 1;
    background: linear-gradient(160deg, #cfe9f0 0%, #eef6f4 60%, var(--sand) 100%);
}
.sidebar {
    width: 340px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 1.25rem;
}
.panel { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.panel:last-child { border-bottom: none; }
.panel h2 { font-size: 1rem; margin: 0 0 .75rem; }

.hidden { display: none !important; }

.stat-pill { flex: 1; background: var(--surface-2); border-radius: 8px; padding: .6rem; text-align: center; }
.stat-pill__value { display: block; font-size: 1.4rem; font-weight: 700; color: var(--titre); }
.stat-pill__label { font-size: .75rem; color: var(--muted); }

.add-spot-page {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    min-height: 500px;
}
.add-spot-form {
    width: 400px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 1.5rem;
}

.spot-popup h3 { margin: 0 0 .3rem; font-size: 1rem; }
.spot-popup .badge-type { background: var(--blue-light); color: #fff; }
.spot-popup p { margin: .3rem 0; font-size: .85rem; }

.spot-popup .popup-alerte {
    margin: .4rem 0;
    padding: .4rem .55rem;
    border-radius: 6px;
    border-left: 3px solid #d98324;
    background: #fff6e8;
    color: #7a4a12;
    font-size: .82rem;
    line-height: 1.35;
}
.spot-popup .popup-alerte--stop {
    border-left-color: #c0392b;
    background: #fdeceb;
    color: #8a2118;
}
.spot-popup .popup-alerte span { margin-top: .15rem; opacity: .9; }

.spot-marker-icon, .waypoint-marker-icon, .picker-marker-icon { background: transparent; border: none; }

.marker-emoji {
    
    --echelle: 1;
    transform: scale(var(--echelle));
    font-size: 1.1rem;
    text-align: center;
    line-height: 1;
    
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.22));
}

.grappe-icone {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.grappe {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    
    color: #0b203c;
    
    border: 1.5px solid rgba(10, 24, 38, .45);
    box-shadow: 0 1px 4px rgba(10, 24, 38, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .12s ease;
}
.grappe:hover { transform: scale(1.08); }
.grappe--l  { width: 37px; height: 37px; font-size: 1.05rem; }
.grappe--xl { width: 43px; height: 43px; font-size: 1.2rem; }
.grappe__embleme {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 74%;
    height: 74%;
}
.grappe__embleme img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

.grappe__nombre {
    position: absolute;
    right: -3px;
    bottom: -2px;
    background: var(--blue-deep, #0b203c);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    line-height: 1;
    padding: .08rem .24rem;
    border-radius: 999px;
    border: 1.5px solid #fff;
    font-family: var(--font-heading, inherit);
    white-space: nowrap;
}

.grappe--parking {
    background: #eef4fb;
    transform: translate(11px, 9px);
}
.grappe--parking:hover { transform: translate(11px, 9px) scale(1.08); }

.grappe--miseeau {
    background: #e7f5ef;
    transform: translate(-11px, 9px);
}
.grappe--miseeau:hover { transform: translate(-11px, 9px) scale(1.08); }

.marker-emoji--miseeau { --echelle: .92; }

.marker-emoji--spot { --echelle: 1.3; }

.marker-emoji--spot.marker-emoji--proche { --echelle: 1.45; }

.marker-choisi {
    outline: 3px solid var(--bs-primary, #0d6efd);
    outline-offset: 1px;
    border-radius: 50%;
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, .25);
}

.pastille-aide {
    border: none;
    background: none;
    padding: .35rem;
    margin: -.35rem 0 -.35rem .15rem;
    line-height: 1;
    font-size: .95rem;
    cursor: pointer;
    opacity: .75;
    vertical-align: middle;
}
.pastille-aide:hover,
.pastille-aide:focus-visible { opacity: 1; }

.waypoint-marker {
    background: var(--blue-deep);
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.picker-marker {
    background: var(--red);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.sheet-poignee { display: none; }

@media (max-width: 991.98px) {

    .map-page {
        display: block;
        position: relative;
        
        height: calc(100dvh - var(--navbar-height));
        min-height: 420px;
        
        overflow: hidden;
    }
    #map {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: 80%;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--border);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 28px rgba(11,61,85,.22);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 1100;             
        transform: translateY(calc(100% - var(--sheet-hauteur-poignee, 62px)));
        transition: transform .28s cubic-bezier(.32,.72,0,1);
    }
    .sidebar.est-ouvert { transform: translateY(0); }

    .sheet-poignee {
        display: block;
        width: 100%;
        border: none;
        background: transparent;
        padding: .55rem 1rem .7rem;
        text-align: center;
        cursor: pointer;
        flex-shrink: 0;
    }
    .sheet-poignee__barre {
        display: block;
        width: 42px;
        height: 5px;
        margin: 0 auto .5rem;
        border-radius: 999px;
        background: var(--border);
    }
    .sheet-poignee__texte {
        display: block;
        font-size: .88rem;
        font-weight: 600;
        color: var(--titre);
        line-height: 1.25;
    }
    
    .sheet-poignee__texte.est-parcours { color: var(--accent-dark); }

    .sidebar__contenu {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        
        padding: 0 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        overscroll-behavior: contain;
    }

    .panel { margin-bottom: 1.1rem; padding-bottom: 1rem; }

    .sidebar .btn,
    .sidebar .form-control,
    .sidebar .form-select {
        min-height: 46px;
        font-size: 1rem;          
    }
    .sidebar .form-check-input {
        width: 1.35em;
        height: 1.35em;
        margin-top: .1em;
    }
    .sidebar .form-check-label { padding-left: .25rem; font-size: 1rem; }
    .sidebar .form-check { margin-bottom: .75rem; }
    .stat-pill__value { font-size: 1.6rem; }
    #speed-range { height: 2rem; }

    .map-page .leaflet-bottom,
    .map-page .leaflet-control-container .leaflet-bottom {
        bottom: var(--sheet-hauteur-poignee, 62px);
    }
    .map-page .leaflet-control-attribution {
        font-size: .62rem;
        padding: 1px 5px;
        background: rgba(255,255,255,.75);
    }
    .map-page .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; font-size: 1.25rem; }

    .hero__inner { padding: 2rem 1.25rem 1.5rem; gap: 1.5rem; }
    .hero__tagline { margin-bottom: 1.25rem; }
    .hero__stats { gap: 1rem; margin-bottom: 1.25rem; }
    .hero-stat__value { font-size: 1.4rem; }
    .hero__map { display: none; }          
    .hero { padding-bottom: 3rem; }
    .hero__actions .btn { flex: 1 1 auto; min-height: 46px; }

    .add-spot-page {
        flex-direction: column-reverse;    
        height: auto;
    }
    .add-spot-form {
        width: auto;
        max-height: none;
        border-right: none;
        padding: 1.25rem 1rem 1.5rem;
    }
    .add-spot-page #map {
        position: relative;
        height: 45dvh;
        min-height: 260px;
        inset: auto;
    }
    .add-spot-form .btn[type="submit"] {
        position: sticky;
        bottom: .75rem;
        min-height: 50px;
        box-shadow: 0 6px 20px rgba(15,111,168,.35);
    }

    .table thead th { font-size: .66rem; }
    .table td, .table th { padding: .55rem .4rem; }
}

@media (max-width: 400px) {
    .hero__text h1 { font-size: 1.6rem; }
    .sheet-poignee__texte { font-size: .82rem; }
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(11,61,85,.15);
    background: var(--surface-2);
}
.avatar--initiales {
    background: linear-gradient(140deg, var(--blue), var(--blue-light));
    color: #fff;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: .02em;
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: color-mix(in srgb, var(--grade-color) 14%, #fff);
    color: color-mix(in srgb, var(--grade-color) 75%, #000);
    border: 1px solid color-mix(in srgb, var(--grade-color) 35%, #fff);
    border-radius: 999px;
    padding: .3rem .8rem;
    font-weight: 700;
    font-size: .9rem;
}
.grade-badge--sm { font-size: .78rem; padding: .18rem .6rem; font-weight: 600; }
.grade-badge--actif { box-shadow: 0 0 0 2px color-mix(in srgb, var(--grade-color) 30%, #fff); }

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .grade-badge { background: var(--surface-2); color: var(--titre); border-color: var(--border); }
}

.membre-carte { transition: transform .15s ease, box-shadow .15s ease; }
.membre-carte:hover { border-color: var(--blue-light); }
.min-w-0 { min-width: 0; }
.lien-discret { color: inherit; text-decoration: none; }
.lien-discret:hover { color: var(--blue); text-decoration: underline; }

.note-etoiles { color: #f2a516; letter-spacing: .08em; }
.avis-item { padding: 1rem 0; border-top: 1px solid var(--border); }
.avis-item:first-of-type { border-top: none; padding-top: 0; }

.liste-notifs { list-style: none; margin: 0; padding: 0; }
.liste-notifs li { padding: .7rem 0 .7rem .9rem; border-top: 1px solid var(--border); border-left: 3px solid transparent; }
.liste-notifs li:first-child { border-top: none; }
.liste-notifs .notif--non-lue { border-left-color: var(--accent); background: var(--alerte-fond); }
.spot-popup .popup-badges { display: flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0; }

.spot-popup .popup-activites {
    margin: .45rem 0 .1rem;
    padding-left: .55rem;
    border-left: 3px solid var(--ride-encre);
    font-size: .92rem;
    line-height: 1.35;
}
.spot-popup .popup-activites__quoi { color: var(--muted); }
.spot-popup .btn { margin-top: .4rem; }
.notif-pastille {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 0 .45rem;
    font-size: .7rem;
    font-weight: 700;
}

.menu-compte__declencheur {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.menu-compte__declencheur .avatar {
    border-width: 1px;
    box-shadow: none;
}
.menu-compte__pseudo {
    font-weight: 600;
    max-width: 12ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.menu-compte .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(11,61,85,.18);
    padding: .4rem;
    min-width: 15rem;
}
.menu-compte .dropdown-item {
    border-radius: 9px;
    padding: .55rem .7rem;
    font-weight: 500;
}
.menu-compte .dropdown-item:active { background: var(--blue); }

.reglages {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.reglages__menu {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}
.reglages__lien {
    display: block;
    padding: .6rem .85rem;
    border-radius: 10px;
    color: var(--titre);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid transparent;
}
.reglages__lien:hover { background: var(--surface); border-color: var(--border); }
.reglages__lien.est-actif {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15,111,168,.28);
}
.zone-danger { border: 1px solid #f3c9c4; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { padding: .6rem 0; border-top: 1px solid var(--border); }
.liste-simple li:first-child { border-top: none; }
.etat-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: .5rem; }
.mt--1 { margin-top: -.5rem; }

.anti-robot {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .9rem 1rem;
}
.anti-robot .form-label { font-weight: 600; margin-bottom: .5rem; }
.anti-robot__question {
    display: block;
    font-weight: 500;
    color: var(--titre);
    margin-top: .2rem;
}

.case-robot {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .15rem .1rem;
}
.case-robot__case {
    width: 26px; height: 26px;
    flex: none;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent);
}
.case-robot__texte {
    font-weight: 600;
    color: var(--titre);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.case-robot__marque {
    margin-left: auto;
    width: 22px; height: 22px;
    color: var(--succes, #1a6349);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .18s ease, transform .18s ease;
}
.case-robot__case:checked ~ .case-robot__marque {
    opacity: 1;
    transform: scale(1);
}
.case-robot__marque svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) {
    .case-robot__marque { transition: none; }
}

.anti-robot__piege {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.messagerie {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    min-height: 60vh;
}
.messagerie__liste {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden auto;
    max-height: 70vh;
}
.conv {
    display: flex;
    gap: .7rem;
    align-items: center;
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.conv:last-child { border-bottom: none; }
.conv:hover { background: var(--surface-2); }
.conv.est-actif { background: var(--surface-2); }
.conv.est-non-lue .conv__nom { font-weight: 700; }
.conv__texte { min-width: 0; flex: 1; }
.conv__nom { display: block; font-weight: 600; }
.conv__apercu {
    display: block;
    font-size: .85rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.messagerie__fil {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    max-height: 70vh;
}
.messagerie__vide {
    margin: auto;
    text-align: center;
    padding: 2rem 1rem;
}
.fil__entete {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.fil__membre { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.fil__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    
    background: var(--surface);
}
.fil__jour {
    text-align: center;
    font-size: .75rem;
    color: var(--muted);
    margin: .8rem 0 .5rem;
}
.bulle {
    max-width: min(78%, 560px);
    padding: .55rem .8rem;
    border-radius: 16px;
    margin-bottom: .45rem;
    position: relative;
    word-break: break-word;
}
.bulle--moi {
    margin-left: auto;
    background: var(--blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.bulle--autre {
    background: var(--surface-2);
    color: var(--text);
    border-bottom-left-radius: 5px;
}
.bulle__heure { font-size: .7rem; opacity: .75; text-align: right; margin-top: .15rem; }
.fil__saisie {
    display: flex;
    gap: .5rem;
    padding: .7rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.fil__saisie textarea { resize: none; border-radius: 14px; }
.fil__bloque {
    padding: .9rem;
    border-top: 1px solid var(--border);
    background: var(--alerte-fond);
    color: var(--alerte-texte);
    font-size: .9rem;
    text-align: center;
}

.parkings-resultat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .8rem .9rem;
    font-size: .9rem;
}
.liste-parkings { list-style: none; margin: 0 0 .2rem; padding: 0; }
.liste-parkings li { padding: .2rem 0; }
.lien-parking {
    background: none;
    border: none;
    padding: 0;
    color: var(--blue);
    font-weight: 600;
    text-align: left;
    text-decoration: underline;
    cursor: pointer;
}
.marker-emoji--proche {
    filter: drop-shadow(0 0 6px rgba(255,107,69,.9));
    --echelle: 1.1;
}
.marker-emoji--lie { opacity: .85; }

.marker-alerte {
    position: relative;
    filter: drop-shadow(0 0 4px rgba(192, 57, 43, .9)) drop-shadow(0 2px 2px rgba(0,0,0,.35));
    animation: alerte-battement 2.2s ease-in-out infinite;
}

@keyframes alerte-battement {
    0%, 100% { transform: scale(var(--echelle, 1)); }
    50%      { transform: scale(calc(var(--echelle, 1) * 1.12)); }
}
@media (prefers-reduced-motion: reduce) {
    .marker-alerte { animation: none; }
}

.bandeau-alerte { border-left-width: 5px; }
.bandeau-alerte__titre {
    margin: 0;
    font-weight: 700;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.bandeau-alerte__motif { margin: .35rem 0 0; }

.bandeau-alerte__source {
    margin: .4rem 0 0;
    font-size: .85rem;
    opacity: .95;
}

.texte-alerte { color: var(--alerte-texte); font-weight: 600; }

.chrono__chiffres {
    display: flex;
    gap: .5rem;
    text-align: center;
}
.chrono__chiffres > div {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .5rem .2rem;
}
.chrono__valeur {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--titre);
    font-variant-numeric: tabular-nums;
}
.chrono__libelle { display: block; font-size: .7rem; color: var(--muted); }
.chrono__gps { margin: .5rem 0 0; }

.chrono__objectif { font-variant-numeric: tabular-nums; }

.chrono__carte {
    height: 34vh;
    min-height: 180px;
    max-height: 340px;
    margin-bottom: .75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}
.chrono__recentrer {
    display: block;
    margin: -.4rem 0 .75rem auto;
    padding: .25rem .6rem;
    font-size: .78rem;
    color: var(--titre);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.chrono-carte-moi span {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0f6fa8;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
    animation: chrono-carte-battement 2.4s ease-in-out infinite;
}
@keyframes chrono-carte-battement {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
    .chrono-carte-moi span { animation: none; }
}

.chrono-carte-pastille span {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.chrono__arrivee {
    background: var(--reussi-fond);
    border: 1px solid #9ad9b3;
    color: var(--reussi-texte);
    border-radius: 10px;
    padding: .6rem .8rem;
    margin-bottom: .6rem;
    text-align: center;
    animation: pulsation 1.1s ease-in-out 3;
}
@keyframes pulsation {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
    .chrono__arrivee { animation: none; }
}

.chrono-essai {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: .5rem .75rem;
    background: repeating-linear-gradient(
        45deg, transparent, transparent 8px,
        rgba(127, 127, 127, .05) 8px, rgba(127, 127, 127, .05) 16px);
    font-size: .9rem;
}
.chrono-essai > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.chrono-essai > summary::-webkit-details-marker { display: none; }
.chrono-essai > summary::before { content: '▸ '; }
.chrono-essai[open] > summary::before { content: '▾ '; }
.chrono-essai__corps { padding-top: .6rem; }

.bloc-parking {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: .9rem;
    background: var(--surface);
}
.bloc-parking legend { float: none; width: auto; font-size: 1rem; }
.picker-marker--parking {
    background: var(--blue-deep) !important;   
}

.picker-marker--parking::after {
    content: 'P';
    transform: rotate(45deg);
    font-weight: 700;
    font-size: .85rem;
    line-height: 1;
}
#map.curseur-parking { cursor: crosshair; }

.hero__points {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    color: #d7ecf5;
    font-size: .92rem;
}

.hero__points li { display: block; }

@media (max-width: 991.98px) {
    .reglages { grid-template-columns: 1fr; }
    .reglages__menu {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: .3rem;
        gap: .4rem;
    }
    .reglages__lien { white-space: nowrap; padding: .55rem .8rem; }

    .messagerie { grid-template-columns: 1fr; min-height: 0; }
    .messagerie__liste { max-height: none; }
    .messagerie.est-ouverte .messagerie__liste { display: none; }
    .messagerie:not(.est-ouverte) .messagerie__fil { display: none; }
    .messagerie__fil { max-height: calc(100dvh - var(--navbar-height) - 7rem); min-height: 55vh; }
    .fil__saisie textarea { font-size: 1rem; }

    .menu-compte__pseudo { max-width: none; }
    .menu-compte .dropdown-menu { box-shadow: none; }
    .hero__points { font-size: .86rem; gap: .35rem 1rem; }
    .chrono__valeur { font-size: 1.5rem; }
}

.carte-parcours {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.carte-parcours:hover { border-color: var(--blue-light); }
.carte-parcours__apercu {
    display: block;
    position: relative;
    background: linear-gradient(160deg, #e4f2f7, #f3f8f6 60%, var(--sand));
    border-bottom: 1px solid var(--border);
    padding: .4rem;
}
.apercu-parcours { display: block; width: 100%; height: 90px; }
.apercu-parcours--vide {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .85rem;
}
.carte-parcours__compteur {
    position: absolute;
    top: .5rem; right: .5rem;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    border-radius: 999px;
    padding: .12rem .55rem;
    box-shadow: 0 2px 8px rgba(11,61,85,.25);
}
.carte-parcours__corps { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.carte-parcours__chiffres {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .9rem;
    font-size: .88rem;
    margin-bottom: .4rem;
}
.carte-parcours__chiffres strong { color: var(--titre); font-family: var(--font-heading); }
.carte-parcours__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: auto;
}

.fil-activite { list-style: none; margin: 0; padding: 0; }
.fil-activite__ligne {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem 0;
    border-top: 1px solid var(--border);
}
.fil-activite__ligne:first-child { border-top: none; padding-top: 0; }
.fil-activite__avatar { flex-shrink: 0; }
.fil-activite__texte { min-width: 0; line-height: 1.45; }
.fil-activite__date {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-top: .1rem;
}

.classement { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.classement__ligne {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 0;
    border-top: 1px solid var(--border);
}
.classement__ligne:first-child { border-top: none; }
.classement__ligne.est-moi {
    background: var(--surface-2);
    border-radius: 8px;
    padding-left: .4rem;
    padding-right: .4rem;
}
.classement__rang {
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
    color: var(--muted);
}
.classement__rang--1 { color: #c9971b; }
.classement__rang--2 { color: #8f9ba3; }
.classement__rang--3 { color: #b5763c; }
.classement__nom { flex: 1; min-width: 0; }
.classement__nom a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classement__km { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.classement--compact .classement__ligne { padding: .3rem 0; font-size: .88rem; }

.carte-defi { transition: border-color .15s ease; }
.carte-defi.est-reussi { border-color: var(--reussi-bord); background: var(--reussi-fond); }
.carte-defi__emoji {
    font-size: 1.9rem;
    line-height: 1;
    flex-shrink: 0;
}
.defi-mini {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .5rem 0;
    border-top: 1px solid var(--border);
    text-decoration: none;
}
.defi-mini:first-of-type { border-top: none; }
.defi-mini__emoji { font-size: 1.3rem; flex-shrink: 0; }
.defi-mini__corps { flex: 1; min-width: 0; }
.defi-mini__titre { display: block; font-weight: 600; font-size: .9rem; }
.defi-mini__barre { height: 5px; margin-top: .25rem; display: flex; }

.boutons-favoris {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
}
.bouton-favori {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .4rem .9rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--titre);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.bouton-favori:hover { border-color: var(--blue-light); }
.bouton-favori:active { transform: scale(.97); }
.bouton-favori:disabled { opacity: .6; cursor: wait; }
.bouton-favori.est-actif {
    background: var(--alerte-fond);
    border-color: var(--accent);
    color: var(--accent-dark);
}
.bouton-favori__emoji { font-size: 1.05rem; filter: grayscale(1); opacity: .55; }
.bouton-favori.est-actif .bouton-favori__emoji { filter: none; opacity: 1; }
.bouton-favori__compteur {
    
    color: #1c2b33;
    background: #eef4f7;
    border-radius: 999px;
    padding: 0 .45rem;
    font-size: .8rem;
    min-width: 1.5rem;
    text-align: center;
}
.bouton-favori.est-actif .bouton-favori__compteur { background: var(--alerte-fond); color: var(--alerte-texte); }

.profil-entete { overflow: hidden; padding: 0; }
.profil-banniere {
    
    height: var(--banniere-h, 170px);
    background-size: cover;
    background-position: center;
    background-color: var(--surface-2);
}
.profil-banniere--vide {
    background-image: linear-gradient(140deg, var(--blue-deep), var(--blue) 60%, var(--blue-light));
    height: 90px;
}
.profil-entete__corps { margin-top: -46px; }
.profil-entete__corps > .avatar { border-width: 4px; }

.profil-entete__corps > .flex-fill,
.profil-entete__corps > .text-end { margin-top: 46px; }
.apercu-banniere {
    display: block;
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.fiche-materiel-zone { container-type: inline-size; }
.fiche-materiel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
    margin: 0;
}

@container (min-width: 430px) {
    .fiche-materiel { grid-template-columns: 1fr 1fr; }
}

.fiche-materiel__paire {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    padding: .12rem 0;
    border-bottom: 1px dotted var(--border);
}
.fiche-materiel dt {
    color: var(--muted);
    font-weight: 500;
    font-size: .8rem;
    
    flex: 0 0 auto;
}
.fiche-materiel dd {
    margin: 0;
    font-weight: 600;
    font-size: .8rem;
    text-align: right;
    min-width: 0;
}
.fiche-materiel__titre { margin-bottom: .15rem; }

.galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
}
.galerie__item {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.galerie__item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.galerie__item figcaption {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    font-size: .8rem;
    color: var(--muted);
}
.galerie--profil .galerie__item figcaption { justify-content: center; }

.liste-spots { list-style: none; margin: 0; padding: 0; }
.liste-spots li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 0;
    border-top: 1px solid var(--border);
}
.liste-spots li:first-child { border-top: none; }
.liste-spots__emoji { font-size: 1.3rem; flex-shrink: 0; }
.texte-coupe {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carte-decouverte {
    height: 340px;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.liste-engagements { list-style: none; margin: 0; padding: 0; }
.liste-engagements li {
    padding: .6rem 0 .6rem 1.6rem;
    border-top: 1px solid var(--border);
    position: relative;
    font-size: .92rem;
}
.liste-engagements li:first-child { border-top: none; }
.liste-engagements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer__marque {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--titre);
    font-size: 1.05rem;
}
.site-footer__liens { list-style: none; margin: 0; padding: 0; }
.site-footer__liens li { padding: .15rem 0; }
.site-footer__liens a { color: var(--muted); text-decoration: none; font-size: .88rem; }
.site-footer__liens a:hover { color: var(--blue); text-decoration: underline; }

@media (max-width: 991.98px) {
    
    .profil-banniere { height: calc(var(--banniere-h, 150px) * .8); }
    .profil-entete__corps { margin-top: -38px; }
    .profil-entete__corps > .flex-fill,
    .profil-entete__corps > .text-end { margin-top: 0; }
    .galerie { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .carte-decouverte { height: 260px; }
    .bouton-favori { flex: 1 1 auto; justify-content: center; min-height: 44px; }
    
    .fiche-materiel { gap: 0; }
}

.bande-communaute { background: var(--surface); border-top: 1px solid var(--border); }
.bande-communaute .fil-activite__ligne { padding: .6rem 0; }

.chrono {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
}

.chrono__chiffres {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    text-align: center;
}
@media (min-width: 560px) {
    .chrono__chiffres { grid-template-columns: repeat(4, 1fr); }
}

.chrono__pied {
    display: block;
}
.chrono__pied-fin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-top: .5rem;
}
.chrono__pied-fin .btn { width: 100%; }

.btn-pause {
    width: 100%;
    background: rgba(15, 111, 168, .08);
    border: 1px solid rgba(15, 111, 168, .35);
    color: var(--titre);
    font-weight: 700;
    min-height: 48px;
    font-size: 1.05rem;
}
.btn-pause:hover, .btn-pause:focus-visible {
    background: rgba(15, 111, 168, .16);
    border-color: rgba(15, 111, 168, .55);
    color: var(--titre);
}

.chrono--pause .btn-pause {
    background: #16794f;
    border-color: #16794f;
    color: #fff;
}

.chrono--pause .chrono__valeur { opacity: .55; }

.chrono__valeur--distance b { font-weight: 700; }
.chrono__valeur--distance i {
    font-style: normal;
    font-size: .52em;
    font-weight: 600;
    color: var(--muted);
    
    margin-inline-start: -.12em;
}
.chrono__valeur {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--titre);
    font-variant-numeric: tabular-nums;
}
.chrono__libelle {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}
.chrono__arrivee {
    background: var(--reussi-fond);
    border: 1px solid #b7e2c4;
    color: var(--reussi-texte);
    border-radius: 12px;
    padding: .6rem .8rem;
    margin-bottom: .75rem;
    text-align: center;
}
.btn-terminer {
    display: block;
    width: 100%;
    margin-top: .9rem;
    min-height: 50px;
    border: none;
    border-radius: 999px;
    background: #12805a;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(18, 128, 90, .3);
}
.btn-terminer:hover, .btn-terminer:focus { background: #0e6b4b; color: #fff; }

.defis-onglets { gap: .4rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
.defis-onglets .nav-link {
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--titre);
    background: var(--surface-2);
    white-space: nowrap;
}
.defis-onglets .nav-link.active { background: var(--blue-deep); color: #fff; }

.defi-ligne {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem .25rem;
    border-top: 1px solid var(--border);
}
.defi-ligne:first-child { border-top: none; }
.defi-ligne__pastille {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    background: var(--surface-2);
}
.defi-ligne.est-reussi .defi-ligne__pastille { background: var(--reussi-fond); }
.defi-ligne__corps { flex: 1 1 auto; min-width: 0; }
.defi-ligne__titre { font-weight: 600; line-height: 1.25; }
.defi-ligne__barre { height: 5px; border-radius: 999px; margin-top: .4rem; background: var(--surface-2); }
.defi-ligne__barre .progress-bar { border-radius: 999px; }
.defi-ligne__score {
    flex-shrink: 0;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--titre);
}
.defi-ligne__score .muted { font-weight: 400; }
.defi-ligne__coche { flex-shrink: 0; color: #12805a; font-size: 1.3rem; }

.badges-rangee { display: flex; flex-wrap: wrap; gap: .6rem; }
.badge-gagne {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    width: 96px;
    padding: .4rem .2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform .15s ease;
}

.badge-gagne:hover { transform: translateY(-2px); }
.badge-gagne__titre {
    font-size: .7rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.2;
}

.fil-activite { list-style: none; margin: 0; padding: 0; }
.fil-activite__ligne { display: flex; gap: .75rem; padding: .8rem 0; border-top: 1px solid var(--border); }
.fil-activite__ligne:first-child { border-top: none; }
.fil-activite__avatar { flex-shrink: 0; }
.fil-activite__texte { min-width: 0; line-height: 1.4; }
.fil-activite__date { display: block; font-size: .78rem; color: var(--muted); margin-top: .1rem; }

.classement { list-style: none; margin: 0; padding: 0; counter-reset: rang; }
.classement__ligne { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.classement__ligne:first-child { border-top: none; }
.classement__ligne.est-moi { background: var(--surface-2); border-radius: 10px; padding-inline: .5rem; }
.classement__rang {
    flex-shrink: 0; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: .78rem; font-weight: 700;
    background: var(--surface-2); color: var(--titre);
}
.classement__rang--1 { background: #f6d879; color: #6b5200; }
.classement__rang--2 { background: #dfe4e8; color: #4a555c; }
.classement__rang--3 { background: #e9c39a; color: #6d4520; }
.classement__nom { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.classement__km { flex-shrink: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.classement--compact .classement__ligne { padding: .35rem 0; font-size: .9rem; }

.defi-mini { display: flex; gap: .7rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--border); }
.defi-mini:first-of-type { border-top: none; }
.defi-mini__emoji { font-size: 1.3rem; }
.defi-mini__corps { flex: 1 1 auto; min-width: 0; }
.defi-mini__titre { display: block; font-weight: 600; font-size: .92rem; }
.defi-mini__barre { display: block; height: 5px; border-radius: 999px; background: var(--surface-2); margin-top: .3rem; }
.etat-emoji { font-size: 2.4rem; line-height: 1; margin-bottom: .5rem; }
.liste-spots { list-style: none; margin: 0; padding: 0; }
.liste-spots li { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.liste-spots li:first-child { border-top: none; }
.liste-spots__emoji { font-size: 1.3rem; flex-shrink: 0; }
.liste-engagements { padding-left: 1.1rem; }
.liste-engagements li { margin-bottom: .5rem; }
.liste-simple { list-style: none; margin: 0; padding: 0; }
.liste-simple li { padding: .5rem 0; border-top: 1px solid var(--border); }
.liste-simple li:first-child { border-top: none; }
.texte-coupe { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.carte-decouverte { height: 320px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.carte-defi.est-reussi { border-color: var(--reussi-bord); background: var(--reussi-fond); }
.carte-defi__emoji { font-size: 1.8rem; line-height: 1; }
.bloc-miseeau { border-left: 3px solid var(--blue-light); }
.picker-marker--miseeau { background: var(--blue); }
.btn-demarrer { font-weight: 600; }

@media (max-width: 991.98px) {

    body.chrono-en-cours .chrono:not(.hidden) {
        
        position: fixed;
        left: .6rem;
        right: .6rem;
        
        bottom: .6rem;
        bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
        z-index: 1200;
        border-radius: 20px;
        padding: 1rem 1rem 1.1rem;
        box-shadow: 0 -6px 24px rgba(11, 61, 85, .22);
    }
    body.chrono-en-cours .chrono__valeur { font-size: 2rem; }
    
    body.chrono-en-cours .sidebar { display: none; }
    body.chrono-en-cours .map-page .leaflet-bottom { bottom: 0; }

    .chrono__chiffres { gap: .25rem; }
    .carte-decouverte { height: 260px; }

    .defi-ligne__pastille { width: 40px; height: 40px; font-size: 1.15rem; }
    .badge-gagne { width: 84px; }
}

.bouton-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s ease;
}
.bouton-theme:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.bouton-theme svg { width: 19px; height: 19px; }

.bouton-theme .icone-lune { display: block; }
.bouton-theme .icone-soleil { display: none; }
:root[data-theme="sombre"] .bouton-theme .icone-lune { display: none; }
:root[data-theme="sombre"] .bouton-theme .icone-soleil { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .bouton-theme .icone-lune { display: none; }
    :root:not([data-theme="clair"]) .bouton-theme .icone-soleil { display: block; }
}

.etape {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.etape:last-child { border-bottom: none; }
.etape--discrete { padding-top: .75rem; }
.etape__titre {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .6rem;
    color: var(--text);
}
.etape__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
}
.etape__plus summary {
    cursor: pointer;
    font-size: .86rem;
    color: var(--muted);
    list-style: none;
}
.etape__plus summary::-webkit-details-marker { display: none; }
.etape__plus summary::before { content: '▸ '; }
.etape__plus[open] summary::before { content: '▾ '; }

.trace-barre {
    position: absolute;
    top: .75rem;
    left: .75rem;
    right: .75rem;
    z-index: 1150;
    background: rgba(11, 61, 85, .94);
    color: #fff;
    border-radius: 14px;
    padding: .8rem 1rem .9rem;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .25);
    text-align: center;
}
.trace-barre__consigne { margin: 0 0 .15rem; font-weight: 600; line-height: 1.3; }
.trace-barre__compteur {
    margin: 0 0 .6rem;
    font-size: .88rem;
    color: #bcdbe8;
    font-variant-numeric: tabular-nums;
    min-height: 1.2em;
}
.trace-barre__actions { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.trace-barre .btn-outline-light:disabled { opacity: .45; }
.btn-clair {
    background: #fff;
    color: var(--titre);
    font-weight: 700;
}
.btn-clair:hover:not(:disabled), .btn-clair:focus:not(:disabled) { background: #e9f4f9; color: var(--titre); }
.btn-clair:disabled { background: rgba(255,255,255,.35); color: rgba(11,61,85,.55); }

@media (min-width: 992px) {
    .trace-barre { left: calc(340px + .75rem); }
}

body.en-trace .map-page .leaflet-top { top: 10.5rem; }
@media (min-width: 992px) {
    body.en-trace .map-page .leaflet-top { top: 8rem; }
}

:root[data-theme="sombre"] .site-navbar,
:root[data-theme="sombre"] .hero { background: var(--marine); }
:root[data-theme="sombre"] .admin-card { background: var(--surface-2); border-color: var(--border); }
:root[data-theme="sombre"] .table { --bs-table-color: var(--text); --bs-table-bg: transparent; }
:root[data-theme="sombre"] .form-control,
:root[data-theme="sombre"] .form-select {
    background-color: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}
:root[data-theme="sombre"] .form-control::placeholder { color: #7f97a4; }
:root[data-theme="sombre"] .modal-content,
:root[data-theme="sombre"] .dropdown-menu { background: var(--surface); color: var(--text); border-color: var(--border); }
:root[data-theme="sombre"] .dropdown-item { color: var(--text); }
:root[data-theme="sombre"] .dropdown-item:hover { background: var(--surface-2); color: var(--text); }
:root[data-theme="sombre"] .bg-light { background: var(--surface-2) !important; color: var(--text); }
:root[data-theme="sombre"] .text-bg-light { background: var(--surface-2) !important; color: var(--text) !important; }

:root[data-theme="sombre"] .defis-onglets .nav-link { color: var(--text); }
:root[data-theme="sombre"] .defis-onglets .nav-link.active { background: var(--blue); color: #fff; }
:root[data-theme="sombre"] .btn-outline-secondary { color: var(--text); border-color: var(--border); }
:root[data-theme="sombre"] .btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); }

:root[data-theme="sombre"] .leaflet-tile-pane { filter: brightness(.82) saturate(.9); }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .site-navbar,
    :root:not([data-theme="clair"]) .hero { background: var(--marine); }
    :root:not([data-theme="clair"]) .admin-card { background: var(--surface-2); border-color: var(--border); }
    :root:not([data-theme="clair"]) .form-control,
    :root:not([data-theme="clair"]) .form-select {
        background-color: var(--surface-2);
        border-color: var(--border);
        color: var(--text);
    }
    :root:not([data-theme="clair"]) .modal-content,
    :root:not([data-theme="clair"]) .dropdown-menu { background: var(--surface); color: var(--text); border-color: var(--border); }
    :root:not([data-theme="clair"]) .dropdown-item { color: var(--text); }
    :root:not([data-theme="clair"]) .bg-light { background: var(--surface-2) !important; color: var(--text); }
    :root:not([data-theme="clair"]) .text-bg-light { background: var(--surface-2) !important; color: var(--text) !important; }
    :root:not([data-theme="clair"]) .leaflet-tile-pane { filter: brightness(.82) saturate(.9); }
    :root:not([data-theme="clair"]) .defis-onglets .nav-link { color: var(--text); }
    :root:not([data-theme="clair"]) .defis-onglets .nav-link.active { background: var(--blue); color: #fff; }
    :root:not([data-theme="clair"]) .btn-outline-secondary { color: var(--text); border-color: var(--border); }
    :root:not([data-theme="clair"]) .btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); }
}

.mur-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 1rem .5rem;
}
.badge-case {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    margin: 0;
    text-align: center;
}
.badge-case.est-verrouille { opacity: .62; }
.badge-case__titre {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}
.badge-case__aide {
    display: block;
    font-size: .68rem;
    color: var(--muted);
    line-height: 1.25;
}

.defis-entete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.defis-entete__chiffres { display: flex; gap: 1.5rem; }
.defis-entete__chiffre {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.1;
    color: var(--text);
}
.defis-entete__chiffre .muted { font-size: 1.1rem; }
.defis-entete__chiffre .small { font-family: var(--font-body); font-size: .72rem; font-weight: 400; }

.choix-icones { display: flex; flex-wrap: wrap; gap: .4rem; }
.choix-icone { cursor: pointer; border-radius: 10px; padding: 3px; border: 2px solid transparent; }
.choix-icone input { position: absolute; opacity: 0; width: 0; height: 0; }
.choix-icone:hover { background: var(--surface-2); }
.choix-icone:has(input:checked) { border-color: var(--blue); background: var(--surface-2); }

.choix-couleurs { display: flex; flex-wrap: wrap; gap: .45rem; }
.choix-couleur { cursor: pointer; border-radius: 50%; padding: 3px; border: 2px solid transparent; line-height: 0; }
.choix-couleur input { position: absolute; opacity: 0; width: 0; height: 0; }
.choix-couleur .pastille { display: block; width: 26px; height: 26px; border-radius: 50%; }
.choix-couleur:has(input:checked) { border-color: var(--text); }

.badge-admin {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 0;
    border-top: 1px solid var(--border);
}
.badge-admin:first-of-type { border-top: none; }
.badge-admin__corps { flex: 1 1 auto; min-width: 0; }
.badge-admin__actions { display: flex; flex-wrap: wrap; gap: .35rem; flex-shrink: 0; }
.bloc-modif { background: var(--surface-2); }

@media (max-width: 575.98px) {
    .badge-admin { flex-wrap: wrap; }
    .badge-admin__actions { width: 100%; }
    .mur-badges { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}

.createur {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    min-height: 520px;
}
.createur__panneau {
    width: 340px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.createur__entete {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.createur__corps { overflow-y: auto; padding: 0 1.25rem; flex: 1 1 auto; }
.createur__bloc { padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.createur__bloc--fin { border-bottom: none; }

.createur__chiffres {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
    text-align: center;
}
.createur__valeur {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.createur__libelle {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.createur__carte { position: relative; flex: 1 1 auto; min-width: 0; }
#cp-map { position: absolute; inset: 0; background: var(--surface-2); }

.createur__consigne {
    position: absolute;
    top: .75rem; left: .75rem; right: .75rem;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(11, 61, 85, .94);
    color: #fff;
    border-radius: 12px;
    padding: .6rem .5rem .6rem 1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
    font-weight: 600;
    line-height: 1.3;
}
.createur__fermer {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 .5rem;
    flex-shrink: 0;
    opacity: .8;
}
.createur__fermer:hover { opacity: 1; }

.waypoint-marker--depart { background: #12805a; }
.waypoint-marker--arrivee { background: var(--accent); }

.liste-parkings { list-style: none; margin: .25rem 0 .5rem; padding: 0; font-size: .85rem; }
.liste-parkings li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; }

.createur__barre { display: none; }

@media (max-width: 991.98px) {
    .createur { display: block; position: relative; height: calc(100dvh - var(--navbar-height)); }
    .createur__panneau { display: none; }
    .createur__carte { position: absolute; inset: 0; }

    .createur__barre {
        display: block;
        position: absolute;
        left: .5rem; right: .5rem;
        bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
        z-index: 1200;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: .5rem .6rem .55rem;
        box-shadow: 0 -4px 18px rgba(11, 61, 85, .18);
    }

    .createur__barre-haut {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        margin-bottom: .5rem;
    }
    .createur__barre-chiffres {
        display: flex;
        gap: .7rem;
        font-size: .82rem;
        color: var(--muted);
        white-space: nowrap;
    }
    .createur__barre-chiffres strong {
        font-size: 1.05rem;
        color: var(--text);
        font-weight: 700;
    }

    .createur__reglages {
        display: inline-flex;
        align-items: center;
        gap: .25rem;
        flex: 0 0 auto;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--text);
        border-radius: 999px;
        padding: .25rem .6rem;
        font-size: .78rem;
        line-height: 1.2;
    }
    .createur__chevron {
        display: inline-block;
        font-size: .7rem;
        transition: transform .15s ease;
    }
    .createur__reglages[aria-expanded="false"] .createur__chevron {
        transform: rotate(180deg);
    }

    .createur__barre-reglages {
        margin-bottom: .5rem;
    }
    .createur__barre-reglages label {
        display: block;
        font-size: .75rem;
        color: var(--muted);
        margin-bottom: 0;
    }
    .createur__barre-reglages strong { color: var(--text); }
    .createur__barre-reglages .form-range { margin: 0; }
    .createur__barre-actions { display: flex; gap: .4rem; }
    .createur__barre-actions .btn {
        min-height: 40px;
        font-size: .875rem;
        padding-inline: .5rem;
    }

    .createur__carte .leaflet-top { top: 4.2rem; }
    .createur__carte .leaflet-bottom { bottom: 8.5rem; }

    body:has(.sortie-bandeau) .createur__barre {
        bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    }
    body:has(.sortie-bandeau) .createur__carte .leaflet-bottom { bottom: 12rem; }
}

.parcours-ouvert {
    position: absolute;
    left: .75rem; right: .75rem; bottom: .75rem;
    z-index: 1150;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: .85rem 1rem;
    box-shadow: 0 -4px 20px rgba(11, 61, 85, .18);
}
.parcours-ouvert__infos { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.parcours-ouvert .btn { flex-shrink: 0; min-height: 46px; }

@media (min-width: 992px) {
    .parcours-ouvert { left: calc(340px + .75rem); max-width: 520px; }
}
@media (max-width: 991.98px) {
    .parcours-ouvert {
        bottom: calc(4.4rem + env(safe-area-inset-bottom, 0px));
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
        text-align: center;
    }
    .parcours-ouvert .btn { width: 100%; }
}

.defi-ligne__badge { flex-shrink: 0; line-height: 0; }
.defi-mini__emoji { line-height: 0; flex-shrink: 0; }

.badge-case { position: relative; cursor: help; }
.badge-case:focus { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.notif-emoji { font-size: 1.15rem; line-height: 1.3; flex-shrink: 0; }

.captcha {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.captcha__image {
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
    max-width: 100%;
    height: auto;
    
    background: #fff;
}
.captcha__recharger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    padding: 0;
    transition: color .15s ease, border-color .15s ease;
}
.captcha__recharger:hover { color: var(--blue); border-color: var(--blue); }
.captcha__recharger svg { width: 18px; height: 18px; }
.captcha__champ {
    letter-spacing: .18em;
    font-weight: 600;
    text-transform: uppercase;
    max-width: 260px;
}
.captcha__champ::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }

.grade-badge__image { vertical-align: -3px; border-radius: 3px; }

.vue-parcours__carte {
    height: min(70vh, 620px);
    min-height: 340px;
    width: 100%;
}

.vue-parcours__outils {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .7rem .9rem;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.vue-parcours__entete {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.vue-parcours__identite {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.vue-parcours__chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}
.vue-parcours__chiffre {
    text-align: center;
    padding: .85rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.vue-parcours__valeur {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--titre);
    font-variant-numeric: tabular-nums;
}
.vue-parcours__libelle {
    display: block;
    margin-top: .15rem;
    font-size: .75rem;
    color: var(--muted);
}

.vue-parcours__panneau { position: sticky; top: 84px; }

.vue-parcours__faits { list-style: none; margin: 0; padding: 0; }
.vue-parcours__faits li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    padding: .4rem 0;
    border-bottom: 1px dashed var(--border);
}
.vue-parcours__faits li:last-child { border-bottom: 0; }
.vue-parcours__fait-cle { font-size: .82rem; color: var(--muted); }
.vue-parcours__fait-val { font-weight: 600; color: var(--titre); text-align: right; }

@media (max-width: 991.98px) {
    .vue-parcours__carte { height: 55vh; }
    .vue-parcours__panneau { position: static; }
}

.bande-contribuer {
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.bande-contribuer p { color: var(--muted); }
.bande-contribuer p strong { color: var(--text); }

.btn-copier {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1;
    padding: .2rem .4rem;
    margin-left: .4rem;
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.btn-copier:hover { color: var(--blue); border-color: var(--blue); }
.btn-copier.est-copie {
    color: #fff;
    background: var(--green, #198754);
    border-color: var(--green, #198754);
}
.copiable__texte { vertical-align: middle; }

.autocomplete { position: relative; flex: 1 1 auto; }
.autocomplete__liste {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    margin: 0;
    padding: .25rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    max-height: 280px;
    overflow-y: auto;
}
.autocomplete__item {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .4rem .55rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: .875rem;
}
.autocomplete__item.est-actif { background: var(--surface-2, rgba(13, 110, 253, .08)); }
.autocomplete__label { font-weight: 600; color: var(--text); }
.autocomplete__detail {
    color: var(--muted);
    font-size: .78rem;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
}
.autocomplete__source { color: var(--blue); font-size: .6rem; }

.autocomplete--groupe { position: relative; }

.cadreur-bloc { text-align: center; }
.cadreur {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--border);
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.cadreur:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cadreur.est-attrape { cursor: grabbing; }
.cadreur__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}
.cadreur--rond {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border-width: 2px;
}
.cadreur--banniere {
    width: 100%;
    
    height: 170px;
    border-radius: 10px;
}
.cadreur__consigne {
    position: absolute;
    left: 50%;
    bottom: .5rem;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .72rem;
    padding: .15rem .5rem;
    border-radius: 20px;
    pointer-events: none;
    opacity: .9;
}

.cadreur--vide { cursor: default; }
.cadreur--vide .cadreur__image {
    background-image: linear-gradient(140deg, var(--blue-deep), var(--blue) 60%, var(--blue-light));
}
.cadreur--vide .cadreur__consigne::after { content: ' (choisis d’abord une image)'; }

.choix-bloc { display: flex; flex-direction: column; height: 100%; }
.choix-bloc > .carte-choix { flex: 1 1 auto; }

.carte-choix {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 1px 2px var(--ombre);
    text-decoration: none;
    color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.carte-choix:hover,
.carte-choix:focus-visible {
    transform: translateY(-2px);
    border-color: var(--blue);
    box-shadow: 0 10px 26px rgba(11, 61, 85, .12);
    color: var(--text);
}
.carte-choix:active { transform: none; }

.carte-choix__icone {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 1.7rem;
    line-height: 1;
}
.carte-choix__icone--lieu     { background: rgba(255, 107, 69, .14); }
.carte-choix__icone--parcours { background: rgba(15, 111, 168, .14); }

.carte-choix__corps { flex: 1 1 auto; min-width: 0; }
.carte-choix__titre {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: .3rem;
}
.carte-choix__texte {
    display: block;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.45;
}
.carte-choix__pied {
    display: block;
    margin-top: .6rem;
    font-size: .82rem;
    color: var(--blue);
    font-weight: 600;
}
.carte-choix__lien { text-decoration: underline; }

.carte-choix__fleche {
    flex-shrink: 0;
    align-self: center;
    color: var(--muted);
    opacity: .6;
}
.carte-choix__fleche svg { width: 20px; height: 20px; display: block; }

.puce-choix {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}
.puce-choix:hover, .puce-choix:focus-visible { border-color: var(--blue); color: var(--blue); }

.ecran-creer .rail { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; }

.liste-app__ligne.est-non-lue { background: rgba(15, 111, 168, .06); }
.liste-app__ligne.est-non-lue .liste-app__lien { border-left: 3px solid var(--blue); }
.liste-app__ligne.est-non-lue .liste-app__titre { font-weight: 700; }

.notif-texte { white-space: normal !important; overflow: visible !important; }

.ou-google { margin-bottom: 1.25rem; }

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    min-height: 48px;
    padding: .6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: .98rem;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.btn-google:hover,
.btn-google:focus-visible {
    border-color: var(--blue);
    box-shadow: 0 2px 10px rgba(11, 61, 85, .1);
    color: var(--text);
}
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

.ou-google__separateur {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.1rem;
    color: var(--muted);
    font-size: .82rem;
}
.ou-google__separateur::before,
.ou-google__separateur::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--border);
}

.leaflet-popup-content .btn-primary,
.leaflet-popup-content .btn-primary:hover,
.leaflet-popup-content .btn-primary:focus,
.spot-popup .btn-primary,
.btn-primary, .btn-success, .btn-danger, .btn-terminer,
.btn-cta {
    color: #fff !important;
}
.btn-outline-primary { color: var(--blue) !important; }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #fff !important; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #fff;
    color: #1c2b33;
}
.leaflet-popup-content h3,
.leaflet-popup-content .spot-popup h3 { color: #0b203c; }
.leaflet-popup-content .muted { color: #5c7382 !important; }
.leaflet-popup-content a:not(.btn) { color: #0f6fa8; }

.leaflet-tooltip { color: #1c2b33; }

.site-navbar {
    background: linear-gradient(100deg, var(--marine) 0%, var(--marine-2) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 2px 18px rgba(11, 32, 60, .18);
}
.marque {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding-block: .1rem;
}
.marque__signe {
    height: 28px;
    width: auto;
    
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.marque__mot {
    font-family: var(--font-heading);
    font-weight: 800;
    font-style: italic;
    font-size: 1.32rem;
    letter-spacing: -.02em;
    line-height: 1;
    white-space: nowrap;
}
.marque__ride { color: #fff; }
.marque__paddle { color: var(--ride); }

.site-navbar .nav-link {
    color: #d7e7f5;
    border-radius: 999px;
    padding-inline: .85rem;
}
.site-navbar .nav-item .nav-link:not(.nav-admin-link)::after {
    background: var(--ride);
    left: .85rem; right: .85rem;
    height: 2.5px;
    border-radius: 2px;
}
.nav-admin-link {
    background: rgba(27, 157, 240, .18);
    border-color: rgba(27, 157, 240, .5);
}

.menu-compte__xp { padding: .35rem 1rem .5rem; min-width: 250px; }
.dropdown-item--premium { color: var(--ride-encre); font-weight: 600; }

.fanion-premium {
    display: inline-grid;
    place-items: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(140deg, #f7c948, #d99b1c);
    color: #4a3405;
    font-size: .7rem;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.hero {
    background:
        radial-gradient(120% 90% at 82% 8%, rgba(27, 157, 240, .55) 0%, rgba(27, 157, 240, 0) 62%),
        linear-gradient(160deg, var(--marine) 0%, #123c66 55%, #0f5b96 100%);
}
.hero__eyebrow {
    background: rgba(27, 157, 240, .22);
    border-color: rgba(111, 211, 230, .5);
    color: #cdeeff;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.hero__signature {
    display: block;
    margin: 0 0 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    color: #fff;
}

.hero__wave {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath fill='%23f4f7fa' d='M0,40 C240,90 480,0 720,20 C960,40 1200,90 1440,40 L1440,70 L0,70 Z'%3E%3C/path%3E%3C/svg%3E");
}
:root[data-theme="sombre"] .hero__wave {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath fill='%230d1720' d='M0,40 C240,90 480,0 720,20 C960,40 1200,90 1440,40 L1440,70 L0,70 Z'%3E%3C/path%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .hero__wave {
        background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath fill='%230d1720' d='M0,40 C240,90 480,0 720,20 C960,40 1200,90 1440,40 L1440,70 L0,70 Z'%3E%3C/path%3E%3C/svg%3E");
    }
}

.btn-cta {
    background: linear-gradient(135deg, var(--ride) 0%, #0f76c4 100%);
    border: none;
    box-shadow: 0 8px 20px rgba(15, 118, 196, .38);
}
.btn-cta:hover, .btn-cta:focus {
    background: linear-gradient(135deg, #35abf5 0%, #1483d4 100%);
    box-shadow: 0 10px 26px rgba(15, 118, 196, .46);
}

.page-card, .admin-card, .carte-choix {
    border-radius: var(--radius);
    box-shadow: 0 10px 28px var(--ombre);
}

.page-card { position: relative; overflow: hidden; }
.page-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--marine), var(--ride) 55%, var(--ecume));
    opacity: .9;
}

.titre-double { color: var(--titre); }
.titre-double em { font-style: normal; color: var(--ride-encre); }

.xp-barre { min-width: 190px; }
.xp-barre__entete {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: .3rem;
}
.xp-barre__niveau {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--titre);
    font-size: .95rem;
}
.xp-barre__total { font-size: .78rem; color: var(--muted); }
.xp-barre__piste {
    height: 9px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}
.xp-barre__remplissage {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ride-encre), var(--ride) 60%, var(--ecume));
    transition: width .5s ease;
}
.xp-barre__legende {
    margin: .3rem 0 0;
    font-size: .74rem;
    color: var(--muted);
}
.xp-barre--compacte .xp-barre__niveau { font-size: .85rem; }
.xp-barre--compacte .xp-barre__piste { height: 7px; }

.progressions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem 1.6rem;
    max-width: 640px;
}
.xp-barre--grade .xp-barre__remplissage {
    background: linear-gradient(90deg, var(--marine), var(--ecume));
}

.xp-pastille {
    display: inline-grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--ride), var(--ride-encre));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .78rem;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 118, 196, .35);
    flex: 0 0 auto;
}
.xp-pastille--sm { width: 20px; height: 20px; font-size: .66rem; }

.xp-recompense {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    padding: .75rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.xp-recompense--verrouillee { opacity: .62; }
.xp-recompense__palier {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--titre);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .8rem;
    line-height: 1.1;
    text-align: center;
}
.xp-recompense--ouverte .xp-recompense__palier {
    background: linear-gradient(140deg, var(--ride), var(--ride-encre));
    color: #fff;
}
.xp-recompense__titre { font-weight: 600; color: var(--titre); }
.xp-recompense__texte { font-size: .85rem; color: var(--muted); margin: .15rem 0 0; }

.deco {
    position: relative;
    display: inline-block;
    width: var(--deco-taille);
    height: var(--deco-taille);
    flex: 0 0 auto;
    vertical-align: middle;
}

.deco__photo {
    position: absolute;
    left: var(--deco-x, 50%);
    top: var(--deco-y, 50%);
    width: var(--deco-l, 60%);
    height: var(--deco-h, 60%);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
}

.deco__photo > * {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
}

.deco .avatar { border: none; box-shadow: none; }
.deco__cadre {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}

@keyframes cadreRotation { to { transform: rotate(360deg); } }

@keyframes cadreBalance {
    0%, 100% { transform: rotate(-3.5deg); }
    50%      { transform: rotate(3.5deg); }
}
@keyframes cadreHalo {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(111, 211, 230, .5)); }
    50%      { filter: drop-shadow(0 0 9px rgba(111, 211, 230, .95)); }
}
@keyframes cadreScintille {
    0%, 88%, 100% { filter: brightness(1); }
    93%           { filter: brightness(1.5); }
}
.deco--rotation  .deco__cadre { animation: cadreRotation 18s linear infinite; }
.deco--balance   .deco__cadre { animation: cadreBalance 4.2s ease-in-out infinite; }
.deco--halo      .deco__cadre { animation: cadreHalo 2.8s ease-in-out infinite; }
.deco--scintille .deco__cadre { animation: cadreScintille 4.5s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    .deco__cadre { animation: none !important; }
}

.badge-icone {
    position: relative;
    display: inline-block;
    width: var(--badge-taille);
    height: var(--badge-taille);
    flex: 0 0 auto;
    vertical-align: middle;
}

.badge-icone__disque {
    position: absolute;
    left: var(--badge-x, 50%);
    top: var(--badge-y, 50%);
    width: var(--badge-l, 60%);
    height: var(--badge-h, 60%);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%,
                color-mix(in srgb, var(--badge-couleur) 78%, white),
                var(--badge-couleur) 72%);
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .18);
}
.badge-icone__motif { width: 58%; height: 58%; }
.badge-icone__image {
    width: 72%;
    height: 72%;
    object-fit: contain;
}
.badge-icone__cadre {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
}
.badge-icone--verrouille { opacity: .38; filter: grayscale(.85); }
.badge-icone--anime .badge-icone__cadre { animation: cadreRotation 22s linear infinite; }

@supports not (background: color-mix(in srgb, red 50%, white)) {
    .badge-icone__disque { background: var(--badge-couleur); }
}

.premium-entete {
    background:
        radial-gradient(110% 90% at 85% 10%, rgba(247, 201, 72, .3) 0%, rgba(247, 201, 72, 0) 60%),
        linear-gradient(155deg, var(--marine) 0%, #123c66 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
}
.premium-entete h1 { color: #fff; }
.premium-entete__signature { color: var(--ecume); font-style: italic; font-weight: 600; }

.premium-avantage {
    display: flex;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    height: 100%;
}
.premium-avantage__icone {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--ride-encre);
}
.premium-avantage__titre { font-weight: 600; color: var(--titre); margin: 0; }
.premium-avantage__texte { font-size: .87rem; color: var(--muted); margin: .2rem 0 0; }

.premium-formule {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 1.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.premium-formule--vedette {
    border-color: var(--ride);
    box-shadow: 0 12px 30px rgba(15, 118, 196, .18);
}
.premium-formule__prix {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--titre);
    line-height: 1;
}
.premium-formule__unite { font-size: .9rem; color: var(--muted); font-weight: 500; }
.premium-formule__note { font-size: .8rem; color: var(--muted); }

.admin-grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}
.admin-tuile {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.admin-tuile:hover {
    transform: translateY(-2px);
    border-color: var(--ride);
    box-shadow: 0 12px 26px var(--ombre);
    color: inherit;
}
.admin-tuile__titre {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--titre);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.admin-tuile__texte { font-size: .85rem; color: var(--muted); margin: 0; }
.admin-tuile__compteur {
    margin-left: auto;
    background: var(--surface-2);
    color: var(--titre);
    border-radius: 999px;
    padding: .05rem .5rem;
    font-size: .78rem;
    font-weight: 700;
}
.admin-tuile__compteur--alerte { background: var(--red); color: #fff; }

.admin-chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .8rem;
}
.admin-chiffre {
    padding: .9rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.admin-chiffre__valeur {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--titre);
    line-height: 1.1;
}
.admin-chiffre__libelle { font-size: .76rem; color: var(--muted); }

.reglage-ligne {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
}
.reglage-ligne:last-child { border-bottom: none; }
.reglage-ligne__texte { flex: 1 1 auto; min-width: 0; }
.reglage-ligne__titre { font-weight: 600; color: var(--titre); }
.reglage-ligne__aide { font-size: .82rem; color: var(--muted); margin: .1rem 0 0; }
.reglage-ligne__champ { flex: 0 0 auto; width: min(260px, 45%); }

.etat-pastille {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
}
.etat-pastille--on { background: rgba(46, 139, 87, .14); color: #1f6b40; }
.etat-pastille--off { background: rgba(91, 115, 134, .16); color: var(--muted); }
.etat-pastille--premium {
    background: linear-gradient(120deg, #f0c14b, #e0a020);
    color: #3a2600;
    text-transform: none;
}

:root[data-theme="sombre"] .etat-pastille--premium,
:root[data-theme="sombre"] .badge-premium { color: #3a2600; }
:root[data-theme="sombre"] .etat-pastille--on { background: rgba(46, 139, 87, .22); color: #7ed6a4; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .etat-pastille--on { background: rgba(46, 139, 87, .22); color: #7ed6a4; }
}
.hero__map { flex-direction: column; }
.hero-map__svg { max-width: 320px; opacity: .95; }
.hero-pin__dot { fill: #fff; stroke: var(--marine); }
.hero-pin__pulse { fill: #fff; }

.admin-nav {
    margin: .5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
}
.admin-nav__piste {
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 2px;
}
.admin-nav__lien {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .85rem;
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: .92rem;
    white-space: nowrap;
    border-bottom: 2.5px solid transparent;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.admin-nav__lien:hover { color: var(--titre); background: var(--surface-2); }
.admin-nav__lien.est-actif {
    color: var(--ride-encre);
    border-bottom-color: var(--ride);
    font-weight: 600;
}
.badge-case { position: relative; }
.badge-case__paliers {
    position: absolute;
    top: 4px; right: 6px;
    background: var(--marine);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: .05rem .38rem;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.aura {
    position: relative;
    display: inline-grid;
    place-items: center;
    
    isolation: isolate;
}
.aura > .aura__grain {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1em;
    height: 1em;
    margin: -.5em 0 0 -.5em;
    
    font-size: var(--aura-grain, 16px);
    --rayon: var(--aura-rayon, 34px);
    line-height: 1;
    pointer-events: none;
    --tour: 9s;
    animation: aura-orbite var(--tour) linear infinite;
    animation-delay: calc(var(--tour) * -1 * var(--i) / var(--n));
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}
@keyframes aura-orbite {
    from { transform: rotate(0turn) translateX(var(--rayon)) rotate(0turn); }
    to   { transform: rotate(1turn) translateX(var(--rayon)) rotate(-1turn); }
}

.aura--flammes > .aura__grain { --tour: 7s; }
.aura--eau     > .aura__grain { --tour: 11s; }
.aura--vent    > .aura__grain { --tour: 5s; }
.aura--vagues  > .aura__grain { --tour: 13s; }
.aura--orage   > .aura__grain { --tour: 6s; }

.aura--etoiles > .aura__grain {
    --tour: 10s;
    animation: aura-orbite var(--tour) linear infinite,
               aura-scintille 1.7s ease-in-out infinite;
    animation-delay: calc(var(--tour) * -1 * var(--i) / var(--n)),
                     calc(-1.7s * var(--i) / var(--n));
}
@keyframes aura-scintille {
    0%, 100% { opacity: .45; }
    50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .aura > .aura__grain {
        animation: none;
        transform: rotate(calc(1turn * var(--i) / var(--n)))
                   translateX(var(--rayon))
                   rotate(calc(-1turn * var(--i) / var(--n)));
    }
}

.choix-auras {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: .75rem;
}
.choix-aura {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: .8rem .5rem .6rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    text-align: center;
}
.choix-aura input { position: absolute; opacity: 0; pointer-events: none; }
.choix-aura:has(input:checked) {
    border-color: var(--ride);
    box-shadow: 0 6px 18px rgba(15, 118, 196, .18);
}
.choix-aura.est-verrouille { opacity: .5; cursor: not-allowed; }
.choix-aura__apercu { display: grid; place-items: center; min-height: 86px; }
.choix-aura__nom { font-size: .8rem; color: var(--titre); font-weight: 500; }

.choix-decos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: .75rem;
}
.choix-deco {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: .8rem .5rem .6rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    text-align: center;
}
.choix-deco input { position: absolute; opacity: 0; pointer-events: none; }
.choix-deco:has(input:checked) {
    border-color: var(--ride);
    box-shadow: 0 6px 18px rgba(15, 118, 196, .18);
}
.choix-deco.est-verrouille { opacity: .5; cursor: not-allowed; }
.choix-deco__apercu { display: grid; place-items: center; min-height: 124px; }
.choix-deco__nom { font-size: .8rem; color: var(--titre); font-weight: 500; }
.choix-deco__verrou {
    font-size: .68rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-2);
    border-radius: 999px;
    padding: .05rem .45rem;
}
.site-footer__logo { height: 54px; width: auto; }
:root[data-theme="sombre"] .site-footer__logo { filter: brightness(0) invert(1) opacity(.9); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .site-footer__logo { filter: brightness(0) invert(1) opacity(.9); }
}

.liste-app {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.liste-app__ligne { border-bottom: 1px solid var(--border); }
.liste-app__ligne:last-child { border-bottom: none; }

.liste-app__lien {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 54px;
    padding: .7rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}
.liste-app__lien:active { background: var(--surface-2); }
.liste-app__lien.est-danger { color: var(--red); }

.liste-app__icone {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}
.liste-app__texte { flex: 1 1 auto; min-width: 0; }
.liste-app__titre {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.liste-app__aide {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    font-weight: 400;
}
.liste-app__fin {
    flex-shrink: 0;
    color: var(--muted);
    font-size: .82rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.liste-app__chevron { width: 18px; height: 18px; opacity: .55; }

.xp-recompense__cadre { flex: 0 0 auto; width: 52px; height: 52px; }
.xp-recompense--verrouillee .xp-recompense__cadre { filter: grayscale(1); opacity: .55; }

.reglage-cadres {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}
.cadre-reglage {
    padding: 1rem .9rem .8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.cadre-reglage__scene {
    display: grid;
    place-items: center;
    min-height: 160px;
    
    background-image:
        linear-gradient(45deg, var(--surface-2) 25%, transparent 25%),
        linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--surface-2) 75%),
        linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
    background-size: 14px 14px;
    background-position: 0 0, 0 7px, 7px -7px, -7px 0;
    border-radius: 10px;
    margin-bottom: .6rem;
}
.cadre-reglage__nom {
    font-size: .8rem;
    font-weight: 600;
    color: var(--titre);
    margin: 0 0 .5rem;
    word-break: break-all;
}
.cadre-reglage__ligne {
    display: grid;
    grid-template-columns: 5.2rem 1fr 2.4rem;
    align-items: center;
    gap: .4rem;
    margin-bottom: .15rem;
}
.cadre-reglage__libelle { font-size: .74rem; color: var(--muted); }
.cadre-reglage__valeur {
    font-size: .74rem;
    color: var(--titre);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.cadre-reglage .form-range { margin: 0; }

.cadre-reglage__actions { font-size: .74rem; }
.cadre-reglage__actions .btn { font-size: inherit; text-align: left; }

#form-cadres { padding-bottom: 3.5rem; }

.reglages__separateur {
    margin: 2.2rem 0 1.4rem;
    border: 0;
    border-top: 2px solid var(--border);
    opacity: 1;
}

.push-etat { font-size: .85rem; color: var(--muted); margin: 0; }
.push-etat--ok { color: #1f6b40; }
.push-etat--ko { color: #a4342c; }
:root[data-theme="sombre"] .push-etat--ok { color: #7ed6a4; }
:root[data-theme="sombre"] .push-etat--ko { color: #ff9c93; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .push-etat--ok { color: #7ed6a4; }
    :root:not([data-theme="clair"]) .push-etat--ko { color: #ff9c93; }
}

.bienvenue-push {
    border-left: 4px solid var(--ride);
}
.bienvenue-push__icone { font-size: 1.7rem; line-height: 1; }

.liste-appareils { list-style: none; margin: 0; padding: 0; }
.liste-appareils li {
    padding: .5rem 0;
    border-bottom: 1px dashed var(--border);
}
.liste-appareils li:last-child { border-bottom: 0; }
.liste-appareils__nom { font-weight: 600; color: var(--titre); display: block; }

.liste-diagnostic { list-style: none; margin: 0; padding: 0; }
.liste-diagnostic li {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .45rem 0;
}
.liste-diagnostic__marque {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    display: grid; place-items: center;
    border-radius: 50%;
    font-size: .8rem; font-weight: 700;
}
.liste-diagnostic .est-ok > .liste-diagnostic__marque,
.liste-diagnostic li.est-ok .liste-diagnostic__marque {
    background: rgba(46, 139, 87, .16); color: #1f6b40;
}
.liste-diagnostic li.est-ko .liste-diagnostic__marque {
    background: rgba(190, 60, 48, .14); color: #a4342c;
}

.bloc-cles {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .8rem 1rem;
    font-size: .82rem;
    overflow-x: auto;
    user-select: all;
}

.encart-ios {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .9rem 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--ride);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 1rem;
}
.encart-ios__icone { font-size: 1.4rem; line-height: 1; }

.page-installer__icone {
    border-radius: 22%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.etapes-installer {
    counter-reset: etape;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.etapes-installer li {
    counter-increment: etape;
    position: relative;
    padding: .1rem 0 .1rem 2.2rem;
    margin-bottom: .7rem;
    line-height: 1.5;
}
.etapes-installer li::before {
    content: counter(etape);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--ride);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.encart-ios p { margin: 0; font-size: .85rem; }
.encart-ios__fermer {
    background: none; border: 0; color: var(--muted);
    font-size: 1.1rem; line-height: 1; padding: 0 .2rem; cursor: pointer;
}

.ligne-suspendue > td { background: rgba(190, 60, 48, .05); }
.pastille-admin, .pastille-moderateur, .table .badge.text-bg-info { font-size: .7rem; }

.badge-premium {
    background: linear-gradient(120deg, #f0c14b, #e0a020);
    color: #3a2600;
}

.grille-cases {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .1rem 1.4rem;
}

.barre-enregistrer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: .8rem 0 1rem;
    background: linear-gradient(to bottom, transparent, var(--fond) 35%);
}

.carte-contribuer {
    padding: 1.5rem;
    border-radius: 18px;
    background: linear-gradient(150deg, var(--marine), var(--ride-encre));
    color: #fff;
    box-shadow: 0 14px 34px rgba(11, 32, 60, .22);
}
.carte-contribuer__titre {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.1rem;
    color: #fff;
}
.etapes-contribuer {
    list-style: none;
    margin: 0 0 1.3rem;
    padding: 0;
    display: grid;
    gap: .9rem;
}
.etapes-contribuer li {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    font-size: .88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .82);
}
.etapes-contribuer strong { color: #fff; font-weight: 600; }
.etapes-contribuer__num {
    flex: 0 0 auto;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .82rem;
    color: #fff;
}
.carte-contribuer .btn-cta { margin-bottom: .7rem; }
.carte-contribuer__lien {
    display: block;
    text-align: center;
    font-size: .82rem;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}
.carte-contribuer__lien:hover { color: #fff; text-decoration: underline; }

.profil-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}
.profil-actions__forme { display: flex; align-items: center; gap: .4rem; margin: 0; }

.profil-action {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--titre);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.profil-action:hover {
    background: var(--surface-2);
    border-color: var(--ride);
    color: var(--titre);
    transform: translateY(-1px);
}
.profil-action svg { width: 16px; height: 16px; flex: 0 0 auto; }

.profil-action--primaire {
    background: var(--ride);
    border-color: var(--ride);
    color: #fff;
}
.profil-action--primaire:hover { background: var(--ride-encre); border-color: var(--ride-encre); color: #fff; }

.profil-action--etat {
    background: transparent;
    border-style: dashed;
    color: var(--muted);
    cursor: default;
}
.profil-action--etat:hover { background: transparent; border-color: var(--border); transform: none; }

.profil-action--discret { padding: .42rem .55rem; color: var(--muted); }
.profil-action--discret svg { width: 18px; height: 18px; }

:root[data-theme="sombre"] .alert-secondary,
:root[data-theme="sombre"] .alert-light {
    background-color: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}
:root[data-theme="sombre"] .alert-info {
    background-color: rgba(63, 176, 245, .12);
    border-color: rgba(63, 176, 245, .3);
    color: #b9e2fb;
}
:root[data-theme="sombre"] .alert-warning {
    background-color: rgba(242, 165, 22, .12);
    border-color: rgba(242, 165, 22, .32);
    color: #f3cd8a;
}
:root[data-theme="sombre"] .alert-danger {
    background-color: var(--alerte-fond);
    border-color: rgba(190, 60, 48, .35);
    color: var(--alerte-texte);
}
:root[data-theme="sombre"] .alert-success {
    background-color: var(--reussi-fond);
    border-color: var(--reussi-bord);
    color: var(--reussi-texte);
}
:root[data-theme="sombre"] .alert code {
    background: rgba(255, 255, 255, .08);
    color: inherit;
}

:root[data-theme="sombre"] .alert .alert-link,
:root[data-theme="sombre"] .alert a:not(.btn) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}
:root[data-theme="sombre"] .alert .alert-link:hover,
:root[data-theme="sombre"] .alert a:not(.btn):hover {
    opacity: .82;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .alert-secondary,
    :root:not([data-theme="clair"]) .alert-light {
        background-color: var(--surface-2);
        border-color: var(--border);
        color: var(--text);
    }
    :root:not([data-theme="clair"]) .alert-info {
        background-color: rgba(63, 176, 245, .12);
        border-color: rgba(63, 176, 245, .3);
        color: #b9e2fb;
    }
    :root:not([data-theme="clair"]) .alert-warning {
        background-color: rgba(242, 165, 22, .12);
        border-color: rgba(242, 165, 22, .32);
        color: #f3cd8a;
    }
    :root:not([data-theme="clair"]) .alert-danger {
        background-color: var(--alerte-fond);
        border-color: rgba(190, 60, 48, .35);
        color: var(--alerte-texte);
    }
    :root:not([data-theme="clair"]) .alert-success {
        background-color: var(--reussi-fond);
        border-color: var(--reussi-bord);
        color: var(--reussi-texte);
    }
    :root:not([data-theme="clair"]) .alert code {
        background: rgba(255, 255, 255, .08);
        color: inherit;
    }

    :root:not([data-theme="clair"]) .alert .alert-link,
    :root:not([data-theme="clair"]) .alert a:not(.btn) {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}
    :root:not([data-theme="clair"]) .alert .alert-link:hover,
    :root:not([data-theme="clair"]) .alert a:not(.btn):hover {
    opacity: .82;
}
}

:root[data-theme="sombre"] .text-bg-light,
:root[data-theme="sombre"] .badge.bg-light {
    background-color: var(--surface-2) !important;
    color: var(--text) !important;
}

.pastille-role {
    display: inline-grid;
    place-items: center;
    vertical-align: -.15em;
    margin-left: .3rem;
    width: 1.25em;
    height: 1.25em;
    flex: 0 0 auto;
}
.pastille-role svg { width: 100%; height: 100%; display: block; }

.pastille-role--admin { color: #d99a12; }
.pastille-role--modo  { color: var(--ride-encre); }

.pastille-role--confiance { color: var(--green); }
:root[data-theme="sombre"] .pastille-role--admin { color: #f0c14b; }
:root[data-theme="sombre"] .pastille-role--confiance { color: #6fce9b; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .pastille-role--admin { color: #f0c14b; }
    :root:not([data-theme="clair"]) .pastille-role--confiance { color: #6fce9b; }
}

.photos-lieu {
    display: grid;
    gap: .5rem;
    border-radius: 14px;
    overflow: hidden;
}
.photos-lieu--2 { grid-template-columns: 1fr 1fr; }
.photos-lieu--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.photos-lieu--3 .photos-lieu__item:first-child { grid-row: 1 / 3; }

.photos-lieu__item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface-2);
}
.photos-lieu__item img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 150px;
    max-height: 340px;
    object-fit: cover;
    transition: transform .3s ease;
}
.photos-lieu__item:hover img { transform: scale(1.03); }
.photos-lieu--1 .photos-lieu__item img { max-height: 380px; }
.photos-lieu--3 .photos-lieu__item:not(:first-child) img { min-height: 100px; max-height: 165px; }

.photos-lieu__retirer { position: absolute; top: .4rem; right: .4rem; margin: 0; }
.photos-lieu__retirer button {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.photos-lieu__retirer button:hover { background: rgba(190, 60, 48, .9); }

@media (max-width: 575.98px) {
    .photos-lieu--3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
    .photos-lieu--3 .photos-lieu__item:first-child { grid-row: auto; grid-column: 1 / 3; }
}

.signature-fiche { margin-bottom: 1rem; }
.signature-fiche strong { font-weight: 600; color: var(--text); }
.leaflet-popup-content .signature-fiche strong { color: #1c2b33; }

.notif-pastille { color: #4a1c08; font-weight: 700; }

:root[data-theme="sombre"] .reglages__lien.est-actif,
:root[data-theme="sombre"] .defis-onglets .nav-link.active,
:root[data-theme="sombre"] .profil-action--primaire,
:root[data-theme="sombre"] .profil-action--primaire:hover {
    color: #0b203c;
    font-weight: 600;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .reglages__lien.est-actif,
    :root:not([data-theme="clair"]) .defis-onglets .nav-link.active,
    :root:not([data-theme="clair"]) .profil-action--primaire,
    :root:not([data-theme="clair"]) .profil-action--primaire:hover {
        color: #0b203c;
        font-weight: 600;
    }
}

.table-fiche + .badge, .page-card .badge {
    white-space: normal;
    text-align: left;
    max-width: 100%;
}

.carte-parcours__apercu { overflow: hidden; }

.apercu-carte {
    position: absolute;
    inset: 0;
    z-index: 0;
    
    pointer-events: none;
    background: var(--surface-2);
}
.apercu-carte .leaflet-container { background: var(--surface-2); }

.carte-parcours__apercu .apercu-parcours {
    position: relative;
    z-index: 1;
    transition: opacity .25s ease;
}

.carte-parcours__apercu.a-sa-carte .apercu-parcours { opacity: 0; }

.carte-parcours__compteur { z-index: 2; }

.preuves-signalement {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.preuves-signalement a {
    display: block;
    width: 92px;
    height: 92px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.preuves-signalement img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preuves-signalement a:hover { border-color: var(--ride); }

.actions-signalement {
    border-top: 1px solid var(--border);
    padding-top: .9rem;
}

.rappel-email {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem .9rem;
    padding: .55rem .9rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    background: var(--surface-2);
    font-size: .93rem;
}
.rappel-email__icone {
    flex: none;
    display: inline-flex;
    color: var(--accent);
}
.rappel-email__icone svg { width: 1.25rem; height: 1.25rem; display: block; }
.rappel-email__texte { flex: 1 1 15rem; color: var(--titre); }
.rappel-email__action { margin: 0; flex: none; }
.rappel-email__bouton {
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 999px;
    padding: .2rem .8rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.rappel-email__bouton:hover,
.rappel-email__bouton:focus-visible {
    background: var(--accent);
    color: #fff;
}

.fenetre-email__adresse {
    font-weight: 600;
    word-break: break-all;
}

.fenetre-photo {
    position: fixed; inset: 0; z-index: 2000;
    display: none;
    align-items: center; justify-content: center;
    padding: 1.5rem;
    background: rgba(6, 16, 30, .92);
}
.fenetre-photo--ouverte { display: flex; }
.fenetre-photo__cadre { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.fenetre-photo__image {
    max-width: 100%; max-height: 82vh;
    border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.fenetre-photo__legende { margin-top: .8rem; color: #cfe0f2; font-size: .92rem; }
.fenetre-photo__fermer {
    position: absolute; top: .8rem; right: 1rem;
    width: 44px; height: 44px;
    border: none; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff;
    font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.fenetre-photo__fermer:hover, .fenetre-photo__fermer:focus-visible {
    background: rgba(255,255,255,.24);
}
body.sans-defilement { overflow: hidden; }

.galerie-photo img, .photo-fiche img, .spot-photo img,
img[data-agrandir], .fiche-photos img, .photos-lieu img { cursor: zoom-in; }

.bulle-flottante {
    
    position: fixed; z-index: 2100;
    max-width: min(20rem, 90vw);
    padding: .45rem .7rem;
    border-radius: 8px;
    background: var(--titre, #0b203c);
    color: #fff;
    font-size: .82rem; line-height: 1.4;
    text-align: center;
    pointer-events: none;
    opacity: 0; transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
}
.bulle-flottante--visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .bulle-flottante { transition: none; } }
[data-bulle] { cursor: help; }

.bandeau-info {
    --bandeau-fond: #0f4c75;
    --bandeau-texte: #ffffff;
    background: var(--bandeau-fond);
    color: var(--bandeau-texte);
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}
.bandeau-info__contenu {
    max-width: 1320px;
    margin: 0 auto;
    padding: .7rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .92rem;
    line-height: 1.45;
}
.bandeau-info__signe { flex: none; display: inline-flex; margin-top: .05rem; }

.membre-carte__photo { flex: none; display: inline-flex; width: 56px; justify-content: center; }
.membre-carte__photo .deco { flex: none; }
.bandeau-info__signe svg { width: 1.15rem; height: 1.15rem; display: block; }

.bandeau-info--attention { --bandeau-fond: #8a5a00; }
.bandeau-info--alerte    { --bandeau-fond: #8a2118; }

@media (min-width: 992px) {
    .bandeau-info__contenu { padding-inline: 1.5rem; }
}

.replie { display: none !important; }
.voir-plus {
    display: block;
    margin: .85rem auto 0;
    padding: .35rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--titre);
    font-size: .88rem; font-weight: 600;
    cursor: pointer;
}
.voir-plus:hover, .voir-plus:focus-visible {
    border-color: var(--accent); color: var(--accent);
}

.absents {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.absent {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.absent__quoi { display: flex; flex-direction: column; gap: .15rem; }
.absent__nom { font-weight: 600; color: var(--titre); text-decoration: none; }
.absent__nom:hover, .absent__nom:focus-visible { color: var(--accent); text-decoration: underline; }
.absent__sous { font-size: .82rem; color: var(--muted); }
.absent__detail { margin: .35rem 0 0; font-size: .85rem; color: var(--muted); }
.absent__gestes { display: flex; flex-wrap: wrap; gap: .5rem; }
.absent__gestes form { margin: 0; }
.absent__gestes .btn { flex: 1 1 auto; }

@media (min-width: 768px) {
    .absent {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .absent__quoi   { flex: 0 0 26%; }
    .absent__motif  { flex: 1 1 auto; }
    .absent__gestes { flex: 0 0 11rem; flex-direction: column; }
    .absent__gestes .btn { width: 100%; }
}

.ps-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.ps-ligne { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.45; }
.ps-ligne__marque {
    flex: 0 0 1.4rem;
    height: 1.4rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    margin-top: .1rem;
}
.ps-ligne--ok .ps-ligne__marque    { background: rgba(46, 139, 87, .16); color: #1f6b40; }
.ps-ligne--souci .ps-ligne__marque { background: rgba(200, 90, 40, .16); color: #a2481c; }
.ps-ligne--info .ps-ligne__marque  { background: var(--surface-2); color: var(--muted); }
.ps-ligne__texte { display: block; font-size: .87rem; color: var(--muted); }
.ps-etapes { padding-left: 1.15rem; display: flex; flex-direction: column; gap: .7rem; }
.ps-etapes li { line-height: 1.5; font-size: .9rem; }
.ps-etapes strong { color: var(--titre); }

:root[data-theme="sombre"] .ps-ligne--ok .ps-ligne__marque    { background: rgba(46, 139, 87, .24); color: #7ed6a4; }
:root[data-theme="sombre"] .ps-ligne--souci .ps-ligne__marque { background: rgba(230, 130, 70, .22); color: #ffb98a; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) .ps-ligne--ok .ps-ligne__marque    { background: rgba(46, 139, 87, .24); color: #7ed6a4; }
    :root:not([data-theme="clair"]) .ps-ligne--souci .ps-ligne__marque { background: rgba(230, 130, 70, .22); color: #ffb98a; }
}

.bienvenue {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, var(--marine) 0%, #123c66 55%, #0f5b96 100%);
    opacity: 1;
    transition: opacity .25s ease;
}
.bienvenue.est-parti { opacity: 0; pointer-events: none; }

.bienvenue__carte {
    width: 100%;
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .85rem;
    color: #fff;
}
.bienvenue__logo {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .35));
    margin-bottom: .35rem;
}
.bienvenue__titre {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.45rem;
    margin: 0;
    text-wrap: balance;
}
.bienvenue__texte {
    margin: 0 0 .4rem;
    font-size: .95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .88);
}
.bienvenue__oui { min-height: 50px; font-size: 1rem; }
.bienvenue__plus-tard {
    background: none;
    border: 0;
    padding: .5rem 1rem;
    
    color: rgba(255, 255, 255, .82);
    font-size: .92rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.bienvenue__plus-tard:hover,
.bienvenue__plus-tard:focus-visible { color: #fff; }

.bienvenue__points { display: flex; gap: .4rem; margin-top: .3rem; }
.bienvenue__point {
    width: 7px; height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
}
.bienvenue__point.est-actif { background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .bienvenue { transition: none; }
}

.sortie-bandeau {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 1rem;
    z-index: 1030;

    display: flex;
    align-items: center;
    gap: .7rem;

    max-width: min(26rem, calc(100vw - 1.6rem));
    padding: .55rem .8rem .55rem .7rem;

    background: var(--marine);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28);

    text-decoration: none;
    line-height: 1.25;
}
.sortie-bandeau:hover,
.sortie-bandeau:focus-visible {
    color: #fff;
    text-decoration: none;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .36);
}
.sortie-bandeau:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sortie-bandeau__pastille {
    flex: 0 0 auto;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: #46d17f;
    box-shadow: 0 0 0 0 rgba(70, 209, 127, .7);
    animation: sortie-battement 2s infinite;
}
@keyframes sortie-battement {
    0%   { box-shadow: 0 0 0 0 rgba(70, 209, 127, .6); }
    70%  { box-shadow: 0 0 0 .5rem rgba(70, 209, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(70, 209, 127, 0); }
}

.sortie-bandeau__texte {
    display: flex;
    flex-direction: column;
    min-width: 0;
    
    flex: 1 1 auto;
}
.sortie-bandeau__titre {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
}
.sortie-bandeau__chiffres {
    font-size: .8rem;
    opacity: .85;
    
    font-variant-numeric: tabular-nums;
}
.sortie-bandeau__aller {
    flex: 0 0 auto;
    font-size: 1.3rem;
    opacity: .6;
    padding-right: .2rem;
}

body.a-sortie-en-cours { padding-bottom: 4.25rem; }

.sortie-bandeau.est-arrive { background: #16794f; }
.sortie-bandeau.est-arrive .sortie-bandeau__pastille {
    animation: none;
    background: #fff;
}
.sortie-bandeau.est-arrive .sortie-bandeau__titre::after {
    content: ' · arrivé 🏁';
    font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
    .sortie-bandeau__pastille { animation: none; }
}

.galerie__ouvrir {
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    width: 100%;
}
.galerie__ouvrir img { display: block; width: 100%; }

.photo-plein {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(6, 18, 28, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    
    padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.photo-plein__boite {
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    align-items: center;
}

.photo-plein__boite img {
    min-height: 0;
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    border-radius: 10px;
    background: #0b2038;
}
.photo-plein__legende {
    margin: 0;
    color: #e8f1f8;
    font-size: .92rem;
    line-height: 1.5;
    text-align: center;
    max-width: 60ch;
}
.photo-plein__fermer {
    position: absolute;
    top: calc(.5rem + env(safe-area-inset-top, 0px));
    right: .5rem;
    
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
.photo-plein__fermer:hover { background: rgba(255, 255, 255, .26); }

.sortie-dialog {
    max-width: 560px;
}
.sortie {
    overflow: hidden;
}

.sortie__tete {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.sortie__titre {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}
.sortie__nom {
    font-size: .8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.sortie__pouls {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1e8f5f;
    flex: 0 0 auto;
    box-shadow: 0 0 0 0 rgba(30, 143, 95, .45);
    animation: sortie-pouls 2s ease-out infinite;
}
@keyframes sortie-pouls {
    0%   { box-shadow: 0 0 0 0 rgba(30, 143, 95, .45); }
    70%  { box-shadow: 0 0 0 7px rgba(30, 143, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 143, 95, 0); }
}
.chrono--pause .sortie__pouls {
    animation: none;
    background: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
    .sortie__pouls { animation: none; }
}
.sortie__plus {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    font-size: .8rem;
    letter-spacing: .06em;
    line-height: 1;
    cursor: pointer;
}
.sortie__plus.est-ouvert {
    background: var(--ride-encre);
    border-color: var(--ride-encre);
    color: #fff;
}

.sortie__reduire {
    font-size: 1.15rem;
    line-height: .7;
    padding-bottom: .35rem;
}

.sortie__zone {
    position: relative;
}
.sortie .chrono__carte {
    margin: 0;
    border: 0;
    border-radius: 0;
    height: 38vh;
    max-height: 420px;
}

.sortie__zone:has(.chrono__carte.hidden) { display: none; }
.sortie .chrono__recentrer {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    z-index: 5;
    margin: 0;
}
.sortie .chrono__arrivee {
    position: absolute;
    top: .6rem;
    left: .6rem;
    right: .6rem;
    z-index: 6;
    margin: 0;
}

.sortie__panneau {
    padding: .9rem 1rem 1rem;
    background: var(--surface);
}

.sortie__prog { margin-bottom: .85rem; }
.sortie__prog-barre {
    height: 6px;
    border-radius: 3px;
    background: var(--surface-2, #eef3f7);
    overflow: hidden;
}
.sortie__prog-barre i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #1e8f5f, var(--ride));
    transition: width .4s ease;
}
.sortie__prog-lignes {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    font-size: .74rem;
    margin-top: .35rem;
}
.sortie__faits { color: #1e8f5f; font-weight: 700; }

.sortie__gros {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .8rem;
}
.sortie .sortie__gros .chrono__valeur {
    display: inline;
    font-size: 2.6rem;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--ride-encre);
}
.sortie__gros-libelle {
    font-size: .78rem;
    color: var(--muted);
}

.sortie .sortie__tuiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    text-align: left;
}
.sortie .sortie__tuile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--border);
    border-radius: 10px;
    padding: .45rem .55rem;
}
.sortie .sortie__tuile--duree   { border-top-color: #1e8f5f; }
.sortie .sortie__tuile--allure  { border-top-color: #b0761a; }
.sortie .sortie__tuile--moyenne { border-top-color: #7a4fa3; }
.sortie .sortie__tuile .chrono__libelle {
    font-size: .64rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
}
.sortie .sortie__tuile .chrono__valeur {
    font-size: 1.15rem;
    margin-top: .05rem;
}

.sortie__cmd {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: .55rem;
    margin-top: .9rem;
}
.sortie .sortie__btn {
    width: 100%;
    min-height: 52px;
    font-weight: 700;
    border-radius: 12px;
}
.sortie .sortie__btn--stop {
    background: #b23a2e;
    border-color: #b23a2e;
    color: #fff;
}
.sortie .sortie__btn--stop:disabled { opacity: .65; }

.sortie { position: relative; }
.sortie .sortie__tiroir {
    position: absolute;
    left: 0;
    right: 0;
    top: 3.4rem;           
    
    z-index: 1200;
    max-height: calc(100% - 3.4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: .9rem 1rem 1rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2, #f4f7fa);
    box-shadow: 0 14px 30px rgba(15, 40, 58, .22);
}

@media (max-width: 575.98px) {
    
    .sortie-dialog {
        margin: 0;
        max-width: none;
        min-height: 100%;
    }
    .sortie-dialog .sortie {
        min-height: 100vh;
        border-radius: 0;
        border: 0;
    }
    .sortie .chrono__carte { height: 42vh; max-height: none; }
    .sortie .sortie__gros .chrono__valeur { font-size: 3rem; }
    .sortie .sortie__btn { min-height: 56px; }
}

.sortie .sortie__cmd .btn-pause,
.sortie .sortie__cmd .btn-terminer {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sortie .sortie__tuile .chrono__libelle {
    min-height: 2.1em;
    line-height: 1.05;
    display: flex;
    align-items: flex-start;
}

@media (max-width: 575.98px) {
    .sortie-dialog.modal-dialog-centered {
        align-items: stretch;
    }
}

.sortie .sortie__cmd .btn {
    height: 54px;
    min-height: 54px;
    line-height: 1.1;
}
@media (max-width: 575.98px) {
    .sortie .sortie__cmd .btn { height: 58px; min-height: 58px; }
}

.sortie .sortie__cmd .btn-terminer { margin-top: 0; }

:root {
    
    --p-ambre-fond: #f8f1e2;  --p-ambre-encre: #8a6314;  --p-ambre-bord: #e6dbc2;
    
    --p-bleu-fond:  #e8f2fb;  --p-bleu-encre:  #0d6aaf;  --p-bleu-bord:  #cfe2f3;
    --p-vert-fond:  #e6f3ec;  --p-vert-encre:  #1e7a52;  --p-vert-bord:  #c8e3d5;
    --p-gris-fond:  #eef2f6;  --p-gris-encre:  #546b7d;  --p-gris-bord:  #d9e2ea;

    --action: #0f76c4;
    --action-survol: #0c639f;
    --action-appui: #0a5789;
}

:root[data-theme="sombre"] {
    --p-ambre-fond: rgba(240, 180, 41, .13);  --p-ambre-encre: #e8c06a;  --p-ambre-bord: rgba(240, 180, 41, .28);
    --p-bleu-fond:  rgba(111, 211, 230, .13); --p-bleu-encre:  #7fdcec;  --p-bleu-bord:  rgba(111, 211, 230, .3);
    --p-vert-fond:  rgba(47, 191, 127, .14);  --p-vert-encre:  #6ed6a4;  --p-vert-bord:  rgba(47, 191, 127, .3);
    --p-gris-fond:  rgba(255, 255, 255, .07); --p-gris-encre:  #9db4c4;  --p-gris-bord:  rgba(255, 255, 255, .15);
    
    --action: #1a72b4;
    --action-survol: #2185cf;
    --action-appui: #145c92;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="clair"]) {
        --p-ambre-fond: rgba(240, 180, 41, .13);  --p-ambre-encre: #e8c06a;  --p-ambre-bord: rgba(240, 180, 41, .28);
        --p-bleu-fond:  rgba(111, 211, 230, .13); --p-bleu-encre:  #7fdcec;  --p-bleu-bord:  rgba(111, 211, 230, .3);
        --p-vert-fond:  rgba(47, 191, 127, .14);  --p-vert-encre:  #6ed6a4;  --p-vert-bord:  rgba(47, 191, 127, .3);
        --p-gris-fond:  rgba(255, 255, 255, .07); --p-gris-encre:  #9db4c4;  --p-gris-bord:  rgba(255, 255, 255, .15);
        --action: #1a72b4;
        --action-survol: #2185cf;
        --action-appui: #145c92;
    }
}

:root:not([data-appli]) .badge.text-bg-warning,
:root:not([data-appli]) .badge.text-bg-info,
:root:not([data-appli]) .badge.text-bg-success,
:root:not([data-appli]) .badge.text-bg-secondary,
:root:not([data-appli]) .badge.text-bg-primary,
:root:not([data-appli]) .badge.text-bg-light,
:root:not([data-appli]) .badge.text-bg-dark {
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: .005em;
}

:root:not([data-appli]) .badge.text-bg-warning {
    background-color: var(--p-ambre-fond) !important;
    color: var(--p-ambre-encre) !important;
    border-color: var(--p-ambre-bord);
}
:root:not([data-appli]) .badge.text-bg-info,
:root:not([data-appli]) .badge.text-bg-primary {
    background-color: var(--p-bleu-fond) !important;
    color: var(--p-bleu-encre) !important;
    border-color: var(--p-bleu-bord);
}
:root:not([data-appli]) .badge.text-bg-success {
    background-color: var(--p-vert-fond) !important;
    color: var(--p-vert-encre) !important;
    border-color: var(--p-vert-bord);
}
:root:not([data-appli]) .badge.text-bg-secondary,
:root:not([data-appli]) .badge.text-bg-light,
:root:not([data-appli]) .badge.text-bg-dark {
    background-color: var(--p-gris-fond) !important;
    color: var(--p-gris-encre) !important;
    border-color: var(--p-gris-bord);
}

:root:not([data-appli]) .badge.text-bg-danger { border-radius: 6px; }

:root:not([data-appli]) .btn-primary {
    --bs-btn-bg: var(--action);
    --bs-btn-border-color: var(--action);
    --bs-btn-hover-bg: var(--action-survol);
    --bs-btn-hover-border-color: var(--action-survol);
    --bs-btn-active-bg: var(--action-appui);
    --bs-btn-active-border-color: var(--action-appui);
    --bs-btn-disabled-bg: var(--action);
    --bs-btn-disabled-border-color: var(--action);
}
:root:not([data-appli]) .btn-outline-primary {
    --bs-btn-color: var(--action);
    --bs-btn-border-color: var(--action);
    --bs-btn-hover-bg: var(--action);
    --bs-btn-hover-border-color: var(--action);
    --bs-btn-active-bg: var(--action-appui);
    --bs-btn-active-border-color: var(--action-appui);
}

:root:not([data-appli]) .page-card::before {
    height: 2px;
    background: var(--ride-encre);
    opacity: .5;
}

:root:not([data-appli]) .btn-warning {
    --bs-btn-bg: var(--p-ambre-fond);
    --bs-btn-color: var(--p-ambre-encre);
    --bs-btn-border-color: var(--p-ambre-bord);
    
    --bs-btn-hover-bg: var(--p-ambre-bord);
    --bs-btn-hover-color: var(--p-ambre-encre);
    --bs-btn-hover-border-color: var(--p-ambre-encre);
    --bs-btn-active-bg: var(--p-ambre-bord);
    --bs-btn-active-color: var(--p-ambre-encre);
    --bs-btn-active-border-color: var(--p-ambre-encre);
}

.sortie .btn-primary {
    --bs-btn-bg: var(--action);
    --bs-btn-border-color: var(--action);
    --bs-btn-hover-bg: var(--action-survol);
    --bs-btn-hover-border-color: var(--action-survol);
    --bs-btn-active-bg: var(--action-appui);
    --bs-btn-active-border-color: var(--action-appui);
    --bs-btn-disabled-bg: var(--action);
    --bs-btn-disabled-border-color: var(--action);
}

.leaflet-popup-content-wrapper,
.leaflet-tooltip {
    --p-ambre-fond: #f8f1e2;  --p-ambre-encre: #8a6314;  --p-ambre-bord: #e6dbc2;
    --p-bleu-fond:  #e8f2fb;  --p-bleu-encre:  #0d6aaf;  --p-bleu-bord:  #cfe2f3;
    --p-vert-fond:  #e6f3ec;  --p-vert-encre:  #1e7a52;  --p-vert-bord:  #c8e3d5;
    --p-gris-fond:  #eef2f6;  --p-gris-encre:  #546b7d;  --p-gris-bord:  #d9e2ea;
}

.spot-popup .badge-type {
    background: #e8f2fb;
    color: #0d6aaf;
    border: 1px solid #cfe2f3;
    border-radius: 6px;
    font-weight: 600;
}

.bilan__chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: .5rem;
}
.bilan__tuile {
    text-align: center;
    padding: .7rem .4rem .6rem;
    border-radius: var(--r-s, 10px);
    background: var(--surface-2);
}
.bilan__tuile b {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--titre);
    line-height: 1.1;
}
.bilan__tuile b span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.bilan__libelle {
    display: block;
    margin-top: .15rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

.bilan__gains {
    list-style: none;
    margin: .9rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-s, 10px);
    overflow: hidden;
}
.bilan__gains li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .55rem .75rem;
    font-size: .85rem;
}
.bilan__gains li + li { border-top: 1px solid var(--border); }
.bilan__gains li span { color: var(--muted); }
.bilan__gains li b { font-family: var(--font-heading); color: var(--p-ambre-encre); white-space: nowrap; }

.bilan__note {
    margin: .9rem 0 0;
    padding: .6rem .7rem;
    border-left: 3px solid var(--ride-encre);
    background: var(--surface-2);
    border-radius: 0 var(--r-s, 10px) var(--r-s, 10px) 0;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--muted);
}
.bilan__note b { color: var(--text); }

.btn-choix-second {
    background: transparent;
    color: var(--titre);
    border: 1px solid var(--action);
}
.btn-choix-second:hover,
.btn-choix-second:focus { background: var(--surface-2); color: var(--titre); }
.btn-choix-second:active { background: var(--surface-2); color: var(--titre); }

.fenetre-dialogue .modal-footer .btn-outline-secondary { color: var(--titre); }
