/* ===== MODAL AUTH ===== */
#auth-modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 10000;
  align-items: center; justify-content: center;
}
#auth-modal.ouvert { display: flex; }

#auth-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}

#auth-box {
  position: relative; z-index: 1;
  background: #0f1f35;
  border: 1px solid #1e3a5f;
  border-radius: 22px;
  padding: 28px 28px 24px;
  width: 380px; max-width: calc(100vw - 32px);
  animation: authPop 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes authPop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

#auth-fermer {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: #64748b; font-size: 18px;
  cursor: pointer; line-height: 1;
  transition: color 0.15s;
}
#auth-fermer:hover { color: #e2e8f0; }

#auth-logo {
  font-size: 20px; font-weight: 800;
  color: #f59e0b; text-align: center;
  margin-bottom: 20px;
}

#auth-tabs {
  display: flex; gap: 0;
  background: #162840;
  border-radius: 10px; padding: 3px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 8px;
  background: none; border: none;
  border-radius: 8px;
  color: #64748b; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.actif {
  background: #0f1f35;
  color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== CHAMPS ===== */
.auth-field {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
}
.auth-field label {
  font-size: 12px; font-weight: 600;
  color: #64748b; text-transform: uppercase; letter-spacing: 0.4px;
  display: flex; align-items: center; gap: 8px;
}
.auth-hint {
  font-weight: 400; text-transform: none;
  letter-spacing: 0; color: #334155;
}
.auth-field input {
  background: #162840;
  border: 2px solid #1e3a5f;
  border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; color: #e2e8f0;
  outline: none; transition: border-color 0.2s;
  width: 100%;
}
.auth-field input:focus { border-color: #f59e0b; }

/* ===== COULEUR SWATCHES ===== */
.couleurs-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 4px 0;
}
.couleur-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.couleur-swatch:hover  { transform: scale(1.1); }
.couleur-swatch.actif  { border-color: white; transform: scale(1.18); }

/* ===== ERREUR / FEEDBACK ===== */
.auth-erreur {
  font-size: 12px; font-weight: 600;
  color: #fca5a5; background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 12px;
}
.auth-succes {
  font-size: 12px; font-weight: 600;
  color: #86efac; background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 12px;
}
.cache { display: none !important; }

/* ===== BOUTONS PARTAGÉS ===== */
.auth-submit {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a0800; border: none;
  padding: 12px; border-radius: 10px;
  font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 4px;
}
.auth-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-deconnexion {
  width: 100%; margin-top: 10px;
  background: none;
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5; border-radius: 10px;
  padding: 10px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-deconnexion:hover {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.6);
}

.btn-auth-secondaire {
  width: 100%; margin-top: 8px;
  background: #162840;
  border: 1px solid #1e3a5f;
  color: #94a3b8; border-radius: 10px;
  padding: 10px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-auth-secondaire:hover { border-color: #2d5a8f; color: #e2e8f0; }

/* ===== NON CONNECTÉ (panel profil) ===== */
.profil-non-connecte {
  padding: 32px 20px;
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  text-align: center;
}
.profil-non-connecte p {
  color: #64748b; font-size: 14px; line-height: 1.5;
}
.profil-non-connecte .auth-submit { max-width: 240px; }
.profil-non-connecte .btn-auth-secondaire { max-width: 240px; }
