/* Page de connexion - Charte Graphique Bohème Chic */
/* Import des polices depuis styles.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&family=Dancing+Script:wght@400;700&display=swap');

/* Variables héritées de la charte */
:root {
  --primary: #A3B18A;           /* Vert sauge - spécifique à la page de login */
  --secondary: #3D6A93;         /* Bleu sérénité */
  --highlight: #D4AF7F;         /* Or champagne */
  --background: #F8F5F2;        /* Ivoire */
  --surface: #E5DCC3;           /* Beige lin */
  --accent: #EFD6D2;            /* Rose poudré */
  --text-main: #6C584C;         /* Taupe clair */
  --text-light: #8D7B68;        /* Texte secondaire */
  --text-white: #FFFFFF;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  --font-script: 'Dancing Script', cursive;
  --transition-normal: 0.3s ease;
  --border-radius: 6px;
  --border-radius-lg: 12px;
  --shadow-soft: 0 2px 8px rgba(108, 88, 76, 0.1);
  --shadow-medium: 0 4px 16px rgba(108, 88, 76, 0.15);
  --shadow-strong: 0 8px 24px rgba(108, 88, 76, 0.2);
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--text-white);
}

body {
  /* Image de fond du château avec superposition douce */
  background-image: url('../chateau-mariage-new.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  background-color: var(--primary);
}

/* Superposition douce pour améliorer la lisibilité */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(248, 245, 242, 0.85);
  z-index: 0;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: var(--spacing-lg);
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-xxl);
  text-align: center;
}

.logo {
  width: 80px;
  height: 80px;
  background-color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  color: var(--text-white);
  box-shadow: var(--shadow-strong);
  margin-bottom: var(--spacing-lg);
  border: 3px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.title {
  font-family: var(--font-heading);
  color: var(--text-white);
  text-align: center;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--spacing-md);
}

.subtitle {
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-white);
  opacity: 0.9;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* Container de connexion élégant */
.login-container {
  max-width: 400px;
  width: 100%;
}

.login-box {
  background-color: var(--background);
  padding: var(--spacing-xxl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-strong);
  width: 100%;
  border: 1px solid rgba(61, 106, 147, 0.3);
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  color: var(--text-main);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.form-group input {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 2px solid rgba(61, 106, 147, 0.3);
  border-radius: var(--border-radius);
  background-color: var(--background);
  font-size: 16px;
  color: var(--text-main);
  transition: all var(--transition-normal);
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61, 106, 147, 0.1);
  background-color: var(--text-white);
}

.form-group input::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.login-button {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--primary);
  color: var(--text-white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-body);
  letter-spacing: 0.5px;
}

.login-button:hover {
  background-color: var(--highlight);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.login-button:active {
  transform: translateY(0);
}

.divider {
  text-align: center;
  margin: var(--spacing-xl) 0;
  color: var(--text-light);
  position: relative;
  font-style: italic;
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: var(--primary);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.invite-code-button {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: var(--font-body);
  letter-spacing: 0.3px;
}

.invite-code-button:hover {
  background-color: var(--primary);
  color: var(--text-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.invite-code-button:active {
  transform: translateY(0);
}

/* Élément décoratif floral */
.decorative-line {
  width: 60px;
  height: 2px;
  background-color: var(--primary);
  margin: var(--spacing-md) auto;
  border-radius: 1px;
}

.footer {
  width: 100%;
  padding: var(--spacing-lg) 0;
  text-align: center;
  color: var(--text-white);
  font-size: 0.9rem;
  font-weight: 300;
  position: absolute;
  bottom: var(--spacing-lg);
  left: 0;
  right: 0;
  opacity: 0.8;
  font-style: italic;
}

.footer .date {
  font-family: var(--font-script);
  font-size: 1.1rem;
  margin-top: var(--spacing-sm);
  color: var(--highlight);
}

/* Messages d'erreur et de succès */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-lg);
  font-size: 0.9rem;
  border: none;
}

.alert-success {
  background-color: rgba(122, 161, 124, 0.2);
  color: #2d5a2f;
  border-left: 4px solid #7AA17C;
}

.alert-danger {
  background-color: rgba(215, 122, 97, 0.2);
  color: #8b3a28;
  border-left: 4px solid #D77A61;
}

.alert-info {
  background-color: rgba(144, 175, 197, 0.2);
  color: #3a5d6b;
  border-left: 4px solid #90AFC5;
}

/* Animations douces */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Pour les appareils mobiles */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }
  
  .title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  .subtitle {
    font-size: clamp(1rem, 4vw, 1.4rem);
  }
  
  .login-container {
    max-width: 340px;
  }
  
  .login-box {
    padding: var(--spacing-lg);
  }
  
  .logo {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .header {
    margin-bottom: var(--spacing-lg);
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: var(--spacing-md);
  }
  
  .form-group input,
  .login-button,
  .invite-code-button {
    padding: 14px var(--spacing-md);
  }
}

/* Focus visible pour l'accessibilité */
.login-button:focus-visible,
.invite-code-button:focus-visible,
.form-group input:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* États de chargement */
.login-button:disabled,
.invite-code-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-button:disabled:hover,
.invite-code-button:disabled:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
}

/* Amélioration pour les écrans à haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body {
    background-image: 
      linear-gradient(135deg, 
        rgba(61, 106, 147, 0.3) 0%, 
        rgba(221, 184, 146, 0.2) 50%,
        rgba(212, 175, 127, 0.3) 100%),
      url('../images/chateau-mariage-reel.png');
  }
}
