/* ==========================================================================
   Due diligence scientifique — feuille de style unique
   Approche : mobile-first, fond blanc dominant, une seule couleur d'accent,
   hiérarchie portée par la taille et l'espace plutôt que par la couleur.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs */
  --navy: #1f3864;          /* unique couleur d'accent */
  --navy-dark: #16294a;     /* état survol / actif */
  --ink: #111114;           /* titres */
  --body: #35373d;          /* texte courant */
  --muted: #6b6f78;         /* texte secondaire, métadonnées */
  --rule: #e6e6ea;          /* filets fins, jamais de bordure marquée */
  --bg: #ffffff;
  --bg-soft: #fafafa;       /* survol de carte, à peine perceptible */

  /* Typographie */
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;

  /* Rythme vertical : l'espace fait l'essentiel du design */
  --section-space: clamp(5.5rem, 13vw, 10rem);
  --container: 62rem;       /* ~992px */
  --gutter: clamp(1.5rem, 6vw, 3rem);

  /* Courbe d'animation douce, sans rebond */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Réinitialisation minimale et bases
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Décale les ancres pour ne pas passer sous l'en-tête fixe */
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 1.0625rem;         /* 17px */
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  /* Resserrage optique : indispensable pour que les grands titres tiennent */
  letter-spacing: -0.021em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover { color: var(--navy-dark); }

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

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

/* Focus visible uniquement au clavier — discret mais net */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Lien d'évitement, masqué jusqu'au focus clavier */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
   3. Mise en page
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Colonne resserrée : confort de lecture pour les blocs de texte */
.container--narrow { max-width: 44rem; }

.section { padding-block: var(--section-space); }

/* Séparation entre sections : un filet d'un pixel, rien de plus */
.section--rule { border-top: 1px solid var(--rule); }

/* --------------------------------------------------------------------------
   4. En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.25rem;
}

.header-name {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Mark quasi carré (ratio 0,92) : la hauteur seule le dimensionne, la largeur
   suit le ratio intrinsèque grâce aux attributs width/height du <img>, ce qui
   réserve la place avant le chargement et évite tout décalage de mise en page. */
.header-logo {
  display: block;
  height: 1.625rem;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.875rem;
}

.header-nav a { color: var(--muted); }
.header-nav a:hover { color: var(--ink); }

/* Sur petits écrans, seul le lien Contact reste : la barre garde son air */
@media (max-width: 34rem) {
  .header-nav a:not([href="#contact"]) { display: none; }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(6rem, 20vh, 12rem) clamp(5rem, 14vh, 9rem);
}

.hero-title {
  font-size: clamp(2.25rem, 6.2vw, 4rem);
  letter-spacing: -0.032em;
  line-height: 1.06;
}

/* Le retour à la ligne manuel du titre n'a de sens qu'en grand format */
@media (max-width: 40rem) {
  .hero-title br { display: none; }
}

.hero-subtitle {
  max-width: 36rem;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-actions { margin-top: clamp(2rem, 5vw, 2.75rem); }

/* --------------------------------------------------------------------------
   6. Éléments de texte communs
   -------------------------------------------------------------------------- */

/* Petit intitulé de section, seule utilisation colorée de l'accent */
.eyebrow {
  margin-bottom: 1.25rem;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.625rem, 3.6vw, 2.25rem);
  letter-spacing: -0.024em;
}

.section-lead {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--muted);
  text-wrap: pretty;
}

/* Bloc de texte courant : espacement régulier entre paragraphes */
.prose p + p { margin-top: 1.5rem; }
.prose { max-width: 38rem; }

.note {
  max-width: 40rem;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   7. Bouton
   -------------------------------------------------------------------------- */
.button {
  display: inline-block;
  padding: 0.8125rem 1.75rem;
  border: 0;
  border-radius: 980px;         /* pilule */
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s var(--ease);
}

.button:hover {
  background: var(--navy-dark);
  color: #fff;
}

.button:active { transform: scale(0.985); }

.button[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* --------------------------------------------------------------------------
   8. Méthode
   -------------------------------------------------------------------------- */
.method-list {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  margin-top: clamp(2.75rem, 6vw, 4rem);
}

@media (min-width: 46rem) {
  .method-list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: clamp(2.5rem, 6vw, 5rem);
  }
}

.method-item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.method-number {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.method-heading {
  font-size: 1.125rem;
  letter-spacing: -0.014em;
}

.method-text {
  margin-top: 0.6875rem;
  color: var(--muted);
  font-size: 0.9688rem;
  line-height: 1.6;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   9. Cartes de rapports
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

@media (min-width: 46rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 1.875rem);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--bg);
  color: inherit;
  transition: border-color 0.25s ease, background-color 0.25s ease,
              transform 0.25s var(--ease);
}

.card:hover {
  border-color: #d3d5db;
  background: var(--bg-soft);
  transform: translateY(-2px);
  color: inherit;
}

.card-title {
  font-size: 1.0625rem;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.card-text {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.58;
}

/* Repoussée en bas de carte pour aligner les métadonnées entre elles */
.card-meta {
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   10. Formulaire
   -------------------------------------------------------------------------- */
.form {
  max-width: 34rem;
  margin-top: clamp(2.5rem, 6vw, 3.25rem);
}

.field { margin-bottom: 2rem; }

.field label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Champs soulignés plutôt qu'encadrés : moins de traits à l'écran */
.field input,
.field textarea {
  width: 100%;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;               /* neutralise l'arrondi iOS */
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;                /* 16px : évite le zoom automatique iOS */
  line-height: 1.5;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { resize: vertical; min-height: 6.5rem; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--navy);
}

/* Champ en erreur après validation JavaScript */
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-bottom-color: #b3261e; }

/* Piège à robots : retiré du flux sans être masqué par display:none */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.form-status[data-state="error"] { color: #b3261e; }
.form-status[data-state="success"] { color: var(--navy); }

.contact-alt {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

/* Séparateur entre les deux liens ; passe à la ligne proprement sur mobile */
.contact-alt .sep {
  margin-inline: 0.625rem;
  color: var(--rule);
}

/* --------------------------------------------------------------------------
   11. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: 3.5rem 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-note {
  max-width: 34rem;
  margin-top: 0.625rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   12. Animations au scroll
   État initial appliqué uniquement si JavaScript est actif (classe .js),
   pour que le contenu reste visible en cas d'échec du script.
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  /* Le délai est posé par script.js pour décaler légèrement les éléments */
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Respect du réglage système : aucune animation, aucun défilement animé */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   13. Impression
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .hero-actions, .form { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  body { font-size: 11pt; }
}
