/* ==========================================================================
   Portail CSE : design system
   ========================================================================== */
@font-face {
    font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("../fonts/inter-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #f3f7f8;
    --surface: #ffffff;
    --surface-2: #ecf3f4;
    --ink: #16263a;
    --ink-2: #3b4b5f;
    --muted: #64768a;
    --line: #dce7e9;
    --brand: #0b8a91;
    --brand-2: #2bb5ad;
    --brand-soft: #e0f4f4;
    --brand-ink: #09646a;
    --teal: #2f7de1;
    --teal-soft: #e1edfc;
    --coral: #f2663f;
    --coral-soft: #ffe9e2;
    --green: #16a269;
    --green-soft: #dcf5ea;
    --amber: #c77d0a;
    --amber-soft: #fff1d6;
    --red: #d6405a;
    --red-soft: #fde4e8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(24, 28, 58, .06), 0 1px 3px rgba(24, 28, 58, .05);
    --shadow: 0 8px 24px -8px rgba(24, 28, 58, .14), 0 2px 6px rgba(24, 28, 58, .05);
    --shadow-lg: 0 24px 60px -20px rgba(10, 90, 100, .28);
    --hero: linear-gradient(135deg, #0a7f91 0%, #12a0ae 55%, #4cc9b0 130%);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c1517; --surface: #142126; --surface-2: #1b2d33; --ink: #e8f1f2; --ink-2: #c3d3d6; --muted: #8ea3a8;
        --line: #243a40; --brand: #3cc7cd; --brand-2: #6fe0d4; --brand-soft: #0f3336; --brand-ink: #a0e8eb;
        --teal: #6aa8f0; --teal-soft: #16283f; --coral: #ff8a68; --coral-soft: #3d2420;
        --green: #3ccf8e; --green-soft: #12362a; --amber: #f0b44c; --amber-soft: #3a2d12;
        --red: #ff7088; --red-soft: #3d1c25;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 8px 24px -8px rgba(0, 0, 0, .6);
        --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
        --hero: linear-gradient(135deg, #07525f 0%, #0b7c8a 55%, #1d8f7e 130%);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.wrap { max-width: 1800px; margin: 0 auto; padding: 0 clamp(16px, 2.6vw, 48px); }
.page { padding-top: 32px; padding-bottom: 64px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -.02em; flex: none; }
.brand:hover { color: var(--ink); }
.brand-logo { height: 48px; width: auto; max-width: 260px; display: block; }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--hero); color: #fff; display: grid; place-items: center;
        font-weight: 800; font-size: 1.25rem; box-shadow: 0 6px 16px -6px rgba(11, 138, 145, .55); }
.brand-name { font-size: 1.1rem; max-width: 200px; line-height: 1.15; }

.searchbar { position: relative; flex: 1; max-width: 520px; min-width: 160px; }
.searchbar input[type=search] { border: 0; border-bottom: 2px solid color-mix(in srgb, var(--brand) 50%, transparent); border-radius: 0; background: transparent;
                                padding: 10px 36px 10px 4px; font-size: .95rem; box-shadow: none; }
.searchbar input[type=search]:hover, .searchbar input[type=search]:focus { border-color: var(--brand); box-shadow: none; }
.searchbar input::placeholder { color: var(--muted); opacity: .8; }
.searchbar button { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.15rem; padding: 6px; }
.searchbar button:hover { color: var(--brand); }

#mainnav { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 20px; border-radius: 999px; border: 1.5px solid var(--brand); color: var(--brand);
        background: transparent; font-weight: 600; font-size: .9rem; text-decoration: none; transition: background .15s, color .15s; white-space: nowrap; }
.pill:hover { background: var(--brand-soft); color: var(--brand-ink); }
.pill.active { background: var(--brand); color: #fff; }
.pill.warm { border-color: var(--coral); color: var(--coral); }
.pill.warm:hover { background: var(--coral-soft); color: var(--coral); }
.pill.warm.active { background: var(--coral); color: #fff; }
.pill.off { border-color: var(--line); color: var(--muted); cursor: not-allowed; opacity: .7; }
.pill.off:hover { background: transparent; color: var(--muted); }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px;
          color: var(--ink); cursor: pointer; font-size: 1.2rem; place-items: center; }

.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; }
.dd summary::-webkit-details-marker { display: none; }
.tool { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink-2); font-size: 1.5rem; transition: background .15s, color .15s; }
.tool:hover, .dd[open] > .tool { background: var(--brand-soft); color: var(--brand); }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 60; background: var(--surface); border: 1px solid var(--line);
        border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who strong { display: block; }
.menu .who span { font-size: .82rem; color: var(--muted); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2);
                        background: none; border: 0; font: inherit; font-size: .93rem; cursor: pointer; width: 100%; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); }
.menu .danger { color: var(--red); }
.menu form { margin: 0; }

.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8rem;
          letter-spacing: .02em; flex: none; background: linear-gradient(135deg, #0b8a91, #35c9c0); }
.avatar.c1 { background: linear-gradient(135deg, #2f7de1, #5ac8fa); }
.avatar.c2 { background: linear-gradient(135deg, #f2663f, #ffa24d); }
.avatar.c3 { background: linear-gradient(135deg, #d6405a, #ff7aa0); }
.avatar.c4 { background: linear-gradient(135deg, #6a5ae0, #9d8cff); }
.avatar.c5 { background: linear-gradient(135deg, #16a269, #8bd84f); }
.avatar.lg { width: 84px; height: 84px; font-size: 1.7rem; box-shadow: var(--shadow); }
.avatar.md { width: 46px; height: 46px; font-size: 1rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .72rem; }

/* ---------- Bandeau photo ---------- */
.banner { position: relative; height: clamp(140px, 19vw, 260px); overflow: hidden; background: var(--surface-2); }
.banner.tall { height: clamp(200px, 29vw, 400px); }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0, 0, 0, .12)); }

/* ---------- Titres de page ---------- */
.ptitle { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 0; text-transform: uppercase; font-size: clamp(1.4rem, 2.6vw, 1.9rem);
          font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.ptitle .pi { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--surface); font-size: 1.35rem; flex: none; }
.ptitle small { font-weight: 500; font-size: .62em; color: var(--muted); letter-spacing: .02em; }
.infoband { margin-top: 14px; padding: 12px 16px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
            background: var(--teal-soft); color: var(--ink); font-weight: 500; font-size: .95rem; }
.page-head .infoband { width: 100%; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
       background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none;
       box-shadow: 0 6px 16px -8px var(--brand); transition: transform .12s, box-shadow .15s, background .15s; }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 22px -10px var(--brand); }
.btn:active { transform: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { color: var(--ink); border-color: var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand-ink); transform: none; box-shadow: none; }
.btn.light { background: #fff; color: #09646a; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.btn.light:hover { color: #09646a; }
.btn.outline-light { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); box-shadow: none; }
.btn.outline-light:hover { background: rgba(255, 255, 255, .22); }
.btn.danger { background: var(--red); box-shadow: 0 6px 16px -8px var(--red); }
.btn.sm { padding: 7px 13px; font-size: .86rem; border-radius: 10px; }
.btn.block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
           color: var(--ink-2); cursor: pointer; text-decoration: none; transition: .15s; font: inherit; padding: 0; }
.iconbtn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.iconbtn.danger:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
form.inline { display: inline; margin: 0; }
.actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

/* ---------- Notifications ---------- */
.toasts { position: fixed; top: 82px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
         border: 1px solid var(--line); border-left: 4px solid var(--green); animation: slide .3s ease-out; transition: opacity .3s, transform .3s; }
.toast.err { border-left-color: var(--red); }
.toast .ico { margin-top: 3px; color: var(--green); }
.toast.err .ico { color: var(--red); }
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 2px; }
.toast.out { opacity: 0; transform: translateX(20px); }
@keyframes slide { from { opacity: 0; transform: translateX(30px); } }
.busy-toast { border-left-color: var(--brand); align-items: center; }
.spinner { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
form.busy .iconbtn { opacity: .5; cursor: progress; }
.callout { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius); margin-bottom: 24px;
           background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.callout.notice-top { margin-top: 24px; }
.callout .ico { font-size: 1.5rem; color: var(--amber); }
.callout .txt { flex: 1; min-width: 220px; }
.callout code { display: inline-block; margin-top: 4px; font-size: 1.15rem; padding: 6px 12px; background: var(--surface); border: 1px dashed var(--amber);
                border-radius: 10px; letter-spacing: .06em; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; user-select: all; }

/* ---------- Cartes & utilitaires ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card.flat { box-shadow: none; }
.card h2, .card h3 { margin-bottom: .6em; }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--brand); margin-bottom: 8px; display: block; }
.breadcrumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: 14px; }
.breadcrumb:hover { color: var(--brand); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge.off { background: var(--red-soft); color: var(--red); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ico { font-size: 2.6rem; color: var(--brand-2); opacity: .7; margin-bottom: 12px; display: block; margin-inline: auto; }
.empty h3 { color: var(--ink); }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero); color: #fff; padding: 84px 0 110px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }
.hero::before { width: 520px; height: 520px; right: -120px; top: -180px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%); }
.hero::after { width: 420px; height: 420px; left: -140px; bottom: -220px; background: radial-gradient(circle, rgba(31, 182, 207, .45), transparent 70%); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); letter-spacing: -.035em; margin-bottom: .4em; }
.hero p.lead { font-size: 1.15rem; opacity: .92; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16);
              border: 1px solid rgba(255, 255, 255, .28); font-size: .85rem; font-weight: 500; margin-bottom: 22px; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transform: rotate(-3deg); }
.hero-art .tile { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); border-radius: 18px; padding: 18px;
                  backdrop-filter: blur(6px); display: flex; flex-direction: column; gap: 10px; font-weight: 600; font-size: .95rem; }
.hero-art .tile:nth-child(2) { transform: translateY(24px); }
.hero-art .tile:nth-child(4) { transform: translateY(24px); }
.hero-art .tile .ico { font-size: 1.7rem; }
.hero-art .tile small { font-weight: 400; opacity: .8; }
.hero.compact { padding: 56px 0 84px; }
.hero.compact .wrap { grid-template-columns: 1fr; }
.pull-up { margin-top: -56px; position: relative; z-index: 2; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
           box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s; position: relative; }
a.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.feature .fi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 8px; background: var(--brand-soft); color: var(--brand); }
.feature .fi.teal { background: var(--teal-soft); color: var(--teal); }
.feature .fi.coral { background: var(--coral-soft); color: var(--coral); }
.feature .fi.green { background: var(--green-soft); color: var(--green); }
.feature .fi.amber { background: var(--amber-soft); color: var(--amber); }
.feature h3 { margin: 0; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature .soon { position: absolute; top: 18px; right: 18px; }
.feature.disabled { box-shadow: var(--shadow-sm); background: var(--surface-2); }
.feature.disabled h3 { color: var(--ink-2); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 48px 0 20px; }
.section-head h2 { margin: 0; font-size: 1.5rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
.link-arrow .ico { transition: transform .15s; }
.link-arrow:hover .ico { transform: translateX(4px); }

/* ---------- Articles ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
        box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.post .thumb { height: 150px; display: grid; place-items: center; color: rgba(255, 255, 255, .92); font-size: 2.6rem; position: relative; overflow: hidden; }
.post .thumb::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -50px; bottom: -80px; background: rgba(255, 255, 255, .16); }
.post .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post h3 { margin: 0; font-size: 1.12rem; }
.post p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.post .meta { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.post .meta span { display: inline-flex; align-items: center; gap: 5px; }
.post.featured { grid-column: span 3; flex-direction: row; }
.post.featured .thumb { height: auto; min-height: 260px; flex: 0 0 42%; font-size: 4rem; }
.post.featured .body { padding: 32px; justify-content: center; }
.post.featured h3 { font-size: 1.7rem; }
.post.featured p { flex: none; font-size: 1.02rem; }
.g0 { background: linear-gradient(135deg, #0b8a91, #35c9c0); }
.g1 { background: linear-gradient(135deg, #2f7de1, #5ccbfa); }
.g2 { background: linear-gradient(135deg, #f2663f, #ffb04d); }
.g3 { background: linear-gradient(135deg, #d6405a, #ff86a5); }
.g4 { background: linear-gradient(135deg, #6a5ae0, #9d8cff); }
.g5 { background: linear-gradient(135deg, #16a269, #a1dd54); }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 36px; }

.article-hero { color: #fff; padding: 48px 0 72px; position: relative; overflow: hidden; }
.article-hero::after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; right: -120px; top: -200px; background: rgba(255, 255, 255, .14); }
.article-hero .wrap { position: relative; z-index: 1; max-width: 820px; }
.article-hero .breadcrumb { color: rgba(255, 255, 255, .8); }
.article-hero .breadcrumb:hover { color: #fff; }
.article-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -.03em; }
.article-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; opacity: .92; font-size: .92rem; }
.article-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-body { max-width: 760px; margin: -40px auto 0; position: relative; z-index: 2; padding: 40px 44px; font-size: 1.08rem; line-height: 1.8; }
.prose { white-space: pre-line; overflow-wrap: anywhere; color: var(--ink-2); }
.lead-in { font-size: 1.2rem; color: var(--ink); font-weight: 500; line-height: 1.6; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.author { display: flex; align-items: center; gap: 14px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .95rem; }

/* ---------- Connexion ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 32px 20px; position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 15% 10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
                                                   radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 60%); }
.auth-card { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(900px, 100%); background: var(--surface); border-radius: 24px;
             box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.auth-side { background: var(--hero); color: #fff; padding: 44px 38px; display: flex; flex-direction: column; gap: 22px; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -120px; bottom: -120px; background: rgba(255, 255, 255, .13); }
.auth-side h2 { font-size: 1.7rem; margin: 0; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.auth-side li { display: flex; gap: 12px; align-items: center; opacity: .95; }
.auth-side li .ico { background: rgba(255, 255, 255, .18); border-radius: 10px; padding: 8px; width: 36px; height: 36px; }
.auth-form { padding: 44px 38px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 1.7rem; margin-bottom: .2em; }
.auth-card.single { grid-template-columns: 1fr; width: min(480px, 100%); }
.auth-card.single .auth-form { padding: 40px 36px; }

/* ---------- Formulaires ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 200px; }
.field > span.lbl { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input { position: relative; display: block; }
.input .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input input[type] { padding-left: 42px; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], select, textarea {
    font: inherit; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
    transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; line-height: 1.6; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.err-msg, small.err { color: var(--red); font-size: .82rem; font-weight: 500; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: .92rem; font-weight: 500; }
.alert .ico { margin-top: 2px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer;
                transition: background .2s; flex: none; padding: 0; border: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(20px); }
.switch small { color: var(--muted); font-weight: 400; display: block; }
.form-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---------- Tableaux ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-tools { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.table-tools .input { flex: 1; min-width: 200px; max-width: 360px; }
.table-tools select { min-width: 160px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 13px 20px; background: var(--surface-2); white-space: nowrap; }
td { padding: 14px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
td.right, th.right { text-align: right; }
.who-cell { display: flex; align-items: center; gap: 12px; }
.who-cell a, .who-cell strong { font-weight: 600; color: var(--ink); text-decoration: none; }
.who-cell a:hover { color: var(--brand); }
.who-cell small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- Administration ---------- */
.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 64px; align-items: start; }
.side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm);
        max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; }
.side h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 12px 10px 6px; }
.side h4:not(:first-child) { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.side h4:first-child { margin-top: 4px; }
.side a, .side .soon-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .94rem; }
.side a:hover { background: var(--surface-2); color: var(--ink); }
.side a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side .soon-item { opacity: .55; cursor: not-allowed; }
.side .soon-item em { margin-left: auto; font-style: normal; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
                      background: var(--surface-2); padding: 2px 7px; border-radius: 999px; }
.stat { display: flex; gap: 16px; align-items: center; padding: 20px; text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s; }
a.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.stat .si { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.5rem; flex: none; background: var(--brand-soft); color: var(--brand); }
.stat .si.teal { background: var(--teal-soft); color: var(--teal); }
.stat .si.coral { background: var(--coral-soft); color: var(--coral); }
.stat .si.green { background: var(--green-soft); color: var(--green); }
.stat .si.amber { background: var(--amber-soft); color: var(--amber); }
.stat .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; display: block; }
.stat .lbl { display: block; color: var(--muted); font-size: .88rem; line-height: 1.3; margin-top: 4px; }
.list { display: flex; flex-direction: column; }
.list .item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list .item:first-child { border-top: 0; padding-top: 0; }
.list .item:hover strong { color: var(--brand); }
.list .item .grow { flex: 1; min-width: 0; }
.list .item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item small { color: var(--muted); }
.roadmap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted); font-size: .9rem; font-weight: 500; }

/* ---------- Profil / ayants droit ---------- */
.profile-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 28px; }
.profile-head .info { flex: 1; min-width: 220px; }
.profile-head h1 { margin: 0 0 6px; font-size: 1.7rem; }
.contact-line { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .93rem; margin-top: 8px; }
.contact-line span { display: inline-flex; align-items: center; gap: 7px; }
.bene { display: flex; gap: 14px; align-items: center; padding: 18px; }
.bene strong { display: block; }
.bene small { color: var(--muted); }
.bureau-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 24px 26px; transition: transform .18s, box-shadow .18s; }
.bureau-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bureau-card h3 { margin: 14px 0 2px; }
.bureau-card .contacts { display: flex; gap: 8px; margin-top: 16px; }

/* ---------- Erreur ---------- */
.error-page { text-align: center; padding: 96px 20px; }
.error-page .code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; background: var(--hero); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .news { grid-template-columns: repeat(2, 1fr); }
    .post.featured { grid-column: span 2; }
    .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .split { grid-template-columns: 1fr; }
    .admin { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .side { position: static; flex-direction: row; overflow-x: auto; padding: 8px; max-height: none; }
    .side h4 { display: none; }
    .side a, .side .soon-item { white-space: nowrap; }
}
@media (max-width: 1020px) {
    .bar { flex-wrap: wrap; gap: 12px; padding-top: 0; padding-bottom: 12px; }
    .top:not(.has-logo) .bar { padding-top: 14px; }
    .burger { display: grid; }
    .searchbar { order: 3; flex: 1 0 100%; max-width: none; }
    #mainnav { display: none; order: 4; flex: 1 0 100%; flex-wrap: wrap; margin-left: 0; padding-bottom: 6px; }
    #mainnav.open { display: flex; }
    .menu { right: auto; left: 0; }
}
@media (max-width: 760px) {
    .auth-card { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .news { grid-template-columns: 1fr; }
    .post.featured { grid-column: auto; flex-direction: column; }
    .post.featured .thumb { min-height: 160px; flex: none; }
    .article-body { padding: 26px 22px; margin-inline: 12px; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 84px; }
    .toasts { top: 76px; right: 12px; }
    th, td { padding: 12px 14px; }
    .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Compléments ---------- */
.notice-inline { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .16); display: inline-block; font-size: .92rem; }
.gap-top { margin-top: 24px; }
.section-head.tight { margin: 0 0 16px; }
.badge.soon { position: absolute; top: 18px; right: 18px; background: var(--amber-soft); color: var(--amber); }
.card.form { gap: 18px; }
.split > .table-card { align-self: start; }
.table-card .empty { border: 0; box-shadow: none; }

.post .link-arrow { color: var(--brand); font-size: .92rem; margin-top: 4px; }
.table-card td { white-space: nowrap; }
.list .item .badge { flex: none; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main#main { flex: 1; }

.adm-main { min-width: 0; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } .page-head .actions { width: 100%; } }
@media (max-width: 760px) { .post.featured .body { padding: 20px 22px 22px; } .post.featured h3 { font-size: 1.3rem; } }
#mainnav > a.btn { color: #fff; background: var(--brand); padding: 9px 18px; margin-left: 6px; }
#mainnav > a.btn:hover { background: var(--brand); color: #fff; }

/* ---------- Fond blanc façon portail, bandeau et accueil ---------- */
.page { padding-top: 36px; padding-bottom: 72px; }
.admin { padding-top: 36px; }
.auth-wrap { min-height: calc(100vh - 84px); }
.welcome { display: flex; gap: 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 32px; margin-top: -90px; position: relative; z-index: 2; box-shadow: var(--shadow); }
.welcome .lead { font-size: 1.05rem; color: var(--ink-2); max-width: 46em; margin: 14px 0 0; }
.welcome .infoband { margin-top: 14px; }
.ptitle.sm-title { font-size: 1.6rem; }
.ptitle.sm-title .pi { display: none; }
h2.ptitle { font-size: 1.25rem; }
h2.ptitle .pi { width: 38px; height: 38px; font-size: 1.1rem; }
.section-head h2 { margin: 0; }
.article-body { max-width: 860px; margin: 0 auto 24px; padding: 36px 44px; }
.article-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-transform: uppercase; letter-spacing: -.01em; font-weight: 800; margin-bottom: 12px; }
.meta-line { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.article-body .infoband { margin: 0 0 24px; font-size: 1rem; }
.article-body .prose { font-size: 1.05rem; line-height: 1.8; }
.pill.off { pointer-events: auto; }
.page-head > div:first-child { flex: 1; min-width: 280px; }
.searchbar { min-width: 230px; }
.bar { gap: 22px; }
@media (max-width: 1020px) { .searchbar { min-width: 0; } }
.link-arrow { white-space: nowrap; }
.field.field-zip { flex: 0 0 150px; min-width: 120px; }
.searchbar { min-width: 180px; } @media (max-width: 1020px) { .searchbar { min-width: 0; } }

/* ---------- En-tête dans la charte du logo ----------
   Le logo touche les bords de la barre : le turquoise se prolonge à gauche jusqu'au bord de la page,
   les bandes orange et turquoise en biais sont celles du logo, et le fond reste blanc à droite. */
.top { border-bottom: 0; background: #fff; }
.top .bar { position: relative; z-index: 1; min-height: var(--bar-h); gap: 22px; }
.top.has-logo::before { content: ""; position: absolute; left: 0; top: 0; height: var(--bar-h); background: #4190a2;
                        width: max(22px, calc((100% - 1120px) / 2 + 22px)); }
:root { --logo-h: 48px; --bar-h: 76px; }
.brand-logo { height: var(--logo-h); max-width: none; }
.top .pill { padding: 7px 16px; }
.searchbar { min-width: 150px; }
/* le logo est blanc à droite : l'en-tête reste clair même en thème sombre */
@media (prefers-color-scheme: dark) {
    .top { --surface: #ffffff; --surface-2: #ecf3f4; --ink: #16263a; --ink-2: #3b4b5f; --muted: #64768a; --line: #dce7e9;
           --brand: #0b8a91; --brand-soft: #e0f4f4; --brand-ink: #09646a; --coral: #f2663f; --coral-soft: #ffe9e2; }
}
@media (max-width: 1020px) { .searchbar { min-width: 0; } }
.top .bar { min-height: var(--bar-h); }
@media (max-width: 1020px) { .top .bar { min-height: 0; } }
.brand-art { display: block; height: var(--bar-h); width: auto; flex: none; }

/* Recherche + navigation + icônes regroupées à droite du bandeau */
.searchbar { flex: 0 1 280px; margin-left: auto; max-width: none; }
#mainnav { margin-left: 0; }
@media (max-width: 1020px) { .searchbar { flex: 1 0 100%; margin-left: 0; } }

/* En-tête pleine largeur : logo collé au bord gauche, recherche + boutons + icônes collés à droite */
.top.has-logo .bar { max-width: none; padding-left: 0; padding-right: 28px; }
.top.has-logo::before { display: none; }
@media (max-width: 1020px) { .top.has-logo .bar { padding-right: 16px; } }

/* Logo légèrement décalé du bord gauche, le turquoise se prolonge jusqu'au bord de la page */
.top.has-logo .bar { padding-left: 48px; }
.top.has-logo::before { display: block; width: 50px; }
@media (max-width: 1020px) { .top.has-logo .bar { padding-left: 24px; } .top.has-logo::before { width: 26px; } }

/* Sans barre de recherche (visiteur), la navigation, donc "Se connecter", reste à droite */
#mainnav { margin-left: auto; }
.searchbar ~ #mainnav { margin-left: 0; }
@media (max-width: 1020px) {
    .top:not(:has(.searchbar)) .burger { display: none; }
    .top:not(:has(.searchbar)) #mainnav { display: flex; order: 0; flex: 0 0 auto; margin-left: auto; padding-bottom: 0; }
}

/* ---------- Rendez-vous avec le bureau ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; }
.filter { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
          color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.filter:hover { border-color: var(--brand); color: var(--brand); }
.filter.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.daycard { margin-bottom: 18px; }
.daycard h2.day { font-size: 1.15rem; margin-bottom: 14px; }
.slots { display: flex; flex-wrap: wrap; gap: 10px; }
.slot { display: flex; flex-direction: column; align-items: center; min-width: 108px; padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--brand);
        color: var(--brand); text-decoration: none; transition: background .15s, color .15s, transform .12s; }
.slot strong { font-size: 1.1rem; }
.slot small { color: var(--muted); font-size: .76rem; }
.slot:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.slot:hover small { color: rgba(255, 255, 255, .85); }
.static { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.summary .when { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.summary .hours, .rdv-card .hours { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.rdv-card .when { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.done { max-width: 620px; margin: 24px auto; text-align: center; padding: 36px 32px; }
.done h1 { text-transform: uppercase; font-size: 1.6rem; }
.big-check { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 1.9rem; margin-bottom: 12px; }
.big-check.warn { background: var(--amber-soft); color: var(--amber); }
.details { display: inline-flex; flex-direction: column; gap: 8px; text-align: left; margin: 12px 0 18px; padding: 16px 20px; border-radius: 8px; background: var(--teal-soft); }
.details p { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 500; text-transform: none; }
.center-foot { justify-content: center; }
.rdv-row .time { min-width: 120px; }
.rdv-row .grow small { margin-left: 6px; }

/* Première lettre des dates en majuscule, le reste inchangé (« Mercredi 28 octobre 2026 ») */
.daycard h2.day::first-letter, .summary .when::first-letter, .rdv-card .when::first-letter { text-transform: uppercase; }
.details p span.cap::first-letter { text-transform: uppercase; }

/* ---------- Photos de profil ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; margin-top: 20px; }
.photo-card > div { flex: 1 1 320px; }
.photo-card h3 { margin-bottom: 4px; }
.photo-card p { margin: 0; font-size: .92rem; }
.photo-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.photo-form input[type=file] { font: inherit; font-size: .88rem; max-width: 260px; }
.photo-form input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: .86rem; padding: 7px 14px; margin-right: 10px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.photo-form input[type=file]::file-selector-button:hover { border-color: var(--brand); color: var(--brand); }

/* Bouton Accueil : pastille ronde avec une maison, avant « Actualités » */
.pill.round { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 1.2rem; }
@media (max-width: 1020px) { .pill.round { width: auto; height: auto; padding: 7px 16px; } .pill.round::after { content: "Accueil"; font-size: .9rem; } }

/* ---------- Sondages ---------- */
.polls { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.polls-title { font-size: 1.1rem; margin: 8px 0 0; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.home-polls { margin-top: 28px; }
.narrow-page { max-width: 760px; }
.poll { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.poll-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.poll-time { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.poll-q { margin: 0; font-size: 1.25rem; }
.poll-q a { color: var(--ink); text-decoration: none; }
.poll-q a:hover { color: var(--brand); }
.poll-desc { margin: 0; white-space: pre-line; color: var(--ink-2); overflow-wrap: anywhere; }
.poll-form { display: flex; flex-direction: column; gap: 16px; }
.choices { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.choice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer;
          background: var(--surface); transition: border-color .15s, background .15s; font-weight: 500; }
.choice:hover { border-color: var(--brand); }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.poll-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.poll-actions small { display: inline-flex; align-items: center; gap: 6px; }
.poll-thanks { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-radius: 8px; background: var(--green-soft); color: var(--green); font-weight: 600; }
.results { display: flex; flex-direction: column; gap: 14px; }
.result-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-weight: 500; }
.meter { height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.meter svg { display: block; width: 100%; height: 100%; }
.meter rect { fill: var(--brand); }
.result:nth-child(6n+2) .meter rect { fill: #2f7de1; }
.result:nth-child(6n+3) .meter rect { fill: #f59301; }
.result:nth-child(6n+4) .meter rect { fill: #16a269; }
.result:nth-child(6n+5) .meter rect { fill: #d6405a; }
.result:nth-child(6n+6) .meter rect { fill: #6a5ae0; }
.results .total { margin: 4px 0 0; }
.block { display: block; }
.wrap-cell { white-space: normal !important; min-width: 220px; }
.warn-band { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.stat-small { font-size: 1.35rem !important; }
.option-list, .option-fixed { display: flex; flex-direction: column; gap: 8px; }
.option-row { display: flex; gap: 8px; align-items: center; }
.option-row input { flex: 1; }
.option-row.fixed { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-weight: 500; }
.results-card h3 { margin-bottom: 8px; }

/* ---------- Accueil : bienvenue et accès rapides sur la photo ---------- */
.banner.has-content { height: clamp(330px, 36vw, 460px); }
.banner.has-content img { position: absolute; inset: 0; }
.banner.has-content::after { height: 75%; background: linear-gradient(transparent, rgba(6, 40, 52, .62)); }
.banner-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding-top: 34px; padding-bottom: 28px; }
.banner-hello { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.banner-hello h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.03em; margin: 0 0 4px; }
.banner-hello p { margin: 0; font-size: clamp(1rem, 1.8vw, 1.25rem); opacity: .95; }
.hero-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.hero-tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; color: #fff; text-decoration: none;
             background: rgba(8, 52, 66, .36); border: 1px solid rgba(255, 255, 255, .42); backdrop-filter: blur(16px) saturate(1.5);
             -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .55);
             transition: transform .18s, background .18s, border-color .18s; }
.hero-tile:hover { color: #fff; background: rgba(8, 52, 66, .52); border-color: rgba(255, 255, 255, .75); transform: translateY(-4px); }
.hero-tile .ti { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem;
                 background: rgba(255, 255, 255, .24); }
.hero-tile strong { display: block; font-size: 1rem; line-height: 1.25; }
.hero-tile small { display: block; font-size: .82rem; opacity: .88; line-height: 1.3; margin-top: 2px; }
.hero-tile.soon { opacity: .7; cursor: default; }
.hero-tile.soon:hover { transform: none; background: rgba(8, 52, 66, .36); border-color: rgba(255, 255, 255, .42); }
@media (max-width: 760px) {
    .banner.has-content { height: auto; min-height: 420px; }
    .banner-content { padding-top: 24px; padding-bottom: 20px; gap: 24px; height: auto; }
    .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .hero-tile .ti { width: 40px; height: 40px; }
}
@media (prefers-color-scheme: dark) { .hero-tile { background: rgba(4, 28, 36, .5); } }
.banner.has-content::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 60%; z-index: 1; pointer-events: none;
    background: linear-gradient(rgba(6, 40, 52, .55), transparent); }
.banner-hello { text-shadow: 0 2px 14px rgba(0, 0, 0, .55), 0 1px 2px rgba(0, 0, 0, .4); }

/* Accueil : photo moins haute, cartes plus claires, pastilles d'icônes blanches */
.banner.has-content { height: clamp(250px, 26vw, 340px); }
.banner.has-content::after { height: 60%; background: linear-gradient(transparent, rgba(6, 40, 52, .38)); }
.banner.has-content::before { height: 55%; background: linear-gradient(rgba(6, 40, 52, .42), transparent); }
.banner-content { padding-top: 26px; padding-bottom: 22px; gap: 14px; }
.banner-hello h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
.banner-hello p { font-size: clamp(.95rem, 1.5vw, 1.1rem); }
.hero-tile { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .6); padding: 14px 16px;
             backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); box-shadow: 0 12px 28px -16px rgba(0, 0, 0, .45); }
.hero-tile:hover { background: rgba(255, 255, 255, .34); border-color: rgba(255, 255, 255, .9); }
.hero-tile strong, .hero-tile small { text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero-tile .ti { background: rgba(255, 255, 255, .94); color: var(--brand); width: 44px; height: 44px; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); }
.hero-tile.soon { opacity: .85; }
.hero-tile.soon:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .6); }
@media (max-width: 760px) {
    .banner.has-content { height: auto; min-height: 340px; }
    .banner-content { padding-top: 20px; padding-bottom: 16px; gap: 18px; }
}
@media (prefers-color-scheme: dark) { .hero-tile { background: rgba(255, 255, 255, .16); } }
.hero-tile small { opacity: 1; font-weight: 500; }

/* Photo d'accueil encore un peu plus basse ; elle n'existe que sur l'accueil */
.banner.tall { height: clamp(170px, 20vw, 260px); }
.banner.has-content { height: clamp(220px, 22vw, 285px); }
.page { padding-top: 32px; }
@media (max-width: 760px) { .banner.has-content { height: auto; min-height: 320px; } }

/* ---------- Procès-verbaux ---------- */
.hero-tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.doc-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 16px; }
.doc-search .input { flex: 1 1 280px; max-width: 440px; }
.docs { display: flex; flex-direction: column; }
.doc-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc-row:first-child { border-top: 0; padding-top: 0; }
.doc-ico { flex: none; width: 52px; height: 58px; border-radius: 10px; background: var(--red-soft); color: var(--red); display: grid; place-items: center;
           align-content: center; font-size: 1.5rem; position: relative; }
.doc-ico em { font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .06em; line-height: 1; margin-top: -2px; }
.doc-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-info strong { overflow-wrap: anywhere; }
.doc-desc { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cap::first-letter { text-transform: uppercase; }
.file-input { padding: 10px; }
.file-input::file-selector-button { font: inherit; font-weight: 600; font-size: .86rem; padding: 7px 14px; margin-right: 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.file-input::file-selector-button:hover { border-color: var(--brand); color: var(--brand); }
.current-file { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; }

/* Cinq cases sur la photo : plus compactes, « Procès-verbaux » ne se coupe plus */
.nowrap { white-space: nowrap; }
@media (min-width: 761px) {
    .hero-tiles { gap: 12px; }
    .hero-tile { padding: 12px 12px; gap: 10px; }
    .hero-tile .ti { width: 40px; height: 40px; font-size: 1.25rem; border-radius: 12px; }
    .hero-tile strong { font-size: .93rem; }
    .hero-tile small { font-size: .78rem; }
}
@media (max-width: 760px) {
    .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Jeux ---------- */
.games-home { margin-top: 28px; }
.game-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.game-tile { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
             box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.game-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--ink); }
.game-tile .gi, .game-row .gi { flex: none; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem;
                                background: var(--brand-soft); color: var(--brand); }
.game-tile .gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.game-tile small { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.game-tile .leader { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--amber); font-weight: 500; margin-top: 4px; }
.game-tile .leader .ico { flex: none; }
.game-tile .leader.none { color: var(--muted); }
.game-tile .event-line { font-size: .86rem; font-weight: 600; color: var(--brand-ink); margin-top: 4px; }
.game-tile .play-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--brand);
                       color: #fff; font-weight: 600; font-size: .88rem; }
.game-tile.pulse { border-color: var(--coral); box-shadow: 0 0 0 0 rgba(242, 102, 63, .5); animation: pulse 2.2s infinite; }
.game-tile.pulse .gi { background: var(--coral-soft); color: var(--coral); }
.game-tile.pulse .event-line { color: var(--coral); }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(242, 102, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 102, 63, 0); } }

.game-area { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.game-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; width: 100%; }
.stat-pill { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-size: .9rem; color: var(--ink-2); }
.stat-pill strong { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.game-msg { margin: 0; text-align: center; min-height: 1.6em; color: var(--ink-2); font-weight: 500; }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(100%, 420px); }
.mem-card { aspect-ratio: 1; border: 0; border-radius: 14px; cursor: pointer; font-size: clamp(1.6rem, 6vw, 2.4rem); display: grid; place-items: center;
            background: linear-gradient(135deg, #0b8a91, #35c9c0); box-shadow: 0 6px 14px -8px rgba(11, 138, 145, .8); transition: transform .2s, background .2s; position: relative; }
.mem-card::before { content: "?"; color: rgba(255, 255, 255, .85); font-weight: 800; font-size: 1.6rem; position: absolute; }
.mem-card:disabled { cursor: default; opacity: .8; }
.mem-card:not(:disabled):hover { transform: translateY(-2px); }
.mem-card.flipped, .mem-card.matched { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); }
.mem-card.flipped::before, .mem-card.matched::before { content: none; }
.mem-card.matched { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green); }
.snake-canvas { width: min(100%, 400px); height: auto; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: #eef6f7; touch-action: none; outline: none; }
.dpad { display: grid; grid-template-columns: repeat(4, 56px); gap: 8px; }
.dpad button { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.dpad button:active { background: var(--brand-soft); }
@media (hover: hover) and (pointer: fine) { .dpad { display: none; } }

.board h3 { display: flex; align-items: center; gap: 8px; }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.board-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.board-list li:first-child { border-top: 0; }
.board-list .rank { width: 28px; text-align: center; font-weight: 700; color: var(--muted); flex: none; display: grid; place-items: center; }
.board-list li.first .rank { color: var(--amber); font-size: 1.3rem; }
.board-list .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.board-list .pts { font-weight: 700; font-variant-numeric: tabular-nums; }
.board-list li.first .pts { color: var(--amber); }
.board .mine { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--brand-soft); font-size: .92rem; }

.advent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; margin: 8px 0 20px; }
.door { aspect-ratio: 1; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center;
        border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; cursor: default; position: relative; overflow: hidden; }
.door .num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--ink); }
.door .lab { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.door.future { opacity: .65; background: var(--surface-2); }
.door.missed { opacity: .5; background: var(--surface-2); }
.door.today { cursor: pointer; border-color: var(--coral); background: linear-gradient(135deg, #fff3ee, #ffe3d8); animation: pulse 2.2s infinite; }
.door.today .num, .door.today .lab { color: var(--coral); }
.door.today:hover { transform: translateY(-3px) rotate(-1deg); }
.door.today.done { animation: none; cursor: default; }
.door.won { border-color: var(--green); background: var(--green-soft); }
.door.won .num { color: var(--green); }
.door.lost { background: var(--surface-2); }
.door.just { animation: pop-in .5s ease-out; }
@keyframes pop-in { from { transform: scale(.7); opacity: 0; } }
@media (prefers-color-scheme: dark) { .door.today { background: linear-gradient(135deg, #3d2420, #4a2a22); } }
.wins-card h3 { display: flex; align-items: center; gap: 8px; }
.wins { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wins li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 14px; border-radius: 10px; background: var(--green-soft); }

.scratch-dialog { border: 0; border-radius: 20px; padding: 0; background: transparent; max-width: calc(100vw - 32px); }
.scratch-dialog::backdrop { background: rgba(6, 40, 52, .6); backdrop-filter: blur(3px); }
.scratch-card { background: var(--surface); border-radius: 20px; padding: 22px; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.scratch-card h3 { margin: 0; }
.scratch-area { position: relative; width: 100%; aspect-ratio: 320 / 170; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); }
.scratch-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; }
.scratch-result strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.scratch-emoji { font-size: 2.6rem; line-height: 1; }
.scratch-result.won { background: linear-gradient(135deg, var(--green-soft), #fff8d6); }
.scratch-result.won .scratch-emoji { animation: bounce .8s ease-out 3; }
.scratch-result.lost .scratch-emoji { opacity: .85; }
@keyframes bounce { 40% { transform: translateY(-14px) scale(1.15); } }
#scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .6s; touch-action: none; }
.dialog-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.game-admin { display: flex; flex-direction: column; gap: 14px; }
.game-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.game-row .grow { flex: 1 1 320px; min-width: 0; }
.game-row p { margin: 4px 0 0; }
.game-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.game-meta { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.wrap-actions { flex-wrap: wrap; }
.fill-all { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.fill-all input[type=text] { flex: 1 1 240px; width: auto; }
.fill-all input[type=number], .num-input { width: 90px; }
.prize-table td { vertical-align: middle; }
.prize-table input[type=text] { min-width: 220px; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .game-tiles { grid-template-columns: 1fr; } .game-tile .play-btn { display: none; } }

/* Cartes de jeux : le bouton Jouer passe en bande sous le texte */
.game-tile { flex-wrap: wrap; }
.game-tile .gt { flex: 1 1 180px; }
.game-tile .play-btn { flex: 0 0 100%; justify-content: center; padding: 9px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); }
.game-tile:hover .play-btn { background: var(--brand); color: #fff; }
.game-tile.pulse .play-btn { background: var(--coral); color: #fff; }
@media (max-width: 760px) { .game-tile .play-btn { display: inline-flex; } }
input[type=number].num-input { width: 90px; }

/* Jeu événementiel sur l'accueil */
.event-game { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 22px; padding: 26px 28px;
    border-radius: 22px; color: #fff; text-decoration: none; background: linear-gradient(120deg, #c2410c, #e11d48 55%, #7c3aed); box-shadow: 0 14px 34px -14px rgba(190, 18, 60, .55); transition: transform .2s, box-shadow .2s; }
.event-game:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 18px 40px -14px rgba(190, 18, 60, .7); }
.event-game .eg-deco { position: absolute; inset: 0; pointer-events: none; }
.event-game .eg-deco i { position: absolute; font-style: normal; opacity: .55; font-size: 1.6rem; animation: egfloat 6s ease-in-out infinite; }
.event-game .eg-deco i:nth-child(1) { left: 4%; top: 14%; }
.event-game .eg-deco i:nth-child(2) { left: 30%; top: 62%; animation-delay: -1s; }
.event-game .eg-deco i:nth-child(3) { left: 52%; top: 12%; animation-delay: -2s; }
.event-game .eg-deco i:nth-child(4) { left: 70%; top: 66%; animation-delay: -3s; }
.event-game .eg-deco i:nth-child(5) { left: 88%; top: 10%; animation-delay: -4s; }
.event-game .eg-deco i:nth-child(6) { left: 96%; top: 60%; animation-delay: -5s; }
@keyframes egfloat { 50% { transform: translateY(-10px) rotate(12deg); } }
.event-game .eg-badge { position: absolute; top: 12px; left: 28px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .22); padding: 3px 10px; border-radius: 999px; }
.event-game .eg-body { position: relative; flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.event-game .eg-body strong { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.02em; line-height: 1.15; }
.event-game .eg-body small { font-size: .95rem; font-weight: 700; background: rgba(255, 255, 255, .2); align-self: flex-start; padding: 3px 12px; border-radius: 999px; margin-top: 6px; }
.event-game .eg-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: #fff; color: #be123c; font-weight: 700; margin-top: 14px; }
.event-game.pulse { animation: pulse 2.2s infinite; }
@media (max-width: 760px) { .event-game { padding: 24px 18px 18px; } .event-game .eg-btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .event-game .eg-deco i { animation: none; } }

/* Pastilles de la photo : grille régulière, toutes de la même taille (3 × 2, puis 2 × 3 sur mobile) */
.banner.has-content { height: auto; min-height: clamp(260px, 26vw, 330px); }
.banner-content { height: auto; min-height: inherit; }
.hero-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.hero-tile { min-height: 72px; min-width: 0; }
.hero-tile > span:last-child { min-width: 0; }
.hero-tile .nowrap { white-space: normal; }
@media (max-width: 760px) {
    .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-tile { min-height: 96px; }
    .hero-tile:last-child:nth-child(odd) { grid-column: auto; }
}

/* Actualités en direct (flux RSS) */
.web-news { margin-top: 36px; }
.web-news .ptitle small { font-weight: 500; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.feed-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--ink); }
.feed-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; }
.feed-meta .badge { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.feed-card strong { font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.feed-sum { color: var(--ink-2); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-go { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--brand-ink); }
.field.grow { flex: 1 1 320px; }
.break { overflow-wrap: anywhere; }
.inline-rename { display: flex; align-items: center; gap: 6px; }
.inline-rename input { max-width: 260px; font-weight: 600; }

/* Liste déroulante du catalogue de flux */
.picker-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.picker { position: relative; flex: 1 1 340px; min-width: 0; }
.picker-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.picker-btn:hover, .picker-btn[aria-expanded=true] { border-color: var(--brand); }
.picker-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.picker-btn.chosen { color: var(--ink); font-weight: 600; }
.picker-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn .ico { flex: none; color: var(--brand); }
.picker-btn .chev { color: var(--muted); transition: transform .2s; }
.picker-btn[aria-expanded=true] .chev { transform: rotate(180deg); }
.picker-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: min(420px, 60vh); overflow-y: auto; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.picker-panel[hidden] { display: none; }
.picker-theme { position: sticky; top: -6px; background: var(--surface); padding: 10px 10px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); }
.picker-item { display: block; width: 100%; text-align: left; font: inherit; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.picker-item:hover, .picker-item:focus-visible { background: var(--brand-soft); outline: none; }
.picker-msg { margin: 0; padding: 14px 10px; color: var(--muted); font-size: .92rem; }
.manual { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.manual summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; font-size: .92rem; }

/* Agents IA */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.check:hover { border-color: var(--brand); }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check input { margin-top: 4px; accent-color: var(--brand); }
.check small { display: block; }
.run-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.run-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.run-list li:first-child { border-top: 0; padding-top: 0; }
.ai-note { display: flex; align-items: center; gap: 10px; }
.ai-note .ico { flex: none; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Chèques vacances */
.cheque-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.cheque-opt { cursor: pointer; display: block; }
.cheque-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cheque-opt .co-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cheque-opt:hover .co-card { border-color: var(--brand); transform: translateY(-2px); }
.cheque-opt input:checked + .co-card { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); background: var(--brand-soft); }
.cheque-opt input:focus-visible + .co-card { outline: 3px solid var(--brand); outline-offset: 2px; }
.cheque-opt input:disabled + .co-card { opacity: .55; cursor: not-allowed; transform: none; }
.co-face { font-size: 2rem; letter-spacing: -.03em; line-height: 1; }
.co-label { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.co-line { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--ink-2); }
.co-line.pay { margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink); font-size: 1rem; }
.rfr-box { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 18px 22px; }
.rfr-box > div { display: flex; flex-direction: column; gap: 2px; }
.rfr-box strong { font-size: 1.4rem; letter-spacing: -.02em; }
.rfr-box .accent { color: var(--brand-ink); }
.rfr-missing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.soon-tile { opacity: .7; cursor: default; }
.table-title { margin: 0; padding: 18px 20px 4px; }
.tot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tot { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tot strong { font-size: 1.4rem; letter-spacing: -.02em; }

/* Calendrier de l'avent : pas de case le week-end */
.door.weekend { opacity: .55; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px); border-style: dashed; }
.door.weekend .num { color: var(--muted); }
.prize-table tr.weekend-row td { background: var(--surface-2); }
.prize-table tr.weekend-row input { background: transparent; opacity: .6; }

/* Huit pastilles sur la photo : 4 colonnes x 2 lignes sur grand écran, 2 colonnes sur mobile */
@media (min-width: 1000px) { .hero-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 761px) and (max-width: 999px) { .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Pastilles de la photo : même taille, la dernière ligne (incomplète) est centrée, quel que soit leur nombre */
.hero-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-tile { flex: 0 0 calc((100% - 12px) / 2); min-width: 0; }
@media (min-width: 1000px) { .hero-tile { flex-basis: calc((100% - 36px) / 4); } }
@media (max-width: 760px) { .hero-tiles { gap: 10px; } .hero-tile { flex-basis: calc((100% - 10px) / 2); } }

/* Six pastilles : 3 colonnes x 2 lignes sur grand écran (au lieu de 4 + 2) */
@media (min-width: 1000px) { .hero-tiles:has(> .hero-tile:nth-child(6):last-child) .hero-tile { flex-basis: calc((100% - 24px) / 3); } }

/* Récapitulatif des avantages */
.wallet { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.wallet-card { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wallet-card strong { font-size: 1.9rem; letter-spacing: -.03em; line-height: 1.1; }
.wallet-card.main { background: linear-gradient(135deg, var(--brand), var(--teal)); border-color: transparent; color: #fff; }
.wallet-card.main .muted, .wallet-card.main small { color: rgba(255, 255, 255, .88); }
.wallet-card.remain strong { color: var(--brand-ink); }
.wallet-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.wallet-split h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.wallet-split h3 .ico { color: var(--brand); }
.wallet-split dl { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.wallet-split dl > div { display: flex; justify-content: space-between; gap: 10px; }
.wallet-split dt { color: var(--muted); }
.wallet-split dd { margin: 0; font-weight: 600; }
.wallet-split .rest { border-top: 1px dashed var(--line); padding-top: 6px; }
.wallet-split .rest dd { color: var(--brand-ink); }
@media (max-width: 760px) { .wallet { grid-template-columns: 1fr; } .wallet-card strong { font-size: 1.6rem; } }

/* Coordonnées du salarié dans Mon compte */
#coordonnees { margin-top: 20px; }

/* Avantages : trois montants perçus, sans suivi d'utilisation */
.wallet .wallet-card .muted { display: inline-flex; align-items: center; gap: 6px; }
.wallet-pending { margin: 10px 2px 0; }

/* Gestion financière */
.fin-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 6px 0 18px; }
.fin-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fin-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; }
.fin-tabs a:hover { border-color: var(--brand); color: var(--brand-ink); }
.fin-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.fin-years { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fin-open { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.budget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.budget-card h3 { margin: 0 0 10px; }
.kv { margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.kv .total { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; font-size: 1.1rem; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.cat-table { width: 100%; border-collapse: collapse; }
.cat-table td, .cat-table th { padding: 8px 14px; }
.cat-table tr.grp td { background: var(--surface-2); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cat-table tr.sum td { font-weight: 700; border-top: 1px solid var(--line); }
.alert-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alert-list li { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: var(--ink); }
.alert-list li.info { background: var(--brand-soft); }
.alert-list li .ico { flex: none; margin-top: 2px; color: var(--amber); }
.alert-list li.info .ico { color: var(--brand); }
.add-summary { cursor: pointer; font-weight: 700; color: var(--brand-ink); display: flex; align-items: center; gap: 8px; }
.fin-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fin-filter .field { margin: 0; }
.fin-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.muted-row { opacity: .6; }
.report-body h2 { margin-top: 0; }
.report-body h3 { margin: 26px 0 8px; }
.report-body table { margin-bottom: 8px; }
@media print {
    header, .banner, .side, .no-print, .toasts, footer { display: none !important; }
    .wrap.admin { display: block; padding: 0; }
    .adm-main { width: 100%; }
    .report-body { box-shadow: none; border: 0; padding: 0; }
    body { background: #fff; }
}

@media (max-width: 760px) {
    .cat-table td, .cat-table th { padding: 8px 8px; font-size: .86rem; }
    .cat-table td:first-child { white-space: normal; min-width: 130px; }
}

/* Pied de page et page de confidentialité */
.site-foot { text-align: center; padding: 28px 16px 36px; font-size: .85rem; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--brand-ink); text-decoration: underline; }
.prose-block h3 { margin: 22px 0 6px; }
.prose-block p, .prose-block li { line-height: 1.6; }
@media print { .site-foot { display: none; } }

/* Administration en lecture seule */
.ro-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ro-banner .ico { flex: none; }
[data-readonly] :disabled { opacity: .5; cursor: not-allowed; }

/* Cockpit : pilotage du site */
.pil-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.pil-bar .field { margin: 0; }
.pil-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.kpi strong { font-size: 1.9rem; letter-spacing: -.03em; line-height: 1.1; }
.delta { font-weight: 600; color: var(--muted); }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.chart svg { display: block; width: 100%; height: 150px; background: linear-gradient(var(--surface-2), var(--surface-2)); border-radius: 10px; }
.chart.small svg { height: 110px; }
.chart rect { fill: var(--brand); }
.chart rect:hover { fill: var(--brand-ink); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.chart-days span { flex: 1; text-align: center; }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.plain-list li:first-child { border-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); font-size: .86rem; }
.pad { padding: 0 20px 16px; }
.result .rtop { display: flex; justify-content: space-between; margin-bottom: 4px; }
.result { margin-bottom: 14px; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }

/* Indicateurs du cockpit : 4 colonnes (2 sur écran étroit) */
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   Salle de jeux : page « Jeux » festive (bandeau, cartes illustrées, podiums)
   ========================================================================== */
.arcade { padding-top: 22px; padding-bottom: 40px; }

.arcade-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
    padding: 30px 32px; border-radius: 22px; color: #fff; box-shadow: 0 22px 50px -22px rgba(123, 63, 228, .7);
    background: radial-gradient(circle at 12% 120%, #ffb703 0, transparent 42%), radial-gradient(circle at 92% -10%, #ff4d8d 0, transparent 46%),
        linear-gradient(120deg, #5b2fd6 0%, #8e3fe0 48%, #ff5d8f 100%); }
.arcade-hero .hero-text { position: relative; z-index: 1; max-width: 560px; }
.arcade-hero h1 { margin: 6px 0 8px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.12; letter-spacing: -.02em; }
.arcade-hero p { margin: 0; opacity: .94; font-size: 1.02rem; }
.hero-tag { display: inline-block; padding: 4px 14px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 700; font-size: .85rem; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats .stat { min-width: 104px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .2); text-align: center; display: flex; flex-direction: column; }
.hero-stats .stat b { font-size: 1.7rem; line-height: 1.1; }
.hero-stats .stat span { font-size: .78rem; opacity: .92; }

.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 15px; border-radius: 2px; opacity: .9; animation: confetti-fall 6s linear infinite; }
.confetti i:nth-child(1) { left: 4%; background: #ffd23f; animation-delay: -.5s; }
.confetti i:nth-child(2) { left: 12%; background: #3ee6c1; animation-delay: -3.2s; animation-duration: 7s; width: 11px; height: 11px; border-radius: 50%; }
.confetti i:nth-child(3) { left: 21%; background: #fff; animation-delay: -1.8s; }
.confetti i:nth-child(4) { left: 30%; background: #ff9f1c; animation-delay: -4.6s; animation-duration: 8s; }
.confetti i:nth-child(5) { left: 39%; background: #4cc9f0; animation-delay: -2.4s; width: 11px; height: 11px; border-radius: 50%; }
.confetti i:nth-child(6) { left: 48%; background: #ffd23f; animation-delay: -5.5s; animation-duration: 6.5s; }
.confetti i:nth-child(7) { left: 57%; background: #fff; animation-delay: -.9s; animation-duration: 7.5s; width: 11px; height: 11px; border-radius: 50%; }
.confetti i:nth-child(8) { left: 66%; background: #3ee6c1; animation-delay: -3.8s; }
.confetti i:nth-child(9) { left: 74%; background: #ff9f1c; animation-delay: -2.9s; animation-duration: 8.5s; }
.confetti i:nth-child(10) { left: 83%; background: #4cc9f0; animation-delay: -1.2s; }
.confetti i:nth-child(11) { left: 91%; background: #ffd23f; animation-delay: -4.1s; width: 11px; height: 11px; border-radius: 50%; }
.confetti i:nth-child(12) { left: 97%; background: #fff; animation-delay: -5.1s; animation-duration: 7s; }
@keyframes confetti-fall {
    0% { transform: translateY(-20px) rotate(0deg); }
    100% { transform: translateY(260px) rotate(540deg); }
}

/* Cartes de jeu : miniature illustrée, ruban de record, gros bouton */
.arcade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 260px)); justify-content: start; gap: 18px; margin-top: 24px; }
.arcade-card { --c1: #2f7de1; --c2: #5ac8fa; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); color: var(--ink);
    border: 3px solid var(--c1); box-shadow: 0 16px 34px -18px var(--c1); transition: transform .25s, box-shadow .25s; }
.arcade-card.theme-memory { --c1: #7b3fe4; --c2: #ff5d8f; }
.arcade-card.theme-snake { --c1: #0f9d58; --c2: #b7f34a; }
.arcade-card:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 26px 40px -18px var(--c1); color: var(--ink); }
.arcade-card .art-wrap { position: relative; display: block; line-height: 0; overflow: hidden; }
.arcade-card .art { width: 100%; height: auto; display: block; transition: transform .35s; }
.arcade-card:hover .art { transform: scale(1.05) rotate(.8deg); }
.arcade-card .ribbon { position: absolute; top: 12px; left: 0; padding: 5px 14px 5px 12px; border-radius: 0 999px 999px 0; background: #ffd23f; color: #3b2a00;
    font-weight: 800; font-size: .8rem; line-height: 1.3; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.arcade-card .ribbon.new { background: #fff; color: var(--c1); }
.arcade-card .body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.arcade-card .gname { font-size: 1.4rem; line-height: 1.15; color: var(--c1); }
.arcade-card .gdesc { color: var(--muted); font-size: .94rem; line-height: 1.45; }
.arcade-card .champion { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: .88rem; }
.arcade-card .champion .ico { flex: none; width: 20px; height: 20px; }
.arcade-card .champion.none { background: var(--surface-2); color: var(--muted); }
.arcade-card .go { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; color: #fff;
    font-weight: 800; font-size: 1.05rem; background: linear-gradient(120deg, var(--c1), var(--c2)); box-shadow: 0 8px 18px -8px var(--c1); }
.arcade-card:hover .go { filter: saturate(1.2) brightness(1.06); }

/* Tableau des scores */
.arcade-title { display: flex; align-items: center; gap: 10px; margin: 38px 0 14px; font-size: 1.5rem; letter-spacing: -.01em; }
.arcade-title span { font-size: 1.7rem; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; }
.score-panel { --c1: #e0a100; --c2: #ff9f1c; padding: 18px 18px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--c1);
    box-shadow: var(--shadow-sm); }
.score-panel.theme-memory { --c1: #7b3fe4; --c2: #ff5d8f; }
.score-panel.theme-snake { --c1: #0f9d58; --c2: #7dd957; }
.score-panel.medals { --c1: #e0a100; --c2: #ff7b00; background: linear-gradient(180deg, var(--amber-soft), var(--surface) 38%); }
.score-panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.score-panel h3 { margin: 0; font-size: 1.2rem; color: var(--c1); }
.score-panel .count { padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 600; }

.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 8px; margin: 14px 0 10px; }
.podium .step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.podium .who { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; text-align: center; }
.podium .who b { font-size: .84rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .step.s1 .who b { font-size: .94rem; }
.podium .step.s1 .avatar { box-shadow: 0 0 0 4px #ffd23f, 0 10px 22px -6px rgba(224, 161, 0, .8); }
.podium .step.s2 .avatar { box-shadow: 0 0 0 3px #c9d3da; }
.podium .step.s3 .avatar { box-shadow: 0 0 0 3px #e29a5e; }
.podium .crown { position: absolute; top: -26px; font-size: 1.5rem; animation: crown-bob 2.4s ease-in-out infinite; }
.podium .step.s1 .who { margin-top: 18px; }
.podium .block { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px; border-radius: 12px 12px 4px 4px; color: #fff; }
.podium .block i { font-style: normal; font-size: 1.5rem; line-height: 1; }
.podium .block em { font-style: normal; font-weight: 800; font-size: .92rem; }
.podium .s1 .block { min-height: 92px; background: linear-gradient(180deg, #ffc93c, #e09a00); }
.podium .s2 .block { min-height: 70px; background: linear-gradient(180deg, #b6c2cb, #8997a2); }
.podium .s3 .block { min-height: 54px; background: linear-gradient(180deg, #e8a672, #c07a43); }
.podium .step.free { opacity: .55; }
.podium .ghost { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px dashed var(--muted); color: var(--muted); font-weight: 800; }
.podium .ghost.lg { width: 84px; height: 84px; font-size: 1.6rem; }
@keyframes crown-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-5px) rotate(6deg); } }

.score-panel .rest { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.score-panel .rest li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.score-panel .rest li.me { background: linear-gradient(120deg, var(--c1), var(--c2)); color: #fff; font-weight: 700; }
.score-panel .rest .rk { flex: none; width: 24px; text-align: center; font-weight: 800; color: var(--c1); }
.score-panel .rest li.me .rk { color: #fff; }
.score-panel .rest .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-panel .rest .pt { flex: none; font-weight: 800; }
.score-panel .rest .meds { flex: none; display: inline-flex; gap: 8px; font-size: .85rem; }
.score-panel .rest.big li { padding: 8px 10px; }
.score-panel .me-line { margin: 12px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); font-size: .9rem; text-align: center; }
.score-panel .me-line.none { background: transparent; color: var(--muted); font-size: .82rem; }
.arcade-foot { margin: 26px 0 0; text-align: center; color: var(--muted); font-size: .9rem; }

@media (max-width: 560px) {
    .arcade-hero { padding: 22px 20px; }
    .podium { gap: 5px; }
    .podium .who b { font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
    .confetti i, .podium .crown { animation: none; }
    .arcade-card, .arcade-card .art { transition: none; }
    .arcade-card:hover, .arcade-card:hover .art { transform: none; }
}
.arcade-card, .arcade-card:hover { text-decoration: none; }
.score-panel .count { white-space: nowrap; }
.score-panel header h3 { min-width: 0; }
.arcade-card { border-radius: 18px; border-width: 2px; }
.arcade-card .body { gap: 6px; padding: 12px 14px 14px; }
.arcade-card .gname { font-size: 1.15rem; }
.arcade-card .gdesc { font-size: .84rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arcade-card .champion { padding: 6px 10px; font-size: .8rem; }
.arcade-card .go { padding: 9px 14px; font-size: .95rem; border-radius: 12px; }
.arcade-card .ribbon { top: 8px; font-size: .72rem; padding: 4px 11px 4px 9px; }

/* ==========================================================================
   Bataille navale
   ========================================================================== */
.bn { --sea1: #1b7fb8; --sea2: #0d5f94; --sea-line: rgba(255, 255, 255, .22); position: relative; }
.bn-off-msg { text-align: center; }
.bn-lobby h3 { margin-top: 0; }
.bn-players { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bn-players li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.bn-players .who { flex: 1; font-weight: 600; }
.bn-players .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.bn-players .dot.busy { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.bn-invites { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bn-invites .invite { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--coral-soft); color: var(--ink); font-weight: 600; }
.bn-invites .invite span { flex: 1 1 200px; }
.bn-invites .invite.wait { background: var(--brand-soft); }

.bn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bn-status { flex: 1 1 320px; padding: 12px 18px; border-radius: 14px; background: var(--surface-2); font-weight: 600; color: var(--ink-2); }
.bn-status.mine { background: linear-gradient(120deg, #ff9f1c, #ff5d8f); color: #fff; animation: bn-pulse 1.8s ease-in-out infinite; }
@keyframes bn-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 93, 143, .25); } }
.bn-actions { display: flex; gap: 8px; }
.danger-text { color: var(--red); }

.bn-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.bn-side { padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.bn-side h3 { margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bn-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 6px; border-radius: 14px; background: linear-gradient(160deg, var(--sea1), var(--sea2)); max-width: 460px; margin: 0 auto; }
.bn-grid .cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .13); cursor: default; font: inherit; }
.bn-grid .cell:disabled { opacity: 1; cursor: default; }
.bn-grid .cell:not(:disabled) { cursor: pointer; }
.bn-grid .cell:not(:disabled):hover { background: rgba(255, 255, 255, .4); }
.bn-enemy.waiting { filter: saturate(.75); }
.bn-grid .cell.target:hover { background: rgba(255, 210, 63, .7); outline: 2px solid #ffd23f; }
.bn-grid .cell.ship { background: #cfd8e3; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(30, 50, 80, .35); }
.bn-grid .cell.ship.first.h { border-radius: 12px 3px 3px 12px; }
.bn-grid .cell.ship.lastc.h { border-radius: 3px 8px 8px 3px; }
.bn-grid .cell.ship.first.v { border-radius: 12px 12px 3px 3px; }
.bn-grid .cell.ship.lastc.v { border-radius: 3px 3px 8px 8px; }
.bn-grid .cell.ship.reveal { background: rgba(207, 216, 227, .55); }
.bn-grid .cell.miss::after { content: ""; position: absolute; inset: 32%; border-radius: 50%; background: #fff; opacity: .9; }
.bn-grid .cell.hit { background: #ff5a4a; box-shadow: inset 0 0 0 1px rgba(120, 0, 0, .4); }
.bn-grid .cell.hit::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: clamp(.7rem, 2vw, 1.1rem); }
.bn-grid .cell.sunk { background: #7a1f1f; }
.bn-grid .cell.last { outline: 2px solid #ffd23f; outline-offset: -2px; }
.bn-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; justify-content: center; font-size: .82rem; margin: 10px 0 0; }
.bn-legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 4px; vertical-align: -2px; }
.bn-legend .lg.hit { background: #ff5a4a; }
.bn-legend .lg.miss { background: #fff; border: 1px solid var(--line); }
.bn-legend .lg.sunk { background: #7a1f1f; }

.bn-place { margin-top: 14px; }
.bn-ships { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.ship-btn { padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.ship-btn.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.ship-btn.done { opacity: .6; text-decoration: line-through; }
.ship-btn.done.on { text-decoration: none; opacity: 1; }
.bn-place-bar { display: flex; flex-wrap: wrap; gap: 8px; }

.bn-end { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(10, 20, 40, .55); padding: 20px; }
.bn-end[hidden] { display: none; }
.bn-end-card { width: min(420px, 100%); padding: 28px 26px; border-radius: 24px; background: var(--surface); text-align: center; box-shadow: var(--shadow-lg); border-top: 8px solid #ffc93c; }
.bn-end-card h2 { margin: 6px 0; font-size: 1.8rem; }
.bn-end-emoji { font-size: 3.4rem; line-height: 1; }
@media (max-width: 560px) { .bn-side { padding: 10px; } }
.arcade-card .duel { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: var(--c1); color: #fff; font-size: .72rem; font-weight: 700; }
.arcade-card.theme-bataille-navale { --c1: #1b7fb8; --c2: #35c1e8; }
.score-panel.theme-bataille-navale { --c1: #1b7fb8; --c2: #35c1e8; }
.score-panel .rule { margin: 0 0 24px; color: var(--muted); font-size: .78rem; }
.bn [hidden], .bn-end[hidden] { display: none !important; }

/* ==========================================================================
   Bandeau d'accueil : illustration dynamique (saison, météo, heure) et pastilles recentrées
   ========================================================================== */
.scene-tag { position: absolute; top: 12px; right: 16px; z-index: 3; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .26);
    color: #fff; font-size: .78rem; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* Pastilles : moins larges, centrées dans l'image avec de la marge de chaque côté */
.banner-content .hero-tiles { width: min(100%, 1040px); margin-inline: auto; }


/* ==========================================================================
   Actualités : première page de journal
   ========================================================================== */
:root { --paper: #fbf7ee; --paper-ink: #1c1a17; --paper-muted: #6b6458; --paper-rule: #1c1a17; --paper-soft: #efe8d6; --paper-accent: #a4161a; }
@media (prefers-color-scheme: dark) {
    :root { --paper: #1f1d19; --paper-ink: #f1ebdc; --paper-muted: #aaa190; --paper-rule: #d9d1bd; --paper-soft: #2a2721; --paper-accent: #ff6b5f; }
}
.gazette { --serif: Georgia, "Times New Roman", Times, "Liberation Serif", serif; background: var(--paper); color: var(--paper-ink); font-family: var(--serif);
    padding: clamp(14px, 2.6vw, 38px); border-radius: 6px; box-shadow: var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, .06); }
.gazette a { color: inherit; text-decoration: none; }
.gazette h1, .gazette h2, .gazette h3 { font-family: var(--serif); color: var(--paper-ink); }

/* Titre du journal */
.masthead { text-align: center; }
.mast-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--paper-rule);
    font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--paper-muted); }
.mast-date::first-letter { text-transform: uppercase; }
.mast-date { text-align: left; }
.mast-no { text-align: right; }
.mast-title { margin: 14px 0 10px; font-size: clamp(2.2rem, 7.4vw, 5.4rem); line-height: 1; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; }
.mast-title small { display: block; font-size: .28em; letter-spacing: .32em; font-weight: 600; margin-top: 6px; color: var(--paper-muted); }
.mast-title .orn { font-size: .4em; vertical-align: middle; color: var(--paper-accent); }
.mast-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 4px double var(--paper-rule);
    border-bottom: 1px solid var(--paper-rule); font-size: .85rem; font-style: italic; color: var(--paper-muted); }
.mast-search { display: flex; gap: 6px; font-style: normal; }
.mast-search input { width: min(260px, 52vw); padding: 5px 10px; border: 1px solid var(--paper-rule); background: transparent; color: var(--paper-ink); font: inherit; font-size: .85rem; border-radius: 0; }
.mast-search button { padding: 5px 12px; border: 1px solid var(--paper-ink); background: var(--paper-ink); color: var(--paper); font: inherit; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; }
.results { margin: 14px 0 0; font-style: italic; color: var(--paper-muted); }
.results a { text-decoration: underline; }
.empty-paper { text-align: center; padding: 60px 10px; }

.kicker { display: inline-block; font-family: Inter, system-ui, sans-serif; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-accent); }
.byline { margin: 0; font-family: Inter, system-ui, sans-serif; font-size: .74rem; color: var(--paper-muted); }
.byline b { color: var(--paper-ink); font-weight: 700; }
.byline .sep { margin: 0 4px; }
.deck { margin: 0; color: var(--paper-ink); opacity: .86; line-height: 1.5; text-align: justify; hyphens: auto; }
.gazette .photo { position: relative; display: grid; place-items: center; height: 170px; margin: 2px 0; overflow: hidden; color: var(--paper-ink);
    background: var(--paper-soft); border: 1px solid var(--paper-rule); outline: 1px solid var(--paper-rule); outline-offset: -7px; }
.gazette .photo.g0::before, .gazette .photo.g1::before, .gazette .photo.g2::before { content: ""; position: absolute; inset: 0; opacity: .13;
    background: repeating-linear-gradient(45deg, var(--paper-ink) 0 1px, transparent 1px 6px); }
.gazette .photo.g1::before { background: repeating-linear-gradient(-45deg, var(--paper-ink) 0 1px, transparent 1px 6px); }
.gazette .photo.g2::before { background: repeating-linear-gradient(0deg, var(--paper-ink) 0 1px, transparent 1px 5px); }
/* image de vieille presse : noir et blanc jauni, contrasté, tramé comme une impression sur papier journal */
.gazette .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(.38) contrast(1.12) brightness(1.03); mix-blend-mode: multiply; }
.gazette .photo:has(img) { outline: 0; }
.gazette .photo:has(img)::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background: radial-gradient(rgba(60, 45, 25, .5) .7px, transparent 1.1px) 0 0 / 4px 4px, radial-gradient(ellipse at center, transparent 55%, rgba(80, 55, 20, .28) 100%); }
@media (prefers-color-scheme: dark) { .gazette .photo img { filter: grayscale(1) sepia(.3) contrast(1.05) brightness(.82); mix-blend-mode: normal; } }
.plate-letter { position: relative; font-family: Georgia, "Times New Roman", serif; font-weight: 900; font-size: clamp(3rem, 6vw, 5.2rem); line-height: 1; padding: 0 .28em;
    background: var(--paper-soft); box-shadow: 0 0 0 2px var(--paper-soft); }
.plate-cap { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-family: Georgia, serif; font-style: italic; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--paper-muted); }

/* Une */
.front { display: grid; grid-template-columns: 2fr 1fr; gap: 0; padding: 22px 0; border-bottom: 3px double var(--paper-rule); }
.front.solo { grid-template-columns: 1fr; }
.lead-story { display: flex; flex-direction: column; gap: 12px; padding-right: 26px; border-right: 1px solid var(--paper-rule); }
.front.solo .lead-story { border-right: 0; padding-right: 0; }
.lead-title { margin: 0; font-size: clamp(1.8rem, 4.2vw, 3.2rem); line-height: 1.06; font-weight: 900; letter-spacing: -.02em; }
.lead-story .photo { height: clamp(150px, 20vw, 260px); font-size: 4rem; }
.lead-story .deck { font-size: 1.12rem; }
.dropcap::first-letter { float: left; font-size: 3.6em; line-height: .82; font-weight: 900; padding: 4px 8px 0 0; color: var(--paper-accent); }
.read-on { font-family: Inter, system-ui, sans-serif; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid var(--paper-accent); align-self: flex-start; }
.lead-story:hover .lead-title, .story:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.side-stories { display: flex; flex-direction: column; padding-left: 26px; }
.story.sec { display: flex; flex-direction: column; gap: 8px; padding: 0 0 18px; }
.story.sec + .story.sec { padding: 18px 0 0; border-top: 1px solid var(--paper-rule); }
.story.sec h3 { margin: 0; font-size: 1.45rem; line-height: 1.12; font-weight: 800; }

/* Colonnes */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); padding: 22px 0; border-bottom: 1px solid var(--paper-rule); }
.story.col { display: flex; flex-direction: column; gap: 8px; padding: 0 22px; }
.story.col:nth-child(3n + 1) { padding-left: 0; }
.story.col:nth-child(3n) { padding-right: 0; }
.story.col + .story.col { border-left: 1px solid var(--paper-rule); }
.story.col:nth-child(3n + 1) { border-left: 0; }
.story.col:nth-child(n + 4) { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--paper-rule); }
.story.col h3 { margin: 0; font-size: 1.28rem; line-height: 1.15; font-weight: 800; }
.story.col .photo { height: 130px; }
.story.col .deck { font-size: .95rem; }

/* En bref */
.briefs { padding: 22px 0 4px; }
.briefs-title { position: relative; margin: 0 0 14px; text-align: center; font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; }
.briefs-title::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--paper-rule); }
.briefs-title span { position: relative; padding: 0 16px; background: var(--paper); }
.briefs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.briefs li { border-bottom: 1px dotted var(--paper-muted); }
.briefs li a { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; }
.briefs time { flex: none; min-width: 3.6em; font-family: Inter, system-ui, sans-serif; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--paper-accent); }
.briefs .b-title { font-weight: 700; line-height: 1.25; }
.briefs li a:hover .b-title { text-decoration: underline; }

.gz-pager { margin-top: 22px; padding-top: 12px; border-top: 4px double var(--paper-rule); font-size: .85rem; font-style: italic; justify-content: space-between; }
.gz-pager a { font-style: normal; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
    .front { grid-template-columns: 1fr; }
    .lead-story { padding-right: 0; border-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--paper-rule); }
    .side-stories { padding-left: 0; padding-top: 18px; }
    .columns { grid-template-columns: 1fr 1fr; }
    .story.col, .story.col:nth-child(3n + 1), .story.col:nth-child(3n) { padding: 0 16px; border-left: 0; margin-top: 0; border-top: 0; }
    .story.col:nth-child(odd) { padding-left: 0; }
    .story.col:nth-child(even) { padding-right: 0; border-left: 1px solid var(--paper-rule); }
    .story.col:nth-child(n + 3) { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--paper-rule); }
}
@media (max-width: 600px) {
    .mast-top { grid-template-columns: 1fr 1fr; }
    .mast-motto { display: none; }
    .columns { grid-template-columns: 1fr; }
    .story.col, .story.col:nth-child(odd), .story.col:nth-child(even) { padding: 0; border-left: 0; }
    .story.col + .story.col { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--paper-rule); }
    .briefs ul { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .columns .story.col { border-left: 0 !important; } }

/* Crédit de la photo d accueil (licence libre : l auteur est cité) */
.scene-credit { position: absolute; top: 40px; right: 16px; z-index: 3; max-width: min(60vw, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border-radius: 999px;
    background: rgba(0, 0, 0, .32); color: rgba(255, 255, 255, .92); font-size: .68rem; text-decoration: none; }
.scene-credit:hover { background: rgba(0, 0, 0, .55); color: #fff; }

/* Informations légales */
.legal-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.legal-fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal-fact .ico { width: 24px; height: 24px; color: var(--brand); }
.legal-fact span { color: var(--ink-2); font-size: .9rem; line-height: 1.4; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.legal-toc a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .88rem; text-decoration: none; }
.legal-toc a:hover { border-color: var(--brand); color: var(--brand); }
.legal-table td, .legal-table th { vertical-align: top; text-align: left; }
.legal-table td:first-child { min-width: 200px; }
.prose-block h2 { margin-top: 4px; }
.tool.active { background: var(--brand-soft); color: var(--brand); }
.article-body.legal-card { max-width: 1040px; width: 100%; margin-inline: auto; }

/* Journal d'activité de l'accueil : des cartes colorées, la plus récente en grand */
.activity { margin-bottom: 8px; }
.act-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.act-item { --c1: #2563eb; --c2: #0ea5e9; position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 24px; color: #fff; overflow: hidden;
    background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 28px -16px var(--c1); transition: transform .2s ease, box-shadow .2s ease; }
.act-item::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .28) 0 54px, transparent 55px), radial-gradient(circle at 104% 100%, rgba(255, 255, 255, .18) 0 70px, transparent 71px), radial-gradient(circle at 4% 118%, rgba(255, 255, 255, .14) 0 46px, transparent 47px); }
.act-item:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 20px 34px -16px var(--c1); }
.act-item.tone-blue { --c1: #2563eb; --c2: #0ea5e9; }
.act-item.tone-orange { --c1: #ea580c; --c2: #f59e0b; }
.act-item.tone-pink { --c1: #7c3aed; --c2: #ec4899; }
.act-item.tone-violet { --c1: #4f46e5; --c2: #a855f7; }
.act-item.tone-green { --c1: #059669; --c2: #14b8a6; }
.act-item.feat { grid-column: 1 / -1; padding: 26px 30px; border-radius: 28px; }
.act-emoji { position: relative; flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; font-size: 2rem; line-height: 1;
    background: rgba(255, 255, 255, .24); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); transform: rotate(-7deg); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.act-item:hover .act-emoji { transform: rotate(7deg) scale(1.12); }
.act-item.feat .act-emoji { width: 84px; height: 84px; font-size: 2.8rem; border-radius: 26px; }
.tone-orange .act-emoji::after { content: "✨"; position: absolute; top: -10px; right: -10px; font-size: 1.1rem; animation: act-twinkle 1.8s ease-in-out infinite; }
.act-body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.act-kind { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .26); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.act-title { color: #fff; font-weight: 800; font-size: 1.08rem; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.act-item.feat .act-title { font-size: 1.55rem; letter-spacing: -.01em; }
a.act-title:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.act-detail { color: rgba(255, 255, 255, .94); font-size: .92rem; line-height: 1.4; }
.act-item.feat .act-detail { font-size: 1.02rem; }
.act-side { position: relative; flex: none; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.act-ago { padding: 3px 11px; border-radius: 999px; background: rgba(0, 0, 0, .2); font-size: .78rem; font-weight: 700; white-space: nowrap; }
.act-new { padding: 2px 9px; border-radius: 8px; background: #fff; color: var(--c1); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
    transform: rotate(6deg); box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .3); animation: act-pulse 1.6s ease-in-out infinite; }
.act-item.fresh { animation: act-pop .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes act-pop { 0% { transform: scale(.9) translateY(-10px); opacity: .2; } 100% { transform: none; opacity: 1; } }
@keyframes act-pulse { 0%, 100% { transform: rotate(6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.12); } }
@keyframes act-twinkle { 0%, 100% { opacity: .35; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@media (prefers-color-scheme: dark) { .act-item { box-shadow: 0 14px 28px -16px #000; filter: saturate(.92) brightness(.94); } }
@media (prefers-reduced-motion: reduce) { .act-item, .act-emoji { transition: none; } .act-item.fresh, .act-new, .tone-orange .act-emoji::after { animation: none; } }
@media (max-width: 720px) {
    .act-grid { grid-template-columns: 1fr; }
    .act-item.feat { padding: 20px; }
    .act-item.feat .act-title { font-size: 1.25rem; }
    .act-item.feat .act-emoji { width: 66px; height: 66px; font-size: 2.2rem; }
}
@media (max-width: 480px) { .act-item { flex-wrap: wrap; } .act-side { order: 3; margin-left: 78px; flex-direction: row-reverse; align-items: center; } }

/* Bouton d'enregistrement « Validé » : rien à enregistrer */
.btn[data-save]:disabled { background: var(--surface-2); color: var(--ink-2); box-shadow: none; cursor: default; opacity: .85; }

/* Version PC : ni le bouton « i » ni le menu à quatre carrés (conservés sur mobile) */


/* ==========================================================================
   Version smartphone / tablette (≤ 1020 px : en-tête repensé ; ≤ 760 px : barre d'onglets en bas)
   L'ordinateur garde l'en-tête à pastilles ; ici : logo + bouton menu, tiroir plein écran, onglets au pouce.
   ========================================================================== */
.m-nav, .tabbar, .m-login { display: none; }
body.nav-open { overflow: hidden; }
@media (max-width: 1020px) {
    :root { --bar-h: 60px; }
    .top .bar, .top.has-logo .bar { flex-wrap: nowrap; height: var(--bar-h); min-height: 0; padding-top: 0; padding-bottom: 0; padding-right: 12px; gap: 8px; }
    .top.has-logo .bar { padding-left: 28px; }
    .top.has-logo::before { display: block; width: 30px; height: var(--bar-h); }
    .brand { min-width: 0; }
    .brand-art { height: var(--bar-h); max-width: calc(100vw - 150px); }
    .top .searchbar, .top #mainnav { display: none !important; }
    .burger { display: grid; margin-left: auto; width: 46px; height: 46px; border-radius: 14px; }
    .top:not(:has(.searchbar)) .burger { display: none; }
    .m-login { display: inline-flex; margin-left: auto; padding: 9px 18px; }

    .m-nav { display: none; position: fixed; left: 0; right: 0; top: var(--bar-h); bottom: 0; z-index: 70; flex-direction: column; gap: 14px;
             background: var(--surface-2); overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); }
    .m-nav.open { display: flex; animation: pop .16s ease-out; }
    .m-user { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
              color: var(--ink); text-decoration: none; }
    .m-user .m-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
    .m-user small { color: var(--muted); }
    .m-search { position: relative; }
    .m-search input { width: 100%; padding: 14px 48px 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
    .m-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--brand); font-size: 1.25rem; cursor: pointer; }
    .m-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .m-links a { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 14px; border-radius: 16px; background: var(--surface);
                 border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; line-height: 1.2; -webkit-tap-highlight-color: transparent; }
    .m-links a .ico { font-size: 1.4rem; color: var(--brand); }
    .m-links a.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
    .m-links a.warm { grid-column: 1 / -1; background: var(--coral-soft); border-color: var(--coral); color: var(--coral); }
    .m-links a.warm .ico { color: var(--coral); }
    .m-links a:active { transform: scale(.98); }
    .m-foot { display: flex; flex-direction: column; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
    .m-foot a, .m-foot button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; background: none; border: 0; border-top: 1px solid var(--line);
                                font: inherit; color: var(--ink-2); text-decoration: none; text-align: left; cursor: pointer; }
    .m-foot > :first-child { border-top: 0; }
    .m-foot form { margin: 0; }
    .m-foot form button { border-top: 1px solid var(--line); }
    .m-foot .danger { color: var(--red); }
}
@media (max-width: 760px) {
    .burger { display: none !important; }
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface);
              border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 20px -14px rgba(0, 0, 0, .35); }
    .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; background: none;
                                border: 0; font: inherit; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .tabbar .ico { font-size: 1.5rem; }
    .tabbar .on, .tabbar button[aria-expanded="true"] { color: var(--brand); }
    body:has(.tabbar) { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .toasts { bottom: auto; }
    /* 16 px minimum : évite le zoom automatique d'iOS dans les champs ; zones tactiles de 44 px */
    input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px !important; }
    .btn { min-height: 44px; }
    .page { padding-top: 18px; padding-bottom: 36px; }
}

/* ==========================================================================
   Jeux au doigt (smartphone / tablette) : grandes commandes, pas de zoom, pas de sélection de texte
   ========================================================================== */
.game-area, .bn, .advent-grid { -webkit-tap-highlight-color: transparent; }
.game-area, .bn-grid, .mem-card, .dpad { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.game-area button, .bn button, .door { touch-action: manipulation; }
.game-area.playing { touch-action: none; }
.dpad { grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(2, 76px); gap: 10px;
        grid-template-areas: ". up ." "left down right"; }
.dpad button { height: auto; border-radius: 20px; font-size: 1.6rem; box-shadow: var(--shadow-sm); }
.dpad [data-dir=up] { grid-area: up; } .dpad [data-dir=left] { grid-area: left; }
.dpad [data-dir=down] { grid-area: down; } .dpad [data-dir=right] { grid-area: right; }
.dpad button:active { background: var(--brand); color: #fff; transform: scale(.94); }
@media (hover: none) {
    .bn-grid .cell:not(:disabled):hover { background: rgba(255, 255, 255, .13); }
    .bn-grid .cell.target:hover { background: rgba(255, 255, 255, .13); outline: 0; }
    .mem-card:not(:disabled):hover { transform: none; }
    .btn:hover { transform: none; box-shadow: none; }
}
@media (max-width: 760px) {
    .game-area { padding: 14px 10px 18px; border-radius: 18px; }
    .game-bar { gap: 8px; }
    .game-bar .btn { min-height: 48px; flex: 1 1 100%; font-size: 1.05rem; order: 9; }
    .stat-pill { flex: 1; text-align: center; padding: 9px 10px; font-size: .95rem; }
    .snake-canvas { width: 100%; max-width: min(100%, calc(100dvh - 430px)); min-width: 240px; }
    .memory-grid { gap: 8px; width: 100%; }
    .mem-card { border-radius: 12px; }
    .page-head .infoband { font-size: .9rem; }
    .advent-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .door .num { font-size: 1.6rem; }
    .door .lab { font-size: .7rem; }
    /* Bataille navale : la grille adverse d'abord quand c'est le moment de tirer, état de la partie toujours visible */
    .bn-game .bn-status { position: sticky; top: calc(var(--bar-h) + 6px); z-index: 20; box-shadow: var(--shadow-sm); }
    .bn-game.play .bn-boards { display: flex; flex-direction: column-reverse; }
    .bn-boards { gap: 14px; }
    .bn-side { padding: 10px 8px; border-radius: 16px; }
    .bn-grid { max-width: none; gap: 2px; padding: 4px; }
    .bn-top { gap: 8px; }
    .bn-actions { width: 100%; }
    .bn-actions .btn { flex: 1; min-height: 44px; }
    .bn-place-bar .btn { flex: 1 1 45%; min-height: 46px; }
    .ship-btn { padding: 10px 14px; font-size: .92rem; }
    .bn-invites .invite .btn { min-height: 44px; }
}

/* Smartphone : plus de barre d'icônes en bas, un seul bouton burger en haut ; le menu est une simple liste de textes */
@media (max-width: 1020px) {
    .tabbar { display: none !important; }
    body:has(.tabbar) { padding-bottom: 0; }
    .top:not(:has(.searchbar)) .burger { display: none; }
    .burger { display: grid !important; }
    .m-nav { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .m-nav .ico { display: none; }
    .m-nav .m-user::after { content: "›"; font-size: 1.6rem; color: var(--muted); }
    .m-links { display: flex; flex-direction: column; gap: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
    .m-links a { min-height: 54px; padding: 0 18px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; font-size: 1.02rem; }
    .m-links a:first-child { border-top: 0; }
    .m-links a.on { background: var(--brand-soft); color: var(--brand-ink); }
    .m-links a.warm { grid-column: auto; background: var(--coral-soft); color: var(--coral); }
    .m-foot a, .m-foot button { padding: 0 18px; }
    .m-search button { display: none; }
    .m-search input { padding-right: 16px; }
}

/* Menu smartphone : aucune rubrique ne doit être écrasée (toutes visibles, la liste défile) */
.m-nav > * { flex: none; }

/* Smartphone : bandeau photo de l'accueil réduit, sans icônes sur les tuiles d'accès rapide */
@media (max-width: 760px) {
    .banner.has-content, .banner.tall { height: auto; min-height: 0; }
    .banner.tall:not(.has-content) { height: 120px; }
    .banner-content { padding-top: 14px; padding-bottom: 12px; gap: 10px; }
    .banner-hello h1 { font-size: 1.45rem; margin: 0; }
    .banner-hello p { font-size: .9rem; }
    .hero-tiles { gap: 8px; }
    .hero-tile { flex-direction: row; align-items: center; min-height: 0; padding: 10px 12px; border-radius: 12px; }
    .hero-tile .ti { display: none; }
    .hero-tile strong { font-size: .92rem; }
    .hero-tile small { display: none; }
    .scene-tag, .scene-credit { display: none; }
}

/* « Ça bouge au CSE » : un bandeau discret par rubrique (fond neutre, liseré de couleur), sans effets */
.act-grid { grid-template-columns: 1fr; gap: 8px; }
.act-item, .act-item.feat { gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--c1); box-shadow: none; filter: none; }
.act-item::before { display: none; }
.act-item:hover { transform: none; box-shadow: var(--shadow-sm); }
.act-emoji, .act-item.feat .act-emoji { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 10px; background: var(--surface-2); box-shadow: none; transform: none; }
.act-item:hover .act-emoji { transform: none; }
.tone-orange .act-emoji::after { display: none; }
.act-body { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.act-kind { padding: 0; background: none; color: var(--c1); font-size: .72rem; }
.act-title, .act-item.feat .act-title { color: var(--ink); font-size: .95rem; font-weight: 600; }
a.act-title:hover { color: var(--brand); }
.act-detail, .act-item.feat .act-detail { flex-basis: 100%; color: var(--muted); font-size: .84rem; }
.act-side { flex-direction: row-reverse; align-items: center; align-self: center; gap: 8px; }
.act-ago { background: none; padding: 0; color: var(--muted); font-size: .76rem; font-weight: 500; }
.act-new { background: var(--c1); color: #fff; transform: none; box-shadow: none; animation: none; font-size: .62rem; padding: 2px 7px; }
.act-item.fresh { animation: none; }
@media (max-width: 480px) { .act-item { flex-wrap: nowrap; } .act-side { margin-left: 0; order: 0; flex-direction: column; align-items: flex-end; gap: 2px; } }

/* « Ça bouge au CSE » : des tuiles côte à côte (façon widgets), fond pastel de la couleur de la rubrique, tuile entière cliquable */
.act-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.act-item, .act-item.feat { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "emoji side" "body body"; align-content: start; gap: 14px 8px;
    min-height: 176px; padding: 16px; border-radius: 20px; overflow: hidden; color: var(--ink);
    background: color-mix(in srgb, var(--c1) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 26%, var(--line)); border-left-width: 1px;
    box-shadow: none; transition: transform .18s ease, box-shadow .18s ease; }
.act-item::before { display: block; content: ""; position: absolute; right: -34px; top: -34px; width: 124px; height: 124px; border-radius: 50%; inset: auto;
    right: -34px; top: -34px; background: color-mix(in srgb, var(--c1) 14%, transparent); pointer-events: none; }
.act-item:hover { transform: translateY(-3px); box-shadow: 0 14px 26px -18px var(--c1); }
.act-emoji, .act-item.feat .act-emoji { grid-area: emoji; justify-self: start; width: 48px; height: 48px; font-size: 1.6rem; border-radius: 16px;
    background: var(--surface); box-shadow: 0 6px 14px -8px var(--c1); transform: rotate(-6deg); }
.act-item:hover .act-emoji { transform: rotate(4deg) scale(1.06); }
.act-side { grid-area: side; align-self: start; flex-direction: column; align-items: flex-end; gap: 6px; }
.act-ago { color: var(--muted); font-size: .74rem; }
.act-new { background: var(--c1); color: #fff; }
.act-body { grid-area: body; flex-direction: column; align-items: flex-start; gap: 4px; }
.act-kind { color: var(--c1); font-size: .68rem; letter-spacing: .06em; }
.act-title, .act-item.feat .act-title { font-size: 1.02rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
a.act-title { text-decoration: none; }
a.act-title::after { content: ""; position: absolute; inset: 0; } /* toute la tuile est cliquable */
.act-detail, .act-item.feat .act-detail { flex-basis: auto; font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-item.fresh { animation: act-pop .7s cubic-bezier(.3, 1.6, .5, 1); }
@media (max-width: 720px) {
    .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .act-item, .act-item.feat { min-height: 150px; padding: 12px; border-radius: 16px; gap: 10px 6px; }
    .act-emoji, .act-item.feat .act-emoji { width: 40px; height: 40px; font-size: 1.35rem; border-radius: 13px; }
    .act-title, .act-item.feat .act-title { font-size: .92rem; }
    .act-detail { display: none; }
}
@media (max-width: 480px) { .act-item { flex-wrap: initial; } .act-side { margin-left: 0; order: 0; flex-direction: column; align-items: flex-end; gap: 6px; } }

.act-item.feat { grid-column: auto; }

/* ---------- Bibliothèque de la Gazette ---------- */
.mast-lib { text-decoration: underline; text-underline-offset: 3px; }
.mast-note { font-style: italic; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 22px 0 8px; }
.lib-month { grid-column: 1 / -1; margin: 14px 0 0; padding-bottom: 6px; border-bottom: 3px double var(--paper-ink); font-size: 1.3rem; text-transform: capitalize; }
.lib-month:first-child { margin-top: 0; }
.lib-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--paper-ink); background: color-mix(in srgb, var(--paper) 88%, #fff); color: var(--paper-ink);
            transition: transform .15s ease, box-shadow .15s ease; }
.lib-card:hover { transform: translateY(-3px); box-shadow: 4px 5px 0 var(--paper-ink); }
.lib-date { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; text-transform: capitalize; }
.lib-no { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-accent); font-weight: 700; }
.lib-lead { font-family: var(--serif); font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lib-count { margin-top: auto; font-size: .78rem; font-style: italic; opacity: .75; }

/* ---------- Course auto ---------- */
.arcade-card.theme-course, .score-panel.theme-course { --c1: #d8392f; --c2: #ff8a3d; }
.rc [hidden] { display: none !important; }
.rc-seats { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.rc-seats li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2, rgba(127, 127, 127, .1)); font-weight: 600; }
.rc-seats li.ai { opacity: .55; font-weight: 500; }
.rc-seats li.me { outline: 2px solid var(--brand, #2f7de1); }
.rc-seats li small { margin-left: auto; color: var(--muted); font-weight: 500; }
.rc-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: none; background: #888; border: 1px solid rgba(0, 0, 0, .25); }
.rc-dot0 { background: #e53935; } .rc-dot1 { background: #1e88e5; } .rc-dot2 { background: #fdd835; } .rc-dot3 { background: #43a047; }
.rc-start { font-size: 1.15rem; padding: 12px 28px; }
.rc-help { font-size: .84rem; margin-top: 14px; }
.rc-help kbd { padding: 0 6px; border: 1px solid var(--border, #ccc); border-radius: 5px; font-size: .8rem; }
.rc-vote { margin-top: 18px; }
.rc-tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 10px; }
.rc-track { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 2px solid var(--border, #d6dbe3); border-radius: 16px; background: var(--surface); color: inherit; text-align: left; cursor: pointer;
            transition: transform .15s ease, border-color .15s ease; }
.rc-track:hover:not(:disabled) { transform: translateY(-3px); border-color: #ff8a3d; }
.rc-track:disabled { cursor: default; opacity: .75; }
.rc-track.picked { border-color: #d8392f; box-shadow: 0 0 0 3px rgba(216, 57, 47, .25); }
.rc-track small { color: var(--muted); font-size: .74rem; }
.rc-thumb { width: 100%; height: 96px; border-radius: 10px; background: #2f9e4f; display: block; }
.rc-votes { position: absolute; top: 14px; right: 14px; padding: 2px 10px; border-radius: 999px; background: #d8392f; color: #fff; font-size: .74rem; font-weight: 700; }

.rc-race { position: fixed; inset: 0; z-index: 1000; background: #2f9e4f; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; height: 100vh; height: 100dvh; }
.rc-race canvas#rc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body.rc-playing { overflow: hidden; }
.rc-hud { position: absolute; inset: 0; pointer-events: none; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px; }
.rc-box { padding: 8px 14px; border-radius: 14px; background: rgba(15, 23, 42, .62); color: #fff; backdrop-filter: blur(4px); min-width: 120px; }
.rc-pos { font-size: 1.9rem; font-weight: 800; line-height: 1.05; }
.rc-lap, .rc-speed { font-size: .9rem; font-weight: 600; opacity: .95; }
.rc-role { font-size: .78rem; font-weight: 700; color: #ffd23f; min-height: 1em; }
.rc-board { list-style: none; margin: 0; padding: 8px 12px; border-radius: 14px; background: rgba(15, 23, 42, .5); color: #fff; font-size: .82rem; font-weight: 600; display: grid; gap: 3px; align-self: flex-start; }
.rc-board li { display: flex; align-items: center; gap: 7px; }
.rc-board li.me { color: #ffd23f; }
.rc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.rc-right canvas { width: 150px; height: 98px; border-radius: 12px; background: rgba(15, 23, 42, .6); }
.rc-quit { pointer-events: auto; padding: 6px 14px; border: 0; border-radius: 999px; background: rgba(15, 23, 42, .7); color: #fff; font-weight: 700; cursor: pointer; }
.rc-big { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-size: clamp(3rem, 14vw, 8rem); font-weight: 900; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .55); letter-spacing: .02em; }
.rc-big.go { color: #ffd23f; }
.rc-touch { display: none; position: absolute; left: 0; right: 0; bottom: 0; justify-content: space-between; align-items: flex-end; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
@media (pointer: coarse) { .rc-touch { display: flex; } }
.rc-pad { display: flex; gap: 12px; align-items: flex-end; }
.rc-btn { pointer-events: auto; touch-action: none; width: 92px; height: 92px; border: 3px solid rgba(255, 255, 255, .7); border-radius: 50%; background: rgba(15, 23, 42, .5); color: #fff;
          font-size: 2rem; font-weight: 800; display: grid; place-items: center; backdrop-filter: blur(3px); }
.rc-btn.on { background: rgba(255, 210, 63, .85); color: #111; border-color: #fff; }
.rc-btn.gas { width: 112px; height: 112px; font-size: 1.15rem; background: rgba(67, 160, 71, .6); }
.rc-btn.brake { font-size: .85rem; background: rgba(229, 57, 53, .6); }
.rc-btn.gas.on { background: rgba(255, 210, 63, .9); }

.rc-end { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 20, 40, .6); padding: 16px; z-index: 5; }
.rc-end-card { width: min(520px, 100%); max-height: 100%; overflow: auto; padding: 24px 22px; border-radius: 22px; background: var(--surface); color: var(--text, inherit); text-align: center; border-top: 8px solid #d8392f; }
.rc-end-card h2 { margin: 0 0 12px; font-size: 1.7rem; }
.rc-results { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.rc-results td { padding: 8px 6px; border-bottom: 1px solid var(--border, #e3e7ee); text-align: left; }
.rc-results td:first-child { font-weight: 800; width: 3.2em; }
.rc-results td:last-child { text-align: right; font-weight: 700; }
.rc-results tr.me td { background: rgba(255, 210, 63, .22); }
.rc-results .rc-dot { margin-right: 8px; vertical-align: -1px; }
.rc-end-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 760px) {
    .rc-board { display: none; }
    .rc-pos { font-size: 1.5rem; }
    .rc-box { min-width: 0; padding: 6px 10px; }
    .rc-right canvas { width: 110px; height: 72px; }
    .rc-btn { width: 78px; height: 78px; }
    .rc-btn.gas { width: 96px; height: 96px; }
}
@media (max-height: 460px) { .rc-btn { width: 64px; height: 64px; font-size: 1.5rem; } .rc-btn.gas { width: 80px; height: 80px; } .rc-board { display: none; } }

/* administration */
.race-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px 28px; }
.race-set { display: flex; flex-direction: column; gap: 6px; }
.race-set-head { display: flex; justify-content: space-between; align-items: baseline; }
.race-val { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.race-set input[type="range"] { width: 100%; }
.race-ends { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); }
.race-tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.race-track { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.race-track svg { width: 100%; height: 110px; background: #2f9e4f; border-radius: 12px; }
.race-track .road { fill: none; stroke: #4b5563; stroke-width: 150; stroke-linejoin: round; }
.race-track .line { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 8; stroke-dasharray: 40 50; stroke-linejoin: round; }
.race-track figcaption { display: flex; flex-direction: column; font-size: .88rem; }

/* ---------- Page Jeux : solo / en ligne ---------- */
.arcade-sec { margin-top: 30px; padding: 16px 18px 22px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--sec) 35%, transparent);
              background: linear-gradient(160deg, color-mix(in srgb, var(--sec) 11%, var(--surface)), var(--surface) 60%); }
.arcade-sec.solo { --sec: #1f9d8a; }
.arcade-sec.multi { --sec: #e8552d; }
.arcade-sec .arcade-grid { margin-top: 16px; }
.sec-head { display: flex; align-items: center; gap: 14px; }
.sec-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.sec-head p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.sec-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; font-size: 1.5rem; flex: none;
           background: linear-gradient(135deg, var(--sec), color-mix(in srgb, var(--sec) 55%, #ffd23f)); box-shadow: 0 6px 16px color-mix(in srgb, var(--sec) 35%, transparent); }
.sec-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border-radius: 999px; background: var(--sec); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.sec-tag i, .arcade-card .live i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: live-pulse 1.4s ease-in-out infinite; }
.arcade-card .live { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(20, 20, 30, .62); color: #fff;
                     font-size: .7rem; font-weight: 700; backdrop-filter: blur(4px); }
.arcade-card .live i { background: #ff4d4d; }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (max-width: 640px) { .arcade-sec { padding: 12px 12px 16px; border-radius: 18px; } .sec-tag { display: none; } .sec-ico { width: 40px; height: 40px; font-size: 1.25rem; } }

/* ---------- Le CSE : organigramme ---------- */
.avatar.xl { width: 132px; height: 132px; font-size: 2.6rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.org-photo .avatar { border: 4px solid var(--surface); }
.org-level { display: flex; flex-direction: column; align-items: center; margin-top: 26px; }
.org-person { --fn: var(--brand, #2f7de1); position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 0 18px 20px;
              border-radius: 22px; background: var(--surface); border: 1px solid var(--border, #e3e7ee); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.org-person::before { content: ""; align-self: stretch; height: 64px; margin: 0 -18px -44px; background: linear-gradient(135deg, var(--fn), color-mix(in srgb, var(--fn) 50%, #ffd23f)); }
.org-person:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.org-person h2, .org-person h3 { margin: 6px 0 0; }
.org-role { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1; padding: 3px 14px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #14213d;
            font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.org-photo { position: relative; z-index: 1; margin-top: 8px; }
.org-actions { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.org-person.star { width: min(420px, 100%); --fn: #e8552d; padding-bottom: 26px; }
.org-person.star::before { height: 86px; margin-bottom: -66px; }
.org-person.star h2 { font-size: 1.6rem; }
.org-top::after { content: ""; width: 3px; height: 30px; margin-top: 6px; background: linear-gradient(var(--fn, #e8552d), transparent); border-radius: 2px; }
.org-label { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 18px; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.org-label::before, .org-label::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--border, #d6dbe3), transparent); }
.org-mid { margin-top: 4px; }
.org-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; }
.org-row .org-person { width: min(240px, 100%); }
.org-person.fn-secretaire, .org-person.fn-secretaire_adjoint { --fn: #2f7de1; }
.org-person.fn-tresorier, .org-person.fn-tresorier_adjoint { --fn: #16a269; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; width: 100%; }
.org-person.small { --fn: #6a5ae0; padding-bottom: 16px; }
.org-person.small::before { height: 44px; margin-bottom: -30px; }
@media (max-width: 640px) { .org-person.star { width: 100%; } .org-row .org-person { width: 100%; } .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.arcade-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 20px; margin-top: 30px; align-items: start; }
.arcade-secs .arcade-sec { margin-top: 0; }
.arcade-secs .arcade-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.arcade-secs .sec-head p { font-size: .8rem; }
@media (max-width: 640px) { .arcade-secs { grid-template-columns: minmax(0, 1fr); } .arcade-secs .arcade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* ---------- Le CSE : missions en couleurs ---------- */
.sp-referent_harcelement { --sp: #d6405a; }
.sp-cssct { --sp: #16a269; }
.sp-commission_formation { --sp: #2f7de1; }
.sp-commission_logement { --sp: #8a5a2b; }
.sp-commission_egalite { --sp: #9b4fd6; }
.sp-commission_economique { --sp: #0b8a91; }
.sp-commission_marches { --sp: #5a6b7d; }
.sp-commission_asc { --sp: #e8552d; }
.sp-representant_proximite { --sp: #d89b00; }
.sp-representant_syndical { --sp: #6a5ae0; }
.chip[class*="sp-"] { background: color-mix(in srgb, var(--sp) 16%, var(--surface)); color: color-mix(in srgb, var(--sp) 80%, #000); border: 1px solid color-mix(in srgb, var(--sp) 45%, transparent); font-weight: 700; }
.mission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; width: 100%; }
.mission { padding: 16px 18px; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--sp) 14%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--sp) 40%, transparent);
           border-left: 8px solid var(--sp); }
.mission h3 { margin: 0; color: color-mix(in srgb, var(--sp) 85%, #000); }
.mission p { margin: 2px 0 10px; font-size: .78rem; }
.mission ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mission li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mission li a { font-weight: 700; }
.mission li small { flex-basis: 100%; margin-left: 42px; margin-top: -6px; }
.org-missions { margin-top: 34px; }

/* Page Jeux : mêmes hauteurs pour les blocs et les cartes */
.arcade-secs { align-items: stretch; }
.arcade-secs .arcade-sec { display: flex; flex-direction: column; }
.arcade-secs .arcade-grid { flex: 1; grid-auto-rows: 1fr; }
.arcade-card { height: 100%; }
.arcade-card .gdesc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(4 * 1.4em); }
.arcade-card .champion { min-height: 3.1em; }
.arcade-card .duel.solo { background: var(--c2); color: #14213d; }
.arcade-card .art-wrap { aspect-ratio: 240 / 140; }

/* Administration des jeux : jeux d'animation / jeux à gains */
.admin-games-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px; padding-bottom: 8px; font-size: 1.25rem; border-bottom: 3px solid #1f9d8a; }
.admin-games-title.prize { border-bottom-color: #d89b00; }
.admin-games-title small { font-size: .8rem; font-weight: 500; }
.game-admin.prize .game-row { border-left: 6px solid #d89b00; background: linear-gradient(90deg, rgba(255, 196, 0, .09), transparent 40%); }
.game-admin:not(.prize) .game-row { border-left: 6px solid #1f9d8a; }

/* ---------- La roue du CSE ---------- */
.wheel-page { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wheel-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 18px; }
.wheel-box { position: relative; width: min(100%, 460px); aspect-ratio: 1; }
.wheel-box canvas { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 14px 34px rgba(20, 33, 61, .28); }
.wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent;
                 border-top: 38px solid #d8392f; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .35)); }
.wheel-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; display: grid; place-items: center; width: 22%; height: 22%; border-radius: 50%;
             background: #14213d; color: #fff; font-weight: 800; letter-spacing: .06em; border: 5px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.wheel-btn { font-size: 1.2rem; padding: 14px 34px; }
.wheel-result { min-height: 1.6em; margin: 0; font-size: 1.15rem; font-weight: 800; text-align: center; }
.wheel-result.win { color: #16a269; }
.wheel-result.lose { color: var(--muted); }
.wheel-side { display: grid; gap: 16px; }
.wheel-weeks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.wheel-weeks li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.wheel-weeks li .wk-state { margin-left: auto; font-weight: 700; }
.wheel-weeks li.st-this_week { background: color-mix(in srgb, #e8552d 14%, var(--surface)); outline: 2px solid #e8552d; }
.wheel-weeks li.st-won { background: color-mix(in srgb, #16a269 16%, var(--surface)); }
.wheel-weeks li.st-missed, .wheel-weeks li.st-future { opacity: .6; }
@media (max-width: 860px) { .wheel-page { grid-template-columns: minmax(0, 1fr); } }

/* Campagnes de renseignements */
.pre { white-space: pre-wrap; }
.q-block { margin-top: 12px; }
.q-head { display: flex; justify-content: space-between; align-items: center; }
.free-answers { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.free-answers li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.free-answers strong { display: block; font-size: .85rem; }
dl.mine dt { font-weight: 600; margin-top: 10px; }
dl.mine dd { margin: 2px 0 0; }
a.card.poll { display: block; color: inherit; text-decoration: none; }

/* Demandes soumises à validation */
.requests { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.requests li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.requests .reason { flex-basis: 100%; }
.doc-preview { max-width: 100%; max-height: 520px; border: 1px solid var(--line); border-radius: 10px; }
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand, #2f7de1); color: #fff; font-size: .75rem; text-align: center; }

/* Achats groupés */
.gbuy { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.gbuy-img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; }
.gbuy-ph { display: grid; place-items: center; height: 160px; border-radius: 10px; background: var(--soft, #f1f3f8); color: var(--muted, #8a93a6); }
.gbuy-ph .ico { width: 48px; height: 48px; }
.gbuy-price { font-weight: 700; color: var(--brand, #2f7de1); }
.gbuy-poster img { width: 100%; height: auto; border-radius: 10px; display: block; }

/* Cartes cadeaux */
.gc-balance { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gc-amount { display: block; font-size: 1.9rem; color: var(--brand, #2f7de1); }
.gc-logo { max-width: 160px; max-height: 110px; object-fit: contain; border-radius: 10px; align-self: flex-start; }
.gc-codes dt { font-weight: 600; margin-top: 8px; }
.gc-codes dd { margin: 2px 0 0; }
.gc-code { font-size: 1.1rem; letter-spacing: .06em; padding: 4px 10px; user-select: all; }
.pad { padding: 0 20px 16px; }
.gc-banner { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.gc-banner .btn { margin-left: auto; }

/* Droits d'accès (administrateur du site) */
table.matrix th, table.matrix td { text-align: center; vertical-align: middle; }
table.matrix th:first-child, table.matrix td:first-child { text-align: left; }
table.matrix tr.grp th { text-align: left; background: var(--surface-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
table.matrix select { min-width: 8.5rem; }
.role-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
ul.plain li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Morpion */
.arcade-card.theme-morpion, .score-panel.theme-morpion { --c1: #6d4fe0; --c2: #b9a6ff; }
.arcade-card .duel.ai { background: #0f9d8a; color: #fff; }
.ttt-ai { margin-bottom: 18px; }
.ttt-ai h3 { margin-top: 0; }
.ttt-levels { display: grid; gap: 8px; margin-top: 10px; }
.ttt-levels button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.ttt-levels button:hover:not(:disabled) { border-color: #6d4fe0; background: color-mix(in srgb, #6d4fe0 10%, var(--surface-2)); }
.ttt-levels button:disabled { opacity: .55; cursor: default; }
.ttt-levels strong { font-size: 1rem; }
.ttt-levels small { color: var(--muted); }
.ttt-board-wrap { max-width: 420px; margin: 0 auto; }
.ttt-vs { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-weight: 700; }
.ttt-vs .you { color: #e8552d; }
.ttt-vs .them { color: #6d4fe0; }
.ttt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px; border-radius: 20px; background: linear-gradient(160deg, #6d4fe0, #4b34b4); }
.ttt-cell { aspect-ratio: 1; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .16); font: inherit; font-size: clamp(2.4rem, 11vw, 4rem); font-weight: 900; line-height: 1; cursor: default; padding: 0; color: #fff; }
.ttt-cell:not(:disabled) { cursor: pointer; }
.ttt-cell:not(:disabled):hover { background: rgba(255, 255, 255, .38); }
.ttt-cell.x { color: #ff7a59; background: #fff; }
.ttt-cell.o { color: #6d4fe0; background: #fff; }
.ttt-cell.win { background: #26e0a2; color: #0b3b2c; animation: bn-pulse 1.2s ease-in-out infinite; }
.ttt-grid.waiting { filter: saturate(.7); }
@media (hover: none) { .ttt-cell:not(:disabled):hover { background: rgba(255, 255, 255, .16); } }
.rc-level { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-weight: 600; }
.rc-level select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; }

/* Bibliothèque sous la Gazette */
.gz-library { margin-top: 38px; padding-top: 14px; border-top: 4px double var(--paper-rule); }
.lib-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lib-title { margin: 0; font-size: 1.7rem; color: var(--paper-ink); }
.lib-title small { font-size: .85rem; font-weight: 500; font-style: italic; margin-left: 8px; }
.lib-search input { width: min(380px, 70vw); }
.lib-hits { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.lib-hits li { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--paper-ink); background: color-mix(in srgb, var(--paper) 88%, #fff); color: var(--paper-ink); }
.lib-hit-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.lib-hit-title { font-size: 1.1rem; }
.lib-hit-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; }
.lib-hit-links a { text-decoration: underline; text-underline-offset: 3px; }
.gbuy-ph.gift { background: linear-gradient(150deg, #fff1d6, #ffd9e3); }
.gbuy-ph .gift-art { width: 112px; height: 94px; }

/* Sudoku */
.arcade-card.theme-sudoku, .score-panel.theme-sudoku { --c1: #0f8a7a; --c2: #7be0cf; }
.sd [hidden], .sd .bn-end[hidden] { display: none !important; }
.sd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sd-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.sd-tab.on { background: #0f8a7a; border-color: #0f8a7a; color: #fff; }
.sd-level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.sd-level-grid:has(.sd-level:nth-child(21)) { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.sd-level { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.sd-level strong { font-size: 1.25rem; }
.sd-level small { font-size: .72rem; color: var(--muted); }
.sd-level.next { border-color: #0f8a7a; box-shadow: 0 0 0 3px color-mix(in srgb, #0f8a7a 25%, transparent); }
.sd-level.done { background: color-mix(in srgb, #0f8a7a 14%, var(--surface-2)); border-color: #0f8a7a; }
.sd-level.locked { opacity: .5; cursor: not-allowed; }
.sd-board-wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: flex-start; margin-top: 12px; }
.sd-grid { display: grid; grid-template-columns: repeat(9, 1fr); width: min(468px, 94vw); border: 3px solid var(--ink); border-radius: 6px; background: var(--surface); }
.sd-cell { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 0; background: var(--surface); color: #2a54c7; font: inherit; font-size: clamp(1.1rem, 4.6vw, 1.7rem); font-weight: 600; cursor: pointer; display: grid; place-items: center; position: relative; }
.sd-cell.rb { border-right: 3px solid var(--ink); }
.sd-cell.bb { border-bottom: 3px solid var(--ink); }
.sd-cell.given { color: var(--ink); font-weight: 800; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); cursor: default; }
.sd-cell.hinted { color: #b36b00; }
.sd-cell.peer { background: color-mix(in srgb, #0f8a7a 10%, var(--surface)); }
.sd-cell.same { background: color-mix(in srgb, #0f8a7a 24%, var(--surface)); }
.sd-cell.sel { background: color-mix(in srgb, #ffb703 45%, var(--surface)); }
.sd-cell.bad { color: #d62839; background: color-mix(in srgb, #d62839 14%, var(--surface)); }
.sd-notes { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 100%; font-size: clamp(.5rem, 1.7vw, .72rem); font-weight: 600; color: var(--muted); }
.sd-notes i { font-style: normal; display: grid; place-items: center; }
.sd-pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.sd-pad button { height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; font-size: 1.3rem; font-weight: 700; cursor: pointer; }
.sd-pad button:hover { background: color-mix(in srgb, #0f8a7a 16%, var(--surface-2)); }
.sd-pad #sd-notes, .sd-pad #sd-hint { grid-column: span 3; font-size: 1rem; height: 46px; }
.sd-pad #sd-erase { grid-column: span 3; font-size: 1rem; height: 46px; }
.sd-pad button.used { visibility: hidden; }
.sd-opt { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.sd-pad #sd-notes.on { background: #0f8a7a; color: #fff; border-color: #0f8a7a; }
@media (max-width: 560px) { .sd-pad { grid-template-columns: repeat(9, 1fr); width: 94vw; } .sd-pad button { height: 46px; font-size: 1.1rem; padding: 0; } .sd-pad #sd-erase, .sd-pad #sd-notes, .sd-pad #sd-hint { grid-column: span 3; font-size: .85rem; } }

/* Salle des archives (procès-verbaux) : un entrepôt d'archives secret, sombre et industriel. Un carton kraft par année sur des rayonnages d'acier,
   un terminal qui commente, et le carton ouvert avec un dossier cartonné par mois. */
.arch-switch { display: flex; gap: 8px; align-items: center; }
.arch-live { margin: 6px 0 0; }
.arch { --amber: #e8a33d; --steel: #2f3b43; --phosphor: #9fe3b0; margin-top: 18px; padding: 18px 18px 16px; border-radius: 8px; position: relative; overflow: hidden;
    border: 1px solid #263038; color: #c9d3d8; font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    background: linear-gradient(#0f1519, #090d10);
    box-shadow: inset 0 0 90px rgba(0, 0, 0, .75), 0 14px 30px -16px rgba(0, 0, 0, .6); }
/* le cône de lumière d'un néon au plafond, qui vacille à peine */
.arch::before { content: ""; position: absolute; left: 50%; top: -30px; width: 78%; height: 340px; transform: translateX(-50%); pointer-events: none;
    background: radial-gradient(ellipse 50% 100% at 50% 0%, rgba(255, 224, 160, .17), transparent 72%); animation: neon 9s linear infinite; }
.arch > * { position: relative; }
.arch-plate { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 14px; font-size: .68rem; text-transform: uppercase; letter-spacing: .2em; color: #8fa0aa; }
.arch-plate span { padding: 3px 10px; border: 1px solid var(--steel); border-radius: 2px; background: rgba(255, 255, 255, .02); }
.arch-plate .red { color: #ff6b5b; border-color: rgba(255, 107, 91, .5); }

/* le terminal des archives */
.arch-keeper { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.keeper { border: 1px solid var(--steel); background: #10171b; border-radius: 8px; padding: 6px; cursor: pointer; flex: none; line-height: 0; }
.keeper:hover { border-color: var(--amber); }
.keeper .led { animation: led 2.4s ease-in-out infinite; }
.bubble { margin: 0; padding: 10px 14px; flex: 1; max-width: 640px; background: #0b1114; border: 1px solid var(--steel); border-left: 3px solid var(--amber);
    border-radius: 2px; color: var(--phosphor); font-size: .86rem; line-height: 1.45; text-shadow: 0 0 6px rgba(159, 227, 176, .35); }
.bubble::before { content: "> "; color: var(--amber); }
.bubble::after { content: "▌"; margin-left: 3px; color: var(--phosphor); animation: blink 1.1s steps(1) infinite; }

/* rayonnages d'acier : montants boulonnés, tablettes à liseré de sécurité */
.arch-frame { padding: 0 14px; border-left: 12px solid #46535c; border-right: 12px solid #46535c; border-radius: 3px;
    background: repeating-linear-gradient(90deg, #11181c 0 30px, #0e1418 30px 32px); box-shadow: inset 0 0 40px rgba(0, 0, 0, .6); }
.arch-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 34px 6px 22px; }
.arch-row::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: 0; height: 15px;
    background: repeating-linear-gradient(-45deg, var(--amber) 0 9px, #14181b 9px 18px) bottom / 100% 5px no-repeat, linear-gradient(#78858f, #3d4850);
    border-top: 1px solid #9aa8b2; box-shadow: 0 8px 14px rgba(0, 0, 0, .55); }
.arch-place { min-height: 166px; display: flex; align-items: flex-end; }

.annee { position: relative; display: block; width: 100%; height: 150px; text-decoration: none; color: #1b150b; cursor: pointer;
    transition: transform .2s ease, filter .2s ease, opacity .2s ease; transform-origin: bottom center; }
.annee .peek { position: absolute; left: 6%; right: 6%; top: -2px; height: 36px; display: flex; gap: 3px; align-items: flex-end; z-index: 0; }
.annee .peek i { flex: 1 1 0; border-radius: 2px 2px 0 0; height: 100%; transition: height .25s; }
.annee .peek i.plein { background: #cdb98a; border: 1px solid #8f7a4a; border-bottom: 0; box-shadow: inset 0 5px 0 var(--q, #5f8aa8); }
.annee .peek i.vide { height: 10px; background: transparent; border: 1px dashed #3a464e; border-bottom: 0; }
.annee .peek i.q1 { --q: #5f8aa8; } .annee .peek i.q2 { --q: #6a9a7a; } .annee .peek i.q3 { --q: #c2923a; } .annee .peek i.q4 { --q: #b4583f; }
.annee .lid { display: block; position: relative; z-index: 2; height: 30px; margin: 30px -4px 0; border-radius: 3px 3px 1px 1px; background: linear-gradient(#a98c5e, #8f7650);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .35); transition: transform .3s ease; transform-origin: left bottom; }
.annee .lid::after { content: ""; position: absolute; left: 50%; top: 10px; width: 26%; height: 9px; margin-left: -13%; border-radius: 5px; background: #1b150b; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .7); }
.annee .box { display: block; position: relative; z-index: 1; height: 90px; border-radius: 0 0 3px 3px; box-shadow: 0 4px 8px rgba(0, 0, 0, .6);
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 5px), linear-gradient(#8f7650, #7a6342); }
.annee .sticker { position: absolute; left: 12%; right: 12%; top: 9px; display: flex; flex-direction: column; align-items: center; padding: 4px 6px 12px; border-radius: 1px;
    background: #ddd6c2; border: 1px solid rgba(0, 0, 0, .4); line-height: 1.1; }
.annee .sticker::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 3px; height: 6px;
    background: repeating-linear-gradient(90deg, #15110a 0 2px, transparent 2px 4px, #15110a 4px 5px, transparent 5px 8px); }
.annee .sticker b { font-size: 1.45rem; letter-spacing: .16em; color: #15110a; font-variant-numeric: tabular-nums; }
.annee .sticker i { font-style: normal; font-size: .66rem; font-weight: 800; color: #8a1f17; text-transform: uppercase; letter-spacing: .16em; }
.annee .gauge { position: absolute; left: 10%; right: 10%; bottom: 7px; text-align: center; font-size: .6rem; font-weight: 700; color: rgba(21, 17, 10, .78); text-transform: uppercase; letter-spacing: .14em; }
.annee .gauge em { font-style: normal; }
.annee .match { position: absolute; z-index: 4; right: -8px; top: 22px; min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 2px;
    background: var(--amber); color: #14181b; font-weight: 800; font-size: .8rem; box-shadow: 0 0 10px rgba(232, 163, 61, .6); }
.annee .match[hidden] { display: none; }
.annee:hover, .annee:focus-visible { transform: translateY(-7px); filter: drop-shadow(0 0 12px rgba(232, 163, 61, .4)); outline: none; }
.annee:focus-visible .lid { box-shadow: 0 0 0 2px var(--amber); }
.annee.open .lid { transform: translateY(-8px) rotate(-5deg); }
.annee.open .peek i.plein { height: 130%; }
.annee.open { filter: drop-shadow(0 0 10px rgba(232, 163, 61, .45)); }
.annee.dim { opacity: .22; filter: grayscale(1); }

/* le carton ouvert : un dossier par mois */
.arch.js .boite:not(.open) { display: none; }
.boite { margin-top: 22px; padding: 16px 18px 18px; border-radius: 3px; background: #11181c; border: 1px solid var(--steel); border-top: 3px solid var(--amber);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .55), inset 0 0 40px rgba(0, 0, 0, .45); color: #c9d3d8; scroll-margin-top: 110px; position: relative; }
.boite-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px dashed var(--steel); }
.boite-head h2 { margin: 0; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .26em; color: var(--amber); }
.boite-head p { margin: 0; color: #8fa0aa; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.chemises { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 10px; }
.mois { position: relative; min-height: 112px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.mois.vide { border: 1px dashed #36444d; border-radius: 2px; align-items: center; justify-content: center; text-align: center; }
.mois.vide::after { content: attr(data-month) "\A" attr(data-note); white-space: pre; font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: #5d6e78; line-height: 1.6; }
.mois.vide.future { border-style: dotted; border-color: #26323a; }
.mois.vide.future::after { color: #3e4c55; }
.mois.vide.now { border-color: var(--amber); background: rgba(232, 163, 61, .06); animation: slot-wait 1.8s ease-in-out infinite; }
.mois.vide.now::after { color: var(--amber); }

.chemise { --tape: #5f8aa8; position: relative; display: block; margin-top: 22px; text-decoration: none; color: #231a0c; transition: transform .2s ease, filter .2s ease, opacity .2s ease; transform-origin: bottom left; }
.chemise.q1 { --tape: #5f8aa8; } .chemise.q2 { --tape: #6a9a7a; } .chemise.q3 { --tape: #c2923a; } .chemise.q4 { --tape: #b4583f; }
.chemise .onglet { position: absolute; left: 0; top: -20px; padding: 3px 12px 2px; border-radius: 3px 3px 0 0; background: var(--tape); color: #fff; font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.chemise .corps { display: flex; flex-direction: column; gap: 3px; min-height: 76px; padding: 10px 10px 8px; border-radius: 0 3px 3px 3px; border: 1px solid #8f7a4a;
    background: linear-gradient(#d6bf8b, #c6ab72); box-shadow: 0 3px 8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.chemise .corps strong { font-size: .88rem; color: #4a1d12; text-transform: uppercase; letter-spacing: .04em; }
.chemise .corps small { font-size: .72rem; line-height: 1.3; color: #3a2d17; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chemise:hover, .chemise:focus-visible { transform: translateY(-6px); filter: drop-shadow(0 0 10px rgba(232, 163, 61, .45)); z-index: 3; outline: none; }
.chemise:focus-visible .corps { box-shadow: 0 0 0 2px var(--amber); }
.chemise.dim { opacity: .2; filter: grayscale(1); pointer-events: none; }
.chemise .stamp { position: absolute; z-index: 4; right: 5px; top: 8px; padding: 0 4px; border: 2px solid #a8281d; border-radius: 2px; color: #a8281d; background: rgba(255, 255, 255, .12);
    font-size: .5rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-8deg); opacity: .85; pointer-events: none; }
.chemise .fresh { position: absolute; z-index: 4; right: 0; top: -22px; padding: 2px 9px; border-radius: 2px; background: #c0392b; color: #fff; font-size: .58rem; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 0 8px rgba(255, 90, 70, .5); pointer-events: none; }

/* dossier ouvert : une pièce confidentielle tapée à la machine */
.dossier { border: 0; padding: 0; border-radius: 4px; background: transparent; max-width: min(460px, 92vw); width: 100%; font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace; }
.dossier::backdrop { background: rgba(2, 5, 7, .82); }
.dossier .folder { position: relative; margin-top: 18px; padding: 34px 24px 20px; background: linear-gradient(#d9c28f, #c9ae75); border-radius: 2px 6px 6px 6px; color: #231a0c;
    box-shadow: 0 0 0 1px #8f7a4a, 0 24px 50px rgba(0, 0, 0, .7); }
.dossier .folder::before { content: "Confidentiel · usage interne"; position: absolute; right: 14px; top: 10px; padding: 1px 8px; border: 2px solid #a8281d; border-radius: 2px; color: #a8281d;
    font-size: .6rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; transform: rotate(-3deg); opacity: .85; }
.dossier .tab { position: absolute; top: -18px; left: 0; padding: 3px 18px; border-radius: 4px 4px 0 0; background: #c9ae75; font-size: .66rem; text-transform: uppercase; letter-spacing: .2em; font-weight: 800; }
.dossier h2 { margin: 6px 0 4px; font-size: 1.15rem; color: #2a1a0a; text-transform: uppercase; letter-spacing: .04em; }
.dossier .when { margin: 0 0 8px; font-weight: 700; color: #6b2a1c; }
.dossier .doc-desc { background: rgba(255, 255, 255, .35); padding: 8px 12px; border-radius: 2px; border: 1px dashed rgba(60, 40, 10, .45); }
.dossier .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* animations : les cartons se rangent un à un, le terminal clignote, la case du mois en cours attend son procès-verbal */
@keyframes carton-in { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes neon { 0%, 100% { opacity: 1; } 46% { opacity: 1; } 47% { opacity: .55; } 48% { opacity: 1; } 71% { opacity: .85; } 72% { opacity: 1; } }
@keyframes slot-wait { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.arch-place .annee { animation: carton-in .45s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--r, 0ms) + var(--d, 0ms)); }
.arch-place:nth-child(2) { --d: 90ms; } .arch-place:nth-child(3) { --d: 180ms; } .arch-place:nth-child(4) { --d: 270ms; }
.arch-row:nth-child(2) { --r: 300ms; } .arch-row:nth-child(3) { --r: 600ms; }

@media (max-width: 900px) {
    .chemises { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .arch { padding: 12px 8px 10px; }
    .arch-frame { border-left-width: 8px; border-right-width: 8px; padding: 0 8px; }
    .arch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 30px 2px 20px; }
    .arch-row::after { left: -8px; right: -8px; }
    .chemises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bubble { font-size: .8rem; padding: 8px 10px; }
    .keeper svg { width: 42px; height: 42px; }
    .boite { padding: 12px 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { .arch::before, .keeper .led, .bubble::after, .arch-place .annee, .mois.vide.now { animation: none; } .annee, .chemise, .annee .lid { transition: none; } .annee:hover, .chemise:hover { transform: none; } }
