/* ============================================================
   FIRE Québec — Design system
   CSS vanilla, aucune dépendance. Mobile-first, responsive.
   ============================================================ */

:root {
  --encre: #10233b;          /* bleu marine — titres, header */
  --encre-doux: #1d3a5f;
  --accent: #0e7a4d;         /* vert « prime » — CTA */
  --accent-fonce: #0a5c3a;
  --accent-clair: #e6f4ec;
  --fond: #f5f7fa;           /* fond de page */
  --carte: #ffffff;
  --texte: #1b2a3a;
  --texte-doux: #5b6b7c;
  --bordure: #e2e8f0;
  --avert-bg: #fff8e6;       /* bandeau de divulgation */
  --avert-bord: #e8b93c;
  --rayon: 12px;
  --ombre: 0 2px 12px rgba(16, 35, 59, 0.08);
  --largeur: 1080px;
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--police);
  color: var(--texte);
  background: var(--fond);
  line-height: 1.65;
  font-size: 1.02rem;
}

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

a { color: var(--encre-doux); }
a:hover { color: var(--accent-fonce); }

/* ---------- Mise en page ---------- */
.conteneur {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section.bloc { padding: 3rem 0; }
section.bloc:first-of-type { padding-top: 2rem; }

h1, h2, h3 { color: var(--encre); line-height: 1.25; margin-top: 0; }
h1 { font-size: 2.1rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.55rem; margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.sous-titre { color: var(--texte-doux); font-size: 1.1rem; max-width: 44rem; }

/* ---------- En-tête / navigation ---------- */
.site-header {
  background: var(--carte);
  border-bottom: 1px solid var(--bordure);
  position: sticky;
  top: 0;
  z-index: 50;
}
.barre-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  max-width: var(--largeur);
  margin: 0 auto;
}
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--encre);
  text-decoration: none;
  white-space: nowrap;
}
.logo .et { color: var(--accent); }
.nav-liens {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-liens a {
  text-decoration: none;
  color: var(--texte);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}
.nav-liens a:hover, .nav-liens a.actif {
  background: var(--accent-clair);
  color: var(--accent-fonce);
}

/* ---------- Bandeau de divulgation ---------- */
.bandeau-divulgation {
  background: var(--avert-bg);
  border-bottom: 2px solid var(--avert-bord);
  font-size: 0.88rem;
  color: #5c4a12;
}
.bandeau-divulgation .conteneur { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.bandeau-divulgation a { color: #5c4a12; font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--encre) 0%, var(--encre-doux) 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
}
.hero h1 { color: #fff; font-size: 2.4rem; }
.hero p { color: #cdd9e6; max-width: 42rem; font-size: 1.12rem; }
.hero .cta-groupe { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.btn-secondaire {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-secondaire:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }
.btn-clair {
  background: #fff;
  color: var(--encre);
  border: 2px solid var(--bordure);
}
.btn-clair:hover { border-color: var(--accent); color: var(--accent-fonce); background: #fff; }
.btn[aria-disabled="true"], .btn.lien-a-venir {
  background: #c9d4de;
  border-color: #c9d4de;
  color: #5b6b7c;
  cursor: not-allowed;
}
.lien-note { font-weight: 400; font-size: 0.85em; }
.lien-officiel { font-size: 0.9rem; }

/* ---------- Cartes d'offres ---------- */
.grille-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.carte {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
}
.carte.mise-avant { border: 2px solid var(--accent); }
.etiquette {
  position: absolute;
  top: -0.8rem;
  left: 1.25rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.carte .montant {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-fonce);
  line-height: 1.1;
}
.carte .institution { font-weight: 700; color: var(--encre); font-size: 1.1rem; }
.carte p { margin: 0; color: var(--texte-doux); font-size: 0.95rem; }
.carte .actions { margin-top: auto; padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.verifie {
  font-size: 0.82rem;
  color: var(--texte-doux);
  font-style: italic;
}

/* ---------- Étapes « Comment ça marche » ---------- */
.etapes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  counter-reset: etape;
  list-style: none;
  padding: 0;
}
.etapes li {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 1.5rem 1.25rem 1.25rem;
  counter-increment: etape;
  position: relative;
}
.etapes li::before {
  content: counter(etape);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--encre);
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.etapes strong { display: block; color: var(--encre); margin-bottom: 0.25rem; }
.etapes p { margin: 0; color: var(--texte-doux); font-size: 0.95rem; }

/* ---------- Tableau comparatif ---------- */
.tableau-wrapper { overflow-x: auto; margin-top: 1.5rem; border-radius: var(--rayon); box-shadow: var(--ombre); }
table.comparatif {
  width: 100%;
  border-collapse: collapse;
  background: var(--carte);
  font-size: 0.95rem;
  min-width: 640px;
}
table.comparatif caption { text-align: left; padding: 0.75rem 0; color: var(--texte-doux); font-size: 0.9rem; }
table.comparatif th, table.comparatif td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--bordure);
  vertical-align: top;
}
table.comparatif thead th {
  background: var(--encre);
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.comparatif tbody tr:last-child th,
table.comparatif tbody tr:last-child td { border-bottom: none; }
table.comparatif tbody tr:hover { background: #f0f6fb; }
.prime-montant { font-weight: 800; color: var(--accent-fonce); white-space: nowrap; }
.note-qc {
  background: #fdecec;
  border-left: 4px solid #c0392b;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  padding: 0.25rem 1.1rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--encre);
  padding: 0.9rem 0;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+ "; color: var(--accent); font-weight: 800; }
.faq details[open] summary::before { content: "− "; }
.faq details p, .faq details ul { color: var(--texte-doux); }
.faq details > *:last-child { padding-bottom: 0.9rem; }

/* ---------- Guides ---------- */
.article-guide { background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 2rem; box-shadow: var(--ombre); }
.article-guide h2 { margin-top: 2rem; }
.boite-info {
  background: var(--accent-clair);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}
.boite-avert {
  background: var(--avert-bg);
  border-left: 4px solid var(--avert-bord);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.liste-guides { list-style: none; padding: 0; display: grid; gap: 0.75rem; margin-top: 1rem; }
.liste-guides a {
  display: block;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--encre);
}
.liste-guides a:hover { border-color: var(--accent); color: var(--accent-fonce); }
.liste-guides span { display: block; font-weight: 400; color: var(--texte-doux); font-size: 0.9rem; }
ol.etapes-guide { padding-left: 1.4rem; }
ol.etapes-guide li { margin-bottom: 0.9rem; }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--encre);
  color: #cdd9e6;
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: #fff; }
.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .bas { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1rem; color: #9fb0c3; font-size: 0.85rem; }

/* ---------- Fil d'Ariane ---------- */
.fil-ariane { font-size: 0.88rem; color: var(--texte-doux); padding: 1rem 0 0; }
.fil-ariane a { color: var(--texte-doux); }

/* ---------- Badges de codes de parrainage ---------- */
.code-parrainage {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--encre);
  color: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.75rem 0.6rem 1rem;
  margin: 0.5rem 0;
}
.code-parrainage strong {
  font-family: ui-monospace, "SF Mono", "Courier New", monospace;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}
.btn-copier {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-copier:hover { background: var(--accent-fonce); }

/* ---------- Tableau de calcul ---------- */
table.calcul { min-width: 560px; }
table.calcul td.prime-montant { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .barre-nav { flex-direction: column; align-items: flex-start; }
  .article-guide { padding: 1.25rem; }
  section.bloc { padding: 2rem 0; }
}
