/* =====================================================================
   Portail LFPL — feuille de style unique (sans framework ni CDN)
   Charte : NDF / « La Ligue et Vous » — Segoe UI, bleu institutionnel #2D427B,
   bleu d'action #416EA9, rouge #D8171C, doré #C19A2A.
   Pages de connexion : fond clair #EEF2F7. Accueil : fond bleu nuit animé, tuiles fixes.
   ===================================================================== */

:root {
    --navy: #2D427B;
    --navy-deep: #1F2F59;
    --night: #0B1733;
    --blue: #416EA9;
    --blue-hover: #325491;
    --red: #D8171C;
    --red-deep: #B0141A;
    --gold: #C19A2A;
    --gold-light: #F3D27A;
    --green: #1E8A5A;
    --green-deep: #176F49;

    --bg: #EEF2F7;
    --surface: #FFFFFF;
    --surface-2: #F6F8FB;
    --ink: #1F2A37;
    --muted: #566174;           /* 5,4:1 sur #EEF2F7 — conforme AA */
    --line: #E3E8EF;
    --line-strong: #D3DAE4;

    --glass: rgba(15, 27, 61, .58);
    --glass-hover: rgba(22, 38, 82, .74);
    --glass-line: rgba(255, 255, 255, .16);
    --on-dark-muted: rgba(255, 255, 255, .8);

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-1: 0 1px 3px rgba(16, 33, 60, .06), 0 8px 24px rgba(16, 33, 60, .05);
    --shadow-2: 0 2px 6px rgba(16, 33, 60, .08), 0 18px 40px rgba(16, 33, 60, .12);
    --focus-ring: 0 0 0 3px rgba(193, 154, 42, .65);

    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
.ico { display: inline-block; flex-shrink: 0; vertical-align: -0.15em; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-md);
    font-weight: 700; text-decoration: none; transition: top .15s var(--ease);
}
.skip-link:focus { top: 12px; color: #fff; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

[hidden] { display: none !important; }

/* ---------------------------------------------------------------------
   Boutons
   --------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--blue);
    --btn-bg-hover: var(--blue-hover);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 11px 20px;
    border: 0; border-radius: var(--radius-md);
    background: var(--btn-bg); color: #fff;
    font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .01em;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s var(--ease), transform .08s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--btn-bg-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn[disabled], .btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.btn--block { width: 100%; }
.btn--ghost {
    --btn-bg: transparent; --btn-bg-hover: var(--surface-2);
    color: var(--navy); border: 1px solid var(--line-strong);
}
.btn--ghost:hover { color: var(--navy); }
.btn--sm { min-height: 40px; padding: 7px 13px; font-size: 14px; border-radius: 10px; }
.btn--icon { width: 44px; min-height: 44px; padding: 0; }

.btn .spinner { display: none; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
.btn[aria-busy="true"] .btn-icon { display: none; }

.spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   Messages (flash, erreurs de formulaire)
   --------------------------------------------------------------------- */
.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 14px; margin: 0 0 18px;
    border-radius: var(--radius-md); border: 1px solid; font-size: 14.5px; line-height: 1.45;
}
.alert .ico { margin-top: 2px; }
.alert--success { background: #E8F5EE; border-color: #B7E0C9; color: #145C3C; }
.alert--error, .alert--danger { background: #FDECEC; border-color: #F5C2C3; color: #8E1014; }
.alert--warning { background: #FBF4E2; border-color: #EBD9A6; color: #6E5410; }
.alert--info { background: #EAF1FA; border-color: #C3D5EE; color: #24365F; }

/* ---------------------------------------------------------------------
   Champs de formulaire (thème form/portal_theme.html.twig)
   --------------------------------------------------------------------- */
.field { margin: 0 0 18px; }
.field label { display: block; margin: 0 0 6px; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
    width: 100%; min-height: 48px; padding: 11px 14px;
    font: inherit; font-size: 16px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input::placeholder { color: #8A94A6; }
.field input:hover { border-color: #B9C3D1; }
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(65, 110, 169, .16); }
.field input:focus-visible { box-shadow: 0 0 0 4px rgba(65, 110, 169, .16), var(--focus-ring); }
.field--error input { border-color: var(--red); }
.field--error input:focus { box-shadow: 0 0 0 4px rgba(216, 23, 28, .14); }
.field-help { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.field-error { margin: 7px 0 0; color: var(--red-deep); font-size: 14px; font-weight: 600; }
.field-error p { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.field-error .ico { margin-top: 2px; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-toggle {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 44px; height: 40px; display: grid; place-items: center;
    background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer;
}
.password-toggle:hover { color: var(--navy); background: var(--surface-2); }

.form-errors { margin: 0 0 18px; }

/* ---------------------------------------------------------------------
   Pages d'authentification : texte de marque sur le fond animé + carte formulaire blanche
   --------------------------------------------------------------------- */
.auth-shell { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

.auth-brand {
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    padding: 48px clamp(28px, 5vw, 72px);
    color: #fff;
}

.brand-logo { display: inline-flex; align-items: center; gap: 14px; }
.brand-logo img { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.brand-logo span { font-weight: 700; font-size: 14px; line-height: 1.3; letter-spacing: .02em; opacity: .92; }

.auth-brand h1 {
    margin: 0 0 14px; max-width: 13ch;
    font-size: clamp(34px, 4.4vw, 58px); line-height: 1.02; font-weight: 800; letter-spacing: -.02em;
}
.auth-brand h1 em { font-style: normal; color: var(--gold-light); }
.auth-brand .lead { margin: 0; max-width: 42ch; font-size: 17px; color: rgba(255, 255, 255, .86); }

.brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.brand-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: rgba(255, 255, 255, .9); }
.brand-points .pt-ico {
    width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0;
    border-radius: 10px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}

.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px; }
.auth-card {
    width: 100%; max-width: 440px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: var(--shadow-1); padding: clamp(24px, 4vw, 38px);
    animation: rise .45s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.auth-card h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.auth-card .subtitle { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.auth-card .card-icon, .empty .card-icon {
    width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 18px;
    border-radius: 14px; background: #EAF1FA; color: var(--blue);
}
.auth-card .card-icon--success { background: #E8F5EE; color: var(--green); }
.auth-card .card-icon--warning { background: #FBF4E2; color: #8A6A12; }

.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14.5px; }
.auth-links a { font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
.hint strong { color: var(--ink); }
.domain-pill {
    display: inline-block; padding: 1px 8px; border-radius: 999px;
    background: #EAF1FA; color: var(--navy); font-weight: 700; font-size: 13px;
}
.auth-footer { margin-top: 22px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* Carte blanche posée sur le fond sombre : ombre plus marquée, liens de pied de page en doré. */
body.night .auth-card { border-color: transparent; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .15); }
body.night .auth-footer { color: var(--on-dark-muted); }
body.night .auth-footer a { color: var(--gold-light); }
body.night .auth-footer a:hover { color: #FFE7A6; }
body.night .auth-card .auth-footer--card { color: var(--muted); }
body.night .auth-card .auth-footer--card a { color: var(--blue); }
body.night .auth-card .auth-footer--card a:hover { color: var(--blue-hover); }

/* ---------------------------------------------------------------------
   Barre supérieure (claire par défaut, sombre sur l'accueil)
   --------------------------------------------------------------------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 12px;
    padding: 12px clamp(16px, 3vw, 32px);
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.topbar .brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 3px; }
.topbar .brand strong { display: block; font-size: 16px; line-height: 1.15; }
.topbar .brand small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-left: 4px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
    background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em;
}
.user-chip .who { line-height: 1.2; }
.user-chip .who strong { display: block; font-size: 14.5px; }
.user-chip .who small { display: block; font-size: 12.5px; color: var(--muted); }

.topbar--dark {
    position: relative; background: transparent; backdrop-filter: none;
    border-bottom-color: rgba(255, 255, 255, .12); color: #fff;
    padding-top: 16px; padding-bottom: 16px;
}
.topbar--dark .brand { color: #fff; }
.topbar--dark .brand small, .topbar--dark .user-chip .who small { color: var(--on-dark-muted); }
.topbar--dark .avatar { background: var(--gold-light); color: var(--navy-deep); }
.topbar--dark .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); border-radius: 999px; }
.topbar--dark .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------------------------------------------------------------
   Fond animé fixe (accueil, connexion, mot de passe, accès refusé) — classe « night » sur <body>.
   Seules transform et opacité sont animées : fluide et peu gourmand.
   --------------------------------------------------------------------- */
body.night { background: var(--night); color: #fff; }
body.night .site-footer a, body.night .empty--glass a { color: var(--gold-light); }
body.night .site-footer a:hover, body.night .empty--glass a:hover { color: #FFE7A6; }

.home-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--night); }
.home-shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.blob { position: absolute; border-radius: 50%; will-change: transform; }
.blob--1 { width: 64vmax; height: 64vmax; left: -16vmax; top: -20vmax; background: radial-gradient(circle, rgba(65, 110, 169, .70) 0%, rgba(65, 110, 169, 0) 64%); animation: drift-1 42s ease-in-out infinite alternate; }
.blob--2 { width: 54vmax; height: 54vmax; right: -14vmax; top: 6vmax; background: radial-gradient(circle, rgba(216, 23, 28, .42) 0%, rgba(216, 23, 28, 0) 62%); animation: drift-2 51s ease-in-out infinite alternate; }
.blob--3 { width: 58vmax; height: 58vmax; left: 26vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(193, 154, 42, .34) 0%, rgba(193, 154, 42, 0) 62%); animation: drift-3 61s ease-in-out infinite alternate; }
.blob--4 { width: 46vmax; height: 46vmax; left: 42vmax; top: -14vmax; background: radial-gradient(circle, rgba(90, 125, 210, .45) 0%, rgba(90, 125, 210, 0) 62%); animation: drift-4 46s ease-in-out infinite alternate; }
@keyframes drift-1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(18vmax, 11vmax) scale(1.15); } 100% { transform: translate(8vmax, 28vmax) scale(.95); } }
@keyframes drift-2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-20vmax, 15vmax) scale(1.2); } 100% { transform: translate(-8vmax, -4vmax) scale(.9); } }
@keyframes drift-3 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-19vmax, -18vmax) scale(1.1); } 100% { transform: translate(16vmax, -10vmax) scale(1.05); } }
@keyframes drift-4 { 0% { transform: translate(0, 0) scale(.9); } 50% { transform: translate(-14vmax, 20vmax) scale(1.1); } 100% { transform: translate(12vmax, 8vmax) scale(1); } }

.pitch-3d {
    position: absolute; left: -5vw; top: 30vh; width: 110vw; max-width: none; height: auto;
    transform: perspective(1200px) rotateX(58deg); transform-origin: 50% 0;
}
.pitch-line { stroke: rgba(255, 255, 255, .16); }
.spark {
    stroke: var(--gold-light); stroke-dasharray: 4 96;
    animation: spark-run 14s linear infinite;
    filter: drop-shadow(0 0 6px rgba(243, 210, 122, .9));
}
.spark--2 { stroke: #fff; animation-duration: 21s; animation-delay: -6s; }
.spark--3 { animation-duration: 18s; animation-delay: -11s; }
@keyframes spark-run { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.home-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(11, 23, 51, 0) 0%, rgba(11, 23, 51, .55) 80%); }

/* ---------------------------------------------------------------------
   Accueil : contenu
   --------------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 48px) 40px; flex: 1; display: flex; flex-direction: column; }

.home-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: 32px; }
.home-hero .eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.home-hero h1 { margin: 0 0 8px; font-size: clamp(34px, 5vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.home-hero .lead { margin: 0; font-size: 18px; color: rgba(255, 255, 255, .84); }

.search { position: relative; width: min(100%, 460px); }
/* z-index : le verre dépoli (backdrop-filter) du champ crée un plan qui recouvrirait l'icône et le raccourci. */
.search .ico { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 1; }
.search input {
    width: 100%; min-height: 54px; padding: 12px 52px 12px 50px;
    font: inherit; font-size: 16px;
    border-radius: 16px;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search kbd {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    min-width: 26px; padding: 2px 7px; border-radius: 6px; font: 600 12.5px var(--font); text-align: center; z-index: 1;
}
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(3); cursor: pointer; }
.search--glass .ico { color: #fff; opacity: .85; }
.search--glass input {
    color: #fff; background: var(--glass); border: 1px solid rgba(255, 255, 255, .26);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.search--glass input::placeholder { color: rgba(255, 255, 255, .72); }
.search--glass input:focus { outline: none; border-color: rgba(243, 210, 122, .9); box-shadow: 0 0 0 4px rgba(243, 210, 122, .25); }
.search--glass kbd { border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .85); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
    min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px;
    border-radius: 999px; border: 1px solid rgba(255, 255, 255, .26);
    background: rgba(15, 27, 61, .45); color: #fff;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: rgba(255, 255, 255, .55); }
.chip[aria-pressed="true"] { background: #fff; color: var(--navy-deep); border-color: #fff; }
.chip-count { font-size: 12.5px; opacity: .8; }

.tiles-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr)); }
.tiles-grid > li { display: flex; }

/* Tuiles immobiles : au survol, seuls l'éclairage et la flèche changent. */
.tile {
    --c: var(--blue);
    width: 100%; min-height: 158px; padding: 22px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
    background: var(--glass); border: 1px solid var(--glass-line); border-radius: 20px;
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    color: #fff; text-decoration: none;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
body.home .tile, body.home .tile:hover { color: #fff; }
.tile:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, .42); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 48px -24px rgba(0, 0, 0, .6); }
.tile:focus-visible { outline: none; border-radius: 20px; box-shadow: 0 0 0 3px var(--gold-light); }

.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tile-icon {
    width: 50px; height: 50px; flex-shrink: 0; border-radius: 15px;
    display: grid; place-items: center; background: var(--c); color: #fff;
    box-shadow: 0 8px 22px -8px var(--c);
}
.tile-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .74); text-align: right; max-width: 60%; }
.tile-badge { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }

.tile-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tile-text { min-width: 0; }
.tile h3 { margin: 0; font-size: 18px; line-height: 1.25; font-weight: 800; color: #fff; }
.tile p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--on-dark-muted); }
.tile-go {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
    display: grid; place-items: center; background: #fff; color: var(--navy-deep);
    opacity: 0; transition: opacity .2s var(--ease);
}
.tile:hover .tile-go, .tile:focus-visible .tile-go { opacity: 1; }
@media (hover: none) { .tile-go { opacity: 1; } }

.empty {
    text-align: center; padding: 48px 24px; background: var(--surface);
    border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.empty .card-icon { margin: 0 auto 16px; width: 60px; height: 60px; border-radius: 16px; }
.empty h2 { margin: 0 0 8px; font-size: 21px; color: var(--navy); }
.empty p { margin: 0 auto; max-width: 52ch; color: var(--muted); }
.empty--glass { background: var(--glass); border-color: rgba(255, 255, 255, .3); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.empty--glass h2 { color: #fff; }
.empty--glass p { color: var(--on-dark-muted); }
.empty--glass .card-icon { background: rgba(255, 255, 255, .12); color: #fff; }

.site-footer {
    margin-top: auto; padding-top: 40px;
    display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
    font-size: 13.5px; color: var(--muted);
}
.site-footer::before { content: ""; flex-basis: 100%; height: 1px; background: var(--line-strong); margin-bottom: 12px; }
body.night .site-footer { color: var(--on-dark-muted); }
body.night .site-footer::before { background: rgba(255, 255, 255, .16); }

/* Navigateur sans verre dépoli : fond opaque, le texte reste lisible quel que soit le fond. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .tile, .chip, .search--glass input, .empty--glass { background: rgba(15, 27, 61, .92); }
    .tile:hover { background: rgba(22, 38, 82, .96); }
}

/* ---------------------------------------------------------------------
   Page « accès refusé »
   --------------------------------------------------------------------- */
.center-page { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 24px 16px; }
.center-page .auth-card { max-width: 480px; }

/* ---------------------------------------------------------------------
   Adaptations
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 26px 20px 30px; gap: 20px; }
    .auth-brand h1 { font-size: 30px; max-width: none; margin-bottom: 8px; }
    .auth-brand .lead { font-size: 15.5px; }
    .brand-points { display: none; }
    .auth-panel { padding: 24px 16px 40px; justify-content: flex-start; }
    .pitch-3d { top: 45vh; width: 180vw; left: -40vw; }
}

@media (max-width: 640px) {
    .user-chip .who, .topbar .brand small { display: none; }
    .topbar .btn span.label { display: none; }
    .topbar .btn--sm { width: 44px; min-height: 44px; padding: 0; }
    .home-hero { align-items: stretch; }
    .search { width: 100%; }
    .search kbd { display: none; }
    /* Filtres sur une seule ligne défilante plutôt que 4 lignes empilées. */
    .chips {
        flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none;
        margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px;
    }
    .chips::-webkit-scrollbar { display: none; }
    .chip { flex-shrink: 0; scroll-snap-align: start; }
}

/* Réduction des animations demandée par le poste : fond figé, aucun mouvement. */
@media (prefers-reduced-motion: reduce) {
    .blob, .spark { animation: none !important; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
