/* ═══════════════════════════════════════════════════════════════
   GesAccès — identité propre, distincte de la gestion immobilière
   Vert teal de Saytuko ; vert « autorisé » et rouge « refusé » pour les décisions.
   ═══════════════════════════════════════════════════════════════ */
.ga-root {
    --ga-navy: #0A3F44;
    --ga-navy-2: #0E6B6B;
    --ga-blue: #0E6B6B;
    --ga-blue-soft: rgba(14, 107, 107, 0.10);
    --ga-ok: #12A150;
    --ga-ok-soft: rgba(18, 161, 80, 0.12);
    --ga-ko: #D92D3A;
    --ga-ko-soft: rgba(217, 45, 58, 0.11);
    --ga-warn: #B97708;
    --ga-warn-soft: rgba(232, 163, 23, 0.16);
    --ga-bg: #F1F4F2;
    --ga-surface: #FFFFFF;
    --ga-ink: #1c212b;
    --ga-muted: #5f6b7a;
    --ga-line: rgba(28, 33, 43, 0.09);
    background: var(--ga-bg);
    color: var(--ga-ink);
}

.ga-root.ga-dark {
    --ga-bg: #0f1117;
    --ga-surface: #161b27;
    --ga-ink: #f1f5f9;
    --ga-muted: #94a3b8;
    --ga-line: rgba(255, 255, 255, 0.09);
    --ga-blue: #4FC3BE;
    --ga-blue-soft: rgba(79, 195, 190, 0.14);
    --ga-warn: #F2C14E;
}

/* ── Barre du haut et navigation ─────────────────────────────── */
.ga-appbar {
    background: var(--ga-surface) !important;
    color: var(--ga-ink) !important;
    border-bottom: 1px solid var(--ga-line);
}
.ga-appbar .mud-icon-button { color: var(--ga-ink); }

.ga-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; color: inherit; }
.ga-mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(145deg, var(--ga-navy), var(--ga-navy-2));
    display: grid; place-items: center; color: #fff; flex: none;
}
.ga-brand-name { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.ga-brand-sub { font-size: 0.7rem; color: var(--ga-muted); margin-top: -2px; }

.ga-drawer { background: var(--ga-navy) !important; border-right: none !important; }
.ga-drawer-inner { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; height: 100%; }
.ga-nav-label { color: rgba(255, 255, 255, 0.45); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 14px 12px 6px; }
.ga-drawer .mud-nav-link { color: rgba(255, 255, 255, 0.78); border-radius: 10px; padding: 10px 12px; font-weight: 500; }
.ga-drawer .mud-nav-link .mud-nav-link-icon { color: rgba(255, 255, 255, 0.55); }
.ga-drawer .mud-nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ga-drawer .mud-nav-link.active { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }
.ga-drawer .mud-nav-link.active .mud-nav-link-icon { color: #fff; }
.ga-drawer-foot { margin-top: auto; padding: 12px; color: rgba(255, 255, 255, 0.4); font-size: 0.7rem; }
.ga-drawer-switch {
    display: flex; align-items: center; gap: 8px; margin: 8px 4px; padding: 10px 12px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; text-decoration: none;
}
.ga-drawer-switch:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.ga-residence-select { min-width: 220px; max-width: 320px; }
.ga-residence-select .mud-input-outlined-border { border-color: var(--ga-line) !important; }

/* ── Contenu ─────────────────────────────────────────────────── */
.ga-main { min-height: 100vh; background: var(--ga-bg); }
.ga-content { max-width: 1280px; margin: 0 auto; padding: 24px 24px 40px; }
.ga-content-narrow { max-width: 760px; margin: 0 auto; padding: 20px 16px 96px; }
.ga-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ga-title { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); letter-spacing: -0.015em; margin: 0; line-height: 1.15; }
.ga-subtitle { color: var(--ga-muted); font-size: 0.92rem; margin-top: 4px; }

.ga-card { background: var(--ga-surface); border: 1px solid var(--ga-line); border-radius: 14px; padding: 18px; }
.ga-card-tight { padding: 8px; }
.ga-card h3 { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-size: 1.05rem; margin: 0 0 12px; }

.ga-grid { display: grid; gap: 14px; }
.ga-grid > *, .ga-card { min-width: 0; }
.ga-row > .ga-pill, .ga-row > .ga-avatar { flex: none; }
.ga-grid-kpi { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ga-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.ga-kpi { background: var(--ga-surface); border: 1px solid var(--ga-line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.ga-kpi-num { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ga-kpi-lbl { font-weight: 600; font-size: 0.86rem; }
.ga-kpi-note { color: var(--ga-muted); font-size: 0.78rem; }
.ga-kpi-ok .ga-kpi-num { color: var(--ga-ok); }
.ga-kpi-ko .ga-kpi-num { color: var(--ga-ko); }
.ga-kpi-blue .ga-kpi-num { color: var(--ga-blue); }

/* ── Pastilles ───────────────────────────────────────────────── */
.ga-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.ga-pill-ok { background: var(--ga-ok-soft); color: var(--ga-ok); }
.ga-pill-ko { background: var(--ga-ko-soft); color: var(--ga-ko); }
.ga-pill-warn { background: var(--ga-warn-soft); color: var(--ga-warn); }
.ga-pill-blue { background: var(--ga-blue-soft); color: var(--ga-blue); }
.ga-pill-muted { background: var(--ga-line); color: var(--ga-muted); }

.ga-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--ga-blue-soft); color: var(--ga-blue); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; flex: none; }
.ga-avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.ga-row { display: flex; align-items: center; gap: 12px; }
.ga-muted { color: var(--ga-muted); }
.ga-mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.82rem; }
.ga-tnum { font-variant-numeric: tabular-nums; }

.ga-table .mud-table-head .mud-table-cell { font-size: 0.74rem; font-weight: 700; color: var(--ga-muted); background: transparent; border-bottom: 1px solid var(--ga-line); }
.ga-table .mud-table-body .mud-table-row:hover { background: var(--ga-blue-soft) !important; }
.ga-table .mud-table-cell { border-bottom: 1px solid var(--ga-line); }
.ga-clickable { cursor: pointer; }

.ga-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--ga-muted); }
.ga-empty-title { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--ga-ink); }
.ga-empty .mud-icon-root { font-size: 2.4rem; color: var(--ga-blue); }

/* ── Carte virtuelle (même esprit que la carte physique) ───── */
.ga-vcard {
    position: relative; background: #fff; color: #0A3F44; border-radius: 18px; overflow: hidden;
    aspect-ratio: 85.6 / 54; width: 100%; max-width: 440px; margin: 0 auto;
    box-shadow: 0 18px 40px rgba(14, 26, 68, 0.22), 0 0 0 1px rgba(14, 26, 68, 0.06);
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 7% 7% 9%;
}
.ga-vcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: #0A3F44; }
.ga-vcard-name { display: flex; flex-direction: column; justify-content: center; min-width: 0; align-self: center; }
.ga-vcard-first { font-size: clamp(0.95rem, 3.4vw, 1.25rem); font-weight: 500; overflow-wrap: anywhere; }
.ga-vcard-last { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 800; font-size: clamp(1.25rem, 5vw, 1.9rem); letter-spacing: -0.01em; overflow-wrap: anywhere; line-height: 1.1; }
.ga-vcard-qr { width: clamp(120px, 38vw, 190px); aspect-ratio: 1; display: grid; place-items: center; }
.ga-vcard-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.ga-vcard-brand { position: absolute; left: 7%; bottom: 5%; font-size: 0.5rem; letter-spacing: 0.14em; color: #94a3b8; font-weight: 600; }
.ga-vcard-state {
    position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, 0.86);
    font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.04em;
    color: var(--ga-ko); text-align: center; padding: 16px;
}
.ga-vcard-state small { display: block; font-family: 'Figtree', sans-serif; font-weight: 500; font-size: 0.8rem; letter-spacing: 0; color: #5f6b7a; margin-top: 4px; }

/* ── Barre de navigation basse (résident) ────────────────────── */
.ga-bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
    background: var(--ga-surface); border-top: 1px solid var(--ga-line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}
.ga-bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 12px;
    color: var(--ga-muted); text-decoration: none; font-size: 0.72rem; font-weight: 600; min-height: 52px; justify-content: center;
}
.ga-bottomnav a.active { color: var(--ga-blue); background: var(--ga-blue-soft); }
.ga-bottomnav a:focus-visible { outline: 2px solid var(--ga-blue); outline-offset: 2px; }

/* ── Bandeaux ────────────────────────────────────────────────── */
.ga-banner { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 7px 16px; font-size: 0.86rem; }
.ga-banner-imp { background: #E8A317; color: #2a1d00; }
.ga-banner-demo { background: #5B3FA0; color: #fff; }
.ga-banner button, .ga-banner a { font: inherit; font-weight: 700; color: inherit; background: transparent; border: 2px solid currentColor; border-radius: 8px; padding: 2px 12px; cursor: pointer; text-decoration: none; }

/* ── Borne du gardien ────────────────────────────────────────── */
.ga-borne { max-width: 720px; margin: 0 auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.ga-borne-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ga-dir { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ga-dir button {
    font: inherit; font-weight: 800; font-size: 1.15rem; padding: 16px 10px; border-radius: 14px; border: 2px solid var(--ga-line);
    background: var(--ga-surface); color: var(--ga-muted); cursor: pointer; min-height: 64px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ga-dir button.on-in { background: var(--ga-ok); border-color: var(--ga-ok); color: #fff; }
.ga-dir button.on-out { background: var(--ga-blue); border-color: var(--ga-blue); color: #fff; }
.ga-dir button:focus-visible { outline: 3px solid #E8A317; outline-offset: 2px; }

.ga-scanner { position: relative; border-radius: 18px; overflow: hidden; background: #060A18; aspect-ratio: 4 / 3; }
.ga-scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ga-scanner-frame { position: absolute; inset: 14%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 22px; box-shadow: 0 0 0 999px rgba(6, 10, 24, 0.45); pointer-events: none; }
.ga-scanner-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-size: 0.85rem; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.ga-scanner-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 20px; gap: 12px; }

.ga-result {
    position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 24px; text-align: center; color: #fff; cursor: pointer;
}
.ga-result-ok { background: var(--ga-ok); }
.ga-result-ko { background: var(--ga-ko); }
.ga-result-icon { font-size: 5.5rem !important; width: 5.5rem !important; height: 5.5rem !important; }
.ga-result-head { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 7vw, 2.8rem); line-height: 1.1; }
.ga-result-name { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: clamp(1.5rem, 6vw, 2.2rem); }
.ga-result-meta { font-size: 1.05rem; opacity: 0.95; }
.ga-result-warn { background: rgba(0, 0, 0, 0.22); border-radius: 12px; padding: 10px 14px; max-width: 480px; font-size: 0.95rem; }
.ga-result-tap { margin-top: 18px; font-size: 0.85rem; opacity: 0.85; }
.ga-result-bar { position: absolute; left: 0; bottom: 0; height: 6px; background: rgba(255, 255, 255, 0.7); animation: ga-shrink 3.5s linear forwards; }
@keyframes ga-shrink { from { width: 100%; } to { width: 0; } }

.ga-wedge { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }

/* ── Connexion ───────────────────────────────────────────────── */
.ga-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 80% -10%, #0E6B6B 0%, transparent 60%), #0A3F44; }
.ga-login-card { width: 100%; max-width: 410px; background: #fff; color: #1c212b; border-radius: 20px; padding: 32px 28px 26px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
.ga-login-card .ga-mark { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px; }
.ga-login-foot { text-align: center; color: #5f6b7a; font-size: 0.72rem; margin-top: 18px; letter-spacing: 0.04em; }

/* ── Assistant d'intégration ─────────────────────────────────── */
.ga-steps { display: flex; gap: 8px; margin-bottom: 18px; }
.ga-step { flex: 1; height: 5px; border-radius: 99px; background: var(--ga-line); }
.ga-step.on { background: var(--ga-blue); }
.ga-cred { background: var(--ga-bg); border: 1px dashed var(--ga-line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.ga-cred-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ga-cred-val { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-weight: 700; font-size: 1.05rem; user-select: all; overflow-wrap: anywhere; }
.ga-note { display: flex; gap: 10px; background: var(--ga-warn-soft); color: var(--ga-ink); border-radius: 10px; padding: 10px 12px; font-size: 0.86rem; }

.ga-cards-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ga-cartebox { background: var(--ga-surface); border: 1px solid var(--ga-line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }

@media (max-width: 959px) {
    .ga-content { padding: 16px 14px 32px; }
}
@media (max-width: 599px) {
    .ga-residence-select { min-width: 0; max-width: 150px; }
    .ga-brand-sub { display: none; }
    .ga-result-icon { font-size: 4.5rem !important; width: 4.5rem !important; height: 4.5rem !important; }
}
@media (prefers-reduced-motion: reduce) {
    .ga-result-bar { animation-duration: 0.01ms; }
}

/* Onglets compacts : 3 onglets tiennent sur un telephone sans fleches de defilement */
.ga-tabs-fit .mud-tabs-toolbar-wrapper { justify-content: space-between; }
.ga-tabs-fit .mud-tab { min-width: 0; flex: 1; padding: 6px 8px; text-transform: none; font-weight: 600; }
.ga-tabs-fit .mud-tabs-scroll-button { display: none; }

/* Selecteur a trois boutons (borne) */
.ga-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--ga-surface); border: 1px solid var(--ga-line); border-radius: 12px; }
.ga-seg button { font: inherit; font-weight: 600; font-size: 0.9rem; padding: 10px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ga-muted); cursor: pointer; min-height: 44px; }
.ga-seg button.on { background: var(--ga-blue-soft); color: var(--ga-blue); }
.ga-seg button:focus-visible { outline: 2px solid var(--ga-blue); outline-offset: 1px; }

/* Boites de dialogue et de confirmation dans GesAcces : couleurs de l'application (teal de Saytuko) */
body:has(.ga-root) .mud-dialog .mud-dialog-title > .mud-typography-h6 { color: #0A3F44; }
body:has(.ga-root.ga-dark) .mud-dialog .mud-dialog-title > .mud-typography-h6 { color: #f1f5f9; }
body:has(.ga-root) .mud-dialog:not(:has(.dialog-header)) .mud-dialog-actions .mud-button-root:last-child {
    background: #0E6B6B; box-shadow: 0 2px 8px rgba(14, 107, 107, 0.28); color: #fff;
}
body:has(.ga-root) .mud-dialog:not(:has(.dialog-header)) .mud-dialog-actions .mud-button-root:last-child:hover { background: #0A3F44; }
body:has(.ga-root.ga-dark) .mud-dialog:not(:has(.dialog-header)) .mud-dialog-actions .mud-button-root:last-child { background: #4FC3BE; color: #0f1117; }
body:has(.ga-root) .mud-overlay-dialog .mud-overlay-scrim { background: rgba(14, 26, 68, 0.55) !important; }

/* ═══════════════════════════════════════════════════════════════
   Connexion Saytuko Access : volet de presentation + formulaire
   ═══════════════════════════════════════════════════════════════ */
.ga-login2 { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: #F1F4F2; }

.ga-login2-hero {
    position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    background:
        radial-gradient(900px 520px at 85% -8%, rgba(79, 195, 190, 0.40), transparent 62%),
        radial-gradient(700px 480px at -10% 105%, rgba(14, 107, 107, 0.5), transparent 60%),
        linear-gradient(160deg, #0A3F44 0%, #062A2E 100%);
}
.ga-login2-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.07;
    background-image: linear-gradient(rgba(255,255,255,.9) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 20%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 30% 20%, #000, transparent 70%);
}
.ga-login2-hero > * { position: relative; z-index: 1; }
.ga-login2-brand { display: flex; align-items: center; gap: 12px; }
.ga-mark-lg { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); }
.ga-login2-brandname { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }
.ga-login2-pitch h2 { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 22px; max-width: 520px; }
.ga-login2-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 480px; }
.ga-login2-pitch li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, 0.86); font-size: 1rem; }
.ga-login2-pitch li .mud-icon-root { flex: none; width: 38px; height: 38px; padding: 8px; border-radius: 11px; background: rgba(255, 255, 255, 0.1); }

.ga-login2-card {
    position: relative; width: min(340px, 100%); aspect-ratio: 85.6 / 54; background: #fff; color: #0A3F44; border-radius: 16px; overflow: hidden;
    padding: 6% 7% 8%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; transform: rotate(-3deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.ga-login2-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: #0A3F44; }
.ga-login2-card-name { display: flex; flex-direction: column; min-width: 0; }
.ga-login2-card-name span { font-size: 0.95rem; font-weight: 500; }
.ga-login2-card-name strong { font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-size: 1.7rem; font-weight: 800; line-height: 1.05; }
.ga-login2-card-qr { width: 104px; height: 104px; color: #0A3F44; }
.ga-login2-card-qr svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.ga-login2-card-brand { position: absolute; left: 7%; bottom: 5%; font-size: 0.45rem; letter-spacing: 0.14em; color: #94a3b8; font-weight: 600; }

.ga-login2-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; gap: 22px; }
.ga-login2-box { width: 100%; max-width: 420px; background: #fff; border: 1px solid rgba(28, 33, 43, 0.07); border-radius: 20px; padding: 34px 32px 28px; box-shadow: 0 24px 60px rgba(6, 42, 46, 0.12); }
.ga-login2-help { margin: 18px 0 0; font-size: 0.82rem; color: #5f6b7a; line-height: 1.5; }
.ga-login2-foot { color: #94a3b8; font-size: 0.72rem; letter-spacing: 0.14em; }
.ga-login2-mobilebrand { display: none; align-items: center; gap: 10px; font-family: 'Bricolage Grotesque', 'Figtree', sans-serif; font-weight: 700; font-size: 1.2rem; color: #fff; }

@media (max-width: 899px) {
    .ga-login2 { grid-template-columns: 1fr; background: radial-gradient(900px 500px at 80% -10%, #0E6B6B 0%, transparent 60%), #0A3F44; }
    .ga-login2-hero { display: none; }
    .ga-login2-mobilebrand { display: flex; }
    .ga-login2-box { padding: 28px 22px 22px; border-radius: 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
    .ga-login2-foot { color: rgba(255, 255, 255, 0.45); }
}

/* ── Menu lateral : identite et deconnexion ── */
.ga-drawer-user { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0 4px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.ga-drawer-user .ga-avatar { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ga-drawer-user-name { color: #fff; font-weight: 600; font-size: 0.9rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-drawer-user-role { color: rgba(255, 255, 255, 0.55); font-size: 0.75rem; }
.ga-drawer-logout {
    display: flex; align-items: center; gap: 10px; width: calc(100% - 8px); margin: 2px 4px 6px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
    font: inherit; font-size: 0.9rem; font-weight: 600; color: #FFB4BA; background: transparent; border: 1px solid rgba(255, 180, 186, 0.28);
}
.ga-drawer-logout:hover { background: rgba(217, 45, 58, 0.18); color: #fff; }
.ga-drawer-logout:focus-visible { outline: 2px solid #E8A317; outline-offset: 2px; }


/* ═══ Mobile : zone sure (encoche / barre d'etat), menu lateral, barre du haut ═══ */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
@media (max-width: 959px) {
    :root { --mud-appbar-height: calc(60px + var(--sat)) !important; }
    .ga-appbar { padding-top: var(--sat); height: calc(60px + var(--sat)) !important; }
    .ga-appbar .mud-toolbar { min-height: 60px; height: 60px; padding-inline: 8px 10px; gap: 2px; }
    .ga-appbar .mud-icon-button { width: 44px; height: 44px; }
    .ga-brand { min-width: 0; gap: 8px; }
    .ga-brand-name { white-space: nowrap; font-size: 1.05rem; }
    .ga-brand-sub { display: none; }
    .ga-drawer { width: min(84vw, 320px) !important; max-width: 320px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); height: calc(100dvh - var(--mud-appbar-height)) !important; padding-bottom: var(--sab); }
    .ga-drawer .mud-nav-link { min-height: 48px; }
    .ga-drawer-inner { overflow-y: auto; overscroll-behavior: contain; }
    .ga-residence-select { min-width: 0; max-width: 132px; }
    .mud-overlay-drawer { backdrop-filter: blur(2px); }
}
@media (max-width: 420px) {
    .ga-brand-name { font-size: 0.98rem; }
    .ga-brand .ga-mark { width: 30px; height: 30px; }
}
@media (max-width: 599px) {
    .ga-brand { flex: 0 1 auto; min-width: 0; }
    .ga-residence-select { flex: 0 1 140px; width: 140px; max-width: 140px; margin-left: auto; }
    .ga-appbar .mud-spacer { display: none; }
}
@media (max-width: 480px) {
    .ga-brand-name { display: none; }
}

/* Deconnexion : en bas du menu, avec une marge avant la signature */
.ga-drawer-logout { margin-top: auto; margin-bottom: 14px; }
.ga-drawer-foot { margin-top: 0; padding-top: 0; }

/* Menu : element actif lisible sur fond teal, avec liseré ambre */
.ga-drawer .mud-nav-link.active:not(.mud-nav-link-disabled),
.ga-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-text { color: #fff !important; background: rgba(255, 255, 255, 0.14) !important; }
.ga-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) { box-shadow: inset 3px 0 0 #E9A21B; }
.ga-drawer .mud-nav-link.active .mud-nav-link-icon { color: #E9A21B !important; }
