/* ============================================================================
   TRIBUNES — SINGLE (article) : filigrane arabe + bloc auteur en pied
   Mandat Roi 2026-07-23. Chargé UNIQUEMENT en vue article de la catégorie
   « Tribunes Soufies » (enqueue conditionnel functions.php : tqb_is_tribunes_single).
   Dépend de roogan-main → nos règles gagnent la cascade sans !important sauf
   quand le parent en impose un.

   Palette = charte Tribunes (identique tribunes.css) :
     vert #004919 · or #C6A14E · marbre · encres #293036/#5A6068
   Typo filigrane = Reem Kufi (kufi géométrique, écho Malikite — choix Roi).
   ============================================================================ */

/* Reem Kufi AUTO-HÉBERGÉ (dette Círdan résolue 24/07 — plus de dépendance Google
   Fonts en prod : cohérence charte + RGPD + règle sécu Heimdall zéro-réseau-externe).
   woff2 récupérés de Google (v28), posés dans assets/fonts/. */
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/reem-kufi-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/reem-kufi-600.woff2') format('woff2');
}

:root {
  --tqb-green:#004919; --tqb-gold:#C6A14E; --tqb-gold-200:#D8B65C;
  --tqb-ink:#293036;   --tqb-ink-2:#5A6068; --tqb-ink-3:#8A8B84;
  --tqb-marble-vein:#E4DECF; --tqb-cream:#FBF8F1;
  --tqb-font-display:'Libre Baskerville', Georgia, serif;
  --tqb-font-body:'Roboto', Arial, sans-serif;
}

/* ---------------------------------------------------------------------------
   1) FILIGRANE ARABE derrière le H1
   Le <span.tqb-filigrane> est injecté en tête du .entry-title (functions.php).
   On rend le titre positionnable, on sort le filigrane du flux et on le pose
   DERRIÈRE le texte — pâle, fin, subtil. L'arabe se lit droite→gauche : on le
   cale à droite du titre (là où l'œil arabe commence), légèrement remontant.
   --------------------------------------------------------------------------- */
.single-post .entry-title,
.single-post .entry-header .entry-title {
  position: relative;
  isolation: isolate;              /* le filigrane reste sous CE titre, pas plus */
  overflow: visible;
}

/* RÉGLAGE ROI VERBATIM (inspecteur, 24/07 ~23h — 2e itération, il a testé
   top 24% / opacité 0.2 puis est revenu à top 50% / opacité 0.1) :
   left -57px (mord à gauche), margin-top retiré, top 50%, opacité 0.1.
   → Le mandat « opacité filigrane » de la nuit est CLOS par ce choix final :
   0.1, essayé 0.2 en contexte réel, tranché de sa main.
   L'anti-débord des mots longs = assets/filigrane-fit.js (rétrécit SEULEMENT
   si le bord droit dépasse le viewport — enqueue restauré ce soir). */
.single-post .entry-title .tqb-filigrane {
  position: absolute;
  z-index: -1;                      /* derrière le texte du titre */
  top: 50%;
  left: -57px;
  right: auto;
  transform: translate(-0.06em, -67%);
  font-family: 'Reem Kufi', sans-serif;
  font-weight: 600;
  font-size: 8em;
  line-height: 0.72;
  direction: rtl;
  white-space: nowrap;
  pointer-events: none;
  /* OR de la charte (#C6A14E ≈ 207,165,82), plein ; la dilution vient d'opacity. */
  color: rgb(207, 165, 82);
  opacity: 0.1;
  user-select: none;
}

/* Variante overlay 0.18 SUPPRIMÉE (24/07) : le 0.2 verbatim du Roi a été réglé
   SUR un hero sombre (capture jihâd) — un override 0.18 l'aurait assombri en
   douce sur ces mêmes layouts. Une seule opacité, la sienne. */

@media (max-width: 767px) {
  .single-post .entry-title .tqb-filigrane {
    font-size: 5.4em;
    left: -0.04em;
    margin-top: 12px;
  }
}

/* ---------------------------------------------------------------------------
   2) BLOC AUTEUR en pied d'article (injecté après the_content)
   Repris de la maquette roogan (image Roi) et HARMONISÉ avec le bloc auteur
   du hub (.tribunes-auteur) : marbre, filet or, portrait rond bordé, nom
   Baskerville, qualité en encre douce, CTA vert.
   --------------------------------------------------------------------------- */
.tqb-author-box {
  margin: 3.5rem 0 1rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--tqb-marble-vein);
  text-align: left;
}

/* Kicker « À propos de l'auteur » + filet : RETIRÉS (Roi 24/07) — la carte
   se réduit à portrait · nom · qualité dorée · bouton. */
.tqb-author-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.6rem;
  margin-top: 0;
}

/* Portrait rond, bordé or/crème comme le monogramme du hub */
.tqb-author-portrait {
  flex-shrink: 0;
}
.tqb-author-portrait img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--tqb-gold), 0 0 0 4px #fff, 0 0 0 5px var(--tqb-marble-vein);
}
/* Fallback monogramme (helper tqb_author_avatar_inner renvoie <span>) */
.tqb-author-portrait > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #0a5c22, var(--tqb-green));
  box-shadow: 0 0 0 1px var(--tqb-gold), 0 0 0 4px #fff, 0 0 0 5px var(--tqb-marble-vein);
  font-family: var(--tqb-font-display);
  font-size: 34px;
  color: var(--tqb-gold-200);
  line-height: 1;
}

.tqb-author-body {
  flex: 1;
  min-width: 0;
}

.tqb-author-name {
  font-family: var(--tqb-font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  color: var(--tqb-ink);
  margin: 0 0 0.1rem;
}
.tqb-author-name a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.tqb-author-name a:hover { color: var(--tqb-green); }

/* Souveraineté carte (Roi 24/07) : le thème pose un margin-bottom global sur
   .entry-content h3 (desktop via @media min-width:600px, mobile via la jumelle
   hors media) qui BAT .tqb-author-name en spécificité. Cette règle re-gagne à
   toutes les largeurs — le gap nom→qualité appartient à la carte, pas au thème. */
.entry-content .tqb-author-name,
.entry-content .h3.tqb-author-name {
  /* 0.1rem (≈2px) + 5px demandés par le Roi (24/07) */
  margin: 0 0 7px;
}

.tqb-author-memoriam {
  display: inline-block;
  margin-left: 0.5em;
  font: 500 11px/1 var(--tqb-font-body);
  letter-spacing: 0.04em;
  color: var(--tqb-ink-3);
  vertical-align: middle;
}

.tqb-author-qualite {
  font: 400 14.5px/1.35 var(--tqb-font-body);
  color: var(--tqb-gold);
  margin: 0 0 0.7rem;
}

/* Bio : RETIRÉE de la carte (Roi 24/07) — elle vit sur la page-auteur. */

/* « Toutes ses Tribunes » — phrase-lien + picto (Roi 24/07, remplace le bouton
   plein vert). Même langage que .tribunes-auteur__lien du hub : vert, flèche
   qui glisse au survol. */
.tqb-author-lien {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 13.5px/1 var(--tqb-font-body);
  letter-spacing: 0.03em;
  color: var(--tqb-green);
  text-decoration: none;
}
.tqb-author-lien::after {
  content: "→";
  transition: transform .3s;
}
.tqb-author-lien:hover { color: #0A3D17; }
.tqb-author-lien:hover::after { transform: translateX(4px); }

@media (max-width: 575px) {
  .tqb-author-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.1rem;
  }
  .tqb-author-qualite { text-align: center; }
}

