/* Page Explorer : une ligne par sujet, texte à gauche, aperçu vivant à droite. Dense, clair, sans gros bouton. */
.ex-main { max-width: 1180px; font-size: 14px; }
/* En-tête dense : titre, région, style et outils sur une ligne ; domaines en puces, en deux groupes. */
.ex-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ex-tete h1 { font-size: 22px; margin: 0; }
.ex-tete .ex-l1 { align-items: baseline; }
.ex-lead { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--texte-doux); }
.ex-liste { margin-top: 12px; }
.ex-ligne { display: grid; grid-template-columns: minmax(220px, 3fr) minmax(0, 7fr); gap: 18px; padding: 16px 0; border-top: 1px solid var(--bord); align-items: start; }
/* Toute la ligne mène au sujet (06/12/2026) : la zone du lien du titre couvre la ligne ; ce qui a sa propre action
   (cœur, sous-pages, « Voir en entier », région, aperçu et ses liens) passe au-dessus. */
.ex-ligne { position: relative; cursor: pointer; border-radius: 10px; }
.ex-lien { color: inherit; text-decoration: none; }
.ex-lien::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 10px; }
.ex-ligne a:not(.ex-lien), .ex-ligne button, .ex-ligne select, .ex-ligne input, .ex-ligne label, .ex-apercu { position: relative; z-index: 2; }
.ex-ligne:hover .ex-lien, .ex-lien:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ex-ligne:hover { background: linear-gradient(90deg, var(--accent-doux, #eef3f8), transparent 60%); }
.ex-lien:focus-visible { outline: none; }
.ex-lien:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }

.ex-titre { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ex-ligne .coeur-page { width: 46px; height: 46px; margin: -10px -8px 0 0; border-radius: 12px; }
.ex-ligne .coeur-page .coeur-ico { width: 30px; height: 30px; }
.ex-ligne .coeur-page:hover { background: var(--accent-doux); }
/* Bande « Mes cœurs » : les sujets aimés, en puces ; le bouton n'en garde qu'eux dans la page. */
.ex-coeurs { margin: 14px 0 0; padding: 10px 14px; border: 1px solid var(--bord); border-radius: 10px; background: var(--carte); }
.ex-coeurs-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ex-coeurs-tete h2 { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.ex-coeurs-tete h2 .coeur-ico { color: #c33d55; fill: currentColor; }
.ex-coeurs-tete .ex-lienbtn[aria-pressed="true"] { font-weight: 650; color: var(--accent); }
.ex-coeurs-l { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ex-coeurs-l:empty { display: none; }
.ex-coeurs-l a { display: inline-block; padding: 3px 10px; border: 1px solid var(--bord); border-radius: 999px; color: var(--texte); text-decoration: none; font-size: 13px; }
.ex-coeurs-l a:hover { border-color: #c33d55; color: #c33d55; }
.ex-coeurs-vide { margin: 6px 0 0; font-size: 13px; color: var(--texte-doux); }
.ex-que-coeurs .ex-ligne:not(:has(.coeur[aria-pressed="true"])),
.ex-que-coeurs .ex-domaine:not(:has(.coeur[aria-pressed="true"])),
.ex-que-coeurs .ex-pourvous { display: none !important; }
.ex-desc { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: var(--texte-doux); }
.ex-sous { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; line-height: 1.5; }
.ex-sous a { color: var(--texte); text-decoration: none; border-bottom: 1px solid var(--bord); }
.ex-sous a:hover { color: var(--accent); border-bottom-color: currentColor; }
/* Pages de lieu sous leur région (06/12/2026) : une rangée par type, nom du type à gauche, liste serrée à droite. */
.ex-lieux { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 10px; margin: 6px 0 10px; font-size: 13px; line-height: 1.5; }
.ex-lieux dt { margin: 0; line-height: 19.5px; font-size: 11.5px; font-weight: 600; color: var(--texte-doux); white-space: nowrap; }
.ex-lieux dd { margin: 0; min-width: 0; }
.ex-lieux .ex-sous { margin: 0; overflow-wrap: anywhere; }
.ex-lieux-n { font-weight: 400; }
.ex-meta { margin: 0; font-size: 13px; color: var(--texte-doux); display: flex; gap: 12px; align-items: baseline; }
.ex-voir { color: var(--accent); font-weight: 500; text-decoration: none; }
.ex-voir:hover { text-decoration: underline; }

/* Aperçu : le haut des boîtes, coupé en bas par un fondu. */
.ex-apercu { position: relative; max-height: 188px; overflow: hidden; border-radius: 10px; }
/* Fondu du bas : un dégradé vers la couleur du fond posé par-dessus (06/12/2026), au lieu d'un masque, plus coûteux à
   peindre sur des dizaines d'aperçus ; même aspect (30 % du bas). Il ne capte pas les clics. */
.ex-apercu::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: 3; pointer-events: none;
  background: linear-gradient(transparent, var(--fond, #f6f8fa)); }
.ex-pourvous .ex-apercu::after { background: linear-gradient(transparent, var(--accent-doux, #eef3f8)); }
/* Défilement au téléphone (06/12/2026) : un aperçu hors de l'écran n'est ni mis en page ni peint (content-visibility) ;
   sa hauteur retenue évite tout saut. Sans effet visible : l'aperçu coupe déjà ce qui dépasse. Un navigateur qui ne
   connaît pas ces propriétés les ignore et rend la page comme avant. */
.ex-apercu { content-visibility: auto; contain-intrinsic-height: auto 135px; }
/* Hauteur retenue = hauteur réelle d'un aperçu (135 px, 127 en Magazine, 126 en Éditorial) : au premier affichage, un
   aperçu pas encore jugé visible prend cette hauteur, puis la sienne, sans rien pousser (docs/AFFICHAGE.md). */
:root[data-style="m"] .ex-apercu { contain-intrinsic-height: auto 127px; }
:root[data-style="e"] .ex-apercu { contain-intrinsic-height: auto 126px; }
.ex-apercu .it-grille { margin-top: 0; gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ex-apercu .it-boite { padding: 4px 4px 6px; border-radius: 10px; box-shadow: none; scroll-margin-top: 0; }
.ex-apercu .it-boite-tete { padding: 3px 4px 4px 6px; }
.ex-apercu .it-boite-tete h2 { font-size: 13px; line-height: 1.25; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-apercu .it-poignee, .ex-apercu .pn-section-n, .ex-apercu .info-i, .ex-apercu .pn-dom, .ex-apercu .coeur, .ex-apercu .it-boite-actions { display: none !important; }
.ex-apercu .it-lien-a { min-height: 0; padding: 3px 4px 3px 6px; gap: 6px; }
.ex-apercu .it-lien .pn-fav { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.ex-apercu .it-lien .pn-fav img { width: 16px; height: 16px; }
.ex-apercu .it-lien .pn-nom { font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ex-apercu .pn-txt { min-width: 0; }

/* L'aperçu prend le style choisi pour tout alpha (public/assets/styles/), comme le reste de la page. */

@media (max-width: 900px) {
  .ex-ligne { grid-template-columns: 1fr; gap: 10px; }
  .ex-apercu .it-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-apercu .it-boite:nth-child(n+3) { display: none; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .ex-apercu .it-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ex-apercu .it-boite:nth-child(n+4) { display: none; }
}

/* Domaines, sommaire, « Pour vous », outils et fenêtre de la découverte. */
.ex-sommaire { margin-top: 10px; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); } /* sans minmax(0, …), la ligne de puces défilante élargissait la page au téléphone (1 148 px) */
.ex-grp { display: flex; align-items: flex-start; gap: 8px; }
.ex-grp-l { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.ex-grp-n { flex: none; width: 104px; padding-top: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-doux); }
.ex-puce { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border: 1px solid var(--bord); border-radius: 999px;
  background: var(--carte, #fff); color: var(--texte); font-size: 12.5px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.ex-puce svg { color: var(--accent); flex: none; }
.ex-puce:hover, .ex-puce:focus-visible { border-color: var(--accent); color: var(--accent); }
/* Outils de l'en-tête (06/12/2026) : même pastille que les domaines, en gris ; chacun paraît quand il sert. */
.ex-outils { margin-top: 6px; }
.ex-outil { font: inherit; font-size: 12.5px; cursor: pointer; color: var(--texte-doux); }
.ex-outil svg { color: currentColor; }
.ex-grp[hidden], .ex-outil[hidden] { display: none; }
/* Libellés des outils : complets à l'ordinateur, courts au téléphone. */
.ex-court { display: none; }
@media (max-width: 719px) {
  /* En-tête au téléphone (06/12/2026) : titre, une phrase, puis une ligne par groupe, son nom à gauche et ses pastilles
     qui défilent ; le bord droit s'estompe pour dire qu'il y en a d'autres. Pas plus haut que l'en-tête d'avant. */
  .ex-tete h1 { font-size: 19px; line-height: 1.2; }
  .ex-tete .ex-l1 { display: block; }
  .ex-lead { margin-top: 2px; font-size: 12.5px; line-height: 1.35; }
  .ex-sommaire { margin-top: 8px; gap: 5px; }
  .ex-outils { margin-top: 5px; }
  .ex-grp { display: flex; align-items: center; gap: 6px; }
  .ex-grp-n { flex: none; width: 86px; padding: 0; font-size: 10px; letter-spacing: 0; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
  .ex-grp-l { flex: 1 1 auto; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .ex-grp-l::-webkit-scrollbar { display: none; }
  /* Outils : deux pastilles qui tiennent sur la ligne ; pas de bord estompé (il voilait la seconde). */
  .ex-outils .ex-grp-l { padding-right: 14px; -webkit-mask-image: none; mask-image: none; }
  .ex-long { display: none; }
  .ex-court { display: inline; }
}
.ex-lienbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--texte-doux); text-decoration: underline; cursor: pointer; }
.ex-lienbtn:hover { color: var(--accent); }
.ex-domaine { margin-top: 22px; scroll-margin-top: 44px; }
.ex-domaine > h2 { font-size: 15px; margin: 0; padding-bottom: 4px; text-transform: none; letter-spacing: 0; }
.ex-domaine .ex-liste { margin-top: 0; }
.ex-domaine .ex-ligne:first-child { border-top: 1px solid var(--bord); }
.ex-pourvous { background: var(--accent-doux, #eef3f8); border-radius: 10px; padding: 8px 14px 4px; }
.ex-aide { margin: 2px 0 6px; font-size: 13px; color: var(--texte-doux); }
.ex-texte h3 { font-size: 17px; margin: 0 0 6px; }
.ex-charge { margin: 0; padding: 10px; font-size: 12.5px; color: var(--texte-doux); }
/* Aperçu chargé par la page (ex-paresseux) : hauteur fixe, celle d'un aperçu complet (mesurée le 06/12/2026 dans les
   quatre styles, du téléphone au grand écran : 135 px, 127 en Magazine, 126 en Éditorial). Ni son attente, ni son
   arrivée, ni un sujet aux boîtes plus courtes, ni un échec du chargement ne poussent la suite (docs/AFFICHAGE.md). */
.ex-attend { min-height: 120px; }
.ex-paresseux { height: 135px; min-height: 0; contain-intrinsic-height: auto 135px; }
:root[data-style="m"] .ex-paresseux { height: 127px; contain-intrinsic-height: auto 127px; }
:root[data-style="e"] .ex-paresseux { height: 126px; contain-intrinsic-height: auto 126px; }
.ex-btn-fin { font: inherit; font-size: 13px; padding: 4px 12px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; }
.ex-btn-fin:disabled { opacity: .45; cursor: default; }
.ex-dlg { width: min(960px, 94vw); max-height: 88vh; overflow: auto; border: 1px solid var(--bord); border-radius: 10px; padding: 14px 18px; font-size: 13px; color: var(--texte); background: var(--carte, #fff); }
.ex-dlg::backdrop { background: rgba(20, 30, 40, .35); }
.ex-dlg h2 { font-size: 17px; margin: 0 0 4px; }
.ex-dlg-cols { columns: 3 250px; column-gap: 18px; margin-top: 8px; }
.ex-dlg-dom { break-inside: avoid; border: 0; margin: 0 0 10px; padding: 0; min-width: 0; }
.ex-dlg-dom legend { padding: 0; }
.ex-dlg-d { font-weight: 700; display: block; }
.ex-dlg-s { display: block; padding-left: 18px; line-height: 1.55; font-size: 12.5px; }
.ex-dlg-pied { display: flex; gap: 14px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--bord); }
.ex-dlg-nb { color: var(--texte-doux); margin-right: auto; }
.ex-dlg-favp { display: block; margin-top: 8px; font-size: 12px; color: var(--texte-doux); }
.ex-dlg-fav { color: var(--accent); font-weight: 600; }
.ex-suivant h1 { font-size: 20px; }

/* Sans JavaScript, les outils (découverte, effacer l'historique) ne servent pas : groupe caché. Avec JavaScript, il est
   écrit visible par le serveur (src/explorer.php) et ne paraît plus après coup (docs/AFFICHAGE.md). */
html:not(.pn-js) .ex-outils { display: none; }
