/* =====================================================================
   Lo On Shing — les notes de synthèse, à l'écran

   Le PDF a sa feuille (1. ALL/briefings/brief.css), taillée pour l'A4 :
   points typographiques, marges en millimètres, sauts de page. Celle-ci
   dit la même chose pour un écran — mêmes couleurs, mêmes composants,
   mêmes rôles — en unités relatives, et en laissant chaque bloc se
   replier quand la place manque.

   Tout est enfermé sous .briefing-text et .briefing-index : le corps
   d'une note emploie des sélecteurs très ordinaires (table, h2, .lead)
   qui, laissés libres, atteindraient le reste du site.
   ===================================================================== */

.briefing-text {
  --bn-encre:   #1f2937;
  --bn-marine:  #092f66;
  --bn-bleu:    #0d4494;
  --bn-orange:  #c75e0a;
  --bn-gris:    #64748b;
  --bn-trait:   #e2e8f0;
  --bn-bordure: #dbe6f5;
  --bn-fond:    #f4f8fd;
  color: var(--bn-encre);
  line-height: 1.65;
}

/* ------------------------------------------------ la ligne d'identité */

.briefing-text .briefing-meta {
  font-size: 0.85rem;
  color: #475569;
  margin: 0 0 0.4rem;
  letter-spacing: .01em;
}
.briefing-text .briefing-meta strong { color: #334155; font-weight: 700; }

.briefing-text .briefing-pdf {
  margin: 0 0 1.8rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--bn-trait);
  font-size: 0.9rem;
}
.briefing-text .briefing-pdf a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  color: var(--bn-bleu);
  text-decoration: none;
}
.briefing-text .briefing-pdf a::before {
  content: "";
  width: 1rem; height: 1rem;
  flex: 0 0 1rem;
  background: currentColor;
  /* la flèche vers le bac : dessinée, pas chargée — une icône de plus
     serait une requête de plus pour seize pixels */
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E");
}
.briefing-text .briefing-pdf a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- le texte */

.briefing-text h2 {
  font-size: 1.32rem;
  color: var(--bn-bleu);
  margin: 2.4rem 0 .8rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--bn-bordure);
}
.briefing-text h3 {
  font-size: 1.08rem;
  color: var(--bn-marine);
  margin: 1.6rem 0 .5rem;
}
.briefing-text p { margin: 0 0 .95rem; }
.briefing-text ul,
.briefing-text ol { margin: 0 0 .95rem; padding-left: 1.4rem; }
.briefing-text li { margin-bottom: .35rem; }
.briefing-text strong { color: var(--bn-marine); }
.briefing-text em { color: #334155; }
.briefing-text a { color: var(--bn-bleu); }

.briefing-text .lead {
  font-size: 1.08rem;
  color: #334155;
  border-left: 3px solid #e67e22;
  padding: .15rem 0 .15rem 1rem;
  margin-bottom: 1.6rem;
}

/* ------------------------------------------------------- les encadrés */

.briefing-text .callout {
  background: var(--bn-fond);
  border: 1px solid var(--bn-bordure);
  border-left: 3px solid var(--bn-bleu);
  border-radius: 4px;
  padding: 1rem 1.15rem;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
.briefing-text .callout.warm {
  background: #fff7ef;
  border-color: #f0c48a;
  border-left-color: var(--bn-orange);
}
.briefing-text .callout p:last-child { margin-bottom: 0; }
.briefing-text .callout .h {
  display: block;
  font-weight: 700;
  color: var(--bn-marine);
  margin-bottom: .35rem;
}

/* ------------------------------------------------------- les tableaux */

/* La boîte qui défile. Un tableau de cinq colonnes de taux ne se replie
   pas : le réduire le rendrait illisible, l'empiler lui ferait perdre
   ses en-têtes. Il défile donc horizontalement, dans sa boîte à lui,
   sans jamais faire défiler la page. */
.briefing-text .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.1rem 0 1.3rem;
}
.briefing-text table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 0;
}
.briefing-text .callout table { margin: .6rem 0 0; min-width: 24rem; }
.briefing-text th {
  background: var(--bn-marine);
  color: #fff;
  text-align: left;
  padding: .5rem .7rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.briefing-text td {
  padding: .5rem .7rem;
  border-bottom: 1px solid var(--bn-trait);
  vertical-align: top;
}
.briefing-text tr:nth-child(even) td { background: #f8fafc; }
.briefing-text td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ----------------------------------------------------- les chiffres clés */

.briefing-text .kpis {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin: 1.3rem 0 1.8rem;
}
.briefing-text .kpi {
  flex: 1 1 11rem;
  border: 1px solid var(--bn-bordure);
  border-top: 3px solid var(--bn-bleu);
  border-radius: 4px;
  padding: .8rem .9rem;
}
.briefing-text .kpi b {
  display: block;
  font-size: 1.4rem;
  color: var(--bn-marine);
  line-height: 1.15;
}
/* Le PDF force parfois la taille d'un chiffre long en ligne (8.25 % /
   16.5 %) pour qu'il tienne sur une ligne d'A4. À l'écran la boîte se
   replie toute seule : on reprend la main sur cet attribut. */
.briefing-text .kpi b[style] { font-size: 1.4rem !important; white-space: normal !important; }
.briefing-text .kpi span {
  display: block;
  font-size: 0.82rem;
  color: var(--bn-gris);
  margin-top: .25rem;
  line-height: 1.4;
}

.briefing-text .two { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.briefing-text .two > div { flex: 1 1 16rem; }

/* ------------------------------------------------------- les logigrammes */

.briefing-text .flux { margin: .8rem 0 1.4rem; }
.briefing-text .flux-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 0 0 .9rem;
  font-size: 0.85rem;
  color: var(--bn-gris);
}
.briefing-text .flux-legende span { display: flex; align-items: center; gap: .4rem; }
.briefing-text .flux-legende i {
  display: inline-block;
  width: 3px; height: .9rem;
  border-radius: 1px;
  background: var(--bn-bleu);
}
.briefing-text .flux-legende i.orange { background: var(--bn-orange); }

.briefing-text .etape {
  display: flex;
  align-items: stretch;
  margin-bottom: .5rem;
  border: 1px solid var(--bn-bordure);
  border-left: 3px solid var(--bn-bleu);
  border-radius: 4px;
  background: #fff;
}
.briefing-text .etape.sans-delai { border-left-color: var(--bn-orange); }
.briefing-text .etape .rang {
  flex: 0 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bn-fond);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--bn-marine);
}
.briefing-text .etape.sans-delai .rang { background: #fff7ef; color: var(--bn-orange); }
.briefing-text .etape .corps { flex: 1 1 auto; padding: .6rem .9rem; min-width: 0; }
.briefing-text .etape .corps b { display: block; font-size: 1rem; color: var(--bn-marine); }
.briefing-text .etape .corps .qui {
  font-size: 0.83rem;
  color: var(--bn-gris);
  margin-top: .1rem;
  letter-spacing: .02em;
}
.briefing-text .etape .corps .quoi { font-size: 0.92rem; margin-top: .35rem; line-height: 1.5; }
.briefing-text .etape .delai {
  flex: 0 0 11rem;
  padding: .6rem .9rem;
  border-left: 1px solid var(--bn-trait);
  background: #fafcfe;
}
.briefing-text .etape .delai .d {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bn-marine);
  line-height: 1.3;
}
.briefing-text .etape.sans-delai .delai { background: #fffaf5; }
.briefing-text .etape.sans-delai .delai .d { color: var(--bn-orange); }
.briefing-text .etape .delai .base {
  display: block;
  margin-top: .25rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--bn-gris);
}

/* ----------------------------------------------------------- les cartes */

.briefing-text figure.map { margin: 1.6rem 0 1.4rem; text-align: center; }
.briefing-text figure.map img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--bn-bordure);
  border-radius: 4px;
}
.briefing-text figure.map figcaption {
  margin: .5rem auto 0;
  max-width: 34rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--bn-gris);
  text-align: left;
}
.briefing-text figure.map figcaption b { color: var(--bn-marine); }
.briefing-text figure.map .credit {
  display: block;
  margin-top: .2rem;
  font-size: 0.76rem;
  color: #a3adba;
}
.briefing-text figure.map.large figcaption { max-width: none; }

.briefing-text .maps-two {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.6rem 0 1.4rem;
  align-items: flex-start;
}
.briefing-text .maps-two figure.map { flex: 1 1 16rem; min-width: 0; margin: 0; }
.briefing-text .maps-two figure.map figcaption { max-width: none; font-size: 0.82rem; }

/* ------------------------------------------------- sources et colophon */

.briefing-text .sources {
  margin-top: 2.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bn-trait);
  font-size: 0.85rem;
  color: var(--bn-gris);
}
.briefing-text .sources b { color: #475569; }
.briefing-text .colophon {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
  line-height: 1.55;
}

/* ------------------------------------------------------- le téléphone */

@media (max-width: 640px) {
  .briefing-text h2 { font-size: 1.18rem; }
  .briefing-text .etape { flex-wrap: wrap; }
  .briefing-text .etape .delai {
    flex: 1 1 100%;
    border-left: 0;
    border-top: 1px solid var(--bn-trait);
  }
  .briefing-text .kpi b,
  .briefing-text .kpi b[style] { font-size: 1.25rem !important; }
}

/* =====================================================================
   LE SOMMAIRE
   La même liste que la page Ressources, pour que les deux se
   reconnaissent : un titre, puis le numéro, la date et la phrase qui
   dit de quoi la note parle.
   ===================================================================== */

.briefing-index h2 {
  font-size: 1.22rem;
  color: #0d4494;
  margin: 2.2rem 0 .8rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #dbe6f5;
}
.briefing-index h2:first-child { margin-top: 0; }
.briefing-index .briefing-list { list-style: none; margin: 0; padding: 0; }
.briefing-index .briefing-list li { margin: 0 0 .55rem; }
.briefing-index .briefing-list a {
  display: block;
  padding: .8rem 1rem;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0d4494;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.briefing-index .briefing-list a:hover {
  background: #f4f8fd;
  border-color: #dbe6f5;
  border-left-color: #c75e0a;
}
.briefing-index .briefing-list strong {
  display: block;
  color: #092f66;
  font-size: 1.02rem;
}
.briefing-index .briefing-list small {
  display: block;
  margin-top: .2rem;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}
.briefing-index .briefing-list small b { color: #475569; font-weight: 700; }

/* =========================================================
   Onglets de section sur les pages de note  [intercalaires]
   ---------------------------------------------------------
   Antoine, 9 oct. 2026 : depuis la section « Briefing notes »
   d'une page pays, ouvrir une note faisait perdre les onglets
   verticaux. La page de note porte donc les onglets du pays de
   la note ; ils renvoient aux sections de la page pays, et
   « Briefing Notes » y reste marqué (js/main.js, data-renvoi).

   Les règles ci-dessous sont celles de css/focus.css, copiées
   telles quelles (les pages de note ne chargent pas focus.css) :
   les modifier ICI ET LÀ-BAS, ensemble.
   ========================================================= */
.intercalaires {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: none;                 /* activé par la requête de média */
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    pointer-events: none;          /* la bande ne bloque rien ; les onglets, si */
}
.intercalaires a {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 34px;
    padding: 0.42rem 0.7rem 0.42rem 0.6rem;
    background: #fff;
    color: var(--brand-primary-darker, #092f66);
    border: 1px solid var(--bg-border, #e2e8f0);
    border-right: none;
    border-left: 3px solid var(--brand-accent, #dbe6f5);
    border-radius: var(--radius-md, 6px) 0 0 var(--radius-md, 6px);
    box-shadow: -2px 2px 8px rgba(9, 47, 102, 0.09);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    min-width: 6.1rem;
    transition: border-left-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.intercalaires .court { flex: 1 1 auto; }
/*  Le libellé long est là dès le chargement — pour le lecteur
    d'écran, qui lit les deux et n'a que faire du survol — mais
    replié à zéro. C'est sa largeur qui s'ouvre, pas celle de
    l'onglet : un conteneur animé en largeur saute d'une image à
    l'autre, un texte replié non.  */
.intercalaires .long {
    flex: 0 0 auto;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    transition: max-width 0.24s cubic-bezier(.4, 0, .2, 1), opacity 0.18s ease, margin 0.24s ease;
}
.intercalaires a:hover,
.intercalaires a:focus-visible {
    border-left-color: var(--brand-orange, #e67e22);
    box-shadow: -4px 3px 14px rgba(9, 47, 102, 0.16);
    outline: none;
}
.intercalaires a:hover .long,
.intercalaires a:focus-visible .long {
    max-width: 15rem;
    opacity: 1;
    margin-left: 0.45rem;
}
/*  La section qu'on est en train de lire. Marquée par la couleur
    ET par la graisse du filet, jamais par la couleur seule.  */
.intercalaires a.is-active {
    border-left-width: 5px;
    border-left-color: var(--brand-orange, #e67e22);
    background: #fff7ef;
    padding-left: 0.5rem;
}

@media (min-width: 1280px) { .intercalaires { display: flex; } }

/*  Impression : une navigation fixée à l'écran n'a aucun sens sur
    une feuille, et laisserait une bande blanche dans la marge. */
@media print { .intercalaires { display: none !important; } }

/*  Un lecteur qui a demandé moins de mouvement garde l'ouverture,
    mais sans l'animation.  */
@media (prefers-reduced-motion: reduce) {
    .intercalaires a,
    .intercalaires .long { transition: none; }
}
