/* ============================================================
   AéroTribe — feuille commune aux pages du site.

   Les couleurs, les polices et les rayons sont ceux de l'app
   (src/constants/theme.ts) : un pilote qui passe du site à
   l'application doit reconnaître la même maison.

   Aucune dépendance, aucune compilation : le dossier web/ se
   dépose tel quel chez l'hébergeur.
   ============================================================ */

/* Polices servies par le site lui-même, et non par Google Fonts : une
   police chargée chez Google transmet l'adresse IP du visiteur à un tiers.
   Licence SIL Open Font License (fonts/OFL-*.txt). Sora est réduite aux
   caractères latins, en WOFF (26 Ko au lieu de 58 par graisse) ; Saira
   Condensed reste entière : son nom est réservé, et la licence interdit de
   diffuser sous ce nom une version modifiée. */
@font-face { font-family: 'Sora'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/Sora_400Regular.woff') format('woff'); }
@font-face { font-family: 'Sora'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/Sora_500Medium.woff') format('woff'); }
@font-face { font-family: 'Sora'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Sora_600SemiBold.woff') format('woff'); }
@font-face { font-family: 'Sora'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Sora_700Bold.woff') format('woff'); }
@font-face { font-family: 'Sora'; font-weight: 800; font-style: normal; font-display: swap; src: url('fonts/Sora_800ExtraBold.woff') format('woff'); }
@font-face { font-family: 'Saira Condensed'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/SairaCondensed_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Saira Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/SairaCondensed_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Saira Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/SairaCondensed_700Bold.ttf') format('truetype'); }

:root {
  /* Fonds */
  --cream:   #FCF8F5;   /* fond principal */
  --surface: #FFFFFF;   /* cartes */
  --tint:    #EEF3F8;   /* sections alternées */
  --tint-blue:   #EAF3FB;
  --tint-orange: #FEF1E6;
  --line:    #E7EBF1;

  /* Encre */
  --navy:    #0E1E3A;
  --text:    #47566E;
  --muted:   #8A96AB;

  /* Accents */
  --blue:    #2271BE;
  --sky:     #5AB1EC;
  --orange:  #FF7A1F;

  /* Rayons */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow: 0 4px 20px rgba(14, 30, 58, 0.06);
  --shadow-lift: 0 10px 30px rgba(14, 30, 58, 0.10);

  /* Courbe d'assouplissement unique : tout le site bouge pareil. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.62;
  font-size: 16px;
}

h1, h2, h3 { color: var(--navy); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--blue); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Lien « Aller au contenu » : invisible tant qu'on ne navigue pas au clavier. */
.saut {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r-md);
  background: var(--orange); color: #fff; font-weight: 600; text-decoration: none;
}
.saut:focus { top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Barre de navigation ──────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 248, 245, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
/* `is-scrolled` et `is-in` sont posées par le script, pas écrites dans le
   HTML : elles n'apparaissent donc dans aucune page, sans être mortes. */
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: auto; display: block; }
.brand span { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: rgba(14, 30, 58, 0.7);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 200ms var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav .btn { margin-left: 22px; }

/* Menu déroulant du mobile : la case à cocher évite tout JavaScript, donc
   fonctionne même si le script échoue à charger. */
.nav-toggle { display: none; }
.nav-burger {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
}
.nav-burger svg { width: 20px; height: 20px; stroke: var(--navy); }

/* ── Boutons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 31, 0.32); }
.btn-primary:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 10px 24px rgba(255, 122, 31, 0.4); }
.btn-ghost { background: transparent; color: var(--navy); border-color: rgba(14, 30, 58, 0.18); }
.btn-ghost:hover { transform: translateY(-1px); background: rgba(14, 30, 58, 0.03); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { transform: translateY(-1px) scale(1.02); }

/* ── Titres de section ────────────────────────────────────── */

.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--orange);
}

.section { padding: 84px 0; }
.section-tint { background: var(--tint); }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 12px 0 14px; }
.section-head p { color: rgba(14, 30, 58, 0.62); font-size: 17px; }

/* ── Cartes ───────────────────────────────────────────────── */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 15px; color: rgba(14, 30, 58, 0.62); }

/* Chiffres : la condensée de l'app, réservée aux nombres. */
.stat { font-family: 'Saira Condensed', 'Sora', sans-serif; font-weight: 700; letter-spacing: 0.01em; }

/* ── Pied de page ─────────────────────────────────────────── */

.footer { background: var(--navy); color: rgba(255, 255, 255, 0.7); padding: 54px 0 40px; }
.footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer .brand span { color: #fff; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45); margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px; color: rgba(255, 255, 255, 0.5);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ── Apparitions au défilement ────────────────────────────── */

.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--d, 0ms);
}

/* Sans JavaScript, rien ne doit rester invisible. */
.no-js .reveal { opacity: 1; transform: none; }

/* ── Mobile ───────────────────────────────────────────────── */

@media (max-width: 860px) {
  .section { padding: 62px 0; }
  .nav-burger { display: flex; }
  .nav .btn { display: none; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
    transform: translateY(-140%);
    transition: transform 300ms var(--ease);
    box-shadow: var(--shadow);
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-toggle:checked ~ .nav-links { transform: none; }
}

/* Une animation ne doit jamais s'imposer à qui l'a refusée dans son système. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
  .tribu-visual .phone { transform: none; }
  #fonctionnalites .card:hover, #fonctionnalites .card:hover .mini { transform: none; }
  .wing-l, .wing-r { animation: none; }
  /* Le carrousel s'arrête sur sa carte de devant. */
  .deck-card { animation: none; }
  .deck-card:nth-child(2), .deck-card:nth-child(3) { opacity: 0; }
  .pod-bar { animation: none; height: var(--h); }
  /* Sans mouvement, le diaporama s'arrête sur le premier écran. */
  .slides img { animation: none; }
  .slides img:nth-of-type(1) { opacity: 1; }
}
