/* =====================================================================
   FL Solution — Feuille de style principale
   Design system : navy profond + accent BLEU (du navy au bleu du logo),
   fonds clairs. Ce fichier complète les utilitaires Tailwind (chargés par
   page) avec les composants réutilisables, l'ancrage typographique et les
   micro-interactions (hover + apparition au scroll).

   Nuancier d'accent « brand » (identique à la config Tailwind des pages) :
     300 #93c5fd · 400 #60a5fa · 500 #3b82f6 (bleu du logo)
     600 #2563eb (boutons) · 700 #1d4ed8 (texte/liens) · 800 #1e40af
   ===================================================================== */

/* --------------------------------------------------
   1. Variables de marque
   -------------------------------------------------- */
:root {
  --navy-950: #071a34;
  --navy-900: #0a2540;
  --navy-800: #103257;
  --navy-700: #17436e;

  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6; /* bleu du logo */
  --brand-600: #2563eb; /* boutons / CTA */
  --brand-700: #1d4ed8; /* texte, liens, icônes */
  --brand-800: #1e40af;

  --page: #e9f1fb; /* fond général teinté bleu (canvas) */
  --mist: #d4e4f6; /* bandes de sections, bleu plus affirmé */
  --ink: #1b2a3a;
  --slate-500: #64748b;

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .06);
  --shadow-md: 0 10px 30px -12px rgba(10, 37, 64, .25);
  --shadow-lg: 0 24px 60px -20px rgba(10, 37, 64, .35);

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* --------------------------------------------------
   2. Ancrage typographique / base
   -------------------------------------------------- */
html {
  scroll-behavior: smooth;
  /* Décale les ancres (#services…) pour ne pas passer sous l'en-tête fixe */
  scroll-padding-top: 88px;
}

/* Sélection de texte aux couleurs de la marque */
::selection { background: var(--brand-600); color: #fff; }

body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Sora', system-ui, sans-serif;
  letter-spacing: -0.02em;
  /* Évite les lignes orphelines dans les titres sur plusieurs lignes */
  text-wrap: balance;
}

/* Titre héros fluide (échelle typographique continue, sans paliers brusques) */
.hero-title {
  font-size: clamp(2.5rem, 5.2vw + 1rem, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* Focus clavier visible et cohérent partout */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --------------------------------------------------
   3. Boutons
   -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .975rem;
  line-height: 1;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
  will-change: transform;
  cursor: pointer;
  text-align: center;
}
.btn svg { flex: 0 0 auto; }
/* Retour tactile discret à l'appui (scale-feedback ~0.97) */
.btn:active { transform: translateY(0) scale(.97); }

.btn-primary {
  background: var(--brand-600);
  color: #ffffff;
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .5);
}
.btn-primary:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(37, 99, 235, .55);
}

.btn-navy {
  background: var(--navy-900);
  color: #fff;
}
.btn-navy:hover { background: var(--navy-800); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--navy-900);
  box-shadow: inset 0 0 0 1.5px rgba(16, 50, 87, .25);
}
.btn-outline:hover {
  box-shadow: inset 0 0 0 1.5px var(--navy-800);
  background: rgba(16, 50, 87, .04);
  transform: translateY(-2px);
}

/* Bouton clair sur fonds sombres */
.btn-light {
  background: #fff;
  color: var(--navy-900);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost-light {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3);
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }

/* --------------------------------------------------
   4. Sur-titres, cartes, séparateurs
   -------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--brand-600);
  border-radius: 2px;
}
.eyebrow-center { justify-content: center; }

.card {
  background: #fff;
  border: 1px solid #e6edf4;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #cfe0ec;
}

/* --------------------------------------------------
   Cartes tarifaires : formule mise en avant + étiquette
   (composants dédiés plutôt qu'un empilement d'utilitaires :
    fonctionne quel que soit l'état du CSS compilé)
   -------------------------------------------------- */
.plan-featured {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .4), var(--shadow-md);
  border-color: transparent;
}
/* Léger décalage vertical pour faire ressortir la formule phare */
@media (min-width: 768px) {
  .plan-featured--lift { margin-top: -.75rem; margin-bottom: .75rem; }
}

.plan-badge {
  position: absolute;
  top: -.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--brand-600);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .32rem .85rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .5);
}

/* Icône ronde d'accent (services, atouts…) */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(23, 67, 110, .12));
  color: var(--brand-700);
}

/* --------------------------------------------------
   5. Rotateur de métiers (signature du hero)
   -------------------------------------------------- */
/* Un seul mot est présent dans le DOM ; js/main.js en change le texte et
   l'anime (Web Animations API). La largeur minimale est calculée en JS
   d'après le mot le plus long : le titre ne se décale jamais. */
.rotator {
  display: inline-block;
  vertical-align: bottom;
  color: var(--brand-600);
  white-space: nowrap;
  /* Reste lisible même si le JavaScript ne s'exécute pas */
  opacity: 1;
}

/* --------------------------------------------------
   6. Apparition au scroll
   -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* --------------------------------------------------
   7. En-tête / navigation
   -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(180%) blur(12px);
  /* Remplit la zone sous la barre d'état (encoche) : plus de bande morte en haut */
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease),
              transform .35s var(--ease), opacity .35s var(--ease);
}
.site-header.is-scrolled {
  border-color: #e6edf4;
  box-shadow: 0 6px 24px -18px rgba(10, 37, 64, .4);
}
/* Barre masquée en douceur quand on descend (réapparaît en remontant) */
.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--navy-800);
  padding: .35rem 0;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--brand-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-link:hover { color: var(--navy-950); }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--navy-950); }

/* Menu mobile — animation via grid-template-rows (pas de reflow coûteux) */
.mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.mobile-menu.is-open { grid-template-rows: 1fr; }
.mobile-menu__inner { overflow: hidden; }

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.burger span + span { margin-top: 5px; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------
   8. Motifs de fond décoratifs
   -------------------------------------------------- */
.bg-mist { background: var(--mist); }

.hero-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-glow::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(circle at center, rgba(59, 130, 246, .18), transparent 62%);
  border-radius: 50%;
}
.hero-glow::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -12%;
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle at center, rgba(23, 67, 110, .14), transparent 60%);
  border-radius: 50%;
}

/* Fine grille de points, très discrète */
.dotted {
  background-image: radial-gradient(rgba(16, 50, 87, .08) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* --------------------------------------------------
   9. Bandeau d'offre de lancement
   -------------------------------------------------- */
.launch-band {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-800) 55%, var(--brand-700));
  color: #fff;
}
.badge-pulse {
  position: relative;
  display: inline-flex;
  width: .55rem;
  height: .55rem;
}
.badge-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-400);
  animation: pulse 2s infinite;
}
.badge-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-400);
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .8; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { opacity: 0; }
}

/* --------------------------------------------------
   10. Formulaire
   -------------------------------------------------- */
.field-label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy-800);
  margin-bottom: .4rem;
}
.field {
  width: 100%;
  border: 1px solid #d5e0ea;
  border-radius: 12px;
  padding: .8rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field::placeholder { color: #9fb0c0; }
.field:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}
.field-error { border-color: #e11d48 !important; }
.error-msg { color: #be123c; font-size: .82rem; margin-top: .35rem; }

/* --------------------------------------------------
   11. Portfolio (placeholders "à venir")
   -------------------------------------------------- */
.folio {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e6edf4;
  background:
    linear-gradient(135deg, rgba(10, 37, 64, .92), rgba(16, 50, 87, .92));
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  isolation: isolate;
}
.folio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: .8;
}
.folio__tag {
  align-self: flex-start;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brand-400);
  border: 1px solid rgba(96, 165, 250, .4);
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: auto;
}

/* --------------------------------------------------
   12. FAQ (accordéon)
   -------------------------------------------------- */
.faq-item { border-bottom: 1px solid #e6edf4; }
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  text-align: left;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy-900);
  cursor: pointer;
}
.faq-trigger .chev { transition: transform .3s var(--ease); color: var(--brand-700); }
.faq-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.faq-panel.is-open { grid-template-rows: 1fr; }
.faq-panel-inner { overflow: hidden; }
.faq-panel-inner > div { padding-bottom: 1.35rem; color: var(--slate-500); line-height: 1.7; }

/* --------------------------------------------------
   13. Divers
   -------------------------------------------------- */
.link-brand {
  color: var(--brand-700);
  font-weight: 600;
  transition: color .2s var(--ease);
}
.link-brand:hover { color: var(--brand-800); text-decoration: underline; }

.prose-legal { color: #45566a; line-height: 1.75; }
.prose-legal h2 { color: var(--navy-900); margin-top: 2.25rem; margin-bottom: .75rem; font-size: 1.4rem; }
.prose-legal h3 { color: var(--navy-800); margin-top: 1.5rem; margin-bottom: .5rem; font-size: 1.1rem; }
.prose-legal p, .prose-legal ul { margin-bottom: 1rem; }
.prose-legal ul { list-style: disc; padding-left: 1.25rem; }
.prose-legal a { color: var(--brand-700); text-decoration: underline; }

/* --------------------------------------------------
   14. Préférence de mouvement réduit
   -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
