/* Pages du compte (connexion, paiement, états) : la DA v14 de Business Manager, jetons recopiés de
   web/v14/socle.css (clair et sombre). Une valeur qui change là-bas change ici aussi. */

@font-face { font-family: "Inter"; src: url("../inter/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../inter/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../inter/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../inter/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ds-police: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --ds-page: #e9e9e9; --ds-shell: #f4f4f4; --ds-carte: #ffffff;
  --ds-doux: #f5f5f5; --ds-doux-2: #ececec; --ds-trait: #ececec; --ds-trait-2: #e3e3e3;
  --ds-encre: #141414; --ds-encre-2: #3b3b3b; --ds-gris: #8c8c8c; --ds-gris-texte: #5e5e5e;
  --ds-plein: #181818; --ds-sur-plein: #ffffff; --ds-seg-actif: #ffffff;
  --ds-accent: #4f7d72; --ds-accent-2: #7aa79b; --ds-accent-fonce: #365a51;
  --ds-accent-texte: var(--ds-accent-fonce);
  --ds-vert: #23a15b; --ds-vert-fond: #e5f6eb; --ds-rouge: #e5484d; --ds-rouge-fond: #fde9e9;
  --ds-r-xl: 36px; --ds-r-lg: 22px; --ds-r-md: 16px; --ds-r-sm: 12px;
  /* Élévation des pages en scène (01-11) : trois marches, teintées vert nuit comme la lave.
     1 = ce qui se touche (pilules, marque, lecture) · 2 = panneaux et notification · 3 = objets héros (vidéo, captures, téléphone) */
  --ds-ombre-1: 0 12px 28px -14px rgba(10, 24, 21, .55);
  --ds-ombre-2: 0 40px 90px -36px rgba(10, 24, 21, .65);
  --ds-ombre-3: 0 70px 140px -48px rgba(10, 24, 21, .8);
  --ds-ombre-texte: 0 2px 30px rgba(16, 38, 33, .35);   /* lisibilité du texte clair sur la lave qui bouge */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ds-accent-texte: var(--ds-accent-2);
    --ds-page: #050506; --ds-shell: #0f0f11; --ds-carte: #18181b;
    --ds-doux: #202024; --ds-doux-2: #29292e; --ds-trait: #242428; --ds-trait-2: #2e2e34;
    --ds-encre: #f4f4f5; --ds-encre-2: #d0d0d5; --ds-gris: #8d8d96; --ds-gris-texte: #8d8d96;
    --ds-plein: #f4f4f5; --ds-sur-plein: #111113; --ds-seg-actif: #34343a;
    --ds-vert: #3cc47a; --ds-vert-fond: rgba(60, 196, 122, 0.14); --ds-rouge: #f2666b; --ds-rouge-fond: rgba(242, 102, 107, 0.14);
    --ds-ombre-1: 0 12px 28px -14px rgba(0, 0, 0, .7);
    --ds-ombre-2: 0 40px 90px -36px rgba(0, 0, 0, .85);
    --ds-ombre-3: 0 70px 140px -48px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ds-page); color: var(--ds-encre); font: 400 15px/1.45 var(--ds-police);
  -webkit-font-smoothing: antialiased; display: grid; place-items: center; min-height: 100vh; padding: 24px 16px;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* La coque : même gris arrondi que l'app, deux cartes dedans */
.coque {
  width: min(1040px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px; border-radius: var(--ds-r-xl); background: var(--ds-shell);
}

/* Carte d'accent : celle d'« Aujourd'hui » dans l'app */
.vitrine {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 28px;
  padding: 28px; border-radius: var(--ds-r-lg); color: #fff; min-height: 580px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(140deg, var(--ds-accent-2) 0%, var(--ds-accent) 45%, var(--ds-accent-fonce) 100%);
}
.marque { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  height: 52px; padding: 0 20px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.95); color: #141414; }
.marque img { width: 40px; height: 40px; border-radius: 50%; }
.marque span { font: 600 16px/1 var(--ds-police); letter-spacing: -.009em; }
/* 31-10 : la marque ramène à la page d'accueil (stonks-inc.com) */
a.marque { text-decoration: none; transition: transform .15s ease-out; }
a.marque:hover { transform: translateY(-1px); }
a.marque:active { transform: scale(.97); transition-duration: .08s; }
a.marque:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.vitrine h1 { margin: auto 0 0; font: 600 34px/1.08 var(--ds-police); letter-spacing: -1px; max-width: 18ch; text-wrap: balance; }
/* Lumière qui bouge lentement dans le vert-de-gris (31-10 ; 01-11) : deux halos, transform seulement */
.vitrine::before, .vitrine::after { content: ""; position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(40px); animation: derive 18s ease-in-out infinite alternate; }
.vitrine::before { width: 70%; aspect-ratio: 1; left: -26%; top: -30%; background: rgba(255, 214, 190, .32); }
.vitrine::after { width: 60%; aspect-ratio: 1; right: -24%; bottom: -16%; background: rgba(176, 52, 10, .55); animation-delay: -9s; }
.vitrine > * { position: relative; z-index: 1; }
@keyframes derive { to { transform: translate(14%, 10%) scale(1.12); } }

/* Carte du formulaire */
.carte { display: flex; flex-direction: column; justify-content: center; padding: 40px 44px;
  border-radius: var(--ds-r-lg); background: var(--ds-carte); }
.carte h2 { margin: 0 0 6px; font: 600 28px/1.15 var(--ds-police); letter-spacing: -0.6px; }
.carte .sous { margin: 0 0 24px; color: var(--ds-gris-texte); }

/* Segment : la pastille noire des onglets de l'app */
.segment { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-bottom: 28px;
  border-radius: 999px; background: var(--ds-doux); }
/* La pastille noire glisse d'un onglet à l'autre (31-10) */
.segment::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 7px);
  border-radius: 999px; background: var(--ds-plein); transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.segment[data-actif="inscription"]::before { transform: translateX(calc(100% + 4px)); }
.segment button { position: relative; height: 42px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--ds-encre-2); font: 500 15px/1 var(--ds-police); transition: color .3s; }
.segment button[aria-selected="true"] { color: var(--ds-sur-plein); }
.segment button:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 2px; }

/* Arrivée de la page : la coque se pose, la carte monte en cascade (31-10) */
.coque { animation: pose .7s cubic-bezier(.16, 1, .3, 1) both; }
.carte > * { animation: monte-doux .6s cubic-bezier(.16, 1, .3, 1) both; }
.carte > :nth-child(2) { animation-delay: .06s; } .carte > :nth-child(3) { animation-delay: .1s; }
.carte > :nth-child(4) { animation-delay: .14s; } .carte > :nth-child(n+5) { animation-delay: .18s; }
@keyframes pose { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes monte-doux { from { opacity: 0; transform: translateY(10px); } }
.champ input:focus { box-shadow: 0 0 0 4px rgba(79, 125, 114, .14); }

.champ { display: grid; gap: 7px; margin-bottom: 14px; }
.champ label { font: 500 13px/1 var(--ds-police); color: var(--ds-encre-2); display: flex; justify-content: space-between; }
.champ label a { color: var(--ds-gris-texte); font-weight: 400; text-decoration: none; }
.champ label a:hover { color: var(--ds-encre); text-decoration: underline; }
.champ input { height: 52px; padding: 0 16px; border-radius: var(--ds-r-md); border: 1px solid transparent;
  background: var(--ds-doux); color: var(--ds-encre); font: 400 16px/1 var(--ds-police); outline: none;
  transition: border-color .15s, background .15s; }
.champ input:focus { border-color: var(--ds-encre); background: var(--ds-carte); }
.champ .aide { font-size: 12.5px; color: var(--ds-gris-texte); }
/* Mot de passe : le bouton œil (31-10) dans le champ, à droite */
.mdp-cadre { position: relative; display: grid; }
.mdp-cadre input { padding-right: 52px; }
.oeil { position: absolute; top: 50%; right: 4px; width: 44px; height: 44px; transform: translateY(-50%);
  display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--ds-r-sm); background: transparent;
  color: var(--ds-gris); cursor: pointer; transition: color .15s, background .15s; }
.oeil:hover { color: var(--ds-encre); background: var(--ds-doux-2); }
.oeil:focus-visible { outline: 2px solid var(--ds-encre); outline-offset: 1px; }
/* Le clignement : fermé = mot de passe caché ; au clic la paupière s'ouvre (l'œil se déplie depuis la ligne
   des cils), au clic suivant elle se referme. */
.oeil svg { overflow: visible; }
.oeil-ouvert, .oeil-ferme { transform-box: view-box; transform-origin: 12px 12px; }
.oeil-ouvert { transition: transform .22s cubic-bezier(.3, 1.4, .5, 1), opacity .12s; }
.oeil-ferme { transition: transform .18s ease, opacity .12s .06s; }
.oeil:not([aria-pressed="true"]) .oeil-ouvert { transform: scaleY(0.05); opacity: 0; transition: transform .16s ease-in, opacity .1s .06s; }
.oeil[aria-pressed="true"] .oeil-ferme { transform: scaleY(0.4) translateY(-4px); opacity: 0; transition: transform .12s ease-in, opacity .08s; }
@media (prefers-reduced-motion: reduce) { .oeil-ouvert, .oeil-ferme, .oeil:not([aria-pressed="true"]) .oeil-ouvert,
  .oeil[aria-pressed="true"] .oeil-ferme { transition: none; } }

.bouton { width: 100%; height: 52px; border-radius: 999px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 500 16px/1 var(--ds-police); text-decoration: none; transition: transform .12s, opacity .2s, background .2s; }
.bouton:active { transform: scale(.97); transition-duration: .08s; }
.bouton[disabled] { opacity: .55; cursor: default; }
.bouton.plein { background: var(--ds-plein); color: var(--ds-sur-plein); margin-top: 8px; }
.bouton.contour { background: var(--ds-carte); color: var(--ds-encre); border: 1px solid var(--ds-trait-2); }
.bouton.contour:hover { background: var(--ds-doux); }
/* Focus clavier visible sur tout ce qui se clique (31-10) */
.bouton:focus-visible, .carte a:focus-visible, .accord input:focus-visible { outline: 2px solid var(--ds-accent); outline-offset: 3px; }
/* Envoi en cours : la roue remplace le texte, la largeur ne bouge pas */
#valider.occupe { position: relative; color: transparent; }
#valider.occupe::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--ds-sur-plein); border-right-color: transparent; animation: roue .7s linear infinite; }
@keyframes roue { to { transform: rotate(360deg); } }

.ou { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--ds-gris-texte); font-size: 13px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--ds-trait); }

.message { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--ds-r-sm); font-size: 14px; }
.message.erreur { background: var(--ds-rouge-fond); color: var(--ds-rouge); }
.message.ok { background: var(--ds-vert-fond); color: var(--ds-vert); }
.legal { margin: 18px 0 0; font-size: 12.5px; color: var(--ds-gris-texte); text-align: center; }
.legal a { color: var(--ds-gris-texte); }
.retour { margin-top: 18px; text-align: center; font-size: 14px; }
.retour a { color: var(--ds-gris-texte); }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  body { place-items: start center; padding: 12px; }
  .coque { grid-template-columns: 1fr; }
  .vitrine { min-height: 0; gap: 16px; padding: 20px; }
  .vitrine h1 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.7px; }
  .carte { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Case des CGV : page de paiement et accès offert (/cgv, 23-10) */
.accord { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: 13px; line-height: 1.45;
  color: var(--ds-gris); cursor: pointer; }
.accord input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; accent-color: currentColor; cursor: pointer; }
.accord a { color: inherit; text-decoration: underline; }
