:root {
  --bm-bg: #f4f5fb;
  --bm-panel: #ffffff;
  --bm-primary: #20508E;          /* Bleu Bon Matin */
  --bm-primary-dark: #133055;     /* Bleu plus foncé */
  --bm-accent: #f9b233;           /* Accent chaud */
  --bm-text: #1f2933;
  --radius: 1rem;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.10);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bm-bg);
  color: var(--bm-text);
  line-height: 1.7;
  font-size: 18px;
}

a { color: var(--bm-primary); text-decoration: none; }

.container {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

/* HEADER & NAVIGATION ------------------------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .25rem 0;
}

.logo img {
  height: 85px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--bm-primary);
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: .6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--bm-primary);
  color: #fff;
  border: none;
}

.btn-primary:hover,
.btn-primary.active {
  background: var(--bm-primary-dark);
}

.btn-secondary {
  border: 1px solid var(--bm-primary);
  color: var(--bm-primary);
  background: #fff;
}


/* HERO ---------------------------------------------------- */

.hero {
  padding: 2.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}

.hero-image img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  object-position: top;
  border-radius: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: .75rem;
}

h1 {
  font-size: 2rem;
  margin: .5rem 0 1rem;
}

.lead {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* SECTIONS & CARTES -------------------------------------- */

/* Sections nettement plus serrées */
.section {
  padding: 0.75rem 0 1rem;  /* très compact */
}

/* Si une section suit une autre, on réduit encore */
.section + .section {
  padding-top: 0.5rem;
}

/* Espace sous le H1 */
.page-header {
  margin-bottom: 1rem;   /* au lieu de 1.5 rem */
}

/* Espace sous les sous-titres */
.section h2 {
  margin-bottom: 0.75rem;   /* très serré */
}

.cards-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--bm-panel);
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* FOOTER -------------------------------------------------- */

.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  padding: 2rem 0;
  font-size: 0.95rem;
}

.footer-inner {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
}

.footer-memberships a {
  color: #bfdbfe;
  text-decoration: underline;
}

.footer-meta {
  color: #9ca3af;
  margin-top: 1rem;
}

/* MOBILE -------------------------------------------------- */

.nav-toggle {
  display: none;
}

@media (max-width: 800px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .logo img {
    height: 65px;
  }

  .header-inner {
    padding: .4rem 0;
  }

  .nav-toggle {
    display: inline-block;
    border: 1px solid #d1d5db;
    background: #fff;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .site-nav {
    position: absolute;
    top: 100px; /* à ajuster au besoin selon la hauteur réelle du header */
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem;
    flex-direction: column;
    display: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .site-nav.open {
    display: flex;
  }
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.5rem;
}

.steps-list h3 {
  margin-bottom: .25rem;
}

/* Liens normaux dans la nav */
.site-nav a:not(.btn-primary),
.site-nav a:not(.btn-primary):visited {
  color: #1e293b;
}

/* Hover des liens normaux */
.site-nav a:not(.btn-primary):hover,
.site-nav a:not(.btn-primary):focus {
  color: var(--bm-primary);
}

/* Bouton S’abonner */
.site-nav .btn-primary,
.site-nav .btn-primary:visited {
  background: var(--bm-primary);
  color: #fff !important;
  border: none;
}

/* Bouton actif */
.site-nav .btn-primary:hover,
.site-nav .btn-primary.active {
  background: var(--bm-primary-dark);
  color: #fff !important;
}

/* ===========================
   FORMULAIRE D’ABONNEMENT
   =========================== */

.formular {
  margin: 0;
}

/* Chaque grande section du formulaire */
.form-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.form-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.form-section h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}

.form-section h3,
.form-section h4 {
  margin: 1rem 0 .4rem;
}

/* Lignes du formulaire */
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;           /* un peu moins d’espace */
  margin-bottom: .7rem;
}

/* Libellés des champs */
.form-row label {
  font-weight: 500;
}

/* Labels à gauche, champs à droite (desktop) */
.form-row > label:first-child {
  min-width: 170px;
}

/* Champs texte, select, textarea (desktop) */
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  padding: .4rem .55rem;
  border-radius: .5rem;
  border: 1px solid #d1d5db;
  font-size: 0.95rem;
  font-family: inherit;
  flex: 1 1 220px;
  max-width: 100%;
  background: #fff;
}

/* Textarea par défaut */
.form-row textarea {
  min-height: 70px;
  resize: vertical;
}

/* Petits textes (poste, etc.) */
.petit {
  font-size: .85rem;
  color: #6b7280;
}

/* Astérisque / slogan pour champs obligatoires */
.slogan {
  color: #dc2626;
  font-weight: 600;
}

/* Radio + checkbox en ligne plus lisible */
.form-row input[type="radio"],
.form-row input[type="checkbox"] {
  margin-right: .4rem;
}

/* ===== Mobile : tout en colonne + champs compacts ===== */
@media (max-width: 800px) {

  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    margin-bottom: .5rem;
  }

  .form-row > label:first-child {
    min-width: 0;
  }

  .form-row label {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  /* Champs 1 ligne sur mobile */
  .form-row input[type="text"],
  .form-row input[type="email"],
  .form-row input[type="tel"],
  .form-row input[type="number"],
  .form-row select {
    box-sizing: border-box;
    width: 100%;
    padding: .2rem .55rem;
    font-size: 0.9rem;
    line-height: 1.2;
    height: 2.4rem !important;   /* force une hauteur compacte */
  }

  /* Textarea : plus bas mais pas gigantesque */
  .form-row textarea {
    box-sizing: border-box;
    width: 100%;
    padding: .25rem .55rem;
    font-size: 0.9rem;
    line-height: 1.4;
    min-height: 3.2rem !important;  /* écrase rows="6" */
    height: auto !important;
    max-height: 6rem;
  }
}


/* Bloc déroulant des conditions */
.conditions-box {
  max-height: 200px;
  overflow-y: scroll;
  padding: 1rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: .75rem;
  margin-top: .75rem;
  line-height: 1.55;
}

.conditions-box::-webkit-scrollbar {
  width: 10px;
}

.conditions-box::-webkit-scrollbar-thumb {
  background: #c5cad3;
  border-radius: .5rem;
}

.tarif-highlight {
  margin-top: 1rem;
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: #eff6ff; /* bleu très pâle */
  border: 1px solid #bfdbfe;
}

/* ============================================
   Grille des services — 2 rangées × 2 cartes
   ============================================ */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));  /* 2 cartes par ligne */
  margin-top: 1.25rem;
}

/* Mobile : 1 carte par ligne */
@media (max-width: 800px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Cartes de service */
.service-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  border: 3px solid transparent;
  transition: transform .15s, box-shadow .15s;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.service-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.3rem;
}

/* Icône ronde au-dessus du titre */
.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: .75rem;
}

/* Bloc tarif bien mis en évidence */
.service-card .tarif {
  margin-top: 1rem;
  padding: .6rem .8rem;
  background: #eff6ff;           /* bleu très pâle */
  border-radius: .5rem;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

/* Couleurs distinctes par service (bordure + fond de l’icône) */
.service-1 { border-color: #0069A7; }
.service-1 .service-icon { background: rgba(0,105,167,0.12); }

.service-2 { border-color: #f9b233; }
.service-2 .service-icon { background: rgba(249,178,51,0.15); }

.service-3 { border-color: #54a845; }
.service-3 .service-icon { background: rgba(84,168,69,0.15); }

.service-4 { border-color: #bc4b51; }
.service-4 .service-icon { background: rgba(188,75,81,0.15); }

/* Accueil : 4 services alignés sur une seule ligne */
.home-services .services-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Sur mobile / tablette, on repasse en 1 ou 2 colonnes pour garder ça lisible */
@media (max-width: 1024px) {
  .home-services .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .home-services .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================
   FAQ – Accordéon
   ========================== */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.faq-accordion details {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: .75rem 1rem;
  box-shadow: var(--shadow-soft);
}

/* En-tête cliquable */
.faq-accordion summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Retirer le triangle par défaut (selon navigateur) */
.faq-accordion summary::-webkit-details-marker {
  display: none;
}

/* Petit + / - devant la question */
.faq-accordion summary::before {
  content: "+";
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bm-primary);
}

.faq-accordion details[open] summary::before {
  content: "−";
}

/* Contenu de la réponse */
.faq-accordion .faq-content {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Services aux abonnés — grille sur 2 lignes */
.abonnes-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .abonnes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .abonnes-grid {
    grid-template-columns: 1fr;
  }
}

/* Cartes pour abonnés */
.abonnes-card {
  padding: 1.8rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  text-align: center;
  border: 2px solid var(--bm-primary);
}

.abonnes-card h2 {
  margin-top: .2rem;
  font-size: 1.25rem;
}

.abonnes-card p {
  margin: 0 0 1.2rem;
  font-size: .95rem;
}

.abonnes-card .btn-primary,
.abonnes-card .btn-secondary {
  display: inline-block;
  margin-top: .6rem;
}

/* Couleurs de bordure par type de service */
.abonnes-card--absence {
  border-color: var(--bm-primary);        /* bleu principal */
}

.abonnes-card--maj {
  border-color: var(--bm-primary-dark);   /* bleu plus foncé */
}

.abonnes-card--dem {
  border-color: var(--bm-accent);         /* jaune accent */
}

.abonnes-card--factu {
  border-color: #54a845;                  /* vert doux */
}

.abonnes-card--annul {
  border-color: #bc4b51;                  /* rouge framboise */
}

/* Icône en haut des cartes abonnés */
.service-icon {
  font-size: 2rem;
  margin-bottom: .75rem;
}

/* Correctif forcé pour la hauteur des champs sur mobile */
@media (max-width: 800px) {

  /* Lignes du formulaire plus serrées */
  .formular .form-row {
    gap: .25rem !important;
    margin-bottom: .5rem !important;
  }

  /* Champs texte / courriel / téléphone / nombre / select */
  .formular .form-row input[type="text"],
  .formular .form-row input[type="email"],
  .formular .form-row input[type="tel"],
  .formular .form-row input[type="number"],
  .formular .form-row select {
    box-sizing: border-box;
    width: 100%;
    padding: .25rem .55rem !important;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
    height: 2.4rem !important;
  }

  /* Textareas plus compacts aussi */
  .formular .form-row textarea {
    box-sizing: border-box;
    width: 100%;
    padding: .3rem .55rem !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    min-height: 3.5rem !important;
    height: auto !important;
  }
}

/* ===== Correctif global formulaire mobile ===== */
@media (max-width: 800px) {

  /* On remet les lignes en "row" plutôt qu'en colonne */
  .formular .form-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;        /* annule la version précédente */
    align-items: center;
    gap: .35rem .75rem;
    margin-bottom: .5rem;
  }

  /* Labels plus compacts */
  .formular .form-row > label {
    flex: 0 0 130px;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0;
  }

  /* Champs texte / courriel / téléphone / nombre / select */
  .formular .form-row input[type="text"],
  .formular .form-row input[type="email"],
  .formular .form-row input[type="tel"],
  .formular .form-row input[type="number"],
  .formular .form-row select {
    box-sizing: border-box;
    flex: 1 1 150px;
    width: 100%;
    padding: .25rem .55rem;
    font-size: 0.9rem;
    line-height: 1.2;
    height: 2.4rem;         /* hauteur fixe compacte */
    min-height: 2.4rem;
  }

  /* Textareas (notes, infos supplémentaires) */
  .formular .form-row textarea {
    box-sizing: border-box;
    flex: 1 1 100%;
    width: 100%;
    padding: .3rem .55rem;
    font-size: 0.9rem;
    line-height: 1.3;
    min-height: 3.5rem;     /* petit bloc, pas un pavé */
    height: auto;
    max-height: 6rem;
  }
}

/* ============================
   Cartes "À qui s’adresse..."
   (accueil + fonctionnement)
   ============================ */

.cards-grid--audiences .card {
  position: relative;
  border-radius: 1.25rem;
  border: 2px solid #004b92;           /* bleu par défaut */
  padding-top: 2.75rem;                /* laisser la place pour l’icône */
}

/* Icône circulaire dans l’angle */
.cards-grid--audiences .card-icon {
  position: absolute;
  top: 1.1rem;
  left: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #004b92;
  color: #ffffff;
  font-size: 1.2rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Variantes de couleur par type de clientèle */
.card--solo {
  border-color: #004b92;
}
.card--solo .card-icon {
  background: #004b92;
}

.card--aidants {
  border-color: #f97316;              /* orange doux */
}
.card--aidants .card-icon {
  background: #f97316;
}

.card--organismes {
  border-color: #16a34a;              /* vert */
}
.card--organismes .card-icon {
  background: #16a34a;
}
