/*
  ============================================================
  MASTERCLASS ROYAUTÉ — Feuille de style principale
  ============================================================
  Fichier      : css/style.css
  Description  : Styles complets du site de candidature
  Palette      : Bleu Royal · Or · Blanc Ivoire · Nuit
  Typographie  : Cormorant Garamond (titres) + DM Sans (corps)
  ============================================================

  TABLE DES MATIÈRES :
  ─────────────────────────────────────────────
  1.  Variables CSS (tokens de design)
  2.  Reset & Base
  3.  Utilitaires globaux (container, eyebrow, titre section)
  4.  HERO — En-tête principal
  5.  ABOUT — Présentation & valeurs
  6.  FORM SECTION — Formulaire de candidature
  7.  Fieldsets & légendes
  8.  Champs : inputs, selects, textarea
  9.  Checkboxes personnalisées
  10. Bouton de soumission
  11. Messages feedback (succès, erreur)
  12. FOOTER
  13. Animations & keyframes
  14. Media queries (responsive)
  ─────────────────────────────────────────────
*/


/* ============================================================
   1. VARIABLES CSS — Tokens de design centralisés
   Modifier ces valeurs pour personnaliser tout le site en
   un seul endroit.
   ============================================================ */
:root {

  /* ── Palette principale ── */
  --color-royal:       #0B2A6B;   /* Bleu royal profond */
  --color-royal-mid:   #1A3F8F;   /* Bleu royal intermédiaire */
  --color-royal-light: #2554BF;   /* Bleu plus lumineux (hover) */
  --color-night:       #06173A;   /* Bleu nuit (fonds sombres) */
  --color-gold:        #C9A84C;   /* Or principal */
  --color-gold-light:  #F0D080;   /* Or clair (reflets) */
  --color-gold-pale:   #F8EFD4;   /* Or pâle (fonds doux) */
  --color-ivory:       #FAFAF7;   /* Blanc ivoire (fond général) */
  --color-white:       #FFFFFF;

  /* ── Textes ── */
  --color-text-dark:   #0E1B36;   /* Titre sombres */
  --color-text-body:   #2D3A54;   /* Corps de texte principal */
  --color-text-muted:  #6B7A99;   /* Texte secondaire / aide */
  --color-text-light:  #F0EDE4;   /* Texte sur fond sombre */

  /* ── Bordures & séparateurs ── */
  --color-border:      #D8DDE8;
  --color-border-gold: #C9A84C;
  --color-focus:       #2554BF;   /* Anneau de focus (accessibilité) */

  /* ── Feedback ── */
  --color-error:       #C0392B;
  --color-error-bg:    #FEF0EF;
  --color-success:     #1E7B4B;
  --color-success-bg:  #EFF8F3;

  /* ── Typographie ── */
  --font-display:      'Cormorant Garamond', Georgia, serif;
  --font-body:         'DM Sans', -apple-system, sans-serif;

  /* Tailles de police (échelle modulaire) */
  --text-xs:    0.75rem;    /*  12px */
  --text-sm:    0.875rem;   /*  14px */
  --text-base:  1rem;       /*  16px */
  --text-md:    1.125rem;   /*  18px */
  --text-lg:    1.25rem;    /*  20px */
  --text-xl:    1.5rem;     /*  24px */
  --text-2xl:   2rem;       /*  32px */
  --text-3xl:   2.5rem;     /*  40px */
  --text-4xl:   3.5rem;     /*  56px */
  --text-5xl:   4.5rem;     /*  72px */

  /* ── Espacements ── */
  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */

  /* ── Bordures arrondies ── */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* ── Ombres ── */
  --shadow-sm:  0 1px 3px rgba(6,23,58,.08), 0 1px 2px rgba(6,23,58,.04);
  --shadow-md:  0 4px 16px rgba(6,23,58,.10), 0 2px 6px rgba(6,23,58,.06);
  --shadow-lg:  0 10px 40px rgba(6,23,58,.14), 0 4px 12px rgba(6,23,58,.08);
  --shadow-gold: 0 4px 24px rgba(201,168,76,.30);

  /* ── Transitions ── */
  --transition-fast:   150ms cubic-bezier(.4, 0, .2, 1);
  --transition-base:   250ms cubic-bezier(.4, 0, .2, 1);
  --transition-slow:   400ms cubic-bezier(.4, 0, .2, 1);
}


/* ============================================================
   2. RESET & BASE
   Normalisation cross-browser minimale et styles de base.
   ============================================================ */

/* Box-sizing universel */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Empêche l'overflow horizontal accidentel */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-body);
  background-color: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Liens de base */
a {
  color: inherit;
  text-decoration: none;
}

/* Images fluides */
img, svg {
  display: block;
  max-width: 100%;
}

/* Focus visible pour l'accessibilité clavier */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ============================================================
   3. UTILITAIRES GLOBAUX
   ============================================================ */

/* Conteneur principal centré avec largeur max */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* Étiquette au-dessus des titres de section */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

/* Titre principal de section */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-dark);
  margin-bottom: var(--space-5);
}

/* Sous-titre de section */
.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

/* En-tête de section centré */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-header .section-subtitle {
  margin: 0 auto;
}


/* ============================================================
   4. HERO — En-tête principal
   Fond bleu nuit avec overlay dégradé, couronne dorée,
   et informations clés de l'événement.
   ============================================================ */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Fond de base : bleu nuit profond */
  background-color: var(--color-night);

  /* Texture : motif croisé subtil en surimpression */
  background-image:
          radial-gradient(ellipse 80% 60% at 50% 0%, rgba(26, 63, 143, 0.70) 0%, transparent 70%),
          radial-gradient(ellipse 50% 40% at 80% 100%, rgba(201, 168, 76, 0.12) 0%, transparent 60%),
          repeating-linear-gradient(
                  0deg,
                  transparent,
                  transparent 59px,
                  rgba(255,255,255,.025) 59px,
                  rgba(255,255,255,.025) 60px
          ),
          repeating-linear-gradient(
                  90deg,
                  transparent,
                  transparent 59px,
                  rgba(255,255,255,.025) 59px,
                  rgba(255,255,255,.025) 60px
          );
  /* Hauteur auto : le hero ne couvre plus toute la page */
  min-height: auto;
  padding: var(--space-16) 0 var(--space-12);
}

/* Overlay supplémentaire pour le dégradé bas → opaque */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
          180deg,
          rgba(6, 23, 58, 0.00) 50%,
          rgba(6, 23, 58, 0.60) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Contenu du hero centré par rapport à l'overlay */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  animation: fadeInUp 0.9s ease both;
}

/* ── Grille 2 colonnes égales (col-6 / col-6) ── */
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* deux colonnes parfaitement égales */
  gap: 0 var(--space-12);
  align-items: center;
  margin-bottom: var(--space-10);
}

/* ── Colonne gauche : centrée, identité visuelle ── */
.hero__col--left {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Séparateur vertical droit — ligne or subtile */
  border-right: 1px solid rgba(201, 168, 76, 0.25);
  padding-right: var(--space-12);
}

/* ── Colonne droite : alignée à gauche, infos ── */
.hero__col--right {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: var(--space-4);
}

/* ── Wrapper du bouton centré sous la grille ── */
.hero__cta-wrapper {
  display: flex;
  justify-content: center;
}

/* Bloc logo */
.hero__crown {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-5);
}

/* Image logo — taille contrôlée, légère lueur dorée, animation douce */
.hero__logo {
  width: 160px;
  height: auto;
  display: block;
  object-fit: contain;

  /* Lueur dorée subtile autour du logo */
  filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.50));

  /* Flottement doux en boucle */
  animation: crownFloat 4s ease-in-out infinite;
}

/* Surtitre */
.hero__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

/* Titre principal du hero */
.hero__title {
  font-family: var(--font-display);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.hero__title--light {
  display: block;
  font-size: clamp(var(--text-xl), 5vw, var(--text-3xl));
  font-weight: 400;
  color: rgba(240, 237, 228, 0.85);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.hero__title--bold {
  display: block;
  font-size: clamp(var(--text-4xl), 12vw, var(--text-5xl));
  font-weight: 700;
  color: var(--color-gold-light);
  letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(201, 168, 76, 0.35);
}

/* Séparateur décoratif doré */
.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.divider__line {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.divider__diamond {
  font-size: var(--text-xs);
  color: var(--color-gold);
}

/* Bloc thème — dans la colonne droite */
.hero__theme {
  margin-bottom: var(--space-8);
}

.hero__theme--label {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}

.hero__theme--text {
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-weight: 500;
  color: var(--color-text-light);
  line-height: 1.3;
}

.hero__theme--text em {
  font-style: italic;
  color: var(--color-gold-light);
}

/* ── Méta-infos : liste verticale dans la colonne droite ── */
.hero__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Item individuel : icône + texte alignés à gauche */
.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(240, 237, 228, 0.80);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: left;
}

.meta-item__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--color-gold);
}

/* Bouton CTA principal — centré sous la grille via hero__cta-wrapper */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light) 60%, var(--color-gold));
  color: var(--color-night);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-gold), 0 2px 8px rgba(0,0,0,.3);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
}

.hero__cta:hover,
.hero__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.50), 0 4px 12px rgba(0,0,0,.3);
}

.hero__cta svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-base);
}

.hero__cta:hover svg {
  transform: translateY(3px);
}


/* ============================================================
   5. ABOUT — Présentation & valeurs
   ============================================================ */

.about {
  padding: var(--space-24) 0;
  background-color: var(--color-white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

/* Texte éditorial */
.about__text .section-eyebrow {
  /* Déjà stylé en global */
}

.about__text .section-title {
  margin-bottom: var(--space-6);
}

.about__lead {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-text-dark);
  line-height: 1.7;
  margin-bottom: var(--space-5);
  border-left: 3px solid var(--color-gold);
  padding-left: var(--space-5);
}

.about__body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* Grille des valeurs : 2 colonnes × 2 lignes */
.about__values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

/* Carte valeur individuelle */
.value-card {
  padding: var(--space-6);
  background: var(--color-ivory);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-gold);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.value-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.value-card__icon {
  font-size: var(--text-md);
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

.value-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.value-card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}


/* ============================================================
   6. FORM SECTION — Section formulaire de candidature
   Fond ivoire légèrement texturé, carte blanche surélevée.
   ============================================================ */

.form-section {
  padding: var(--space-24) 0;
  background-color: var(--color-ivory);

  /* Texture de fond subtile */
  background-image: radial-gradient(
          ellipse 70% 50% at 50% 0%,
          rgba(11, 42, 107, 0.04) 0%,
          transparent 70%
  );
}

/* Carte blanche principale du formulaire */
.form-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-12) var(--space-12);
  max-width: 820px;
  margin: 0 auto;

  /* Ligne dorée en haut de la carte */
  border-top: 4px solid var(--color-gold);
}


/* ============================================================
   7. FIELDSETS & LÉGENDES
   Chaque bloc du formulaire est un <fieldset> sémantique.
   ============================================================ */

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-10);
}

/* Séparateur visuel entre fieldsets */
.form-fieldset + .form-fieldset {
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border);
}

/* Légende du fieldset */
.form-legend {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-8);
  width: 100%;
}

/* Numéro de bloc (01, 02, 03) */
.form-legend__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-royal), var(--color-royal-mid));
  color: var(--color-gold-light);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}


/* ============================================================
   8. CHAMPS : inputs, selects, textarea
   Style épuré, focus visible, transition douce.
   ============================================================ */

/* Ligne de champs (wrapper flex) */
.form-row {
  margin-bottom: var(--space-6);
}

/* Deux colonnes côte à côte */
.form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

/* Groupe label + input */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Label */
.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-dark);
  letter-spacing: 0.01em;
}

/* Astérisque d'obligation */
.required {
  color: var(--color-gold);
  margin-left: var(--space-1);
  font-size: var(--text-sm);
}

/* ── Styles partagés : input, select, textarea ── */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-dark);
  background-color: var(--color-ivory);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  appearance: none;
  -webkit-appearance: none;
  transition:
          border-color var(--transition-fast),
          box-shadow var(--transition-fast),
          background-color var(--transition-fast);

  /* Hauteur uniforme pour input/select */
  height: 48px;
}

/* Textarea : hauteur auto (définie par rows="") */
.form-textarea {
  height: auto;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  padding-top: var(--space-4);
}

/* Placeholder */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
  font-weight: 300;
}

/* État focus */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-royal-mid);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.10);
}

/* État invalide (après tentative de soumission) */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-error);
  background-color: var(--color-error-bg);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

/* État valide */
.form-input.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
  border-color: var(--color-success);
}

/* ── Select : wrapper pour la flèche custom ── */
.select-wrapper {
  position: relative;
}

.select-wrapper .form-select {
  cursor: pointer;
  /* Espace pour la flèche SVG */
  padding-right: var(--space-10);
}

/* Flèche SVG positionnée à droite */
.select-arrow {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none; /* La flèche ne capte pas les clics */
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.select-wrapper:focus-within .select-arrow {
  color: var(--color-royal-mid);
  transform: translateY(-50%) rotate(180deg);
}

/* Hint de champ (compteur de caractères, etc.) */
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* Message d'erreur de champ */
.form-error {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-error);
  min-height: 1.2em; /* Évite le saut de layout quand l'erreur apparaît */
  display: block;
  transition: opacity var(--transition-fast);
}

.form-error:empty {
  opacity: 0;
}


/* ============================================================
   9. CHECKBOXES PERSONNALISÉES
   Checkboxes visibles et stylées sans dépendances externes.
   ============================================================ */

.form-group--checkbox {
  gap: var(--space-2);
}

/* Label englobant */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  cursor: pointer;
}

/* Masquer le vrai input */
.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Case visuelle custom */
.checkbox-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px; /* Alignement vertical avec le texte */
  background: var(--color-ivory);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition:
          background var(--transition-fast),
          border-color var(--transition-fast),
          box-shadow var(--transition-fast);
}

/* Coche SVG (via ::after) */
.checkbox-custom::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2.5px solid transparent;
  border-top: none;
  border-left: none;
  border-radius: 1px;
  transform: rotate(45deg) scale(0);
  transition: transform var(--transition-fast);
}

/* État coché */
.checkbox-input:checked + .checkbox-custom {
  background: var(--color-royal-mid);
  border-color: var(--color-royal-mid);
}

.checkbox-input:checked + .checkbox-custom::after {
  border-color: var(--color-white);
  transform: rotate(45deg) scale(1);
}

/* Focus clavier */
.checkbox-input:focus-visible + .checkbox-custom {
  box-shadow: 0 0 0 3px rgba(26, 63, 143, 0.20);
}

/* Texte de la checkbox */
.checkbox-text {
  font-size: var(--text-sm);
  color: var(--color-text-body);
  line-height: 1.6;
}


/* ============================================================
   10. BOUTON DE SOUMISSION
   Grand bouton doré avec état loading (spinner).
   ============================================================ */

.form-submit {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

/* Bouton principal */
.btn-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-10);
  min-width: 280px;
  height: 56px;

  /* Dégradé doré */
  background: linear-gradient(135deg, #B8922A, var(--color-gold) 50%, #D4AC4F);
  color: var(--color-night);

  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;

  box-shadow: var(--shadow-gold), var(--shadow-sm);
  transition:
          transform var(--transition-base),
          box-shadow var(--transition-base),
          opacity var(--transition-base);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.45), var(--shadow-md);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Flèche à droite */
.btn-submit__arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.btn-submit:hover .btn-submit__arrow {
  transform: translateX(3px);
}

/* ── Spinner (masqué par défaut) ── */
.btn-submit__spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: none; /* Affiché uniquement en état .is-loading */
  animation: spin 0.8s linear infinite;
}

/* État chargement : spinner visible, texte masqué */
.btn-submit.is-loading .btn-submit__spinner {
  display: block;
}

.btn-submit.is-loading .btn-submit__arrow {
  display: none;
}

.btn-submit.is-loading .btn-submit__text {
  opacity: 0.7;
}


/* ============================================================
   11. MESSAGES FEEDBACK — Succès & Erreur globale
   ============================================================ */

/* ── Message de succès ── */
.form-success {
  display: none;             /* Masqué par défaut */
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

/* Visible quand JS ajoute la classe .is-visible */
.form-success.is-visible {
  display: flex;
  animation: fadeInUp 0.5s ease both;
}

/* Icône de validation */
.success-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-success-bg);
  border-radius: 50%;
  margin-bottom: var(--space-6);
}

.success-icon svg {
  width: 36px;
  height: 36px;
  color: var(--color-success);
}

.success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: var(--space-4);
}

.success-text {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 48ch;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

/* Verset biblique d'encouragement */
.success-verse {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--color-royal-mid);
  font-style: italic;
  line-height: 1.7;
  padding: var(--space-6) var(--space-8);
  background: var(--color-gold-pale);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  max-width: 52ch;
  text-align: left;
}

/* ── Erreur globale ── */
.form-error-global {
  display: none;
  padding: var(--space-5) var(--space-6);
  background: var(--color-error-bg);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-left: 4px solid var(--color-error);
  border-radius: var(--radius-md);
  margin-top: var(--space-6);
  color: var(--color-error);
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-error-global.is-visible {
  display: block;
  animation: fadeInUp 0.3s ease both;
}


/* ============================================================
   12. FOOTER
   ============================================================ */

.footer {
  background-color: var(--color-night);
  padding: var(--space-16) 0;
  text-align: center;
  border-top: 1px solid rgba(201, 168, 76, 0.25);
}

.footer__crown {
  font-size: var(--text-md);
  color: var(--color-gold);
  margin-bottom: var(--space-5);
}

.footer__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.footer__subtitle {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-gold);
  margin-bottom: var(--space-8);
}

.footer__church {
  font-size: var(--text-sm);
  color: rgba(240, 237, 228, 0.55);
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(240, 237, 228, 0.35);
  letter-spacing: 0.04em;
}


/* ============================================================
   13. ANIMATIONS & KEYFRAMES
   ============================================================ */

/* Entrée douce vers le haut */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Flottement de la couronne */
@keyframes crownFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Rotation du spinner */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}


/* ============================================================
   14. MEDIA QUERIES — Responsive Design
   Approche Mobile-first : les styles de base s'appliquent
   aux petits écrans, les overrides aux grands.
   ============================================================ */

/* ── Tablette (max 900px) ── */
@media (max-width: 900px) {

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

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

  .form-card {
    padding: var(--space-10) var(--space-8);
  }
}

/* ── Mobile (max 640px) ── */
@media (max-width: 640px) {

  /* Hero */
  .hero__title--bold {
    font-size: clamp(var(--text-3xl), 14vw, var(--text-4xl));
  }

  .hero__meta {
    align-items: flex-start;
    padding: 0 var(--space-4);
  }

  .hero__cta {
    width: 100%;
    justify-content: center;
  }

  /* About */
  .about__values {
    grid-template-columns: 1fr;
  }

  /* Hero : grille en 1 colonne sur mobile */
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8) 0;
  }

  .hero__col--left {
    border-right: none;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
    padding-right: 0;
    padding-bottom: var(--space-8);
  }

  .hero__col--right {
    text-align: center;
    align-items: center;
    padding-left: 0;
  }

  .hero__meta {
    align-items: center;
  }

  /* Formulaire : 1 colonne sur mobile */
  .form-row--two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-card {
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
  }

  .btn-submit {
    width: 100%;
    min-width: auto;
  }

  /* Section titles */
  .section-title {
    font-size: var(--text-2xl);
  }
}