/*
 * Authentication Pages CSS
 * CrenoSpace - Système de gestion de réservations
 *
 * Couleurs principales:
 * - #2C73EB : Bleu principal pour les pages d'authentification (backgrounds, textes de liens)
 * - #1D4ED8 : Bleu foncé pour les boutons, navbar et footer
 */

/* ========================================
   RESET & BASE
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}



/* Force Inter partout (boutons, inputs, etc.) */
* {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}


body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 40%, #e5e7eb 100%);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.main-container {
  flex: 1;
  padding-top: 0;
}

/* Auth wrapper - Gère le layout flex responsive */
.auth-wrapper {
  display: flex;
  flex-direction: column; /* Mobile first: stack vertical */
  width: 100%;
  max-width: 100%;
}

/* Desktop: Split horizontal avec limitation largeur */
@media (min-width: 992px) {
  .auth-wrapper {
    flex-direction: row;
    max-width: 1400px; /* Limite largeur sur grands écrans */
    margin: 0 auto;
  }
}

/* ========================================
   LEFT SIDE - BRANDING
   ======================================== */
.left-side {
  flex: 1;
  background: #3b82f6; /* Bleu principal pour les pages d'auth */
  display: flex;
  flex-direction: column;
  /* align-items: center; */
  /* justify-content: center; */
  padding: 60px;
  position: relative;
  
}

.left-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.branding-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* <-- AU LIEU DE center */
  gap: 32px;
  color: white;
  padding-bottom: 0; /* (optionnel) */
  /* border: solid;  <-- supprime ce debug */
}


.brand-illustration {
  width: 100%;
  max-width: 500px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  font-size: 120px;
  margin-bottom: 30px;
}

.brand-text {
  color: white;
  margin-top: -5px;
 
}

.brand-text h2 {
  font-size: 30px !important;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.brand-text p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

/* ========================================
   RIGHT SIDE - FORM
   ======================================== */
.right-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  background: #ffffff;
  position: relative;

}


.login-container,
.signup-container,
.forgot-container,
.reset-container {
  width: 100%;
  max-width: 426px;
}

.logo-section {
  margin-bottom: 32px;
}

.logo-text {
  font-size: 13px;
  color: #8692A6;
  margin-bottom: 4px;
  font-weight: 500;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.subtitle {
  color: #8692A6;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* ========================================
   ALERTS & MESSAGES
   ======================================== */
.success-box {
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.success-box i {
  color: #059669;
  font-size: 18px;
  margin-top: 2px;
}

.success-box p {
  color: #065F46;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  flex: 1;
  line-height: 1.5;
}

.error-box {
  background: #FFF0F0;
  border: 1px solid #FFD6D6;
  border-radius: 6px;
  padding: 16px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.error-box i {
  color: #E03838;
  font-size: 18px;
  margin-top: 2px;
}

.error-box p {
  color: #E03838;
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  flex: 1;
  line-height: 1.5;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #696F79;
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 14px;
  border: 1px solid #8692A6;
  border-radius: 6px;
  font-size: 15px;
  color: #000000;
  background: #ffffff;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

input:focus {
  outline: none;
  border-color: #2C73EB; /* Bleu principal pour les focus */
  box-shadow: 0 0 0 3px rgba(44, 115, 235, 0.1);
}

input::placeholder {
  color: #A0A4A8;
}

/* Form Row (side-by-side fields) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Required field indicator */
label .required {
  color: #E03838;
}

/* Features list (signup page) */
.features-list {
  text-align: left;
  max-width: 400px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 15px;
}

.feature-item i {
  color: #ffffff;
  font-size: 18px;
  min-width: 24px;
}

/* Password strength indicator */
.password-strength {
  margin-top: 8px;
  font-size: 12px;
  color: #8692A6;
}

/* ========================================
   LINKS
   ======================================== */
.back-link {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-link a {
  color: #1D4ED8; /* Bleu principal pour les liens */
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}


.forgot-link {
  text-align: right;
  margin: -8px 0 24px 0;
}

.forgot-link a {
  color: #1D4ED8; /* Bleu principal pour les liens */
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}
.terms-text a {
color: #1D4ED8;
}
.login-link a {
  color: #1D4ED8;
}
.signup-text {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #8692A6;
}

.signup-text a,
.login-text a {
  color: #1D4ED8; /* Bleu principal pour les liens */
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}



.login-text {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #8692A6;
}

/* ========================================
   BUTTONS
   ======================================== */
button[type="submit"] {
  width: 100%;
  padding: 15px;
  background: #1D4ED8; /* Bleu foncé pour les boutons */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.2px;
}

button[type="submit"]:hover {
  /* background: #1e40af; */
    transform: translateY(-2px);

}

button[type="submit"]:active {
  transform: scale(0.98);
}

/* Loading state */
button[type="submit"].loading {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
}

button[type="submit"].loading::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ==================== FOOTER ==================== */


.footer-bottom {
    padding: 1.75rem 0;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.9rem;
        background-color:#0F172A ;

}

.footer-bottom p {
    margin: 0 0 0.75rem 0;
    color: #9CA3AF;
}

.footer-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.footer-legal a {
    color: #9CA3AF;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: #60A5FA;
}

.footer-legal-separator {
      color: #9CA3AF;
    margin: 0 0.25rem;
}

@media (max-width: 767px) {
    .footer {
        padding: 3rem 0 0;
    }

    .footer-top {
        padding-bottom: 2rem;
    }

    .footer-brand,
    .footer > .container > .row > div {
        margin-bottom: 2rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-legal-separator {
        display: none;
    }
}

/* ========================================
   RESPONSIVE - SUPPRIMÉ (anciennes règles redondantes)
   Remplacé par les media queries optimisées en bas du fichier
   ======================================== */

/* ========================================
   AUTH HEADER MODERN
   ======================================== */
.auth-header {
  background: #ffffff;
  height: 90px;
  padding: 0;
  box-shadow: 0 2px 12px rgba(29, 78, 216, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.auth-header-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-header-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.auth-header-logo img {
   display: block ;
  width: auto;
  max-height: 75px;
  object-fit: contain;
}

/* Actions (boutons) */
.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
 border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.auth-btn-primary {
  background: #ffffff;;
  color: #1D4ED8 ;
  border: 2px solid  #1D4ED8;
}

.auth-btn-primary:hover {
 text-decoration: none;
  transform: translateY(-2px);
  
  color:  #1D4ED8;
  
}

/* Bouton burger (caché par défaut) */
.auth-burger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid #1D4ED8;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  outline: none;
}

.auth-burger:focus,
.auth-burger:active {
  border-color: #1D4ED8;
  outline: none;
}

.auth-burger span {
  width: 100%;
  height: 2px;
  background: #1D4ED8;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animation burger -> X */
.auth-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.auth-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.auth-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 767px) {
  .auth-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  /* Afficher le burger sur mobile */
  .auth-burger {
    display: flex;
  }

  /* Menu caché par défaut */
  .auth-header-actions {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 20px 16px;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  /* Menu ouvert */
  .auth-header-actions.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Boutons en pleine largeur sur mobile */
  .auth-header-actions .auth-btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    font-size: 14px;
  }

 
}

/* ==================== RESPONSIVE AMÉLIORÉ - PAGES AUTH ==================== */

/* ==================== MOBILE (<= 576px) ==================== */
@media (max-width: 576px) {
  /* Container principal - Stack vertical complet */
  .main-container {
    min-height: 100vh;
    flex-direction: column;
  }

  /* Left side (branding) - Hauteur minimale réduite */
  .left-side {
    min-height: 35vh;
    padding: 2rem 1.5rem;
  }

  .brand-illustration {
    max-width: 220px;
    min-height: 140px;
  }

  .brand-icon {
    font-size: 50px;
    margin-bottom: 20px;
  }

  .brand-text h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .brand-text p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Right side (formulaire) - Padding optimisé */
  .right-side {
    padding: 2rem 1.5rem 3rem;
  }

  /* Form containers - Pleine largeur sur mobile */
  .login-container,
  .signup-container,
  .forgot-container,
  .reset-container {
    max-width: 100%;
    padding: 0;
  }

  /* Titres formulaire */
  h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  /* Form groups - Spacing réduit */
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-group label {
    font-size: 0.875rem;
    margin-bottom: 6px;
  }

  /* Inputs - Touch-friendly (iOS standards) */
  input {
    padding: 12px 14px;
    font-size: 16px; /* Évite zoom auto iOS */
    min-height: 44px; /* Apple recommandé */
    border-radius: 8px;
  }

  /* Buttons - Touch-friendly */
  button[type="submit"] {
    padding: 14px;
    font-size: 16px;
    min-height: 48px;
  }

  /* Form row (2 colonnes) → Stack vertical sur mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Links et textes */
  .back-link,
  .forgot-link,
  .signup-text,
  .login-text {
    font-size: 0.875rem;
  }

  /* Success/Error boxes */
  .success-box,
  .error-box {
    padding: 12px;
    font-size: 0.875rem;
  }

  /* Features list (signup) */
  .feature-item {
    font-size: 0.875rem;
    margin-bottom: 12px;
  }

  /* Auth header - Compact sur mobile */
  .auth-header {
    height: 70px;
    padding: 0 1rem;
  }

  
}

/* ==================== SMALL TABLET (576px - 767px) - Grands mobiles paysage / Petites tablettes ==================== */
@media (min-width: 576px) and (max-width: 767px) {
  /* Container - Toujours vertical mais plus d'espace */
  .main-container {
    flex-direction: column;
  }

  /* Left side - Hauteur réduite mais plus généreuse que mobile */
  .left-side {
    min-height: 38vh;
    padding: 2.5rem 2rem;
  }

  .brand-illustration {
    max-width: 280px;
    min-height: 180px;
  }

  .brand-icon {
    font-size: 65px;
  }

  .brand-text h2 {
    font-size: 1.65rem;
  }

  .brand-text p {
    font-size: 0.95rem;
  }

  /* Right side */
  .right-side {
    padding: 2.5rem 2rem;
  }

  /* Form containers - Largeur centrée */
  .login-container,
  .signup-container,
  .forgot-container,
  .reset-container {
    max-width: 420px;
    margin: 0 auto;
  }

  /* Titres */
  h1 {
    font-size: 1.65rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  /* Inputs */
  input {
    padding: 13px 15px;
    font-size: 15px;
    min-height: 46px;
  }

  /* Buttons */
  button[type="submit"] {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 46px;
  }

  /* Form row - On commence à passer en 2 colonnes */
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  /* Auth header */
  .auth-header {
    height: 80px;
  }

  
}

/* ==================== DESKTOP (>= 992px) ==================== */
@media (min-width: 992px) {
  /* Container principal - Split horizontal 50/50 */
  .main-container {
    flex-direction: row;
    min-height: 100vh;
  }

  /* Left side (branding) - 50% de l'écran */
  .left-side {
    flex: 1;
    min-height: 100vh;
    padding: 4rem 5rem;
    position: sticky;
    top: 0;

    display: flex;
    flex-direction: column;
    align-items: center;        /* tu peux laisser center horizontal */
    justify-content: flex-start;/* <-- AU LIEU DE center */
  }

  .brand-illustration {
    max-width: 480px;
    min-height: 300px;
  }

  .brand-icon {
    font-size: 100px;
    margin-bottom: 30px;
  }

  .brand-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .brand-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 450px;
  }

   .left-side .brand-text {
    margin-top: 20px;
  }

  /* Right side (formulaire) - 50% de l'écran */
  .right-side {
    flex: 1;
    min-height: 100vh;
    padding: 4rem 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Form containers - Largeur optimale desktop */
  .login-container,
  .signup-container,
  .forgot-container,
  .reset-container {
    max-width: 460px;
    width: 100%;
  }

  /* Titres */
  h1 {
    font-size: 1.875rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  /* Form groups */
  .form-group {
    margin-bottom: 1.75rem;
  }

  /* Inputs - Taille confortable desktop */
  input {
    padding: 14px 16px;
    font-size: 15px;
  }

  /* Buttons */
  button[type="submit"] {
    padding: 15px 24px;
    font-size: 16px;
  }

  /* Form row - 2 colonnes sur desktop */
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

/* ==================== TABLETTE (768px - 992px) - iPad Mini/Air/Pro ==================== */
@media (min-width: 768px) and (max-width: 992px) {
  /* Main container - Column layout optimisé */
  .main-container {
    min-height: 100vh;
  }

  /* Left side (branding) - Hauteur et padding optimisés */
  .left-side {
    min-height: 40vh; /* Réduit de 50vh pour moins de scroll */
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .brand-text h2 {
    font-size: 1.75rem; /* Légèrement réduit */
    margin-bottom: 1rem;
  }

  .brand-text p {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* Illustration SVG - Taille optimisée tablette */
  .brand-illustration {
    max-width: 350px; /* Entre desktop (400px) et mobile (250-300px) */
    min-height: 250px;
    margin: 0 auto;
  }

  .brand-icon {
    font-size: 70px;
  }

  /* Right side (form) - Padding et spacing optimisés */
  .right-side {
    padding: 3rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Form containers - Max-width optimale pour tablette */
  .login-container,
  .signup-container,
  .forgot-container,
  .reset-container {
    max-width: 500px; /* Augmenté de 100% pour un rendu plus centré */
    margin: 0 auto;
    padding: 2rem;
  }

  /* Form heading */
  .login-container h1,
  .signup-container h1,
  .forgot-container h1,
  .reset-container h1 {
    font-size: 1.9rem;
    margin-bottom: 0.75rem;
  }

  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  /* Form groups - Spacing optimisé */
  .form-group {
    margin-bottom: 1.5rem;
  }

  .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Inputs - Touch-friendly mais compact */
  .form-control {
    padding: 0.75rem 1rem;
    font-size: 15px;
    min-height: 48px;
  }

  /* Buttons - Spacing et taille optimisés */
  .btn-auth {
    padding: 0.75rem 1.5rem;
    font-size: 15px;
    min-height: 48px;
  }

  /* Remember me / Forgot password row */
  .form-row {
    margin-bottom: 1.5rem;
  }

  .form-check-label,
  .forgot-link {
    font-size: 0.875rem;
  }

  /* Footer links */
  .auth-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .auth-footer p {
    font-size: 0.9rem;
  }

  /* Divider */
  .divider {
    margin: 1.5rem 0;
  }

  /* OAuth buttons */
  .btn-oauth {
    padding: 0.7rem 1.25rem;
    font-size: 14px;
    min-height: 46px;
  }

  /* Password strength */
  .password-strength-text {
    font-size: 0.85rem;
  }

  /* Two-column signup form sur tablette */
  .signup-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .signup-form-row .form-group {
    margin-bottom: 1rem;
  }

  /* Full width sur colonne unique */
  .form-group.full-width {
    grid-column: 1 / -1;
  }
}

/* ==================== LARGE DESKTOP (>= 1200px) - Grands écrans ==================== */
@media (min-width: 1200px) {
  /* Left side - Plus d'espace pour l'illustration */
  .left-side {
    padding: 5rem 6rem;
  }

  .brand-illustration {
    max-width: 550px;
    min-height: 340px;
  }

  .brand-icon {
    font-size: 120px;
  }

  .brand-text h2 {
    font-size: 2.25rem;
  }

  .brand-text p {
    font-size: 1.15rem;
    max-width: 500px;
  }

  /* Right side - Plus d'espace pour le formulaire */
  .right-side {
    padding: 5rem 6rem;
  }

  /* Form containers - Largeur confortable sur grands écrans */
  .login-container,
  .signup-container,
  .forgot-container,
  .reset-container {
    max-width: 520px;
  }

  /* Titres */
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.05rem;
  }

  /* Form groups - Plus d'espacement vertical */
  .form-group {
    margin-bottom: 2rem;
  }

  /* Inputs - Padding généreux */
  input {
    padding: 16px 18px;
    font-size: 15px;
  }

  /* Buttons - Grande taille pour faciliter le clic */
  button[type="submit"] {
    padding: 16px 28px;
    font-size: 16px;
  }
}
