/* ==========================================================================
   Kite Invest — feuille de style
   Aucune dépendance externe. Mobile-first, tailles fluides via clamp().
   ========================================================================== */

:root {
  --navy-950: #060d1a;
  --navy-900: #0a1830;
  --navy-800: #1b2c4a;
  --navy-700: #16304f;

  /* Fonds des sections de contenu texte : version légèrement éclaircie
     de navy-900 / navy-950, pour respirer un peu plus. Valeur actuelle :
     à mi-chemin entre l'original et le premier essai (trop clair).
     Le header, le footer et le menu mobile gardent --navy-950 /
     --navy-900 tels quels (utilisés aussi comme couleurs de texte ailleurs). */
  --content-bg: #16243a;
  --section-alt-bg: #121926;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.1);
  --ink: #ffffff;
  --muted: #c3d1e3;
  --muted-2: #9fb0c7;
  --accent: #bfe3ff;
  --accent-strong: #eaf6ff;
  --focus-ring: #7fd1ff;

  --container-w: 1180px;
  --container-w-narrow: 760px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --space-1: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-2: clamp(1rem, 0.85rem + 0.6vw, 1.5rem);
  --space-3: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem);
  --space-4: clamp(2.5rem, 2rem + 2vw, 4rem);
  --space-5: clamp(4rem, 3rem + 4vw, 7rem);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--content-bg);
  color: var(--ink);
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: inherit; }

h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0 0 var(--space-2); }
h1, h2 { letter-spacing: -0.02em; }
h3 { letter-spacing: -0.005em; }
p { margin: 0 0 1em; color: var(--muted); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Visible, accessible focus state everywhere */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: var(--navy-900);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}
.container.narrow { max-width: var(--container-w-narrow); }
.center { text-align: center; }
.center.narrow, .narrow.center { margin-inline: auto; }

.section {
  padding-block: var(--space-5);
  scroll-margin-top: 5.5rem;
}
.section-alt { background: var(--section-alt-bg); }

/* Section "Le concept" : bloc remonté et espacements internes resserrés */
#concept { padding-top: var(--space-4); }
#concept .eyebrow { margin-bottom: var(--space-1); }
#concept p { margin-bottom: 0.85em; }
#concept p:last-child { margin-bottom: 0; }

/* ---------- Typography scale ---------- */
.eyebrow {
  font-size: clamp(0.8rem, 0.75rem + 0.2vw, 0.95rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.eyebrow.center { text-align: center; }

.hero-title { margin-bottom: var(--space-2); }
.hero-logo {
  width: clamp(220px, 34vw, 480px);
  height: auto;
}

/* ---------- Ajustements mobile uniquement (proportions), desktop inchangé ---------- */
@media (max-width: 860px) {
  /* Titre "KITE INVEST" ~10% plus grand sur mobile */
  .hero-logo { width: clamp(242px, 34vw, 480px); }

  /* Bouton "Déposer ma candidature" du hero : ~56-60px de haut, largeur inchangée */
  .hero-actions .btn {
    min-height: 56px;
    padding-block: 0.7rem;
  }

  /* "Qui peut rejoindre le club" : taille réduite pour un retour à la ligne équilibré */
  #club-title {
    font-size: clamp(1.55rem, 1.3rem + 2vw, 2rem);
    text-wrap: balance;
  }
}

h2 {
  font-size: clamp(1.9rem, 1.5rem + 2.3vw, 3rem);
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  color: var(--ink);
  margin-bottom: var(--space-1);
}

.lead {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  color: var(--accent-strong);
}

/* Section "Rejoindre" : écart fixe et identique desktop/mobile entre les deux paragraphes */
#rejoindre .lead { margin-bottom: clamp(20px, 2vw, 24px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--navy-900);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 13, 26, 0.72);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.9rem;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { height: clamp(36px, 6vw, 56px); width: auto; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-nav ul {
  display: flex;
  gap: var(--space-3);
}
.site-nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { color: var(--ink); border-color: var(--accent); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-950);
    border-bottom: 1px solid var(--line-soft);
    padding: var(--space-2) clamp(1.25rem, 4vw, 3rem) var(--space-3);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.is-open {
    max-height: 420px;
    visibility: visible;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav ul li { border-bottom: 1px solid var(--line-soft); }
  .site-nav ul li a { display: block; padding: 0.9rem 0.1rem; }
  .nav-cta { margin-top: var(--space-2); width: 100%; text-align: center; }
}

@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .site-nav { visibility: visible; max-height: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--ink);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Desktop : nouvelle photo panoramique (kites + soleil + horizon) */
  object-position: center 84%;
}
@media (max-width: 860px) {
  .hero-img {
    /* Mobile : photo-hero d'origine, déjà cadrée en entier */
    object-position: center center;
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,13,26,0.55) 0%, rgba(6,13,26,0.27) 35%, rgba(6,13,26,0.85) 85%, var(--navy-950) 100%),
    linear-gradient(90deg, rgba(6,13,26,0.55) 0%, rgba(6,13,26,0.06) 45%, rgba(6,13,26,0.06) 55%, rgba(6,13,26,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-3) var(--space-4);
  max-width: 44rem;
}
.hero-lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.35rem);
  color: var(--accent-strong);
  max-width: 32rem;
  margin-bottom: var(--space-3);
}
.hero-actions { margin-bottom: var(--space-2); }
.hero-note {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- Full-width photo breaks ---------- */
.full-photo {
  margin: 0;
  line-height: 0;
}
.full-photo img {
  width: 100%;
  height: clamp(260px, 46vw, 560px);
  object-fit: cover;
}

/* Cadrage dédié : garde l'aile (gauche), le rider et le soleil (droite) visibles ensemble */
.full-photo img.photo-concept {
  object-position: center 27%;
}

/* ---------- Format grid ---------- */
.format-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
@media (min-width: 720px) {
  .format-grid { grid-template-columns: repeat(3, 1fr); }
}
.format-card {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: var(--space-2) 0 0;
}
.format-num {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--navy-900);
  background: var(--accent);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.7rem;
  margin-bottom: var(--space-2);
}

/* ---------- Form ---------- */
.form-section { background: var(--content-bg); }

/* Embed Zite : aucun fond/bordure/ombre propres, uniquement l'espacement
   déjà utilisé sous le titre de section (repris de l'ancien .candidature-form). */
.zite-embed {
  margin-top: var(--space-4);
}
.zite-embed > div {
  max-width: 100%;
}

/* Hauteur de l'embed : réduite par rapport à la valeur par défaut (1300px)
   pour limiter l'espace vide sous le bouton d'envoi et après le message de
   confirmation. Mobile : le formulaire est plus long en une colonne, donc
   une hauteur un peu supérieure au desktop évite un scroll interne. */
.zite-frame {
  width: 100%;
  height: 1200px;
}
@media (min-width: 861px) {
  .zite-frame {
    height: 1150px;
  }
}

.candidature-form {
  margin-top: var(--space-4);
  background: var(--navy-800);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-row { display: flex; flex-direction: column; gap: 0.5rem; }

.form-row label,
fieldset.form-row legend {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
}

fieldset.form-row legend {
  margin-bottom: 0.5rem;
}

.req { color: var(--accent); }

.field-error {
  display: none;
  font-size: 0.85rem;
  color: #ffc9b8;
}
.field-error.is-visible { display: block; }

.consent-block { display: flex; flex-direction: column; gap: 0.5rem; }
.consent-block .field-error { margin-top: -0.15rem; }

input[type="text"],
input[type="email"],
input[type="tel"] {
  font-size: 1rem; /* 16px minimum: evite le zoom automatique sur iOS */
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
input::placeholder { color: var(--muted-2); }
input:focus { border-color: var(--focus-ring); background: rgba(255, 255, 255, 0.09); }

fieldset.form-row {
  border: none;
  padding: 0;
  margin: 0;
  gap: 0;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
@media (max-width: 860px) {
  /* Sur mobile : grille à 2 colonnes égales, la 3e pastille passe
     naturellement à la ligne dans la même largeur que les deux premières
     (même taille, parfaitement alignées). */
  .pill-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .pill-group label { width: 100%; padding-inline: 1rem; }
}
@media (min-width: 861px) {
  /* Sur ordinateur, les trois pastilles se répartissent sur toute la largeur
     du champ, pour que la fin d'"Avancé" s'aligne avec les champs au-dessus. */
  .pill-group { flex-wrap: nowrap; }
  .pill-group label { flex: 1; }
}
.pill-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.pill-group label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill-group input[type="radio"]:checked + label {
  background: var(--ink);
  color: var(--navy-900);
  border-color: var(--ink);
}
.pill-group input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.consent-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
}
.consent-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 0.15rem;
  accent-color: var(--ink);
}
.consent-row label { font-weight: 400; color: var(--muted); font-size: 0.98rem; }

.btn-submit { align-self: flex-start; }

.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
  min-height: 1.2em;
}

.form-fineprint {
  font-size: 0.85rem;
  color: var(--muted-2);
  margin: 0;
}

@media (max-width: 480px) {
  .btn-submit { width: 100%; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Lien-bouton (rendu identique à un lien texte) ---------- */
.link-button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.link-button:hover { color: var(--accent-strong); }

.form-privacy-note {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--muted-2);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  border-top: 1px solid var(--line-soft);
  padding-block: var(--space-4);
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.footer-logo {
  width: clamp(130px, 38vw, 150px);
  height: auto;
  margin: 0 auto 0.75rem;
}
@media (min-width: 861px) {
  .footer-logo { width: clamp(150px, 12vw, 180px); }
}
.footer-line { color: var(--muted-2); font-size: 0.95rem; }
.footer-contact a { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }

.footer-legal { margin-top: 0.35rem; }
.footer-legal .link-button {
  color: var(--muted-2);
  font-size: 0.85rem;
}
.footer-legal .link-button:hover { color: var(--accent); }

/* ---------- Modale : Informations légales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(6, 13, 26, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-overlay[hidden] { display: none; }

body.modal-open { overflow: hidden; }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.modal-scroll {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(2.75rem, 6vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.modal-scroll h2 {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  margin-bottom: var(--space-2);
}
.modal-scroll h2.modal-subtitle { margin-top: var(--space-4); }
.modal-scroll h3 { margin-top: var(--space-3); }
.modal-scroll h3:first-of-type { margin-top: 0; }
.modal-scroll p { font-size: 0.95rem; }
.modal-scroll a { color: var(--accent); }
.modal-scroll a:hover { text-decoration: underline; }

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.16); }
