/* Incorporation Québec — styles de base (mobile d'abord) */
:root {
  --bleu: #003DA5;
  --bleu-fonce: #002E7A;
  --bleu-tres-fonce: #0A1F44;
  --or: #FFC72C;
  --or-fonce: #B98A00;
  --encre: #1A2333;
  --gris: #5A6577;
  --fond-clair: #F2F5FA;
  --blanc: #FFFFFF;
  --bordure: #DCE3EE;
  --rayon: 14px;
  --ombre: 0 2px 12px rgba(10, 31, 68, 0.08);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--encre);
  background: var(--blanc);
  line-height: 1.65;
  font-size: 1.0625rem;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.25;
  color: var(--bleu-tres-fonce);
  margin-top: 0;
}

h1 { font-size: 1.9rem; letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-top: 0; }

a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
  border-radius: 4px;
}

img, svg { max-width: 100%; }

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

.conteneur {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.conteneur-etroit { max-width: 780px; }

/* ---------- En-tête ---------- */
.entete {
  background: var(--blanc);
  border-bottom: 1px solid var(--bordure);
}
.entete-contenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  min-height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bleu-tres-fonce);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  min-height: 44px;
}
.logo svg { flex: 0 0 auto; }
.logo span { display: block; }
.logo small {
  display: block;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--gris);
}

.bouton-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--fond-clair);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bleu-tres-fonce);
  cursor: pointer;
}
html:not(.js) .bouton-menu { display: none; }

.nav-principal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
html.js .nav-principal { display: none; }
html.js body.nav-ouvert .nav-principal { display: block; }
.nav-principal {
  border-top: 1px solid var(--bordure);
  padding-top: 8px;
  padding-bottom: 12px;
}
.nav-principal a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--bleu-tres-fonce);
  border-bottom: 1px solid var(--fond-clair);
}
.nav-principal a[aria-current="page"] { color: var(--bleu); }

@media (min-width: 760px) {
  .bouton-menu { display: none; }
  html.js .nav-principal { display: block; }
  .nav-principal { border-top: 0; padding: 0; }
  .nav-principal ul { flex-direction: row; gap: 4px; }
  .nav-principal a { border-bottom: 0; padding: 10px 14px; min-height: 44px; border-radius: 10px; }
  .nav-principal a:hover { background: var(--fond-clair); }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--bleu-fonce) 0%, var(--bleu) 70%);
  color: var(--blanc);
  padding-top: 44px;
  padding-bottom: 48px;
  min-height: calc(100vh - 70px); /* repli navigateurs anciens */
  min-height: calc(100svh - 70px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 45% at 50% 28%, rgba(255, 199, 44, 0.16), transparent 70%);
  pointer-events: none;
}
.hero .conteneur { position: relative; z-index: 1; }
.hero h1 { color: var(--blanc); font-size: 2.05rem; margin-bottom: 0.6rem; }
.hero p.sous-titre {
  font-size: 1.1rem;
  color: #D7E3F8;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}
.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--or);
  border: 1px solid var(--or);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 1rem;
}
.cta-groupe {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 22rem;
}
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.bouton-primaire { background: var(--or); color: var(--bleu-tres-fonce); }
.bouton-primaire:hover { background: #FFD45E; color: var(--bleu-tres-fonce); }
.bouton-secondaire {
  background: transparent;
  color: var(--blanc);
  border-color: rgba(255, 255, 255, 0.7);
}
.bouton-secondaire:hover { border-color: var(--blanc); color: var(--blanc); background: rgba(255,255,255,0.08); }

/* Bandeau de confiance */
.bandeau-confiance {
  background: var(--bleu-tres-fonce);
  color: #C9D6EE;
  font-size: 0.92rem;
}
.bandeau-confiance ul {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bandeau-confiance li::before {
  content: "✓ ";
  color: var(--or);
  font-weight: 700;
}
@media (min-width: 760px) {
  .bandeau-confiance ul { flex-direction: row; gap: 28px; justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding-top: 44px; padding-bottom: 44px; }
.section-claire { background: var(--fond-clair); }

.grille-cartes {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}
@media (min-width: 760px) {
  .grille-cartes { grid-template-columns: repeat(3, 1fr); }
  .grille-cartes.deux { grid-template-columns: repeat(2, 1fr); }
}

.carte {
  display: flex;
  flex-direction: column;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 22px;
  box-shadow: var(--ombre);
  text-decoration: none;
  color: var(--encre);
  min-height: 44px;
}
a.carte:hover { border-color: var(--bleu); }
a.carte:hover h3 { color: var(--bleu); }
.carte h3 { margin-top: 0.4rem; }
.carte .prix-repere {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--bleu);
}
.carte .lien-suite {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 700;
  color: var(--bleu);
}
.carte .lien-suite a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 4px;
}
.carte-statique { cursor: default; }
.etiquette {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bleu-fonce);
  background: #E3ECFB;
  border-radius: 999px;
  padding: 4px 12px;
}

/* Étapes */
.etapes { list-style: none; margin: 1.5rem 0 0; padding: 0; counter-reset: etape; display: grid; gap: 16px; }
.etapes li {
  counter-increment: etape;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 20px 20px 20px 76px;
  position: relative;
  box-shadow: var(--ombre);
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bleu);
  color: var(--blanc);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.etapes h3 { margin-top: 0; }

/* Tableaux */
.tableau-deroulant { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--bordure); border-radius: var(--rayon); }
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.98rem;
  background: var(--blanc);
}
caption {
  text-align: left;
  font-weight: 700;
  padding: 14px 16px;
  background: var(--fond-clair);
  color: var(--bleu-tres-fonce);
}
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--bordure); vertical-align: top; }
th { background: var(--bleu-tres-fonce); color: var(--blanc); font-weight: 700; }
th:first-child { border-top-left-radius: 0; }
tr td:first-child { font-weight: 600; }

/* Encadrés */
.encadre {
  border-radius: var(--rayon);
  padding: 20px;
  margin: 1.5rem 0;
  border: 1px solid var(--bordure);
  background: var(--fond-clair);
}
.encadre-avertissement {
  background: #FFF8E6;
  border-left: 5px solid var(--or);
}
.encadre-info {
  background: #EAF1FD;
  border-left: 5px solid var(--bleu);
}
.encadre h3, .encadre p:last-child { margin-bottom: 0; }
.encadre h3 { margin-top: 0; }

/* Table des matières */
.tdm {
  background: var(--fond-clair);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 20px 22px;
  margin: 1.5rem 0 2rem;
}
.tdm h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tdm ol { margin: 0; padding-left: 1.4rem; }
.tdm li { margin: 0; }
.tdm a { display: inline-block; padding: 6px 0; min-height: 44px; text-decoration: none; font-weight: 600; }

/* FAQ */
details.faq {
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  margin-bottom: 12px;
  background: var(--blanc);
  box-shadow: var(--ombre);
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--bleu-tres-fonce);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fond-clair);
  color: var(--bleu);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
details.faq[open] summary::after { content: "–"; }
details.faq .reponse { padding: 0 18px 18px; }
details.faq .reponse p:last-child { margin-bottom: 0; }

/* Bandeau CTA */
.bandeau-cta {
  background: linear-gradient(160deg, var(--bleu-fonce), var(--bleu));
  color: var(--blanc);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  margin: 2.5rem 0 0;
}
.bandeau-cta h2 { color: var(--blanc); }
.bandeau-cta p { color: #D7E3F8; }
.bandeau-cta .bouton { margin-top: 0.5rem; }

/* ---------- Pied de page ---------- */
.pied {
  background: var(--bleu-tres-fonce);
  color: #C9D6EE;
  padding-top: 36px;
  padding-bottom: 36px;
  font-size: 0.95rem;
}
.pied a { color: var(--blanc); }
.pied nav ul { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pied nav a { display: inline-block; min-height: 44px; padding: 8px 0; text-decoration: none; font-weight: 600; }
.divulgation {
  border-left: 4px solid var(--or);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 14px 16px;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: #E4EBF9;
}
.pied .note-bas { font-size: 0.85rem; color: #93A3C4; }
@media (min-width: 760px) {
  .pied nav ul { flex-direction: row; gap: 24px; }
}

/* Fil d'Ariane */
.fil-ariane { font-size: 0.88rem; color: var(--gris); padding-top: 18px; }
.fil-ariane a { color: var(--gris); }

/* Titre de page intérieure */
.entete-page { padding-top: 28px; padding-bottom: 8px; }
.entete-page .accroche { font-size: 1.12rem; color: var(--gris); max-width: 44rem; }
.maj { font-size: 0.88rem; color: var(--gris); }
@media (max-width: 759px) {
  .entete-page { padding-top: 20px; }
  .entete-page .accroche { font-size: 1.05rem; }
}

/* Tableaux empilés sur mobile : chaque ligne devient une carte étiquetée */
@media (max-width: 759px) {
  .tableau-deroulant { overflow-x: visible; border: 0; border-radius: 0; background: transparent; }
  .tableau-deroulant table { min-width: 0; background: transparent; }
  .tableau-deroulant caption { border-radius: var(--rayon); margin-bottom: 12px; }
  .tableau-deroulant thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .tableau-deroulant tbody, .tableau-deroulant tr, .tableau-deroulant td { display: block; }
  .tableau-deroulant tr {
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    margin-bottom: 14px;
    background: var(--blanc);
    box-shadow: var(--ombre);
  }
  .tableau-deroulant td { border-top: 1px solid var(--fond-clair); padding: 10px 16px; }
  .tableau-deroulant tr td:first-child {
    border-top: 0; background: var(--fond-clair); font-weight: 700;
    color: var(--bleu-tres-fonce); border-radius: var(--rayon) var(--rayon) 0 0;
  }
  .tableau-deroulant td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--gris); margin-bottom: 2px;
  }
}
