/* =====================================================================
 * Pages d'identification — concept A, « Tableau des départs »
 *
 * À gauche, l'identité : la marque de l'agence, un tableau des départs, une
 * accroche. À droite, le travail : un formulaire nu et rapide, qu'on franchit
 * chaque matin. La page est vue avant l'identification : rien d'autre qu'un
 * décor et un formulaire.
 * ===================================================================== */

body.sa-auth {
    margin: 0;
    min-height: 100vh;
    background: #fff;
    color: #0A1830;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

.sa-auth {
    --auth-navy: #0A1830;
    --auth-blue: #1E6BB8;
    --auth-blue-dk: #15579E;
    --auth-signal: #F2B32A;
    --auth-muted: #5B6B80;
    --auth-line: #D5DDE8;
    --auth-display: 'Sora', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --auth-mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

.sa-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

/* ------------------------------------------------------- Le panneau marine */

.sa-auth-side {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 40px 48px;
    background: var(--auth-navy);
    color: #C9D6E8;
    overflow: hidden;
}

/* Des cercles d'approche, très discrets : l'horizon d'un radar. */
.sa-auth-side::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(159, 182, 210, .13);
    box-shadow: 0 0 0 48px rgba(159, 182, 210, .035), 0 0 0 96px rgba(159, 182, 210, .025);
    pointer-events: none;
}

.sa-auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sa-auth-mark {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--auth-blue);
    color: #fff;
    font: 700 15px var(--auth-display);
}

/* Avec un logo, la pastille devient un cartouche blanc : une enseigne
   posee sur du bleu sombre ne se lit pas, et la plupart sont dessinees
   pour du blanc. Sans logo, les initiales gardent le fond bleu. */
.sa-auth-mark-logo {
    width: 48px;
    height: 48px;
    background: #fff;
    padding: 3px;
    overflow: hidden;
}

.sa-auth-mark-logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sa-auth-brand b {
    display: block;
    color: #fff;
    font: 700 15px var(--auth-display);
    letter-spacing: .04em;
}

.sa-auth-brand small {
    color: #9FB6D2;
    font-size: 12px;
}

/* Le tableau des départs. */
.sa-auth-board {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 16px 18px 10px;
    border-radius: 14px;
    background: #06101F;
    border: 1px solid rgba(159, 182, 210, .14);
    font-family: var(--auth-mono);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.sa-auth-board-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: var(--auth-signal);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
}

.sa-auth-board-title span:last-child {
    color: #9FB6D2;
    letter-spacing: .08em;
}

.sa-auth-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 84px 128px;
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-top: 1px solid rgba(159, 182, 210, .1);
}

.sa-auth-row.h {
    padding-top: 0;
    border-top: 0;
    color: #5F7896;
    font-size: 10.5px;
    letter-spacing: .14em;
}

/* Chaque caractère sur sa palette, fendue en deux comme un vrai tableau. */
.sa-flap {
    position: relative;
    padding: 3px 0 3px 2px;
    border-radius: 3px;
    color: #EAF1FA;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    white-space: nowrap;
    overflow: hidden;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1.05ch, transparent 1.05ch 1.2ch);
}

.sa-flap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(0, 0, 0, .45);
}

.sa-auth-st {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .08em;
    white-space: nowrap;
}

.sa-auth-st.on   { color: #7FD4A8; }
.sa-auth-st.go   { color: var(--auth-signal); }
.sa-auth-st.gate { color: #9FB6D2; }

.sa-auth-tagline {
    position: relative;
    z-index: 1;
    margin: auto 0 0;
    max-width: 21ch;
    color: #fff;
    font: 600 clamp(22px, 2.3vw, 31px)/1.25 var(--auth-display);
    letter-spacing: -.012em;
}

.sa-auth-tagline em {
    font-style: normal;
    color: var(--auth-signal);
}

.sa-auth-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6F87A6;
    font-size: 12px;
}

/* La signature du produit : symbole, nom en Sora, éditeur en petites capitales. */
.sa-signature {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.sa-signature img {
    width: 26px;
    height: 26px;
}

.sa-signature b {
    display: block;
    color: #fff;
    font: 700 13.5px/1.05 var(--auth-display);
    letter-spacing: -.005em;
}

.sa-signature b span {
    color: #4A9BD8;
    font-weight: 600;
}

.sa-signature small {
    display: block;
    margin-top: 2px;
    color: #6F87A6;
    font: 600 8.5px var(--auth-mono);
    letter-spacing: .12em;
}

/* ------------------------------------------------------ Le formulaire */

.sa-auth-main {
    display: grid;
    place-items: center;
    padding: 40px 32px;
    background: #fff;
}

.sa-auth-card {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 380px;
}

.sa-auth-eyebrow {
    color: var(--auth-blue);
    font: 600 11.5px var(--auth-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.sa-auth-card h1 {
    margin: 0;
    color: var(--auth-navy);
    font: 700 30px/1.15 var(--auth-display);
    letter-spacing: -.02em;
}

.sa-auth-sub {
    margin: -8px 0 0;
    color: var(--auth-muted);
    font-size: 14.5px;
    line-height: 1.5;
}

.sa-auth-form {
    display: grid;
    gap: 18px;
}

.sa-auth-field {
    display: grid;
    gap: 7px;
}

.sa-auth-field label {
    margin: 0;
    color: #243449;
    font-size: 13px;
    font-weight: 600;
}

.sa-auth-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.sa-auth-label-row a,
.sa-auth-back {
    color: var(--auth-blue);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.sa-auth-label-row a:hover,
.sa-auth-back:hover { color: var(--auth-blue-dk); text-decoration: underline; }

.sa-auth-input {
    position: relative;
}

.sa-auth-input .ico {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    color: #8492A6;
    pointer-events: none;
}

.sa-auth-input input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 46px 0 43px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #fff;
    color: var(--auth-navy);
    font: 400 15px 'Inter', 'Segoe UI', system-ui, sans-serif;
    box-shadow: none;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.sa-auth-input input:focus {
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 3px rgba(30, 107, 184, .16);
}

.sa-auth-input input:focus ~ .ico,
.sa-auth-input:focus-within .ico { color: var(--auth-blue); }

.sa-auth-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    transform: translateY(-50%);
    cursor: pointer;
}

.sa-auth-eye svg { width: 18px; height: 18px; }
.sa-auth-eye:hover { background: #F1F4F8; color: var(--auth-navy); }
.sa-auth-eye[aria-pressed="true"] { color: var(--auth-blue); }

.sa-auth-remember {
    margin: -4px 0 0;
    font-size: 13.5px;
    color: #475569;
}

.sa-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 99px;
    background: var(--auth-blue);
    color: #fff;
    font: 600 15px 'Inter', 'Segoe UI', system-ui, sans-serif;
    box-shadow: 0 8px 20px rgba(30, 107, 184, .28);
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.sa-auth-submit svg { width: 17px; height: 17px; transition: transform .15s ease; }
.sa-auth-submit:hover { background: var(--auth-blue-dk); box-shadow: 0 10px 24px rgba(21, 87, 158, .32); }
.sa-auth-submit:hover svg { transform: translateX(3px); }

.sa-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    font-weight: 600;
}

.sa-auth-back svg { width: 16px; height: 16px; }

.sa-auth-secure {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
}

.sa-auth-secure svg { flex: none; width: 16px; height: 16px; color: #1F9D63; }

.sa-auth .alert {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    text-align: left;
}

.sa-auth #alerts { padding: 0; }
.sa-auth .row { margin: 0; }

.sa-auth a:focus-visible,
.sa-auth button:focus-visible,
.sa-auth input:focus-visible {
    outline: 3px solid var(--auth-signal);
    outline-offset: 2px;
}

/* ------------------------------------------------------ Écrans étroits */

@media (max-width: 991px) {
    .sa-auth-shell { grid-template-columns: minmax(0, 1fr); }

    .sa-auth-side {
        gap: 14px;
        padding: 22px 24px 24px;
    }

    .sa-auth-side::after,
    .sa-auth-board,
    .sa-auth-foot { display: none; }

    .sa-auth-tagline {
        margin: 0;
        font-size: 20px;
    }

    .sa-auth-main {
        align-items: start;
        padding: 30px 20px 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sa-auth * { transition: none !important; }
}
