/* ═══════════════════════════════════════════════════════════════════════════
   LISA Lab — Page de connexion
   Feuille autonome : cette page est servie avant toute authentification et
   ne doit rien emprunter au CRM.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Le turquoise est celui du logo CIBIO, relevé pour rester lisible sur
     fond sombre. L'aplat des boutons est volontairement plus sombre : du
     blanc sur le turquoise d'origine tombe sous le seuil de contraste. */
  --turquoise:        #2de0ce;
  --turquoise-aplat:  #0f9c91;
  --turquoise-survol: #0b8077;

  --ardoise-900: #0b1724;
  --ardoise-800: #102033;
  --ardoise-700: #16293f;
  --ardoise-600: #1d3550;

  --surface:   #ffffff;
  --bord:      #dfe4ea;
  --texte:     #16202b;
  --texte-2:   #4d5b6a;
  --texte-3:   #8494a5;

  --rouge:     #d93a3a;
  --rouge-fond:#fdf1f1;
  --vert:      #15855c;
  --vert-fond: #eefaf4;

  --rayon:     8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px; line-height: 1.55; color: var(--texte);
  background: var(--surface);
}
.hidden { display: none !important; }

.connexion { display: flex; min-height: 100%; }

/* ── Panneau de présentation ────────────────────────────────────────────── */
.presentation {
  flex: 0 0 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background:
    radial-gradient(1100px 620px at 18% 8%, var(--ardoise-600) 0%, transparent 58%),
    linear-gradient(160deg, var(--ardoise-900) 0%, var(--ardoise-800) 55%, var(--ardoise-700) 100%);
  position: relative; overflow: hidden;
}

/* Trame discrète évoquant un circuit, comme sur la maquette. Purement
   décorative : masquée aux lecteurs d'écran par son caractère ::before. */
.presentation::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--turquoise) 1px, transparent 1px),
    linear-gradient(90deg, var(--turquoise) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: .022;
}

.presentation-centre { position: relative; max-width: 420px; width: 100%; text-align: center; }

.marque {
  font-size: 46px; font-weight: 800; letter-spacing: 1px; line-height: 1;
  color: var(--turquoise);
}
/* Le nom porte un dégradé du turquoise du logo vers le bleu ; « Lab » reste
   uni pour ne pas concurrencer la marque. Le halo passe par drop-shadow :
   une text-shadow transparaîtrait à travers les lettres découpées. */
.marque-nom {
  background: linear-gradient(95deg, var(--turquoise) 8%, #4f93f0 92%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(45, 224, 206, .3));
}
.marque-suffixe {
  font-weight: 300; letter-spacing: 2px;
  text-shadow: 0 0 28px rgba(45, 224, 206, .3);
}

.marque-sous-titre {
  margin-top: 12px; font-size: 12.5px; color: #93a6b8; letter-spacing: .2px;
}

.atouts {
  list-style: none; margin: 34px 0 0; padding: 20px 22px;
  text-align: left;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .085);
  border-radius: 10px;
}
.atouts li {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; font-size: 13px; color: #cdd9e4;
}
.atout-puce {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 5px;
}
.atout-puce--essais  { background: linear-gradient(135deg, #2de0ce, #12a89b); }
.atout-puce--qualite { background: linear-gradient(135deg, #4fa8f7, #1f6fd0); }
.atout-puce--clients { background: linear-gradient(135deg, #46c98b, #1d8f5c); }
.atout-puce--plan    { background: linear-gradient(135deg, #9b7bf0, #6c4bd0); }

.editeur { margin-top: 30px; font-size: 11px; color: #6d8298; }
.editeur strong { color: #9fb3c6; font-weight: 600; }

/* ── Panneau d'authentification ─────────────────────────────────────────── */
.acces {
  flex: 1 1 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.acces-centre { width: 100%; max-width: 330px; }

.acces-logo { display: block; width: 118px; margin: 0 auto 34px; }

/* ── Champs ─────────────────────────────────────────────────────────────── */
.etape { display: flex; flex-direction: column; gap: 15px; }

.etape-titre { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.etape-aide  { font-size: 12.5px; color: var(--texte-2); margin-top: -6px; }
.etape-aide--alerte { color: var(--rouge); }

.champ { display: block; }
.champ-libelle {
  display: block; margin-bottom: 5px;
  font-size: 12px; color: var(--texte-2);
}
.champ-note { display: block; margin-top: 5px; font-size: 11.5px; color: var(--texte-3); }
.champ-note--refus { color: var(--rouge); }

.champ input[type="email"],
.champ input[type="password"],
.champ input[type="text"] {
  width: 100%; padding: 9px 11px;
  font-family: inherit; font-size: 13.5px; color: var(--texte);
  background: #f6f8fa;
  border: 1px solid var(--bord); border-radius: var(--rayon);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.champ input:focus {
  outline: none; background: var(--surface);
  border-color: var(--turquoise-aplat);
  box-shadow: 0 0 0 3px rgba(15, 156, 145, .14);
}

.saisie-code {
  text-align: center; letter-spacing: 6px;
  font-size: 19px !important; font-variant-numeric: tabular-nums;
}

.champ-avec-oeil { position: relative; display: block; }
.champ-avec-oeil input { padding-right: 38px; }
.oeil {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  color: var(--texte-3); font-size: 13px; border-radius: 6px;
}
.oeil:hover { color: var(--turquoise-aplat); background: #eef2f5; }
.oeil[aria-pressed="true"] { color: var(--turquoise-aplat); }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.bouton {
  width: 100%; padding: 10px 14px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--rayon);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.bouton--principal { background: var(--turquoise-aplat); color: #fff; }
.bouton--principal:hover:not(:disabled) { background: var(--turquoise-survol); }
.bouton--discret {
  background: transparent; color: var(--texte-2); border-color: var(--bord);
}
.bouton--discret:hover { background: #f4f6f8; color: var(--texte); }
.bouton:disabled { opacity: .55; cursor: not-allowed; }

/* ── Cartes de choix du second facteur ──────────────────────────────────── */
.carte-choix {
  display: flex; align-items: flex-start; gap: 13px; width: 100%;
  padding: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--bord);
  border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.carte-choix:hover { border-color: var(--turquoise-aplat); background: #f7fdfc; }
.carte-choix:disabled { opacity: .5; cursor: not-allowed; }
.carte-choix-icone {
  flex: 0 0 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #e6faf7; color: var(--turquoise-aplat); font-size: 17px;
}
.carte-choix-corps { display: flex; flex-direction: column; gap: 3px; }
.carte-choix-corps strong { font-size: 13px; font-weight: 600; }
.carte-choix-corps span { font-size: 11.5px; color: var(--texte-2); line-height: 1.45; }

/* ── QR code et secret ──────────────────────────────────────────────────── */
.qr {
  display: flex; justify-content: center; padding: 14px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 10px;
}
.qr img { width: 190px; height: 190px; image-rendering: pixelated; }

.secret { font-size: 12px; color: var(--texte-2); }
.secret summary { cursor: pointer; color: var(--turquoise-survol); }
.secret p { margin: 8px 0 6px; }
.secret code {
  display: block; padding: 8px 10px;
  background: #f3f5f7; border: 1px solid var(--bord); border-radius: 6px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12.5px; letter-spacing: 1.5px; word-break: break-all;
}

/* ── Messages ───────────────────────────────────────────────────────────── */
.message {
  padding: 10px 12px; border-radius: var(--rayon); font-size: 12.5px;
  border: 1px solid; margin-bottom: 15px;
}
.message--refus  { background: var(--rouge-fond); border-color: #f4c9c9; color: #9c2626; }
.message--succes { background: var(--vert-fond);  border-color: #bde9d3; color: #0f6344; }

/* ── Attente ────────────────────────────────────────────────────────────── */
.patience { display: flex; justify-content: center; padding: 18px 0; }
.rouet {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid #dfe4ea; border-top-color: var(--turquoise-aplat);
  animation: tourne .7s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

.mention-pied {
  margin-top: 30px; text-align: center;
  font-size: 10.5px; line-height: 1.6; color: var(--texte-3);
}

/* ── Écrans étroits : la présentation passe au-dessus ───────────────────── */
@media (max-width: 860px) {
  .connexion { flex-direction: column; }
  .presentation { flex: 0 0 auto; padding: 34px 24px; }
  .marque { font-size: 34px; }
  .atouts { display: none; }
  .acces { padding: 34px 24px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .rouet { animation-duration: 2s; }
  * { transition: none !important; }
}
