/*
Theme Name: Algerie360 v5
Author: Ramzi Z / Salah H
Description: Refonte v5 — design newspaper (Newsreader / Georgia / Inter). Aucune dépendance à Bootstrap ni à la feuille de style v4-5. CSS propre et autonome.
Version: 5.0.0
Tags:
*/

/* ==========================================================================
   Algérie 360° — thème v5 (maquette statique)
   Refonte « presse » : densité, grille en colonnes, filets fins.
   Couleur de marque conservée : #8bc53f
   ========================================================================== */

/* ---------- 1. Jetons de design ---------------------------------------- */
:root {
  --brand:        #8bc53f;
  --brand-hover:  #6fae2b;
  --brand-ink:    #3f7d16;   /* vert foncé accessible pour texte/liens sur blanc */
  --brand-wash:   #f3f8ea;
  --brand-line:   #d8e8bf;

  --ink:     #0f1216;   /* titres, presque noir */
  --body:    #23272e;
  --muted:   #61676f;
  --faint:   #969ca4;
  --line:    #e2e4e7;   /* filets */
  --line-2:  #eef0f2;
  --bg:      #ffffff;
  --bg-soft: #f7f8f6;
  --bar:     #0f1216;
  --bar-2:   #262b31;

  --live:      #d21f1f;
  --live-tint: #fbeaea;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;      /* titres (serif de presse) */
  --read:  Georgia, "Times New Roman", "Noto Serif", serif;      /* corps de lecture (comme NYT/Guardian) */
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* interface */

  /* Échelle typographique */
  --t-xs:  0.72rem;
  --t-sm:  0.82rem;
  --t-base:0.94rem;
  --t-md:  clamp(1rem, 0.95rem + 0.25vw, 1.12rem);
  --t-lg:  clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --t-xl:  clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  --t-2xl: clamp(1.75rem, 1.35rem + 1.9vw, 2.8rem);
  --t-3xl: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem);

  --radius: 2px;
  --maxw: 1280px;
  --measure: 40rem;
  --rule: 1px solid var(--line);
}

/* ---------- 2. Base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--read); font-size: var(--t-base);
  line-height: 1.55; color: var(--body); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; /* filet de sécurité contre tout débordement horizontal */
}
/* Contrôles de formulaire : interface -> Inter (le corps hérite du serif) */
input, textarea, select, button { font-family: var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--serif); color: var(--ink); line-height: 1.14; margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
ul,ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
time { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(0.9rem, 0.4rem + 2vw, 1.75rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
/* Lien d'évitement : masqué jusqu'au focus clavier */
.skip-link { position: absolute; left: 0.5rem; top: -3rem; z-index: 100; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 4px 4px; font-family: var(--sans); font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 0; color: #fff; }

/* Titre d'article : lien qui passe au vert au survol */
.hl { color: var(--ink); }
.hl:hover { color: var(--brand-ink); }
.thumb { object-fit: cover; width: 100%; border-radius: var(--radius); background: var(--line-2); }

/* ---------- 3. Barre utilitaire ---------------------------------------- */
.topbar { background: var(--bar); color: #c2c7cd; font-size: var(--t-xs); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 36px; gap: 1rem; }
.topbar__meta { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.topbar__meta li { white-space: nowrap; }
.topbar__meta strong { color: #fff; font-weight: 600; }
.topbar__date { text-transform: capitalize; }
.topbar__right { display: flex; gap: 0.7rem; align-items: center; }
.topbar a { color: #c2c7cd; }
.topbar a:hover { color: var(--brand); }
.topbar__lang { border: 1px solid #333941; padding: 2px 9px; border-radius: 3px; color: #fff !important; }
.topbar__socials { display: flex; gap: 0.55rem; }

/* ---------- 4. Masthead ------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(0.7rem, 0.4rem + 1vw, 1.3rem); }
.brand { display: inline-flex; align-items: center; }
.brand__mark {
  display: inline-flex; align-items: baseline; gap: 0.26em;
  background: var(--brand); color: #fff; padding: 0.3em 0.55em; border-radius: 4px;
  font-family: var(--sans); font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
  letter-spacing: -0.01em; line-height: 1;
}
.brand__mark .light { font-weight: 400; }
.brand__mark .bold  { font-weight: 800; }
.brand:hover .brand__mark { background: var(--brand-hover); }

/* Logo réel Algérie 360 (blanc sur vert, image fournie par la rédaction) */
.brand__logo { display: block; height: 38px; width: auto; }
.mainnav__brand .brand__logo { height: clamp(30px, 26px + 1vw, 40px); }
.drawer__head .brand__logo { height: 34px; }
.footer .brand__logo { height: 44px; }
.masthead__actions { display: flex; align-items: center; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); padding: 0.6rem 1.05rem; border-radius: 3px; border: 1px solid transparent; white-space: nowrap; transition: background .15s, color .15s; }
.btn--brand { background: var(--ink); color: #fff; }
.btn--brand:hover { background: var(--brand-hover); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 0.35rem; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; display: block; }

/* Bandeau publicitaire en haut de page. Il reste dans le flux normal : en
   défilant, il disparaît vers le haut tandis que la nav (sticky) se colle. */
.topad { padding: 0.7rem 0; background: var(--brand); }
.ad--970x250 { height: 250px; max-width: 970px; margin-inline: auto; }

/* ---------- 5. Navigation principale (logo intégré) --------------------- */
.mainnav { background: var(--brand); border-bottom: 2px solid var(--brand-hover); position: sticky; top: 0; z-index: 40; }
.mainnav__inner { display: flex; align-items: stretch; gap: 1.25rem; min-height: 62px; }
.mainnav__brand { display: flex; align-items: center; flex: 0 0 auto; }
.mainnav__brand .brand__mark { font-size: clamp(1.2rem, 1rem + 0.9vw, 1.55rem); }
/* flex:1 + justify-content:center : le menu se centre dans l'espace entre le
   logo (à gauche) et les outils (à droite) au lieu de se coller au logo. */
.mainnav__list { display: flex; align-items: stretch; flex-wrap: nowrap; flex: 1 1 auto; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.mainnav__list::-webkit-scrollbar { display: none; }
/* li en flex : le lien s'étire sur toute la hauteur de la barre, le texte se
   centre verticalement (aligné avec le logo) et le trait actif tombe en bas. */
.mainnav__list > li { display: flex; align-items: stretch; }
.mainnav__list > li > a {
  display: inline-flex; align-items: center; padding: 0 clamp(0.45rem, 0.25rem + 0.45vw, 0.85rem);
  color: var(--ink); font-family: var(--sans); font-weight: 700; font-size: var(--t-sm);
  text-transform: uppercase; letter-spacing: 0.03em;
  border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .15s, border-color .15s;
}
.mainnav__list > li > a:hover { color: var(--ink); border-bottom-color: rgba(15,18,22,.35); }
.mainnav__list > li.is-active > a { color: var(--ink);}

.mainnav__tools { display: flex; align-items: center; gap: 0.55rem; margin-left: auto; flex: 0 0 auto; }
.mainnav__search { display: flex; align-items: center; gap: 0.4rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 3px; padding: 0.4rem 0.7rem; color: var(--muted); width: 180px; }
.mainnav__search input { border: 0; background: transparent; outline: none; font: inherit; font-size: var(--t-sm); color: var(--ink); width: 100%; }
.mainnav__more { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--ink); color: #fff; border: 0; border-radius: 3px; padding: 0.55rem 0.85rem; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); }
.mainnav__more:hover { background: var(--brand-ink); }
.mainnav__more svg { width: 18px; height: 18px; display: block; }
.mainnav__search-btn { display: none; background: none; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; padding: 0.5rem; color: #fff; }
.mainnav__search-btn svg { width: 20px; height: 20px; display: block; }

/* ---------- 5b. Barre de rubriques mobile (façon Washington Post) ------- */
.mobilenav { display: none; }
@media (max-width: 900px) {
  /* Le logo défile, la barre de rubriques se colle en haut (comme le WaPo). */
  .mainnav { position: static; }
  .mobilenav { display: block; background: var(--brand); border-top: 1px solid var(--brand-hover); position: sticky; top: 0; z-index: 39; }
  .mobilenav__list { display: flex; overflow-x: auto; scrollbar-width: none; padding-inline: clamp(0.9rem, 0.4rem + 2vw, 1.75rem); }
  .mobilenav__list::-webkit-scrollbar { display: none; }
  .mobilenav__list > li > a {
    display: inline-flex; align-items: center; height: 44px; padding: 0 0.85rem;
    white-space: nowrap; font-family: var(--sans); font-weight: 700; font-size: var(--t-sm);
    text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink);
    border-bottom: 3px solid transparent; margin-bottom: -1px;
  }
  .mobilenav__list > li:first-child > a { padding-left: 0; }
}

/* ---------- 6. Flash actu ----------------------------------------------- */
.flash { background: var(--bg); border-bottom: 1px solid var(--line); }
.flash__inner { display: flex; align-items: stretch; gap: 0; min-height: 40px; }
.flash__label { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--live); color: #fff; font-family: var(--sans); font-weight: 700; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0.8rem; white-space: nowrap; position: relative; z-index: 2; flex: 0 0 auto; }
.flash__dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
/* min-width:0 : sans lui, cet élément flex refuse de rétrécir sous la largeur
   du bandeau défilant (nowrap) et déborde toute la page horizontalement. */
.flash__viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; padding-left: 1rem; }
.flash__track { display: flex; gap: 2.5rem; white-space: nowrap; animation: ticker 36s linear infinite; }
.flash:hover .flash__track { animation-play-state: paused; }
.flash__track a { color: var(--body); font-family: var(--sans); font-weight: 500; font-size: var(--t-sm); }
.flash__track a::before { content: "•"; color: var(--brand); margin-right: 0.6rem; font-weight: 700; }
.flash__track a:hover { color: var(--brand-ink); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 7. Étiquettes & méta ---------------------------------------- */
.kicker { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-ink); margin-bottom: 0.35rem; }
.kicker--live { color: var(--live); }
.meta { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; color: var(--muted); font-size: var(--t-xs); font-family: var(--sans); }
.meta__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.meta__author { color: var(--ink); font-weight: 600; }

/* ---------- 8. FRONT PAGE (grille en 3 colonnes) ------------------------ */
.frontpage { display: grid; grid-template-columns: 258px minmax(0,1fr) 300px; border-top: 3px solid var(--ink); margin-top: 1.25rem; }
.fp-col { padding: 1.1rem 1.35rem 0.4rem; border-left: 1px solid var(--line); min-width: 0; }
.fp-col:first-child { padding-left: 0; border-left: 0; }
.fp-col:last-child { padding-right: 0; }

/* Étiquette de rail */
.rail__label { font-family: var(--sans); font-weight: 800; font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); padding-bottom: 0.55rem; border-bottom: 2px solid var(--brand); margin-bottom: 0.35rem; }
.rail__label--live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--live); border-bottom-color: var(--live); }

/* Rail « à la une » (gauche) */
.rail li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: flex-start; }
.rail li:first-child { padding-top: 0; }   /* aligne le 1er titre avec le lead central */
.rail li:last-child { border-bottom: 0; }
.rail a { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.24; color: var(--ink); }
.rail a:hover { color: var(--brand-ink); }
.rail__body { min-width: 0; }
.rail__body .kicker { font-size: 0.66rem; margin-bottom: 0.15rem; }
.rail__thumb { flex: 0 0 74px; height: 54px; }
.rail__num { flex: 0 0 auto; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--brand); line-height: 1; min-width: 1.2em; }

/* Variante « carte » : image pleine largeur, titre en dessous */
.rail li.rail__card { display: block; }
.rail__card > a:first-child { display: block; }
.rail__card-media { width: 100%; aspect-ratio: 16/9; margin-bottom: 0.5rem; }
.rail__card .kicker { font-size: 0.66rem; margin-bottom: 0.15rem; }

/* Rail « en continu » (droite) : heure et titre sur la même ligne */
.rail--live li { display: flex; gap: 0.55rem; align-items: baseline; padding: 0.65rem 0; }
.rail--live time { flex: 0 0 auto; color: var(--live); font-family: var(--sans); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em; }
.rail--live a { font-size: 0.96rem; line-height: 1.28; }

/* Widget à onglets : Les + lus / Le direct (partagent le même espace) */
.tabbox { }
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 0.3rem; }
.tab { background: none; border: 0; padding: 0 0 0.55rem; margin: 0; font-family: var(--sans); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--faint); cursor: pointer; position: relative; }
.tab:hover { color: var(--body); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); border-radius: 2px; }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; }

.tablist li { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.tablist li:last-child { border-bottom: 0; }
.tab-kicker { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.22rem; }
.tab-title { font-family: var(--serif); font-weight: 700; font-size: 1rem; line-height: 1.26; color: var(--ink); }
.tab-title:hover { color: var(--brand-ink); }

/* Les + lus : numéro imposant à gauche */
.tablist--ranked { counter-reset: wpp-rank; }
.tablist--ranked li { display: flex; gap: 0.85rem; align-items: flex-start; counter-increment: wpp-rank; }
/* Numéro de rang (1..5) : compteur CSS. WordPress Popular Posts ne fournit pas
   de marqueur de rang dans post_html ; le compteur numérote donc chaque <li>. */
.tablist--ranked li::before,
.tab-num { flex: 0 0 auto; min-width: 0.85em; font-family: var(--sans); font-weight: 800; font-size: 1.9rem; line-height: 0.9; color: var(--brand); }
.tablist--ranked li::before { content: counter(wpp-rank); }

/* Le direct : heure (rouge) + rubrique sur une ligne, titre en dessous */
.tab-live-meta { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.22rem; }
.tab-live-time { font-family: var(--sans); font-weight: 700; font-size: 0.72rem; color: var(--live); }
.tab-live-cat { font-family: var(--sans); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tab-live-cat::before { content: "· "; color: var(--faint); }

/* Lead central */
.lead { padding-bottom: 1rem; }
.lead__media { aspect-ratio: 3/2; margin-bottom: 0.75rem; }
/* Variante inversée : titre + chapô + signature, puis image en bas */
.lead--reverse .lead__media { margin: 0.9rem 0 0; }
.lead__title { font-size: clamp(1.5rem, 1.15rem + 1.35vw, 2.25rem); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--brand-ink); }
.lead__dek { font-family: var(--serif); font-size: var(--t-md); line-height: 1.45; color: var(--muted); margin-bottom: 0.6rem; }
.fp-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.4rem; }
.fp-sub__media { aspect-ratio: 3/2; margin-bottom: 0.45rem; }
.fp-sub h3 { font-size: var(--t-md); line-height: 1.2; }

/* ---------- 9. Bandes de cartes (strip) --------------------------------- */
/* La bande de cartes est désormais enveloppée dans une .section : c'est
   .section__head qui fournit le titre (barre verte + filet), comme les autres
   rubriques. .strip ne gère plus que la grille de cartes. */
.strip { display: grid; grid-template-columns: repeat(5, 1fr); }
.strip article { padding: 0 1rem 1rem; border-left: 1px solid var(--line); }
.strip article:first-of-type { padding-left: 0; border-left: 0; }
.strip__media { aspect-ratio: 3/2; margin-bottom: 0.5rem; }
.strip h3 { font-size: 1.06rem; line-height: 1.24; }
.strip .kicker { font-size: 0.64rem; }

/* ---------- 10. En-tête de section -------------------------------------- */
.section { margin-top: 2.25rem; }
.section__head { display: flex; align-items: center; gap: 0.9rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.8rem; margin-bottom: 1.1rem; }
.section__title { font-family: var(--sans); font-weight: 800; font-size: var(--t-lg); text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink); display: inline-flex; align-items: center; gap: 0.55rem; }
/* barre verticale un peu plus courte : espace visible au-dessus ET en dessous,
   la barre ne touche pas le filet horizontal du bas */
.section__title::before { content: ""; width: 6px; height: 0.95em; background: var(--brand); border-radius: 2px; }
.section__title a { color: var(--ink); }
.section__more { margin-left: auto; font-family: var(--sans); font-weight: 600; font-size: var(--t-xs); color: var(--brand-ink); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.section__more:hover { color: var(--brand-hover); }

/* Grille de rubrique dense : lead + 2 colonnes de titres */
.dense { display: grid; grid-template-columns: 1.5fr 1fr 1fr; }
.dense > * { padding: 0 1.35rem; border-left: 1px solid var(--line); min-width: 0; }
.dense > *:first-child { padding-left: 0; border-left: 0; }
.dense > *:last-child { padding-right: 0; }
.dense__lead-media { aspect-ratio: 16/9; margin-bottom: 0.6rem; }
.dense__lead h3 { font-size: var(--t-xl); line-height: 1.1; margin-bottom: 0.4rem; }
.dense__lead .lead__dek { font-size: var(--t-base); }
.dense__list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.dense__list li:first-child { padding-top: 0; }
.dense__list li:last-child { border-bottom: 0; }
.dense__list a { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; line-height: 1.24; color: var(--ink); }
.dense__list a:hover { color: var(--brand-ink); }
.dense__list .withthumb { display: flex; gap: 0.7rem; align-items: flex-start; }
.dense__list .withthumb .rail__thumb { flex-basis: 68px; height: 50px; }
/* Variante « carte » dans une colonne dense : image pleine largeur, titre dessous */
.dense__list li.dense-card { display: block; }
.dense__list li.dense-card > a:first-child { display: block; }
.dense-card-media { width: 100%; aspect-ratio: 16/9; margin-bottom: 0.45rem; }

/* ---------- 11. Layout corps + barre latérale --------------------------- */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(1.5rem, 1rem + 2vw, 2.75rem); align-items: start; }

/* Bande de 4 cartes (rubrique légère) */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.grid-4 article { padding: 0 1.1rem; border-left: 1px solid var(--line); min-width: 0; }
.grid-4 article:first-child { padding-left: 0; border-left: 0; }
.grid-4 article:last-child { padding-right: 0; }
.grid-4 .card__media { aspect-ratio: 3/2; margin-bottom: 0.5rem; }
.grid-4 h3 { font-size: 1rem; line-height: 1.24; }

/* ---------- Économie : bloc pleine largeur en 3 colonnes --------------- */
.econ__grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; }
.econ__grid > * { padding: 0 1.6rem; border-left: 1px solid var(--line); min-width: 0; }
.econ__grid > *:first-child { padding-left: 0; border-left: 0; }
.econ__grid > *:last-child { padding-right: 0; }
.econ__dek { color: var(--muted); font-family: var(--sans); font-size: 0.92rem; line-height: 1.5; margin: 0 0 0.4rem; }

/* Colonne 1 : lead illustré + article texte */
.econ__lead { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.1rem; }
.econ__lead-media { aspect-ratio: 3/2; margin-bottom: 0.65rem; }
/* Tous les titres de la rubrique ont la même taille (le lead n'est pas agrandi) */
.econ__lead h3, .econ__text h3 { font-size: 1.2rem; line-height: 1.16; margin-bottom: 0.45rem; }
.econ__lead h3 a, .econ__text h3 a { color: var(--ink); }
.econ__lead h3 a:hover, .econ__text h3 a:hover { color: var(--brand-ink); }

/* Colonnes 2 & 3 : listes d'articles */
.econ__list li { padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.econ__list li:first-child { padding-top: 0; }
.econ__list li:last-child { border-bottom: 0; }
.econ__list h3 { font-size: 1.2rem; line-height: 1.16; margin-bottom: 0.35rem; }
.econ__list h3 a { color: var(--ink); }
.econ__list h3 a:hover { color: var(--brand-ink); }

/* Colonne 2 : vignette à droite */
.econ__list--thumb li { display: flex; gap: 1rem; align-items: flex-start; }
.econ__list--thumb .econ__body { flex: 1; min-width: 0; }
.econ__thumb { flex: 0 0 116px; }
.econ__thumb img { width: 116px; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; background: var(--line-2); }

@media (max-width: 980px) {
  .econ__grid { grid-template-columns: 1fr 1fr; }
  .econ__grid > *:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 2px solid var(--line); padding-top: 1rem; margin-top: 0.4rem; }
  .econ__grid > *:nth-child(3).econ__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6rem; }
  /*.econ__grid > *:nth-child(3) li:nth-child(2) { padding-top: 0; }*/
}
@media (max-width: 620px) {
  .econ__grid { grid-template-columns: 1fr; }
  .econ__grid > * { border-left: 0; padding-inline: 0; }
  .econ__grid > *:not(:first-child) { border-top: 2px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }
  .econ__grid > *:nth-child(3).econ__list { grid-template-columns: 1fr; }
}

/* Cartes génériques (page article « à lire aussi ») */
.card__media { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius); background: var(--line-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__title { font-size: var(--t-md); margin: 0.5rem 0 0.3rem; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--brand-ink); }

/* ---------- 12. Barre latérale ------------------------------------------ */
.sidebar { display: grid; gap: 1.75rem; align-content: start; }
.widget__head { font-family: var(--sans); font-weight: 800; font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); padding-bottom: 0.5rem; border-bottom: 2px solid var(--brand); margin-bottom: 0.8rem; }
.mostread { counter-reset: mr; }
.mostread li { counter-increment: mr; display: flex; gap: 0.8rem; align-items: baseline; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.mostread li:first-child { padding-top: 0; }
.mostread li:last-child { border-bottom: 0; }
.mostread li::before { content: counter(mr); font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--brand); line-height: 1; min-width: 1em; }
.mostread a { color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.26; }
.mostread a:hover { color: var(--brand-ink); }

.newsletter { background: var(--brand-wash); border: 1px solid var(--brand-line); border-radius: var(--radius); padding: 1.3rem; }
.newsletter h3 { font-size: var(--t-md); margin-bottom: 0.35rem; }
.newsletter p { color: var(--muted); font-size: var(--t-sm); }
.newsletter form { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.newsletter input { border: 1px solid var(--line); border-radius: 3px; padding: 0.6rem 0.9rem; font: inherit; }

.prayers { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prayers__head { background: var(--bar); color: #fff; padding: 0.75rem 1rem; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); display: flex; justify-content: space-between; align-items: center; }
.prayers__head span { color: var(--brand); font-size: var(--t-xs); }
.prayers ul { padding: 0.3rem 1rem 0.7rem; }
.prayers li { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px solid var(--line-2); font-size: var(--t-base); }
.prayers li:last-child { border-bottom: 0; }
.prayers li.is-now { color: var(--brand-ink); font-weight: 700; }

/* Widget « Nos partenaires » : vignette à gauche + badge, rubrique, titre */
.partners li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.partners li:first-child { padding-top: 0; }
.partners li:last-child { border-bottom: 0; padding-bottom: 0; }
.partners__media { position: relative; flex: 0 0 92px; }
.partners__media img { width: 92px; height: 68px; object-fit: cover; border-radius: 2px; background: var(--line-2); }
.partners__badge { position: absolute; left: 0; bottom: 0; width: 26px; height: 26px; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1; }
.partners__badge::before { content: "\201C"; transform: translateY(0.14em); }
.partners__kicker { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.2rem; }
.partners__title { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.26; color: var(--ink); }
.partners__title:hover { color: var(--brand-ink); }

.ad { background: repeating-linear-gradient(45deg, #f2f3f1, #f2f3f1 12px, #eaece8 12px, #eaece8 24px); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; color: var(--faint); font-family: var(--sans); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; }
.ad--300x250 { height: 250px; margin-bottom: 1.1rem; }
.ad--300x600 { height: 600px; }
.ad--billboard { height: 250px; margin-block: 1.75rem; }

/* ---------- 13. Page article -------------------------------------------- */
.breadcrumb { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); padding-block: 0.9rem; display: flex; gap: 0.45rem; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand-ink); }
.breadcrumb span { color: var(--faint); }
.article__header { max-width: 820px; margin-inline: auto; }
.article__title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.55rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0.4rem 0 1.4rem; }
.article__dek { font-family: var(--serif); font-size: var(--t-lg); line-height: 1.45; color: var(--body); font-weight: 400; margin-bottom: 1.3rem; }
.article__byline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.9rem; border-block: 1px solid var(--line); margin-bottom: 1.5rem; }
.byline { display: flex; align-items: center; gap: 0.7rem; }
.byline__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-family: var(--sans); }
.byline__name { color: var(--ink); font-weight: 600; font-family: var(--sans); }
.share { display: flex; gap: 0.45rem; }
.share a, .share button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.share button { background: none; cursor: pointer; font: inherit; padding: 0; }
.share a:hover, .share button:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-wash); }
.share a svg { width: 16px; height: 16px; display: block; }
.share__native svg { width: 18px; height: 18px; display: block; }
/* Image d'article contenue (façon CNBC) : largeur du bloc titre, pas pleine
   largeur — les photos de moindre qualité ne sont pas agrandies à l'excès. */
.article__hero { max-width: 820px; margin: 0 auto 1.8rem; }
.article__hero img { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; }
.article__caption { margin: 0.55rem 0 0; font-family: var(--sans); font-size: var(--t-xs); line-height: 1.5; color: var(--body); }
.article__credit { display: block; color: var(--muted); font-style: italic; margin-top: 0.1rem; }
.prose { max-width: var(--measure); margin-inline: auto; font-size: 1.13rem; line-height: 1.75; color: var(--body); }
.prose p { margin: 0 0 1.4rem; }
.prose h2 { font-size: var(--t-xl); margin: 2rem 0 0.8rem; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-decoration-color: var(--brand-line); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose blockquote { margin: 1.8rem 0; padding: 0.3rem 0 0.3rem 1.4rem; border-left: 4px solid var(--brand); font-family: var(--serif); font-size: var(--t-lg); line-height: 1.5; color: var(--ink); font-style: italic; }

/* Aucun média inséré dans le contenu (image, vidéo, iframe YouTube, embed…) ne
   peut dépasser la largeur de l'article : largeur plafonnée, hauteur auto. */
.prose img,
.prose video,
.prose embed,
.prose object,
.prose svg { max-width: 100%; height: auto; }
.prose img { display: block; }
/* Les iframes sont simplement plafonnées en largeur. On NE force pas height:auto
   ni un ratio ici : cela écraserait et coupait les iframes publicitaires
   (AdSense/GPT), qui ont leurs propres dimensions. */
.prose iframe { max-width: 100%; }
/* Ratio 16:9 responsive UNIQUEMENT pour les vraies vidéos intégrées. */
.prose iframe[src*="youtube"],
.prose iframe[src*="youtu.be"],
.prose iframe[src*="vimeo"],
.prose iframe[src*="dailymotion"],
.prose .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.prose figure { max-width: 100%; margin: 1.6rem 0; }
.prose figure img { width: 100%; }
.prose figcaption { font-family: var(--sans); font-size: var(--t-sm); color: var(--muted); margin-top: 0.4rem; }
/* Empêche les longues URL / mots de forcer un débordement horizontal. */
.prose { overflow-wrap: break-word; word-break: break-word; }
/* Les tableaux et embeds trop larges défilent à l'intérieur au lieu de déborder. */
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose .wp-block-embed,
.prose .wp-block-embed__wrapper,
.prose .embed-container { max-width: 100%; }
/* Légendes WordPress : le wrapper .wp-caption reçoit un style="width:1290px" en
   dur (largeur image + marge) qui débordait la colonne. On plafonne tout
   conteneur porteur d'une largeur en ligne ; l'image remplit alors ce conteneur. */
.prose .wp-caption,
.prose .wp-block-image,
.prose [style*="width"] { max-width: 100% !important; }
.prose .wp-caption img,
.prose .wp-block-image img,
.prose [style*="width"] img { width: 100%; height: auto; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .wp-caption-text { font-family: var(--sans); font-size: var(--t-sm); color: var(--muted); margin-top: 0.4rem; text-align: center; }
.readalso { max-width: var(--measure); margin: 1.8rem auto; padding: 0.9rem 1.2rem; background: var(--brand-wash); border-radius: var(--radius); border-left: 4px solid var(--brand); }
.readalso span { font-family: var(--sans); font-weight: 700; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand-ink); }
.readalso a { display: block; font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: var(--t-md); margin-top: 0.25rem; }
.readalso a:hover { color: var(--brand-ink); }
.authorbox { max-width: var(--measure); margin: 2.5rem auto; padding: 1.4rem; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); display: flex; gap: 1.1rem; }
.authorbox__avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; font-family: var(--sans); flex: 0 0 auto; }
.authorbox h3 { font-size: var(--t-md); }
.authorbox .role { color: var(--brand-ink); font-family: var(--sans); font-weight: 600; font-size: var(--t-xs); margin-bottom: 0.35rem; }
.authorbox p { color: var(--muted); font-size: var(--t-base); margin: 0; }

/* ---------- Page article : 2 colonnes (article + barre latérale) -------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(1.5rem, 1rem + 2.5vw, 3rem); align-items: start; max-width: 1080px; margin: 1.25rem auto 0; }
.article-main { min-width: 0; }
/* Dans la colonne principale, le contenu remplit la colonne (aligné à gauche)
   au lieu d'être centré comme sur une page sans barre latérale. */
.article-main .article,
.article-main .article__header,
.article-main .article__hero,
.article-main .prose,
.article-main .readalso,
.article-main .authorbox { max-width: none; margin-inline: 0; }
.article-main .grid-4 { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; row-gap: 1.5rem; }
.article-main .grid-4 article { border-left: 0; padding: 0; }

.article-sidebar { display: grid; gap: 1.75rem; align-content: start; }

/* Widget « Tendances » (façon Trending Now de CNBC) : numéro sur la vignette */
.trending li { display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.trending li:first-child { padding-top: 0; }
.trending li:last-child { border-bottom: 0; padding-bottom: 0; }
.trending__media { position: relative; flex: 0 0 88px; }
.trending__media img { width: 88px; height: 64px; object-fit: cover; border-radius: 2px; background: var(--line-2); }
.trending__num { position: absolute; left: 0; bottom: 0; min-width: 20px; text-align: center; background: rgba(15,18,22,.85); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.78rem; padding: 1px 6px; }
/* Numéro de rang : compteur CSS (WordPress Popular Posts ne fournit pas de rang). */
.trending { counter-reset: trend; }
.trending li { counter-increment: trend; }
.trending__num::before { content: counter(trend); }
.trending__title { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.26; color: var(--ink); }
.trending__title:hover { color: var(--brand-ink); }

/* Widget « Derniers articles » : liste simple, titre + date · heure */
.latest li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.latest li:first-child { padding-top: 0; }
.latest li:last-child { border-bottom: 0; padding-bottom: 0; }
.latest__title { font-family: var(--serif); font-weight: 700; font-size: 0.98rem; line-height: 1.26; color: var(--ink); }
.latest__title:hover { color: var(--brand-ink); }
.latest__meta { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.3rem; font-family: var(--sans); font-size: 0.72rem; color: var(--muted); }
.latest__meta span { color: var(--faint); }

/* Bloc « La une du jour » : 2 colonnes, vignette à gauche + titre, filets */
.headlines { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(3, auto); }
.headline { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.headline__media { flex: 0 0 92px; width: 92px; aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; background: var(--line-2); }
.headline__title { font-family: var(--serif); font-weight: 700; font-size: 0.94rem; line-height: 1.26; color: var(--ink); margin: 0; }
.headline:hover .headline__title { color: var(--brand-ink); }
.headlines .headline:nth-child(-n+3) { padding-right: 2rem; }
.headlines .headline:nth-child(n+4) { padding-left: 2rem; border-left: 1px solid var(--line); }  /* filet vertical entre colonnes */

@media (max-width: 620px) {
  .headlines { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; }
  .headlines .headline:nth-child(-n+3),
  .headlines .headline:nth-child(n+4) { padding-left: 0; padding-right: 0; border-left: 0; }
}

@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; max-width: 720px; }
  .article-sidebar { grid-template-columns: 1fr; }
}

/* ---------- Page rubrique (catégorie) : liste de grandes cartes --------- */
.cat-header { border-bottom: 3px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 1.6rem; }
.cat-header__title { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.1; position: relative; padding-left: 0.95rem; }
.cat-header__title::before { content: ""; position: absolute; left: 0; top: 0.14em; bottom: 0.14em; width: 6px; background: var(--brand); border-radius: 3px; }
.cat-header__desc { color: var(--muted); font-family: var(--sans); font-size: var(--t-md); line-height: 1.5; margin: 0.6rem 0 0 0.95rem; }

.postlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
/* Une annonce large (ex. 728/970px) intercalée ne doit ni élargir la colonne
   ni chevaucher la barre latérale : elle est plafonnée et défile si besoin. */
.postlist > .ad { min-width: 0; max-width: 100%; overflow-x: auto; text-align: center; }

/* ---------------------------------------------------------------------------
   Anti-débordement des annonces. Les slots GPT portent un min-width en ligne
   (ex. 970px) et peuvent recevoir des créations larges (fluid, 1250px). Sans
   confinement, elles élargissent le document : l'en-tête centré se retrouve
   décalé, avec une grande zone vide. On clippe donc chaque conteneur d'annonce.
--------------------------------------------------------------------------- */
html, body { overflow-x: clip; max-width: 100vw; }
.topad { overflow-x: clip; }
/* AdSense Auto Ads : on les laisse s'afficher (revenus), mais on les empêche
   simplement de dépasser la largeur de leur conteneur — sans les masquer. */
.google-auto-placed { max-width: 100% !important; overflow: hidden; }
.google-auto-placed ins,
.google-auto-placed iframe { max-width: 100% !important; }

/* Météo (single-meteo-algerie). */
.meteo-lede { color: var(--muted); font-size: var(--t-md); margin: 0 0 1.2rem; }
.meteo-now { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; background: linear-gradient(180deg, var(--brand-wash), #fff); }
.meteo-now__main { display: flex; align-items: center; gap: 0.9rem; }
.meteo-now__icon { width: 72px; height: 72px; }
.meteo-now__temp { display: block; font-family: var(--sans); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--ink); }
.meteo-now__cond { display: block; font-family: var(--sans); font-size: var(--t-sm); color: var(--muted); margin-top: 0.2rem; }
.meteo-now__stats { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; font-family: var(--sans); }
.meteo-now__stats li { text-align: center; }
.meteo-now__stats span { display: block; font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.meteo-now__stats strong { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.meteo-now__updated { flex-basis: 100%; margin: 0.2rem 0 0; font-family: var(--sans); font-size: var(--t-xs); color: var(--faint); }

.meteo-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 0.6rem; margin-bottom: 1.6rem; }
.meteo-day { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.4rem; font-family: var(--sans); }
.meteo-day__name { font-size: var(--t-sm); font-weight: 700; color: var(--ink); text-transform: capitalize; }
.meteo-day img { width: 44px; height: 44px; }
.meteo-day__temp { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }
.meteo-day__temp em { color: var(--muted); font-style: normal; font-weight: 500; }

.meteo-hours { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.meteo-hour { display: grid; grid-template-columns: 3.2rem 2.4rem 2.6rem 1fr auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0.9rem; border-top: 1px solid var(--line-2); font-family: var(--sans); font-size: var(--t-sm); }
.meteo-hour:first-child { border-top: 0; }
.meteo-hour:nth-child(even) { background: var(--bg-soft); }
.meteo-hour.is-now { background: var(--brand-wash); }
.meteo-hour__time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.meteo-hour__icon { width: 34px; height: 34px; }
.meteo-hour__temp { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.meteo-hour__cond { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meteo-hour__rain { color: var(--brand-ink); font-weight: 600; white-space: nowrap; }

@media (max-width: 560px) {
  .meteo-hour { grid-template-columns: 3rem 2rem 2.4rem auto; }
  .meteo-hour__cond { display: none; }
}

/* Imsakia Ramadan (single-imsakia-ramadan) : réutilise les styles .salat-*. */
.imsakia-today { display: grid; grid-template-columns: 1fr 1fr; }
.imsakia-today__cell { text-align: center; padding: 1.1rem 0.5rem; border-right: 1px solid var(--line-2); }
.imsakia-today__cell:last-child { border-right: 0; }
.imsakia-today__cell span { display: block; font-family: var(--sans); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.3rem; }
.imsakia-today__cell strong { font-family: var(--sans); font-weight: 800; font-size: 1.9rem; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.salat-table td.imsakia-hl { background: var(--brand-wash); color: var(--brand-ink); font-weight: 700; }
.salat-table tr.is-today td.imsakia-hl { background: #e2efd1; }
.imsakia-link { font-family: var(--sans); font-size: var(--t-sm); margin-top: 0.8rem; }
.imsakia-link a { color: var(--brand-ink); font-weight: 600; }
.imsakia-link a:hover { text-decoration: underline; }

/* Horaires de prière (single-salat_horaire). */
.salat-today { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0.6rem 0 1.6rem; }
.salat-today__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--brand); color: #fff; padding: 0.8rem 1.1rem; }
.salat-today__label { display: block; font-family: var(--sans); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.05em; opacity: .9; }
.salat-today__date { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; text-transform: capitalize; }
.salat-today__hijri { font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); background: rgba(255,255,255,.18); padding: 0.35rem 0.7rem; border-radius: 999px; }
.salat-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.salat-cell { position: relative; text-align: center; padding: 1rem 0.4rem; border-right: 1px solid var(--line-2); border-top: 1px solid var(--line-2); }
.salat-cell:nth-child(7n) { border-right: 0; }
.salat-cell__name { display: block; font-family: var(--sans); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 0.3rem; }
.salat-cell__time { display: block; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.salat-cell.is-next { background: var(--brand-wash); }
.salat-cell.is-next .salat-cell__time { color: var(--brand-ink); }
.salat-cell__tag { display: block; margin-top: 0.2rem; font-family: var(--sans); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand-ink); }

.salat-h2 { font-size: var(--t-xl); margin: 1.8rem 0 0.9rem; }
.salat-intro { max-width: none; margin: 0 0 1.4rem; }
.salat-error { color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.salat-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.salat-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: var(--t-base); }
.salat-table th { background: var(--brand); color: #fff; font-weight: 700; padding: 0.6rem 0.5rem; text-align: center; white-space: nowrap; }
.salat-table td { padding: 0.55rem 0.5rem; text-align: center; border-top: 1px solid var(--line-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.salat-table__day { text-align: left !important; font-weight: 600; color: var(--ink); }
.salat-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.salat-table tr.is-today { background: var(--brand-wash) !important; }
.salat-table tr.is-today td { color: var(--brand-ink); font-weight: 700; }

.salat-cities { margin-top: 2rem; border-top: 3px solid var(--ink); padding-top: 1rem; }
.salat-cities__intro { color: var(--muted); font-size: var(--t-base); margin-bottom: 0.9rem; }
.salat-cities__list { columns: 3; column-gap: 1.5rem; font-family: var(--sans); font-size: var(--t-base); }
.salat-cities__list li { break-inside: avoid; margin-bottom: 0.4rem; }
.salat-cities__list a { color: var(--body); }
.salat-cities__list a:hover { color: var(--brand-ink); }

@media (max-width: 680px) {
  .salat-grid { grid-template-columns: repeat(4, 1fr); }
  .salat-cell:nth-child(7n) { border-right: 1px solid var(--line-2); }
  .salat-cell:nth-child(4n) { border-right: 0; }
  .salat-cities__list { columns: 2; }
}

/* Page 404. */
.notfound { max-width: 44rem; margin: 2.5rem auto 2rem; text-align: center; }
.notfound__code { font-family: var(--sans); font-weight: 800; font-size: clamp(3.5rem, 2rem + 8vw, 7rem); line-height: 1; color: var(--brand); margin: 0; }
.notfound__title { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem); margin: 0.3rem 0 0.7rem; }
.notfound__text { color: var(--muted); font-size: var(--t-md); margin-bottom: 1.6rem; }
.notfound__search { display: flex; gap: 0.5rem; max-width: 30rem; margin: 0 auto 1.2rem; }
.notfound__search input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 3px; padding: 0.65rem 0.9rem; font: inherit; color: var(--ink); background: var(--bg-soft); }
.notfound__home { display: inline-block; font-family: var(--sans); font-weight: 600; color: var(--brand-ink); }
.notfound__home:hover { text-decoration: underline; }

/* Page statique (page.php) : colonne de lecture centrée, sans métadonnées. */
.page_content { max-width: 65rem; margin: 1.4rem auto 0; }
.page__title { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.15; margin-bottom: 1.1rem; }
.page__hero { margin: 0 0 1.6rem; }
.page__hero img { width: 100%; border-radius: var(--radius); }
.page_content .prose { max-width: none; margin-inline: 0; }

/* Fiche auteur (page /author/…) — reprend la présentation actuelle du site. */
.author-card { display: flex; gap: 1.3rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.6rem; margin: 0 0 1.8rem; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.author-card__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 1.4rem; font-weight: 700; flex-shrink: 0; border: 2px solid var(--brand-line); }
.author-card__body { min-width: 0; }
.author-card__name { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.65rem); line-height: 1.2; margin: 0 0 0.25rem; }
.author-card__role { font-family: var(--sans); font-size: 0.92rem; font-weight: 700; color: var(--ink); margin-bottom: 0.6rem; }
.author-card__bio { font-size: var(--t-base); line-height: 1.6; color: var(--muted); margin-bottom: 0.8rem; }
.author-card__bio p { margin: 0 0 0.7rem; }
/* Bio repliée à 3 lignes ; JS révèle « Lire la suite » si elle déborde. */
.author-card__bio.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin-bottom: 0.35rem; }
.author-card__bio.is-clamped p { margin: 0; }
.author-card__more { background: none; border: 0; padding: 0; margin-bottom: 0.6rem; font-family: var(--sans); font-weight: 700; font-size: var(--t-sm); color: var(--brand-ink); cursor: pointer; }
.author-card__more:hover { text-decoration: underline; }
.author-card__meta { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; margin: 0.6rem 0 0; font-family: var(--sans); font-size: var(--t-sm); }
.author-card__stat { display: inline-flex; align-items: baseline; gap: 0.4rem; }
.author-card__stat span { color: var(--muted); }
.author-card__stat strong { color: var(--ink); font-weight: 700; }
.author-card__specialties { margin-top: 0.9rem; }
.author-card__specialties-title { display: block; font-family: var(--sans); font-weight: 700; font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 0.5rem; }
.author-card__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.author-card__tags span { background: var(--brand-wash); color: var(--brand-ink); border: 1px solid var(--brand-line); padding: 0.28rem 0.65rem; border-radius: 999px; font-family: var(--sans); font-size: var(--t-xs); font-weight: 600; }
@media (max-width: 680px) {
  .author-card { flex-direction: column; padding: 1.5rem; }
  .author-card__avatar { width: 76px; height: 76px; font-size: 1.6rem; }
  .author-card__meta { flex-direction: column; }
  .author-card__stat { width: 100%; }
}

/* Bouton « Suivre sur Google Actualités » (page article). */
.google-news-follow { display: inline-flex; align-items: center; gap: 0.6rem; margin: 1.4rem 0; padding: 0.7rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.06); transition: border-color .2s, box-shadow .2s, transform .2s; }
.google-news-follow:hover { border-color: var(--brand); box-shadow: 0 3px 8px rgba(0,0,0,.1); transform: translateY(-1px); color: var(--ink); }
.google-news-follow svg { width: 20px; height: 20px; flex-shrink: 0; }
.topad > .container { display: flex; justify-content: center; }
.ad { max-width: 100%; overflow: hidden; }
.ad > div,
.ad iframe,
.ad ins,
.ad img { max-width: 100%; }
.postcard { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.4rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.postcard:last-child { border-bottom: 0; padding-bottom: 0; }
.postcard__media { position: relative; align-self: start; }
.postcard__media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; background: var(--line-2); }
.postcard__badge { position: absolute; left: 10px; bottom: 10px; background: var(--brand); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 2px; }
.postcard__title { font-size: var(--t-lg); line-height: 1.16; margin: 0 0 0.4rem; }
.postcard__title a { color: var(--ink); }
.postcard__title a:hover { color: var(--brand-ink); }
.postcard__meta { font-family: var(--sans); font-size: var(--t-xs); color: var(--muted); margin-bottom: 0.55rem; }
.postcard__excerpt { color: var(--muted); font-size: var(--t-base); line-height: 1.55; margin: 0; }

/* Pagination */
.pagination { display: flex; gap: 0.4rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 0.6rem; border: 1px solid var(--line); border-radius: 3px; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); color: var(--ink); }
.pagination a:hover { border-color: var(--brand); color: var(--brand-ink); }
.pagination .is-current,
.pagination .current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .is-disabled { color: var(--faint); border-color: var(--line-2); }
/* paginate_links() : les points de suspension ne sont pas une cellule cliquable. */
.pagination .dots { border-color: transparent; }

@media (max-width: 620px) {
  .postcard { grid-template-columns: 1fr; gap: 0.8rem; }
  .postcard__media img { aspect-ratio: 16/9; }
  /* « À lire aussi » : une seule colonne sur mobile (le réglage 2 colonnes de
     .article-main était trop serré). Vignette à gauche + titre, comme les autres listes. */
  .article-main .grid-4 { grid-template-columns: 1fr; row-gap: 1.1rem; }
  .article-main .grid-4 article { display: grid; grid-template-columns: 120px 1fr; gap: 0.8rem; align-items: start; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
  .article-main .grid-4 article:last-child { border-bottom: 0; padding-bottom: 0; }
  .article-main .grid-4 .card__media { margin-bottom: 0; }
  .article-main .grid-4 .card__body .meta { margin-top: 0.35rem; }
}

/* ---------- 14. Pied de page -------------------------------------------- */
.footer { background: var(--bar); color: #a6adb5; margin-top: 2.5rem; padding-block: clamp(2.25rem, 1.8rem + 2vw, 3.5rem) 1.75rem; border-top: 3px solid var(--brand); font-family: var(--sans); }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--bar-2); }
.footer h2 { color: #fff; font-family: var(--sans); font-size: var(--t-sm); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.9rem; }
.footer a { color: #a6adb5; font-size: var(--t-base); }
.footer a:hover { color: var(--brand); }
.footer__links li { padding: 0.3rem 0; }
.footer__about p { font-size: var(--t-base); line-height: 1.7; margin-top: 0.9rem; }
.footer__socials { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.footer__socials a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bar-2); display: grid; place-items: center; color: #fff; }
.footer__socials a:hover { background: var(--brand); border-color: var(--brand); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.3rem; font-size: var(--t-xs); }

/* ---------- 15. Menu mobile (drawer) ------------------------------------ */
.drawer { position: fixed; inset: 0 auto 0 0; width: 84%; max-width: 340px; background: #fff; transform: translateX(-102%); transition: transform .28s ease; z-index: 60; box-shadow: 0 8px 40px rgba(15,18,22,.25); display: flex; flex-direction: column; overflow-y: auto; }
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.1rem; background: var(--brand); }
.drawer__close { background: none; border: 0; font-size: 1.6rem; color: #fff; line-height: 1; cursor: pointer; }
.drawer__search { display: none; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.drawer__search label { display: flex; align-items: center; gap: 0.5rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 3px; padding: 0.6rem 0.8rem; color: var(--muted); }
.drawer__search input { border: 0; background: transparent; outline: none; font: inherit; width: 100%; color: var(--ink); }
.drawer nav a { display: block; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line-2); color: var(--ink); font-family: var(--sans); font-weight: 600; }
.drawer nav a:hover { background: var(--brand-wash); color: var(--brand-ink); }
.overlay { position: fixed; inset: 0; background: rgba(15,18,22,.5); opacity: 0; visibility: hidden; transition: opacity .28s; z-index: 55; }
.overlay.is-open { opacity: 1; visibility: visible; }

/* ---------- 16. Responsive ---------------------------------------------- */
@media (max-width: 1080px) {
  .frontpage { grid-template-columns: minmax(0,1fr) 280px; }
  .fp-left { grid-column: 1 / -1; order: 3; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.8rem; }
  .fp-left .rail { columns: 2; column-gap: 1.35rem; }
  .fp-left .rail li { break-inside: avoid; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2,1fr); gap: 1.5rem 2rem; }
  .strip { grid-template-columns: repeat(3,1fr); }
  .strip article:nth-of-type(4) { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  /* Le menu horizontal passe entièrement dans le panneau latéral (bouton Plus). */
  .mainnav__list { display: none; }
  .mainnav__search { display: none; }
  .mainnav__search-btn { display: none; }   /* la recherche passe dans le drawer */
  .drawer__search { display: block; }       /* recherche dans le menu, mobile uniquement */
  .mainnav__more-text { display: none; }
  .mainnav__more { padding: 0.5rem 0.6rem; }
  /* Logo centré : positionné au centre de la barre, outils (recherche + Plus)
     restent à droite. */
  .mainnav__inner { position: relative; justify-content: flex-end; }
  .mainnav__brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
@media (max-width: 820px) {
  .dense { grid-template-columns: 1fr 1fr; }
  .dense__lead { grid-column: 1 / -1; padding-right: 0; }
  .dense__lead .dense__lead-media { aspect-ratio: 16/8; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-4 article:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  /* Bloc URGENT collé au bord gauche de l'écran (pas de marge du conteneur). */
  .flash__inner { padding-left: 0; }
  .frontpage { grid-template-columns: 1fr; }
  .fp-col { border-left: 0; padding-inline: 0; }
  /* Sur mobile, le gros sujet (colonne centrale) passe en premier. */
  .fp-center { order: -1; }
  .fp-left { order: 0; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }
  .fp-right { order: 1; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.5rem; }
  .fp-left .rail { columns: 1; }
  .strip { grid-template-columns: 1fr; }
  .strip article { border-left: 0; padding-left: 0; padding-bottom: 0.9rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 0.8rem; align-items: start; }
  .strip__media { margin-bottom: 0; }
  .dense { grid-template-columns: 1fr; }
  .dense > * { border-left: 0; padding-inline: 0; }
  .dense__col { border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.4rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-4 article { border-left: 0; padding-left: 0; padding-bottom: 0.9rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 0.8rem; align-items: start; }
  .grid-4 .card__media { margin-bottom: 0; }
  .sidebar { grid-template-columns: 1fr; }
  .article__byline { flex-direction: column; align-items: flex-start; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .topbar__meta li:nth-child(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .flash__track { animation: none; }
  * { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------------------
   Utilitaires d'affichage responsive (remplacent d-none / d-md-* de Bootstrap)
   Point de rupture : 768px, identique au « md » de Bootstrap, pour que la
   logique desktop (728×90) / mobile (300×250) des annonces reste inchangée.
--------------------------------------------------------------------------- */
.is-hidden { display: none !important; }

/* Visible uniquement sur desktop (≥ 768px) */
.only-desktop { display: none !important; }
@media (min-width: 768px) {
  .only-desktop { display: block !important; }
}

/* Visible uniquement sur mobile (< 768px) */
@media (min-width: 768px) {
  .only-mobile { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Utilitaires d'espacement et d'alignement (repris de Bootstrap pour les
   gabarits d'annonces ads/*.php qui les utilisent encore).
--------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-0 { padding: 0; }
.m-0 { margin: 0; }

/* ---------------------------------------------------------------------------
   Pages internes : outils rédaction et statistiques
   (daily-article-views, link-to-shares, source-article, statistic-posts-mois).
   Gabarits d'administration : sobres, lisibles, sans dépendance Bootstrap.
--------------------------------------------------------------------------- */
.statpage { padding: 1.5rem 0 3rem; }
.statpage h1 { font-family: var(--serif); font-size: var(--t-xl); color: var(--ink); margin: 0 0 1rem; }
.statpage h2 { font-family: var(--serif); font-size: var(--t-lg); color: var(--ink); margin: 0 0 1rem; }
.statpage h3 { font-size: var(--t-md); color: var(--body); margin: 0 0 1rem; }
.statpage__intro { color: var(--muted); font-size: var(--t-sm); margin: -0.5rem 0 1.5rem; }

/* Formulaire de filtre (choix de date, etc.) */
.statform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; margin-bottom: 1.5rem; }
.statform__field label { display: block; font-family: var(--sans); font-weight: 600; font-size: var(--t-sm); margin-bottom: 0.25rem; }
.statform input[type="date"],
.statform input[type="text"],
.statform input[type="search"] { padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }

/* Bouton d'action (filtrer, générer…) */
.statbtn { display: inline-block; padding: 0.5rem 0.95rem; border: 0; border-radius: var(--radius); background: var(--brand); color: #fff; font-family: var(--sans); font-weight: 700; font-size: var(--t-sm); line-height: 1.4; cursor: pointer; text-decoration: none; }
.statbtn:hover { background: var(--brand-hover); }

/* Tableau de données (défilement horizontal sur mobile) */
.stattable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; }
.stattable { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: var(--t-sm); }
.stattable th,
.stattable td { padding: 0.55rem 0.7rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.stattable thead th { background: var(--brand); color: #fff; font-weight: 700; white-space: nowrap; }
.stattable tbody tr:nth-child(even) { background: var(--bg-soft); }
.stattable a { color: var(--brand-ink); text-decoration: none; }
.stattable a:hover { text-decoration: underline; }

/* Messages (succès / erreur / info) */
.statnote { padding: 0.7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-family: var(--sans); font-size: var(--t-sm); }
.statnote--ok   { background: var(--brand-wash); color: var(--brand-ink); border: 1px solid var(--brand-line); }
.statnote--err  { background: var(--live-tint); color: var(--live); border: 1px solid #f0b9b9; }

/* Sortie texte brute (statistic-posts-mois) */
.statraw { font-family: var(--sans); font-size: var(--t-sm); line-height: 1.7; color: var(--body); }
.statraw b { color: var(--ink); }

/* Newsletter « La matinale » — pot de miel + message de retour (widget .newsletter) */
.newsletter__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.newsletter__msg { font-size: var(--t-sm); margin: 0.15rem 0 0; }
.newsletter__msg.is-ok { color: var(--brand-ink); }
.newsletter__msg.is-err { color: var(--live); }
.newsletter button:disabled { opacity: 0.6; cursor: default; }
