:root {
            --bg: #07111e;
            --bg-soft: #0b1a2c;
            --panel: rgba(18, 42, 67, .78);
            --panel-strong: rgba(14, 34, 56, .97);
            --line: rgba(160,205,238,.20);
            --line-bright: rgba(107, 220, 255, .46);
            --text: #f5f7fb;
            --muted: #a0b3c5;
            --cyan: #72d7ff;
            --blue: #4da3ff;
            --violet: #a979ff;
            --green: #61e7a0;
            --shadow: 0 24px 70px rgba(0,0,0,.38);
        }

        * { box-sizing: border-box; }
        html { scroll-behavior: smooth; }
        body {
            margin: 0;
            min-height: 100vh;
            color: var(--text);
            background:
                radial-gradient(circle at 50% 12%, rgba(77,163,255,.18), transparent 32%),
                radial-gradient(circle at 80% 55%, rgba(169,121,255,.13), transparent 32%),
                linear-gradient(180deg, rgba(7,17,30,.22), rgba(7,17,30,.82)),
                var(--bg);
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            overflow-x: clip;
            overflow-y: visible;
        }

        body::before {
            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: -1;
            background:
                radial-gradient(circle at 20% 20%, rgba(114,215,255,.05), transparent 24%),
                radial-gradient(circle at 75% 25%, rgba(169,121,255,.05), transparent 26%),
                linear-gradient(90deg, rgba(0,0,0,.5), transparent 35%, transparent 65%, rgba(0,0,0,.5));
        }

        #starfield {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            opacity: .72;
        }

        .site {
            position: relative;
            z-index: 1;
            width: min(1440px, calc(100% - 32px));
            margin: 0 auto;
            padding: 20px 0 64px;
        }

        .topbar {
            position: sticky;
            top: 14px;
            z-index: 20;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            min-height: 68px;
            padding: 10px 14px 10px 20px;
            border: 1px solid var(--line);
            border-radius: 22px;
            background: rgba(10, 25, 43, .88);
            backdrop-filter: blur(22px);
            -webkit-backdrop-filter: blur(22px);
            box-shadow: 0 18px 50px rgba(0,0,0,.35);
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #fff;
            text-decoration: none;
            min-width: 0;
        }

        .brand-zone {
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 0;
        }
        .france-flag {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            width: 21px;
            height: 14px;
            margin-left: 2px;
            line-height: 0;
            filter: drop-shadow(0 2px 5px rgba(0,0,0,.28));
            transform: translateY(-1px);
        }

        .france-flag svg {
            display: block;
            width: 100%;
            height: 100%;
            overflow: visible;
        }

        .brand-mark {
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            flex: 0 0 auto;
            border-radius: 50%;
            border: 1px solid rgba(114,215,255,.45);
            background:
                radial-gradient(circle, #dff8ff 0 5%, var(--cyan) 7% 12%, rgba(114,215,255,.12) 34%, transparent 62%),
                #07101d;
            box-shadow: 0 0 25px rgba(114,215,255,.22);
        }

        .brand-text strong {
            display: block;
            font-size: 1.02rem;
            letter-spacing: .12em;
            text-transform: uppercase;
        }

        .brand-text span {
            display: block;
            margin-top: 1px;
            color: var(--muted);
            font-size: .68rem;
            letter-spacing: .22em;
            text-transform: uppercase;
        }

        .topbar-status {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--muted);
            font-size: .76rem;
            white-space: nowrap;
        }

        .topbar-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 9px;
            margin-left: auto;
        }

        .mission-clock {
            position: relative;
            display: grid;
            grid-template-columns: 7px auto;
            grid-template-rows: 1fr;
            align-items: center;
            column-gap: 8px;
            min-width: 132px;
            padding: 7px 11px;
            border: 1px solid rgba(114,215,255,.24);
            border-radius: 10px;
            background: linear-gradient(145deg,rgba(7,22,37,.84),rgba(10,31,50,.72));
            box-shadow: inset 0 0 18px rgba(114,215,255,.035),0 8px 22px rgba(0,0,0,.14);
            font-family: ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
            line-height: 1;
        }
        .mission-clock::before {
            content: "";
            grid-row: auto;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #ff7187;
            box-shadow: 0 0 10px rgba(255,113,135,.85);
            animation: clockPulse 1s steps(1,end) infinite;
        }
        .mission-clock-time { color: #c9f4ff; font-size: .83rem; font-weight: 900; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(114,215,255,.3); }
        @keyframes clockPulse { 50% { opacity: .28; } }

        .theme-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 38px;
            padding: 8px 12px;
            border: 1px solid rgba(168,140,255,.32);
            border-radius: 999px;
            color: #e9e2ff;
            background: rgba(168,140,255,.08);
            font: inherit;
            font-size: .7rem;
            font-weight: 800;
            cursor: pointer;
            transition: transform .2s ease, border-color .2s ease, background .2s ease;
        }

        .theme-toggle:hover,
        .theme-toggle:focus-visible {
            transform: translateY(-1px);
            border-color: rgba(168,140,255,.58);
            background: rgba(168,140,255,.15);
            outline: none;
        }

        .theme-icon { font-size: .9rem; line-height: 1; }

        .live-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--green);
            box-shadow: 0 0 12px rgba(97,231,160,.8);
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            50% { opacity: .35; transform: scale(.72); }
        }

        .hero {
            position: relative;
            margin-top: 24px;
            padding: clamp(42px, 8vw, 92px) clamp(24px, 6vw, 80px);
            overflow: hidden;
            border: 1px solid var(--line);
            border-radius: 34px;
            background:
                linear-gradient(135deg, rgba(17,39,63,.88), rgba(10,24,42,.68)),
                radial-gradient(circle at 72% 35%, rgba(114,215,255,.12), transparent 28%);
            box-shadow: var(--shadow);
        }

        .hero::before {
            content: "";
            position: absolute;
            width: 420px;
            height: 420px;
            right: -140px;
            top: -170px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(114,215,255,.16), transparent 66%);
            filter: blur(8px);
        }

        .hero-kicker {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            margin-bottom: 18px;
            color: var(--cyan);
            font-size: .74rem;
            font-weight: 800;
            letter-spacing: .2em;
            text-transform: uppercase;
        }

        .hero-kicker::before {
            content: "";
            width: 30px;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--cyan));
        }

        h1 {
            max-width: 920px;
            margin: 0;
            font-size: clamp(2.8rem, 7vw, 6.4rem);
            line-height: .94;
            letter-spacing: -.055em;
            font-weight: 800;
            text-wrap: balance;
            background: linear-gradient(120deg, #fff 18%, #dcecff 54%, var(--cyan) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .hero p {
            max-width: 720px;
            margin: 24px 0 0;
            color: #c0cfdd;
            font-size: clamp(1rem, 1.7vw, 1.16rem);
            line-height: 1.75;
        }

        .hero p strong { color: #fff; }

        .catalogue {
            margin-top: 24px;
            padding: clamp(20px, 3vw, 34px);
            border: 1px solid var(--line);
            border-radius: 30px;
            background: var(--panel);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            box-shadow: var(--shadow);
        }

        .catalogue-head {
            display: flex;
            justify-content: space-between;
            align-items: end;
            gap: 24px;
            margin-bottom: 22px;
        }

        .eyebrow {
            margin: 0 0 6px;
            color: var(--cyan);
            font-size: .7rem;
            font-weight: 800;
            letter-spacing: .18em;
            text-transform: uppercase;
        }

        .catalogue-title {
            margin: 0;
            font-size: clamp(1.6rem, 3vw, 2.35rem);
            letter-spacing: -.035em;
        }

        .catalogue-subtitle {
            max-width: 690px;
            margin: 9px 0 0;
            color: var(--muted);
            font-size: clamp(.78rem, 1.15vw, .88rem);
            line-height: 1.6;
            letter-spacing: .005em;
            text-wrap: balance;
        }

        .counter {
            flex: 0 0 auto;
            text-align: right;
        }

        .counter strong {
            display: block;
            font-size: 2rem;
            line-height: 1;
        }

        .counter span {
            color: var(--muted);
            font-size: .7rem;
            letter-spacing: .12em;
            text-transform: uppercase;
        }

        .progress-wrap {
            margin-bottom: 22px;
        }

        .progress-top {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 8px;
            color: var(--muted);
            font-size: .75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .08em;
        }

        .progress-top strong { color: var(--cyan); }

        .progress {
            height: 5px;
            overflow: hidden;
            border-radius: 99px;
            background: rgba(255,255,255,.07);
        }

        .progress span {
            display: block;
            height: 100%;
            width: <?= $percent_completed ?>%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--blue), var(--cyan), var(--violet));
            box-shadow: 0 0 18px rgba(114,215,255,.42);
        }

        .filters {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-bottom: 24px;
        }

        .filter {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 9px 13px;
            border: 1px solid rgba(255,255,255,.09);
            border-radius: 999px;
            color: var(--muted);
            background: rgba(255,255,255,.025);
            text-decoration: none;
            font-size: .76rem;
            font-weight: 700;
            transition: .2s ease;
        }

        .filter:hover {
            color: #fff;
            border-color: rgba(114,215,255,.35);
            background: rgba(114,215,255,.07);
            transform: translateY(-1px);
        }

        .filter.active {
            color: #02101a;
            border-color: var(--cyan);
            background: var(--cyan);
            box-shadow: 0 0 18px rgba(114,215,255,.18);
        }

        .messier-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
            gap: 14px;
        }

        .messier-card {
            position: relative;
            overflow: hidden;
            min-width: 0;
            border: 1px solid rgba(255,255,255,.085);
            border-radius: 19px;
            background: rgba(11,31,52,.88);
            cursor: default;
            content-visibility: auto;
            contain-intrinsic-size: 330px;
            transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease, opacity .28s ease;
        }

        .messier-card.has-photo {
            cursor: zoom-in;
            border-color: rgba(114,215,255,.18);
        }

        .messier-card.has-photo:hover,
        .messier-card.has-photo:focus-visible {
            transform: translateY(-5px);
            border-color: rgba(114,215,255,.48);
            box-shadow: 0 18px 42px rgba(0,0,0,.45), 0 0 28px rgba(77,163,255,.11);
            outline: none;
        }

        .messier-card:not(.has-photo) {
            cursor: default;
        }

        .image-box {
            position: relative;
            aspect-ratio: 4 / 3;
            overflow: hidden;
            background:
                radial-gradient(circle, rgba(114,215,255,.07), transparent 42%),
                #071422;
        }

        .image-box img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform .65s cubic-bezier(.16,1,.3,1), filter .4s ease, opacity .35s ease;
        }

        .catalogue-photo { opacity: 1; }

        .messier-card.has-photo:hover .image-box img,
        .messier-card.has-photo:focus-visible .image-box img {
            transform: scale(1.065);
            filter: saturate(1.08) contrast(1.04) brightness(1.03);
        }

        .messier-card.has-photo .image-box::before {
            content: "Agrandir  ↗";
            position: absolute;
            right: 11px;
            bottom: 11px;
            z-index: 3;
            padding: 7px 10px;
            border: 1px solid rgba(255,255,255,.16);
            border-radius: 999px;
            color: #eefaff;
            background: rgba(3,11,20,.66);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 8px 24px rgba(0,0,0,.28);
            font-size: .63rem;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
            opacity: 0;
            transform: translateY(6px);
            transition: opacity .25s ease, transform .25s ease, border-color .25s ease;
            pointer-events: none;
        }

        .messier-card.has-photo:hover .image-box::before,
        .messier-card.has-photo:focus-visible .image-box::before {
            opacity: 1;
            transform: translateY(0);
            border-color: rgba(114,215,255,.36);
        }

        .image-box::after {
            content: "";
            position: absolute;
            inset: 45% 0 0;
            background: linear-gradient(180deg, transparent, rgba(0,0,0,.5));
            pointer-events: none;
        }

        .badge {
            position: absolute;
            z-index: 2;
            top: 11px;
            left: 11px;
            padding: 5px 8px;
            border: 1px solid rgba(114,215,255,.28);
            border-radius: 7px;
            color: #dff8ff;
            background: rgba(2,6,13,.78);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            font-size: .72rem;
            font-weight: 900;
            letter-spacing: .08em;
        }

        .status {
            position: absolute;
            z-index: 2;
            top: 11px;
            right: 11px;
            padding: 5px 8px;
            border-radius: 7px;
            font-size: .62rem;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
            background: rgba(2,6,13,.75);
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        .status.captured {
            color: var(--green);
            border: 1px solid rgba(97,231,160,.25);
        }

        .status.target {
            color: #94a3b8;
            border: 1px solid rgba(148,163,184,.16);
        }

        .placeholder {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            padding: 20px;
            color: #8ba0b5;
            font-size: .72rem;
            text-align: center;
            letter-spacing: .09em;
            text-transform: uppercase;
        }

        .placeholder::before {
            content: "✦";
            display: block;
            margin-bottom: 7px;
            color: rgba(114,215,255,.35);
            font-size: 1.8rem;
        }

        .card-body {
            padding: 14px 15px 15px;
        }

        .object-name {
            margin: 0;
            overflow: hidden;
            color: #f5f7fb;
            font-size: .96rem;
            font-weight: 750;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .meta {
            display: flex;
            justify-content: space-between;
            gap: 10px;
            margin-top: 7px;
            color: #a7b9ca;
            font-size: .68rem;
        }

        .meta span:last-child {
            color: #a979ff;
            text-align: right;
        }

        .capture-details {
            margin-top: 11px;
            padding-top: 9px;
            border-top: 1px solid rgba(255,255,255,.06);
        }

        .install-app {
            display: none;
            align-items: center;
            gap: 7px;
            padding: 9px 12px;
            border: 1px solid rgba(114,215,255,.35);
            border-radius: 999px;
            background: rgba(114,215,255,.08);
            color: #dff8ff;
            font: inherit;
            font-size: .7rem;
            font-weight: 800;
            cursor: pointer;
        }

        .install-app.available { display: inline-flex; }

        .capture-date,
        .capture-location {
            color: #77cfff;
            font-size: .68rem;
        }

        .capture-location { margin-top: 5px; color: #b9a7ff; }

        .like-form {
            margin-top: 12px;
        }

        .like-button {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 36px;
            padding: 7px 11px;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 999px;
            color: #c7d7e6;
            background: rgba(255,255,255,.04);
            cursor: pointer;
            font: inherit;
            font-size: .72rem;
            font-weight: 800;
            transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
        }

        .like-button:hover,
        .like-button:focus-visible,
        .like-button.is-liked {
            color: #ff9bb0;
            border-color: rgba(255,113,135,.48);
            background: rgba(255,113,135,.10);
            outline: none;
        }

        .like-button:active { transform: scale(.96); }
        .like-button:disabled { opacity: .55; cursor: wait; }
        .like-button.is-error { border-color: #ff7187; }
        .like-feedback { display: block; min-height: 1em; margin-top: 5px; color: #ff9bad; font-size: .62rem; }

        .object-page-link {
            display: inline-flex;
            align-items: center;
            margin-top: 10px;
            color: var(--cyan);
            font-size: .68rem;
            font-weight: 850;
            letter-spacing: .035em;
            text-decoration: none;
        }

        .object-page-link:hover,
        .object-page-link:focus-visible {
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .contact-panel {
            margin-top: 24px;
            padding: clamp(22px, 4vw, 38px);
            border: 1px solid var(--line);
            border-radius: 30px;
            background: var(--panel);
            box-shadow: var(--shadow);
        }

        .contact-panel h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.2rem); }
        .contact-panel > p { max-width: 700px; color: var(--muted); line-height: 1.7; }
        .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
        .contact-field { display: grid; gap: 7px; }
        .contact-field.full { grid-column: 1 / -1; }
        .contact-field label { color: #dbe9f5; font-size: .77rem; font-weight: 800; }
        .contact-field input,
        .contact-field textarea {
            width: 100%;
            border: 1px solid rgba(255,255,255,.12);
            border-radius: 12px;
            padding: 12px 13px;
            color: #fff;
            background: rgba(4,16,29,.76);
            font: inherit;
        }
        .contact-field textarea { min-height: 150px; resize: vertical; }
        .contact-field input:focus,
        .contact-field textarea:focus { border-color: var(--cyan); outline: 2px solid rgba(114,215,255,.14); }
        .contact-submit {
            margin-top: 15px;
            border: 1px solid var(--line-bright);
            border-radius: 999px;
            padding: 11px 17px;
            color: #03121d;
            background: var(--cyan);
            cursor: pointer;
            font: inherit;
            font-weight: 900;
        }
        .contact-notice { margin: 14px 0; padding: 12px 14px; border-radius: 12px; font-size: .82rem; }
        .contact-notice.ok { color: #8ff0bb; border: 1px solid rgba(97,231,160,.3); background: rgba(97,231,160,.08); }
        .contact-notice.error { color: #ffacba; border: 1px solid rgba(255,113,135,.3); background: rgba(255,113,135,.08); }
        .website-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

        .empty {
            grid-column: 1 / -1;
            padding: 50px 20px;
            border: 1px dashed rgba(255,255,255,.12);
            border-radius: 18px;
            color: var(--muted);
            text-align: center;
        }

        footer {
            padding: 28px 10px 0;
            color: #879caf;
            text-align: center;
            font-size: .72rem;
            letter-spacing: .06em;
        }

        .french-origin {
            display: inline-block;
            margin-left: 7px;
            font-size: .95rem;
            vertical-align: -1px;
            filter: drop-shadow(0 0 7px rgba(255,255,255,.12));
        }

        /* Lightbox — visionneuse immersive */
        .modal {
            position: fixed;
            inset: 0;
            z-index: 100;
            display: grid;
            place-items: center;
            padding: clamp(10px, 2vw, 24px);
            opacity: 0;
            visibility: hidden;
            background:
                radial-gradient(circle at 50% 35%, rgba(77,163,255,.12), transparent 34%),
                radial-gradient(circle at 75% 70%, rgba(169,121,255,.11), transparent 30%),
                rgba(2,7,13,.90);
            backdrop-filter: blur(24px) saturate(.9);
            -webkit-backdrop-filter: blur(24px) saturate(.9);
            transition: opacity .32s ease, visibility .32s ease;
        }

        .modal::before {
            content: "";
            position: absolute;
            inset: 0;
            pointer-events: none;
            opacity: 0;
            background:
                linear-gradient(115deg, transparent 24%, rgba(114,215,255,.055) 48%, transparent 72%);
            transform: translateX(-18%);
            transition: opacity .45s ease, transform .75s cubic-bezier(.16,1,.3,1);
        }

        .modal.active {
            opacity: 1;
            visibility: visible;
        }

        .modal.active::before {
            opacity: 1;
            transform: translateX(18%);
        }

        .modal-content {
            position: relative;
            isolation: isolate;
            width: min(1180px, 96vw);
            max-height: min(92dvh, 960px);
            overflow-x: hidden;
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-width: thin;
            scrollbar-color: rgba(114,215,255,.35) transparent;
            border: 1px solid rgba(145,222,255,.32);
            border-radius: 28px;
            background: linear-gradient(145deg, rgba(17,39,63,.98), rgba(7,20,36,.99));
            box-shadow:
                0 45px 140px rgba(0,0,0,.78),
                0 0 0 1px rgba(255,255,255,.025) inset,
                0 0 55px rgba(77,163,255,.10);
            opacity: 0;
            transform: translateY(24px) scale(.94);
            filter: blur(6px);
            transition:
                transform .48s cubic-bezier(.16,1,.3,1),
                opacity .32s ease,
                filter .42s ease;
        }

        .modal-content::-webkit-scrollbar {
            width: 7px;
        }

        .modal-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .modal-content::-webkit-scrollbar-thumb {
            border: 2px solid transparent;
            border-radius: 999px;
            background: rgba(114,215,255,.28);
            background-clip: padding-box;
        }

        .modal-content::-webkit-scrollbar-thumb:hover {
            background: rgba(114,215,255,.45);
            background-clip: padding-box;
        }

        .modal-content::before {
            content: "";
            position: absolute;
            z-index: 5;
            inset: 0;
            border-radius: inherit;
            padding: 1px;
            background: linear-gradient(130deg, rgba(114,215,255,.50), transparent 28%, transparent 70%, rgba(169,121,255,.38));
            -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            -webkit-mask-composite: xor;
            mask-composite: exclude;
            pointer-events: none;
        }

        .modal.active .modal-content {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: blur(0);
        }

        .modal-media {
            position: relative;
            display: grid;
            place-items: center;
            min-height: 220px;
            overflow: hidden;
            background:
                radial-gradient(circle at 50% 45%, rgba(77,163,255,.10), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(169,121,255,.08), transparent 34%),
                #02060b;
        }

        .modal-media::after {
            content: "";
            position: absolute;
            inset: auto 0 0;
            height: 28%;
            background: linear-gradient(180deg, transparent, rgba(5,16,28,.80));
            pointer-events: none;
        }

        .modal-watermark {
            position: absolute;
            right: 15px;
            bottom: 12px;
            z-index: 4;
            padding: 5px 8px;
            border: 1px solid rgba(255,255,255,.18);
            border-radius: 7px;
            color: rgba(255,255,255,.78);
            background: rgba(2,6,11,.46);
            backdrop-filter: blur(5px);
            font-size: .62rem;
            font-weight: 800;
            letter-spacing: .045em;
            pointer-events: none;
            user-select: none;
        }

        .modal-img {
            position: relative;
            z-index: 1;
            display: block;
            width: 100%;
            max-height: 62dvh;
            object-fit: contain;
            opacity: 0;
            transform: scale(1.055);
            filter: brightness(.82) saturate(.92);
            transition:
                transform .75s cubic-bezier(.16,1,.3,1) .05s,
                opacity .35s ease .05s,
                filter .55s ease .08s;
        }

        .modal.active .modal-img {
            opacity: 1;
            transform: scale(1);
            filter: brightness(1) saturate(1.03);
        }

        .modal-details {
            position: relative;
            z-index: 2;
            padding: 20px 24px 24px;
            background:
                linear-gradient(180deg, rgba(13,34,56,.96), rgba(8,23,40,.99));
            opacity: 0;
            transform: translateY(12px);
            transition: opacity .32s ease .16s, transform .42s cubic-bezier(.16,1,.3,1) .16s;
        }

        .modal.active .modal-details {
            opacity: 1;
            transform: translateY(0);
        }

        .modal-tag {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--cyan);
            font-size: .66rem;
            font-weight: 850;
            letter-spacing: .15em;
            text-transform: uppercase;
        }

        .modal-tag::before {
            content: "";
            width: 18px;
            height: 1px;
            background: linear-gradient(90deg, var(--cyan), transparent);
            box-shadow: 0 0 9px rgba(114,215,255,.5);
        }

        .modal-title {
            margin: 6px 0 5px;
            font-size: clamp(1.28rem, 3vw, 1.85rem);
            letter-spacing: -.025em;
        }

        .modal-date,
        .modal-location {
            color: #92dfff;
            font-size: .74rem;
            font-weight: 700;
            letter-spacing: .035em;
        }

        .modal-location { margin-top: 4px; color: #c3b3ff; }

        .modal-desc {
            max-width: 960px;
            margin: 11px 0 0;
            color: #c6d5e3;
            font-size: .89rem;
            line-height: 1.72;
            white-space: normal;
            overflow-wrap: anywhere;
        }

        .modal-close {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 10;
            display: grid;
            place-items: center;
            width: 43px;
            height: 43px;
            padding: 0 0 2px;
            border: 1px solid rgba(255,255,255,.18);
            border-radius: 50%;
            color: #fff;
            background: rgba(1,7,13,.66);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            box-shadow: 0 10px 30px rgba(0,0,0,.34);
            cursor: pointer;
            font-size: 1.28rem;
            line-height: 1;
            transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
        }

        .modal-close:hover,
        .modal-close:focus-visible {
            transform: rotate(90deg) scale(1.06);
            border-color: rgba(114,215,255,.52);
            background: rgba(38,124,164,.22);
            box-shadow: 0 0 22px rgba(114,215,255,.14);
            outline: none;
        }

        @media (max-width: 720px) {
            .site { width: min(100% - 18px, 1440px); padding-top: 9px; }
            .topbar { top: 7px; flex-direction: column; align-items: stretch; gap: 8px; border-radius: 17px; padding: 10px 12px; }
            .brand-zone { width: 100%; }
            .topbar-status { display: none; }
            .topbar-actions { width: 100%; gap: 6px; margin-left: 0; }
            .mission-clock { flex: 1 1 auto; min-width: 104px; padding: 7px 9px; grid-template-columns: 5px auto; column-gap: 6px; }
            .mission-clock::before { width: 5px; height: 5px; }
            .mission-clock-time { font-size: .68rem; letter-spacing: .035em; }
            .theme-toggle { min-width: 38px; padding: 9px; }
            .theme-label { display: none; }
            .install-app { padding: 9px 10px; font-size: .64rem; }
            .brand-zone { gap: 8px; }
            .france-flag { width: 19px; height: 13px; margin-left: 0; }
            .hero { margin-top: 14px; border-radius: 24px; padding: 42px 22px 48px; }
            .catalogue { margin-top: 14px; padding: 18px 15px 21px; border-radius: 23px; }
            .catalogue-head {
                display: block;
                margin-bottom: 20px;
            }
            .catalogue-title {
                margin-top: 1px;
                font-size: 1.8rem;
                line-height: 1.05;
            }
            .catalogue-subtitle {
                max-width: none;
                margin-top: 11px;
                font-size: .83rem;
                line-height: 1.75;
                letter-spacing: 0;
                text-wrap: pretty;
            }
            .counter {
                display: flex;
                align-items: baseline;
                gap: 7px;
                margin-top: 15px;
                padding-top: 13px;
                border-top: 1px solid rgba(160,205,238,.12);
                text-align: left;
            }
            .counter strong { font-size: 1.4rem; }
            .counter span { font-size: .64rem; letter-spacing: .08em; }
            .messier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
            .messier-card { border-radius: 15px; }
            .card-body { padding: 10px; }
            .object-name {
                overflow: visible;
                font-size: .82rem;
                line-height: 1.35;
                white-space: normal;
                text-overflow: clip;
                overflow-wrap: anywhere;
            }
            .meta { display: block; line-height: 1.5; }
            .meta span { display: block; }
            .meta span:last-child { text-align: left; }
            .capture-date,.capture-location { font-size: .62rem; }
            .contact-grid { grid-template-columns: 1fr; }
            .contact-field.full { grid-column: auto; }
            .modal { padding: 9px; }
            .modal-content {
                width: 100%;
                border-radius: 19px;
                max-height: calc(100dvh - 18px);
                overflow-y: auto;
            }
            .modal-media { min-height: 180px; }
            .modal-img { max-height: 48dvh; }
            .modal-details { padding: 17px 17px 22px; }
            .modal-desc {
                font-size: .84rem;
                line-height: 1.72;
                margin-top: 12px;
            }
            .modal-close { top: 9px; right: 9px; width: 39px; height: 39px; }
            .catalogue { backdrop-filter: none; -webkit-backdrop-filter: none; }
        }

        @media (max-width: 430px) {
            .modal-img { max-height: 43dvh; }
            .modal-title { font-size: 1.22rem; }
            .modal-details { padding: 15px 15px 21px; }
            .modal-desc { font-size: .82rem; line-height: 1.7; }
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                scroll-behavior: auto !important;
                animation-duration: .001ms !important;
                transition-duration: .001ms !important;
            }
        }
    
        /* Harmonisation avec l'administration claire */
        html, body {
            background-color: #07111e !important;
            color-scheme: dark;
        }

        body {
            background:
                radial-gradient(ellipse at 16% -3%, rgba(70,155,255,.20), transparent 34%),
                radial-gradient(ellipse at 88% 18%, rgba(155,110,255,.14), transparent 31%),
                linear-gradient(180deg, rgba(8,21,37,.20), rgba(7,17,30,.82)),
                #07111e !important;
        }

        .topbar,
        .hero,
        .catalogue {
            border-color: rgba(160,205,238,.22);
        }

        .topbar {
            box-shadow: 0 18px 50px rgba(0,0,0,.26);
        }

        .hero {
            background:
                linear-gradient(135deg, rgba(20,45,72,.91), rgba(11,28,48,.76)),
                radial-gradient(circle at 72% 35%, rgba(114,215,255,.16), transparent 30%);
        }

        .catalogue {
            background: linear-gradient(145deg, rgba(17,39,63,.90), rgba(10,27,46,.91));
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        .catalogue-subtitle,
        .progress-top,
        .counter span,
        .filter,
        .meta,
        .modal-date {
            color: #a7b9ca;
        }

        .messier-card {
            background: linear-gradient(145deg, rgba(13,34,56,.96), rgba(8,24,42,.96));
            border-color: rgba(160,205,238,.16);
            box-shadow: none;
        }

        .messier-card.has-photo:hover,
        .messier-card.has-photo:focus-visible {
            border-color: rgba(114,215,255,.48);
            box-shadow: 0 18px 42px rgba(0,0,0,.30), 0 0 25px rgba(77,163,255,.10);
        }

        .image-box {
            background:
                radial-gradient(circle, rgba(114,215,255,.10), transparent 44%),
                #081727;
        }

        .placeholder {
            color: #8ca2b8;
        }

        .placeholder::before {
            color: rgba(114,215,255,.55);
        }

        .card-body {
            background: linear-gradient(180deg, rgba(17,39,63,.32), rgba(10,27,46,.18));
        }

        .object-name {
            color: #f7fbff;
        }

        .meta {
            color: #a9bac9;
        }

        .capture-date {
            color: #8edfff;
            border-top-color: rgba(160,205,238,.13);
        }

        .filter {
            background: rgba(255,255,255,.045);
            border-color: rgba(160,205,238,.15);
        }

        .filter:hover {
            background: rgba(114,215,255,.10);
        }

        .filter.active {
            color: #04131f;
            background: #bdeeff;
            border-color: #bdeeff;
        }

        .progress {
            background: rgba(255,255,255,.10);
        }

        .modal-content {
            background: linear-gradient(145deg, rgba(18,42,67,.98), rgba(10,27,46,.98));
            border-color: rgba(114,215,255,.28);
        }

        .modal-desc {
            color: #c0cfdd;
        }

        footer {
            color: #93a8bb;
        }

        .modal-more {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: fit-content;
            margin-top: 18px;
            padding: 11px 16px;
            border: 1px solid rgba(114, 215, 255, .42);
            border-radius: 999px;
            color: #eafaff;
            background: linear-gradient(135deg, rgba(54, 160, 206, .2), rgba(126, 92, 211, .18));
            font-size: .76rem;
            font-weight: 850;
            letter-spacing: .025em;
            text-decoration: none;
            transition: transform .2s ease, border-color .2s ease, background .2s ease;
        }

        .modal-more:hover,
        .modal-more:focus-visible {
            transform: translateY(-2px);
            border-color: rgba(114, 215, 255, .78);
            background: linear-gradient(135deg, rgba(54, 160, 206, .32), rgba(126, 92, 211, .28));
            outline: none;
        }

        /* Variante claire : le choix est mémorisé localement sur l'appareil. */
        html[data-theme="light"] {
            color-scheme: light;
            --bg: #edf5fa;
            --bg-soft: #f7fbfe;
            --panel: rgba(255,255,255,.88);
            --panel-strong: #ffffff;
            --line: rgba(35,86,122,.19);
            --line-bright: rgba(0,126,173,.42);
            --text: #12283a;
            --muted: #60788c;
            --cyan: #087fae;
            --blue: #176ec3;
            --violet: #704db4;
            --green: #158457;
            --shadow: 0 24px 60px rgba(41,75,99,.14);
            background-color: #edf5fa !important;
        }

        html[data-theme="light"] body {
            color: var(--text);
            background:
                radial-gradient(ellipse at 12% -2%, rgba(55,151,213,.19), transparent 35%),
                radial-gradient(ellipse at 92% 18%, rgba(133,93,202,.12), transparent 30%),
                linear-gradient(180deg, rgba(255,255,255,.44), rgba(237,245,250,.94)),
                #edf5fa !important;
        }

        html[data-theme="light"] body::before {
            background: radial-gradient(circle at 22% 18%, rgba(8,127,174,.07), transparent 27%), radial-gradient(circle at 78% 26%, rgba(112,77,180,.06), transparent 28%);
        }

        html[data-theme="light"] #starfield { opacity: .34; }
        html[data-theme="light"] .topbar {
            background: rgba(255,255,255,.86);
            border-color: rgba(35,86,122,.18);
            box-shadow: 0 15px 40px rgba(36,72,96,.13);
        }
        html[data-theme="light"] .brand { color: #12283a; }
        html[data-theme="light"] .brand-mark {
            color: #075f87;
            border-color: rgba(8,127,174,.35);
            background: radial-gradient(circle,#fff 0 7%,#7edbf5 9% 15%,rgba(8,127,174,.1) 36%,transparent 62%),#edf8fc;
            box-shadow: 0 0 22px rgba(8,127,174,.17);
        }
        html[data-theme="light"] .theme-toggle {
            color: #573797;
            border-color: rgba(112,77,180,.3);
            background: rgba(112,77,180,.08);
        }
        html[data-theme="light"] .mission-clock { background:linear-gradient(145deg,rgba(231,242,246,.94),rgba(204,222,229,.9));border-color:rgba(0,95,121,.22);box-shadow:0 7px 18px rgba(24,40,50,.08) }
        html[data-theme="light"] .mission-clock-time { color:#075f76;text-shadow:none }
        html[data-theme="light"] .install-app { color:#075f87;background:rgba(8,127,174,.07);border-color:rgba(8,127,174,.3) }
        html[data-theme="light"] .hero {
            background: linear-gradient(135deg,rgba(255,255,255,.95),rgba(235,247,252,.9)),radial-gradient(circle at 72% 35%,rgba(8,127,174,.13),transparent 30%);
            border-color: rgba(35,86,122,.18);
        }
        html[data-theme="light"] h1 { background:linear-gradient(120deg,#12283a 15%,#20577b 58%,#087fae);-webkit-background-clip:text;background-clip:text;color:transparent }
        html[data-theme="light"] .hero p { color:#526c81 }
        html[data-theme="light"] .hero p strong { color:#183d58 }
        html[data-theme="light"] .catalogue,
        html[data-theme="light"] .contact-panel {
            color: var(--text);
            background: linear-gradient(145deg,rgba(255,255,255,.94),rgba(243,249,252,.93));
            border-color: rgba(35,86,122,.18);
            box-shadow: var(--shadow);
        }
        html[data-theme="light"] .catalogue-subtitle,
        html[data-theme="light"] .progress-top,
        html[data-theme="light"] .counter span,
        html[data-theme="light"] .filter,
        html[data-theme="light"] .meta,
        html[data-theme="light"] .contact-panel > p { color:#60788c }
        html[data-theme="light"] .messier-card { background:linear-gradient(145deg,#fff,#f1f7fa);border-color:rgba(35,86,122,.15) }
        html[data-theme="light"] .messier-card.has-photo:hover,
        html[data-theme="light"] .messier-card.has-photo:focus-visible { border-color:rgba(8,127,174,.4);box-shadow:0 18px 42px rgba(44,78,103,.17) }
        html[data-theme="light"] .image-box { background:radial-gradient(circle,rgba(8,127,174,.09),transparent 44%),#e5f0f5 }
        html[data-theme="light"] .card-body { background:linear-gradient(180deg,rgba(255,255,255,.54),rgba(236,245,249,.4)) }
        html[data-theme="light"] .object-name { color:#142d40 }
        html[data-theme="light"] .meta { color:#647d91 }
        html[data-theme="light"] .capture-details { border-top-color:rgba(35,86,122,.11) }
        html[data-theme="light"] .capture-date { color:#0879a7 }
        html[data-theme="light"] .capture-location { color:#704db4 }
        html[data-theme="light"] .filter { background:rgba(35,86,122,.045);border-color:rgba(35,86,122,.14) }
        html[data-theme="light"] .filter:hover { color:#17405c;background:rgba(8,127,174,.09) }
        html[data-theme="light"] .filter.active { color:#fff;background:#087fae;border-color:#087fae }
        html[data-theme="light"] .progress { background:rgba(35,86,122,.11) }
        html[data-theme="light"] .like-button { color:#38586f;background:rgba(35,86,122,.045);border-color:rgba(35,86,122,.15) }
        html[data-theme="light"] .contact-field label { color:#27475e }
        html[data-theme="light"] .contact-field input,
        html[data-theme="light"] .contact-field textarea { color:#183247;background:#fff;border-color:rgba(35,86,122,.18) }
        html[data-theme="light"] .empty { color:#647d91;background:rgba(35,86,122,.035);border-color:rgba(35,86,122,.13) }
        html[data-theme="light"] .modal {
            background: rgba(222,235,243,.91);
            backdrop-filter: blur(18px) saturate(1.08);
            -webkit-backdrop-filter: blur(18px) saturate(1.08);
        }
        html[data-theme="light"] .modal::before {
            background: linear-gradient(115deg,transparent 24%,rgba(8,127,174,.09) 48%,transparent 72%);
        }
        html[data-theme="light"] .modal-content {
            scrollbar-color: rgba(8,127,174,.32) transparent;
            border-color: rgba(8,127,174,.3);
            background: linear-gradient(145deg,#fff,#eff7fa);
            box-shadow: 0 42px 110px rgba(37,69,91,.28),0 0 0 1px rgba(255,255,255,.7) inset;
        }
        html[data-theme="light"] .modal-content::before {
            background: linear-gradient(130deg,rgba(8,127,174,.48),transparent 29%,transparent 70%,rgba(112,77,180,.28));
        }
        html[data-theme="light"] .modal-details {
            color:#142d40;
            background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(237,246,250,.99));
        }
        html[data-theme="light"] .modal-title { color:#142d40 }
        html[data-theme="light"] .modal-date { color:#0879a7 }
        html[data-theme="light"] .modal-location { color:#704db4 }
        html[data-theme="light"] .modal-desc { color:#4e687c }
        html[data-theme="light"] .modal-more { color:#123747;background:linear-gradient(135deg,rgba(0,107,132,.12),rgba(98,77,134,.12));border-color:rgba(0,95,121,.3) }
        html[data-theme="light"] footer { color:#617b8f }

        /* Thème clair crépusculaire : lumineux sans fond blanc agressif. */
        html[data-theme="light"] {
            --bg:#98aab7;
            --bg-soft:#b9c6ce;
            --panel:rgba(218,226,230,.94);
            --panel-strong:#e3eaed;
            --line:rgba(19,43,58,.2);
            --line-bright:rgba(0,91,117,.48);
            --text:#142b38;
            --muted:#526874;
            --cyan:#005f79;
            --blue:#285b87;
            --violet:#624d86;
            --green:#246c4e;
            --shadow:0 22px 55px rgba(24,40,50,.18);
            background:#98aab7!important;
        }
        html[data-theme="light"] body {
            background:
                radial-gradient(ellipse at 8% 0%,rgba(191,225,233,.34),transparent 35%),
                radial-gradient(ellipse at 94% 12%,rgba(106,83,142,.2),transparent 31%),
                linear-gradient(180deg,#b6c4cc 0,#9fb0bb 48%,#899ca9 100%)!important;
        }
        html[data-theme="light"] body::before { opacity:.32 }
        html[data-theme="light"] #starfield { opacity:.24;filter:saturate(.7) }
        html[data-theme="light"] .topbar {
            background:rgba(218,228,233,.94);
            border-color:rgba(19,43,58,.2);
            box-shadow:0 14px 38px rgba(20,35,44,.16);
        }
        html[data-theme="light"] .brand { color:#17313f }
        html[data-theme="light"] .brand-text span { color:#5a707c }
        html[data-theme="light"] .brand-mark { color:#eafaff;border-color:rgba(0,95,121,.28);background:radial-gradient(circle,#f2fdff 0 7%,#64b7ca 9% 15%,rgba(24,93,115,.3) 36%,transparent 62%),#2c6478;box-shadow:0 0 20px rgba(31,105,126,.18) }
        html[data-theme="light"] .topbar-status { color:#3f5d6c;background:rgba(255,255,255,.28);border-color:rgba(19,43,58,.14) }
        html[data-theme="light"] .theme-toggle { color:#4f3c73;border-color:rgba(98,77,134,.3);background:rgba(98,77,134,.1) }
        html[data-theme="light"] .theme-toggle:hover,
        html[data-theme="light"] .theme-toggle:focus-visible { color:#352452;background:rgba(98,77,134,.17);border-color:rgba(98,77,134,.45) }
        html[data-theme="light"] .install-app { color:#075f76;background:rgba(0,95,121,.08);border-color:rgba(0,95,121,.26) }
        html[data-theme="light"] .hero {
            background:
                radial-gradient(circle at 82% 20%,rgba(53,126,148,.2),transparent 28%),
                radial-gradient(circle at 15% 95%,rgba(98,77,134,.13),transparent 30%),
                linear-gradient(135deg,rgba(215,226,231,.96),rgba(183,202,211,.94));
            border-color:rgba(19,43,58,.18);
            box-shadow:0 26px 68px rgba(28,43,52,.16);
        }
        html[data-theme="light"] .hero::before { opacity:.22 }
        html[data-theme="light"] h1 { background:linear-gradient(115deg,#152b37 15%,#245f73 62%,#006b84);-webkit-background-clip:text;background-clip:text;color:transparent }
        html[data-theme="light"] .hero p { color:#566b76 }
        html[data-theme="light"] .hero p strong { color:#1f3b49 }
        html[data-theme="light"] .catalogue,
        html[data-theme="light"] .contact-panel {
            background:rgba(216,225,229,.94);
            border-color:rgba(19,43,58,.18);
            box-shadow:var(--shadow);
        }
        html[data-theme="light"] .catalogue-title { color:#1b313d }
        html[data-theme="light"] .counter strong { color:#006b84 }
        html[data-theme="light"] .progress { background:#abbac2 }
        html[data-theme="light"] .progress-bar { box-shadow:0 0 18px rgba(0,107,132,.2) }
        html[data-theme="light"] .messier-card {
            background:#cad6dc;
            border-color:rgba(19,43,58,.18);
            box-shadow:0 8px 24px rgba(24,40,50,.11);
        }
        html[data-theme="light"] .messier-card.has-photo:hover,
        html[data-theme="light"] .messier-card.has-photo:focus-visible { border-color:rgba(0,107,132,.4);box-shadow:0 17px 38px rgba(36,50,57,.14) }
        html[data-theme="light"] .image-box { background:radial-gradient(circle,rgba(0,95,121,.1),transparent 46%),#aebfc7 }
        html[data-theme="light"] .card-body { background:linear-gradient(180deg,#d2dde1,#c7d3d9) }
        html[data-theme="light"] .object-name { color:#172e3a }
        html[data-theme="light"] .status { color:#405a67;background:#b8c6cd;border-color:rgba(19,43,58,.16) }
        html[data-theme="light"] .status.captured { color:#175e40;background:#bcd6c8;border-color:rgba(30,104,72,.28) }
        html[data-theme="light"] .status.target { color:#66571d;background:#d8d0af;border-color:rgba(120,97,24,.26) }
        html[data-theme="light"] .capture-details { border-top-color:rgba(29,53,68,.1) }
        html[data-theme="light"] .capture-date { color:#006b84 }
        html[data-theme="light"] .capture-location { color:#66508f }
        html[data-theme="light"] .filter { color:#405a67;background:#c2cfd5;border-color:rgba(19,43,58,.17) }
        html[data-theme="light"] .filter:hover { color:#003f52;background:#b5cad2 }
        html[data-theme="light"] .filter.active { color:#fff;background:#006b84;border-color:#006b84;box-shadow:0 7px 18px rgba(0,107,132,.18) }
        html[data-theme="light"] .like-button { color:#405863;background:#b9c8cf;border-color:rgba(19,43,58,.18) }
        html[data-theme="light"] .like-button:hover,
        html[data-theme="light"] .like-button:focus-visible,
        html[data-theme="light"] .like-button.is-liked { color:#7d2945;background:#dcbec9;border-color:rgba(125,41,69,.3) }
        html[data-theme="light"] .contact-field label { color:#304b58 }
        html[data-theme="light"] .contact-field input,
        html[data-theme="light"] .contact-field textarea { color:#172e3a;background:#e4eaec;border-color:rgba(19,43,58,.22);box-shadow:inset 0 1px 3px rgba(19,43,58,.05) }
        html[data-theme="light"] .contact-field input:focus,
        html[data-theme="light"] .contact-field textarea:focus { border-color:rgba(0,107,132,.48);box-shadow:0 0 0 3px rgba(0,107,132,.09) }
        html[data-theme="light"] .contact-submit { color:#fff;background:linear-gradient(135deg,#006b84,#245f91);box-shadow:0 10px 24px rgba(0,107,132,.2) }
        html[data-theme="light"] .modal { background:rgba(117,135,146,.86) }
        html[data-theme="light"] .modal::before { background:radial-gradient(circle at 50% 42%,rgba(225,241,246,.32),transparent 54%) }
        html[data-theme="light"] .modal-content { border-color:rgba(19,43,58,.22);background:#cbd7dc;box-shadow:0 36px 95px rgba(17,29,36,.3) }
        html[data-theme="light"] .modal-content::before { background:linear-gradient(130deg,rgba(0,107,132,.24),transparent 29%,transparent 70%,rgba(98,77,134,.18)) }
        html[data-theme="light"] .modal-media { background:radial-gradient(circle at 50% 42%,#dce7eb,#aabcc5) }
        html[data-theme="light"] .modal-details { color:#172e3a;background:linear-gradient(180deg,#d4dfe3,#c5d2d8) }
        html[data-theme="light"] .modal-tag { color:#005f79;background:#b8ccd3;border-color:rgba(0,95,121,.23) }
        html[data-theme="light"] .modal-title { color:#172e3a }
        html[data-theme="light"] .modal-date { color:#006b84 }
        html[data-theme="light"] .modal-location { color:#66508f }
        html[data-theme="light"] .modal-desc { color:#506671 }
        html[data-theme="light"] .modal-more { color:#17313f;background:linear-gradient(135deg,rgba(0,107,132,.13),rgba(98,77,134,.12));border-color:rgba(0,95,121,.3) }
        html[data-theme="light"] .modal-close { color:#17313f;background:rgba(224,234,238,.94);border-color:rgba(19,43,58,.24);box-shadow:0 8px 22px rgba(24,40,50,.18) }
        html[data-theme="light"] footer { color:#334e5b }

/* Messages du formulaire lisibles dans les deux thèmes. */
html[data-theme="light"] .contact-notice.ok { color:#195b3e;border-color:rgba(25,91,62,.3);background:rgba(25,91,62,.08) }
html[data-theme="light"] .contact-notice.error { color:#8d2040;border-color:rgba(141,32,64,.3);background:rgba(141,32,64,.08) }
.contact-submit:disabled { cursor:wait;opacity:.65 }

/* Bandeau fixé à l’écran ; son espace dans la page est mesuré par site-public.js. */
:root { --public-header-height:68px;--public-header-top:max(8px,env(safe-area-inset-top,0px)) }
html { scroll-padding-top:calc(var(--public-header-height) + var(--public-header-top) + 18px) }
.site { overflow:visible;padding-top:0 }
.site > .topbar { position:fixed;top:var(--public-header-top);left:50%;transform:translateX(-50%);width:min(1440px,calc(100% - 32px));margin:0;z-index:60;flex-wrap:wrap }
.site-header-space { height:calc(var(--public-header-height) + var(--public-header-top));pointer-events:none }
.site > .topbar .topbar-actions { min-width:0;flex-wrap:wrap }
.back-to-top { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;min-width:44px;padding:8px 12px;flex-shrink:0;border:1px solid var(--line-bright);border-radius:999px;background:rgba(114,215,255,.1);color:var(--cyan);font-size:.72rem;font-weight:800;text-decoration:none;white-space:nowrap;transition:background .18s ease,box-shadow .18s ease }
.back-to-top:hover,.back-to-top:focus-visible { background:rgba(114,215,255,.2);box-shadow:0 0 18px rgba(114,215,255,.12) }
.back-to-top:focus-visible { outline:2px solid var(--cyan);outline-offset:3px }
html[data-theme="light"] .back-to-top { background:rgba(0,95,121,.08);color:#005f79;border-color:rgba(0,95,121,.3) }
html[data-theme="light"] .back-to-top:hover,html[data-theme="light"] .back-to-top:focus-visible { background:rgba(0,95,121,.16) }
@media(max-width:1100px){.site > .topbar .topbar-status{display:none}}
@media(max-width:720px){
    :root{--public-header-height:112px}
    .site > .topbar{width:calc(100% - 18px)}
    .back-to-top{padding:8px;font-size:1.15rem}
    .back-to-top-label{display:none}
}
@media(prefers-reduced-motion:reduce){.back-to-top{transition:none}}

/* Introduction compacte : titre et présentation côte à côte sur grand écran. */
.site > main > .hero { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:12px 32px;padding:26px 32px;border-radius:24px }
.site > main > .hero .hero-kicker { grid-column:1;margin:0;font-size:.66rem }
.site > main > .hero h1 { grid-column:1;margin:0;max-width:100%;font-size:clamp(2rem,3.5vw,3.4rem);line-height:1.06;overflow-wrap:anywhere }
.site > main > .hero p { grid-column:2;grid-row:1 / 3;align-self:center;margin:0;font-size:1rem;line-height:1.65 }
@media(max-width:800px){
    .site > main > .hero { grid-template-columns:minmax(0,1fr);padding:24px 22px;gap:12px }
    .site > main > .hero p { grid-column:1;grid-row:auto;font-size:.95rem }
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
