:root {
  --primary: #312783; --primary-bright: #4B3FC4; --red: #E7332A; --ink: #12102A; --muted: #62607A; --line: #E3E2EC; --bg: #F4F4F8;
  --ok: #00853f; --ok-bright: #00a650; --bad: #C62820; --warn: #E07B00;
  --font-head: "Montserrat", system-ui, sans-serif; --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; font: 400 16px/1.5 var(--font-body); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; }
.ci-top { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; padding-top: max(.8rem, env(safe-area-inset-top)); background: var(--ink); color: #fff; }
.ci-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font: 800 1.05rem var(--font-head); }
.ci-lang { display: inline-flex; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 3px; }
.ci-lang button { border: 0; background: transparent; color: #fff; font: 700 .8rem var(--font-head); padding: .35rem .7rem; border-radius: 999px; cursor: pointer; }
.ci-lang button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.ci-bar { height: 5px; background: linear-gradient(90deg, var(--primary-bright) 0 75%, var(--red) 75% 100%); }
.ci-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); place-items: start center; padding: 1.4rem 1rem 2rem; }
.ci-card { width: min(440px, 100%); background: #fff; border-radius: 22px; padding: 1.6rem 1.3rem 1.4rem; box-shadow: 0 18px 40px -22px rgba(18,16,42,.35); text-align: center; }
.ci-kicker { margin: 0; font: 800 .8rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.ci-gym { margin: .2rem 0 0; font: 900 1.75rem/1.1 var(--font-head); color: var(--primary); }
.ci-lead { margin: .6rem 0 1.2rem; color: var(--muted); }
.ci-label { display: block; text-align: left; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.ci-phone { display: flex; align-items: stretch; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.ci-phone:focus-within { border-color: var(--primary-bright); box-shadow: 0 0 0 4px rgba(75,63,196,.15); }
.ci-prefix { display: grid; place-items: center; padding: 0 .8rem; background: #F4F3FB; color: var(--muted); font: 700 1.1rem var(--font-body); border-right: 2px solid var(--line); }
.ci-phone input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .85rem .9rem; font: 700 1.45rem/1.2 var(--font-body); letter-spacing: .03em; color: var(--ink); background: transparent; }
.ci-phone.invalid { border-color: var(--bad); }
.ci-remember { display: flex; align-items: center; gap: .55rem; margin: .8rem 0 0; font-size: .9rem; color: var(--muted); text-align: left; cursor: pointer; }
.ci-remember input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.ci-error { min-height: 1.3em; margin: .6rem 0 .2rem; color: var(--bad); font-weight: 600; font-size: .92rem; }
.ci-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 1.05rem 1.2rem; border: 0; border-radius: 999px; font: 800 1.15rem var(--font-head); cursor: pointer; text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--primary-bright), var(--primary)); box-shadow: 0 12px 26px -12px rgba(49,39,131,.8); }
.ci-btn:disabled { opacity: .6; cursor: wait; }
.ci-btn-light { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: none; margin-top: 1rem; }
.ci-hint { margin: 1rem 0 0; font-size: .85rem; color: var(--muted); }
.ci-privacy { margin: .85rem 0 0; font-size: .82rem; }
.ci-privacy a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.ci-invalid .ci-icon { width: 64px; height: 64px; margin: 0 auto .6rem; border-radius: 50%; display: grid; place-items: center; background: #FDECEB; color: var(--bad); font: 900 2rem var(--font-head); }
.ci-invalid h1 { margin: 0; font: 900 1.5rem var(--font-head); }
.ci-invalid p { color: var(--muted); }

/* Écran de résultat (plein écran, lisible de loin) */
.ci-result { position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; overflow-y: auto; padding: 1.5rem; color: #fff; text-align: center; background: var(--ok); animation: pop .25s ease-out; }
.ci-result.r-ok { background: radial-gradient(120% 80% at 50% 0%, var(--ok-bright), var(--ok)); }
.ci-result.r-bye { background: radial-gradient(120% 80% at 50% 0%, #1fb866, #00733a); }
.ci-result.r-warn { background: radial-gradient(120% 80% at 50% 0%, #F59A1B, var(--warn)); }
.ci-result.r-bad { background: radial-gradient(120% 80% at 50% 0%, #E7332A, var(--bad)); }
.ci-result.r-info { background: radial-gradient(120% 80% at 50% 0%, var(--primary-bright), var(--primary)); }
.ci-result.r-dark { background: radial-gradient(120% 80% at 50% 0%, #2a2560, var(--ink)); }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ci-r-inner { width: min(460px, 100%); }
.ci-r-icon { width: 112px; height: 112px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); box-shadow: 0 0 0 10px rgba(255,255,255,.08); }
.ci-r-icon svg { width: 62px; height: 62px; }
.ci-r-title { margin: 0; font: 900 clamp(2rem, 9vw, 2.8rem)/1.08 var(--font-head); letter-spacing: -.01em; overflow-wrap: anywhere; }
.ci-r-sub { margin: .7rem 0 0; font: 600 1.2rem/1.35 var(--font-body); }
.ci-r-warn { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 14px; background: rgba(0,0,0,.18); font: 700 1rem/1.35 var(--font-body); }
.ci-r-meta { margin: .9rem 0 0; font-size: .95rem; opacity: .9; }
.ci-r-actions { display: grid; gap: .7rem; margin-top: 1.6rem; }
.ci-btn-white { background: #fff; color: var(--ink); box-shadow: 0 12px 24px -14px rgba(0,0,0,.6); }
.ci-btn-ghost { background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.55); box-shadow: none; }
.ci-r-timer { margin: .9rem 0 0; font-size: .82rem; opacity: .75; min-height: 1.2em; }
