/*
Theme Name: Tout un Fromage
Theme URI: https://tout-un-fromage.fr
Author: Tout un Fromage
Description: Thème éditorial pour blog alimentation (articles + recettes interactives). Compatible avec les recettes publiées par le pipeline automation.js (grâce au shim de compatibilité dans js/theme.js).
Version: 1.0.5
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tout-un-fromage
*/

:root{
  --color-primary:#9A3412;--color-primary-light:#C2410C;
  --color-sage:#5B7B5E;--color-sage-light:#EAF0E7;
  --color-bg:#FFFBF2;--color-fg:#2B2118;--color-muted:#7A6B5E;
  --color-surface:#FFFFFF;--color-border:#F0E4D6;
  --color-yellow:#F4A93B;--color-yellow-bg:#FFF4DF;
  --radius-sm:10px;--radius-md:18px;--radius-lg:28px;
  --space-1:8px;--space-2:16px;--space-3:24px;--space-4:32px;--space-5:48px;--space-6:64px;
  --shadow-soft:0 8px 24px -8px rgba(70,40,10,0.14);
  --shadow-card:0 2px 8px rgba(70,40,10,0.06);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --color-bg:#1C1712;--color-fg:#F3E9DD;--color-muted:#B9A996;--color-surface:#241E17;
    --color-border:#3A2F24;--color-sage-light:#26332A;--color-yellow-bg:#332818;
    --shadow-soft:0 8px 24px -8px rgba(0,0,0,0.5);--shadow-card:0 2px 8px rgba(0,0,0,0.35);
  }
}
:root[data-theme="dark"]{
  --color-bg:#1C1712;--color-fg:#F3E9DD;--color-muted:#B9A996;--color-surface:#241E17;
  --color-border:#3A2F24;--color-sage-light:#26332A;--color-yellow-bg:#332818;
}

*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--color-bg);color:var(--color-fg);font-family:-apple-system,"Segoe UI",Inter,system-ui,sans-serif;line-height:1.6;font-size:16px;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:Georgia,"Iowan Old Style","Palatino Linotype",serif;font-weight:700;letter-spacing:-0.01em;margin:0;color:var(--color-fg)}
a{color:inherit}
img{max-width:100%;height:auto;display:block}
.wrap{max-width:1180px;margin:0 auto;padding:0 var(--space-3)}
section{padding:var(--space-5) 0}

/* ==================================================================
   REVEAL AU SCROLL (générique, utilisé partout)
   ================================================================== */
/* Échec ouvert : le contenu .rv est visible par défaut. Ce n'est QUE si
   theme.js s'exécute réellement (pas bloqué par un bloqueur de pub, pas
   d'erreur avant ce point) qu'il ajoute lui-même .rv-pre pour activer le
   fondu, puis .rv-in pour révéler. Si le script ne tourne jamais, le
   contenu reste simplement visible en permanence — jamais caché sans espoir
   de révélation. */
.rv.rv-pre{opacity:0;transform:translateY(16px);transition:opacity .6s ease,transform .6s ease}
.rv.rv-pre.rv-in,.rv.rv-pre.in{opacity:1;transform:none}
.rv-d1{transition-delay:.08s}.rv-d2{transition-delay:.16s}
@media (prefers-reduced-motion: reduce){.rv.rv-pre{opacity:1;transform:none;transition:none}}

/* ==================================================================
   VOILE DE RÉVÉLATION sur les images (désactivable : Personnaliser → Animations)
   ================================================================== */
.voile{position:relative;overflow:hidden}
.voile::after{
  content:"";position:absolute;inset:0;z-index:3;background:var(--color-sage);
  transform:scaleX(1);transform-origin:right;transition:transform .95s cubic-bezier(.7,0,.25,1);
}
.voile.voile-in::after{transform:scaleX(0)}
.voile img{transform:scale(1.14)}
.voile.voile-in img{transform:scale(1);transition:transform 1.2s cubic-bezier(.22,.8,.3,1)}
[data-plx] img{transition:none !important}
@media (prefers-reduced-motion: reduce){
  .voile::after{display:none}
  .voile img{transform:none;transition:none}
}

/* ==================================================================
   HEADER / NAV (partagé sur tout le site)
   ================================================================== */
.site-header{position:sticky;top:0;z-index:70;background:color-mix(in srgb, var(--color-bg) 88%, transparent);backdrop-filter:blur(10px);border-bottom:1px solid var(--color-border)}
.site-header-inner{display:flex;align-items:center;justify-content:space-between;padding:14px var(--space-3);max-width:1180px;margin:0 auto}
.logo{display:flex;align-items:center;gap:10px;font-family:Georgia,serif;font-weight:700;font-size:18px;text-decoration:none;color:var(--color-fg);--tf-logo-height:40px}
.logo .mark{width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--color-primary),var(--color-yellow));display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;flex:none}
/* Contrainte forte, quelle que soit la taille du fichier téléversé : the_custom_logo()
   imprime son propre <a class="custom-logo-link"><img class="custom-logo">, jamais imbriqué
   dans un autre <a> (invalide en HTML) — on cible donc ces classes directement, pas ".logo a". */
.logo--custom{display:flex;align-items:center;height:var(--tf-logo-height)}
.custom-logo-link{display:flex;align-items:center;height:100%}
.custom-logo-link img,
img.custom-logo{max-height:var(--tf-logo-height);width:auto;height:auto;display:block}

/* menu principal : rendu par wp_nav_menu() (Apparence → Menus), <ul class="main-nav-list"> */
nav.main-nav{display:flex}
.main-nav-list{list-style:none;margin:0;padding:0;display:flex;gap:26px}
.main-nav-list li{position:relative;display:flex;align-items:center}
.main-nav-list a{font-size:14px;font-weight:600;color:var(--color-muted);text-decoration:none}
.main-nav-list a:hover{color:var(--color-primary)}
.main-nav-list li.current-menu-item > a,
.main-nav-list li.current-menu-parent > a,
.main-nav-list li.current-menu-ancestor > a{color:var(--color-primary)}
.main-nav-list li.current-menu-item > a::after{content:"";position:absolute;bottom:-6px;left:0;right:0;height:2px;background:var(--color-primary);border-radius:2px}
.header-actions{display:flex;align-items:center;gap:14px}
.icon-btn{width:38px;height:38px;border-radius:50%;border:1px solid var(--color-border);background:var(--color-surface);display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--color-fg)}
.icon-btn:hover{background:var(--color-sage-light)}
.btn{display:inline-flex;align-items:center;gap:8px;padding:11px 20px;border-radius:999px;font-weight:700;font-size:14px;border:none;cursor:pointer;background:var(--color-primary);color:#fff;transition:background .15s;white-space:nowrap;width:max-content}
.btn:hover{background:var(--color-primary-light);color:#fff}
.btn-outline{background:transparent;border:1px solid var(--color-border);color:var(--color-fg)}
.btn-outline:hover{background:var(--color-sage-light);border-color:var(--color-sage)}
@media (max-width:820px){ nav.main-nav{display:none} }

/* bandeau supérieur (identité) */
.top-notice{background:var(--color-sage);color:#fff;font-size:13px;text-align:center;padding:8px 16px}
.top-notice a{color:#fff;text-decoration:underline}
.top-notice strong{font-weight:700}

/* Bandeau défilant (marquee) */
.marquee{background:var(--color-primary);color:#fff;overflow:hidden;padding:9px 0;white-space:nowrap}
.marquee-track{display:inline-flex;gap:28px;animation:tf-scroll-left 28s linear infinite}
.marquee span{font-size:12.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;display:inline-flex;align-items:center;gap:28px}
.marquee .sep{opacity:.5}
@keyframes tf-scroll-left{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.marquee-track{animation:none}}

/* ==================================================================
   FOOTER (partagé)
   ================================================================== */
.newsletter{background:var(--color-primary);color:#fff}
.newsletter .wrap{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap}
.newsletter h2{font-size:26px;margin:0 0 6px;color:#fff}
.newsletter p{margin:0;opacity:.85;font-size:14.5px}
.newsletter-form{display:flex;gap:10px;flex-wrap:wrap}
.newsletter-form input{padding:12px 16px;border-radius:999px;border:none;font-size:14px;min-width:240px}
.newsletter-form button{padding:12px 22px;border-radius:999px;border:none;background:#fff;color:var(--color-primary);font-weight:700;cursor:pointer}
footer.site-footer{padding:var(--space-4) 0;border-top:1px solid var(--color-border)}
.footer-grid{display:flex;justify-content:space-between;flex-wrap:wrap;gap:var(--space-3);color:var(--color-muted);font-size:13.5px}
.footer-cols{display:flex;gap:var(--space-5);flex-wrap:wrap}
.footer-col h4{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--color-fg);margin:0 0 10px}
.footer-col a{display:block;padding:4px 0;color:var(--color-muted);text-decoration:none}
.footer-col a:hover{color:var(--color-primary)}
.footer-mentions{text-align:center;color:var(--color-muted);font-size:12.5px;padding-top:var(--space-3)}

/* ==================================================================
   ANNONCES (emplacements pub — non intrusifs, hauteur réservée)
   ================================================================== */
/* align-items:stretch (pas "center") est essentiel : une régie publicitaire
   (AdSense compris) mesure la largeur du conteneur au moment de l'insertion.
   Avec "center", les enfants flex se réduisent à leur largeur intrinsèque
   au lieu de remplir le bloc -> la régie voit une largeur quasi nulle et
   n'affiche rien, sans erreur visible (juste du vide). */
.ad-slot{
  display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:6px;
  background:var(--color-surface);border:1px dashed var(--color-border);border-radius:var(--radius-md);
  color:var(--color-muted);position:relative;min-height:100px;width:100%;overflow:visible;
}
.ad-slot > *{max-width:100%}
.ad-slot .ad-label{position:absolute;top:8px;left:10px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;opacity:.7;z-index:1}
.ad-slot .ad-placeholder-text{font-size:12px;opacity:.6;text-align:center}
.ad-slot--in-content{min-height:120px;margin:var(--space-4) 0}
.ad-slot--sidebar{min-height:250px}
.ad-slot--footer{min-height:100px;margin:var(--space-5) 0}

/* ==================================================================
   CARTES (recette / article) — réutilisées partout
   ================================================================== */
.cartes{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3)}
@media (max-width:900px){.cartes{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.cartes{grid-template-columns:1fr}}
.carte{border-radius:var(--radius-md);overflow:hidden;background:var(--color-surface);border:1px solid var(--color-border);box-shadow:var(--shadow-card);transition:transform .2s,box-shadow .2s;display:block;text-decoration:none;color:inherit}
.carte:hover{transform:translateY(-4px);box-shadow:var(--shadow-soft)}
.carte-thumb{aspect-ratio:4/3;background:linear-gradient(135deg,var(--c1,#E7C08A),var(--c2,#8B4A22))}
.carte-thumb img{width:100%;height:100%;object-fit:cover}
.carte-body{padding:var(--space-2)}
.carte-cat{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary)}
.carte-body h3{font-size:16px;margin:6px 0 6px;line-height:1.3;font-family:Georgia,serif}
.carte-meta{font-size:12.5px;color:var(--color-muted);display:flex;gap:10px}

.section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:var(--space-3);gap:var(--space-2)}
.section-head h2{font-size:26px}
.section-head .voir-tout{font-size:13.5px;font-weight:700;color:var(--color-primary);white-space:nowrap;text-decoration:none}
.section-head .voir-tout:hover{text-decoration:underline}

/* ==================================================================
   ACCUEIL
   ================================================================== */
.hero{padding:var(--space-6) 0}
.hero .wrap{display:grid;grid-template-columns:1.1fr 1fr;gap:var(--space-5);align-items:center}
@media (max-width:900px){.hero .wrap{grid-template-columns:1fr}}
.kicker{display:inline-flex;align-items:center;gap:6px;color:var(--color-primary);font-weight:700;font-size:13px;letter-spacing:.08em;text-transform:uppercase;margin-bottom:var(--space-2)}
.kicker a{color:inherit;text-decoration:none}
.hero h1,.hero h2.titre-une{font-size:clamp(30px,4.4vw,48px);line-height:1.12;margin-bottom:var(--space-2)}
.hero a:hover{color:var(--color-primary)}
.chapo{font-size:18px;color:var(--color-muted);font-family:Georgia,serif;font-style:italic;margin:0 0 var(--space-3);max-width:520px}
.meta-row{display:flex;flex-wrap:wrap;gap:0;color:var(--color-muted);font-size:13.5px;margin-bottom:var(--space-3);align-items:center}
.meta-row .dot::before{content:"·";margin:0 8px}
.hero-figure{aspect-ratio:4/3;border-radius:var(--radius-lg);background:linear-gradient(135deg,#E7C08A,#C97B3D 55%,#8B4A22);box-shadow:var(--shadow-soft);position:relative;overflow:hidden}
.hero-figure img{width:100%;height:100%;object-fit:cover}
.hero-figure.placeholder::after{content:"Photo à la une";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.85);font-size:13px;font-weight:600;background:rgba(0,0,0,.08)}

.selection-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3)}
@media (max-width:820px){.selection-grid{grid-template-columns:1fr}}
.selection-card{border-left:3px solid var(--color-sage);padding-left:var(--space-2)}
.selection-card .num{font-size:12.5px;font-weight:700;color:var(--color-sage);text-transform:uppercase;letter-spacing:.05em}
.selection-card h3{font-size:19px;margin:8px 0 6px}
.selection-card h3 a{text-decoration:none}
.selection-card h3 a:hover{color:var(--color-primary)}
.selection-card p{margin:0;color:var(--color-muted);font-size:14.5px}

.liste-derniers{list-style:none;margin:0;padding:0;border-top:1px solid var(--color-border)}
.liste-derniers li{border-bottom:1px solid var(--color-border)}
.liste-derniers a{display:flex;align-items:center;gap:var(--space-2);padding:16px 4px;transition:background .15s;text-decoration:none}
.liste-derniers a:hover{background:var(--color-sage-light)}
.ld-date{font-size:13px;color:var(--color-muted);width:70px;flex:none;font-variant-numeric:tabular-nums}
.ld-titre{flex:1;font-family:Georgia,serif;font-weight:700;font-size:17px}
.ld-rub{font-size:12px;font-weight:700;color:var(--color-sage);background:var(--color-sage-light);padding:4px 10px;border-radius:999px;flex:none}
.ld-thumb{width:56px;height:56px;border-radius:12px;flex:none;background:linear-gradient(135deg,var(--c1,#E7C08A),var(--c2,#8B4A22));overflow:hidden}
.ld-thumb img{width:100%;height:100%;object-fit:cover}
.apercu-flottant{
  position:fixed;top:0;left:0;width:220px;height:150px;border-radius:16px;pointer-events:none;
  opacity:0;transition:opacity .2s ease;z-index:80;box-shadow:var(--shadow-soft);background-size:cover;background-position:center;
  background-color:var(--color-border);
}
@media (max-width:820px){.apercu-flottant{display:none}}

.savoir{background:var(--color-sage-light)}
.savoir .wrap{display:grid;grid-template-columns:.9fr 1.4fr;gap:var(--space-5);align-items:center}
@media (max-width:820px){.savoir .wrap{grid-template-columns:1fr}}
.savoir-figure{aspect-ratio:1;border-radius:var(--radius-lg);background:linear-gradient(135deg,#C9DCC5,var(--color-sage));display:flex;align-items:center;justify-content:center;color:#fff}
.savoir h2{font-size:28px;margin:8px 0 var(--space-2)}
.savoir p{color:var(--color-muted);margin:0 0 var(--space-3);max-width:480px}

/* ==================================================================
   ARTICLE — système éditorial (sommaire auto, romain, lettrine, blocs)
   ================================================================== */
.progression{position:sticky;top:59px;height:3px;background:var(--color-primary);width:0%;z-index:69;transition:width .1s linear}

.fil-ariane{font-size:13px;color:var(--color-muted);padding:var(--space-3) 0 0}
.fil-ariane a{color:var(--color-muted);text-decoration:none}
.fil-ariane a:hover{color:var(--color-primary)}
.fil-ariane .sep{margin:0 8px;opacity:.5}

.art-titre-bloc{padding:var(--space-3) 0 var(--space-4);max-width:820px}
.art-titre-bloc h1{font-size:clamp(28px,4.2vw,44px);line-height:1.14;margin-bottom:var(--space-2)}
.meta{display:flex;flex-wrap:wrap;gap:0;color:var(--color-muted);font-size:13.5px;align-items:center}
.meta .dot::before{content:"·";margin:0 8px}

.art-hero-figure{margin-bottom:var(--space-5)}
.art-hero-figure .figure{aspect-ratio:16/9;border-radius:var(--radius-lg);background:linear-gradient(135deg,#C9DCC5,#5B7B5E 55%,#2E4229);box-shadow:var(--shadow-soft);position:relative;overflow:hidden}
.art-hero-figure .figure img{width:100%;height:100%;object-fit:cover}
.art-hero-figure .figure.placeholder::after{content:"Photo d'ouverture";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.85);font-size:13px;font-weight:600;background:rgba(0,0,0,.1)}
.art-hero-figure figcaption{font-size:12.5px;color:var(--color-muted);margin-top:8px;text-align:center}

.art-corps{display:grid;grid-template-columns:220px 1fr;gap:var(--space-5);align-items:start;max-width:1040px;margin:0 auto}
@media (max-width:960px){.art-corps{grid-template-columns:1fr}}

.sommaire{position:sticky;top:80px;font-size:13.5px}
.sommaire.vide{display:none}
.som-titre{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--color-muted);margin:0 0 10px}
.sommaire ol{list-style:none;margin:0 0 var(--space-3);padding:0;display:flex;flex-direction:column;gap:2px;border-left:2px solid var(--color-border)}
.sommaire ol li a{display:block;padding:7px 0 7px 14px;color:var(--color-muted);text-decoration:none;border-left:2px solid transparent;margin-left:-2px;transition:color .15s,border-color .15s}
.sommaire ol li a:hover{color:var(--color-fg)}
.sommaire ol li a.actif{color:var(--color-primary);border-left-color:var(--color-primary);font-weight:700}
.som-retour{font-size:12.5px;color:var(--color-muted);text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.som-retour:hover{color:var(--color-primary)}
@media (max-width:960px){.sommaire{position:static;border-bottom:1px solid var(--color-border);padding-bottom:var(--space-3);margin-bottom:var(--space-3)}}

.entry-content{font-size:17.5px;line-height:1.75;counter-reset:chapitre;max-width:720px}
.entry-content h2{font-size:24px;margin:var(--space-5) 0 var(--space-2);scroll-margin-top:90px;counter-increment:chapitre;display:flex;align-items:baseline;gap:12px}
.entry-content h2::before{content:counter(chapitre, upper-roman) ".";font-family:Georgia,serif;font-style:italic;font-weight:500;color:var(--color-primary);flex:none}
.entry-content--simple h2::before{content:none;margin:0}
.entry-content--simple h2{display:block}
.entry-content--simple > p:first-of-type::first-letter{all:unset}
.entry-content > p:first-of-type::first-letter{float:left;font-family:Georgia,serif;font-size:64px;line-height:.82;font-weight:700;color:var(--color-primary);padding:6px 10px 0 0}
.entry-content p{margin:0 0 var(--space-2);color:var(--color-fg)}
.entry-content strong{color:var(--color-fg)}
.entry-content ul,.entry-content ol{padding-left:22px;color:var(--color-fg)}
.entry-content li{margin-bottom:6px}
.entry-content img{border-radius:var(--radius-md);margin:var(--space-3) 0}
.entry-content figure{margin:var(--space-4) 0}
.entry-content figcaption{font-size:13px;color:var(--color-muted);text-align:center;margin-top:8px}

.entry-content blockquote{margin:var(--space-4) 0;padding:var(--space-3) var(--space-4);border-left:3px solid var(--color-primary);background:var(--color-yellow-bg);border-radius:0 var(--radius-md) var(--radius-md) 0;font-family:Georgia,serif;font-style:italic;font-size:20px;color:var(--color-fg)}
.entry-content blockquote p{margin:0}

.bloc-retenir{background:var(--color-sage-light);border-radius:var(--radius-md);padding:var(--space-3);margin:var(--space-4) 0}
.bloc-titre{display:flex;align-items:center;gap:8px;font-weight:700;font-size:14px;text-transform:uppercase;letter-spacing:.04em;color:var(--color-sage);margin:0 0 10px}
.bloc-retenir ul{margin:0;padding-left:20px;font-size:16px}

.bloc-geste{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3);margin:var(--space-4) 0;position:relative}
.bloc-geste::before{content:attr(data-etiquette);position:absolute;top:-11px;left:20px;background:var(--color-primary);color:#fff;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:4px 12px;border-radius:999px}
.bloc-geste ol{list-style:none;margin:8px 0 0;padding:0;counter-reset:etape;display:grid;gap:14px}
.bloc-geste ol li{counter-increment:etape;position:relative;padding-left:44px;min-height:32px;font-size:16px;margin:0}
.bloc-geste ol li::before{content:counter(etape);position:absolute;left:0;top:0;width:30px;height:30px;border-radius:50%;background:var(--color-primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13.5px}

.bloc-materiel{display:flex;gap:var(--space-2);background:var(--color-yellow-bg);border-radius:var(--radius-md);padding:var(--space-3);margin:var(--space-4) 0}
.bloc-materiel > svg{width:32px;height:32px;flex:none;color:var(--color-primary)}
.bloc-materiel ul{margin:0;padding-left:20px;font-size:16px}

.badge{display:inline-flex;align-items:center;padding:4px 12px;border-radius:999px;font-size:12.5px;font-weight:700;margin:0 6px 6px 0}
.badge-vert{background:var(--color-sage-light);color:var(--color-sage)}
.badge-rose{background:var(--color-yellow-bg);color:var(--color-primary)}
.badge-neutre{background:var(--color-border);color:var(--color-muted)}

.gouttes{display:inline-flex;align-items:center;gap:3px;vertical-align:middle}
.gouttes svg{width:12px;height:16px;color:var(--color-primary)}
.gouttes svg.vide{color:var(--color-border)}
.gouttes .g-txt{font-size:13px;color:var(--color-muted);margin-left:6px;font-weight:700}

.table-wrap{position:relative;margin:var(--space-4) 0;overflow-x:auto;border-radius:var(--radius-md);border:1px solid var(--color-border)}
.table-glow{position:absolute;left:0;right:0;height:0;background:var(--color-sage-light);opacity:0;transition:opacity .2s;pointer-events:none;z-index:0}
.entry-content table{width:100%;border-collapse:collapse;font-size:15px;position:relative;z-index:1;background:var(--color-surface);margin:0}
.entry-content thead th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--color-muted);padding:12px 16px;border-bottom:1px solid var(--color-border)}
.entry-content tbody td{padding:13px 16px;border-bottom:1px solid var(--color-border)}
.entry-content tbody tr:last-child td{border-bottom:none}
.entry-content tbody tr.tr-actif{font-weight:700}

.lecture-reveal{margin:var(--space-5) 0;padding:var(--space-4) 0;border-top:1px solid var(--color-border);border-bottom:1px solid var(--color-border)}
.lr-label{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--color-primary);margin-bottom:var(--space-2)}
.lecture-reveal p{font-family:Georgia,serif;font-size:26px;line-height:1.5;font-style:italic;margin:0}
.mot-r{color:var(--color-border);transition:color .3s}
.mot-r.on{color:var(--color-fg)}

.art-fin{max-width:1040px;margin:var(--space-6) auto var(--space-5)}
.auteur{display:flex;gap:var(--space-2);align-items:center;padding:var(--space-3);background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md)}
.portrait{width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,var(--color-primary),var(--color-yellow));flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;overflow:hidden}
.portrait img{width:100%;height:100%;object-fit:cover}
.auteur h2{font-size:16px;margin:0 0 4px}
.auteur p{margin:0;color:var(--color-muted);font-size:14px}

.lire-ensuite{max-width:1040px;margin:0 auto var(--space-6)}
.rubrique-titre{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3)}
.rubrique-titre h2{font-size:22px}

/* ==================================================================
   RECETTE — hérite du système construit dans les maquettes
   ================================================================== */
.sticky-nav{position:sticky;top:59px;z-index:60;background:var(--color-surface);border-bottom:1px solid var(--color-border);transform:translateY(-100%);transition:transform .3s ease;box-shadow:var(--shadow-card)}
.sticky-nav.visible{transform:translateY(0)}
.sticky-nav-inner{display:flex;align-items:center;gap:var(--space-3);padding:10px var(--space-3);max-width:1180px;margin:0 auto}
.sticky-nav-title{font-family:Georgia,serif;font-weight:700;font-size:15px;flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.sticky-links{display:flex;gap:4px;flex:1;overflow-x:auto;scrollbar-width:none}
.sticky-links::-webkit-scrollbar{display:none}
.sticky-links a{font-size:13px;font-weight:600;color:var(--color-muted);text-decoration:none;padding:6px 12px;border-radius:999px;white-space:nowrap;transition:background .15s,color .15s}
.sticky-links a:hover,.sticky-links a:focus-visible{background:var(--color-sage-light);color:var(--color-sage)}
.read-progress{position:absolute;bottom:-1px;left:0;height:2px;background:var(--color-primary);width:0%;transition:width .1s linear}

.recette-container{max-width:1180px;margin:0 auto;padding:var(--space-3) var(--space-3) var(--space-6)}
.recette-container > .titre,h1.titre{font-size:clamp(28px,4.2vw,44px);line-height:1.14;margin:0 0 var(--space-2)}
.recette-container .sous-titre{font-size:18px;color:var(--color-muted);max-width:640px;margin:0 0 var(--space-3);font-family:Georgia,serif;font-style:italic}
.recette-container .meta-row{margin-bottom:var(--space-3)}

.infos{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:var(--space-2);background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3);box-shadow:var(--shadow-card);margin-bottom:var(--space-4)}
.info-item{display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;padding:var(--space-1)}
.info-item + .info-item{border-left:1px solid var(--color-border)}
.info-item .icon{width:26px;height:26px;color:var(--color-primary)}
.info-item .label{font-size:12px;color:var(--color-muted);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.info-item .value{font-size:15px;font-weight:700}
.difficulty-dots{display:inline-flex;gap:3px}
.difficulty-dots span{width:7px;height:7px;border-radius:50%;background:var(--color-border)}
.difficulty-dots span.on{background:var(--color-primary)}
.price-tier{display:inline-flex;gap:1px;font-size:15px;font-weight:700}
.price-tier .off{color:var(--color-border)}
.price-tier .on{color:var(--color-primary)}
@media (max-width:640px){.infos{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}.info-item + .info-item{border-left:none;border-top:1px solid var(--color-border)}}

.portion-stepper{display:flex;align-items:center;gap:10px}
.portion-stepper button{width:28px;height:28px;border-radius:50%;border:1px solid var(--color-border);background:var(--color-bg);color:var(--color-primary);font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .15s,background .15s}
.portion-stepper button:hover{background:var(--color-sage-light)}
.portion-stepper button:active{transform:scale(.9)}

.action-row{display:flex;gap:10px;margin-bottom:var(--space-5);flex-wrap:wrap}
/* Blindage : un plugin tiers peut appliquer un style générique type
   button{border-radius:50%} sur toute la page (icône flottante, etc.).
   On reprend la main explicitement sur nos propres boutons. */
.action-row button.btn, .action-row a.btn{
	width:auto !important;height:auto !important;aspect-ratio:auto !important;
	border-radius:999px !important;white-space:nowrap;
}
.action-row button.btn svg, .action-row a.btn svg{width:17px !important;height:17px !important;flex:none}
.jump-container{display:none}
hr{border:none;border-top:1px solid var(--color-border);margin:var(--space-4) 0}

.recette-body{display:grid;grid-template-columns:1.6fr 1fr;gap:var(--space-5);align-items:start}
@media (max-width:860px){.recette-body{grid-template-columns:1fr}}
.colonne.droite{position:sticky;top:150px;display:flex;flex-direction:column;gap:var(--space-3)}
@media (max-width:860px){.colonne.droite{position:static}}

.titre-section{font-size:22px;display:flex;align-items:center;gap:10px;margin:var(--space-5) 0 var(--space-2);scroll-margin-top:150px}
.titre-section .dot{width:10px;height:10px;border-radius:50%;flex:none}
.titre-section.vert .dot{background:var(--color-sage)}
.titre-section.bleu .dot{background:#4C7A9E}
.titre-section.orange .dot{background:var(--color-primary)}
.titre-section.rouge .dot{background:#B5432C}

ul.ingredients{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
ul.ingredients li{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:var(--radius-sm);transition:background .15s;cursor:pointer}
ul.ingredients li:hover{background:var(--color-sage-light)}
ul.ingredients li input[type=checkbox]{appearance:none;width:20px;height:20px;border-radius:6px;border:2px solid var(--color-border);flex:none;cursor:pointer;position:relative;transition:background .15s,border-color .15s}
ul.ingredients li input[type=checkbox]:checked{background:var(--color-sage);border-color:var(--color-sage)}
ul.ingredients li input[type=checkbox]:checked::after{content:"";position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg)}
ul.ingredients li span.txt{transition:color .15s,opacity .15s}
ul.ingredients li input:checked ~ span.txt{color:var(--color-muted);text-decoration:line-through;opacity:.6}
.qty{font-weight:700;color:var(--color-primary)}

ul.materiel{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
ul.materiel li{background:var(--color-sage-light);color:var(--color-sage);font-size:13px;font-weight:600;padding:7px 13px;border-radius:999px}

.steps-progress-track{height:6px;background:var(--color-border);border-radius:999px;overflow:hidden;margin:var(--space-2) 0}
.steps-progress-fill{height:100%;width:0%;background:var(--color-sage);transition:width .3s ease}
/* Numérotation en CSS pur (counter), comme .bloc-geste : fonctionne SANS JavaScript,
   sur l'ancien ET le nouveau format de recette, qu'un wrapper .step-check/.step-main
   ait été injecté ou non. Le JS (theme.js) ne fait qu'ajouter le clic-pour-cocher
   par-dessus, jamais la numérotation elle-même. */
ol.etapes{list-style:none;margin:0;padding:0;counter-reset:step;display:flex;flex-direction:column;gap:var(--space-2)}
ol.etapes > li{
	position:relative;counter-increment:step;padding:var(--space-2) var(--space-2) var(--space-2) 60px;
	border-radius:var(--radius-md);border:1px solid var(--color-border);background:var(--color-surface);
	cursor:pointer;transition:background .2s,border-color .2s,opacity .2s;
}
ol.etapes > li::before{
	content:counter(step);position:absolute;left:14px;top:14px;width:32px;height:32px;border-radius:50%;
	border:2px solid var(--color-border);background:var(--color-bg);display:flex;align-items:center;justify-content:center;
	font-weight:700;color:var(--color-muted);transition:all .2s;
}
ol.etapes > li.done{background:var(--color-sage-light);border-color:var(--color-sage);opacity:.75}
ol.etapes > li.done::before{content:"✓";background:var(--color-sage);border-color:var(--color-sage);color:#fff}
ol.etapes li h3{margin:0 0 4px;font-size:16px;font-family:inherit;font-weight:700}
ol.etapes li p{margin:0;color:var(--color-muted);font-size:15px}
/* Compatibilité avec l'ancien wrapper JS (.step-check/.step-main), si présent :
   on masque le cercle dupliqué et on laisse le ::before de la li faire le travail. */
ol.etapes li .step-check{display:none}
ol.etapes li .step-main{flex:1;min-width:0}

.btn-orange{margin-top:var(--space-3);background:var(--color-primary);color:#fff;border:none;padding:13px 22px;border-radius:999px;font-weight:700;cursor:pointer;font-size:14px;display:inline-flex;align-items:center;gap:8px}
.btn-orange:hover{background:var(--color-primary-light)}

.bloc-jaune,.bloc-texte{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3);box-shadow:var(--shadow-card)}
.bloc-jaune{background:var(--color-yellow-bg);border-color:#F0DBAE}
.bloc-jaune h3,.bloc-texte h3{margin:0 0 10px;font-size:16px}
.bloc-jaune ul{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;font-size:14px}
.bloc-texte p{margin:0;font-size:14.5px;color:var(--color-muted)}

.faq-item{border-bottom:1px solid var(--color-border)}
.faq-item:first-child{border-top:1px solid var(--color-border)}
.faq-q{width:100%;display:flex;align-items:center;justify-content:space-between;gap:var(--space-2);background:none;border:none;text-align:left;padding:var(--space-2) 4px;font-size:16px;font-weight:700;cursor:pointer;color:var(--color-fg)}
.faq-q .plus{flex:none;width:22px;height:22px;position:relative;color:var(--color-primary)}
.faq-q .plus::before,.faq-q .plus::after{content:"";position:absolute;background:currentColor;top:50%;left:50%;transform:translate(-50%,-50%)}
.faq-q .plus::before{width:14px;height:2px}
.faq-q .plus::after{width:2px;height:14px;transition:transform .2s}
.faq-item.open .faq-q .plus::after{transform:translate(-50%,-50%) rotate(90deg) scale(0)}
.faq-a{max-height:0;overflow:hidden;transition:max-height .25s ease}
.faq-a p{margin:0 0 var(--space-2);color:var(--color-muted);font-size:14.5px;padding:0 4px}
.faq-item.open .faq-a{max-height:200px}

.reco-section{margin:var(--space-6) 0 var(--space-5)}
.reco-header{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:var(--space-3)}
.reco-header h2{font-size:24px;margin:0}
.reco-header span{color:var(--color-muted);font-size:14px}

/* mode cuisine plein écran */
.cook-mode{position:fixed;inset:0;background:var(--color-bg);z-index:200;display:none;flex-direction:column}
.cook-mode.open{display:flex}
.cook-mode-top{display:flex;align-items:center;justify-content:space-between;padding:var(--space-3);border-bottom:1px solid var(--color-border)}
.cook-mode-close{background:none;border:none;font-size:22px;cursor:pointer;color:var(--color-muted);width:40px;height:40px;border-radius:50%}
.cook-mode-close:hover{background:var(--color-sage-light)}
.cook-mode-body{flex:1;display:flex;align-items:center;justify-content:center;padding:var(--space-4);text-align:center}
.cook-mode-step{max-width:560px}
.cook-mode-step .num{color:var(--color-primary);font-weight:700;font-size:14px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:var(--space-2)}
.cook-mode-step h3{font-size:28px;margin:0 0 var(--space-2)}
.cook-mode-step p{font-size:18px;color:var(--color-muted)}
.cook-mode-nav{display:flex;gap:var(--space-2);justify-content:center;padding:var(--space-3);border-top:1px solid var(--color-border)}
.cook-mode-nav button{padding:13px 26px;border-radius:999px;font-weight:700;border:1px solid var(--color-border);background:var(--color-surface);cursor:pointer}
.cook-mode-nav button.primary{background:var(--color-primary);color:#fff;border-color:var(--color-primary)}
.cook-mode-dots{display:flex;gap:6px;justify-content:center;padding-bottom:var(--space-2)}
.cook-mode-dots span{width:7px;height:7px;border-radius:50%;background:var(--color-border)}
.cook-mode-dots span.active{background:var(--color-primary);width:20px;border-radius:4px}
.wake-hint{font-size:13px;color:var(--color-muted);display:flex;align-items:center;gap:6px;justify-content:center;margin-top:var(--space-2)}

/* ==================================================================
   COMMENTAIRES — le thème n'a pas de comments.php dédié, WordPress
   utilise donc son rendu par défaut (wp_list_comments / comment_form) :
   on stylise ses classes/id standards pour rester cohérent visuellement.
   ================================================================== */
.commentaires{max-width:760px;margin:0 auto var(--space-6);padding-top:var(--space-4);border-top:1px solid var(--color-border)}
.comments-title,.comment-reply-title{font-size:22px;margin:0 0 var(--space-3);font-family:Georgia,serif}
.comment-reply-title small a{font-size:13px;font-weight:600;color:var(--color-primary);margin-left:10px}

ol.comment-list{list-style:none;margin:0 0 var(--space-4);padding:0;display:flex;flex-direction:column;gap:var(--space-2)}
ol.comment-list ol.children{list-style:none;margin:var(--space-2) 0 0;padding:0 0 0 var(--space-4);display:flex;flex-direction:column;gap:var(--space-2)}
.comment-body{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3)}
.comment-author.vcard{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.comment-author .avatar{width:36px;height:36px;border-radius:50%;flex:none}
.comment-author .fn{font-style:normal;font-weight:700;font-size:14.5px}
.comment-author .says{display:none}
.comment-metadata{font-size:12.5px;color:var(--color-muted);margin-bottom:10px}
.comment-metadata a{color:inherit;text-decoration:none}
.comment-content p{margin:0 0 8px;font-size:15px;color:var(--color-fg)}
.comment-content p:last-child{margin-bottom:0}
.reply{margin-top:10px}
.comment-reply-link{display:inline-block;font-size:13px;font-weight:700;color:var(--color-primary);text-decoration:none;padding:4px 12px;border:1px solid var(--color-border);border-radius:999px}
.comment-reply-link:hover{background:var(--color-sage-light);border-color:var(--color-sage)}
.comment-awaiting-moderation{font-size:13px;font-style:italic;color:var(--color-muted)}

#respond{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3);margin-top:var(--space-3)}
.comment-notes,.logged-in-as{font-size:13.5px;color:var(--color-muted);margin:0 0 var(--space-2)}
.logged-in-as a{color:var(--color-primary)}
#commentform p{margin:0 0 var(--space-2)}
#commentform label{display:block;font-size:13px;font-weight:700;margin-bottom:6px;color:var(--color-fg)}
#commentform input[type=text],#commentform input[type=email],#commentform input[type=url],#commentform textarea{
	width:100%;padding:11px 14px;border:1px solid var(--color-border);border-radius:var(--radius-sm);
	font-family:inherit;font-size:15px;color:var(--color-fg);background:var(--color-bg);
}
#commentform textarea{min-height:120px;resize:vertical}
#commentform input:focus,#commentform textarea:focus{outline:2px solid var(--color-sage);outline-offset:1px}
.comment-form-cookies-consent{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--color-muted)}
.comment-form-cookies-consent label{display:inline;margin:0}
#commentform .form-submit{margin-top:var(--space-2)}
#commentform #submit{
	background:var(--color-primary);color:#fff;border:none;padding:11px 22px;border-radius:999px;
	font-weight:700;font-size:14px;cursor:pointer;transition:background .15s;white-space:nowrap;width:max-content;
}
#commentform #submit:hover{background:var(--color-primary-light)}

/* ==================================================================
   WIDGET RÉGIE PUBLICITAIRE (Taboola) — conteneur dédié, distinct de
   l'article/la recette comme demandé par la régie.
   ================================================================== */

/* ==================================================================
   IMPRESSION
   ================================================================== */
@media print{
  .site-header,.progression,.sticky-nav,.newsletter,.ad-slot,.marquee,footer.site-footer,.action-row,.sommaire,.taboola-widget{display:none !important}
  body{background:#fff;color:#000}
}
