/* ==========================================================================
   Interface de contact & exercice des droits RGPD
   Surcouche de Bootstrap 5.3
   ========================================================================== */

:root {
    --brand-900: #101b3d;
    --brand-700: #1d3a8f;
    --brand-500: #2f5bd7;
    --brand-100: #e8eeff;
    --ink-900: #12161d;
    --ink-600: #4d5665;
    --ink-400: #79828f;
    --surface: #ffffff;
    --surface-alt: #f5f7fb;
    --line: #dfe4ec;
    --radius: 14px;
}

[data-bs-theme="dark"] {
    --brand-100: #1a2340;
    --ink-900: #eef1f6;
    --ink-600: #a7b0be;
    --ink-400: #7d8797;
    --surface: #171b23;
    --surface-alt: #11141a;
    --line: #2b313c;
}

body {
    background: var(--surface-alt);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
}

.skip-link {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 10;
    padding: .5rem .9rem;
    background: var(--surface);
    border-radius: 8px;
}

/* --- En-tête ------------------------------------------------------------ */

.page-header {
    padding: 3.5rem 0 5.5rem;
    background:
        radial-gradient(120% 140% at 8% 0%, rgba(47, 91, 215, .55) 0%, transparent 55%),
        linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
    color: #fff;
}

.page-header__eyebrow {
    margin-bottom: .5rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.page-header__title {
    margin-bottom: .75rem;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-header__lead {
    max-width: 46rem;
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .84);
}

.page-main {
    margin-top: -3.5rem;
    padding-bottom: 4rem;
}

/* --- Carte du formulaire ------------------------------------------------ */

.request-card {
    padding: clamp(1.25rem, 4vw, 2.25rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -24px rgba(16, 27, 61, .45);
}

.form-step {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--line);
}

.form-step--last {
    padding-bottom: 0;
    margin-bottom: 1.5rem;
    border-bottom: 0;
}

.form-step__legend {
    display: flex;
    align-items: center;
    gap: .65rem;
    float: none;
    width: auto;
    margin-bottom: 1.15rem;
    font-size: 1.08rem;
    font-weight: 650;
}

.form-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--brand-500);
    background: var(--brand-100);
    border-radius: 50%;
}

.form-label {
    font-weight: 550;
}

.required {
    color: #c62b3d;
    font-weight: 700;
}

[data-bs-theme="dark"] .required {
    color: #ff8a95;
}

.form-text {
    color: var(--ink-400);
}

/* --- Sélecteur du type de demande --------------------------------------- */

.mode-switch {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.mode-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.mode-option__body {
    display: block;
    height: 100%;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 12px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.mode-option:hover .mode-option__body {
    border-color: var(--brand-500);
}

.mode-option input:focus-visible+.mode-option__body {
    outline: 3px solid rgba(47, 91, 215, .35);
    outline-offset: 2px;
}

.mode-option input:checked+.mode-option__body {
    background: var(--brand-100);
    border-color: var(--brand-500);
    box-shadow: 0 6px 18px -12px rgba(47, 91, 215, .9);
}

.mode-option__title {
    display: block;
    margin-bottom: .2rem;
    font-weight: 650;
}

.mode-option__desc {
    display: block;
    font-size: .875rem;
    line-height: 1.45;
    color: var(--ink-600);
}

/* --- Blocs conditionnels ------------------------------------------------ */

.conditional[hidden],
.conditional-inline[hidden] {
    display: none !important;
}

/* --- Encarts d'information ---------------------------------------------- */

.notice {
    padding: .9rem 1.1rem;
    font-size: .9rem;
    line-height: 1.55;
    border-radius: 10px;
    border-left: 4px solid var(--brand-500);
    background: var(--brand-100);
    color: var(--ink-600);
}

.notice__title {
    margin-bottom: .25rem;
    font-weight: 650;
    color: var(--ink-900);
}

.form-check--attestation {
    padding: .9rem 1.1rem .9rem 2.6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-alt);
}

.form-check--attestation .form-check-input {
    margin-left: -1.7rem;
}

/* --- Mentions d'information --------------------------------------------- */

.privacy-notice {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-alt);
}

.privacy-notice>summary {
    padding: .85rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    list-style-position: inside;
}

.privacy-notice>summary:focus-visible {
    outline: 3px solid rgba(47, 91, 215, .35);
    outline-offset: -3px;
}

.privacy-notice__list {
    margin: 0;
    padding: 0 1.1rem 1.1rem;
    font-size: .9rem;
    line-height: 1.55;
}

.privacy-notice__list dt {
    margin-top: .85rem;
    font-weight: 650;
    color: var(--ink-900);
}

.privacy-notice__list dd {
    margin: .2rem 0 0;
    color: var(--ink-600);
}

/* --- Actions ------------------------------------------------------------ */

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.form-actions__note {
    max-width: 26rem;
    margin: 0;
    font-size: .85rem;
    color: var(--ink-400);
}

.form-actions .btn {
    min-width: 13rem;
    font-weight: 600;
}

.btn[aria-busy="true"] {
    pointer-events: none;
    opacity: .7;
}

/* --- Confirmation ------------------------------------------------------- */

.receipt {
    border-left: 4px solid var(--bs-success);
    border-radius: var(--radius);
}

.receipt__title {
    font-size: 1.15rem;
    font-weight: 650;
}

.receipt__reference code {
    padding: .15rem .45rem;
    font-size: .95rem;
    background: rgba(0, 0, 0, .06);
    border-radius: 6px;
}

.page-footnote {
    margin: 1.5rem 0 0;
    font-size: .82rem;
    text-align: center;
    color: var(--ink-400);
}

/* --- Pot de miel anti-robot --------------------------------------------- */

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
