/* =============================================================================
   Écrans de connexion de l'Espace Pro (Views/Shared/_AuthLayout.cshtml) — refonte du 2026-12-01.
   Maquette : BShopProManager/Dev/maquette-connexion-espace-pro.html. Feuille autonome : ni AdminLTE ni Bootstrap.
   ============================================================================= */
:root {
    --navy: #004A82; --navy-2: #003562; --ocean: #006699;
    --ink: #16233a; --ink-2: #4a5a72; --ink-3: #6b7a90;
    --line: #dbe3ec; --line-2: #c6d2de; --bg: #f3f6f9; --surface: #ffffff;
    --focus: #1f7fc2; --ok: #1d8a5a; --ok-bg: #e7f5ee; --warn: #a6630a; --warn-bg: #fdf3e2;
    --err: #b42318; --err-bg: #fdecea; --info-bg: #e8f2fa;
    --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
html, body { margin: 0; min-height: 100% }
body.auth { font-family: var(--font); color: var(--ink); background: var(--surface); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased }
button, input { font: inherit; color: inherit }
.auth a { color: var(--ocean); text-decoration: none }
.auth a:hover { text-decoration: underline }

.shell { min-height: 100vh; display: grid; grid-template-columns: clamp(380px, 42%, 760px) 1fr }

/* ---- Panneau de marque « Logos » : Poolstar en grand, les marques du groupe défilent dessous (2026-12-01) ----
   Maquette : BShopProManager/Dev/maquette-connexion-panneau-gauche.html. Aucune description : tous les pros n'ont pas
   les mêmes accès. Logo Poolstar blanc + bleu ciel #a0dbfb sur le bleu #004a82 (règle de marque). */
.brand { position: relative; overflow: hidden; isolation: isolate; color: #fff; display: flex; flex-direction: column; justify-content: center;
    gap: clamp(56px, 10vh, 110px); background: radial-gradient(60% 42% at 50% 42%, rgba(160, 219, 251, .13), transparent 70%), #004a82 }
/* ondulation très discrète en fond, rappel de l'eau */
.brand .swell { position: absolute; left: -10%; right: -10%; bottom: -6%; height: 38%; opacity: .5; pointer-events: none }
.brand .swell path { fill: none; stroke: rgba(160, 219, 251, .12); stroke-width: 1.2; vector-effect: non-scaling-stroke }
.brand .swell .s1 { animation: swell 14s ease-in-out infinite alternate }
.brand .swell .s2 { animation: swell 18s ease-in-out infinite alternate-reverse }
@keyframes swell { to { transform: translateX(-6%) } }

.brand .center, .brand .marquee, .brand .lg-grid { position: relative; z-index: 1 }
.brand .center { display: grid; place-items: center; padding: 0 40px }
.brand .ps { display: flex; flex-direction: column; align-items: center; gap: 22px; user-select: none; -webkit-user-select: none;
    animation: rise-in 1s cubic-bezier(.22, 1, .36, 1) both }
.brand .ps .logo { display: block; width: clamp(280px, 74%, 480px); height: auto }
.brand .ps .logo .lg-a { fill: #fff }
.brand .ps .logo .lg-b { fill: #a0dbfb }
.brand .ps .logo path { transition: fill .9s ease }
.brand .tag { display: flex; align-items: center; gap: 16px; font-size: clamp(13px, 1.2vw, 16px); font-weight: 600; letter-spacing: .32em;
    padding-left: .32em; color: #d6eefc; transition: color .9s ease }
.brand .tag::before, .brand .tag::after { content: ""; width: 36px; height: 1px; background: rgba(160, 219, 251, .55) }

/* Bande des marques : logos blanchis, à poids visuel égal (hauteur par logo), séparés par un point bleu ciel ;
   le défilement ne s'arrête pas au survol */
.brand .marquee { flex: none; height: 72px; overflow: hidden; display: flex; align-items: flex-end; animation: fade-in 1s .5s ease-out both;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent) }
.brand .lg-track { display: flex; align-items: center; flex: none; width: max-content; height: 72px; animation: slide-l 60s linear infinite }
.brand .lg-track .lg-item { position: relative; display: flex; align-items: center; height: 100%; padding: 0 30px }
.brand .lg-track .lg-item::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
    background: #a0dbfb; opacity: .6 }
.brand .lg-item img { height: var(--h, 28px); width: auto; max-width: 150px; filter: brightness(0) invert(1); opacity: .72;
    transition: opacity .3s, transform .3s cubic-bezier(.22, 1, .36, 1) }
.brand .lg-track .lg-item:hover img { opacity: 1; transform: scale(1.08) }
.brand .lg-grid { display: none }
@keyframes slide-l { to { transform: translateX(-50%) } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

/* Easter egg « Nuit d'été » (triple clic sur le logo, Scripts/bsp.auth.js) */
.brand .egg-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .9s ease;
    background: radial-gradient(80% 60% at 50% 30%, #0b2c55, #03162c 75%) }
.brand.egg-night .egg-sky { opacity: 1 }
/* la nuit, le fond n'est plus le bleu #004a82 : logo Poolstar en blanc seul (règle de marque) */
.brand.egg-night .ps .logo .lg-b { fill: #fff }
.brand.egg-night .tag { color: #fff }
.brand .egg-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden }
.egg-star { position: absolute; overflow: visible; will-change: transform }
.egg-star path { fill: #a0dbfb }
.egg-dot { position: absolute; border-radius: 50%; background: #fff }
.egg-dot.tw { animation: egg-tw var(--tw, 2.4s) ease-in-out infinite alternate }
@keyframes egg-tw { to { opacity: .25 } }
.egg-shoot { position: absolute; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff) }
.brand .logo.egg-glow { animation: egg-glow 1.2s ease-out }
@keyframes egg-glow { 40% { filter: drop-shadow(0 0 10px rgba(160, 219, 251, .9)) } }

@media (prefers-reduced-motion: reduce) {
    .brand *, .brand { animation: none !important; transition: none !important }
    .brand .marquee { display: none }
    .brand .lg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; align-items: center; justify-items: center; padding: 0 40px }
    .brand .lg-grid img { max-width: 100% }
}

/* ---- Colonne du formulaire ---- */
.side { display: flex; flex-direction: column; min-width: 0 }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px }
.mobile-head { display: none; align-items: center; gap: 10px }
.mobile-head:hover { text-decoration: none !important }
.mobile-head .logo { display: block; width: 120px; height: auto }
.logo .lg-a { fill: #004A82 }
.logo .lg-b { fill: #E40521 }
.mobile-head .pro { font-size: 10px; letter-spacing: .12em; color: #fff; background: var(--navy); padding: 2px 7px; border-radius: 20px }
.lang { position: relative; margin-left: auto }
.lang > button { display: flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13.5px; color: var(--ink-2) }
.lang > button:hover { border-color: var(--line-2); color: var(--ink) }
.lang svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8 }
.lang svg.chev { width: 12px; height: 12px }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(16, 35, 58, .12); min-width: 170px; display: none; z-index: 5 }
.lang.open ul { display: block }
.lang li a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 14px }
.lang li a:hover { background: var(--bg); text-decoration: none }
.lang li a small { color: var(--ink-3); font-weight: 600 }
.lang li a[aria-current] { background: var(--info-bg); font-weight: 600 }

.main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px 28px 32px }
.panel { width: 100%; max-width: 400px; animation: auth-in .25s ease }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean); margin: 0 0 8px }
.auth h1 { font-size: 26px; font-weight: 650; margin: 0 0 6px; letter-spacing: -.01em; line-height: 1.2 }
.sub { color: var(--ink-2); margin: 0 0 26px }
.sub strong { color: var(--ink) }

/* ---- Champs ---- */
.field { margin-bottom: 16px }
.field label, .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; font-weight: 600; margin-bottom: 6px }
.field label a { font-weight: 500; font-size: 13px }
.ctl { position: relative }
.ctl input { width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 44px 0 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s }
.ctl input:hover { border-color: #a9b8c8 }
.ctl input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 127, 194, .18) }
.ctl input.input-validation-error, .ctl.bad input { border-color: var(--err); box-shadow: 0 0 0 3px rgba(180, 35, 24, .1) }
.ctl .eye { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink-3); display: grid; place-items: center }
.ctl .eye:hover { color: var(--ink); background: var(--bg) }
.ctl .eye[aria-pressed="true"] { color: var(--navy) }
.ctl .eye svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8 }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px }
.field-validation-error, .fielderr { display: block; font-size: 12.5px; color: var(--err); margin-top: 6px }
.field-validation-valid { display: none }
.caps { display: none; font-size: 12.5px; color: var(--warn); margin-top: 6px }
.caps.on { display: block }

/* ---- Messages ---- */
.alert { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 18px }
.alert > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
.alert.err { background: var(--err-bg); color: var(--err) }
.alert.warn { background: var(--warn-bg); color: var(--warn) }
.alert.ok { background: var(--ok-bg); color: var(--ok) }
.alert.info { background: var(--info-bg); color: var(--navy) }
.alert p, .alert ul { margin: 0; color: var(--ink) }
.alert ul { padding: 0; list-style: none }
.alert strong { display: block; color: inherit; margin-bottom: 2px }

/* ---- Options ---- */
.opts { display: grid; gap: 12px; margin: 4px 0 22px }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); flex: none }
.check small { display: block; color: var(--ink-3); font-size: 12.5px }
.switch { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer }
.switch:hover { border-color: var(--line-2) }
.switch strong { display: block; font-size: 14px; font-weight: 600 }
.switch span.desc { display: block; font-size: 12.5px; color: var(--ink-3) }
.switch input { position: absolute; opacity: 0; pointer-events: none }
.track { width: 40px; height: 23px; border-radius: 20px; background: #c5d0dc; position: relative; transition: background .15s }
.track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s }
.switch input:checked + .track { background: var(--navy) }
.switch input:checked + .track::after { transform: translateX(17px) }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(31, 127, 194, .3) }

/* ---- Boutons ---- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s }
.auth a.btn:hover, .btn:hover { text-decoration: none }
.btn-primary { background: var(--navy); color: #fff }
.btn-primary:hover { background: var(--navy-2) }
.btn-primary:focus-visible, .btn-ghost:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(31, 127, 194, .35) }
.btn-primary[disabled] { background: #9fb3c8; cursor: not-allowed }
.auth a.btn-ghost, .btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink) }
.btn-ghost:hover { background: var(--bg) }
.btn-plain { background: none; color: var(--ink-2); font-weight: 500; margin-top: 6px }
.auth a.btn-plain { color: var(--ink-2) }
.btn-plain:hover { color: var(--ink) }
.btn svg.sp { width: 18px; height: 18px; animation: auth-spin .8s linear infinite; display: none }
.btn.loading svg.sp { display: block }
@keyframes auth-spin { to { transform: rotate(360deg) } }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12.5px; margin: 18px 0 }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line) }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ocean); cursor: pointer; font-weight: 500 }
.linkbtn:hover { text-decoration: underline }
.linkbtn[disabled] { color: var(--ink-3); cursor: default; text-decoration: none }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 22px }
.back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2 }

.join { margin-top: 28px; padding: 16px 18px; border-radius: 10px; background: var(--bg); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center }
.join strong { display: block; font-size: 14px }
.join span { font-size: 13px; color: var(--ink-2) }
.auth .join a { white-space: nowrap; font-weight: 600; font-size: 14px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink) }
.auth .join a:hover { text-decoration: none; border-color: var(--navy); color: var(--navy) }
.notpro { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 16px }

/* ---- Code à 6 chiffres ---- */
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 8px }
.otp input { min-width: 0; width: 100%; height: 56px; text-align: center; font-size: 24px; font-weight: 600; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-variant-numeric: tabular-nums }
.otp input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(31, 127, 194, .18) }
.otp input.filled { border-color: #8aa6c1; background: #f8fbfd }
.otp.bad input { border-color: var(--err) }
.resend { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-2); margin: 10px 0 20px }
.mailbadge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--bg); border-radius: 20px; font-size: 14px; font-weight: 600; margin-bottom: 22px; word-break: break-all }
.mailbadge svg { width: 16px; height: 16px; stroke: var(--ocean); fill: none; stroke-width: 1.9; flex: none }

/* ---- Robustesse du mot de passe ---- */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 10px 0 6px }
.meter i { height: 4px; border-radius: 2px; background: var(--line) }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--err) }
.meter[data-s="2"] i:nth-child(-n+2) { background: #d98a1c }
.meter[data-s="3"] i:nth-child(-n+3) { background: #6aa84f }
.meter[data-s="4"] i { background: var(--ok) }
.rules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--ink-3) }
.rules li { display: flex; gap: 6px; align-items: center }
.rules li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #b7c3d0; flex: none }
.rules li.ok { color: var(--ok) }
.rules li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat }

.done { text-align: center }
.done .badge { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); display: grid; place-items: center; margin: 0 auto 18px }
.done .badge svg { width: 30px; height: 30px; stroke: var(--ok); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round }
.done .sub { margin-bottom: 22px }
.done .hint { margin-top: 18px }

.foot { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 16px 28px 22px; font-size: 12.5px; color: var(--ink-3) }
.auth .foot a { color: var(--ink-3) }
.secure { display: inline-flex; align-items: center; gap: 6px }
.secure svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2 }

@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr }
    .brand { display: none }
    .mobile-head { display: flex }
}
@media (max-width: 420px) {
    .topbar, .main { padding-left: 16px; padding-right: 16px }
    .otp { gap: 6px }
    .otp input { height: 50px; font-size: 21px }
    .rules { grid-template-columns: 1fr }
    .join { grid-template-columns: 1fr }
}
