/*
 * Page de connexion alignée sur la landing (spec docs/superpowers/specs/2026-10-20-connexion-alignee-design.md).
 * Écran partagé sur fond bleu nuit : la marque à gauche, le formulaire (carte blanche) à droite ; formulaire seul sous 900 px.
 */
:root {
    --navy: #0f1a2b; --navy-2: #132a46; --navy-3: #163a5f;
    --blue: #2196f3; --blue-btn: #1976d2; --blue-dark: #1565c0; --blue-light: #64b5f6; --blue-tint: #f3f8fd;
    --ink: #151515; --body: #3d4650; --muted: #6b7480; --hairline: #e3e8ef; --green: #18b07a; --danger: #e23b4a;
    --shadow-lg: 0 16px 40px rgba(15, 26, 43, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: hidden; }
body { font-family: Quicksand, system-ui, sans-serif; color: var(--body); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%); background-color: var(--navy); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-btn); }
:focus-visible { outline: 3px solid var(--blue-btn); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Largeur limitée et centrée : sur grand écran, la marque et le formulaire restent proches */
.cx { min-height: 100vh; max-width: 1520px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Panneau gauche : la marque, centrée, sur le bleu nuit de la landing (fond, halo et cercles communs à toute la page, sans coupure) */
.cx-panneau { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 48px 72px; color: #d6e2ef; }
.cx-panneau :focus-visible { outline-color: #bbdefb; }
/* Halo derrière le logo, non rogné : il suit la marque quelle que soit la largeur de l'écran */
.cx-decor::before { content: ""; position: absolute; left: 50%; top: 46%; width: 1100px; height: 640px; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(33, 150, 243, .28), transparent); pointer-events: none; }
.cx-decor span { position: absolute; left: 50%; top: 46%; border-radius: 50%; border: 1.5px solid rgba(100, 181, 246, .22); transform: translate(-50%, -50%); }
.cx-decor .r1 { width: 380px; height: 380px; }
.cx-decor .r2 { width: 560px; height: 560px; border-color: rgba(100, 181, 246, .14); }
.cx-decor .r3 { width: 760px; height: 760px; border-color: rgba(100, 181, 246, .08); }
.cx-marque { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 18px; color: #fff; font-weight: 700; font-size: 28px; letter-spacing: .04em; text-decoration: none; }
.cx-marque img { height: 180px; width: auto; display: block; }
.cx-marque b { color: var(--blue); }
.cx-accroche { position: relative; margin: 18px 0 0; max-width: 420px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-light); line-height: 1.6; text-wrap: balance; }
.cx-accroche span { display: block; }
.cx-accroche span + span { margin-top: 2px; color: #9fb3c8; }
.cx-retour { position: absolute; left: 48px; bottom: 32px; color: var(--blue-light); font-weight: 700; text-decoration: none; font-size: 15px; }
.cx-retour:hover { text-decoration: underline; }

/* Zone du formulaire, sur le même bleu nuit */
.cx-zone { display: flex; flex-direction: column; padding: 32px 24px; }
.cx-haut { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.cx-marque-mobile { display: none; margin-right: auto; }
.cx-marque-mobile img { height: 56px; }
.cx-centre { margin: auto; width: 100%; max-width: 440px; padding: 24px 0; }
.cx-carte { position: relative; background: #fff; border: 1px solid var(--hairline); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.cx-carte-langue { position: absolute; top: 20px; right: 20px; }
.cx-carte h1 { padding-right: 96px; color: var(--ink); font-size: 28px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.cx-carte .sous-titre { color: var(--muted); margin: 0 0 24px; }
.cx-champ { margin-bottom: 16px; }
.cx-champ label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.cx-champ input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); border: 1.5px solid #d5dde7; border-radius: 12px; padding: 12px 14px; background: #fff; }
.cx-champ input:focus { outline: 3px solid #bbdefb; border-color: var(--blue-btn); }
.cx-champ.invalide input { border-color: var(--danger); }
.cx-mdp { position: relative; }
.cx-mdp input { padding-right: 48px; }
.cx-oeil { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cx-oeil:hover { background: var(--blue-tint); color: var(--blue-btn); }
.cx-oeil svg { width: 20px; height: 20px; }
.cx-erreur { color: var(--danger); font-size: 14px; font-weight: 600; margin-top: 6px; }
.cx-alerte { border-radius: 12px; padding: 12px 14px; margin-bottom: 18px; font-size: 14.5px; font-weight: 600; }
.cx-alerte.erreur { background: #fdecee; color: #b0202e; }
.cx-alerte.info { background: #e3f6ee; color: #0e6b4b; }
.cx-options { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; font-size: 14.5px; }
.cx-options label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.cx-options input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue-btn); }
.cx-options a { font-weight: 700; text-decoration: none; }
.cx-options a:hover { text-decoration: underline; }
.cx-bouton { width: 100%; height: 52px; border: 0; border-radius: 9999px; background: var(--blue-btn); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(25, 118, 210, .35); transition: background .15s ease, transform .15s ease; }
.cx-bouton:hover { background: var(--blue-dark); transform: translateY(-1px); }
.cx-bouton:disabled { opacity: .75; cursor: progress; transform: none; }
.cx-pied { text-align: center; color: var(--blue-light); font-size: 13px; font-weight: 600; }

/* Sélecteur de langue : drapeaux, bien visible */
.langue { position: relative; }
.langue summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink); border: 1.5px solid #cfd8e3; border-radius: 999px; padding: 5px 14px 5px 6px; background: #fff; box-shadow: 0 6px 18px rgba(15, 26, 43, .18), 0 1px 3px rgba(15, 26, 43, .10); }
.langue summary:hover, .langue[open] summary { border-color: #9fb3c8; background: #f7f9fc; box-shadow: 0 8px 22px rgba(15, 26, 43, .22), 0 1px 3px rgba(15, 26, 43, .12); }
.langue summary::-webkit-details-marker { display: none; }
.langue summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.langue summary img, .langue li img { border-radius: 50%; display: block; }
.langue ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 190px; z-index: 10; }
.langue li a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.langue li a:hover, .langue li a[aria-current] { background: #e3f2fd; color: var(--blue-dark); }

/* Petit écran : fond bleu nuit du panneau, logo centré compact, puis la carte */
@media (max-width: 900px) {
    .cx { grid-template-columns: minmax(0, 1fr); }
    .cx-panneau { display: none; }
    .cx-zone { padding: 16px 16px 28px; background: radial-gradient(600px 320px at 50% 12%, rgba(33, 150, 243, .28), transparent 65%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-3) 100%); }
    /* En-tête compact : logo centré au-dessus de la carte, le formulaire et le bouton restent dans le premier écran */
    .cx-haut { position: relative; justify-content: center; align-items: center; padding: 6vh 0 8px; }
    .cx-marque-mobile { display: inline-flex; margin: 0; }
    .cx-marque-mobile img { width: min(30vw, 132px); height: auto; }
    .cx-carte h1 { padding-right: 64px; font-size: 24px; }
    .cx-carte-langue { top: 16px; right: 16px; }
    .cx-haut :focus-visible { outline-color: #bbdefb; }
    .cx-centre { margin: 0 auto; padding-top: 24px; } /* carte collée sous le logo, sans vide centré */
    .cx-carte { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
