/* =====================================================================
   VIGIE — les écrans d'entrée (connexion, inscription, code, mot de
   passe oublié), d'après les maquettes du directeur (03/08/2026).

   Deux panneaux : le sombre (titre, question, mentions) et le clair
   (logotype, formulaire, langue). Titres en Nexa Pro ExtraBold, textes
   en Inter. L'animation du fond évoque des recherches radar : des
   anneaux naissent, s'étendent et s'effacent en fondu.
   ===================================================================== */

@font-face {
  font-family: "Nexa Pro";
  src: url("polices/NexaPro-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("polices/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --noir: #000000;
  --vert: #88c73b;
  --vert-fonce: #6ba32c;
  --encre: #333333;
  --gris-texte: #6f757c;
  --gris-champ: #f4f5f4;
  --gris-bord: #e4e6e4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Inter", "Segoe UI", system-ui, sans-serif;
       color: var(--encre); background: #ffffff; }

/* ------------------------------------------------------- la scène */

.scinde { display: flex; min-height: 100vh; }

/* --- panneau sombre ------------------------------------------------ */

.panneau-sombre {
  position: relative; overflow: hidden;
  width: 56%; min-height: 100vh;
  background: url("fond-sombre.jpg") center / cover no-repeat #030503;
  color: #ffffff;
  display: flex; flex-direction: column;
  padding: 52px 56px 36px;
}
.panneau-sombre .marque { width: 66px; height: 66px; flex-shrink: 0; }

.panneau-sombre .parole { margin: auto 0; position: relative; z-index: 2;
                          max-width: 520px; }
.panneau-sombre h1 {
  font-family: "Nexa Pro", "Inter", sans-serif; font-weight: 800;
  font-size: clamp(24px, 2.5vw, 36px); line-height: 1.35;
  letter-spacing: .2px; margin: 0 0 30px;
}
.panneau-sombre .question { font-size: 15.5px; font-weight: 400;
                            color: #e8ece4; margin: 0 0 5px; }
.panneau-sombre .question-lien {
  display: inline-block; color: var(--vert); font-size: 15.5px;
  text-decoration: underline; text-underline-offset: 4px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: inherit; font-weight: 400;
}
.panneau-sombre .mentions { position: relative; z-index: 2;
  font-size: 12px; line-height: 1.7; color: #8a9087; margin: 0; }
.panneau-sombre .mentions a { color: #a9afa6; }

/* Les recherches radar : trois anneaux naissent au foyer, s'étendent
   et s'effacent, décalés dans le temps ; un faisceau vert traverse. */
.radar { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.radar .faisceau {
  position: absolute; inset: 0;
  background: radial-gradient(60% 45% at 70% 38%,
              rgba(136, 199, 59, 0.10), transparent 70%);
  animation: respiration 9s ease-in-out infinite;
}
.radar .anneau {
  position: absolute; left: 66%; top: 36%;
  width: 46vmin; height: 46vmin; margin: -23vmin;
  border: 10px solid rgba(136, 199, 59, 0.22);
  border-radius: 50%;
  filter: blur(9px);
  opacity: 0;
  animation: recherche 8s linear infinite;
}
.radar .anneau:nth-child(3) { animation-delay: 2.6s; }
.radar .anneau:nth-child(4) { animation-delay: 5.2s; }

@keyframes recherche {
  0%   { transform: scale(0.12); opacity: 0; }
  14%  { opacity: .5; }
  70%  { opacity: .10; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes respiration {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .radar .anneau { animation: none; opacity: .18; transform: scale(1); }
  .radar .faisceau { animation: none; }
}

/* --- panneau clair ------------------------------------------------- */

.panneau-clair {
  width: 44%; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 40px 28px;
}
.panneau-clair .logotype { height: 58px; margin-bottom: 48px; }
.panneau-clair .formulaire { width: 100%; max-width: 440px;
                             display: flex; flex-direction: column;
                             gap: 18px; margin: auto 0; }

.titre-clair { font-family: "Nexa Pro", "Inter", sans-serif;
               font-weight: 800; font-size: 24px; color: var(--encre);
               text-align: center; margin: 0 0 2px; }
.sous-clair { font-size: 14.5px; color: var(--gris-texte);
              text-align: center; margin: -8px 0 6px; line-height: 1.6; }
.sous-clair .destinataire { color: var(--vert-fonce); font-weight: 700;
                            word-break: break-all; }

.champ-pilule {
  width: 100%; padding: 17px 26px;
  font: 500 15px "Inter", sans-serif; color: var(--encre);
  background: var(--gris-champ);
  border: 1px solid var(--gris-bord); border-radius: 999px;
  outline: none; transition: border-color .15s, background .15s;
}
.champ-pilule::placeholder { color: #a9aeb4; font-weight: 400; }
.champ-pilule:focus { border-color: var(--vert); background: #ffffff; }

.champ-code { text-align: center; letter-spacing: 14px;
              font-weight: 700; font-size: 18px; }
.champ-code::placeholder { letter-spacing: 8px; }

.bouton-vert {
  width: 100%; padding: 17px 26px; border: none; border-radius: 999px;
  background: var(--vert); color: #ffffff;
  font: 700 16px "Inter", sans-serif; cursor: pointer;
  transition: background .15s, transform .05s;
}
.bouton-vert:hover { background: var(--vert-fonce); }
.bouton-vert:active { transform: translateY(1px); }

.bouton-blanc {
  width: 100%; padding: 15px 26px; border-radius: 999px;
  background: #ffffff; border: 1px solid #d9dcd9; color: var(--encre);
  font: 700 15px "Inter", sans-serif; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  text-decoration: none; transition: border-color .15s, background .15s;
}
.bouton-blanc:hover { border-color: #b9beb9; background: #fafbfa; }

.separateur { display: flex; align-items: center; gap: 18px;
              color: var(--gris-texte); font-size: 13.5px; margin: 4px 0; }
.separateur::before, .separateur::after {
  content: ""; flex: 1; height: 1px; background: var(--gris-bord);
}

.lien-discret { display: block; text-align: center; margin-top: 4px;
                color: var(--gris-texte); font-size: 14px;
                text-decoration: none; background: none; border: none;
                cursor: pointer; font-family: inherit; width: 100%; }
.lien-discret:hover { color: var(--encre); text-decoration: underline; }

/* Renvoyer le code : le décompte est un texte ; à zéro, il devient
   un bouton vert (vigie.js anime, le serveur renvoie). */
.renvoi { text-align: center; margin-top: 2px; }
.renvoi .decompte { color: var(--gris-texte); font-size: 14px; }
.renvoi .bouton-vert { display: none; width: auto; margin: 0 auto;
                       padding: 12px 30px; font-size: 14px; }
.renvoi.pret .decompte { display: none; }
.renvoi.pret .bouton-vert { display: inline-block; }

/* --- la langue, en bas du panneau clair ---------------------------- */

.langue { position: relative; margin-top: 26px; }
.langue .bouton-langue .globe-langue { width: 17px; height: 17px; }
.langue .bouton-langue {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--encre); font: 500 14.5px "Inter", sans-serif;
}
.langue .bouton-langue .chevron { transition: transform .15s; }
.langue.ouverte .bouton-langue .chevron { transform: rotate(180deg); }
.langue-choix {
  display: none; position: absolute; bottom: calc(100% + 10px);
  left: 50%; transform: translateX(-50%);
  min-width: 170px; background: #ffffff;
  border: 1px solid var(--gris-bord); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .10); padding: 6px; z-index: 30;
}
.langue.ouverte .langue-choix { display: block; }
.langue-choix a { display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 13px; border-radius: 9px; text-decoration: none;
  color: var(--encre); font-size: 14px; }
.langue-choix a:hover { background: var(--gris-champ); }
.langue-choix a[aria-current="true"] { color: var(--vert-fonce);
                                       font-weight: 700; }

/* --- messages passagers (reprend l'esprit de vigie.css) ------------ */

.toasts { position: fixed; bottom: 22px; left: 50%;
          transform: translateX(-50%); z-index: 90; display: flex;
          flex-direction: column; gap: 10px; align-items: center; }
.toast { background: #1c221a; color: #eef2ea; font-size: 14px;
         padding: 12px 22px; border-radius: 999px;
         border: 1px solid #2c3527;
         box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.toast-erreur { background: #2a1414; color: #ffd7d7; border-color: #4a2020; }
.toast-sortant { opacity: 0; transition: opacity .25s; }

/* --- petits écrans : le sombre devient un bandeau ------------------- */

@media (max-width: 940px) {
  .scinde { flex-direction: column; }
  .panneau-sombre { width: 100%; min-height: 0; padding: 34px 26px; }
  .panneau-sombre .parole { margin: 18px 0 6px; }
  .panneau-sombre h1 { font-size: 24px; margin-bottom: 18px; }
  .panneau-sombre .mentions { display: none; }
  .panneau-clair { width: 100%; min-height: 0; padding: 40px 22px 24px; }
  .panneau-clair .logotype { height: 48px; margin-bottom: 30px; }
}
