/* GAB Avis — interface futuriste (formulaires publics + connexion admin) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --gab-navy: #0a1628;
    --gab-navy-mid: #0d2142;
    --gab-navy-light: #1a3d6e;
    --gab-gold: #d4a012;
    --gab-gold-glow: rgba(212, 160, 18, 0.45);
    --gab-cyan: #22d3ee;
    --gab-cyan-glow: rgba(34, 211, 238, 0.35);
    --gab-glass: rgba(255, 255, 255, 0.07);
    --gab-glass-border: rgba(255, 255, 255, 0.12);
    --gab-text: #f1f5f9;
    --gab-text-muted: #94a3b8;
    --gab-radius: 20px;
    --gab-radius-sm: 14px;
    --accent: var(--gab-gold);
    --accent-glow: var(--gab-gold-glow);
}

body.theme-sinistre {
    --accent: var(--gab-cyan);
    --accent-glow: var(--gab-cyan-glow);
}

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

html { scroll-behavior: smooth; }

body.gab-future {
    margin: 0;
    min-height: 100dvh;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--gab-text);
    background: var(--gab-navy);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Animated mesh background */
.gab-future-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.gab-future-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(212, 160, 18, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(26, 61, 110, 0.9), transparent 45%),
        radial-gradient(ellipse 50% 60% at 50% 100%, rgba(34, 211, 238, 0.08), transparent 50%),
        linear-gradient(165deg, #060d18 0%, var(--gab-navy-mid) 40%, #0a1628 100%);
}
.gab-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: gab-float 12s ease-in-out infinite;
}
.gab-orb--1 { width: 320px; height: 320px; background: var(--accent-glow); top: -80px; left: -60px; }
.gab-orb--2 { width: 240px; height: 240px; background: rgba(26, 61, 110, 0.6); bottom: 10%; right: -40px; animation-delay: -4s; }
.gab-orb--3 { width: 180px; height: 180px; background: rgba(34, 211, 238, 0.12); top: 40%; left: 30%; animation-delay: -8s; }

@keyframes gab-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.05); }
}

.gab-future-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

/* Header */
.gab-future-header {
    text-align: center;
    padding: 1.25rem 0 1rem;
}
.gab-future-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 3px solid rgba(212, 160, 18, 0.95);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 32px var(--accent-glow);
    padding: 4px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.gab-future-logo .gab-brand-logo-img {
    border-radius: 999px;
    display: block;
}
.gab-future-brand {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}
.gab-future-tagline {
    font-size: 0.85rem;
    color: var(--gab-text-muted);
    margin-top: 0.25rem;
}

/* Glass cards */
.gab-glass {
    background: var(--gab-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gab-glass-border);
    border-radius: var(--gab-radius);
    padding: 1.35rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.gab-glass--hero {
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 12%, transparent);
}
.gab-glass h1 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}
.gab-glass .lead {
    margin: 0;
    font-size: 0.92rem;
    color: var(--gab-text-muted);
    line-height: 1.55;
}
.gab-survey-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.gab-survey-title-row h1 {
    margin-bottom: 0.35rem;
}
.gab-survey-logo {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    flex: 0 0 auto;
}
.gab-survey-logo .gab-brand-logo-img {
    border-radius: 16px;
}
.gab-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}
.gab-pill {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--gab-glass-border);
    color: var(--gab-text-muted);
}

/* Progress */
.gab-progress-wrap { margin-bottom: 1.25rem; }
.gab-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gab-text-muted);
    margin-bottom: 0.5rem;
}
.gab-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.gab-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, white));
    box-shadow: 0 0 12px var(--accent-glow);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps */
.gab-step { display: none; animation: gab-step-in 0.35s ease; }
.gab-step.is-active { display: block; }
@keyframes gab-step-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.gab-section-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.gab-field { margin-bottom: 1.35rem; }
.gab-field-label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.65rem;
    line-height: 1.4;
}
.gab-required { color: #f87171; }

/* Scale 1-5 */
.gab-scale-future {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.45rem;
}
.gab-scale-future input { position: absolute; opacity: 0; pointer-events: none; }
.gab-scale-future label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    border-radius: var(--gab-radius-sm);
    border: 2px solid var(--gab-glass-border);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    user-select: none;
}
.gab-scale-future label small {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--gab-text-muted);
    margin-top: 0.15rem;
}
.gab-scale-future input:checked + label {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    box-shadow: 0 0 20px var(--accent-glow);
    color: var(--accent);
    transform: scale(1.04);
}
.gab-scale-legend {
    font-size: 0.72rem;
    color: var(--gab-text-muted);
    margin-top: 0.45rem;
    text-align: center;
}

/* Choice cards */
.gab-choice-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.gab-choice-grid input { position: absolute; opacity: 0; }
.gab-choice-grid label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--gab-radius-sm);
    border: 2px solid var(--gab-glass-border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.gab-choice-grid label::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gab-glass-border);
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.gab-choice-grid input:checked + label {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 20%, transparent);
}
.gab-choice-grid input:checked + label::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 3px var(--gab-navy-mid);
}

/* Textarea / input */
.gab-input-future,
.gab-textarea-future {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--gab-radius-sm);
    border: 1px solid var(--gab-glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--gab-text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gab-input-future:focus,
.gab-textarea-future:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.gab-textarea-future { resize: vertical; min-height: 100px; }
.gab-input-future::placeholder,
.gab-textarea-future::placeholder { color: #64748b; }

/* APDP */
.gab-apdp-future {
    padding: 1rem;
    border-radius: var(--gab-radius-sm);
    border-left: 3px solid var(--accent);
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.78rem;
    color: var(--gab-text-muted);
    line-height: 1.5;
}
.gab-apdp-future strong { color: var(--gab-text); display: block; margin-bottom: 0.35rem; }
.gab-check-future {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-top: 0.85rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gab-text);
}
.gab-check-future input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    accent-color: var(--accent);
}

/* Buttons */
.gab-nav-buttons {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.25rem;
}
.gab-btn-future {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.9rem 1.25rem;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.gab-btn-future:active { transform: scale(0.98); }
.gab-btn-future--primary {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, white));
    color: var(--gab-navy);
    box-shadow: 0 4px 24px var(--accent-glow);
}
.gab-btn-future--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--gab-text);
    border: 1px solid var(--gab-glass-border);
}
.gab-btn-future--submit {
    width: 100%;
    margin-top: 0.5rem;
}

.gab-error {
    color: #fca5a5;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Footer */
.gab-future-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.45;
    border-top: 1px solid var(--gab-glass-border);
}

/* Auth / login */
.gab-auth-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}
.gab-auth-card {
    width: 100%;
    max-width: 400px;
}
.gab-auth-footer {
    border: 0;
    margin-top: 1rem;
    padding: 0.9rem 0.35rem 0;
    color: rgba(148, 163, 184, 0.82);
}
.gab-auth-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    width: min(440px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: start;
    overflow: hidden;
    padding: 1rem 1.15rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    color: #25324a;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.gab-auth-toast--hide {
    opacity: 0;
    transform: translateY(-0.5rem);
}
.gab-auth-toast-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
    font-weight: 900;
}
.gab-auth-toast-content {
    display: grid;
    gap: 0.18rem;
}
.gab-auth-toast-content strong {
    color: #111827;
    font-size: 1rem;
}
.gab-auth-toast-content span {
    color: #475569;
    line-height: 1.45;
}
.gab-auth-toast-close {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 1.9rem;
    line-height: 1;
    margin-top: -0.25rem;
}
.gab-auth-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 100%;
    background: #10b981;
    animation: gab-toast-progress 5s linear forwards;
    transform-origin: left;
}
@keyframes gab-toast-progress {
    to { transform: scaleX(0); }
}
.gab-auth-card .gab-glass {
    padding: 2rem 1.75rem;
}
.gab-auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin: 0 0 0.35rem;
}
.gab-auth-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.gab-auth-title-row .gab-auth-title,
.gab-auth-title-row .gab-auth-sub {
    text-align: left;
}
.gab-auth-inline-logo {
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    flex: 0 0 auto;
}
.gab-auth-inline-logo .gab-brand-logo-img {
    border-radius: 14px;
}
.gab-auth-sub {
    text-align: center;
    color: var(--gab-text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.75rem;
}
.gab-form-group { margin-bottom: 1.15rem; }
.gab-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gab-text-muted);
    margin-bottom: 0.4rem;
}
.gab-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--gab-text-muted);
    font-size: 0.75rem;
}
.gab-divider::before, .gab-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gab-glass-border);
}
.gab-sso-buttons {
    display: grid;
    gap: 0.65rem;
}
.gab-password-reset-request {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--gab-glass-border);
    border-radius: var(--gab-radius-sm);
    background: rgba(255, 255, 255, 0.045);
}
.gab-password-reset-request summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    list-style: none;
}
.gab-password-reset-request summary::-webkit-details-marker {
    display: none;
}
.gab-password-reset-request summary::after {
    content: '+';
    float: right;
    color: var(--gab-text-muted);
}
.gab-password-reset-request[open] summary::after {
    content: '−';
}
.gab-password-reset-request__form {
    margin-top: 0.85rem;
}
.gab-password-reset-request__form p {
    margin: 0 0 0.85rem;
    color: var(--gab-text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}
.gab-btn-sso {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--gab-glass-border);
    color: var(--gab-text);
    font-size: 0.9rem;
}
.gab-btn-sso:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--gab-text);
}
.gab-sso-icon {
    display: inline-flex;
    flex-shrink: 0;
}
.gab-alert-error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    padding: 0.75rem 1rem;
    border-radius: var(--gab-radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Thanks / closed */
.gab-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, white));
    display: grid;
    place-items: center;
    font-size: 2rem;
    box-shadow: 0 0 40px var(--accent-glow);
    animation: gab-pulse 2s ease infinite;
}
@keyframes gab-pulse {
    0%, 100% { box-shadow: 0 0 40px var(--accent-glow); }
    50% { box-shadow: 0 0 56px var(--accent-glow); }
}
.gab-text-center { text-align: center; }

.gab-phone-wrap {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.gab-phone-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 0.85rem;
    border: 1px solid var(--gab-glass-border);
    border-right: none;
    border-radius: var(--gab-radius-sm) 0 0 var(--gab-radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--gab-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}
.gab-phone-input {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    flex: 1;
}
.gab-field-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--gab-text-muted);
}

.gab-mfa-qr {
    display: grid;
    place-items: center;
    width: 212px;
    height: 212px;
    margin: 0 auto 1rem;
    padding: 1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
}

.gab-mfa-qr svg {
    width: 180px;
    height: 180px;
}

.gab-mfa-logout-form {
    margin-top: 1rem;
}

.w-100 { width: 100%; }

@media (max-width: 479px) {
    .gab-auth-page {
        align-items: flex-start;
        padding: 1rem 0.85rem 1.5rem;
    }

    .gab-auth-card .gab-glass {
        padding: 1.5rem 1.15rem;
    }

    .gab-auth-title {
        font-size: 1.35rem;
    }

    .gab-input-future,
    .gab-btn-future,
    .gab-btn-sso {
        min-height: 48px;
        font-size: 1rem;
    }

    .gab-btn-sso {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .gab-sso-buttons {
        flex-direction: column;
    }

    .gab-survey-title-row {
        align-items: flex-start;
    }

    .gab-survey-logo {
        width: 64px;
        height: 64px;
    }
}

@media (min-width: 480px) {
    .gab-future-wrap { padding: 1.5rem 1.25rem 2.5rem; }
    .gab-scale-future label { min-height: 3.75rem; }
}
