/* Variables CSS pour les couleurs */
:root {
  --color-primary: #093f30; /* Vert foncé principal */
  --color-primary-light: #2e7d32; /* Vert plus clair pour l'accentuation */
  --color-neutral: #fdfdfd; /* Blanc cassé pour le fond */
  --color-text-dark: #333333;
  --color-text-soft: #464646; /* Texte doux pour les labels */
  --color-border-subtle: #e0e0e0; /* Bordure très légère */
  --color-border-active: #b2dfdb; /* Bordure active (vert/cyan très clair) */
  --color-error: #d32f2f;
  --color-success: #388e3c;
  --font-family: "Poppins", sans-serif; /* Utilisé dans Notion */
  --radius-default: 12px;
  --radius-inputs: 10px;
}

/* Général et Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: var(--color-neutral);
  color: var(--color-text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 20px;
}

/* Conteneur principal */
.container {
  background-color: var(--color-neutral);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(9, 63, 48, 0.1); /* Ombre plus verte et plus impactante */
  width: 100%;
  max-width: 550px; /* Légèrement plus large pour l'impact */
  padding: 40px;
  border: 1px solid var(--color-border-subtle);
  transition: all 0.4s ease-in-out;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 35px;
  border-bottom: 2px solid var(--color-border-subtle);
  padding-bottom: 55px;
}

header h1 {
  color: var(--color-primary);
  font-size: 2em;
  margin-bottom: 16px;
  font-weight: 900;
}

header p {
  color: var(--color-text-soft);
  font-size: 1em;
}

/* Form Card et Groupes */
.form-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group label {
  font-weight: 600; /* Moins gras que le 'bold' */
  margin-bottom: 6px;
  color: var(--color-text-soft); /* Texte doux pour le label */
  font-size: 0.95em;
  display: block; /* S'assure que le label prend toute la ligne */
}

/* Style Notion pour les Inputs et Select */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
  padding: 10px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-inputs);
  font-size: 1em;
  width: 100%;
  background-color: white;
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Effet au focus (style vert plus impactant) */
input:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), 0 0 0 4px rgba(9, 63, 48, 0.15); /* Double shadow: 1px vert + halo vert clair */
  outline: none;
}

input::placeholder {
  color: #aaa;
}

select:required:invalid {
  color: #414141; /* Couleur de texte plus claire pour les placeholders/options par défaut */
}

/* Separateur */
.separator {
  border: none;
  border-top: 1px dashed var(--color-border-subtle);
  margin: 20px 0;
}

/* RGPD et Anti-bot Groupes */
.rgpd-group,
.anti-bot-group {
  display: block;
  margin-top: 10px;
  font-size: 0.9em;
  color: var(--color-text-soft);
}

.rgpd-group label,
.anti-bot-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

.rgpd-group input[type="checkbox"],
.anti-bot-group input[type="checkbox"] {
  margin-right: 10px;
  width: auto;
  transform: scale(1.1); /* Checkbox légèrement plus visible */
  accent-color: var(
    --color-primary
  ); /* Change la couleur de la coche en primaire */
}

/* Anti-bot Loader */
#human-loader {
  margin-left: 10px;
  color: var(--color-primary-light);
  font-size: 1.2em;
}

.hidden {
  display: none !important;
}

/* Bouton S'inscrire (Plus Impactant) */
button {
  background-color: var(--color-primary);
  color: var(--color-neutral);
  padding: 15px 25px;
  border: none;
  border-radius: var(--radius-default);
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  margin-top: 25px;
  transition: background-color 0.3s, opacity 0.3s, transform 0.1s;
  box-shadow: 0 4px 15px rgba(9, 63, 48, 0.3); /* Ombre forte */
}

button:hover:not([disabled]) {
  background-color: var(
    --color-primary-light
  ); /* Utilise le vert clair au survol */
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(9, 63, 48, 0.4);
}

button[disabled] {
  background-color: #b0b0b0;
  cursor: not-allowed;
  opacity: 0.8;
  box-shadow: none;
}

/* Cadre de Statut */
.status-box {
  padding: 15px;
  border-radius: var(--radius-inputs);
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
  border-left: 5px solid; /* Bordure colorée sur la gauche */
}

.status-box.sending {
  background-color: #fffde7;
  color: #ffb300;
  border-color: #ffb300;
}

.status-box.error {
  background-color: #ffebee;
  color: var(--color-error);
  border-color: var(--color-error);
}

.status-box.success {
  background-color: #e8f5e9;
  color: var(--color-success);
  border-color: var(--color-success);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 35px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  font-size: 0.85em;
  display: flex; /* Active Flexbox */
  flex-direction: column; /* Aligne les éléments verticalement (logo, puis liens) */
  align-items: center; /* Centre les éléments horizontalement */
}

footer a {
  color: var(--color-primary-light);
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive (Mobile/Tablette) */
@media (max-width: 600px) {
  body {
    padding: 20px 0;
  }

  .container {
    border-radius: 0;
    box-shadow: none;
    padding: 25px 20px;
    max-width: 100%;
    border: none;
  }

  button {
    padding: 14px;
    font-size: 1em;
  }
}

.logo-footer {
  width: 75px;
  height: auto;
  margin-bottom: 10px;
}

/* --- CUSTOM SELECT STYLE (Notion-like) --- */

.custom-select-wrapper {
  position: relative;
  user-select: none;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 1em;
  font-weight: 400;
  color: #999; /* Couleur placeholder par défaut */
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-inputs);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* État quand une sélection est faite (classe ajoutée par JS) */
.custom-select-trigger.has-value {
  color: var(--color-text-dark);
}

/* État ouvert / Focus */
.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), 0 0 0 4px rgba(9, 63, 48, 0.15);
}

/* Flèche */
.custom-select-trigger .arrow {
  font-size: 0.8em;
  color: var(--color-text-soft);
  transition: transform 0.3s ease;
}

.custom-select-wrapper.open .arrow {
  transform: rotate(180deg);
}

/* Liste des options (Le bloc invisible) */
.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0;
  right: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-inputs);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background: #fff;
  transition: all 0.2s ease-in-out;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  z-index: 100;
  margin-top: 6px;
  max-height: 250px;
  overflow-y: auto; /* Scroll si trop d'options */
}

/* État ouvert des options */
.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0);
}

/* Option individuelle */
.custom-option {
  position: relative;
  display: block;
  padding: 10px 15px;
  font-size: 0.95em;
  color: var(--color-text-dark);
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #f7f7f7;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: #f0f0f0; /* Gris très léger style Notion au survol */
  color: var(--color-primary);
}

.custom-option.selected {
  background-color: #e8f5e9; /* Vert très pâle si déjà sélectionné */
  font-weight: 600;
}
