/*
Theme Name:        Femme de ménage Lille
Theme URI:         https://femme-de-menage-lille.fr/
Description:       Thème autonome pour femme-de-menage-lille.fr : guide éditorial local, CTA parrainage, quiz, sommaire automatique, liens internes intelligents, fil d'Ariane, barre mobile. Aucun thème parent requis, aucune police externe (RGPD), aucun jQuery.
Author:            Florian
Version:           2.0.1
Requires at least: 6.4
Tested up to:      6.8
Requires PHP:      7.4
License:           GPL-2.0-or-later
Text Domain:       fml
*/

/* =========================================================
   1. Jetons de design
   ========================================================= */
:root{
  --fml-primaire:#1f6f5c;
  --fml-primaire-fonce:#14473b;
  --fml-accent:#f2a33a;
  --fml-accent-fonce:#c97c12;
  --fml-fond:#fbf8f2;          /* crème : fond de page */
  --fml-fond-doux:#f2f7f4;     /* vert très pâle : encadrés */
  --fml-blanc:#ffffff;
  --fml-bord:#dfe8e3;
  --fml-texte:#1d2724;
  --fml-texte-doux:#5b6b66;
  --fml-rayon:14px;
  --fml-ombre:0 1px 2px rgba(20,71,59,.06),0 8px 24px rgba(20,71,59,.07);
  --fml-largeur:720px;
  --fml-large:1080px;
  --fml-sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --fml-serif:Charter,"Bitstream Charter","Sitka Text",Cambria,Georgia,serif;
}

/* =========================================================
   2. Base
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:5rem}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
body{margin:0;background:var(--fml-fond);color:var(--fml-texte);font-family:var(--fml-serif);font-size:1.1rem;line-height:1.7;text-rendering:optimizeLegibility}
img,svg,video{max-width:100%;height:auto}
a{color:var(--fml-primaire);text-decoration-thickness:1px;text-underline-offset:.18em}
a:hover{color:var(--fml-primaire-fonce);text-decoration-thickness:2px}
:focus-visible{outline:3px solid var(--fml-accent);outline-offset:2px;border-radius:4px}
h1,h2,h3,h4{font-family:var(--fml-sans);line-height:1.2;letter-spacing:-.015em;color:var(--fml-texte);text-wrap:balance}
h1{font-size:clamp(1.9rem,1.3rem + 2.6vw,3rem);font-weight:800;margin:.2em 0 .4em}
h2{font-size:clamp(1.45rem,1.2rem + 1vw,1.9rem);font-weight:800;margin:2.4em 0 .6em}
h3{font-size:1.25rem;font-weight:700;margin:1.8em 0 .5em}
p{margin:0 0 1.1em}
strong{font-weight:700}
ul,ol{padding-left:1.3em;margin:0 0 1.2em}
li{margin-bottom:.35em}
li::marker{color:var(--fml-primaire);font-weight:700}
hr{border:0;border-top:1px solid var(--fml-bord);margin:2.5rem 0}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.fml-sauter{position:absolute;left:-999px;top:.5rem;background:var(--fml-texte);color:#fff;padding:.5rem 1rem;border-radius:8px;z-index:100;font-family:var(--fml-sans)}
.fml-sauter:focus{left:.5rem}

/* =========================================================
   3. En-tête et navigation
   ========================================================= */
.fml-entete{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(8px);border-bottom:1px solid var(--fml-bord);font-family:var(--fml-sans)}
.admin-bar .fml-entete{top:32px}
@media (max-width:782px){.admin-bar .fml-entete{top:0;position:relative}}
.fml-entete__inner{max-width:var(--fml-large);margin:0 auto;padding:.6rem 1.25rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.fml-marque{display:flex;align-items:center;gap:.6rem;text-decoration:none;color:var(--fml-texte)}
.fml-marque__logo{width:40px;height:40px;border-radius:10px}
.fml-marque__nom{font-weight:800;font-size:1.05rem;letter-spacing:-.02em}
.fml-marque__nom span{color:var(--fml-primaire)}
.fml-marque:hover{color:var(--fml-texte)}

.fml-nav__bouton{display:none;flex-direction:column;gap:5px;padding:10px;border-radius:10px;background:none;border:0;cursor:pointer}
.fml-nav__bouton span{display:block;width:22px;height:2px;background:var(--fml-texte);border-radius:2px;transition:transform .2s,opacity .2s}
.fml-nav.is-ouvert .fml-nav__bouton span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.fml-nav.is-ouvert .fml-nav__bouton span:nth-child(2){opacity:0}
.fml-nav.is-ouvert .fml-nav__bouton span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.fml-nav__liste{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.2rem 1.4rem}
.fml-nav__liste li{margin:0}
.fml-nav__liste a{display:block;padding:.4rem 0;font-weight:600;font-size:.95rem;text-decoration:none;color:var(--fml-texte);border-bottom:2px solid transparent}
.fml-nav__liste a:hover,.fml-nav__liste .current-menu-item>a,.fml-nav__liste .current-page-ancestor>a{border-bottom-color:var(--fml-accent);color:var(--fml-texte)}
.fml-nav__panneau{display:flex;align-items:center;gap:1.5rem}
@media (max-width:879px){
  .js .fml-nav__bouton{display:flex}
  .js .fml-nav__panneau{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid var(--fml-bord);padding:.5rem 1.25rem 1.25rem;box-shadow:var(--fml-ombre);flex-direction:column;align-items:stretch;gap:0}
  .js .fml-nav.is-ouvert .fml-nav__panneau{display:flex}
  .fml-nav__liste{flex-direction:column;gap:0}
  .fml-nav__liste li{border-bottom:1px solid var(--fml-bord)}
  .fml-nav__liste a{padding:.85rem 0;font-size:1rem;border:0}
  .fml-nav__cta{margin-top:1rem;align-self:flex-start}
  html:not(.js) .fml-entete__inner{flex-wrap:wrap}
}

/* =========================================================
   4. Bandeau de titre
   ========================================================= */
.fml-titre{background:linear-gradient(180deg,var(--fml-fond-doux),var(--fml-fond));border-bottom:1px solid var(--fml-bord)}
.fml-titre__inner{max-width:var(--fml-largeur);margin:0 auto;padding:1.5rem 1.25rem 1.75rem}
.fml-titre--accueil .fml-titre__inner{max-width:var(--fml-large);padding:3rem 1.25rem 2.5rem}
.fml-titre--accueil h1{max-width:20ch;font-size:clamp(2.1rem,1.4rem + 3vw,3.4rem)}
.fml-titre__surtitre{font-family:var(--fml-sans);text-transform:uppercase;letter-spacing:.08em;font-size:.78rem;font-weight:700;color:var(--fml-primaire);margin:0}
.fml-titre__source{font-family:var(--fml-sans);font-size:.78rem;color:var(--fml-texte-doux);margin:.75rem 0 0}
.fml-ariane{font-family:var(--fml-sans);font-size:.82rem;color:var(--fml-texte-doux);margin-bottom:.5rem}
.fml-ariane a{color:var(--fml-texte-doux);text-decoration:none}
.fml-ariane a:hover{color:var(--fml-primaire);text-decoration:underline}
.fml-ariane__sep{margin:0 .3rem}
.fml-chiffres{list-style:none;padding:0;margin:1.5rem 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem;font-family:var(--fml-sans)}
.fml-chiffres li{background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);padding:1rem 1.1rem;margin:0;box-shadow:var(--fml-ombre)}
.fml-chiffres strong{display:block;font-size:1.6rem;font-weight:800;color:var(--fml-primaire);letter-spacing:-.02em}
.fml-chiffres span{font-size:.85rem;color:var(--fml-texte-doux);line-height:1.35;display:block}

/* =========================================================
   5. Contenu
   ========================================================= */
.fml-contenu{max-width:var(--fml-largeur);margin:0 auto;padding:1.75rem 1.25rem 3rem}
.fml-contenu > .alignwide{max-width:var(--fml-large);margin-left:auto;margin-right:auto}
.fml-maj{display:inline-flex;align-items:center;gap:.35rem;font-family:var(--fml-sans);font-size:.82rem;color:var(--fml-texte-doux);background:#fff;border:1px solid var(--fml-bord);border-radius:999px;padding:.2rem .7rem}
.wp-block-shortcode:first-child,.fml-contenu > p:first-child{margin-bottom:.5rem}

/* Réponse directe (AI Overviews / LLM) */
.fml-reponse{background:#fff;border:1px solid var(--fml-bord);border-left:5px solid var(--fml-primaire);border-radius:var(--fml-rayon);padding:1.2rem 1.4rem;margin:1.25rem 0 1.5rem;box-shadow:var(--fml-ombre)}
.fml-reponse > p:first-child{font-family:var(--fml-sans);font-weight:800;text-transform:uppercase;font-size:.75rem;letter-spacing:.08em;color:var(--fml-primaire);margin-bottom:.35rem}
.fml-reponse p:last-child{margin-bottom:0}
.fml-encart{background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);padding:1.1rem 1.3rem;margin:1.5rem 0}
.fml-attention{background:#fff7ea;border:1px solid #f6dcb1;border-left:5px solid var(--fml-accent);border-radius:var(--fml-rayon);padding:1.1rem 1.3rem;margin:1.75rem 0}
.fml-attention p:last-child{margin-bottom:0}
.fml-transparence{font-family:var(--fml-sans);font-size:.82rem;line-height:1.5;color:var(--fml-texte-doux);border-top:1px dashed var(--fml-bord);border-bottom:1px dashed var(--fml-bord);padding:.7rem 0;margin:1.25rem 0 1.75rem}
.fml-a-completer mark{background:#ffe08a;padding:.2rem .4rem}

/* Sommaire automatique */
.fml-sommaire{background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);margin:1.5rem 0 2rem;font-family:var(--fml-sans);font-size:.95rem}
.fml-sommaire summary{cursor:pointer;font-weight:800;padding:.9rem 1.2rem;list-style:none;display:flex;justify-content:space-between}
.fml-sommaire summary::after{content:"+";color:var(--fml-primaire);font-weight:800}
.fml-sommaire details[open] summary::after{content:"–"}
.fml-sommaire summary::-webkit-details-marker{display:none}
.fml-sommaire ol{margin:0;padding:0 1.2rem 1rem 2.4rem;line-height:1.45}
.fml-sommaire li{margin:.35rem 0}
.fml-sommaire a{text-decoration:none;color:var(--fml-texte)}
.fml-sommaire a:hover{color:var(--fml-primaire);text-decoration:underline}

/* Tableaux */
.wp-block-table{margin:1.5rem 0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.wp-block-table table{border-collapse:separate;border-spacing:0;width:100%;font-family:var(--fml-sans);font-size:.92rem;line-height:1.45;background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);overflow:hidden}
.wp-block-table th{background:var(--fml-primaire);color:#fff;text-align:left;font-weight:700}
.wp-block-table th,.wp-block-table td{padding:.65rem .8rem;vertical-align:top;border:0;border-bottom:1px solid var(--fml-bord)}
.wp-block-table tbody tr:nth-child(even) td{background:#fafcfb}
.wp-block-table tbody tr:last-child td{border-bottom:0}
.wp-block-table td:first-child{font-weight:600}
@media (max-width:640px){.wp-block-table table{min-width:560px}}

/* FAQ (bloc Détails) */
.wp-block-details{background:#fff;border:1px solid var(--fml-bord);border-radius:12px;padding:0;margin:.6rem 0;font-size:1rem}
.wp-block-details summary{font-family:var(--fml-sans);font-weight:700;cursor:pointer;padding:.9rem 2.8rem .9rem 1.1rem;position:relative;list-style:none}
.wp-block-details summary::-webkit-details-marker{display:none}
.wp-block-details summary::after{content:"+";position:absolute;right:1.1rem;top:50%;transform:translateY(-50%);font-size:1.3rem;color:var(--fml-primaire)}
.wp-block-details[open] summary::after{content:"–"}
.wp-block-details > :not(summary){padding:0 1.1rem;margin-top:0}
.wp-block-details[open]{padding-bottom:.4rem}

/* =========================================================
   6. Boutons et CTA
   ========================================================= */
.fml-bouton{display:inline-flex;align-items:center;justify-content:center;gap:.3rem;background:var(--fml-accent);color:#1d1d1d;font-family:var(--fml-sans);font-weight:800;font-size:1rem;padding:.8rem 1.3rem;border-radius:999px;text-decoration:none;border:0;cursor:pointer;transition:transform .15s,background .15s;box-shadow:0 2px 0 var(--fml-accent-fonce)}
.fml-bouton:hover{background:#f6b55a;color:#1d1d1d;transform:translateY(-1px);text-decoration:none}
.fml-bouton--petit{font-size:.88rem;padding:.5rem 1rem}

.fml-copier{display:inline-flex;align-items:center;gap:.5rem;background:#fff;color:var(--fml-primaire-fonce);border:2px dashed var(--fml-accent);border-radius:10px;padding:.4rem .7rem;font-family:var(--fml-sans);cursor:pointer}
.fml-copier__code{font-weight:800;font-size:1.05rem;letter-spacing:.06em}
.fml-copier__etat{font-size:.75rem;background:var(--fml-fond-doux);border-radius:6px;padding:.1rem .45rem}
.fml-copier.is-copie{border-style:solid;border-color:var(--fml-primaire)}
.fml-copier--petit{padding:.25rem .5rem}
.fml-copier--petit .fml-copier__code{font-size:.9rem}

.fml-cta{position:relative;display:grid;gap:1rem 1.5rem;grid-template-columns:1fr;background:var(--fml-primaire);background-image:radial-gradient(circle at 100% 0,rgba(242,163,58,.25),transparent 45%);color:#fff;border-radius:calc(var(--fml-rayon) + 4px);padding:1.5rem;margin:2.25rem 0;font-family:var(--fml-sans);box-shadow:var(--fml-ombre)}
.fml-cta p{margin:0}
.fml-cta__titre{font-size:1.3rem;font-weight:800;line-height:1.25;margin-bottom:.4rem!important}
.fml-cta__texte{font-size:.98rem;line-height:1.55;opacity:.95}
.fml-cta__action{display:flex;flex-direction:column;align-items:flex-start;gap:.6rem}
.fml-cta__label{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;opacity:.85}
.fml-cta__mention{grid-column:1/-1;font-size:.75rem;opacity:.75;border-top:1px solid rgba(255,255,255,.18);padding-top:.7rem}
@media (min-width:640px){.fml-cta{grid-template-columns:1.3fr 1fr;align-items:center;padding:1.75rem}}

/* =========================================================
   7. Quiz
   ========================================================= */
.fml-quiz{background:#fff;border:2px solid var(--fml-primaire);border-radius:calc(var(--fml-rayon) + 4px);padding:1.4rem;margin:2.25rem 0;font-family:var(--fml-sans);box-shadow:var(--fml-ombre)}
.fml-quiz__titre{font-weight:800;font-size:1.2rem;margin-bottom:.75rem}
.fml-quiz__prog{height:6px;background:var(--fml-fond-doux);border-radius:3px;overflow:hidden;margin-bottom:1.1rem}
.fml-quiz__prog span{display:block;height:100%;background:var(--fml-accent);transition:width .3s}
.fml-quiz__q{font-weight:700;font-size:1.05rem;line-height:1.4}
.fml-quiz__q span{display:block;font-size:.75rem;font-weight:600;color:var(--fml-texte-doux);text-transform:uppercase;letter-spacing:.06em;margin-bottom:.2rem}
.fml-quiz__reps{display:grid;gap:.55rem}
.fml-quiz__rep{text-align:left;background:var(--fml-fond-doux);border:1.5px solid var(--fml-bord);border-radius:12px;padding:.8rem 1rem;cursor:pointer;color:var(--fml-texte);font:inherit;font-size:.98rem;transition:border-color .15s,background .15s}
.fml-quiz__rep:hover,.fml-quiz__rep:focus-visible{border-color:var(--fml-primaire);background:#e6f2ec}
.fml-quiz__res-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--fml-texte-doux);margin:0}
.fml-quiz__res-titre{font-size:1.35rem;font-weight:800;color:var(--fml-primaire);margin:.2rem 0 .5rem}
.fml-quiz__res-btn{display:inline-block;background:var(--fml-accent);color:#1d1d1d;font-weight:800;padding:.65rem 1.1rem;border-radius:999px;text-decoration:none;margin:.3rem .8rem .3rem 0;box-shadow:0 2px 0 var(--fml-accent-fonce)}
.fml-quiz__res-btn:hover{color:#1d1d1d;background:#f6b55a}
.fml-quiz__again{background:none;border:none;text-decoration:underline;cursor:pointer;color:var(--fml-texte-doux);font:inherit;font-size:.9rem}

/* =========================================================
   8. Auteur
   ========================================================= */
.fml-auteur{display:flex;gap:1rem;align-items:flex-start;background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);padding:1.3rem;margin:3rem 0 0;box-shadow:var(--fml-ombre)}
.fml-auteur img,.fml-auteur__initiale{width:64px;height:64px;border-radius:50%;flex:0 0 64px;object-fit:cover}
.fml-auteur__initiale{display:flex;align-items:center;justify-content:center;background:var(--fml-primaire);color:#fff;font:800 1.7rem/1 var(--fml-sans)}
.fml-auteur__nom{font-family:var(--fml-sans);font-weight:800;margin:0 0 .3rem}
.fml-auteur__nom span{display:block;font-weight:500;font-size:.85rem;color:var(--fml-texte-doux)}
.fml-auteur p{font-size:.95rem;line-height:1.6;margin:0}

/* =========================================================
   9. Pied de page
   ========================================================= */
.fml-pied{background:var(--fml-primaire-fonce);color:#d9e8e1;font-family:var(--fml-sans);font-size:.92rem;margin-top:2rem}
.fml-pied__inner{max-width:var(--fml-large);margin:0 auto;padding:2.5rem 1.25rem 1.5rem;display:grid;gap:2rem;grid-template-columns:1fr}
@media (min-width:760px){.fml-pied__inner{grid-template-columns:2fr 1fr 1fr}}
.fml-pied__titre{color:#fff;font-weight:800;margin-bottom:.6rem}
.fml-pied p{line-height:1.6}
.fml-pied__liste{list-style:none;margin:0;padding:0}
.fml-pied__liste li{margin:.35rem 0}
.fml-pied a{color:#fff;text-decoration:none}
.fml-pied a:hover{text-decoration:underline;color:#fff}
.fml-pied__bas{max-width:var(--fml-large);margin:0 auto;padding:1rem 1.25rem 1.5rem;border-top:1px solid rgba(255,255,255,.12);font-size:.78rem;opacity:.8}

/* =========================================================
   10. Barre mobile (CTA persistant)
   ========================================================= */
.fml-barre-mobile{position:fixed;left:.6rem;right:.6rem;bottom:.6rem;z-index:60;display:flex;align-items:center;gap:.5rem;background:#fff;border:1px solid var(--fml-bord);border-radius:14px;padding:.5rem .6rem;box-shadow:0 10px 30px rgba(20,71,59,.22);font-family:var(--fml-sans);font-size:.85rem}
.fml-barre-mobile[hidden]{display:none}
.fml-barre-mobile__texte{flex:1;line-height:1.25}
.fml-barre-mobile__lien{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:var(--fml-accent);color:#1d1d1d;font-weight:800;text-decoration:none}
.fml-barre-mobile__fermer{background:none;border:0;font-size:1.3rem;color:var(--fml-texte-doux);cursor:pointer;padding:0 .2rem}
@media (min-width:880px){.fml-barre-mobile{display:none!important}}

/* =========================================================
   11. Listes, recherche, divers
   ========================================================= */
.fml-liste-cartes{list-style:none;padding:0;display:grid;gap:1rem}
.fml-carte{background:#fff;border:1px solid var(--fml-bord);border-radius:var(--fml-rayon);padding:1rem 1.2rem}
.fml-carte a{font-family:var(--fml-sans);font-weight:800;font-size:1.1rem;text-decoration:none}
.search-form{display:flex;gap:.5rem;margin:1.5rem 0}
.search-form input[type=search]{flex:1;padding:.7rem .9rem;border:1px solid var(--fml-bord);border-radius:10px;font:inherit}
.search-form input[type=submit]{background:var(--fml-primaire);color:#fff;border:0;border-radius:10px;padding:.7rem 1rem;font-family:var(--fml-sans);font-weight:700;cursor:pointer}
.wp-block-image img{border-radius:var(--fml-rayon)}
.wp-block-quote{border-left:4px solid var(--fml-accent);margin:1.5rem 0;padding:.2rem 0 .2rem 1.2rem;font-style:italic}

/* Éditeur : même rendu */
.editor-styles-wrapper{background:var(--fml-fond);font-family:var(--fml-serif)}

/* Code dans le bouton d'en-tête */
.fml-nav__code{display:inline-block;margin-left:.45rem;padding:.05rem .4rem;border:1.5px dashed rgba(29,29,29,.55);border-radius:6px;font-size:.8rem;letter-spacing:.05em;background:rgba(255,255,255,.45)}

/* Message « code copié » */
.fml-toast{position:fixed;left:50%;bottom:5.5rem;transform:translate(-50%,1rem);z-index:80;max-width:min(92vw,420px);background:var(--fml-texte);color:#fff;font-family:var(--fml-sans);font-size:.9rem;line-height:1.45;padding:.85rem 1.1rem;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.25);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.fml-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media (min-width:880px){.fml-toast{bottom:1.5rem}}
