/* ===================================================
   AUTH PAGES — Commande+ Design System v2
   =================================================== */

:root {
  --navy: #1e2a3a;
  --rouge: #e63946;
  --blanc: #ffffff;
  --creme: #f5f3f0;
  --gris-texte: #6c757d;
  --gris-fonce: #495057;
  --bordure: #dee2e6;
  --danger: #dc3545;
  --danger-dark: #c0392b;
  --success: #198754;
  --warning: #f0ad4e;
  --warning-text: #856404;
}

* { box-sizing: border-box; }

body.auth-body {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--creme) !important;
  background-color: var(--creme) !important;
  background-image: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px;
  min-height: 100vh;
}

/* ---- Wrapper centré ---- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ---- Card centrale ---- */
.auth-card {
  background: var(--blanc);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 440px;
  padding: 40px 36px;
}

/* ---- Branding ---- */
.auth-brand {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--rouge);
  margin-bottom: 32px;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.5px;
}
.auth-brand span {
  color: var(--navy);
}

/* ---- Titre page ---- */
.auth-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 24px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--gris-texte);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ---- Champs de formulaire ---- */
.auth-form-group {
  margin-bottom: 16px;
}
.auth-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 6px;
}
.auth-form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--navy);
  background: var(--blanc);
  transition: border-color 0.15s;
}
.auth-form-group input:focus {
  outline: none;
  border-color: var(--rouge);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.08);
}
.auth-form-group input::placeholder {
  color: #adb5bd;
}

/* ---- Champ mot de passe avec icône oeil ---- */
.auth-password-wrap {
  position: relative;
}
.auth-password-wrap input {
  padding-right: 42px;
}
.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gris-texte);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}
.auth-password-toggle:hover {
  color: var(--navy);
}

/* ---- Bouton principal ---- */
.auth-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s;
  margin-top: 8px;
}
.auth-btn:hover {
  opacity: 0.9;
  color: #fff;
}

/* ---- Lien secondaire ---- */
.auth-link {
  color: var(--rouge);
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}
.auth-link:hover {
  text-decoration: underline;
  color: var(--rouge);
}

/* ---- Mot de passe oublié ---- */
.auth-forgot {
  text-align: center;
  margin-top: 16px;
}

/* ---- Séparateur "ou" ---- */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: #adb5bd;
  font-size: 13px;
}
.auth-separator::before,
.auth-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dee2e6;
}

/* ---- Lien bas (inscription / connexion) ---- */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--gris-texte);
}
.auth-footer a {
  color: var(--rouge);
  font-weight: 500;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}

/* ---- Alerte ---- */
.auth-alert {
  background: rgba(230, 57, 70, 0.08);
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

/* ---- Succès ---- */
.auth-success-icon {
  text-align: center;
  font-size: 48px;
  color: #27ae60;
  margin-bottom: 16px;
}
.auth-success-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}
.auth-success-text {
  text-align: center;
  font-size: 14px;
  color: var(--gris-texte);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ---- Retour lien ---- */
.auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
}
.auth-back a {
  color: var(--gris-texte);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.auth-back a:hover {
  color: var(--navy);
}

/* ===================================================
   LEGAL PAGES (Privacy Policy, Legal Notices, CGU)
   =================================================== */

body.legal-body {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--creme) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px;
  min-height: 100vh;
}

.legal-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.legal-card {
  background: var(--blanc);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 800px;
  padding: 48px 48px 40px;
}

.legal-card .auth-brand a {
  text-decoration: none;
  color: var(--rouge);
}
.legal-card .auth-brand a span {
  color: var(--navy);
}

.legal-card h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 13px;
  color: var(--gris-texte);
  margin-bottom: 28px;
}

.legal-card h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--creme);
}

.legal-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-card p,
.legal-card li {
  color: #333;
  line-height: 1.7;
  font-size: 14px;
}

.legal-card ul {
  padding-left: 20px;
}

.legal-card a {
  color: var(--rouge);
  text-decoration: none;
}
.legal-card a:hover {
  text-decoration: underline;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13px;
}
.legal-table th,
.legal-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  color: #333;
}
.legal-table th {
  font-weight: 600;
  color: var(--navy);
  background: var(--creme);
}
.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  text-align: center;
  font-size: 14px;
  color: var(--gris-texte);
}
.legal-footer a {
  color: var(--rouge);
  text-decoration: none;
  font-weight: 500;
}
.legal-footer a:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: 12px;
  }
  .auth-brand {
    font-size: 24px;
    margin-bottom: 24px;
  }
  .legal-card {
    padding: 28px 20px;
  }
}
