/* =========================================
   PAGE LOGIN - STYLE "LUXE SOMBRE"
   ========================================= */

:root {
  --bg-main: #050505;
  --bg-secondary: #0f0f0f;
  --accent-gold: #d4af37;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;
}

body {
  background-color: var(--bg-main);
  background-image: radial-gradient(
    circle at 50% 0%,
    #1a1500 0%,
    var(--bg-main) 60%
  );
  color: var(--text-primary);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* On force le main à prendre toute la hauteur */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center; /* Centre verticalement */
  justify-content: center; /* Centre horizontalement */
  padding-top: 100px; /* Espace pour le header */
  padding-bottom: 2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}

.auth-wrapper {
  width: 100%;
  max-width: 400px; /* Carte fine pour l'élégance */
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent-gold); /* Ligne Or distinctive */
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.5s ease-out;
}

/* En-tête de carte */
.auth-header {
  margin-bottom: 2rem;
}

.auth-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-gold);
}

.auth-header h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
}

/* Formulaire */
.input-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.input-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  padding: 12px 15px;
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}

/* Options (Checkbox + Lien oubli) */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-container input {
  accent-color: var(--accent-gold);
}

.forgot-pass {
  color: var(--accent-gold);
  text-decoration: none;
  transition: 0.2s;
  font-size: 0.8rem;
  border-bottom: 1px dotted transparent;
}

.forgot-pass:hover {
  border-bottom-color: var(--accent-gold);
}

/* Bouton Pleine Largeur */
.btn-primary.full-width {
  width: 100%;
  display: block;
  padding: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--accent-gold);
  color: #050505; /* Texte noir sur or */
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary.full-width:hover {
  background: transparent;
  color: var(--accent-gold);
}

/* Bas de carte */
.auth-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent-gold);
}

/* Utilitaires */
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 500px) {
  .auth-card {
    padding: 1.5rem;
  }
}

/* FOOTER GLOBAL (Hérité) */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 2rem;
  background: var(--bg-main);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-nav-group {
  display: flex;
  gap: 4rem;
}

.footer-col h5 {
  color: var(--accent-gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.2rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

.footer-copy {
  width: 100%;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  margin-top: 1rem;
  color: #444;
  font-size: 0.8rem;
  text-align: center;
}
/* --- Style pour l'icône Mot de passe (L'œil) --- */
.password-container {
  position: relative;
  width: 100%;
}

.password-container input {
  width: 100%;
  padding-right: 40px; /* Espace pour l'icône pour ne pas écrire dessus */
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
  font-size: 0.9rem;
  transition: color 0.3s;
  z-index: 10;
}

.toggle-password:hover {
  color: var(--accent-gold, #d4af37); /* Utilise ta couleur dorée */
}
/* --- STYLE UPLOAD AVATAR PERSONNALISÉ --- */

/* On cache le vrai input moche */
.input-file-hidden {
  display: none;
}

/* Le conteneur du bouton stylisé */
.file-upload-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Le bouton stylisé */
.btn-upload-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-upload-custom:hover {
  background: rgba(212, 175, 55, 0.05); /* Légère teinte dorée */
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-upload-custom i {
  font-size: 1.1rem;
}

/* Prévisualisation de l'avatar */
.avatar-preview-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  overflow: hidden;
  display: none; /* Caché par défaut */
  background: #000;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  margin-top: 10px;
}

.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* --- MODALE DE RECADRAGE (CROPPER) --- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Fond très sombre */
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.crop-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--accent-gold);
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.crop-modal-content h3 {
  margin: 0;
  color: var(--accent-gold);
  font-family: var(--font-heading);
  text-align: center;
}

.crop-container-wrapper {
  height: 400px; /* Hauteur fixe pour la zone de travail */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

/* Important pour CropperJS : l'image doit être max-width 100% */
#image-to-crop {
  display: block;
  max-width: 100%;
}

.crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Override pour le bouton primaire dans la modale */
.crop-modal-content .btn-primary {
  padding: 8px 20px;
  border-radius: 4px;
  background: var(--accent-gold);
  color: #000;
  border: none;
  font-weight: bold;
  cursor: pointer;
}
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav-group {
    justify-content: center;
    width: 100%;
    gap: 2rem;
  }
}
