:root {
  /* Variables globales de couleurs, rayons et ombres */
  --bg: #070b09;
  --ink: #e8fff5;
  --muted: #9bb3a8;
  --line: #1c3128;
  --surface: #0d1512;
  --night: #050806;
  --mint: #20c687;
  --sky: #179c6f;
  --amber: #6bd18f;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.34);
  --ring: rgba(32, 198, 135, 0.2);
}

* {
  /* Reset de base pour harmoniser les espacements */
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Style global du site */
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(45rem 28rem at 8% 8%, #10392a 0%, transparent 70%),
    radial-gradient(34rem 24rem at 92% 10%, #1b4a37 0%, transparent 74%),
    linear-gradient(170deg, #060a08 0%, #08100d 48%, #070c0a 100%);
  line-height: 1.55;
}

.container {
  /* Conteneur principal pour limiter la largeur du contenu */
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.topbar {
  /* Barre supérieure du site */
  padding: 22px 0;
}

.topbar .container {
  /* Aligne le logo et la navigation dans la topbar */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  /* Style du nom/logo textuel */
  text-decoration: none;
  color: #dbffef;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav {
  /* Groupe de liens de navigation */
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.95rem;
}

.nav a {
  /* Apparence des liens de navigation */
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.nav a:hover {
  /* Effet au survol des liens du menu */
  color: var(--ink);
}

.btn {
  /* Base commune pour tous les boutons/liens boutons */
  display: inline-block;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-main {
  /* Bouton principal de mise en avant */
  color: #fff;
  background: linear-gradient(130deg, var(--mint) 0%, #159166 54%, #0f7250 100%);
  box-shadow: 0 14px 28px rgba(10, 102, 68, 0.36);
}

.btn-main:hover {
  /* Léger mouvement au survol du bouton principal */
  transform: translateY(-1px);
}

.btn-ghost {
  /* Bouton secondaire avec style discret */
  color: #ccf6e3;
  border: 1px solid var(--line);
  background: rgba(14, 24, 20, 0.85);
}

.btn-ghost:hover {
  /* Variation au survol du bouton secondaire */
  background: #172821;
}

.hero {
  /* Section d'introduction principale */
  padding: 30px 0 46px;
}

.hero-shell {
  /* Carte visuelle qui contient le contenu du hero */
  background: radial-gradient(95rem 32rem at 50% -5%, #163f31 0%, #0f241d 38%, #0b1612 100%);
  border: 1px solid #224135;
  border-radius: 34px;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-shell::after {
  /* Halo décoratif en arrière-plan du hero */
  content: "";
  position: absolute;
  right: -8rem;
  top: -8rem;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 198, 135, 0.35) 0%, rgba(32, 198, 135, 0) 70%);
  pointer-events: none;
}

.hero-kicker {
  /* Petit badge introductif au-dessus du titre */
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid #2f5f4b;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8aefbf;
  background: rgba(16, 31, 25, 0.72);
}

h1 {
  /* Titre principal de page */
  font-size: clamp(2rem, 6.5vw, 4.1rem);
  line-height: 1.02;
  max-width: 14ch;
  margin-bottom: 12px;
}

.lead {
  /* Texte d'accroche sous le titre principal */
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.07rem;
  margin-bottom: 18px;
}

.hero-actions {
  /* Zone des boutons d'action du hero */
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.section {
  /* Espacement vertical des sections de contenu */
  padding: 0 0 56px;
}

.section h3 {
  /* Titre de section */
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.feature-grid {
  /* Grille des cartes de fonctionnalites */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.feature {
  /* Carte individuelle de fonctionnalite */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.feature h4 {
  /* Titre d'une carte de fonctionnalite */
  font-size: 1rem;
  margin-bottom: 6px;
}

.feature p {
  /* Description d'une carte de fonctionnalite */
  color: var(--muted);
  font-size: 0.9rem;
}

.footer {
  /* Pied de page */
  border-top: 1px solid var(--line);
  padding: 22px 0 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

body.auth-page {
  /* Variante du body pour centrer les pages d'authentification */
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  /* Carte principale des formulaires de connexion/inscription */
  --pad-x: 28px;
  --pad-y: 34px;
  position: relative;
  width: min(100%, 500px);
  background: radial-gradient(95rem 32rem at 50% -5%, #163f31 0%, #0f241d 38%, #0b1612 100%);
  border: 1px solid #224135;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--pad-y) var(--pad-x) 30px;
}

.auth-card .brand {
  /* Version compacte du logo dans la carte d'authentification */
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8aefbf;
  font-weight: 700;
  margin-bottom: 10px;
}

.auth-card h1 {
  /* Titre principal de la carte d'authentification */
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
  max-width: none;
  margin-bottom: 8px;
}

.subtitle {
  /* Sous-titre explicatif du formulaire */
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 22px;
}

form {
  /* Structure verticale du formulaire */
  display: grid;
  gap: 14px;
}

.grid-two {
  /* Mise en page sur deux colonnes pour les champs */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  /* Libelles des champs */
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

input {
  /* Champs de saisie */
  width: 100%;
  border: 1px solid var(--line);
  background: #0a120f;
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder {
  /* Style du texte indicatif dans les champs */
  color: #769486;
}

input:focus {
  /* Mise en avant du champ actif */
  border-color: var(--mint);
  box-shadow: 0 0 0 4px var(--ring);
}

.help {
  /* Petit texte d'aide sous un champ */
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: -4px;
}

.terms {
  /* Bloc des conditions d'utilisation avec case a cocher */
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.terms input {
  /* Taille et alignement de la checkbox des conditions */
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--mint);
  flex-shrink: 0;
}

.terms a,
.signin-link a {
  /* Liens secondaires dans les textes d'aide/auth */
  color: #8aefbf;
  font-weight: 600;
  text-decoration: none;
}

.terms a:hover,
.signin-link a:hover {
  /* Soulignement au survol des liens secondaires */
  text-decoration: underline;
}

button {
  /* Style par defaut des boutons de formulaire */
  margin-top: 2px;
  border: 0;
  border-radius: 8px;
  padding: 13px 15px;
  background: linear-gradient(130deg, var(--mint) 0%, #159166 54%, #0f7250 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 28px rgba(10, 102, 68, 0.36);
}

button:hover {
  /* Animation au survol des boutons */
  transform: translateY(-1px);
}

button:active {
  /* Retour a la position normale au clic */
  transform: translateY(0);
}

.auth-provider-btn {
  /* Bouton de connexion via un fournisseur externe */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  margin-top: 6px;
  border: 1px solid #2b5646;
  border-radius: 999px;
  background: black;
  box-shadow: none;
  color: #bdeed8;
}

.auth-provider-btn img {
  /* Logo du fournisseur dans le bouton social */
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.auth-provider-btn strong {
  /* Texte mis en avant dans le bouton fournisseur */
  color: aqua;
}

.signin-link {
  /* Lien vers la page de connexion/inscription alternative */
  margin-top: 14px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  /* Ajustements tablette pour la grille de fonctionnalites */
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  /* Ajustements mobile pour navigation, hero et grille */
  .nav a:not(.btn) {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 12px;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  /* Ajustements mobile compact pour la carte auth et les champs */
  .auth-card {
    --pad-x: 20px;
    --pad-y: 26px;
    padding: var(--pad-y) var(--pad-x) 22px;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }
}
