/* ==========================================================================
   MISS BONS PLANS — CHARTE GRAPHIQUE
   Feuille de style unique du site. Tout le design tient dans les variables
   ci-dessous : changez une couleur ici, tout le site suit.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. JETONS DE DESIGN (design tokens)
   -------------------------------------------------------------------------- */
:root {

  /* — Couleurs de marque — */
  --rose:          #e83e8c;   /* couleur principale : titres, liens, boutons */
  --rose-fonce:    #c22a70;   /* survol, contrastes forts                    */
  --rose-clair:    #ff9ec9;   /* accents décoratifs                          */
  --rose-poudre:   #ffe4f2;   /* fonds de blocs doux                         */
  --lilas:         #b06ae8;   /* couleur secondaire : dégradés, badges       */
  --lilas-clair:   #f3e8ff;
  --peche:         #ffb3a7;   /* couleur tertiaire : chaleur, promos         */
  --peche-clair:   #fff0ec;
  --or:            #d9a441;   /* étoiles, mentions « top »                   */

  /* — Neutres — */
  --encre:         #1e1420;   /* texte principal (presque noir, teinté rose) */
  --gris-fonce:    #4a4550;
  --gris:          #7a7480;
  --gris-clair:    #cfc9d4;
  --brume:         #faf6fb;   /* fond de page                                */
  --blanc:         #ffffff;

  /* — Sémantique — */
  --succes:        #17a67c;
  --succes-fond:   #e6f7f1;
  --alerte:        #e0483d;
  --alerte-fond:   #fdeceb;
  --info:          #3b7dd8;
  --info-fond:     #eaf2fd;

  /* — Dégradés — */
  --degrade-marque: linear-gradient(90deg, var(--rose), var(--lilas), var(--peche), var(--rose));
  --degrade-doux:   linear-gradient(135deg, #fff7fb 0%, #ffe4f2 25%, #f3e8ff 55%, #fff0ec 80%, #fff7fb 100%);

  /* — Typographie — */
  --police-titre: "Poppins", "Segoe UI", Tahoma, sans-serif;
  --police-texte: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --t-xs:   .78rem;
  --t-sm:   .9rem;
  --t-base: 1.05rem;
  --t-lg:   1.2rem;
  --t-xl:   1.45rem;
  --t-2xl:  1.9rem;
  --t-3xl:  clamp(1.9rem, 4.5vw, 2.9rem);
  --t-4xl:  clamp(2.3rem, 6vw, 3.8rem);

  /* — Espacements (échelle de 4 px) — */
  --e-1: 4px;  --e-2: 8px;  --e-3: 12px; --e-4: 16px;
  --e-5: 24px; --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px;

  /* — Rayons — */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pilule: 999px;

  /* — Ombres — */
  --ombre-1: 0 2px 10px rgba(30,20,32,.06);
  --ombre-2: 0 8px 28px rgba(232,62,140,.12);
  --ombre-3: 0 18px 48px rgba(232,62,140,.20);

  /* — Gabarit — */
  --largeur-max: 1140px;
  --largeur-texte: 720px;
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--police-texte);
  font-size: var(--t-base);
  line-height: 1.72;
  color: var(--encre);
  background: var(--brume);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--police-titre); line-height: 1.18; letter-spacing: -.02em; }
h1 { font-size: var(--t-4xl); font-weight: 800; }
h2 { font-size: var(--t-3xl); font-weight: 800; }
h3 { font-size: var(--t-xl);  font-weight: 700; }
h4 { font-size: var(--t-lg);  font-weight: 700; }

p  { margin: 0 0 var(--e-4); }
a  { color: var(--rose); text-decoration: none; }
a:hover { color: var(--rose-fonce); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
strong { font-weight: 700; color: var(--encre); }
hr { border: 0; height: 1px; background: var(--gris-clair); margin: var(--e-6) 0; }

.conteneur { width: 100%; max-width: var(--largeur-max); margin: 0 auto; padding: 0 var(--e-5); }
.texte-degrade {
  background: var(--degrade-marque); background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: reflet 7s linear infinite;
}
@keyframes reflet { to { background-position: 300% center; } }

.saut-contenu {
  position: absolute; left: -9999px; top: 0;
  background: var(--rose); color: #fff; padding: var(--e-3) var(--e-4);
  border-radius: 0 0 var(--r-sm) 0; z-index: 100;
}
.saut-contenu:focus { left: 0; }

/* --------------------------------------------------------------------------
   3. EN-TÊTE ET NAVIGATION
   -------------------------------------------------------------------------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rose-poudre);
}
.entete-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--e-4); min-height: 68px;
}
.marque { font-family: var(--police-titre); font-weight: 800; font-size: 1.25rem; color: var(--rose); letter-spacing: -.03em; }
.marque:hover { text-decoration: none; }
.marque span { color: var(--lilas); }

.nav-principale { display: flex; gap: var(--e-5); flex-wrap: wrap; }
.nav-principale a { color: var(--gris-fonce); font-weight: 600; font-size: var(--t-sm); }
.nav-principale a:hover, .nav-principale a[aria-current="page"] { color: var(--rose); text-decoration: none; }

/* --------------------------------------------------------------------------
   4. COMPOSANTS
   -------------------------------------------------------------------------- */

/* Boutons */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: var(--r-pilule);
  font-family: var(--police-titre); font-weight: 700; font-size: 1rem;
  background: var(--rose); color: #fff; border: 2px solid var(--rose);
  box-shadow: var(--ombre-2); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--rose-fonce); border-color: var(--rose-fonce); color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-3); }
.btn-secondaire { background: #fff; color: var(--rose); box-shadow: var(--ombre-1); }
.btn-secondaire:hover { background: var(--rose-poudre); color: var(--rose-fonce); }
.btn-petit { padding: 9px 18px; font-size: var(--t-sm); }

/* Badges / étiquettes */
.badge {
  display: inline-block; padding: 5px 14px; border-radius: var(--r-pilule);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em;
  background: var(--rose-poudre); color: var(--rose-fonce);
}
.badge-lilas { background: var(--lilas-clair); color: #7a3fb0; }
.badge-peche { background: var(--peche-clair); color: #c0553f; }
.badge-succes { background: var(--succes-fond); color: var(--succes); }

/* Cartes */
.carte {
  background: #fff; border: 1px solid var(--rose-poudre); border-radius: var(--r-lg);
  padding: var(--e-5); box-shadow: var(--ombre-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; gap: var(--e-3);
}
a.carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-2); border-color: var(--rose-clair); text-decoration: none; }
.carte h3 { color: var(--encre); }
.carte p { color: var(--gris-fonce); font-size: var(--t-sm); margin: 0; }
.carte-emoji { font-size: 2rem; line-height: 1; }
.carte-meta { font-size: var(--t-xs); color: var(--gris); margin-top: auto; }

.grille { display: grid; gap: var(--e-5); }
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grille-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Encadrés éditoriaux */
.encadre {
  border-left: 4px solid var(--rose); background: var(--rose-poudre);
  padding: var(--e-4) var(--e-5); border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--e-5) 0;
}
.encadre-titre { font-family: var(--police-titre); font-weight: 700; margin-bottom: var(--e-2); }
.encadre-astuce { border-color: var(--succes); background: var(--succes-fond); }
.encadre-attention { border-color: var(--alerte); background: var(--alerte-fond); }
.encadre-info { border-color: var(--info); background: var(--info-fond); }

/* Listes de contenu */
.contenu ul, .contenu ol { margin: 0 0 var(--e-4) var(--e-5); }
.contenu li { margin-bottom: var(--e-2); }
.liste-check { list-style: none; margin-left: 0 !important; }
.liste-check li { position: relative; padding-left: 30px; }
.liste-check li::before { content: "✓"; position: absolute; left: 0; color: var(--succes); font-weight: 800; }
.liste-croix { list-style: none; margin-left: 0 !important; }
.liste-croix li { position: relative; padding-left: 30px; }
.liste-croix li::before { content: "✗"; position: absolute; left: 0; color: var(--alerte); font-weight: 800; }

/* Tableaux */
.tableau-enveloppe { overflow-x: auto; margin: var(--e-5) 0; border-radius: var(--r-md); box-shadow: var(--ombre-1); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: var(--t-sm); }
thead { background: var(--rose); color: #fff; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rose-poudre); }
th { font-family: var(--police-titre); font-weight: 700; }
tbody tr:nth-child(even) { background: #fffafd; }
tbody tr:hover { background: var(--rose-poudre); }

/* Sommaire */
.sommaire {
  background: #fff; border: 1px dashed var(--rose-clair); border-radius: var(--r-md);
  padding: var(--e-4) var(--e-5); margin: var(--e-5) 0;
}
.sommaire strong { display: block; font-family: var(--police-titre); margin-bottom: var(--e-2); }
.sommaire ol { margin: 0 0 0 var(--e-4); }
.sommaire li { margin-bottom: 4px; font-size: var(--t-sm); }

/* FAQ */
.faq details {
  background: #fff; border: 1px solid var(--rose-poudre); border-radius: var(--r-md);
  padding: var(--e-3) var(--e-4); margin-bottom: var(--e-3);
}
.faq summary {
  font-family: var(--police-titre); font-weight: 700; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: var(--e-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { margin-bottom: var(--e-3); }
.faq p { font-size: var(--t-sm); color: var(--gris-fonce); margin: 0; }

/* Fil d'Ariane */
.ariane { font-size: var(--t-xs); color: var(--gris); margin-bottom: var(--e-4); }
.ariane a { color: var(--gris); }
.ariane span { margin: 0 6px; }

/* Bandeau (hero) */
.bandeau { background: var(--degrade-doux); background-size: 400% 400%; animation: aurore 20s ease-in-out infinite; padding: var(--e-8) 0; text-align: center; }
@keyframes aurore { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.bandeau p.chapo { max-width: 640px; margin: var(--e-4) auto 0; color: var(--gris-fonce); font-size: var(--t-lg); }

/* Article */
.article { background: #fff; border-radius: var(--r-lg); box-shadow: var(--ombre-1); padding: var(--e-7) var(--e-6); margin: var(--e-6) auto; max-width: var(--largeur-texte); }
.article-meta { display: flex; flex-wrap: wrap; gap: var(--e-3); align-items: center; font-size: var(--t-xs); color: var(--gris); margin-bottom: var(--e-5); }
.chapo { font-size: var(--t-lg); color: var(--gris-fonce); font-weight: 500; }
.contenu h2 { margin: var(--e-7) 0 var(--e-3); font-size: var(--t-2xl); }
.contenu h2::before { content: ""; display: block; width: 48px; height: 4px; border-radius: 4px; background: var(--degrade-marque); margin-bottom: var(--e-3); }
.contenu h3 { margin: var(--e-5) 0 var(--e-2); color: var(--rose-fonce); }

/* Pied de page */
.pied { background: var(--encre); color: #e9e3ec; padding: var(--e-7) 0 var(--e-5); margin-top: var(--e-9); }
.pied a { color: var(--rose-clair); font-weight: 600; }
.pied .footer-links { margin-top: var(--e-3); display: flex; flex-wrap: wrap; gap: var(--e-4); }
.pied-bas { margin-top: var(--e-5); padding-top: var(--e-4); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--t-xs); color: #a79fac; }

/* --------------------------------------------------------------------------
   5. ACCESSIBILITÉ ET RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .article { padding: var(--e-5) var(--e-4); border-radius: var(--r-md); }
  .nav-principale { gap: var(--e-3); }
  .nav-principale a { font-size: var(--t-xs); }
  .entete-inner { flex-direction: column; align-items: flex-start; padding: var(--e-3) 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .texte-degrade { -webkit-text-fill-color: initial; color: var(--rose); }
}

@media print {
  .entete, .pied, .sommaire, .btn { display: none; }
  body { background: #fff; }
  .article { box-shadow: none; padding: 0; }
}
