:root{
  /* Couleurs (uniformisées avec le thème global)
     - Les variables --primary / --primary-dark sont injectées via PHP (login/forgot/reset)
     - Fallbacks: valeurs ci-dessous
  */
  --primary: #C8102E;
  --primary-dark: #A50E26;

  /* RGB helpers (override via Paramètres -> Couleurs) */
  --app-primary-rgb: 200,16,46;
  --app-primary-dark-rgb: 165,14,38;

  /* Legacy names (conservées pour compatibilité) */
  --alsace-red: var(--primary);
  --alsace-red-2: var(--primary-dark);
  --alsace-cream:#f7f1e8;

  --auth-bg:var(--alsace-cream);
  --auth-card:#ffffff;
  --auth-muted:#6b7280;
  --auth-input:#f1f2f4;
  --auth-radius:28px;
  --auth-shadow:0 20px 60px rgba(15, 23, 42, .18);
  --auth-grad:linear-gradient(135deg, var(--alsace-red) 0%, var(--alsace-red-2) 100%);
}

body.auth-page{
  min-height:100vh;
  background: radial-gradient(1200px 700px at 50% -10%, rgba(var(--app-primary-rgb), .10), transparent 60%),
              radial-gradient(900px 600px at 100% 0%, rgba(var(--app-primary-dark-rgb), .10), transparent 55%),
              var(--auth-bg);
}

.auth-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.auth-card{
  position:relative;
  width:min(420px, 100%);
  background:var(--auth-card);
  border-radius:var(--auth-radius);
  box-shadow:var(--auth-shadow);
  padding:34px 26px 30px;
  overflow:hidden;
}

.auth-blob{
  position:absolute;
  background:var(--auth-grad);
  filter:saturate(1.05);
  opacity:.22;
  z-index:0;
}

.auth-blob.one{
  top:-70px;
  left:50%;
  transform:translateX(-50%) rotate(-10deg);
  width:320px;
  height:210px;
  border-radius:110px;
}

.auth-blob.two{
  top:-55px;
  right:-95px;
  width:190px;
  height:150px;
  border-radius:90px;
  transform:rotate(25deg);
  opacity:.18;
}

.auth-blob.three{
  bottom:-70px;
  left:-95px;
  width:210px;
  height:170px;
  border-radius:95px;
  transform:rotate(-18deg);
  opacity:.18;
}

.auth-content{
  position:relative;
  z-index:1;
}

/* Logo rond type avatar */
.auth-logo-ring{
  width:84px;
  height:84px;
  border-radius:999px;
  background:#fff;
  border:3px solid rgba(var(--app-primary-rgb), .18);
  box-shadow:0 14px 28px rgba(15, 23, 42, .12);
  display:grid;
  place-items:center;
  margin:0 auto 12px;
}

.auth-logo-img{
  width:54px;
  height:54px;
  object-fit:contain;
}

.auth-brand{
  font-weight:800;
  letter-spacing:.2px;
  color:#111827;
  margin:0;
  text-align:center;
  font-size:18px;
}

.auth-title{
  font-size:30px;
  line-height:1.15;
  font-weight:800;
  color:var(--alsace-red);
  margin:10px 0 8px 0;
  text-align:center;
}

.auth-subtitle{
  color:var(--auth-muted);
  font-size:13px;
  text-align:center;
  margin:0 0 16px 0;
}

.auth-input{
  background:var(--auth-input);
  border:1px solid rgba(17,24,39,.08);
  border-radius:12px;
  padding:12px 14px;
}

.auth-input:focus{
  background:#ffffff;
  border-color:rgba(var(--app-primary-rgb), .35);
  box-shadow:0 0 0 .2rem rgba(var(--app-primary-rgb), .14);
}

.auth-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.auth-link{
  color:rgba(17,24,39,.72);
  text-decoration:none;
  font-size:13px;
}

.auth-link:hover{ text-decoration:underline; }

.auth-btn{
  border:none;
  border-radius:14px;
  padding:12px 16px;
  font-weight:800;
  color:#ffffff;
  background:var(--auth-grad);
  box-shadow:0 10px 26px rgba(var(--app-primary-rgb), .22);
}

.auth-btn:hover{ filter:brightness(.98); }

.auth-muted{
  color:var(--auth-muted);
  font-size:13px;
  text-align:center;
}

@media (max-width:380px){
  .auth-card{padding:28px 18px 24px;}
  .auth-title{font-size:26px;}
  .auth-logo-ring{width:76px;height:76px;}
  .auth-logo-img{width:48px;height:48px;}
}

/* Loader overlay (login) */
.auth-loader{
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(10, 14, 25, .55);
  backdrop-filter: blur(6px);
}

.auth-loader-card{
  width:min(360px, 92vw);
  background:rgba(255,255,255,.96);
  border-radius:22px;
  box-shadow:0 20px 60px rgba(15, 23, 42, .35);
  padding:18px 18px 14px;
  text-align:center;
}

.auth-loader-title{
  font-weight:800;
  margin-top:6px;
  color:#111827;
}

.auth-loader-sub{
  font-size:13px;
  color:#6b7280;
}

#authLoginLottie{
  width:160px;
  height:160px;
  margin:0 auto;
}

.auth-btn[disabled]{
  opacity:.7;
  cursor:not-allowed;
}
