/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  min-height: 100vh;
  color: #0f172a;
  background: #f8fafc;
}

/* LAYOUT GLOBAL */
.hero {
  display: flex;
  min-height: 100vh;
  align-items: stretch; /* Left reste aligné même si right s'élargit */
}

/* COLONNE GAUCHE */
.hero-left {
  width: 50%;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* HEADER */
.header {
  position: relative;
  background: linear-gradient(135deg, #2563eb, #0aa6b1);
  color: white;
  padding: 20px 35px 80px 35px;
  overflow: hidden;
}

/* HEADER CONTENT */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* LOGO */
.logo img {
  height: 80px;
  position: relative;
  z-index: 2;
}

/* NAV ICONS */
.nav-icons a {
  color: white;
  margin-left: 20px;
  font-size: 18px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

/* VAGUE */
.header-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 120px;
}

/* COURBES DECORATIVES */
.header::after {
  content: "";
  position: absolute;
  left: -20%;
  bottom: -40px;
  width: 140%;
  height: 90px;
  background: white;
  border-radius: 100%;
}

.header::before {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -25px;
  width: 120%;
  height: 70px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 100%;
}

/* CONTENU GAUCHE */
.left-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* avant: center */
  align-items: center;
  gap: 50px;
  padding: 40px;
  text-align: center;
  z-index: 2; 
}

/* Texte Bienvenue */
.left-content h1 {
    font-size: 64px; /* un peu plus grand */
    font-weight: 700;
    background: linear-gradient(135deg, #05ada5, #0dbeeb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Chiffres stats – rester blanc */
.stats h1 {
  font-size: 35px;
  font-weight: 700;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827; /* noir doux */
  line-height: 1;
}
.left-content h2 {
  font-size: 28px;
  font-weight: 500;
  margin-top: 10px;
}

.left-content p {
  font-size: 18px; /* légèrement plus grand */
  color: #334155;
}

/* STATS CONTAINER */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  max-width: 520px;
  margin: 0 auto;
}

.stats-box {
  position: relative;

  height: 125px;
  padding: 14px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-radius: 16px;

  background: transparent;
}
.stats-box::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;

  height: 4px;
  border-radius: 10px;

  background: linear-gradient(
    90deg,
    #0bbac7,
    #179deb,
    #2563eb
  );

  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}
.hero-image {
  position: relative;
  width: 100px;   
  height: 100px;
  object-fit: contain;
  opacity: 1;
  z-index: 2;
}

.stats {
  text-align: right;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.stats-box:hover {
  transform: translateY(-3px);
  transition: 0.25s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}
.stats h1 {
  font-size: 35px;
  font-weight: 700;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;

  color: #222222; /* noir doux */
  line-height: 1;
}

.stats p {
  font-size: 13px;
  color: #6b7280; /* gris propre */
  margin-top: 4px;
}

.hero-bg-image {
  position: absolute;
  bottom: 0;          /* reste collée en bas si tu veux */
  left: 50%;           /* centre horizontalement */
  transform: translateX(-50%); /* ajuste le centre */
  width: 150px;       /* largeur souhaitée */
  height: auto;       /* garde les proportions */
  z-index: 1;        /* derrière le contenu */
  pointer-events: none; /* ne bloque pas les clics */
}
/* COLONNE DROITE */
.hero-right {
  width: 50%;
  background: url("../Image/chimie.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* FORMULAIRES */
.form-container {
  width: 450px; /* plus large */
  max-width: 90%;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.form-container h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 22px;
  font-weight: 600;
  color: #2563eb;
  line-height: 1.3;
}
.form-container label {
  display: block;
  margin-bottom: 6px;  /* espace entre label et input */
  font-weight: 500;
  font-size: 14px;
}

.form-container p {
  margin-bottom: 12px;  /* espace entre paragraphes et inputs */
  line-height: 1.6;     /* interligne amélioré pour lisibilité */
}
/* INPUTS ET SELECTS */
.form-container input,
.form-container select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  margin-bottom: 15px; /* AJOUTÉ : espace entre les champs */
  line-height: 1.5;    /* AJOUTÉ : espace interne lisible */
}


.form-container input:focus,
.form-container select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* BOUTONS PRINCIPAUX CONNEXION / CREER COMPTE */
.form-container button {
  margin-top: 15px; /* Ajouté */
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, rgb(15, 175, 238), rgba(224, 14, 231, 0.15));
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.form-container button:hover {
  background: linear-gradient(135deg, rgba(15, 149, 238, 0.25), rgba(14, 188, 231, 0.15));
  transform: scale(1.02);
}

/* BOUTONS TEXTE POUR SWITCH CONNEXION / INSCRIPTION */
.switch-link button {
  all: unset;
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  font-size: 14px;
}

/* CHECKBOX */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.checkbox-group a {
  color: #2563eb;
  text-decoration: none;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

/* PHONE INPUT */
.phone-input {
  display: flex;
  gap: 10px;
}

.phone-input select {
  width: 40%;
}

/* HIDDEN */
.hidden {
  display: none;
}

/* MESSAGE */
#message {
  margin-top: 10px;
  text-align: center;
  color: #dc2626;
  font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  /* Hero devient colonne */
  .hero {
      flex-direction: column;
      align-items: center;
  }

  /* Colonne gauche */
  .hero-left {
      order: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
  }

  /* Header full width */
  .hero-left .header {
      width: 100%;          
      min-width: 0;         
  }

  /* Contenu left */
  .left-content {
      width: 100%;                   /* couvre 90% de la colonne */
      max-width: 600px;             /* limite largeur max */
      margin: 0 auto;               /* centre horizontalement */
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;  /* reste en haut */
      align-items: center;          /* centre horizontalement */
      gap: 40px;
      padding: 20px 0;
  }

  /* Stats box */
  .stats-container {
      flex-direction: column;
      gap: 20px;
      width: 96%;
      align-items: center;
  }

  .stats-box {
      width: 100%;
      max-width: 300px;
  }

  .hero-image {
      width: 80px;
      left: -5px;
      bottom: 0;
  }

  /* Colonne droite */
  .hero-right {
      order: 2;
      width: 100%;
      padding: 60px 20px;
      display: flex;
      justify-content: center;
      align-items: center;
  }

  /* Formulaire */
  .form-container {
      width: 100%;
      max-width: 420px;
      margin: 0 auto;
  }
  .hero-bg-image {
    opacity: 0;
  }
}
/* =========================
   BOUTON SCROLL MOBILE
========================= */

.scroll-down-btn {
  display: none;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  color: #2563eb;
  font-size: 20px;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: 0.25s ease;
  padding-bottom: 11px;
}

.scroll-down-btn:hover {
  transform: translateX(-50%) translateY(4px);
}
.scroll-down-btn {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}
.scroll-down-btn {
  animation: floatArrow 2s ease-in-out infinite;
}

@keyframes floatArrow {
  0% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(6px);
  }

  100% {
    transform: translateX(-50%) translateY(0);
  }
}
/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {

  /* Chaque partie = écran complet */
  .hero-left,
  .hero-right {
    min-height: 100vh;
  }

  /* Affiche bouton scroll */
  .scroll-down-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hero right centré */
  .hero-right {
    padding: 40px 20px;
  }
}
/* =========================
   MESSAGE ERREUR LOGIN
========================= */

.login-error-message {

  display: none;

  margin-top: -6px;
  margin-bottom: 12px;

  padding: 10px 14px;

  border-radius: 10px;

  background: rgba(220, 38, 38, 0.08);

  border: 1px solid rgba(220, 38, 38, 0.15);

  color: #dc2626;

  font-size: 13px;

  font-weight: 500;

  animation: fadeError 0.25s ease;
}

/* ACTIF */
.login-error-message.active {
  display: flex;
  align-items: center;
}

/* ANIMATION */
@keyframes fadeError {

  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}