/* =========================
   VARIABLES - FARMING SIMULATOR 25
   ========================= */
:root{
  --bg1:#070a07;
  --bg2:#0c150e;

  --glass: rgba(255,255,255,.08);
  --glass2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.16);

  --text:#eafbea;
  --muted: rgba(234,251,234,.72);

  --accent:#81c332;   /* vert Atlantis (FS25) */
  --accent2:#026d63;  /* teal Mosque (FS25) */
  --accent3:#f8c887;  /* tan Manhattan (FS25) */

  --shadow: 0 24px 70px rgba(0,0,0,.50);
  --radius: 22px;
}

/* =========================
   RESET / BASE
   ========================= */
*{ box-sizing:border-box }
html,body{ height:100% }

body{
  margin:0;
  font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 15% 10%, rgba(129,195,50,.22), transparent 55%),
    radial-gradient(900px 700px at 85% 25%, rgba(2,109,99,.20), transparent 55%),
    linear-gradient(180deg, var(--bg2), var(--bg1));
  overflow:hidden;
}

/* =========================
   NOISE
   ========================= */
.bgNoise{
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode:overlay;
  opacity:.35;
}

/* =========================
   SÉLECTEUR DE LANGUE (flottant, coin haut-droit)
   ========================= */
.lang-switch-floating{
  position:fixed;
  top:22px;
  right:26px;
  z-index:10;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border-radius:12px;
  background: rgba(255,255,255,.07);
  border:1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:22px;
  border-radius:6px;
  overflow:hidden;
  border:1px solid var(--border);
  opacity:.55;
  cursor:pointer;
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.lang-flag svg{ display:block; width:100%; height:100%; }
.lang-flag:hover{ opacity:.85; transform: translateY(-1px); }
.lang-flag.is-active{
  opacity:1;
  border-color: rgba(129,195,50,.55);
  box-shadow: 0 0 0 2px rgba(129,195,50,.25);
}

/* =========================
   LAYOUT
   ========================= */
.auth-wrap{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px;
}

.auth-card{
  width:min(1150px, 100%);
  min-height:580px;

  display:grid;
  grid-template-columns: 420px 1.15fr;

  border-radius:var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.05));
  border:1px solid var(--border);
  box-shadow: var(--shadow);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  overflow:visible;
  position:relative;
}

/* =========================
   COLONNE INFO
   ========================= */
.auth-info{
  padding:36px 32px;
  background: linear-gradient(
    180deg,
    rgba(129,195,50,.16),
    rgba(2,109,99,.07)
  );
  border-right:1px solid rgba(255,255,255,.12);
}

.fm-header{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:26px;
}

.fm-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(129,195,50,.18);
  border:1px solid rgba(129,195,50,.35);
  backdrop-filter: blur(10px);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.fm-header h1{
  margin:0;
  font-size:20px;
  letter-spacing:1.6px;
  font-weight:600;
  text-transform:uppercase;
}

.auth-info h2{
  margin:0 0 10px;
  font-size:22px;
  font-weight:500;
}

.fm-desc{
  font-size:15.5px;
  line-height:1.7;
  color:rgba(234,251,234,.78);
  max-width:420px;
}

/* =========================
   COLONNE FORMULAIRE
   ========================= */
.auth-main{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:36px 32px;
  margin-right:-40px;
  position:relative;
  z-index:2;
}

.form-shell{
  width:100%;
  max-width:580px;
  padding:28px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,.13),
    rgba(255,255,255,.06)
  );
  border-radius:26px;
  border:1px solid rgba(255,255,255,.18);

  box-shadow:
    0 35px 90px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.08);

  backdrop-filter: blur(18px);
}

/* Variante autonome (mot de passe oublié / réinitialisation) : pas de
   colonne "info" à côté, juste la carte formulaire centrée. */
.form-shell--standalone{
  max-width:440px;
  animation: authFadeIn .6s cubic-bezier(.2,.8,.2,1) both;
}

/* =========================
   SLIDER AMÉLIORÉ
   ========================= */
.form-viewport{
  width:100%;
  overflow:hidden;
}

.form-track{
  display:flex;
  width:200%;
  transition:
    transform .65s cubic-bezier(.25,.9,.25,1),
    filter .65s ease;
}

.panel{
  width:50%;
  flex:0 0 50%;
  padding-right:24px;
  transition:
    opacity .45s ease,
    transform .45s ease;
}

/* ÉTAT LOGIN */
.auth-card.is-login .form-track{
  transform: translateX(-50%);
}

.auth-card.is-login .panel:first-child{
  opacity:.25;
  transform: scale(.96);
}

.auth-card:not(.is-login) .panel:last-child{
  opacity:.25;
  transform: scale(.96);
}

/* =========================
   FORMULAIRES
   ========================= */
.panel h3{
  margin:0 0 8px;
  font-size:22px;
}

.subtitle{
  margin-bottom:18px;
  font-size:14px;
  color:var(--muted);
}

/* CHAMPS RÉDUITS */
.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:14px 0;
  max-width:360px;   /* 🔥 largeur réduite */
}

input{
  width:100%;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color:var(--text);
}

input:focus{
  outline:none;
  border-color: rgba(129,195,50,.6);
  box-shadow:0 0 0 4px rgba(129,195,50,.15);
}

.row{
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:22px;
  max-width:360px;
}

/* =========================
   BOUTONS
   ========================= */
.btn{
  border:none;
  cursor:pointer;
  padding:12px 18px;
  border-radius:14px;
  font-weight:600;
  color:white;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.link{
  background:none;
  border:none;
  color:rgba(234,251,234,.85);
  cursor:pointer;
  text-decoration:underline;
}

/* =========================
   ALERTES
   ========================= */
.alert{
  margin-bottom:16px;
  padding:12px 14px;
  border-radius:14px;
  background: rgba(255,77,109,.12);
}

.alert.ok{
  background: rgba(129,195,50,.16);
}

.small{
  margin-top:16px;
  font-size:12.5px;
  color:var(--muted);
}
/* =========================
   WORKFLOW - COMMENT ÇA FONCTIONNE
   ========================= */

.fm-workflow{
  margin-top:32px;
}

.fm-workflow h3{
  margin:0 0 18px;
  font-size:15px;
  font-weight:500;
  letter-spacing:.6px;
  text-transform:uppercase;
  color:rgba(234,251,234,.85);
}

.fm-workflow ol{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:16px;
}

.fm-workflow li{
  display:flex;
  gap:14px;
  align-items:flex-start;
}

/* Numéro */
.fm-workflow .step{
  min-width:26px;
  height:26px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:600;
  color:#1a1400;

  background: linear-gradient(135deg, var(--accent), var(--accent3));
  box-shadow:0 0 0 3px rgba(129,195,50,.25);
}

/* Texte */
.fm-workflow strong{
  display:block;
  font-size:14.5px;
  font-weight:500;
  color:var(--text);
}

.fm-workflow p{
  margin:4px 0 0;
  font-size:13.5px;
  line-height:1.5;
  color:rgba(234,251,234,.72);
}

/* =========================
   ANIMATION D'OUVERTURE DE PAGE
   ========================= */
@keyframes authFadeIn{
  from{ opacity:0; transform: translateY(24px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
.auth-card{
  animation: authFadeIn .6s cubic-bezier(.2,.8,.2,1) both;
}

@media (prefers-reduced-motion: reduce){
  .auth-card{ animation:none; }
}
