/*
Theme Name: Astuce Maison
*/
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

/* ==========================================================================
   GABARIT « GRATUIT URBAIN »
   Ce qu'on reconnait d'un gratuit qu'on lit debout dans le metro :
   1. UNE COULEUR PAR RUBRIQUE, portee par le lisere de nav, la pastille et le rang ;
   2. des TUILES a coins tres arrondis (14 px), image plein cadre, titre dessous ;
   3. aucun filet de separation — c'est l'espace blanc et l'ombre douce qui separent ;
   4. l'inverse de l'habitude typographique : sans geometrique en TITRE, serif en CORPS.
   ========================================================================== */

/* ---------- 1. JETONS ---------------------------------------------------- */
:root{
  --fond:#ffffff;
  --encre:#121d26;
  --doux:#4c5661;          /* assombri par rapport au releve : 4,5:1 tenu sur --fond */
  --filet:#e3e6ea;
  --accent:#5F41F4;
  --accent-txt:color-mix(in srgb, #5F41F4 80%, #10122a);
  --surf:#f5f5fa;
  --surf2:#eceaf7;
  --ombre:0 2px 10px rgba(18,29,38,.07);
  --ombre-haut:0 4px 18px rgba(18,29,38,.10);
  --titre:'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --courant:'Source Serif 4', Georgia, 'Times New Roman', serif;
  --rayon:14px;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --fond:#101318; --encre:#eceef2; --doux:#a7b0ba; --filet:#232830;
    --surf:#181c23; --surf2:#1e2230;
    --accent-txt:color-mix(in srgb, #5F41F4 60%, #ffffff);
    --ombre:0 2px 10px rgba(0,0,0,.45); --ombre-haut:0 4px 18px rgba(0,0,0,.55);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --fond:#101318; --encre:#eceef2; --doux:#a7b0ba; --filet:#232830;
  --surf:#181c23; --surf2:#1e2230;
  --accent-txt:color-mix(in srgb, #5F41F4 60%, #ffffff);
  --ombre:0 2px 10px rgba(0,0,0,.45); --ombre-haut:0 4px 18px rgba(0,0,0,.55);
  color-scheme:dark;
}

/* ---------- 2. SOCLE ----------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--fond);color:var(--encre);
  font-family:var(--courant);font-size:16.5px;line-height:1.55;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}
:focus-visible{outline:3px solid var(--accent-txt);outline-offset:2px;border-radius:4px}
h1,h2,h3{font-family:var(--titre);font-weight:700;margin:0;line-height:1.14;letter-spacing:-.018em;text-wrap:balance}
p{margin:0}
ul,ol{margin:0;padding:0;list-style:none}
.sb-oeil,.sb-oeil-txt{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.sb-oeil:focus{left:.5rem;top:.5rem;width:auto;height:auto;padding:.55rem .9rem;
  background:var(--encre);color:var(--fond);border-radius:8px;z-index:99}
.gu-cadre{width:min(1280px,100% - 2.4rem);margin-inline:auto}

/* la pastille de rubrique : couleur PLEINE, texte calcule par jr_lisible_sur() */
.gu-pastille{display:inline-block;font-family:var(--titre);font-size:11px;font-weight:700;
  letter-spacing:.09em;text-transform:uppercase;padding:.28rem .62rem;border-radius:999px;
  margin-bottom:.5rem}
.gu-pastille:hover{text-decoration:none;filter:brightness(1.06)}
.gu-chapo{font-size:16px;line-height:1.52;color:var(--doux);margin-top:.5rem}
.gu-chapo--court{font-size:14.5px}
.gu-meta{font-family:var(--titre);font-size:12px;font-weight:500;color:var(--doux);margin-top:.45rem;
  letter-spacing:.02em}
.gu-heure{font-family:var(--titre);font-size:12px;font-weight:700;color:var(--accent-txt);
  font-variant-numeric:tabular-nums;flex:0 0 auto}
.gu-tiret{padding-inline:.4em;color:var(--filet)}
.jr-plaque{border-radius:var(--rayon)}

/* ---------- 3. LA TETE : marque centree + barre de rubriques coloree ------ */
.gu-tete{position:sticky;top:0;z-index:30;background:var(--fond);transition:box-shadow .18s ease}
.gu-tete.is-pose{box-shadow:var(--ombre-haut)}
.gu-bandeau-in{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;min-height:76px}
.gu-marque{grid-column:2;justify-self:center}
.gu-marque a{display:flex;align-items:center;gap:.55rem}
.gu-marque a:hover{text-decoration:none}
.gu-marque-mot{font-family:var(--titre);font-weight:800;font-size:clamp(24px,4.4vw,32px);
  letter-spacing:-.035em;line-height:1}
.gu-mono{display:inline-flex;width:clamp(24px,3.4vw,30px);color:var(--accent-txt)}
.gu-mono svg{width:100%;height:auto;fill:currentColor}
.gu-loupe{grid-column:3;justify-self:end}
.gu-loupe input{font-family:var(--titre);font-size:13px;padding:.5rem .85rem;width:min(200px,100%);
  border:0;background:var(--surf);color:var(--encre);border-radius:999px}
.gu-loupe input::placeholder{color:var(--doux)}
.gu-burger{grid-column:1;justify-self:start;display:none;background:var(--surf);border:0;
  padding:.6rem .65rem;border-radius:10px;cursor:pointer}
.gu-burger span{display:block;width:18px;height:2px;background:var(--encre);margin:3.5px 0;border-radius:2px}

/* CHAQUE rubrique porte SON lisere de 3 px — le trait signature de la famille */
.gu-rubriques{background:var(--fond)}
.gu-rubriques-in{display:flex;gap:.15rem;min-height:42px;align-items:stretch;
  overflow-x:auto;scrollbar-width:none}
.gu-rubriques-in::-webkit-scrollbar{display:none}
.gu-rub-lien{display:flex;align-items:center;white-space:nowrap;padding:0 .85rem;
  font-family:var(--titre);font-size:13.5px;font-weight:600;color:var(--encre);
  border-bottom:3px solid transparent}
.gu-rub-lien:hover{text-decoration:none;border-bottom-color:var(--coul);background:var(--surf)}
.gu-rub-lien.is-actif{border-bottom-color:var(--coul)}
.gu-rub-une{font-weight:700}
.gu-service{background:var(--surf)}
.gu-service-in{display:flex;justify-content:space-between;align-items:center;gap:1rem;
  min-height:30px;font-family:var(--titre);font-size:11.5px;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;color:var(--doux)}

/* ---------- 4. LA MOSAIQUE ASYMETRIQUE ----------------------------------- */
.gu-mosaique{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  grid-template-rows:auto auto;gap:1.5rem;padding-block:1.8rem 2rem}
.gu-carte--geante{grid-row:span 2}
.gu-carte{background:var(--fond);border-radius:var(--rayon);overflow:hidden;box-shadow:var(--ombre);
  display:flex;flex-direction:column}
.gu-carte:hover{box-shadow:var(--ombre-haut)}
.gu-vue{display:block}
.gu-vue img{width:100%;aspect-ratio:3/2;object-fit:cover}
.gu-carte--geante .gu-vue img{aspect-ratio:16/10}
.gu-carte-txt{padding:.9rem 1rem 1.1rem}
.gu-carte-titre{font-size:19px;font-weight:700;line-height:1.2}
.gu-carte--geante .gu-carte-titre{font-size:clamp(24px,3vw,34px);line-height:1.08}
.gu-carte--geante .gu-carte-txt{padding:1.1rem 1.3rem 1.4rem}

/* ---------- 5. « EN BREF » : le chiffre geant est un TEMPS DE LECTURE reel - */
.gu-bref{background:var(--surf);padding-block:1.8rem 2rem;border-radius:calc(var(--rayon) * 2);
  margin-bottom:2rem}
.gu-tete-sec{font-family:var(--titre);font-size:clamp(19px,2.2vw,24px);font-weight:800;
  letter-spacing:-.022em}
.gu-tete-sec--bref{margin-bottom:1.1rem}
.gu-bref-grille{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.2rem}
.gu-bref-item{display:flex;gap:.95rem;align-items:flex-start;background:var(--fond);
  border-radius:var(--rayon);padding:1rem 1.1rem;box-shadow:var(--ombre)}
.gu-chiffre{flex:0 0 auto;display:grid;place-items:center;width:64px;height:64px;
  border-radius:18px;font-family:var(--titre);font-size:32px;font-weight:800;line-height:1;
  font-variant-numeric:tabular-nums}
.gu-bref-unite{font-family:var(--titre);font-size:11px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;color:var(--doux);margin-bottom:.3rem}
.gu-bref-titre{font-size:18px;font-weight:700;line-height:1.2}

/* ---------- 6. LE RECAP DU JOUR (horodate, articles du jour uniquement) ---- */
.gu-recap{background:var(--surf2);border-radius:calc(var(--rayon) * 2);padding:1.6rem 1.5rem 1.7rem;
  margin-bottom:2rem}
.gu-recap-liste{margin-top:1rem;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:2rem}
.gu-recap-liste li{display:flex;align-items:baseline;gap:.65rem;padding:.55rem 0}
.gu-recap-liste a{font-family:var(--titre);font-size:16px;font-weight:600;line-height:1.28}
.gu-point{flex:0 0 auto;width:8px;height:8px;border-radius:999px}

/* ---------- 7. LES RANGEES DE RUBRIQUE ------------------------------------ */
.gu-rangee-sec{padding-block:1.4rem 2rem}
.gu-sec-tete{display:flex;align-items:center;gap:.8rem;margin-bottom:1.1rem}
.gu-sec-barre{flex:0 0 auto;width:34px;height:6px;border-radius:999px}
.gu-sec-tout{margin-left:auto;font-family:var(--titre);font-size:12.5px;font-weight:700;
  letter-spacing:.05em;color:var(--accent-txt)}
.gu-rangee{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1.4rem}
.gu-rangee--liste{row-gap:1.8rem}

/* ---------- 8. « LES PLUS LUS » A ONGLETS --------------------------------- */
.gu-lus{background:var(--surf);padding-block:2rem 2.4rem;margin-top:1rem}
.gu-onglets{display:flex;gap:.5rem;margin-bottom:1.2rem;flex-wrap:wrap}
.gu-onglet{font-family:var(--titre);font-size:13px;font-weight:700;letter-spacing:.03em;
  padding:.5rem 1rem;border:0;border-radius:999px;background:var(--fond);color:var(--doux);
  cursor:pointer;box-shadow:var(--ombre)}
.gu-onglet.is-actif{background:var(--encre);color:var(--fond)}
.gu-lus-file{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1.1rem}
.gu-lus-file li{display:flex;flex-direction:column;gap:.55rem;background:var(--fond);
  border-radius:var(--rayon);padding:.85rem;box-shadow:var(--ombre);position:relative}
.gu-rang{position:absolute;top:.6rem;left:.6rem;z-index:2;display:grid;place-items:center;
  width:30px;height:30px;border-radius:999px;font-family:var(--titre);font-size:15px;
  font-weight:800;line-height:1}
.gu-rang--neutre{background:var(--encre);color:var(--fond)}
.gu-vue--mini{border-radius:10px;overflow:hidden}
.gu-vue--mini img{aspect-ratio:4/3}
.gu-lus-titre{font-family:var(--titre);font-size:15px;font-weight:700;line-height:1.24}
.gu-lus-bloc{display:flex;flex-direction:column;gap:.25rem}

/* ---------- 9. ARTICLE ---------------------------------------------------- */
.gu-article{padding-block:1.8rem 2.6rem}
.gu-art-tete{max-width:min(760px,100%);margin-inline:auto}
.gu-art-titre{font-size:clamp(28px,4.6vw,46px);line-height:1.05;font-weight:800;letter-spacing:-.03em}
.gu-art-chapo{font-size:19.5px;line-height:1.5;color:var(--doux);margin-top:.9rem}
.gu-art-meta{display:flex;flex-wrap:wrap;align-items:center;font-family:var(--titre);font-size:12.5px;
  font-weight:500;color:var(--doux);margin-top:1rem;padding-top:.8rem;border-top:1px solid var(--filet)}
.gu-pastille--art{font-size:12px;margin-bottom:.75rem}
.gu-art-photo{margin:1.6rem auto;max-width:min(1000px,100%)}
.gu-art-photo img{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:var(--rayon)}
.gu-art-photo figcaption{font-size:12.5px;color:var(--doux);margin-top:.5rem;line-height:1.4}
.gu-texte{max-width:min(720px,100%);margin-inline:auto;font-size:18.5px;line-height:1.72}
.gu-texte p{margin:0 0 1.2rem}
.gu-texte h2{font-size:26px;margin:2.1rem 0 .7rem}
.gu-texte h3{font-size:21px;margin:1.6rem 0 .5rem}
.gu-texte ul{margin:0 0 1.2rem}
.gu-texte ul li{position:relative;padding-left:1.2rem;margin-bottom:.5rem}
.gu-texte ul li::before{content:"";position:absolute;left:0;top:.62em;width:7px;height:7px;
  border-radius:999px;background:var(--accent)}
.gu-texte ol{list-style:decimal;margin:0 0 1.2rem;padding-left:1.4rem}
.gu-texte ol li{margin-bottom:.5rem}
.gu-texte a{color:var(--accent-txt);text-decoration:underline;text-underline-offset:3px}
.gu-texte blockquote{margin:1.7rem 0;padding:1.1rem 1.3rem;background:var(--surf);
  border-radius:var(--rayon);font-size:20px;font-family:var(--titre);font-weight:600;line-height:1.35}
.gu-texte img{margin:1.5rem 0;border-radius:var(--rayon)}
.gu-texte table{width:100%;border-collapse:collapse;font-family:var(--titre);font-size:15px;margin:1.5rem 0}
.gu-texte th,.gu-texte td{border-bottom:1px solid var(--filet);padding:.65rem .5rem;text-align:left}
.gu-texte th{font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.gu-art-pied{max-width:min(760px,100%);margin:2.2rem auto 0;padding:1.2rem;background:var(--surf);
  border-radius:var(--rayon)}
.gu-rangee-sec--suite{margin-top:2rem}

/* signature d'auteur (jr_signature) — au registre arrondi de la famille */
.sb-signature{display:flex;gap:1rem;align-items:flex-start}
.sb-signature img{width:60px;height:60px;border-radius:999px}
.sb-signature-nom{font-family:var(--titre);font-weight:700;font-size:16px}
.sb-signature-bio{font-size:14.5px;color:var(--doux);margin-top:.3rem;line-height:1.45}
.sb-date{font-family:var(--titre);font-size:12px;color:var(--doux);margin-top:.4rem}
/* fils produits par jr_bloc_fil, si une composition l'appelle */
.sb-fil-bloc h2{font-family:var(--titre);font-size:20px;font-weight:800;margin-bottom:.7rem}
.sb-fil li{display:flex;gap:.6rem;align-items:baseline;padding:.5rem 0}
.sb-fil-heure{font-family:var(--titre);font-size:12px;font-weight:700;color:var(--accent-txt)}
.sb-fil a{font-family:var(--titre);font-size:15px;font-weight:600}

/* ---------- 10. RUBRIQUE : bandeau plein a la couleur de la rubrique ------- */
.gu-rub-tete{padding-block:2.2rem 2.4rem;border-bottom-left-radius:calc(var(--rayon) * 2);
  border-bottom-right-radius:calc(var(--rayon) * 2)}
.gu-rub-titre{font-size:clamp(28px,5vw,48px);font-weight:800;letter-spacing:-.032em}
.gu-rub-chapo{font-size:17px;margin-top:.6rem;max-width:min(640px,100%);opacity:.92}
.gu-rub-compte{font-family:var(--titre);font-size:12px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;margin-top:.9rem;opacity:.85}
.gu-rub-corps{padding-block:2rem}
.gu-pagination{padding-block:1.6rem 2.4rem;display:flex;gap:.45rem;font-family:var(--titre);
  font-size:13.5px;font-weight:700}
.gu-pagination .page-numbers{padding:.5rem .9rem;border-radius:999px;background:var(--surf)}
.gu-pagination .current{background:var(--encre);color:var(--fond)}

/* ---------- 11. PIED ------------------------------------------------------ */
.gu-pied{margin-top:2rem;background:var(--surf);padding-top:2rem;
  border-top-left-radius:calc(var(--rayon) * 2);border-top-right-radius:calc(var(--rayon) * 2)}
.gu-pied-haut{display:flex;justify-content:space-between;align-items:flex-end;gap:1.4rem;
  flex-wrap:wrap;padding-bottom:1.6rem}
.gu-pied-marque{display:flex;flex-direction:column;gap:.2rem}
.gu-mono--pied{width:30px;color:var(--accent-txt)}
.gu-pied-nom{font-family:var(--titre);font-weight:800;font-size:24px;letter-spacing:-.03em}
.gu-pied-baseline{font-family:var(--titre);font-size:12px;font-weight:500;letter-spacing:.1em;
  text-transform:uppercase;color:var(--doux)}
.gu-pied-loupe{display:flex;gap:.5rem}
.gu-pied-loupe input{font-family:var(--titre);font-size:13.5px;padding:.55rem .95rem;border:0;
  border-radius:999px;background:var(--fond);color:var(--encre);min-width:min(240px,60vw)}
.gu-pied-loupe input::placeholder{color:var(--doux)}
.gu-pied-loupe button{font-family:var(--titre);font-size:13px;font-weight:700;padding:.55rem 1.1rem;
  border:0;border-radius:999px;background:var(--encre);color:var(--fond);cursor:pointer}
.gu-pied-grille{display:grid;grid-template-columns:1.3fr 1.2fr .9fr;gap:2rem;padding-bottom:1.8rem}
.gu-pied-titre{font-family:var(--titre);font-size:12px;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:var(--doux);margin-bottom:.8rem}
.gu-pied-pastilles{display:flex;flex-wrap:wrap;gap:.45rem}
.gu-pied-pastilles .gu-pastille{margin-bottom:0}
.gu-pied-compte{opacity:.75;font-variant-numeric:tabular-nums}
.gu-pied-fil li{display:flex;gap:.6rem;align-items:baseline;padding:.35rem 0}
.gu-pied-fil a{font-family:var(--titre);font-size:14px;font-weight:600;line-height:1.3}
.gu-pied-liste li{padding:.3rem 0;font-family:var(--titre);font-size:14.5px;font-weight:500}
.gu-ours{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;
  padding-block:1rem 1.2rem;border-top:1px solid var(--filet);font-family:var(--titre);
  font-size:12.5px;color:var(--doux)}
.gu-bascule{font-family:var(--titre);font-size:12px;font-weight:700;padding:.45rem 1rem;border:0;
  border-radius:999px;background:var(--fond);color:var(--encre);cursor:pointer;box-shadow:var(--ombre)}

/* ---------- 12. BARRE MOBILE BASSE ---------------------------------------- */
.sb-nav-mobile{display:none;position:fixed;left:0;right:0;bottom:0;z-index:40;
  background:var(--fond);border-top:1px solid var(--filet);
  padding-bottom:env(safe-area-inset-bottom)}
.sb-nav-mobile-item{flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:.45rem .2rem .5rem;font-family:var(--titre);font-size:10px;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;color:var(--doux);text-align:center}
.sb-nav-mobile-item:hover{text-decoration:none}
.sb-nav-mobile-item.is-actif{color:var(--accent-txt)}
.sb-nav-ico{display:block;width:20px;height:20px}
.sb-nav-ico svg{width:100%;height:100%;stroke:currentColor;fill:none}

/* ---------- 13. REPLIS (jamais un debordement horizontal) ------------------ */
@media (max-width: 1080px){
  .gu-rangee,.gu-lus-file{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gu-bref-grille{grid-template-columns:minmax(0,1fr)}
  .gu-pied-grille{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 760px){
  .gu-cadre{width:min(1280px,100% - 1.6rem)}
  .gu-rubriques{position:static;max-height:0;overflow:hidden}
  .gu-rubriques.is-ouvert{max-height:none;overflow:visible;padding-bottom:.4rem}
  .gu-rubriques-in{flex-direction:column;gap:0}
  .gu-rub-lien{border-bottom:1px solid var(--filet);width:100%;padding:.75rem .2rem}
  .gu-rub-lien.is-actif{border-left:4px solid var(--coul);padding-left:.7rem;border-bottom-color:var(--filet)}
  .gu-burger{display:block}
  .gu-loupe{display:none}
  .gu-bandeau-in{min-height:62px}
  .gu-mosaique{grid-template-columns:minmax(0,1fr);gap:1.2rem;padding-block:1.2rem 1.5rem}
  .gu-carte--geante{grid-row:auto}
  .gu-recap-liste,.gu-rangee,.gu-lus-file,.gu-pied-grille{grid-template-columns:minmax(0,1fr)}
  .gu-lus-file li{flex-direction:row;align-items:center;gap:.8rem}
  .gu-vue--mini{flex:0 0 96px}
  .gu-rang{position:static;flex:0 0 auto}
  .gu-pied-haut{align-items:flex-start}
  .sb-nav-mobile{display:flex}
  body{padding-bottom:64px}
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important;
    scroll-behavior:auto!important}
}
@media print{.gu-rubriques,.sb-nav-mobile,.gu-lus,.gu-bascule{display:none!important}}

/* garde-fou : un display:grid/flex de classe bat l attribut hidden (vu sur gratuit-urbain, 04/09) */
[hidden]{display:none!important}

/* P-470 — la 1re carte de l accueil porte grid-column:span 2 en style INLINE.
   Sur telephone la grille n a plus qu une colonne : le span fabrique une colonne
   implicite dimensionnee sur le contenu (526px dans un ecran de 390) et pousse la page.
   !important est indispensable : on annule un style inline. */
@media (max-width:760px){.sb-grille>*{grid-column:auto!important}}

/* P-470 — la plume cite ses sources en URL BRUTE entre parentheses. Une URL ne
   contient aucun point de coupure : le paragraphe fait 677px de large dans une colonne
   de 329 et la page deborde de 351px sur telephone. Le piege : AUCUN element ne depasse
   le viewport (getBoundingClientRect ne voit rien), c est le contenu qui deborde de son
   propre element — seul scrollWidth > clientWidth le montre. */
.sb-corps{overflow-wrap:anywhere}

/* P-491 — display:contents : le h1 de la marque n existe pas pour la mise en page. */
.sb-marque-h1{display:contents}
