/* =====================================================================
   pérégrinIA, le bureau : styles des gabarits (phase 3)
   Repris de 04-Maquette-Bureau/bureau.html. Tout est rangé sous .pb, la classe
   du <main> des gabarits du thème enfant. Chargé après css/bureau.css.
   ===================================================================== */

/* Astra range le contenu dans un conteneur flex : nos gabarits prennent toute la largeur. */
.site-content > .ast-container { display: block; }
.pb { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 0 3rem; color: var(--craie); }
.pb h1, .pb h2, .pb h3 { text-wrap: balance; margin: 0; }
.pb a { text-underline-offset: .18em; }

/* ---------- Sous-menu Enquêtes : au clic (js/bureau.js), sur ordinateur ---------- */
@media (min-width: 922px) {
  #ast-hf-menu-1 > .menu-item-has-children > .sub-menu {
    opacity: 0 !important; visibility: hidden !important; pointer-events: none;
    min-width: 19rem; padding: .7rem 1rem .8rem !important; left: -1rem;
  }
  #ast-hf-menu-1 > .menu-item-has-children.pb-ouvert > .sub-menu {
    opacity: 1 !important; visibility: visible !important; pointer-events: auto;
    transform: none !important; display: block;
  }
  #ast-hf-menu-1 > .menu-item-has-children.pb-ouvert > a { color: var(--jaune) !important; }
  #ast-hf-menu-1 .sub-menu .menu-link { padding: .45rem 0 !important; font-size: .9rem !important; line-height: 1.25; border: 0 !important; }
}
.main-header-menu .groupe {
  display: block; margin: .6rem 0 .1rem; padding-top: .6rem;
  border-top: 1px dashed rgba(236, 230, 216, .25);
  font: 700 .7rem/1 var(--f-fiche); letter-spacing: .14em; text-transform: uppercase; color: var(--craie-2);
}
.main-header-menu .compte { color: var(--craie-2); font-size: .8rem; }

/* ---------- Fil d'Ariane ---------- */
.fil { max-width: var(--largeur-feuille); margin: 1rem auto 1.2rem; font: 400 .82rem/1.4 var(--f-fiche); color: var(--craie-2); letter-spacing: .04em; }
.fil a { color: var(--craie); }

/* ---------- Accueil : la lampe ---------- */
.lampe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.lampe h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem) !important; line-height: 1.12; color: var(--jaune) !important; max-width: 22ch; }
.lampe h1 .suite { display: block; margin-top: .45em; font-family: var(--f-texte); font-size: .62em; line-height: 1.35; color: var(--craie); letter-spacing: 0; }
.lampe .portrait { margin: 0; }
.lampe .portrait img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }
@media (max-width: 760px) {
  .lampe { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .lampe h1 { margin: 0 auto; }
  .lampe .portrait { max-width: 190px; margin: 0 auto; }
}

/* ---------- Sections ---------- */
.pb .section { margin: clamp(2.5rem, 6vw, 4.5rem) auto 0; }
.pb .section--etroite { max-width: var(--largeur-feuille); }
.pb .section > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.4rem; border-bottom: 1px solid rgba(236, 230, 216, .16); padding-bottom: .6rem; }
.pb .section h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem) !important; line-height: 1.2; color: var(--jaune) !important; }
.pb .note { font: 400 .82rem/1.3 var(--f-fiche); color: var(--craie-2); }
.pb .vide { font-family: var(--f-fiche); color: var(--craie-2); }

/* ---------- Pictogrammes de dossier (masques colorés) ---------- */
.ico { display: block; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.ico--enquetes { -webkit-mask-image: url("../assets/tampon-enquetes.png"); mask-image: url("../assets/tampon-enquetes.png"); }
.ico--atelier { -webkit-mask-image: url("../assets/tampon-atelier.png"); mask-image: url("../assets/tampon-atelier.png"); }
.ico--dossiers { -webkit-mask-image: url("../assets/tampon-dossiers.png"); mask-image: url("../assets/tampon-dossiers.png"); }
.ico--situation { -webkit-mask-image: url("../assets/ico-point-situation.png"); mask-image: url("../assets/ico-point-situation.png"); }
.ico--lecture { -webkit-mask-image: url("../assets/ico-lecture.png"); mask-image: url("../assets/ico-lecture.png"); }
.ico--onirisme { -webkit-mask-image: url("../assets/tampon-onirisme.png"); mask-image: url("../assets/tampon-onirisme.png"); }

/* ---------- Le mur : chemises kraft ---------- */
.mur { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.2rem); }
.mur--special { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chemise {
  position: relative; display: flex; flex-direction: column; gap: .8rem; min-width: 0;
  padding: 1.6rem 1.4rem 1.4rem; margin-top: 1.1rem; color: var(--encre) !important; text-decoration: none !important;
  background: linear-gradient(160deg, #BC9A6E, #AE8D60 55%, #A3825A);
  border-radius: 0 4px 4px 4px; box-shadow: 0 14px 28px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .12);
  transition: transform .2s ease;
}
.chemise::before { content: ""; position: absolute; left: 0; top: -1.1rem; width: 42%; height: 1.15rem; background: #B39062; border-radius: 6px 10px 0 0; }
.chemise-lien { color: inherit; text-decoration: none; }
.chemise-lien::after { content: ""; position: absolute; inset: 0; }
.chemise .bas a { position: relative; z-index: 1; color: var(--rouge-encre); text-decoration: underline; }
.chemise:focus-within { outline: 3px solid var(--rouge-encre); outline-offset: 3px; }
.chemise:nth-child(3n+1) { transform: rotate(-1.2deg); }
.chemise:nth-child(3n+2) { transform: rotate(.8deg); }
.chemise:nth-child(3n) { transform: rotate(-.5deg); }
@media (hover: hover) and (pointer: fine) { .chemise:hover { transform: rotate(0) translateY(-4px); } }
.chemise .etiquette { align-self: flex-start; background: #F1EADB; padding: .35rem .7rem; font: 700 .72rem/1 var(--f-fiche); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); color: var(--encre); }
.chemise .ligne-titre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.chemise h3 { font-size: 1.9rem !important; line-height: 1.05; color: var(--encre) !important; overflow-wrap: anywhere; }
.mur--special .chemise h3 { font-size: 1.5rem !important; }
.chemise .ico { width: 64px; height: 56px; color: var(--rouge-encre); opacity: .85; transform: rotate(-8deg); flex: none; }
.chemise .tampon-mini { width: 74px; height: auto; flex: none; transform: rotate(-9deg); opacity: .9; mix-blend-mode: multiply; }
.chemise p { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--encre); }
.chemise .bas { margin-top: auto; font: 400 .8rem/1.3 var(--f-fiche); color: var(--encre); border-top: 1px dashed rgba(34, 32, 28, .35); padding-top: .6rem; }
.chemise .statut { display: inline-block; margin-left: .4rem; padding: .1rem .4rem; border: 1px solid currentColor; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Feuille de papier (blocs des gabarits) ---------- */
.pb .feuille { position: relative; isolation: isolate; color: var(--encre); }
.pb .feuille::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-style: solid; border-width: 26px;
  /* Bords seuls, répétés (« round ») : un « fill » étiré sur une page haute donnait des traînées verticales. */
  border-image: url("../assets/papier-cadre.webp") 70 / 26px round;
  background: #ECE4D0 url("../assets/papier-fond.webp") 0 0 / 400px 400px repeat padding-box; /* couleur de secours si l'image tarde ou manque */
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55));
}
.pb .feuille :is(p, li, dd, dt, td, th, span, div, figcaption, blockquote, cite) { color: var(--encre); }
.pb .feuille :is(h1, h2, h3, h4) { color: var(--encre) !important; }
.pb .feuille a { color: var(--rouge-encre); }

/* ---------- Bordereau ---------- */
.registre { padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.2rem, 3.5vw, 2.6rem); }
.registre table, .bordereau-op { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 0; border: 0; }
.registre caption, .bordereau-op caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.registre th, .bordereau-op th { text-align: left; font: 700 .72rem/1.2 var(--f-fiche) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-2) !important; padding: 0 .9rem .55rem 0; border: 0; border-bottom: 2px solid rgba(34, 32, 28, .55) !important; background: none; }
.registre td, .bordereau-op td { padding: .7rem .9rem .7rem 0; border: 0; border-bottom: 1px dashed rgba(34, 32, 28, .3) !important; vertical-align: middle; background: none; }
.registre tr:last-child td, .bordereau-op tr:last-child td { border-bottom: 0 !important; }
.registre .c-date, .registre .c-op, .bordereau-op .c-date, .bordereau-op .c-jointes { font: 400 .85rem/1.35 var(--f-fiche); color: var(--encre-2) !important; white-space: nowrap; }
.registre .c-op a { color: inherit !important; text-decoration: underline dotted; }
.registre .c-dossier { white-space: nowrap; font: 700 .78rem/1 var(--f-fiche); letter-spacing: .08em; text-transform: uppercase; color: var(--rouge-encre) !important; }
.registre .c-dossier .ico { color: var(--rouge-encre) !important; display: inline-block; vertical-align: middle; width: 30px; height: 26px; margin-right: .45rem; }
.registre .c-piece { font: 400 .88rem/1.3 var(--f-titre); white-space: nowrap; }
.registre .c-titre a, .bordereau-op .c-titre a { font-family: var(--f-titre); font-size: 1.05rem; line-height: 1.25; color: var(--encre) !important; text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .registre .c-titre a:hover, .bordereau-op .c-titre a:hover, .registre .c-op a:hover { color: var(--rouge-encre) !important; text-decoration: underline; }
}
.bordereau-op { margin-bottom: 1rem; }
.bordereau-op td { vertical-align: top; }
.bordereau-op .c-num { font: 400 1.05rem/1.4 var(--f-titre); color: var(--rouge-encre) !important; white-space: nowrap; }
@media (max-width: 760px) {
  .registre thead, .bordereau-op thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .registre table, .registre tbody, .bordereau-op, .bordereau-op tbody { display: block; }
  .registre tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; padding: .8rem 0; border-bottom: 1px dashed rgba(34, 32, 28, .3); }
  .registre tr:last-child { border-bottom: 0; }
  .registre td { display: block; padding: 0; border: 0 !important; min-width: 0; }
  .registre .c-titre { grid-column: 1 / -1; order: -1; }
  .registre .c-date, .registre .c-op, .registre .c-piece { white-space: normal; }
  .bordereau-op tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .15rem .8rem; padding: .7rem 0; border-bottom: 1px dashed rgba(34, 32, 28, .3); }
  .bordereau-op td { padding: 0; border: 0 !important; }
  .bordereau-op .c-num { grid-row: span 3; }
}

/* ---------- Qui est l'enquêteur ---------- */
.signalement { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.photo-epinglee { position: relative; transform: rotate(-2deg); background: #F4EFE4; padding: 10px 10px 2.2rem; box-shadow: 0 16px 30px rgba(0, 0, 0, .6); max-width: 300px; margin: 0; }
.photo-epinglee img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.photo-epinglee figcaption { position: absolute; left: 0; right: 0; bottom: .55rem; text-align: center; font: 400 .85rem/1 var(--f-titre); color: var(--encre); }
.photo-epinglee::before { content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--rouge); box-shadow: 0 3px 4px rgba(0, 0, 0, .5); transform: translateX(-50%); z-index: 1; }
.fiche-signal { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .45rem 1.2rem; font: 400 .95rem/1.45 var(--f-fiche); }
.fiche-signal dt { color: var(--craie-2); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; padding-top: .15rem; font-weight: 400; }
.fiche-signal dd { margin: 0; color: var(--craie); }
.signalement p { max-width: 62ch; color: var(--craie); margin: 1.2rem 0 0; }

/* ---------- Bouton du bureau ---------- */
.pb .bouton { display: inline-block; margin-top: .6rem; padding: .6rem 1rem; border: 1px solid var(--jaune); color: var(--jaune); text-decoration: none; font: 400 .9rem/1 var(--f-titre); letter-spacing: .06em; }
@media (hover: hover) and (pointer: fine) { .pb .bouton:hover { background: var(--jaune); color: var(--encre); } }

/* ---------- Code de déontologie ---------- */
.deonto { margin: clamp(2.5rem, 6vw, 4.5rem) auto 0; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding: 1.2rem 0; border-top: 1px dashed rgba(236, 230, 216, .25); border-bottom: 1px dashed rgba(236, 230, 216, .25); }
.deonto p { margin: 0; max-width: 70ch; color: var(--craie-2); }
.deonto strong { color: var(--craie); }

/* ---------- Dossier ouvert ---------- */
.pb .dossier { max-width: var(--largeur-feuille); margin: 0 auto; padding: clamp(2rem, 5vw, 3.6rem) clamp(1.4rem, 6vw, 4.2rem) clamp(2.2rem, 5vw, 3.6rem); }
.tampon { display: block; height: auto; mix-blend-mode: multiply; opacity: .88; pointer-events: none; border: 0 !important; box-shadow: none !important; }
.dossier .tampon--dossier { position: absolute; top: clamp(1rem, 2.6vw, 1.8rem); right: clamp(1rem, 3.5vw, 2.4rem); width: clamp(92px, 14vw, 128px); transform: rotate(7deg); }
.fiche-meta { margin: 0 0 1.8rem; padding: 0 0 1rem; max-width: calc(100% - 120px); display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1rem; font: 400 .88rem/1.4 var(--f-fiche); border-bottom: 1px solid rgba(34, 32, 28, .3); }
.fiche-meta dt { color: var(--encre-2) !important; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; padding-top: .12rem; font-weight: 400; }
.fiche-meta dd { margin: 0; }
.fiche-meta a { color: var(--encre) !important; text-decoration: underline dotted; }
.pb .dossier h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem) !important; line-height: 1.1; margin-bottom: .6rem; overflow-wrap: break-word; hyphens: auto; }
.pb .dossier .chapeau { font: 400 1rem/1.4 var(--f-titre); color: var(--encre-2) !important; margin: 0 0 1.8rem; }
.pb .corps { font-size: 1.125rem; line-height: 1.7; }
.pb .corps > :is(p, ul, ol, blockquote, h2, h3, h4) { max-width: 70ch; }
.pb .corps :is(h2, h3) { margin: 1.6em 0 .6em; }
.pb .corps h2 { font-size: 1.5rem !important; }
.pb .corps h3 { font-size: 1.25rem !important; }
.pb .corps img { border: 6px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); height: auto; }
.pb .corps blockquote { border-left: 3px solid var(--rouge-encre) !important; background: rgba(34, 32, 28, .05); padding: .8rem 1.1rem; margin-left: 0; font-style: italic; }
.pb .corps :is(code, pre, kbd) { font-family: var(--f-fiche); background: rgba(34, 32, 28, .07); color: var(--encre); }
.pb .corps .wp-block-columns { gap: 1.6rem; }
.pb .corps .wp-block-separator { border-color: rgba(34, 32, 28, .35) !important; opacity: 1; }
.pb .corps .wp-block-button__link { color: var(--rouge-encre) !important; border-color: var(--rouge-encre) !important; }
.avertissement { margin: 0 0 1.8rem; padding: .8rem 1rem; border: 2px solid var(--rouge-encre); font-size: 1rem; line-height: 1.5; max-width: 70ch; }
.avertissement b { display: block; margin-bottom: .2rem; font: 700 .75rem/1 var(--f-fiche); letter-spacing: .14em; text-transform: uppercase; color: var(--rouge-encre) !important; }
.renvoi-operation { display: flex; align-items: center; gap: 1rem; margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px dashed rgba(34, 32, 28, .4); font-family: var(--f-fiche); }
.tampon--special-mini { width: 80px; transform: rotate(-11deg); flex: none; }

/* ---------- Page d'opération ---------- */
.presentation { max-width: 70ch; font-size: 1.125rem; line-height: 1.7; margin: 0 0 2rem; }
.pb .dossier h2.sous-titre { font: 700 .8rem/1 var(--f-fiche) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-2) !important; margin: 0 0 .8rem; }

/* ---------- Archive d'un dossier, index des dossiers spéciaux ---------- */
.titre-page { max-width: var(--largeur-feuille); margin: 1.2rem auto 0; }
.titre-page h1 { font-size: clamp(2rem, 5vw, 3rem) !important; line-height: 1.1; color: var(--jaune) !important; }
.titre-page p, .titre-page .intro p { max-width: 62ch; margin: .7rem 0 0; color: var(--craie); font-size: 1.05rem; line-height: 1.55; }
.etiquette-dossier { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .6rem; font: 700 .75rem/1 var(--f-fiche); letter-spacing: .14em; text-transform: uppercase; color: var(--craie-2); }
.etiquette-dossier .ico { width: 40px; height: 34px; color: var(--rouge-vif); }
.sous-dossiers { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; font: 700 .78rem/1 var(--f-fiche); letter-spacing: .06em; }
.sous-dossiers a { color: var(--craie-2); text-decoration: none; padding: .45rem .7rem; border: 1px solid rgba(236, 230, 216, .22); }
.sous-dossiers a[aria-current="page"] { color: var(--encre); background: var(--jaune); border-color: var(--jaune); }

/* ---------- Pages secondaires : rangées image + texte, cartes de Contact ---------- */
.pb-page .dossier:has(.peregrinia-apropos-large, .peregrinia-communautes) { max-width: var(--largeur); }
.peregrinia-apropos-rangee { display: flex; align-items: center; gap: 2.5rem; margin-bottom: 2.5rem; }
.peregrinia-apropos-rangee--inverse { flex-direction: row-reverse; }
.peregrinia-apropos-photo { display: block; flex: 0 0 360px; width: 360px; height: auto; }
.peregrinia-apropos-texte { flex: 1 1 auto; min-width: 0; }
.peregrinia-apropos-texte p:first-child { margin-top: 0; }
.peregrinia-apropos-galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1rem; }
.peregrinia-apropos-galerie img { display: block; width: 100%; height: auto; }
@media (max-width: 560px) { .peregrinia-apropos-galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; } }
@media (max-width: 900px) {
  .peregrinia-apropos-rangee, .peregrinia-apropos-rangee--inverse { flex-direction: column; }
  .peregrinia-apropos-photo { flex: 0 0 auto; width: 100%; max-width: 320px; margin: 0 auto; }
}
.peregrinia-communautes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; margin-top: 2rem; }
.peregrinia-communaute { margin: 0; border-top: 1px dashed rgba(34, 32, 28, .4); padding-top: 1.1rem; display: flex; flex-direction: column; gap: 1.25rem; }
.peregrinia-contact-ligne { display: flex; align-items: center; gap: 1rem; text-decoration: none !important; }
.peregrinia-contact-ligne img { display: block; flex-shrink: 0; border: 0 !important; box-shadow: none !important; }
.peregrinia-contact-ligne--logo img { width: 100px; height: 100px; }
.peregrinia-contact-ligne--avatar img { width: 50px; height: 50px; border-radius: 50%; }
.peregrinia-contact-ligne--logo h2 { margin: 0 !important; font-size: 1.4rem !important; }
.peregrinia-contact-ligne--avatar { flex-wrap: wrap; }
.peregrinia-contact-ligne--avatar span { font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .peregrinia-contact-ligne:hover :is(h2, span) { text-decoration: underline; } }
@media (max-width: 760px) { .peregrinia-communautes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Petits écrans ---------- */
@media (max-width: 760px) {
  .mur, .mur--special { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  /* En pleine largeur, une chemise inclinée dépasse de l'écran : on la redresse. */
  .chemise:nth-child(n) { transform: none; }
  .chemise .ligne-titre h3 { min-width: 0; }
  .mur--special .chemise h3 { font-size: 1.3rem !important; }
  .signalement { grid-template-columns: minmax(0, 1fr); }
  .photo-epinglee { margin: 0 auto; }
}
@media (max-width: 520px) {
  .pb .feuille::before { border-width: 16px; border-image-width: 16px; }
  .dossier .tampon--dossier { position: static; margin-bottom: 1rem; transform: rotate(-4deg); width: 92px; }
  .fiche-meta { max-width: none; }
  .fiche-signal { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fiche-signal dd { margin-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .chemise { transition: none; } }

/* ---------- Illustration d'un dossier spécial ---------- */
.illustration-dossier { margin: 1.6rem 0 2rem; }
.illustration-dossier img { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; border: 6px solid #F7F3EA; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }

/* Liens vers les téléchargements : puce en flèche rouge */
.indices-liste { list-style: "➜  "; padding-left: 1.6rem; }
.indices-liste li { padding-left: .3rem; margin-bottom: .6rem; }
.indices-liste li::marker { color: var(--rouge-encre); font-weight: 700; }

/* Descriptions courtes : bulle au survol et au focus clavier, visibles en clair sur écran tactile et dans le menu mobile */
.menu-item:has(> .pb-bulle), .a-bulle { position: relative; }
.pb-bulle {
  position: absolute; left: 0; top: 100%; z-index: 60; width: max-content; max-width: 18rem; margin-top: .3rem; padding: .45rem .7rem;
  background: #22201C; color: #F1EADB; border: 1px solid #F1EADB; border-radius: 3px;
  font: 400 .85rem/1.3 var(--f-fiche, "Courier Prime", monospace); white-space: normal; text-transform: none; letter-spacing: 0; text-decoration: none;
  visibility: hidden; opacity: 0; transition: opacity .15s ease;
}
.menu-item:hover > .pb-bulle, .menu-item:focus-within > .pb-bulle,
.a-bulle:hover > .pb-bulle, .a-bulle:focus-within > .pb-bulle { visibility: visible; opacity: 1; }
.pb-sans-bulle .pb-bulle { visibility: hidden !important; opacity: 0 !important; }
@media (hover: none) {
  .pb-bulle { position: static; visibility: visible; opacity: .85; width: auto; max-width: none; margin: 0; padding: 0 1em .5em; background: none; border: 0; color: inherit; font-size: .8rem; }
  .a-bulle .pb-bulle { display: block; padding: 0; }
}
.ast-header-break-point .menu-item > .pb-bulle { position: static; visibility: visible; opacity: .85; width: auto; max-width: none; margin: 0; padding: 0 1em .6em; background: none; border: 0; color: inherit; font-size: .8rem; }

/* Navigation de série : précédente, suivante, position */
.serie-nav { margin: 2.2rem 0 0; padding-top: 1.2rem; border-top: 1px dashed rgba(34, 32, 28, .4); font-family: var(--f-fiche); }
.serie-nav .serie-pos { margin: 0 0 .8rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-2); }
.serie-nav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.serie-nav li { margin: 0; }
.serie-nav .serie-suiv { text-align: right; }
.serie-nav a { color: var(--encre) !important; text-decoration: underline dotted; overflow-wrap: anywhere; }
.serie-nav a:focus-visible { outline: 3px solid var(--rouge-encre); outline-offset: 2px; }
@media (max-width: 700px) { .serie-nav ul { grid-template-columns: 1fr; } .serie-nav .serie-suiv { text-align: left; } }

/* Dossier spécial dans un bordereau : le petit logo rouge tient lieu de libellé (texte pour les lecteurs d'écran). */
.piece-special { display: inline-block; vertical-align: middle; }
.registre .c-dossier .ico--dossiers, .registre .c-piece .ico--dossiers, .registre .c-piece .ico--enquetes { color: var(--rouge-encre) !important; width: 30px; height: 30px; }
/* Titres : jamais un signe de ponctuation seul sur une ligne */
h1, h2, h3, .entry-title { text-wrap: balance; }

/* La page des dossiers spéciaux a le même gabarit de largeur que les archives de dossier. */
body:has(.pb-dossiers-speciaux) .site-content > .ast-container { max-width: 1200px !important; padding-left: 0 !important; padding-right: 0 !important; }

/* Atelier : présentation en livres, couverture verticale d'abord */
.livres { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(1.6rem, 4vw, 2.6rem); }
.livre { position: relative; display: flex; flex-direction: column; gap: .8rem; margin: 0; }
.livre .couverture { margin: 0; aspect-ratio: 724 / 1024; background: #2b2a26; border-radius: 3px; box-shadow: 0 14px 28px rgba(0, 0, 0, .55); overflow: hidden; }
.livre .couverture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.livre h3 { font-size: 1.35rem !important; line-height: 1.15; }
.livre h3 a { color: var(--jaune) !important; text-decoration: none; }
.livre h3 a::after { content: ""; position: absolute; inset: 0; }
.livre:focus-within { outline: 3px solid var(--jaune); outline-offset: 6px; }
.livre p { margin: 0; color: var(--craie); font-size: 1rem; line-height: 1.45; }
.livre .meta { font: 400 .8rem/1.3 var(--f-fiche); color: var(--craie-2); }
@media (hover: hover) and (pointer: fine) { .livre:hover .couverture { transform: translateY(-4px); } .livre .couverture { transition: transform .2s ease; } }
@media (prefers-reduced-motion: reduce) { .livre .couverture { transition: none !important; transform: none !important; } }

/* La page des dossiers spéciaux est une page WordPress : Astra lui ajoute 60 px de marge, absents des archives. */
#primary.pb-dossiers-speciaux { margin: 0 !important; }

/* Petit écran : la description d'un dossier s'écrit sous le lien au lieu de flotter à droite (elle faisait déborder la page). */
@media (max-width: 700px) {
  .a-bulle { display: inline-block; }
  .a-bulle .pb-bulle { position: static; display: block; visibility: visible; opacity: .85; width: auto; max-width: none; margin: .1rem 0 0; padding: 0; background: none; border: 0; color: inherit; font-size: .8rem; }
}

/* Focus clavier d'une carte : le cadre rouge de la carte entière suffit, le lien garde sa couleur (Astra le passait en bleu). */
.chemise-lien, .chemise-lien:hover, .chemise-lien:focus, .chemise-lien:focus-visible { color: var(--encre) !important; outline: none; }
.livre h3 a:focus, .livre h3 a:focus-visible { color: var(--jaune) !important; outline: none; }

/* ---------- Encart centré, tout le bloc est le lien (annexe d'un dossier spécial, lecture d'une nouvelle) ---------- */
.encart { position: relative; margin: 2.4rem auto 0; max-width: 40rem; padding: 1.2rem 1.4rem 1.3rem; border: 2px dashed rgba(34, 32, 28, .55); background: rgba(168, 134, 90, .16); transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.encart:hover, .encart:focus-within { background: rgba(168, 134, 90, .22); border-style: solid; border-color: var(--rouge-encre); transform: translateY(-2px); }
.encart:focus-within { outline: 3px solid var(--rouge-encre); outline-offset: 3px; }
.encart .ico { position: absolute; right: 1rem; top: .8rem; width: 64px; height: 64px; color: var(--rouge-encre) !important; opacity: .85; transform: rotate(-8deg); }
.encart > :not(.ico):not(.pb-bulle) { padding-right: 84px; }
.encart .encart-etiquette { margin: 0 0 .3rem; font: 700 .75rem/1 var(--f-fiche); letter-spacing: .16em; text-transform: uppercase; color: var(--rouge-encre) !important; }
.pb .dossier .encart h2.sous-titre { margin: 0 0 .5rem !important; font-size: 1.35rem !important; }
.encart .encart-lien { color: var(--encre) !important; text-decoration: none !important; outline: none; }
.encart .encart-lien::after { content: ""; position: absolute; inset: 0; }
.encart:hover .encart-lien { color: var(--rouge-encre) !important; }
.encart p { margin: 0 0 .6rem; font-size: 1.05rem; line-height: 1.55; }
.encart .encart-go { margin: 0; font: 700 .95rem/1.4 var(--f-fiche); color: var(--rouge-encre) !important; }
.encart:hover .encart-go { text-decoration: underline; }
.encart .pb-bulle { left: 50%; top: 100%; transform: translateX(-50%); margin-top: .6rem; text-align: left; background: #F7F3EA; color: var(--encre) !important; border-color: var(--encre-2); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.encart:hover > .pb-bulle, .encart:focus-within > .pb-bulle { visibility: visible; opacity: 1; }
@media (hover: none) { .encart .pb-bulle { position: static; transform: none; margin: .4rem 0 0; padding: 0 84px 0 0; color: var(--encre-2) !important; text-align: left; font-size: .8rem; } }
.ico--situation, .ico--lecture { display: block; }
