/* STANSIA - espace client. Meme charte que le site vitrine (navy / creme / corail), polices auto-hebergees. */
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-500.woff2") format("woff2"); }

:root {
  --accent: #E8734A;
  --accent-deep: #C25A33;
  --cream: #FAF7F2;
  --night: #14131F;
  --night-2: #1E1B2E;
  --night-3: #2A2640;
  --line: rgba(255, 255, 255, .12);
  --text: #ECE9F5;
  --muted: #A9A4BD;
  --ok: #4CC38A;
  --warn: #F2B544;
  --bad: #F0675C;
  --radius: 16px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--text); background: radial-gradient(60% 40% at 20% 0%, rgba(232, 115, 74, .16), transparent 60%), var(--night); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
.wrap { width: min(980px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.top { border-bottom: 1px solid var(--line); background: rgba(20, 19, 31, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 10; }
.top__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 64px; padding: 6px 0; }
.logo { display: inline-flex; align-items: baseline; font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; color: #fff; text-decoration: none; }
.top__nav { display: flex; align-items: center; gap: 16px; font-size: .95rem; }
.top__nav .who { color: var(--muted); max-width: min(22ch, 38vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { padding: 36px 0 72px; outline: none; }

.card { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card--narrow { max-width: 460px; margin-inline: auto; }
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: #1a1208; font: 700 16px var(--display); cursor: pointer; text-decoration: none; }
.btn:hover { background: #f08460; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: rgba(255, 255, 255, .06); }
.btn--link { background: none; color: var(--accent); min-height: 0; padding: 0; font: 500 15px var(--body); text-decoration: none; }
/* Lien discret : ni soulignement ni fond a l'etat normal ; au survol (ou au clavier), soulignement seulement - jamais le fond du bouton plein. */
.btn--link:hover, .btn--link:focus-visible { background: none; text-decoration: underline; text-underline-offset: 3px; }
.btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; }
input[type="email"], input[type="password"], input[type="text"] { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--night-3); color: #fff; font: 400 16px var(--body); }
input::placeholder { color: #8b86a3; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0; display: grid; gap: 10px; }
legend { padding: 0 6px; font-weight: 500; }
.choice { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; }
.choice input { accent-color: var(--accent); width: 18px; height: 18px; }

.notice { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--line); background: var(--night-3); }
.notice--ok { border-color: rgba(76, 195, 138, .5); }
.notice--warn { border-color: rgba(242, 181, 68, .6); }
.notice--bad { border-color: rgba(240, 103, 92, .6); }

.plan { display: grid; gap: 8px; align-content: start; }
.plan--best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan__price { font: 700 2rem var(--display); }
.plan__price small { font: 400 .9rem var(--body); color: var(--muted); }
.plan ul { margin: 0 0 8px; padding-left: 1.1em; color: var(--muted); }
.badge { display: inline-block; justify-self: start; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #1a1208; font: 700 12px var(--display); }

.bar { height: 12px; border-radius: 999px; background: var(--night-3); overflow: hidden; margin: 10px 0 6px; }
.bar > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
.bar--warn > span { background: var(--warn); }
.bar--bad > span { background: var(--bad); }

.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--night-3); border-top-color: var(--accent); animation: spin 1s linear infinite; margin: 8px 0 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .bar > span { transition: none; } }

.big-ok { width: 60px; height: 60px; border-radius: 50%; background: rgba(76, 195, 138, .18); color: var(--ok); display: grid; place-items: center; font: 700 30px var(--display); margin-bottom: 12px; }

.calls { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.call { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--night-3); }
.call__head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; }
.call__who { font-weight: 500; }
.call__meta { color: var(--muted); font-size: .9rem; }
.call__summary { margin: 8px 0 0; }
.call--urgent { border-color: rgba(240, 103, 92, .7); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-left: 6px; }
.tag--new { background: var(--accent); color: #1a1208; }
.tag--urgent { background: var(--bad); color: #fff; }
.call--masked .call__who, .call--masked .call__meta { filter: none; }
.masked { letter-spacing: .15em; color: var(--muted); }
.transcript { display: grid; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.turn { padding: 8px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn--agent { background: rgba(232, 115, 74, .14); justify-self: start; }
.turn--customer { background: var(--night-2); justify-self: end; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row--between { justify-content: space-between; }

main { overflow-wrap: anywhere; }
.plan__price, h1 { overflow-wrap: anywhere; }

/* ---- Ecran scinde des pages d'authentification (connexion, inscription, mot de passe, confirmation) ---- */
body.is-auth .top { display: none; }
body.is-auth main { width: 100%; max-width: none; padding: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.split__brand { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 5vw, 64px); color: #fff; overflow: hidden; background: radial-gradient(70% 60% at 15% 0%, rgba(232, 115, 74, .55), transparent 60%), radial-gradient(60% 60% at 100% 100%, rgba(98, 76, 190, .45), transparent 65%), #1b1830; }
.split__brand::after { content: ""; position: absolute; right: -90px; bottom: -90px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 46px rgba(255, 255, 255, .03), 0 0 0 100px rgba(255, 255, 255, .02); pointer-events: none; }
.logo--big { font-size: 40px; }
.split__pitch { position: relative; z-index: 1; max-width: 34rem; }
.split__pitch h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin-bottom: .5em; }
.split__pitch p { color: #dcd8ee; font-size: 1.05rem; }
.ticks { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: rgba(232, 115, 74, .22); color: var(--accent); display: grid; place-items: center; font: 700 13px var(--display); }
.split__foot { position: relative; z-index: 1; color: #bdb8d6; margin: 0; }
.split__form { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px); background: var(--night); }
.authcard { width: min(420px, 100%); }
.authcard h1 { font-size: 1.9rem; }
.authcard .btn { width: 100%; }
.authcard .btn--link { width: auto; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split__brand { padding: 24px 20px 28px; gap: 16px; }
  .split__pitch p, .ticks, .split__foot { display: none; }
  .split__pitch h2 { font-size: 1.3rem; margin: 0; }
  .logo--big { font-size: 30px; }
  .split__brand::after { display: none; }
  .split__form { padding: 24px 20px 48px; align-items: start; }
}
