/* ==========================================================================
   UNIS — Rubriques de publications (Kanyaka — La Quinzaine, Afrika Sika)
   Reprend la charte des éditions PDF. Chaque page porte une classe de thème
   sur <main> (et non sur <body>) : .pub-kanyaka ou .pub-sika. L'en-tête et le
   pied de page restent ceux du site (unis.css) ; cette feuille ne s'applique
   qu'à l'intérieur de .pub. Chargée après /assets/css/unis.css.
   ========================================================================== */

.pub {
  --papier: #FBF2E6;
  --blanc: #FFFFFF;
  --encre: #1C1A18;
  --gris: #5C554E;
  --filet: #E6D5B8;

  /* Méthode UNIS — contrastes vérifiés avec texte blanc */
  --etabli: #17804A;
  --declare: #1F6FB2;
  --annonce: #9A6A10;
  --analyse: #5B3F7A;
  --nondispo: #A8322A;

  --pub-maxw: 1200px;
  --gouttiere: clamp(20px, 5vw, 64px);
}

.pub-kanyaka {
  --fond-sombre: #1A1311;
  --accent: #C8102E;
  --accent-texte: #A50D26;      /* accent lisible sur fond clair */
  --second: #C9A24A;            /* or : uniquement sur fond sombre */
  --second-texte: #8A6A22;      /* or lisible sur fond clair */
  --titre: 'IBM Plex Serif', Georgia, serif;
  --texte: 'IBM Plex Sans', system-ui, sans-serif;
}
.pub-sika {
  --fond-sombre: #161D2A;
  --accent: #E8672A;
  --accent-texte: #A8420F;
  --bouton: #C4521A;            /* orange assombri pour texte blanc */
  --second: #A8D46A;            /* vert tendre : uniquement sur fond sombre */
  --second-texte: #4F7A1E;
  --titre: 'Lora', Georgia, serif;
  --texte: 'Poppins', system-ui, sans-serif;
}

.pub { font-family: var(--texte); color: var(--encre); background: var(--papier); margin: 0; }
.pub *, .pub *::before, .pub *::after { box-sizing: border-box; }
.pub img { max-width: 100%; height: auto; display: block; }
.pub a { color: var(--accent-texte); }
.pub a:focus-visible, .pub button:focus-visible, .pub input:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.pub .conteneur { max-width: var(--pub-maxw); margin: 0 auto; padding: 0 var(--gouttiere); }
.pub .visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bandeau de rubrique ---------- */
.pub-bandeau { background: var(--fond-sombre); color: #F3ECE4; border-top: 4px solid var(--accent); padding: 24px 0 72px; }
.pub-ariane { font-size: 14px; color: #B9AFA6; margin: 0 0 40px; }
.pub-ariane a { color: #D9D1C8; }
.pub-bandeau__grille { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .pub-bandeau__grille { grid-template-columns: 2fr 1fr; } }
.pub-marque { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.pub-marque img { width: 56px; height: 56px; }
.pub-devise { font-family: var(--titre); font-style: italic; color: var(--second); font-size: 16px; margin: 0; }
.pub-titre { font-family: var(--titre); font-weight: 700; font-size: clamp(52px, 9vw, 104px); line-height: .95; letter-spacing: -.02em; margin: 0 0 20px; color: #FFFFFF; }
.pub-kanyaka .pub-titre small { display: block; margin-top: 8px; font-style: italic; font-weight: 600; font-size: .44em; letter-spacing: 0; color: var(--second); }
.pub-sika .pub-titre span { color: var(--accent); }
.pub-accroche { font-family: var(--titre); font-style: italic; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.45; color: var(--second); max-width: 44ch; margin: 0; }
.pub-fiche { margin: 0; display: grid; gap: 16px; border-left: 1px solid rgba(255,255,255,.18); padding-left: 24px; font-size: 15px; color: #DDD5CC; }
.pub-fiche dt { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--second); }
.pub-fiche dd { margin: 2px 0 0; }

/* ---------- Sections ---------- */
.pub-section { padding: 72px 0; border-top: 1px solid var(--filet); }
.pub-section--blanc { background: var(--blanc); }
.pub-section--sombre { background: var(--fond-sombre); color: #E6DDD3; border-top: 0; }
.pub-surtitre { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--accent-texte); margin: 0 0 10px; }
.pub-section--sombre .pub-surtitre { color: var(--second); }
.pub-h2 { font-family: var(--titre); font-weight: 700; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; margin: 0 0 24px; }
.pub-section--sombre .pub-h2 { color: #FFFFFF; }
.pub-texte { font-size: 17px; line-height: 1.7; max-width: 68ch; }
.pub-texte p { margin: 0 0 16px; }

/* ---------- Dernier numéro ---------- */
.pub-une { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pub-une { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
/* minmax(0, …) : sur téléphone, un mot long du titre (« d'immatriculation ») ne doit
   pas élargir la colonne, sinon la photo, à 100 % de la colonne, déborde de l'écran. */
.pub-une > * { min-width: 0; }
.pub-une figure { margin: 0; }
.pub-une img { width: 100%; }
.pub-une figcaption { font-size: 14px; line-height: 1.5; color: var(--gris); margin-top: 10px; }
.pub-numero { font-family: var(--titre); font-size: 19px; color: var(--gris); margin: 0 0 14px; }
.pub-rubrique { display: inline-block; background: var(--accent); color: #FFFFFF; font-size: 13px; font-weight: 700; letter-spacing: .06em; padding: 7px 12px; margin: 0 0 16px; }
.pub-sika .pub-rubrique { background: transparent; color: var(--accent-texte); border-left: 4px solid var(--accent); padding: 2px 0 2px 12px; }
.pub-une h3 { font-family: var(--titre); font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; margin: 0 0 18px; overflow-wrap: break-word; hyphens: auto; }
.pub-une p { font-size: 18px; line-height: 1.6; margin: 0 0 24px; }
.pub-telechargements { display: flex; flex-wrap: wrap; gap: 12px; }
.pub-bouton { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid transparent; }
.pub-bouton--plein { background: var(--accent); color: #FFFFFF !important; }
.pub-sika .pub-bouton--plein { background: var(--bouton); }
.pub-bouton--contour { border-color: var(--encre); color: var(--encre) !important; }
.pub-bouton:hover { text-decoration: underline; }
.pub-note { font-size: 14px; color: var(--gris); margin-top: 12px; }

.pub-chiffres { background: var(--fond-sombre); color: #DDD5CC; padding: 28px; }
.pub-une .pub-chiffres .pub-chiffres__hero { font-family: var(--titre); font-weight: 700; font-size: 80px; line-height: 1; color: #FFFFFF; margin: 0 0 12px; }
.pub-chiffres__hero span { font-size: 28px; color: var(--accent); }
.pub-une .pub-chiffres p { font-size: 15px; line-height: 1.5; margin: 0; }
.pub-chiffres dl { margin: 20px 0 0; }
.pub-chiffres dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.15); font-size: 15px; }
.pub-chiffres dd { margin: 0; font-family: var(--titre); font-weight: 700; color: #FFFFFF; }

/* ---------- Sommaire ---------- */
.pub-sommaire { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); border-top: 2px solid var(--encre); }
.pub-sommaire li { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--filet); }
.pub-sommaire b { display: block; font-size: 12px; letter-spacing: .1em; color: var(--second-texte); margin-bottom: 4px; }
.pub-sommaire span { font-family: var(--titre); font-weight: 700; font-size: 19px; line-height: 1.3; }

/* ---------- Méthode ---------- */
.pub-methode { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pub-methode li { font-size: 15px; line-height: 1.45; }
.pastille { display: inline-block; color: #FFFFFF; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 4px 9px; margin-bottom: 6px; }
.pastille--etabli { background: var(--etabli); }
.pastille--declare { background: var(--declare); }
.pastille--annonce, .pastille--encours, .pastille--reporte { background: var(--annonce); }
.pastille--analyse { background: var(--analyse); }
.pastille--nondispo, .pastille--rompu { background: var(--nondispo); }

/* ---------- Tracker ---------- */
.pub-tracker { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.pub-tracker caption { text-align: left; font-size: 14px; color: var(--gris); padding-bottom: 12px; }
.pub-tracker th { background: var(--fond-sombre); color: #FFFFFF; text-align: left; font-size: 12px; letter-spacing: .08em; padding: 14px 16px; }
.pub-tracker td { padding: 16px; border-bottom: 1px solid var(--filet); vertical-align: top; }
.pub-tracker tbody tr:nth-child(odd) { background: #F7EDDF; }
.pub-tracker td:first-child { font-weight: 600; }
@media (max-width: 720px) {
  .pub-tracker thead { position: absolute; left: -9999px; }
  .pub-tracker tr { display: block; padding: 14px 0; }
  .pub-tracker td { display: block; border: 0; padding: 4px 12px; }
  .pub-tracker td[data-label]::before { content: attr(data-label) " : "; font-weight: 700; font-size: 12px; color: var(--gris); }
}

/* ---------- Abonnement ---------- */
.pub-abonnement { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .pub-abonnement { grid-template-columns: 1fr 1fr; } }
.pub-abonnement form { display: grid; gap: 10px; }
.pub-abonnement label { font-size: 14px; }
.pub-abonnement .ligne { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-abonnement input[type=email] { flex: 1 1 220px; min-height: 52px; border: 0; padding: 0 16px; font: inherit; font-size: 16px; }
.pub-abonnement button { min-height: 52px; border: 0; padding: 0 24px; background: var(--accent); color: #FFFFFF; font: inherit; font-weight: 600; cursor: pointer; }
.pub-sika .pub-abonnement button { background: var(--bouton); }
.pub-abonnement small { font-size: 13px; color: #B9AFA6; }
.pub .champ-piege { display: none; }

@media (prefers-reduced-motion: reduce) { .pub * { transition: none !important; animation: none !important; } }

/* ---------- Intégration au site ----------
   unis.css resserre l'interlettrage de tous les titres (h1…h5) ; :where()
   garde une spécificité nulle pour que .pub-titre conserve le sien. */
:where(.pub) :is(h1, h2, h3) { letter-spacing: 0; text-wrap: balance; }
/* Le message d'état de formulaires.js doit rester lisible sur le fond
   sombre de l'abonnement. */
.pub-abonnement .form__status { color: #FFFFFF !important; font-size: 15px; margin: 0; }
/* Même fond : le lien « Politique de confidentialité » sous le formulaire
   reprend la couleur de la mention plutôt que l'accent, illisible ici. */
.pub-abonnement small a { color: inherit; text-decoration: underline; }
/* Libellé des cellules du tracker sur mobile : pas d'espace avant « : » en anglais. */
@media (max-width: 720px) {
  .pub-tracker:lang(en) td[data-label]::before { content: attr(data-label) ": "; }
}
/* Trois façons de lire un numéro (en ligne, PDF téléphone, PDF A4) : sur
   téléphone, les boutons passent les uns sous les autres, pleine largeur. */
@media (max-width: 600px) {
  .pub-telechargements, .ed-actions { flex-direction: column; }
  .pub-telechargements .pub-bouton, .ed-actions .pub-bouton { width: 100%; justify-content: center; text-align: center; padding-top: 10px; padding-bottom: 10px; }
}
