/* Pages de connexion — style « produit IA » : aurore animée, cartes flottantes, formulaire épuré. */
body.auth2 { min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--bg); overflow-x: hidden; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); min-height: 100vh; min-height: 100dvh; }

/* ---------- Panneau de gauche ---------- */
.auth-hero { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 32px; padding: 36px 48px; overflow: hidden; color: #f5f5f7; background: #0b0b12; isolation: isolate; }
.aurora { position: absolute; inset: -20%; z-index: -2; filter: blur(70px) saturate(140%); opacity: .9; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: float 18s ease-in-out infinite alternate; }
.aurora .a1 { width: 55%; height: 55%; left: 5%; top: 8%; background: var(--accent); }
.aurora .a2 { width: 45%; height: 50%; right: 4%; top: 18%; background: #5e5ce6; animation-duration: 22s; animation-delay: -6s; }
.aurora .a3 { width: 50%; height: 45%; left: 25%; bottom: 2%; background: #30b0c7; opacity: .7; animation-duration: 26s; animation-delay: -12s; }
.aurora .a4 { width: 30%; height: 30%; right: 22%; bottom: 18%; background: #ff375f; opacity: .45; animation-duration: 20s; animation-delay: -3s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6%, -5%) scale(1.12); } 100% { transform: translate(-5%, 6%) scale(.95); } }
.dots { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 40% 45%, #000 20%, transparent 75%); }
.auth-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,11,18,.35), rgba(11,11,18,0) 30%, rgba(11,11,18,.55)); }

.hero-brand { display: flex; align-items: center; gap: 10px; }
.hero-brand strong { display: block; font-size: 14px; }
.hero-brand small { display: block; color: rgba(255,255,255,.6); font-size: 11.5px; }
.hb-mark, .fci-logo, .ab-mark { display: grid; place-items: center; overflow: hidden; flex: none; background: #fff; color: #fff; font-weight: 700; font-family: var(--font-rounded); }
.hb-mark { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.35); }
.hb-mark img, .fci-logo img, .ab-mark img { width: 100%; height: 100%; object-fit: contain; }
.hb-mark span, .fci-logo span, .ab-mark span { display: grid; place-items: center; width: 100%; height: 100%; background: var(--accent); }

.hero-copy { max-width: 560px; }
.ai-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ai-badge svg { width: 15px; height: 15px; color: #ffd60a; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.25) rotate(15deg); opacity: .7; } }
.hero-copy h2 { margin: 18px 0 14px; font: 700 clamp(30px, 3.6vw, 48px)/1.08 var(--font-display); letter-spacing: -.035em; }
.grad { background: linear-gradient(100deg, #fff 0%, color-mix(in srgb, var(--accent) 70%, #fff) 35%, #a5b4ff 65%, #7ee8fa 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.typer { min-height: 24px; margin: 0; color: rgba(255,255,255,.72); font: 500 16px var(--font); }
.typer-prefix { color: var(--accent); filter: brightness(1.4); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Cartes flottantes */
.float-cards { position: relative; height: 270px; max-width: 560px; }
.fc { position: absolute; padding: 14px 16px; border-radius: 16px; color: #f5f5f7; background: rgba(28, 28, 36, .55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 20px 50px rgba(0,0,0,.45); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); animation: rise-in .9s var(--spring) both, hover 7s ease-in-out infinite alternate; }
.fc small { display: block; color: rgba(255,255,255,.6); font-size: 11.5px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes hover { to { translate: 0 -8px; } }
.fc-invoice { left: 0; top: 10px; width: 320px; animation-delay: .2s, 0s; }
.fci-head { display: flex; align-items: center; gap: 10px; }
.fci-head strong { display: block; font-size: 13px; }
.fci-logo { width: 32px; height: 32px; border-radius: 9px; }
.fci-badge { margin-left: auto; padding: 3px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; color: #64d2ff; background: rgba(100,210,255,.14); }
.fci-lines { display: grid; gap: 8px; margin: 16px 0 14px; }
.fci-lines i { display: block; width: var(--w); height: 7px; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.28), rgba(255,255,255,.1)); background-size: 200% 100%; animation: shimmer 2.2s linear infinite; }
.fci-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; color: rgba(255,255,255,.65); }
.fci-total strong { color: #fff; font: 700 20px var(--font-rounded); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.fci-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 9px 4px 7px; border-radius: 99px; font-size: 11px; font-weight: 600; color: #ffd60a; background: rgba(255,214,10,.12); }
.fci-chip svg { width: 13px; height: 13px; }
.fc-kpi { right: 0; top: 0; width: 200px; animation-delay: .45s, -2s; }
.fc-kpi strong { display: block; margin: 2px 0; font: 700 24px var(--font-rounded); letter-spacing: -.02em; }
.fc-kpi strong i { font-style: normal; font-size: 12px; color: rgba(255,255,255,.6); }
.fc-kpi .up { color: #30d158; font-size: 12px; font-weight: 600; }
.auth-hero .fc-kpi svg { display: block; width: 100%; height: 44px; margin-top: 8px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; overflow: visible; filter: brightness(1.35) drop-shadow(0 4px 10px color-mix(in srgb, var(--accent) 60%, transparent)); }
.fc-kpi svg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s var(--spring) 1s forwards; }
.fc-toast { right: 30px; bottom: 6px; display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 11px; animation-delay: 1.4s, -4s; }
.fc-toast strong { display: block; font-size: 13px; }
.fc-toast .ok { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #30d158; color: #fff; }
.fc-toast .ok svg { width: 16px; height: 16px; stroke-width: 2.4; }
.hero-foot a { color: rgba(255,255,255,.55); font-size: 12px; transition: color .2s; }
.hero-foot a strong { color: rgba(255,255,255,.85); }
.hero-foot a:hover { color: #fff; }
.heart { display: inline-block; color: #ff375f; animation: beat 1.6s ease-in-out infinite; }
.auth-hero svg, .auth-panel svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Panneau de droite ---------- */
.auth-panel { position: relative; display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: min(380px, 100%); animation: rise-in .8s var(--spring) .1s both; }
.ab-mark { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 22px; box-shadow: 0 0 0 1px var(--separator), 0 10px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
.auth-box h1 { margin: 0; font: 700 30px/1.15 var(--font-display); letter-spacing: -.03em; color: var(--label); }
.ab-intro { margin: 6px 0 24px; color: var(--label-2); font-size: 14.5px; }
.ab-error { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 11px 13px; border-radius: 12px; color: var(--red); font-weight: 500; background: color-mix(in srgb, var(--red) 10%, transparent); animation: shake .45s var(--spring); }
.ab-error svg { flex: none; font-size: 16px; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.ab-demo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 11px 12px 11px 14px; border-radius: 12px; background: var(--accent-soft); }
.ab-demo div { flex: 1; min-width: 0; }
.ab-demo span { display: block; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.ab-demo code { display: block; overflow: hidden; text-overflow: ellipsis; font: 12px ui-monospace, "SF Mono", Menlo, monospace; color: var(--label); }
.ab-fill { flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; font-weight: 600; color: #fff; background: var(--accent); cursor: pointer; transition: transform .15s var(--spring), filter .2s; }
.ab-fill:hover { filter: brightness(1.08); }
.ab-fill:active { transform: scale(.95); }

.auth2 .auth-form { display: grid; gap: 12px; }
.af { position: relative; }
.af input { width: 100%; height: 54px; padding: 22px 44px 6px 14px; border: 0; border-radius: 12px; outline: none; font-size: 15px; color: var(--label); background: var(--surface); box-shadow: inset 0 0 0 1px var(--separator); transition: box-shadow .2s, background .2s; }
.af input:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--label) 22%, transparent); }
.af input:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.af label { position: absolute; left: 15px; top: 17px; color: var(--label-2); font-size: 15px; pointer-events: none; transform-origin: left top; transition: transform .2s var(--spring), color .2s; }
.af input:focus + label, .af input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.76); color: var(--accent); }
.af input:not(:focus):not(:placeholder-shown) + label { color: var(--label-2); }
.af-eye { position: absolute; right: 8px; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin-top: -17px; border: 0; border-radius: 9px; background: none; color: var(--label-3); cursor: pointer; font-size: 17px; transition: color .2s, background .2s; }
.af-eye:hover { background: var(--fill-2); color: var(--label); }
.af-eye.on { color: var(--accent); }

.auth-submit { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; margin-top: 6px; border: 0; border-radius: 12px; font: 600 15px var(--font); color: #fff; cursor: pointer; overflow: hidden; background: var(--accent); box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .15s var(--spring), box-shadow .25s, filter .2s; }
.auth-submit::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-100%); transition: transform .8s ease; }
.auth-submit:hover { filter: brightness(1.06); box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 50%, transparent), inset 0 1px 0 rgba(255,255,255,.22); }
.auth-submit:hover::before { transform: translateX(100%); }
.auth-submit:active { transform: scale(.98); }
.auth-submit svg { font-size: 17px; transition: transform .25s var(--spring); }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit.loading { pointer-events: none; }
.auth-submit.loading svg { display: none; }
.auth-submit.loading .as-label::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.ab-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: var(--label-3); font-size: 12px; }
.ab-foot { margin: 28px 0 0; text-align: center; color: var(--label-3); font-size: 11.5px; }
.ab-foot a { color: var(--label-2); }
.ab-foot a:hover { color: var(--accent); }

/* ---------- Adaptatif ---------- */
@media (max-width: 1100px) { .float-cards { transform: scale(.88); transform-origin: left top; } }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { min-height: 0; padding: 22px 20px 26px; gap: 16px; }
  .hero-copy h2 { margin: 12px 0 8px; font-size: 26px; }
  .float-cards, .hero-foot { display: none; }
  .auth-panel { place-items: start center; padding: 28px 16px 40px; }
  .ab-mark { display: none; }
}
@media (prefers-reduced-motion: reduce) { .aurora span, .fc, .grad, .caret, .fci-lines i, .heart { animation: none !important; } }

/* Anti-robot */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.captcha { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; text-align: left; cursor: pointer; color: var(--label); background: var(--surface); box-shadow: inset 0 0 0 1px var(--separator); transition: box-shadow .25s, background .25s; }
.captcha:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--label) 22%, transparent); }
.captcha .cb { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--label-3); transition: background .25s, box-shadow .25s, transform .3s var(--bounce); }
.captcha .cb svg { width: 16px; height: 16px; color: #fff; stroke-width: 2.6; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--bounce); }
.captcha .cb-spin { position: absolute; inset: 3px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); opacity: 0; }
.captcha.working .cb { box-shadow: none; }
.captcha.working .cb-spin { opacity: 1; animation: spin .7s linear infinite; }
.captcha.done { cursor: default; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.captcha.done .cb { background: var(--green); box-shadow: none; transform: scale(1.05); }
.captcha.done .cb svg { opacity: 1; transform: scale(1); }
.captcha.fail { box-shadow: inset 0 0 0 1px var(--red); }
.captcha .cb-text { flex: 1; min-width: 0; }
.captcha strong { display: block; font-size: 14px; font-weight: 600; }
.captcha small { display: block; color: var(--label-2); font-size: 11.5px; }
.captcha.done small { color: var(--green); }
.captcha .cb-shield { color: var(--label-3); font-size: 22px; }
.captcha.done .cb-shield { color: var(--green); }

.hb-mark.round, .fci-logo.round { border-radius: 50%; }
.hb-mark.round img, .fci-logo.round img { object-fit: cover; transform: scale(1.1); }

.hero-foot { position: absolute; left: 48px; bottom: 32px; }
.fci-logo span { background: linear-gradient(135deg, var(--accent), #5e5ce6) !important; }
.fci-logo svg { width: 17px; height: 17px; stroke: #fff; }
@media (max-width: 900px) { .auth-hero { justify-content: flex-start; } }
