/* =============================================================
   WhiteL — Espace partenaires
   Habillage de l'authentification.

   Direction : noir et blanc, un seul accent — le rose or. Registre
   couture, industriel et financier, sans ornement inutile. Tout est
   dans l'espace, la hairline et la typographie sérif.

   Servie comme fichier statique (même origine), conforme à la CSP
   du module. Aucune dépendance hors Google Fonts.
   ============================================================= */

:root {
    --ink:        #0B0B0C;   /* noir profond, jamais pur */
    --ink-soft:   #17171A;
    --paper:      #FBFAF8;   /* blanc chaud */
    --paper-2:    #F2EEE8;
    --line:       #E4DDD4;   /* hairline */
    --muted:      #6E6862;   /* gris typographique */
    --rose:       #B76E79;   /* rose or — accent unique */
    --rose-deep:  #9C5462;
    --rose-tint:  rgba(183, 110, 121, 0.10);

    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* -------------------------------------------------------------
   Éléments partagés
   ------------------------------------------------------------- */

.wordmark {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: inherit;
}
.wordmark span { color: var(--rose); }
.wordmark--sm { font-size: 1.15rem; }

.eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--rose);
    margin: 0;
}

/* -------------------------------------------------------------
   Scène d'authentification — deux panneaux
   ------------------------------------------------------------- */

.auth-stage {
    display: grid;
    grid-template-columns: 46% 54%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Panneau gauche : éditorial, encre */
.auth-brand {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    display: flex;
    align-items: center;
    overflow: hidden;
}
/* Voile de matière : un dégradé rose or presque imperceptible */
.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 12% 100%, var(--rose-tint), transparent 60%);
    pointer-events: none;
}
.auth-brand__inner {
    position: relative;
    z-index: 1;
    padding: clamp(2.5rem, 6vw, 6rem);
    max-width: 34rem;
}
.auth-brand .eyebrow { margin-top: 2.4rem; }

.brand-headline {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.6rem, 4.6vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin: 1.1rem 0 0;
}
.brand-lead {
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(251, 250, 248, 0.72);
    margin: 1.8rem 0 0;
    max-width: 32ch;
}
.brand-fineprint {
    position: absolute;
    bottom: clamp(2.5rem, 6vw, 6rem);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: rgba(251, 250, 248, 0.45);
    margin: 0;
}

/* Panneau droit : le formulaire, papier */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--paper);
}
.auth-panel__inner {
    width: 100%;
    max-width: 25rem;
}

.panel-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.6rem;
}
.panel-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 1.8rem;
}
.panel-intro {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--muted);
    margin: -0.6rem 0 1.8rem;
}

/* -------------------------------------------------------------
   Formulaire — champs à filet, pas de boîtes
   ------------------------------------------------------------- */

.form { margin: 0; }

.field {
    position: relative;
    margin-bottom: 1.6rem;
}
.field__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.field__input {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    padding: 0.55rem 0;
    font-family: var(--sans);
    font-size: 1.02rem;
    color: var(--ink);
    transition: border-color 0.25s var(--ease);
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus {
    outline: none;
    border-bottom-color: var(--rose);
}
/* Anneau de focus visible au clavier, sobre */
.field__input:focus-visible {
    outline: none;
    box-shadow: 0 1px 0 0 var(--rose);
}

/* -------------------------------------------------------------
   Bouton principal — bloc encre, bascule rose or
   ------------------------------------------------------------- */

.btn {
    display: inline-block;
    width: 100%;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.95rem 1.5rem;
    margin-top: 0.6rem;
    cursor: pointer;
    transition: background-color 0.25s var(--ease),
                border-color 0.25s var(--ease),
                color 0.25s var(--ease);
}
.btn:hover {
    background: var(--rose-deep);
    border-color: var(--rose-deep);
}
.btn:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 3px;
}
.btn--ghost {
    width: auto;
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
    padding: 0.6rem 1.1rem;
}
.btn--ghost:hover {
    background: transparent;
    color: var(--rose-deep);
    border-color: var(--rose);
}

/* -------------------------------------------------------------
   Liens et messages
   ------------------------------------------------------------- */

.form-aside {
    margin: 1.4rem 0 0;
    font-size: 0.9rem;
}
.link {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1px;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link:hover {
    color: var(--rose-deep);
    border-bottom-color: var(--rose);
}

.alert {
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 0.85rem 1rem;
    margin: 0 0 1.4rem;
    border-left: 2px solid transparent;
}
.alert--error {
    color: var(--rose-deep);
    background: var(--rose-tint);
    border-left-color: var(--rose);
}
.alert--notice {
    color: var(--ink);
    background: var(--paper-2);
    border-left-color: var(--ink);
}

/* -------------------------------------------------------------
   Tableau de bord minimal
   ------------------------------------------------------------- */

.dash { background: var(--paper); }

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.4rem clamp(1.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--line);
}
.dash-logout { margin: 0; }

.dash-main {
    max-width: 44rem;
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}
.dash-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.2rem, 4vw, 3rem);
    line-height: 1.08;
    margin: 0.8rem 0 0;
}
.dash-lead {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--muted);
    margin: 1.2rem 0 0;
    max-width: 46ch;
}
.dash-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1.5rem 2.5rem;
    margin: 3rem 0 0;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}
.dash-facts div { margin: 0; }
.dash-facts dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}
.dash-facts dd {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ink);
}

/* -------------------------------------------------------------
   Adaptatif
   ------------------------------------------------------------- */

@media (max-width: 860px) {
    .auth-stage { grid-template-columns: 1fr; }
    .auth-brand { min-height: 38vh; }
    .auth-brand__inner { padding: 2.5rem 1.75rem 3.5rem; }
    .brand-lead { display: none; }          /* on épure sur petit écran */
    .brand-fineprint { display: none; }
    .auth-panel { padding: 2.5rem 1.75rem 3.5rem; }
    .auth-panel__inner { max-width: 26rem; margin: 0 auto; }
}

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