/* ==========================================================================
   PavéPur — base.css
   Jetons de design, remise a zero, typographie, utilitaires.
   Tout le reste du site se construit a partir de ces variables : changez une
   valeur ici et elle se propage partout.
   ========================================================================== */

:root {
  /* --- Couleurs ---------------------------------------------------------- */
  --c-ink: #0a1220;          /* noir bleute — texte principal */
  --c-navy-900: #0b1b33;     /* bleu tres fonce — sections sombres */
  --c-navy: #0f2a4a;         /* bleu fonce — couleur de marque */
  --c-navy-600: #17416e;
  --c-navy-400: #3c6494;

  --c-accent: #2e9bf0;       /* bleu clair — couleur d'accent (decoratif) */
  --c-accent-600: #1b84d6;
  --c-accent-700: #1268b0;   /* texte bleu sur blanc — 5,8:1, conforme AA */
  --c-accent-050: #eaf5fe;

  /* Bouton principal.
     Le bleu clair de marque (#2e9bf0) ne donne que 2,97:1 avec du texte blanc :
     insuffisant (WCAG AA exige 4,5:1, et un libelle de 15 px gras ne compte pas
     comme « grand texte »). On garde donc le bleu clair pour tout ce qui est
     decoratif, et on reserve ce bleu-ci — 5,04:1 — aux boutons pleins. */
  --c-cta: #1272bd;
  --c-cta-hover: #0f5f9f;

  --c-white: #ffffff;
  --c-paper: #f5f8fc;        /* fond alterne */
  --c-line: #e2e8f0;         /* filets, bordures */
  --c-muted: #5a6b80;        /* texte secondaire (AA sur blanc) */
  --c-muted-dark: #9fb3cc;   /* texte secondaire sur fond sombre */

  --c-success: #12855f;
  --c-error: #c62f3d;

  /* --- Typographie ------------------------------------------------------- */
  --f-display: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Echelle fluide : s'adapte a la largeur sans point de rupture. */
  --t-hero: clamp(2.4rem, 1.35rem + 4.6vw, 4.6rem);
  --t-h2: clamp(1.85rem, 1.25rem + 2.4vw, 3rem);
  --t-h3: clamp(1.15rem, 1.03rem + 0.5vw, 1.4rem);
  --t-lead: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem);
  --t-body: 1rem;
  --t-sm: 0.9rem;
  --t-xs: 0.8rem;

  /* --- Espacement -------------------------------------------------------- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  /* Respiration verticale des sections — genereuse, c'est ce qui fait « haut
     de gamme ». */
  --s-section: clamp(4.5rem, 3rem + 7vw, 9rem);

  --wrap: 1200px;
  --wrap-narrow: 760px;

  /* --- Rayons ------------------------------------------------------------ */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-full: 999px;

  /* --- Ombres (discretes : jamais de halo diffus) ------------------------- */
  --sh-xs: 0 1px 2px rgba(10, 18, 32, 0.04);
  --sh-sm: 0 2px 6px rgba(10, 18, 32, 0.05), 0 1px 2px rgba(10, 18, 32, 0.04);
  --sh: 0 8px 24px rgba(10, 18, 32, 0.07), 0 2px 6px rgba(10, 18, 32, 0.04);
  --sh-lg: 0 18px 48px rgba(10, 18, 32, 0.11), 0 4px 12px rgba(10, 18, 32, 0.05);
  --sh-accent: 0 10px 28px rgba(46, 155, 240, 0.28);

  /* --- Mouvement --------------------------------------------------------- */
  --e-out: cubic-bezier(0.22, 1, 0.36, 1);
  --e-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 160ms;
  --d: 260ms;
  --d-slow: 620ms;

  --header-h: 76px;
  --bar-h: 40px; /* bandeau d'annonce « tout le Québec » en haut de page */
}

/* --------------------------------------------------------------------------
   Remise a zero
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Les ancres ne passent pas sous le bandeau + l'en-tete fixes. */
  scroll-padding-top: calc(var(--bar-h) + var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: var(--t-hero);
}
h2 {
  font-size: var(--t-h2);
}
h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Mise en page
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--s-section);
  position: relative;
}

.section--paper {
  background: var(--c-paper);
}

.section--dark {
  background: var(--c-navy-900);
  color: var(--c-white);
}

/* En-tete de section : surtitre + titre + chapeau. */
.section__head {
  max-width: var(--wrap-narrow);
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--f-display);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent-700);
  margin-bottom: var(--s-4);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--c-accent);
  border-radius: var(--r-full);
}

.section--dark .eyebrow {
  color: var(--c-accent);
}

.section__head--center .eyebrow {
  justify-content: center;
}

.lead {
  font-size: var(--t-lead);
  color: var(--c-muted);
  margin-top: var(--s-5);
}

.section--dark .lead {
  color: var(--c-muted-dark);
}

/* --------------------------------------------------------------------------
   Utilitaires
   -------------------------------------------------------------------------- */

/* Masque visuellement mais reste lu par les lecteurs d'ecran. */
.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;
}

/* Lien d'evitement : premier element focusable de la page. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--c-navy);
  color: var(--c-white);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 600;
  transition: top var(--d) var(--e-out);
}

.skip-link:focus-visible {
  top: 0;
}

/* Anneau de focus unique pour tout le site. */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.section--dark :focus-visible {
  outline-color: #7cc4ff;
}

/* --------------------------------------------------------------------------
   Apparition au defilement
   L'element est deja dans le flux : on n'anime que l'opacite et la translation
   (pas de reflow). `.is-in` est ajoute par IntersectionObserver.
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--d-slow) var(--e-out),
    transform var(--d-slow) var(--e-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

/* Si JS est absent, rien ne doit rester invisible. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Mouvement reduit — on respecte le reglage systeme.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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