/* HI-VIDY CORE / ADMIN — écran d'authentification
   Feuille dédiée : ne s'applique qu'à `.auth-screen`, donc jamais à l'espace de travail. */

.auth-screen{
  --auth-green:#123f33;
  --auth-green-deep:#0c2c24;
  --auth-teal:#1ec8b0;
  --auth-cream:#f8f7f2;
  --auth-ink:#12261f;
  --auth-muted:#5d6f68;
  --auth-line:#dfe3dc;
  min-height:100vh;
  min-height:100svh;
  margin:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  background:var(--auth-cream);
  color:var(--auth-ink);
  font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}

/* ---------- Panneau photographique ---------- */
.auth-screen .auth-visual{
  position:relative;
  overflow:hidden;
  background:var(--auth-green-deep);
  isolation:isolate;
}
.auth-screen .auth-visual__photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 42%;
  z-index:-2;
}
/* Voile de lisibilité : dégradés légers en haut (marque) et en bas (accroche) pour
   laisser la photographie pleinement visible au centre. L'ordinateur, le bureau et le
   coucher de soleil restent nets. */
.auth-screen .auth-visual::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(180deg,rgba(6,22,18,.74) 0%,rgba(6,22,18,.38) 18%,rgba(6,22,18,.06) 38%,rgba(6,22,18,0) 55%,rgba(6,22,18,.30) 80%,rgba(6,22,18,.66) 100%),
    linear-gradient(90deg,rgba(6,22,18,.28) 0%,rgba(6,22,18,.04) 42%,rgba(6,22,18,0) 70%);
}
.auth-screen .auth-visual__inner{
  position:relative;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:28px;
  padding:clamp(28px,4vw,56px);
  color:#eef6f1;
}
.auth-screen .auth-brand{display:flex;align-items:center;gap:14px}
.auth-screen .auth-brand svg{flex:none;width:clamp(34px,3vw,44px);height:auto;color:var(--auth-teal)}
.auth-screen .auth-brand__name{
  font-size:clamp(1.6rem,2.4vw,2.2rem);
  font-weight:800;
  letter-spacing:-.045em;
  line-height:1;
  color:#fff;
}
.auth-screen .auth-brand__name i{font-style:normal;color:var(--auth-teal)}
.auth-screen .auth-brand__tagline{
  margin:6px 0 0;
  font-size:clamp(.82rem,.95vw,.95rem);
  color:rgba(238,246,241,.82);
  font-weight:500;
  letter-spacing:.005em;
}
.auth-screen .auth-visual__copy h1{
  margin:18px 0 0;
  font-size:clamp(1.7rem,2.7vw,2.75rem);
  font-weight:600;
  line-height:1.16;
  letter-spacing:-.035em;
  color:#fff;
  max-width:16ch;
  text-shadow:0 2px 14px rgba(4,16,13,.82),0 1px 3px rgba(4,16,13,.6);
}
.auth-screen .auth-rule{
  width:56px;
  height:4px;
  border-radius:2px;
  background:var(--auth-teal);
  margin:0 0 4px;
}

/* ---------- Panneau formulaire ---------- */
.auth-screen .auth-panel{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:clamp(28px,4vw,64px);
  background:
    radial-gradient(120% 90% at 100% 0%,#fdfdfb 0%,var(--auth-cream) 55%,#f2f3ec 100%);
}
.auth-screen .auth-card{
  width:100%;
  /* La carte ne dépasse jamais la moitié de la fenêtre : elle reste entière même à
     1024 px CSS, cas des écrans 1280 px physiques mis à l'échelle à 125 %. */
  max-width:min(440px,46vw);
  min-width:0;
  display:flex;
  flex-direction:column;
}
.auth-screen .auth-card__eyebrow{
  font-size:.74rem;
  font-weight:700;
  letter-spacing:.19em;
  text-transform:uppercase;
  color:#2c6b57;
  margin:0 0 14px;
}
.auth-screen .auth-card h2{
  margin:0 0 8px;
  font-size:clamp(1.6rem,2vw,2rem);
  font-weight:750;
  letter-spacing:-.03em;
  color:var(--auth-ink);
}
.auth-screen .auth-card h2 b{color:#158a6f!important;font-weight:750}
.auth-screen .auth-card__lead{
  margin:0 0 30px;
  color:var(--auth-muted);
  font-size:1rem;
  line-height:1.55;
}
.auth-screen .auth-field{margin:0 0 20px}
.auth-screen .auth-field label{
  display:block;
  font-weight:600;
  font-size:.94rem;
  margin:0 0 8px;
  color:#22392f;
}
.auth-screen .auth-control{position:relative;display:block}
.auth-screen .auth-control svg{
  position:absolute;
  left:15px;
  top:50%;
  transform:translateY(-50%);
  width:19px;
  height:19px;
  color:#86968e;
  pointer-events:none;
}
.auth-screen .auth-control input{
  width:100%;
  margin:0;
  padding:15px 46px;
  border:1px solid var(--auth-line);
  border-radius:12px;
  background:#fff;
  color:var(--auth-ink);
  font-size:1rem;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.auth-screen .auth-control input::placeholder{color:#9aa8a1}
.auth-screen .auth-control input:focus{
  outline:none;
  border-color:#1e9c81;
  box-shadow:0 0 0 4px rgba(30,156,129,.16);
}
.auth-screen .auth-reveal{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:9px;
  background:none;
  color:#71837b;
  cursor:pointer;
}
.auth-screen .auth-reveal:hover{background:#eef1ea;color:#2c4b3f}
.auth-screen .auth-reveal svg{position:static;transform:none;left:auto;width:20px;height:20px;color:currentColor}

.auth-screen .auth-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin:4px 0 26px;
}
/* Fenêtres étroites : le lien de récupération passe sous la case à cocher
   plutôt que d'être coupé en bord de panneau. */
@media(max-width:1240px){
  .auth-screen .auth-row{flex-direction:column;align-items:flex-start;gap:12px}
}
.auth-screen .auth-check{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
  font-size:.94rem;
  color:#2a4238;
  cursor:pointer;
  margin:0;
}
.auth-screen .auth-check input{
  width:20px;
  height:20px;
  margin:0;
  flex:none;
  accent-color:var(--auth-green);
  cursor:pointer;
}
.auth-screen .auth-link{
  background:none;
  border:0;
  padding:0;
  font:inherit;
  font-size:.94rem;
  font-weight:600;
  color:#1a6b57;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.auth-screen .auth-link:hover{color:#0f4c3d}

/* Choix du type de recuperation : trois operations distinctes, presentees comme
   trois entrees claires plutot qu'un formulaire unique de six etapes. */
.auth-screen .auth-choice{display:grid;gap:10px;margin-bottom:14px}
.auth-screen .auth-choice__item{
  display:grid;gap:4px;text-align:left;width:100%;
  padding:14px 16px;border-radius:14px;cursor:pointer;
  background:#fff;border:1px solid var(--auth-line);
  font:inherit;color:var(--auth-ink);
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.auth-screen .auth-choice__item:hover{border-color:#9fc4b5;box-shadow:0 6px 20px rgba(18,63,51,.08)}
.auth-screen .auth-choice__item:active{transform:translateY(1px)}
.auth-screen .auth-choice__item strong{font-size:.95rem;font-weight:700;line-height:1.35}
.auth-screen .auth-choice__item span{font-size:.82rem;color:var(--auth-muted);line-height:1.5}
.auth-screen .auth-hint{
  margin:10px 0 0;font-size:.82rem;line-height:1.55;color:var(--auth-muted);
}
.auth-screen .auth-choice .auth-hint{margin:0 0 8px}

.auth-screen .auth-submit{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:17px 20px;
  border:0;
  border-radius:12px;
  background:var(--auth-green);
  color:#fff;
  font-size:1.03rem;
  font-weight:650;
  cursor:pointer;
  transition:background .18s ease,transform .12s ease,box-shadow .18s ease;
  box-shadow:0 8px 22px rgba(18,63,51,.22);
}
.auth-screen .auth-submit:hover{background:#17513f}
.auth-screen .auth-submit:active{transform:translateY(1px)}
.auth-screen .auth-submit svg{width:20px;height:20px;transition:transform .18s ease}
.auth-screen .auth-submit:hover svg{transform:translateX(3px)}
.auth-screen .auth-submit[aria-busy="true"],
.auth-screen .auth-submit:disabled{opacity:.72;cursor:progress;box-shadow:none}

.auth-screen .auth-error{
  min-height:1.35em;
  margin:16px 0 0;
  font-size:.93rem;
  font-weight:600;
  color:#a8382c;
}
.auth-screen .auth-error:empty{margin-top:0}

.auth-screen .auth-foot{
  margin:34px 0 0;
  padding-top:20px;
  border-top:1px solid var(--auth-line);
  font-size:.82rem;
  color:#7b8a83;
  letter-spacing:.01em;
}

/* Bandeau de secours hors ligne (bloc partagé réutilisé hors connexion). */
.auth-screen .auth-notice{
  margin:20px 0 0;
  padding:13px 16px;
  border:1px solid var(--auth-line);
  border-left:4px solid #c9a227;
  border-radius:10px;
  background:#fdfaf0;
  font-size:.92rem;
  line-height:1.5;
  color:#4d4430;
}

/* ---------- Adaptations ---------- */
@media(max-width:1160px){
  .auth-screen{grid-template-columns:minmax(280px,.8fr) minmax(360px,1fr)}
}
@media(max-width:1000px){
  .auth-screen{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .auth-screen .auth-card{max-width:min(440px,64vw)}
  .auth-screen .auth-visual__copy h1{font-size:clamp(1.4rem,2.2vw,1.9rem)}
  .auth-screen .auth-visual__inner{padding:clamp(22px,2.4vw,36px)}
  .auth-screen .auth-panel{padding:clamp(24px,2.6vw,40px)}
}
/* Fenêtres étroites (Windows 1280 px à 125 %, petites fenêtres redimensionnées) :
   la carte prend toute la largeur du panneau, sans jamais être rognée. */
@media(max-width:900px){
  .auth-screen .auth-card{max-width:100%}
}
@media(max-width:860px){
  .auth-screen{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .auth-screen .auth-visual{min-height:280px}
  .auth-screen .auth-visual__inner{padding:26px 24px 30px;justify-content:flex-end}
  .auth-screen .auth-visual__copy h1{font-size:1.5rem;margin-top:12px}
  .auth-screen .auth-visual::after{
    background:linear-gradient(180deg,rgba(8,28,23,.72) 0%,rgba(8,28,23,.52) 45%,rgba(8,28,23,.82) 100%);
  }
  .auth-screen .auth-panel{padding:28px 22px 40px}
}
@media(max-width:520px){
  .auth-screen .auth-visual{min-height:230px}
  .auth-screen .auth-visual__copy h1{display:none}
  .auth-screen .auth-card h2{font-size:1.5rem}
  .auth-screen .auth-row{align-items:flex-start;gap:12px}
}

@media(prefers-reduced-motion:reduce){
  .auth-screen *{transition:none!important;animation:none!important}
}
/* Edge/Windows : masquer le bouton natif de révélation pour n'en garder qu'un seul. */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear{display:none}
