:root {
  --vignette-min: 160px;
}

/* --- Thème : jetons de couleur ---
   Toute couleur propre à l'application passe par ces variables (ou par celles
   de Bulma) : le mode sombre, en fin de fichier, ne fait que les redéfinir.
   Une couleur écrite en dur dans une règle est un bogue d'affichage en puissance
   dans l'autre thème. */
:root {
  --fond-page: var(--bulma-scheme-main-bis);
  --teinte-lien: var(--bulma-link-95, #eef1ff);
  --filet-lien: var(--bulma-link-80, #c5ceff);
  --teinte-primaire: var(--bulma-primary-95, var(--bulma-scheme-main-ter));
  --teinte-danger: var(--bulma-danger-95, #fdecec);
  --focus-lien: rgba(66, 88, 255, .25);
  --infobulle-fond: rgba(20, 22, 26, .95);
  --infobulle-texte: #fff;
  --infobulle-ombre: none;
  --ombre-legere: 0 1px 3px rgba(0, 0, 0, .2);
  --ombre-survol: 0 6px 16px rgba(0, 0, 0, .22);
  --ombre-carte-survol: 0 4px 14px rgba(0, 0, 0, .12);
  --ombre-outil: 0 1px 3px rgba(0, 0, 0, .15);
  --ombre-flottante: 0 8px 24px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
  --ombre-panneau: 0 10px 30px rgba(0, 0, 0, .35);
  --pastille-case: rgba(255, 255, 255, .92);
  --ombre-pastille: 0 1px 4px rgba(0, 0, 0, .3);
  /* Pastille « Publié » d'un ZIP publié en mode rapide (bleu, posée sur la couverture). */
  --pastille-rapide: rgba(32, 96, 190, .92);
  /* Pastille « Programmé » : publié, visible dans le kiosque la veille de la parution à 17 h. */
  --pastille-programme: rgba(112, 72, 190, .92);
  --surlignage: #fff1a8;
  --non-place-fond: #fff7d6;
  --non-place-trait: #f0b400;
  --zone-lien: 72 95 199;
  --zone-brouillon: 255 183 15;
  --barre-app-fond: #16181d;
  --fond-logo: transparent;
  /* Coloration syntaxique (aperçu du ZIP, classes highlight.js) */
  --code-fond: var(--bulma-scheme-main-bis);
  --code-texte: var(--bulma-text-strong);
  --code-numero: var(--bulma-text-weak);
  --code-cle: #0550ae;
  --code-chaine: #0a7a3d;
  --code-nombre: #b35900;
  --code-litteral: #8250df;
  --code-mot-cle: #cf222e;
  --code-commentaire: #6e7781;
  --code-balise: #116329;
  --etat-info-fond: var(--bulma-info-light, #eff5fb);
  --etat-info-texte: var(--bulma-info-dark, #1d72aa);
  --etat-attente-fond: var(--bulma-warning-light, #fffaeb);
  --etat-attente-texte: var(--bulma-warning-dark, #946c00);
  --etat-ecart-fond: hsl(28, 100%, 93%);
  --etat-ecart-texte: hsl(24, 85%, 38%);
  --etat-succes-fond: var(--bulma-success-light, #effaf5);
  --etat-succes-texte: var(--bulma-success-dark, #257953);
  --etat-danger-fond: var(--bulma-danger-light, #feecf0);
  --etat-danger-texte: var(--bulma-danger-dark, #cc0f35);
}

body { min-height: 100vh; background: var(--fond-page); }

.notif-flottante {
  position: fixed; top: 1rem; right: 1rem; z-index: 100;
  max-width: min(420px, calc(100vw - 2rem));
  box-shadow: var(--bulma-shadow);
}

/* --- Accueil --- */
.grille-magazines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.carte-magazine { display: flex; flex-direction: column; height: 100%; transition: transform .15s, box-shadow .15s; }
.carte-magazine:hover { transform: translateY(-3px); box-shadow: var(--bulma-shadow); }
.carte-magazine .couverture {
  aspect-ratio: 210 / 297; background: var(--bulma-scheme-main-ter);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--bulma-card-radius) var(--bulma-card-radius) 0 0;
}
.carte-magazine .couverture img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: inherit; }
.carte-magazine .couverture .icone-vide { font-size: 3rem; opacity: .35; }
/*
 * Image en cours de chargement, sans JavaScript : un anneau qui tourne derrière l'image (pseudo-élément du cadre),
 * que l'image recouvre dès qu'elle est peinte. Cards de l'accueil, vignettes des pages, couverture de l'en-tête.
 */
:is(.carte-magazine .couverture, .vignette .cadre, .couverture-magazine):has(> img) { position: relative; }
:is(.carte-magazine .couverture, .vignette .cadre, .couverture-magazine):has(> img)::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 1.75rem; height: 1.75rem; margin: -.875rem 0 0 -.875rem;
  border: 3px solid var(--bulma-border); border-top-color: var(--bulma-link); border-radius: 50%;
  animation: chargement-image .8s linear infinite; z-index: 0; pointer-events: none;
}
:is(.carte-magazine .couverture, .vignette .cadre, .couverture-magazine) > img { position: relative; z-index: 0; }
@keyframes chargement-image { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :is(.carte-magazine .couverture, .vignette .cadre, .couverture-magazine):has(> img)::before { animation-duration: 2.4s; }
}
.carte-magazine .card-content { flex: 1; padding: 1rem; }

/* Accueil : case de sélection des cartes (hors du lien, en haut à droite de la couverture : les
   pastilles d'origine et de publication sont à gauche). Discrète tant que rien n'est coché,
   comme les cases de la mosaïque, toujours visible au toucher. */
.carte-accueil { position: relative; display: flex; flex-direction: column; }
.carte-accueil > .carte-magazine { flex: 1; }
.carte-accueil:hover, .carte-accueil:focus-within { z-index: 3; }
/* Numéro manquant dans la séquence d'un support (vue filtrée) : card fantôme, pointillés, texte centré. */
.carte-fantome .carte-manquante { background: transparent; box-shadow: none; border: 2px dashed var(--bulma-border); }
.carte-fantome .carte-manquante:hover { transform: none; box-shadow: none; }
.carte-fantome .couverture { background: transparent; }
.carte-fantome .texte-manquant { text-align: center; color: var(--bulma-text-weak); line-height: 1.5; padding: 0 .5rem; }
.carte-accueil > .case-carte {
  position: absolute; top: .4rem; right: .4rem; z-index: 4; display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 6px; cursor: pointer; user-select: none;
  background: var(--pastille-case); box-shadow: var(--ombre-pastille);
  opacity: 0; transition: opacity .12s, transform .15s;
}
.case-carte input { width: 1.05rem; height: 1.05rem; cursor: pointer; accent-color: var(--bulma-link); }
.carte-accueil:hover .case-carte, .case-carte:focus-within, .en-selection .case-carte { opacity: 1; }
.carte-accueil:hover .case-carte { transform: translateY(-3px); }
.carte-accueil:hover > .carte-magazine { transform: translateY(-3px); box-shadow: var(--bulma-shadow); }
@media (hover: none) { .carte-accueil > .case-carte { opacity: 1; } }
.carte-accueil.selectionnee > .carte-magazine { outline: 3px solid var(--bulma-link); outline-offset: 2px; }
/* Carte non publiée estompée : la case et le contour de sélection, eux, restent nets. */
#liste .carte-accueil.selectionnee > .carte-magazine.non-publie { opacity: .8; filter: none; }

/* Accueil : barre des actions en lot, collante au-dessus de la grille. */
.barre-lot {
  position: sticky; top: .5rem; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .75rem;
  margin: 0 0 1rem; padding: .3rem .5rem; border-radius: var(--bulma-radius-large);
  background: var(--bulma-scheme-main-bis); box-shadow: 0 0 0 1px var(--bulma-border-weak);
}
.barre-lot .tout-rien { display: flex; align-items: center; gap: .5rem; min-height: 2rem; padding: .25rem .35rem; cursor: pointer; user-select: none; }
.barre-lot .tout-rien input { width: 1.05rem; height: 1.05rem; cursor: pointer; accent-color: var(--bulma-link); }
.barre-lot .tout-rien[data-tooltip]:hover::after { left: 0; transform: none; }
.barre-lot .compte-lot { font-size: .85rem; font-weight: 600; color: var(--bulma-text-weak); }
.barre-lot:has(#lot-tout:checked, #lot-tout:indeterminate) .compte-lot { color: var(--bulma-link); }
.barre-lot .progression-lot { font-size: .85rem; color: var(--bulma-text-weak); }
.barre-lot .outils-lot { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem; margin-left: auto; }
.barre-lot .separateur { width: 1px; height: 1.2rem; margin: 0 .2rem; background: var(--bulma-border); }
/* Bouton « … » : vue détaillée des actions (icône et texte court), sur toute la largeur sous la case tout / rien. */
.barre-lot .texte-outil-lot { display: none; }
/* Info-bulles des actions en lot : libellé, explication, puis à qui l'action s'applique, sur plusieurs lignes. */
.barre-lot .outils-lot .outil-article[data-tooltip]:hover::after, .barre-lot .outils-lot .outil-article[data-tooltip]:focus-visible::after {
  white-space: pre-line; width: max-content; max-width: min(24rem, calc(100vw - 2rem)); text-align: left;
}
.barre-lot .bouton-detail-lot { flex: none; }
/* Recherche dans les actions : vue détaillée seulement, à gauche du bouton « … » ; résultats mis en avant, rien masqué. */
.barre-lot .recherche-actions-lot { display: none; margin: 0; }
.barre-lot.detaillee .recherche-actions-lot { display: block; margin-left: auto; flex: 0 1 16rem; min-width: 0; }
.barre-lot.detaillee .recherche-actions-lot + .bouton-detail-lot { margin-left: 0; }
/* Pâlies par la couleur (jamais par opacity : l'info-bulle pâlirait aussi). */
.barre-lot .outils-lot.en-recherche .outil-article:not(.correspond):not(:disabled) { color: color-mix(in srgb, var(--bulma-text) 45%, transparent); }
.barre-lot .outils-lot .outil-article.correspond { background: var(--teinte-lien); box-shadow: inset 0 0 0 1px var(--filet-lien); color: var(--bulma-link); }
.barre-lot .outils-lot .outil-article.correspond:disabled { color: color-mix(in srgb, var(--bulma-link) 55%, transparent); }
.barre-lot .texte-outil-lot mark { background: var(--surlignage); color: inherit; padding: 0 .05em; border-radius: 2px; }
.barre-lot.detaillee .bouton-detail-lot { margin-left: auto; }
.barre-lot.detaillee .outils-lot {
  order: 3; flex: 1 1 100%; margin: 0 0 .2rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .2rem .35rem;
}
.barre-lot.detaillee .outils-lot .separateur { display: none; }
.barre-lot.detaillee .outils-lot .outil-article {
  width: auto; height: auto; min-height: 2.1rem; justify-content: flex-start; gap: .55rem; padding: .3rem .6rem; text-align: left;
}
.barre-lot .icone-outil-lot { display: inline-flex; align-items: center; }
.barre-lot.detaillee .outils-lot .icone-outil-lot { flex: none; min-width: 1.25rem; justify-content: center; }
.barre-lot.detaillee .texte-outil-lot { display: inline; font-size: .85rem; line-height: 1.25; }
/* Mode rapide : petit éclair en indice de l'icône (Publier, Reconstruire le ZIP). */
.outil-article .indice-rapide { position: relative; margin: .55rem 0 0 -.3rem; font-size: .6rem; }
.bilan-lot { position: relative; padding-right: 2.5rem; }
.bilan-lot .bulle-fermer { position: absolute; top: .5rem; right: .5rem; }
.bilan-lot details { margin-top: .25rem; }
.bilan-lot summary { cursor: pointer; font-weight: 600; }
.bilan-lot ul { margin: .25rem 0 0 1.25rem; list-style: disc; }
.bilan-lot li { overflow-wrap: anywhere; }

.suivi .progress { margin-bottom: 0; }
/* Liste des traitements bornée : un lot d'imports ne repousse pas la grille des magazines. */
#suivi-liste { max-height: 18rem; overflow-y: auto; padding-right: .5rem; }
.suivi li + li { margin-top: .75rem; }
/* Liste des articles qui bloquent la publication bornée : le titre et « Extraire ces articles » restent visibles. */
#blocage-publication-liste { max-height: 12rem; overflow-y: auto; padding-right: .5rem; }
.liste-bloquants { list-style: none; margin-left: 0; }
.liste-bloquants li { margin-bottom: .2rem; }
.liste-bloquants input[type="checkbox"] { margin-right: .35rem; vertical-align: middle; }
/* Pages en double (modale « Retirer les pages en double » de magazine.html) : doublon puis page d'origine. */
.liste-doublons { list-style: none; margin-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.liste-doublons li { border: 1px solid var(--bulma-border); border-radius: 6px; padding: .4rem; }
.liste-doublons label { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.liste-doublons figure { margin: 0; text-align: center; font-size: .75rem; }
.liste-doublons img { display: block; width: 4.5rem; height: auto; border: 1px solid var(--bulma-border); }
.liste-doublons .vers { color: var(--bulma-text-weak); }

/* --- Mosaïque --- */
.mosaique {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--vignette-min), 1fr));
  gap: 1.25rem 1rem;
  align-items: end;
}
.mosaique .vignette { display: block; cursor: zoom-in; color: inherit; }
.mosaique .cadre {
  background: var(--bulma-scheme-main-ter);
  box-shadow: var(--ombre-legere);
  transition: transform .15s, box-shadow .15s;
}
.mosaique .vignette:hover .cadre,
.mosaique .vignette:focus-visible .cadre { transform: translateY(-3px); box-shadow: var(--ombre-survol); }
.mosaique img { display: block; width: 100%; height: 100%; }
.mosaique .numero-page { display: block; text-align: center; font-size: .8rem; color: var(--bulma-text-weak); margin-top: .35rem; }

/* Sélection : la case reste discrète tant que rien n'est coché, puis toutes
   s'affichent : on est alors « en sélection ». Toujours visible au toucher,
   faute de survol. */
.mosaique .cadre { position: relative; }
.mosaique .case {
  position: absolute; top: .4rem; left: .4rem; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 6px; cursor: pointer;
  background: var(--pastille-case); box-shadow: var(--ombre-pastille);
  opacity: 0; transition: opacity .12s;
}
.mosaique .case input { width: 1.05rem; height: 1.05rem; cursor: pointer; accent-color: var(--bulma-link); }
.mosaique .vignette:hover .case,
.mosaique .vignette:focus-visible .case,
.mosaique.en-selection .case { opacity: 1; }
@media (hover: none) { .mosaique .case { opacity: 1; } }
.mosaique .vignette.selectionnee .cadre { outline: 3px solid var(--bulma-link); outline-offset: 2px; }
.mosaique .vignette.selectionnee .numero-page { color: var(--bulma-link); font-weight: 700; }
.mosaique .vignette.surlignee .cadre { outline: 3px solid var(--bulma-warning); outline-offset: 2px; }

.barre-actions {
  position: sticky; top: .5rem; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem;
  margin-bottom: 1rem; padding: .5rem .75rem;
  /* Teinte posée sur le fond de page : opaque même en sombre (--teinte-lien y est translucide), barre collante sur les vignettes. */
  background: linear-gradient(var(--teinte-lien), var(--teinte-lien)), var(--bulma-scheme-main); border: 1px solid var(--filet-lien);
  border-radius: var(--bulma-radius-large); box-shadow: var(--bulma-shadow);
}
.barre-actions .buttons { margin-bottom: 0; }
.barre-actions .buttons .button { margin-bottom: 0; }
.barre-actions .case-tout-pages { display: inline-flex; align-items: center; gap: .5rem; }
.barre-actions .outils-pages { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.barre-actions .separateur { width: 1px; height: 1.2rem; margin: 0 .2rem; background: var(--bulma-border); }
.barre-actions #rotation-auto-avancement { flex-basis: 100%; margin: 0; }

/* --- Articles (barre latérale et page d'article) --- */
.laterale { position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow-y: auto; }
.laterale li + li { margin-top: .25rem; }
.laterale .groupe {
  display: flex; gap: .65rem; align-items: flex-start; padding: .4rem; border-radius: var(--bulma-radius);
  color: inherit;
}
.laterale .groupe:hover { background: var(--bulma-scheme-main-bis); }
.laterale .groupe img, .laterale .groupe .sans-image {
  flex: none; width: 2.6rem; aspect-ratio: 210 / 297; object-fit: cover; object-position: top;
  box-shadow: var(--ombre-legere); background: var(--bulma-scheme-main-ter);
}
.laterale .groupe-titre { display: block; font-weight: 600; line-height: 1.25; }
.laterale .groupe-pages { display: block; font-size: .75rem; color: var(--bulma-text-weak); margin-top: .15rem; }

.apercu-pages { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; }
.apercu-pages img { height: 110px; flex: none; box-shadow: var(--ombre-legere); }
/* « Ajouter à un article existant » (magazine.js) : un bouton par article, vignette, titre et pages. */
.liste-ajout-groupe { display: flex; flex-direction: column; gap: .35rem; max-height: 45vh; overflow-y: auto; }
.bouton-ajout-groupe {
  display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 40px; padding: .4rem .6rem; text-align: left;
  border: 1px solid var(--bulma-border); border-radius: 8px; background: var(--bulma-scheme-main); color: inherit; cursor: pointer;
}
.bouton-ajout-groupe:hover:not(:disabled) { border-color: var(--bulma-link); }
.bouton-ajout-groupe:disabled { cursor: not-allowed; color: var(--bulma-text-weak); }
.bouton-ajout-groupe.is-loading { opacity: .7; pointer-events: none; }
.bouton-ajout-groupe img, .bouton-ajout-groupe .vignette-vide { width: 40px; height: 52px; flex: none; object-fit: cover; background: var(--bulma-border); }
.bouton-ajout-groupe .ajout-groupe-texte { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bouton-ajout-groupe .ajout-groupe-texte strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }

.logo-groupe .logo-support { height: 1.75rem; max-width: 240px; }
/* Descriptif d'un groupe (texte de son entrée du sommaire) sous le titre de groupe.html : double-clic pour le modifier. */
.descriptif-groupe {
  max-width: 48rem; margin: -1rem 0 1rem; color: var(--bulma-text-weak); white-space: pre-line; overflow-wrap: anywhere;
  border-radius: 4px; outline: 1px dashed transparent; outline-offset: 3px; transition: outline-color .15s;
}
.descriptif-groupe:hover { outline-color: var(--bulma-border); }
.descriptif-groupe[contenteditable] { cursor: text; outline: 2px solid var(--bulma-link); color: var(--bulma-text); }

/* --- Visionneuse --- */
.visionneuse .modal-content {
  width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0;
  display: flex; align-items: center; justify-content: center; padding: 3.5rem 4rem;
}
/* La scène épouse exactement l'image : les zones de liens, en pourcentages,
   s'y superposent au pixel près quelle que soit la taille d'affichage. */
.visionneuse .page-scene { position: relative; line-height: 0; }
.visionneuse .v-image {
  display: block; max-width: calc(100vw - 8rem); max-height: calc(100vh - 7rem); object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff; user-select: none; -webkit-user-drag: none;
}
.visionneuse .calque-liens { position: absolute; inset: 0; }
/* Zoom au double clic (mosaique.js) : image et liens agrandis ensemble, coupés au cadre de la page. */
.visionneuse .page-scene { overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.visionneuse .page-scene :is(.v-image, .calque-liens) {
  transform: scale(var(--zoom, 1)); transform-origin: var(--zoom-origine, 50% 50%); transition: transform .2s ease;
}
.visionneuse .page-scene.zoomee { cursor: grab; touch-action: none; }
.visionneuse .page-scene.zoomee:active { cursor: grabbing; }
.visionneuse .page-scene.glisse :is(.v-image, .calque-liens) { transition: none; }
.visionneuse .nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 45;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.6rem; cursor: pointer;
}
.visionneuse .nav:hover { background: rgba(255, 255, 255, .3); }
.visionneuse .nav:disabled { opacity: .2; cursor: default; }
.visionneuse .nav:disabled::after { display: none; }
.visionneuse .precedente[data-tooltip]:hover::after { left: 0; transform: none; }
.visionneuse .suivante[data-tooltip]:hover::after { left: auto; right: 0; transform: none; }
.visionneuse .precedente { left: 1rem; }
.visionneuse .suivante { right: 1rem; }
.visionneuse .barre {
  position: fixed; top: 0; left: 0; right: 0; z-index: 46; height: 3.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem; color: #fff;
}
.visionneuse .barre a { color: #fff; text-decoration: underline; font-size: .9rem; }
/* La barre couvre toute la largeur : sans cela elle intercepte le clic sur la
   croix de fermeture, placée dessous. */
.visionneuse .barre { pointer-events: none; }
.visionneuse .barre a, .visionneuse .barre button { pointer-events: auto; }
.visionneuse .modal-close { z-index: 46; }
/* Panneau « Texte de la page » (mosaique.js) : blocs de texte du PDF, défilants, à droite de la page ; petit et discret
   (un repère, pas une lecture), blocs coupés à 4 lignes (« … ») et dépliés d'un clic ; survol : bloc encadré sur la page.
   Visionneuse toujours sombre : couleurs fixes assumées. La page se réduit pour lui laisser la place ; absent sous 900 px. */
.visionneuse { --largeur-textes: min(24rem, 26vw); }
.visionneuse .panneau-textes {
  position: fixed; top: 3.75rem; right: 1rem; bottom: 1rem; z-index: 44; width: var(--largeur-textes);
  display: flex; flex-direction: column; border-radius: 6px; background: rgba(20, 16, 32, .88);
  border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .72);
}
.visionneuse .entete-textes {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .6rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.visionneuse .tout-blocs { display: flex; align-items: center; gap: .45rem; cursor: pointer; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visionneuse .copier-selection-blocs { white-space: nowrap; flex: none; }
.visionneuse .copier-selection-blocs {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .5rem; border-radius: 4px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; text-transform: none;
}
.visionneuse .actions-blocs { display: flex; gap: .3rem; }
.modale-copie-intelligente { width: min(48rem, calc(100vw - 2rem)); }
.modale-copie-intelligente .ci-texte { font-size: .9rem; line-height: 1.5; max-height: none; min-height: 18rem; resize: vertical; }
.visionneuse .arranger-blocs.is-loading i { animation: fa-spin 1s linear infinite; }
.visionneuse .arranger-blocs.is-loading i::before { content: "\f110"; }
.visionneuse .copier-selection-blocs:disabled { color: rgba(255, 255, 255, .35); border-color: rgba(255, 255, 255, .1); cursor: default; }
.visionneuse .liste-textes { flex: 1; overflow-y: auto; padding: .6rem; }
/* Un bloc : sa propre hauteur (texte coupé à 4 lignes compris), un peu de marge, filet léger. */
.visionneuse .bloc-texte {
  position: relative; margin: 0 0 .6rem; padding: .45rem 3.6rem .55rem .55rem; min-height: 2.1rem; border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .03);
}
.visionneuse .bloc-texte:hover, .visionneuse .bloc-texte:focus-within { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .07); }
/* Case et outils du bloc posés en haut à droite, dans la marge droite réservée du bloc (le texte ne passe jamais dessous), sans fond : en fantôme hors
   survol, pleins au survol ou une fois la case cochée. */
.visionneuse .outils-bloc {
  position: absolute; top: .35rem; right: .35rem; display: flex; align-items: center; gap: .15rem;
  padding: 0 .2rem; opacity: .3; transition: opacity .12s;
}
.visionneuse .bloc-texte:is(:hover, :focus-within) .outils-bloc { opacity: 1; }
.visionneuse .bloc-texte:has(.coche-bloc:checked) .outils-bloc { opacity: 1; }
.visionneuse .bloc-texte:has(.coche-bloc:checked) { border-color: rgba(240, 180, 0, .55); }
.visionneuse .coche-bloc { margin: 0; cursor: pointer; }
.visionneuse .copier-bloc {
  padding: 0 .3rem; line-height: 1.3rem; border: 0; border-radius: 3px; background: none; color: rgba(255, 255, 255, .45); cursor: pointer; font-size: .7rem;
}
.visionneuse .copier-bloc:hover, .visionneuse .copier-bloc:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }
.visionneuse .texte-bloc {
  margin: 0; font-size: .7rem; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; cursor: pointer;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.visionneuse .bloc-texte.deplie .texte-bloc { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.visionneuse .texte-bloc:focus-visible { outline: none; color: #fff; }
.visionneuse .vide-textes { font-size: .78rem; color: rgba(255, 255, 255, .55); margin: .25rem 0 .6rem; }
.visionneuse .page-scene .surlignage-bloc {
  position: absolute; pointer-events: none; border: 2px solid #f0b400; background: rgba(240, 180, 0, .14); border-radius: 2px;
  transform: scale(var(--zoom, 1)); transform-origin: var(--zoom-origine, 50% 50%);
}
.visionneuse.avec-textes .modal-content { padding-right: calc(var(--largeur-textes) + 2rem); }
.visionneuse.avec-textes .v-image { max-width: calc(100vw - 8rem - var(--largeur-textes)); }
.visionneuse.avec-textes .suivante { right: calc(var(--largeur-textes) + 2rem); }
@media (max-width: 900px) {
  .visionneuse .panneau-textes, .visionneuse .v-textes { display: none; }
  .visionneuse.avec-textes .modal-content { padding-right: 4rem; }
  .visionneuse.avec-textes .v-image { max-width: calc(100vw - 8rem); }
  .visionneuse.avec-textes .suivante { right: 1rem; }
}

@media (max-width: 600px) {
  .visionneuse .modal-content { padding: 3.5rem .5rem; }
  .visionneuse .v-image { max-width: calc(100vw - 1rem); }
  .visionneuse .nav { top: auto; bottom: 1rem; transform: none; }
  .visionneuse .nav[data-tooltip]:hover::after { top: auto; bottom: calc(100% + 6px); }
}

/* --- Zone de dépôt --- */
.depot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; min-height: 260px; padding: 2rem; text-align: center; cursor: pointer;
  border: 3px dashed var(--bulma-border); border-radius: var(--bulma-radius-large);
  background: var(--bulma-scheme-main);
  transition: border-color .15s, background-color .15s;
}
.depot:hover, .depot:focus-visible, .depot.survol {
  border-color: var(--bulma-primary); background: var(--teinte-primaire); outline: none;
}
.depot .depot-icone { font-size: 3rem; line-height: 1; margin-bottom: .5rem; }

.fichier-choisi { display: flex; align-items: center; gap: 1rem; }
.fichier-choisi .depot-icone { font-size: 2rem; }
.fichier-infos { min-width: 0; }
.fichier-infos p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Mode « Pages séparées » de nouveau.html : ordre des fichiers fusionnés. */
.mode-depot { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center; }
.mode-depot .radio { margin-inline-start: 0; }
.depot-fusion { width: min(100%, 24rem); }
.fichier-fusion summary { cursor: pointer; color: var(--bulma-text-weak); }
.fichier-fusion ol { max-height: 12rem; overflow-y: auto; margin: .25rem 0 0 1.5rem; list-style: decimal; }
.fichier-fusion li { overflow-wrap: anywhere; }
.fichier-infos p#fichier-immanens { white-space: normal; }

/* Création de plusieurs magazines (nouveau.js) : assistant et liste du lot */
#form:not(.lot-actif) .lot-seul, #form.lot-actif .unitaire-seul { display: none; }
.lot-etape { font-weight: 600; color: var(--bulma-text-weak); }
.boutons-assistant #precedent[disabled] { opacity: 1; color: var(--bulma-text-weak); }
.lot-entete { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.lot-entete #ajouter { margin-left: auto; }
.lot-liste { list-style: none; margin: 0; padding: 0; }
.lot-fichier { border-top: 1px solid var(--bulma-border-weak); padding: .4rem .25rem; }
.lot-fichier:first-child { border-top: 0; }
.lot-fichier.is-courant { background: var(--teinte-primaire); border-radius: var(--bulma-radius); }
.lot-ligne { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.lot-choisir {
  display: flex; align-items: center; gap: .6rem; flex: 1 1 auto; min-width: 0; min-height: 40px;
  padding: 0 .25rem; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
button.lot-choisir { cursor: pointer; }
button.lot-choisir:hover .lot-nom { color: var(--bulma-link); }
.lot-rang {
  flex: none; min-width: 1.6rem; height: 1.6rem; line-height: 1.6rem; border-radius: 999px; text-align: center;
  font-size: .75rem; font-weight: 600; background: var(--bulma-scheme-main-ter); color: var(--bulma-text-strong);
}
.lot-texte { display: flex; flex-direction: column; min-width: 0; }
.lot-nom, .lot-details { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-nom { font-weight: 600; }
.lot-details { font-size: .75rem; color: var(--bulma-text-weak); }
.lot-ligne .tag { flex: none; }
.lot-barre { margin: .25rem 0 .1rem 2.4rem; width: calc(100% - 2.4rem); }
.lot-erreur { margin-left: 2.4rem; }
.lot-actions { margin: .25rem 0 0 2.4rem; }
.lot-actions .button { margin-bottom: 0; }
.lot-fin { border-top: 1px solid var(--bulma-border-weak); padding-top: .75rem; margin-top: .5rem; }

/* --- Logos des titres --- */
.logo-support { display: block; object-fit: contain; object-position: left center; }
/* Logo SVG en symbole (commun.js) : couleur du texte autour s'il est monochrome ; place tenue par un <img> invisible pendant le chargement. */
svg.logo-support { fill: currentColor; }
.logo-support.logo-attente { visibility: hidden; }
.entete-magazine .logo-support { height: 3rem; max-width: min(360px, 100%); }
.title.entete-magazine:not(:last-child) { margin-bottom: .75rem; }
/* Titre et état de publication sur une ligne ; la marge du titre passe au conteneur (le sous-titre suit). */
.titre-et-etat { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .75rem; }
.titre-et-etat .title.entete-magazine { margin-bottom: 0; }
.titre-et-etat + .subtitle { margin-top: 0; }
/* Titre de couverture, entre le logo et la ligne « n° · date · pages ». */
.titre-couverture-magazine { font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--bulma-text-strong); margin: -.25rem 0 .5rem; overflow-wrap: anywhere; }
.titre-couverture-magazine + .subtitle { margin-top: 0; }
/* Suppléments (magazine.html) : lien vers le magazine principal, ou vers les suppléments du numéro. */
.liens-supplements { margin: -.25rem 0 .5rem; color: var(--bulma-text-weak); overflow-wrap: anywhere; }
.liens-supplements + .subtitle { margin-top: 0; }
/* Titre de couverture dans la card de l'accueil, sous le logo ; « Sans titre » atténué. */
.titre-couverture-carte { font-size: .8rem; font-weight: 600; line-height: 1.3; color: var(--bulma-text-strong); margin-bottom: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.titre-couverture-carte.sans-titre { font-weight: 400; font-style: italic; color: var(--bulma-text-weak); opacity: .7; }
.entete-magazine + .subtitle { margin-top: 0; }
.couverture-magazine {
  flex: none; display: block; height: 6.75rem; margin-right: 1rem;
  box-shadow: var(--ombre-legere); transition: box-shadow .15s, transform .15s;
}
.couverture-magazine:hover, .couverture-magazine:focus-visible { box-shadow: var(--ombre-survol); transform: translateY(-2px); }
/* Couverture et couvertures des suppléments (magazine.html) : le bloc a la largeur de la couverture du numéro. */
.couvertures-magazine { flex: none; position: relative; display: flex; flex-direction: column; gap: .4rem; width: max-content; margin: 0 1rem 0 0; }
.couvertures-magazine.avec-supplement-seul { margin-right: 1.5rem; }
.couvertures-magazine:has(> .couverture-magazine.is-hidden) { display: none; }
.couvertures-magazine .couverture-magazine { margin-right: 0; }
/* Plusieurs : grille de deux colonnes sous la couverture, sans élargir le bloc (largeur nulle étirée à 100 %). */
.couvertures-supplements { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; width: 0; min-width: 100%; }
/* Un seul : en surimpression sur le coin bas droit, moitié de la largeur de la couverture. */
.couvertures-supplements.seul { display: block; position: absolute; right: -.6rem; bottom: -.6rem; width: 50%; min-width: 0; z-index: 2; }
.couverture-supplement {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: var(--bulma-radius-small);
  background: var(--bulma-scheme-main-ter); color: var(--bulma-text-weak); box-shadow: 0 0 0 2px var(--bulma-scheme-main), var(--ombre-legere);
  transition: box-shadow .15s, transform .15s;
}
.couverture-supplement:has(> img) { aspect-ratio: auto; background: none; }
.couverture-supplement img { display: block; width: 100%; height: auto; border-radius: var(--bulma-radius-small); }
.couverture-supplement:hover, .couverture-supplement:focus-visible { box-shadow: 0 0 0 2px var(--bulma-scheme-main), var(--ombre-survol); transform: translateY(-2px); }
/* Le rayon est sur l'image, jamais en overflow:hidden sur le lien : ça couperait sa bulle d'aide. */
.couverture-magazine img { display: block; height: 100%; width: auto; border-radius: var(--bulma-radius); }
/* En-tête d'un numéro (magazine.html) : le bloc titre garde au moins 22 rem (jamais de mot coupé lettre à lettre),
   les actions passent à la ligne dessous, calées à droite, quand la place manque ; couverture à côté du titre tant
   qu'il reste 12 rem au texte, sinon au-dessus, à sa largeur (jamais un cadre vide sur toute la ligne). Le groupe
   des actions de publication se fond dans la rangée (display: contents) : tous les boutons s'enchaînent d'un bloc. */
.level.entete-numero:not(.is-mobile) { flex-wrap: wrap; }
.level.entete-numero:not(.is-mobile) > .level-left { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; row-gap: .75rem; flex: 1 1 22rem; min-width: min(22rem, 100%); }
.level.entete-numero:not(.is-mobile) > .level-left > div { flex: 1 1 12rem; min-width: 0; }
.level.entete-numero:not(.is-mobile) > .level-right { flex: 0 1 auto; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: .5rem; min-width: 0; max-width: 100%; margin-left: auto; }
.entete-numero .publication-magazine { display: contents; }
.entete-numero #etat-zip-rapide { margin-top: .5rem; }

.titre-carte .logo-support { height: 1.6rem; max-width: 100%; }
.titre-suivi .logo-support { display: inline-block; height: 1em; vertical-align: -.1em; }

/* --- Sélecteurs (Tom Select aux dimensions de Bulma) --- */
.ts-wrapper .ts-control,
.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control {
  min-height: var(--bulma-control-height, 2.5em); padding: .45rem .75rem;
  border-color: var(--bulma-border); border-radius: var(--bulma-radius); font-size: 1rem;
  background: var(--bulma-scheme-main); background-image: none; box-shadow: none;
}
.ts-wrapper .ts-control input { font-size: 1rem; }
.ts-wrapper.focus .ts-control { border-color: var(--bulma-link); box-shadow: 0 0 0 .125em var(--focus-lien); }
/* Au-dessus des modales Bulma (z-index 40). */
.ts-dropdown { z-index: 60; font-size: 1rem; }
.option-titre { display: flex; align-items: center; gap: .75rem; }
/* Logo seul (nom en alt), nom à défaut : largeur libre pour rester lisible. */
.option-titre :is(img, svg) { width: auto; max-width: 160px; height: 24px; object-fit: contain; object-position: left center; flex: none; }
.option-titre .nom-option-titre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Le bloc d'état montre la progression ou l'erreur : les marges ne valent
   qu'entre deux éléments visibles. */
#bloc-etat > :not(.is-hidden) ~ :not(.is-hidden) { margin-top: 1rem; }

/* --- Ordre des articles (glisser-déposer) --- */
.laterale li.article { display: flex; align-items: flex-start; gap: .1rem; }
.laterale li.article .groupe { flex: 1; min-width: 0; }
.laterale .coche-article, .laterale .coche-dossier { flex: none; margin: .75rem .2rem 0 0; cursor: pointer; accent-color: var(--bulma-link); }
.laterale .poignee {
  flex: none; align-self: stretch; display: flex; align-items: center;
  padding: 0 .2rem; cursor: grab; color: var(--bulma-text-weak); font-size: 1.1rem;
  opacity: .35; user-select: none; touch-action: none;
}
.laterale li.article:hover > .poignee, .laterale .dossier-entete:hover > .poignee { opacity: 1; }

.entete-laterale { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .25rem; }
.actions-articles {
  margin: .5rem 0 .75rem; padding: .6rem; border-radius: var(--bulma-radius-large);
  background: var(--teinte-lien); border: 1px solid var(--filet-lien);
}
.actions-articles .buttons { margin-bottom: .4rem; }
.actions-articles .buttons .button { margin-bottom: .25rem; }

/* Un dossier : bandeau puis ses articles en retrait, filet à gauche. */
.laterale li.dossier { margin: .5rem 0; }
.laterale .dossier-entete { display: flex; align-items: flex-start; gap: .1rem; }
.laterale .dossier-lien { flex: 1; min-width: 0; display: block; padding: .4rem; border-radius: var(--bulma-radius); color: inherit; }
.laterale .dossier-lien:hover { background: var(--bulma-scheme-main-bis); }
.laterale .dossier-titre { display: block; font-weight: 700; line-height: 1.25; margin-top: .2rem; }
.laterale .membres { margin-left: 1.4rem; padding-left: .4rem; border-left: 3px solid var(--filet-lien); }

.menu-actions .dropdown-trigger .button { font-weight: 700; letter-spacing: .1em; min-width: 2.75rem; }
.article-dossier + .article-dossier { margin-top: 2.5rem; }
.laterale .poignee:active { cursor: grabbing; }
.laterale .fantome { opacity: .4; background: var(--teinte-lien); border-radius: var(--bulma-radius); }

/* --- Extraction du sommaire --- */
.modal-card.carte-large { width: min(1000px, calc(100vw - 2rem)); }
/* Modale « Éclater en plusieurs groupes » (js/eclatement.js) : sous-groupes en cartes, articles glissables. */
.modale-eclatement .modal-card { width: min(900px, calc(100vw - 2rem)); }
.modale-eclatement .modal-card-foot { flex-wrap: wrap; gap: .5rem; }
.groupe-eclatement + .groupe-eclatement { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--bulma-border); }
.sous-groupes-eclatement { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .75rem; margin-bottom: .75rem; }
.sous-groupe-eclatement { border: 1px solid var(--bulma-border); border-radius: 8px; padding: .5rem; background: var(--bulma-scheme-main); min-width: 0; }
.sous-groupe-eclatement.est-vide { border-style: dashed; }
.entete-sous-groupe { display: flex; gap: .25rem; align-items: center; margin-bottom: .4rem; }
.entete-sous-groupe .input { flex: 1; min-width: 0; font-weight: 600; }
.sous-groupe-eclatement:first-child .reunir-precedent { visibility: hidden; }
.articles-sous-groupe { min-height: 2.5rem; }
.aide-sous-groupe-vide { display: none; text-align: center; padding: .5rem 0; }
.sous-groupe-eclatement.est-vide .aide-sous-groupe-vide { display: block; }
.article-eclatement { display: flex; align-items: center; gap: .5rem; padding: .3rem .25rem; border-radius: 6px; background: var(--bulma-scheme-main-bis); margin-bottom: .3rem; }
.article-eclatement img, .sans-photo-eclatement { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: 4px; }
.sans-photo-eclatement { display: flex; align-items: center; justify-content: center; color: var(--bulma-text-weak); background: var(--bulma-border-weak); }
.poignee-eclatement { cursor: grab; color: var(--bulma-text-weak); padding: .25rem; min-width: 1.5rem; text-align: center; touch-action: none; }
.texte-eclatement { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.surtitre-eclatement { font-size: .65rem; font-weight: 700; text-transform: uppercase; color: var(--bulma-link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titre-eclatement { font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.pages-eclatement { font-size: .7rem; color: var(--bulma-text-weak); }
.texte-eclatement { flex: 1; }
.exclure-article, .apercu-article, .pages-article { flex: none; color: var(--bulma-text-weak); padding-inline: .45rem; }
.article-eclatement .button + .button { margin-left: -.25rem; }
/* Aperçu d'un article par-dessus la modale d'éclatement. */
.modale-apercu-article { z-index: 50; }
/* Visionneuse des pages : au-dessus de l'aperçu, d'où elle peut être ouverte. */
.visionneuse-pages-article { z-index: 51; }
.visionneuse-pages-article .photo-plein-ecran img { max-height: 84vh; }
.modale-apercu-article .modal-card { width: min(760px, calc(100vw - 2rem)); }
.modale-apercu-article .article-web [data-champ-titre] { cursor: text; border-radius: 4px; outline: 1px dashed transparent; outline-offset: 3px; }
.modale-apercu-article .article-web [data-champ-titre]:hover { outline-color: var(--bulma-border); }
.modale-apercu-article .article-web [data-champ-titre]:focus { outline: 2px solid var(--bulma-link); }
.modale-apercu-article .figure-article img { max-height: 50vh; width: auto; max-width: 100%; }
.liste-apercu { margin: 0 0 1rem 1.25rem; }
.mention-exclu { display: none; font-size: .7rem; font-weight: 700; color: var(--etat-danger-texte); }
.article-eclatement.exclu { background: var(--etat-danger-fond); }
.article-eclatement.exclu :is(img, .sans-photo-eclatement) { opacity: .35; }
.article-eclatement.exclu :is(.titre-eclatement, .surtitre-eclatement) { text-decoration: line-through; color: var(--bulma-text-weak); }
.article-eclatement.exclu .mention-exclu { display: block; }
.article-eclatement.exclu .exclure-article { color: var(--etat-danger-texte); }

/* --- Extraction par zones (public/js/zones-articles.js) ------------------------------------------------
 * Modale quasi plein écran (plein écran sous 600 px, règles du bloc « Mobile ») : barre d'outils, mosaïque des pages
 * du groupe avec une couche de tracé par page. Les couleurs des articles (`--zone-1` à `--zone-12`) sont dessinées
 * sur des images de pages : identiques en clair et en sombre, avec bordure pleine pour rester lisibles ; l'interface
 * autour (puces, barre) suit les variables du thème. */
:root {
  --zone-1: #e6194b; --zone-2: #1f77d0; --zone-3: #2ca02c; --zone-4: #f58231; --zone-5: #911eb4; --zone-6: #00a9b5;
  --zone-7: #b5651d; --zone-8: #e0b000; --zone-9: #6a5cff; --zone-10: #ff5fa2; --zone-11: #7cb518; --zone-12: #607d8b;
}
.modal-card.carte-zones { position: relative; width: 96vw; max-width: none; height: 94vh; height: 94dvh; max-height: none; display: flex; flex-direction: column; outline: none; }
.carte-zones .modal-card-head, .carte-zones .modal-card-foot { flex: none; }
.carte-zones .modal-card-foot { justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.zones-outils {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .5rem; padding: .5rem 1rem;
  background: var(--bulma-scheme-main); border-bottom: 1px solid var(--bulma-border-weak, var(--bulma-border));
}
.zones-outils .separateur { width: 1px; height: 1.2rem; background: var(--bulma-border); margin: 0 .2rem; }
.zones-outils .outil-article.actif { background: var(--bulma-scheme-main); box-shadow: var(--ombre-outil); color: var(--bulma-link); }
.zones-compte { margin-left: auto; white-space: nowrap; }
.zones-puces { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.zones-puce {
  display: inline-flex; align-items: center; border: 2px solid var(--zc); border-radius: 999px; background: var(--bulma-scheme-main);
}
.zones-puce.est-active { background: color-mix(in srgb, var(--zc) 22%, var(--bulma-scheme-main)); box-shadow: 0 0 0 2px var(--zc); }
.zones-puce.est-vide { border-style: dashed; }
.zones-puce-choix {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding: .25rem .3rem .25rem .6rem; border: 0; border-radius: 999px 0 0 999px;
  background: transparent; color: var(--bulma-text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.zones-pastille { width: .8rem; height: .8rem; border-radius: 50%; background: var(--zc); flex: none; }
.zones-nb { min-width: 1.1rem; padding: 0 .3rem; border-radius: 999px; background: var(--bulma-background); color: var(--bulma-text-weak); font-size: .7rem; text-align: center; }
.zones-puce-supprimer { min-height: 2rem; padding: 0 .55rem 0 .25rem; border: 0; border-radius: 0 999px 999px 0; background: transparent; color: var(--bulma-text-weak); cursor: pointer; }
.zones-puce-supprimer:hover, .zones-puce-supprimer:focus-visible { color: var(--bulma-danger); }
.carte-zones .modal-card-body.zones-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: .75rem 1rem 1.25rem; }

/* Médiathèque (js/mediatheque.js) : grande modale, onglets, filtres, mosaïque des photos du magazine, dépôt d'une
 * image de l'ordinateur. Plein écran sous 600 px par les règles du bloc « Mobile ». */
.modal-card.carte-mediatheque { width: min(1920px, calc(100vw - 2rem)); max-width: none; height: calc(100vh - 2rem); height: calc(100dvh - 2rem); max-height: none; margin: 0 auto; display: flex; flex-direction: column; }
.carte-mediatheque .modal-card-head, .carte-mediatheque .modal-card-foot, .mediatheque-onglets, .mediatheque-filtres { flex: none; }
.carte-mediatheque .modal-card-foot { justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
/* Modale seulement (pas la page Médiathèque) : en-tête, pied et barres resserrés, toute la hauteur à la mosaïque. */
.modal-card.carte-mediatheque > .modal-card-head { padding: .45rem 1rem; box-shadow: none; border-bottom: 1px solid var(--bulma-border); }
.modal-card.carte-mediatheque > .modal-card-head .modal-card-title { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.modal-card.carte-mediatheque > .modal-card-foot { padding: .4rem 1rem; gap: .5rem; border-top: 1px solid var(--bulma-border); }
.modal-card.carte-mediatheque > .modal-card-foot .buttons { margin: 0; }
.modal-card.carte-mediatheque > .modal-card-foot .buttons .button { margin-bottom: 0; }
.modal-card.carte-mediatheque > .mediatheque-onglets { padding: .2rem 1rem 0; }
.modal-card.carte-mediatheque > .mediatheque-filtres { padding: .35rem 1rem; gap: .4rem; }
.modal-card.carte-mediatheque > .mediatheque-lot { padding: .15rem 1rem; }
.modal-card.carte-mediatheque > .mediatheque-corps { padding: .75rem 1rem; }
.mediatheque-onglets { padding: .5rem 1rem 0; background: var(--bulma-scheme-main); }
.mediatheque-filtres { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1rem; background: var(--bulma-scheme-main); border-bottom: 1px solid var(--bulma-border); }
.mediatheque-recherche { flex: 1 1 16rem; min-width: 0; }
.carte-mediatheque .mediatheque-corps { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.mediatheque-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.mediatheque-photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 0; border: 2px solid var(--bulma-border); border-radius: 6px; background: var(--bulma-scheme-main-bis); cursor: pointer; overflow: hidden; }
.mediatheque-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mediatheque-lot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem 1rem; background: var(--bulma-scheme-main); border-bottom: 1px solid var(--bulma-border); flex: none; }
.mediatheque-lot .tout-rien { display: flex; align-items: center; min-height: 2rem; padding: .25rem .35rem; cursor: pointer; }
.mediatheque-lot .tout-rien input, .mediatheque-coche { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: var(--bulma-link); }
.mediatheque-lot .tout-rien[data-tooltip]:hover::after { left: 0; transform: none; }
/* Bulles de la barre des cochées au-dessus de la mosaïque (cases à cocher des tuiles en position absolue). */
.mediatheque-lot { position: relative; z-index: 2; }
.mediatheque-tuile { position: relative; }
.mediatheque-tuile .mediatheque-photo { width: 100%; }
.mediatheque-coche { position: absolute; top: .4rem; left: .4rem; }
.mediatheque-tuile.cochee .mediatheque-photo { border-color: var(--bulma-link); }
.mediatheque-photo:hover { border-color: var(--bulma-link); }
.mediatheque-photo.choisie { border-color: var(--bulma-link); box-shadow: 0 0 0 3px var(--bulma-link); }
/* Pastille sur image : toujours sur fond sombre (exception assumée du thème). */
.mediatheque-page-photo { position: absolute; left: .3rem; bottom: .3rem; padding: 0 .4rem; border-radius: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .75rem; }
.mediatheque-depot { display: flex; align-items: center; justify-content: center; min-height: 100%; border: 2px dashed var(--bulma-border); border-radius: 8px; cursor: pointer; padding: 1rem; }
.mediatheque-depot.survol { border-color: var(--bulma-link); }
.mediatheque-depot input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mediatheque-depot-invite { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--bulma-text-weak); }
.mediatheque-depot.avec-apercu .mediatheque-depot-invite { display: none; }
.mediatheque-apercu { max-width: 100%; max-height: 60vh; object-fit: contain; }
.mention-sans-principale .choisir-principale { margin-left: .5rem; }
/* Page Médiathèque : la même médiathèque posée dans la page, sans hauteur imposée (la page défile, la barre des
 * photos cochées reste collée en haut de l'écran). */
.carte-mediatheque.mediatheque-integree { display: flex; flex-direction: column; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main); }
.mediatheque-integree .modal-card-body { background: var(--bulma-scheme-main); flex: none; overflow: visible; }
.mediatheque-integree .mediatheque-lot { position: sticky; top: 0; z-index: 3; }
.mediatheque-integree .mediatheque-depot { min-height: 20rem; }
.mediatheque-integree .modal-card-foot { border-top: 1px solid var(--bulma-border); background: var(--bulma-scheme-main-bis); padding: .6rem 1rem; }
.choix-magazine-mediatheque { max-width: 40rem; }
.zones-aide { margin: 0 0 .75rem; }
.zones-mosaique { display: grid; gap: 1rem; justify-content: center; align-items: start; }
.zones-page { margin: 0; min-width: 0; }
.zones-page figcaption { margin-bottom: .2rem; }
/* Légende de page : numéro et case « Article N sur toute la page » (zone de fond de l'article actif). */
.zones-legende-page { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .75rem; }
.zones-case-page { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.75rem; cursor: pointer; color: var(--bulma-text); }
.zones-case-page input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--zc); cursor: pointer; }
/* Case tout / aucun en tête de la mosaïque : toutes les pages pour l'article actif, alignée à droite comme les cases de page. */
.zones-toutes-pages { display: flex; justify-content: flex-end; margin: -.25rem 0 .5rem; font-weight: 600; }
.zones-toutes-pages[hidden] { display: none; }
/* Zone « page entière » : fond teinté sans poignées ni prise, on trace par-dessus. */
.zone-rect.zone-page-entiere { pointer-events: none; border-style: dashed; background: color-mix(in srgb, var(--zc) 10%, transparent); }
.zones-cadre { position: relative; line-height: 0; box-shadow: var(--ombre-page, 0 1px 6px rgba(0, 0, 0, .25)); }
.zones-cadre img { display: block; width: 100%; height: auto; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.zones-couche { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.modale-zones.mode-defilement .zones-couche { touch-action: pan-y; cursor: default; }
.zone-rect {
  position: absolute; box-sizing: border-box; border: 2px solid var(--zc); background: color-mix(in srgb, var(--zc) 20%, transparent); cursor: move;
}
.zone-rect.zone-trace { pointer-events: none; }
.zone-rect.est-choisie { z-index: 2; background: color-mix(in srgb, var(--zc) 30%, transparent); box-shadow: 0 0 0 2px var(--bulma-scheme-main); }
.zone-badge {
  position: absolute; left: -2px; top: -2px; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 5px 0; background: var(--zc); color: #fff; font: 700 .75rem/1 var(--bulma-family-primary, sans-serif); text-shadow: 0 0 2px rgba(0, 0, 0, .55); pointer-events: none;
}
.zone-poignee {
  --ph: 14px; position: absolute; z-index: 3; width: var(--ph); height: var(--ph); box-sizing: border-box; border: 2px solid var(--zc); border-radius: 3px;
  background: var(--bulma-scheme-main); touch-action: none;
}
.zone-poignee-nw { left: calc(var(--ph) / -2); top: calc(var(--ph) / -2); cursor: nwse-resize; }
.zone-poignee-n { left: calc(50% - var(--ph) / 2); top: calc(var(--ph) / -2); cursor: ns-resize; }
.zone-poignee-ne { right: calc(var(--ph) / -2); top: calc(var(--ph) / -2); cursor: nesw-resize; }
.zone-poignee-e { right: calc(var(--ph) / -2); top: calc(50% - var(--ph) / 2); cursor: ew-resize; }
.zone-poignee-se { right: calc(var(--ph) / -2); bottom: calc(var(--ph) / -2); cursor: nwse-resize; }
.zone-poignee-s { left: calc(50% - var(--ph) / 2); bottom: calc(var(--ph) / -2); cursor: ns-resize; }
.zone-poignee-sw { left: calc(var(--ph) / -2); bottom: calc(var(--ph) / -2); cursor: nesw-resize; }
.zone-poignee-w { left: calc(var(--ph) / -2); top: calc(50% - var(--ph) / 2); cursor: ew-resize; }
@media (pointer: coarse) { .zone-poignee { --ph: 24px; } }
.zones-message { margin: 0; color: var(--bulma-danger); flex: 1 1 12rem; }
/* Rôle désigné (titre, surtitre, auteur) sur la page : cadre gris neutre, icône du rôle, jamais interactif. Dessiné sur des images de pages claires dans les deux thèmes. */
:root { --zone-role-trait: #5f6672; --zone-role-fond: rgba(95, 102, 114, .12); --zone-role-icone-fond: #5f6672; --zone-role-icone: #fff; }
:root[data-theme="dark"] { --zone-role-trait: #6b7280; --zone-role-fond: rgba(107, 114, 128, .16); --zone-role-icone-fond: #4b5563; --zone-role-icone: #f3f4f6; }
.zone-role { position: absolute; z-index: 1; box-sizing: border-box; border: 2px solid var(--zone-role-trait); background: var(--zone-role-fond); pointer-events: none; }
.zone-role-icone {
  position: absolute; right: -2px; top: -2px; width: 1.15rem; height: 1.15rem; display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 0 5px; background: var(--zone-role-icone-fond); color: var(--zone-role-icone); font-size: .62rem; line-height: 1; pointer-events: none;
}
.zones-puce-roles {
  display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-left: .1rem; border: 0;
  border-radius: 50%; background: transparent; color: var(--bulma-text-weak); font-size: .75rem; cursor: pointer;
}
.zones-puce-roles:hover, .zones-puce-roles:focus-visible { background: var(--bulma-background); color: var(--bulma-text); }
.zones-puce-roles.est-defini { background: var(--zc); color: #fff; }
.zones-puce-roles.est-defini:hover, .zones-puce-roles.est-defini:focus-visible { background: color-mix(in srgb, var(--zc) 80%, black); }
/* --- Rôles désignés d'un article : titre, surtitre, auteur(s) (sous-modale de « Extraction par zones ») --- */
.carte-roles-article {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bulma-scheme-main);
}
.carte-roles-article.is-hidden { display: none; }
.carte-roles-article .modal-card-head, .carte-roles-article .modal-card-foot { flex: none; }
.carte-roles-article .modal-card-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .75rem 1rem 1.25rem; }
.roles-article-onglets {
  flex: none; display: flex; gap: .35rem; padding: 0 1rem; border-bottom: 1px solid var(--bulma-border-weak, var(--bulma-border));
}
.roles-article-onglet {
  padding: .55rem .25rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent;
  color: var(--bulma-text-weak); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.roles-article-onglet:hover, .roles-article-onglet:focus-visible { color: var(--bulma-text); }
.roles-article-onglet.est-actif { color: var(--bulma-link); border-bottom-color: var(--bulma-link); }
.roles-article-onglet.est-defini::after { content: ''; display: inline-block; width: .4rem; height: .4rem; margin-left: .35rem; border-radius: 50%; background: currentColor; vertical-align: middle; }
.titre-article-mosaique { display: grid; gap: 1rem; justify-content: center; align-items: start; margin-top: .5rem; }
.titre-article-apercu, .titre-article-couche { position: absolute; inset: 0; }
.titre-article-couche { cursor: crosshair; touch-action: none; }
.titre-article-zone-apercu {
  position: absolute; box-sizing: border-box; border: 2px dashed var(--zc); background: color-mix(in srgb, var(--zc) 10%, transparent); pointer-events: none;
}
.titre-article-rect {
  position: absolute; box-sizing: border-box; border: 2px solid var(--zc); background: color-mix(in srgb, var(--zc) 35%, transparent); cursor: move;
}
.titre-article-rect.titre-article-trace { pointer-events: none; }
/* Zone « exclure » : hachurée en couleur de danger (ignorée à l'export), croix pour la retirer. */
.titre-article-rect.est-exclusion { --zc: var(--bulma-danger); background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--bulma-danger) 35%, transparent) 0 6px, color-mix(in srgb, var(--bulma-danger) 12%, transparent) 6px 12px); }
.titre-article-rect-supprimer { position: absolute; top: -.7rem; right: -.7rem; width: 1.4rem; height: 1.4rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--bulma-danger); color: var(--bulma-danger-invert, #fff); font-size: .7rem; cursor: pointer; }
/* Partie du corps (onglet « Corps (ordre) ») : couleur de l'article, liste du numéro d'ordre dans le coin haut gauche. */
/* Vue des rôles d'un article : toutes les sous-zones à la fois. Onglet actif en blanc (modifiables), autres onglets en
   gris (repère, inertes) ; icône du rôle en haut à droite de chaque sous-zone. Toujours dessinées sur l'image de la page
   (exception assumée aux variables du thème, comme les pastilles sur image). */
.carte-roles-article .titre-article-rect, .carte-roles-article .titre-article-rect:is(.est-exclusion, .est-corps, .est-exergue, .est-texte) {
  --zc: #fff; border: 2px solid #fff; background: rgba(255, 255, 255, .28); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.carte-roles-article .titre-article-rect.est-exclusion { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .45) 0 6px, rgba(255, 255, 255, .12) 6px 12px); }
.sous-zone-autre { position: absolute; box-sizing: border-box; border: 2px dashed #8b919c; background: rgba(110, 116, 128, .22); pointer-events: none; }
.sous-zone-icone {
  position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: .2rem; padding: .15rem .3rem; border-radius: 0 0 0 5px;
  font-size: .62rem; line-height: 1; pointer-events: none; background: #8b919c; color: #fff;
}
.titre-article-rect .sous-zone-icone { background: #fff; color: #1f2430; }
.sous-zone-icone b { font-weight: 700; }
/* Image au fond transparent (imgfond) : damier sous l'image pour voir la transparence (médiathèque). */
.mediatheque-photo.est-transparente img { background: repeating-conic-gradient(var(--bulma-border) 0 25%, var(--bulma-scheme-main) 0 50%) 50% / 16px 16px; }
/* Croix et liste du numéro d'ordre dans un rectangle : toujours positionnées (la règle générale des info-bulles,
   `[data-tooltip] { position: relative }`, plus loin dans ce fichier, les remettait dans le flux). */
.titre-article-rect :is(.titre-article-rect-supprimer, .partie-corps-ordre)[data-tooltip] { position: absolute; }
/* Loupe d'une page (« Extraire par zones » et vue des rôles) : bas droite du cadre, au-dessus de la couche de tracé ;
   sur l'image de la page, donc pastille sombre fixe (exception assumée, comme les pastilles sur image). */
.zones-cadre .zones-loupe {
  position: absolute; right: .4rem; bottom: .4rem; z-index: 3; width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: rgba(20, 22, 30, .78); color: #fff; font-size: 1rem; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.zones-cadre .zones-loupe:hover, .zones-cadre .zones-loupe:focus-visible { background: rgba(20, 22, 30, .95); }
.zones-cadre .zones-loupe[data-tooltip]:hover::after, .zones-cadre .zones-loupe[data-tooltip]:focus-visible::after { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; transform: none; }
/* Vue plein écran d'une page (loupe) : posée dans la mosaïque (gestes délégués), fixée sur tout l'écran. */
.zones-loupe-vue { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bulma-scheme-main); }
.zones-loupe-tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; border-bottom: 1px solid var(--bulma-border); }
.zones-loupe-titre { margin: 0; font-weight: 700; color: var(--bulma-text-strong); }
.zones-loupe-corps { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 1rem; }
.zones-loupe-corps .zones-cadre { width: min(100%, 1800px); margin: 0 auto; }
/* Croix de retrait : en bas à droite, le coin haut droit porte l'icône du rôle. */
.carte-roles-article .titre-article-rect-supprimer { top: auto; bottom: -.7rem; }
.carte-roles-article .partie-corps-ordre { background: #fff; color: #1f2430; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); }
/* Exergue et texte courant : rectangle gris du rôle (comme dans la mosaïque principale), croix pour le retirer. */
.titre-article-rect:is(.est-exergue, .est-texte) { --zc: var(--zone-role-trait); }
.titre-article-rect.est-corps { border-style: dashed; background: color-mix(in srgb, var(--zc) 22%, transparent); }
.partie-corps-ordre {
  position: absolute; top: -.75rem; left: -.75rem; min-width: 2.2rem; height: 1.6rem; padding: 0 .2rem; border: 0; border-radius: .8rem;
  background: var(--zc); color: #fff; font: inherit; font-size: .8rem; font-weight: 700; text-align: center; cursor: pointer;
}
.partie-corps-ordre option { color: var(--bulma-text); background: var(--bulma-scheme-main); }
/* Partie du corps rappelée dans la mosaïque principale : pointillés de la couleur de l'article, numéro d'ordre. */
/* Zone exclue rappelée dans la vue des pages : hachures de la couleur de danger, icône « interdit ». */
.zone-role.zone-exclue { border: 2px solid var(--bulma-danger); background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--bulma-danger) 30%, transparent) 0 6px, color-mix(in srgb, var(--bulma-danger) 8%, transparent) 6px 12px); }
.zone-role.zone-exclue .zone-role-icone { background: var(--bulma-danger); color: var(--bulma-danger-invert, #fff); }
.zone-role.zone-corps { border: 2px dashed var(--zc); background: color-mix(in srgb, var(--zc) 8%, transparent); }
.zone-role.zone-corps .zone-role-icone { left: -2px; right: auto; border-radius: 0 0 5px 0; background: var(--zc); color: #fff; font-weight: 700; }
.table-sommaire td { vertical-align: middle; }
.table-sommaire td:nth-child(4) { width: 7rem; }
.table-sommaire td:nth-child(5) { width: 8rem; white-space: nowrap; }
.table-sommaire .s-vignette { display: block; width: 40px; height: 52px; object-fit: cover; box-shadow: var(--ombre-legere); }
/* Vignettes cliquables de la modale « Extraire groupes » : ouvrent la visionneuse sur la page. */
.vignette-visionneuse { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.vignette-visionneuse:hover img, .vignette-visionneuse:focus-visible img { outline: 2px solid var(--bulma-link); outline-offset: 2px; }
.sommaire-pages { display: flex; flex-wrap: wrap; gap: .6rem; }
.sommaire-pages .vignette-visionneuse { display: flex; flex-direction: column; align-items: center; gap: .3rem; line-height: 1.2; }
.sommaire-pages img { height: 140px; width: auto; box-shadow: var(--ombre-legere); }
.sommaire-pages .vignette-num { font-size: .75rem; color: var(--bulma-text-weak); }
.table-sommaire tr.ecartee td:not(:first-child) { opacity: .4; }
.decalage .field-body { align-items: center; gap: 1rem; }
.decalage .input { width: 6rem; }

/* Liste d'articles compacte : un numéro en compte souvent plusieurs dizaines. */
.laterale li + li { margin-top: 0; }
.laterale .groupe { gap: .5rem; padding: .2rem .3rem; font-size: .82rem; align-items: center; }
.laterale .groupe img, .laterale .groupe .sans-image { width: 1.6rem; }
.laterale .groupe-titre { font-weight: 600; line-height: 1.2; }
.laterale .groupe-pages { font-size: .7rem; margin-top: 0; }
.laterale .coche-article, .laterale .coche-dossier { margin-top: .55rem; }
.laterale .poignee { font-size: .95rem; }
.laterale li.dossier { margin: .35rem 0; }
.laterale .dossier-lien { padding: .25rem .3rem; font-size: .82rem; }
.laterale .dossier-lien .tag { font-size: .6rem; height: 1.5em; }
.laterale .dossier-titre { margin-top: .1rem; }
.laterale .membres { margin-left: 1.1rem; }

/* Page d'un numéro, bureau : deux colonnes égales, liste des articles sans cadre et un peu plus grande,
   pages en grille fixe de 4 par ligne. */
.laterale-ouverte { padding: 0 .25rem; }
@media screen and (min-width: 1024px) {
  #mosaique { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Colonne des groupes repliée : les pages ont toute la largeur, 6 par ligne. */
  .columns:has(> .colonne-groupes.est-repliee) #mosaique { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .laterale.laterale-ouverte .groupe { font-size: .95rem; gap: .65rem; padding: .3rem .4rem; }
  .laterale.laterale-ouverte .groupe img, .laterale.laterale-ouverte .groupe .sans-image { width: 2.2rem; }
  .laterale.laterale-ouverte .groupe-pages { font-size: .8rem; }
  .laterale.laterale-ouverte .dossier-lien { font-size: .95rem; }
  .laterale.laterale-ouverte .dossier-lien .tag { font-size: .7rem; }
  .laterale.laterale-ouverte .extrait-article { font-size: .8rem; }
  .laterale.laterale-ouverte .coche-article, .laterale.laterale-ouverte .coche-dossier { margin-top: .7rem; }
}

/* Colonne des groupes de pages repliable vers la droite (permalien `groupes=replie|ouvert`, js/magazine.js). L'ancre est
   une bande verticale DANS la colonne, contre son bord gauche, haute de tout l'écran et collante au défilement :
   colonne ouverte, elle sépare les pages des groupes ; repliée, elle se colle au bord droit de l'écran (position fixe)
   et les onglets prennent toute la largeur. Texte de la bande en haut. Téléphone : bloc « Mobile » (bandeau, sans ancre). */
.entete-laterale .bouton-repli-groupes { flex: none; }
.colonne-groupes > .ancre-groupes {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .45rem; padding: .8rem .3rem .6rem;
  border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius);
  background: var(--bulma-scheme-main); color: var(--bulma-text); box-shadow: var(--ombre-legere);
  font: inherit; font-size: .85rem; cursor: pointer;
}
.colonne-groupes > .ancre-groupes:hover, .colonne-groupes > .ancre-groupes:focus-visible { background: var(--bulma-scheme-main-bis); color: var(--bulma-link); }
.ancre-groupes .ancre-groupes-libelle {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.ancre-groupes .ancre-groupes-compte {
  min-width: 1.4rem; padding: .05rem .3rem; border-radius: 999px; text-align: center;
  font-size: .7rem; font-weight: 700; background: var(--teinte-lien); color: var(--bulma-link);
}
@media screen and (min-width: 769px) {
  .columns > .column.colonne-groupes { display: flex; align-items: flex-start; gap: .75rem; transition: width .2s ease, flex-basis .2s ease; }
  .colonne-groupes > .ancre-groupes { position: sticky; top: 0; flex: none; width: 2.1rem; min-height: 100vh; z-index: 2; }
  .colonne-groupes > .laterale { flex: 1 1 auto; min-width: 0; }
  /* Repliée : l'ancre se colle au bord droit de l'écran (jusqu'en bas), hors de la marge de la page, à la même hauteur
     que la colonne ouverte (`placerAncreGroupes`) ; la colonne ne garde que sa place minimale. */
  .columns > .column.colonne-groupes.est-repliee { flex: none; width: 0; padding-left: 0; padding-right: 0; }
  .colonne-groupes.est-repliee > .laterale { display: none; }
  .colonne-groupes.est-repliee > .ancre-groupes {
    position: fixed; top: 0; right: 0; bottom: 0; min-height: 0; z-index: 29; /* top : haut de la colonne (js/magazine.js) */
    border-right: 0; border-radius: var(--bulma-radius-large) 0 0 var(--bulma-radius-large);
  }
}
@media (prefers-reduced-motion: reduce) {
  .columns > .column.colonne-groupes { transition: none; }
}
/* Chargement : toute la zone des deux colonnes (onglets, pages, groupes) masquée tant que l'état de la colonne des
   groupes (replié ou ouvert) n'est pas décidé, puis posée d'un coup, sans animation : rien ne change de largeur à l'écran. */
.colonne-groupes.repli-en-attente, .columns:has(> .colonne-groupes.repli-en-attente) { visibility: hidden; }
.columns > .column.colonne-groupes.sans-transition { transition: none; }

/* --- Barre d'outils de la visionneuse --- */
.visionneuse .outils { display: flex; gap: .25rem; pointer-events: auto; }
.visionneuse .outil {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-width: 2.25rem; height: 2.25rem; padding: 0 .55rem; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff !important; text-decoration: none !important; font-size: .95rem;
}
.visionneuse .outil:hover { background: rgba(255, 255, 255, .25); }
.visionneuse .outil.actif { background: var(--bulma-link); }
.visionneuse .outil-compte { font-size: .7rem; font-weight: 700; }
.visionneuse .outil-compte:empty { display: none; }

/* Info-bulles : attribut data-tooltip, sous l'élément. */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after {
  content: attr(data-tooltip); position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  z-index: 60; padding: .3rem .55rem; border-radius: 6px; white-space: nowrap; pointer-events: none;
  background: var(--infobulle-fond); color: var(--infobulle-texte); box-shadow: var(--infobulle-ombre);
  font-size: .75rem; font-weight: 500; line-height: 1.3;
}
/* Placements : bulle calée à droite de l'élément (s'étend vers la gauche), à gauche, au-dessus,
   ou sur le côté (centrée verticalement), pour rester lisible près des bords et des conteneurs défilants. */
[data-tooltip].bulle-gauche:hover::after, [data-tooltip].bulle-gauche:focus-visible::after { left: auto; right: 0; transform: none; }
[data-tooltip].bulle-droite:hover::after, [data-tooltip].bulle-droite:focus-visible::after { left: 0; transform: none; }
[data-tooltip].bulle-haut:hover::after, [data-tooltip].bulle-haut:focus-visible::after { top: auto; bottom: calc(100% + 6px); }
[data-tooltip].bulle-cote-gauche:hover::after, [data-tooltip].bulle-cote-gauche:focus-visible::after { top: 50%; left: auto; right: calc(100% + 6px); transform: translateY(-50%); }
[data-tooltip].bulle-cote-droit:hover::after, [data-tooltip].bulle-cote-droit:focus-visible::after { top: 50%; left: calc(100% + 6px); transform: translateY(-50%); }
/* Menu ouvert : la bulle de son bouton se tait. */
.dropdown.is-active .dropdown-trigger [data-tooltip]::after { display: none; }
/* Croix Bulma (.delete, .modal-close) : leurs ::before / ::after dessinent la croix, la bulle est portée par une enveloppe. */
.bulle-fermer { display: inline-flex; flex: none; }
.notification > .bulle-fermer { position: absolute; top: .5rem; right: .5rem; }
.notification > .bulle-fermer > .delete { position: static; }
.bulle-fermer-modale { position: fixed; top: 20px; right: 20px; z-index: 46; display: flex; }
.bulle-fermer-modale > .modal-close { position: static; }
/* Téléphone : bulles longues repliées sur plusieurs lignes ; les outils d'un .level-right, empilés à gauche, ouvrent leur bulle vers la droite. */
@media (max-width: 768px) {
  [data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { white-space: normal; width: max-content; max-width: min(18rem, calc(100vw - 2rem)); }
  .level-right [data-tooltip].bulle-gauche:hover::after, .level-right [data-tooltip].bulle-gauche:focus-visible::after { left: 0; right: auto; }
}
/* Carte survolée au premier plan : sa bulle passe au-dessus des cartes voisines. */
.carte-magazine:hover, .carte-magazine:focus-within { position: relative; z-index: 3; }
/* Poignée ⠿ de la liste des articles (liste défilante) : bulle sur le côté droit. */
.laterale .poignee[data-tooltip]:hover::after { top: 50%; left: calc(100% + 6px); transform: translateY(-50%); }
/* Pastille d'origine d'une carte : bulle calée à gauche, sur plusieurs lignes si la carte est étroite. */
.pastille-source[data-tooltip]:hover::after { left: 0; transform: none; white-space: normal; width: max-content; max-width: 14rem; }
/* Tableaux défilants (.table-container) : la dernière ligne ouvre ses bulles vers le haut. */
.table-container tbody tr:last-child td:not(.actions-type) [data-tooltip]:hover::after { top: auto; bottom: calc(100% + 6px); }
/* Onglets de supports (.tabs défile et couperait la bulle) : l'onglet n'est pas positionné, la bulle
   part de sa position statique (centrée dans l'onglet, flex) et descend sous l'onglet. */
.onglets-supports .onglet-support[data-tooltip] { position: static; }
.onglets-supports .onglet-support[data-tooltip]:hover::after { top: auto; left: auto; transform: translateY(calc(50% + 1.1rem + 6px)); }

.visionneuse .aide-outil {
  position: fixed; top: 3.4rem; left: 50%; transform: translateX(-50%); z-index: 45;
  padding: .25rem .75rem; border-radius: 999px; background: var(--bulma-link); color: #fff; font-size: .8rem;
}

/* --- Zones de liens --- */
.zone-lien { position: absolute; display: block; border-radius: 3px; }
.zone-lien:hover { background: rgb(var(--zone-lien) / .18); outline: 2px solid rgb(var(--zone-lien) / .7); }
.visionneuse.outil-liens .calque-liens { cursor: crosshair; }
.visionneuse.outil-liens .zone-lien { background: rgb(var(--zone-lien) / .16); outline: 2px dashed rgb(var(--zone-lien) / .9); cursor: pointer; }
.visionneuse.zones-visibles .zone-lien { background: rgb(var(--zone-lien) / .16); outline: 2px solid rgb(var(--zone-lien) / .85); cursor: pointer; }
.visionneuse.outil-liens .zone-lien.active,
.visionneuse.zones-visibles .zone-lien.active,
.zone-lien.brouillon { background: rgb(var(--zone-brouillon) / .22); outline: 2px solid rgb(var(--zone-brouillon)); }

.panneau-lien {
  position: fixed; top: 4.5rem; right: 1rem; z-index: 47; width: min(320px, calc(100vw - 2rem));
  line-height: 1.5; box-shadow: var(--ombre-panneau);
}
.panneau-lien .buttons { margin-bottom: 0; }
.panneau-lien .apercu-cible { display: flex; gap: .75rem; align-items: flex-start; }
.panneau-lien .apercu-cible .control { flex: 1; }
.panneau-lien .vignette-cible { height: 90px; box-shadow: var(--ombre-legere); }

/* --- Barre d'outils des articles --- */
/* La liste défile seule : la barre reste visible, et ses info-bulles comme la
   fenêtre de choix du dossier ne sont pas rognées par le défilement. */
.laterale { display: flex; flex-direction: column; overflow: visible; }
.laterale #liste-groupes { overflow-y: auto; min-height: 0; flex: 1; margin-right: -.5rem; padding-right: .5rem; }
.barre-articles {
  display: flex; align-items: center; gap: .35rem; margin: .35rem 0 .5rem; padding: .25rem .35rem;
  border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main-bis);
}
.barre-articles .tout-rien { display: flex; align-items: center; padding: .25rem; cursor: pointer; }
.barre-articles .tout-rien input { cursor: pointer; accent-color: var(--bulma-link); }
.barre-articles .compte-coches { min-width: 1.2rem; font-size: .75rem; font-weight: 700; color: var(--bulma-link); }
.barre-articles .outils-articles { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.barre-articles .separateur { width: 1px; height: 1.2rem; margin: 0 .2rem; background: var(--bulma-border); }
.outil-article {
  display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  border: 0; border-radius: 6px; background: transparent; color: var(--bulma-text); cursor: pointer; font-size: .9rem;
}
.outil-article:hover:not(:disabled), .outil-article.actif { background: var(--bulma-scheme-main); box-shadow: var(--ombre-outil); color: var(--bulma-link); }
.outil-article.danger:hover:not(:disabled) { color: var(--bulma-danger); }
/* Article de couverture (médaille) : icône dans la liste des articles, bouton de la modale du sommaire. */
.medaille-article { color: var(--bulma-warning); }
/* Menu « … » des actions d'un article (cloner, supprimer) : entrées icône et texte. */
.actions-article .menu-article { vertical-align: top; }
.actions-article .menu-article .dropdown-menu { min-width: 12rem; }
.actions-article .menu-article .dropdown-item { white-space: nowrap; }
/* Groupe de pages mis en avant au survol d'une de ses pages dans la mosaïque. */
.laterale li.article.mis-en-avant > .groupe { background: var(--teinte-lien); box-shadow: inset 3px 0 0 var(--bulma-link); }
.s-titre-ligne { display: flex; align-items: center; gap: .35rem; }
.s-medaille {
  flex: none; width: 2rem; height: 2rem; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius);
  background: var(--bulma-scheme-main); color: var(--bulma-text-weak); cursor: pointer;
}
.s-medaille:hover { color: var(--bulma-warning); }
.s-medaille.active { color: var(--bulma-warning); border-color: var(--bulma-warning); }
/* Désactivé : icône pâlie par sa couleur, pas par l'opacité (qui pâlirait aussi l'info-bulle). */
.outil-article:disabled { color: color-mix(in srgb, var(--bulma-text) 30%, transparent); cursor: default; }
/* Info-bulles alignées à droite en bout de barre : centrées, elles sortiraient de la colonne. */
.outils-articles [data-tooltip]:hover::after { left: auto; right: 0; transform: none; }
.barre-articles .tout-rien[data-tooltip]:hover::after { left: 0; transform: none; }

.ancre-popover { position: relative; }
.popover-dossiers {
  position: absolute; top: calc(100% + 6px); right: -4rem; z-index: 30; width: 15rem; max-height: 18rem; overflow-y: auto;
  padding: .5rem; border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main);
  box-shadow: var(--ombre-flottante);
}
.popover-dossiers .choix-dossier {
  display: flex; align-items: center; gap: .45rem; width: 100%; padding: .35rem .45rem; border: 0; border-radius: 6px;
  background: transparent; color: var(--bulma-text); text-align: left; font-size: .82rem; cursor: pointer;
}
.popover-dossiers .choix-dossier:hover:not(:disabled) { background: var(--teinte-lien); color: var(--bulma-link); }
.popover-dossiers .choix-dossier:disabled { opacity: .45; cursor: default; }
.popover-dossiers .choix-dossier span:first-of-type { flex: 1; }
.popover-dossiers .nb { font-size: .7rem; color: var(--bulma-text-weak); }

/* Cases à cocher alignées sur une seule colonne, celle de la case tout/rien :
   dans un dossier, c'est le contenu qui est en retrait, pas la case. */
.laterale .coche-article, .laterale .coche-dossier { margin: .55rem .15rem 0 .35rem; }
.barre-articles { padding-left: 0; }
.barre-articles .tout-rien { padding: .25rem .15rem .25rem .35rem; }
.laterale .membres { margin-left: 0; padding-left: 0; border-left: 0; }
.laterale .membres li.article > .poignee { margin-left: .9rem; box-shadow: inset 3px 0 0 var(--filet-lien); padding-left: .45rem; }

/* --- Nature des pages --- */
.mosaique .type-page {
  position: absolute; right: .35rem; bottom: .35rem; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem;
  border-radius: 50%; background: rgba(20, 22, 26, .78); color: #fff; font-size: .72rem;
}
.mosaique .type-page[data-type="publicite"] { background: #d9534f; }
.mosaique .type-page[data-type="couverture"], .mosaique .type-page[data-type="sommaire"] { background: var(--bulma-link); }
.mosaique .type-page[data-tooltip]:hover::after { left: auto; right: 0; transform: none; }

/* Encadré en bas à gauche de l'écran, dans la marge : il ne recouvre pas la page. */
.visionneuse .legende-page {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 45;
  width: min(300px, calc(100vw - 2rem));
  padding: .6rem .75rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  background: rgba(20, 22, 26, .92); color: #fff; font-size: .8rem; line-height: 1.45; text-align: left;
}
/* Défilement porté par le contenu : sur la légende, il couperait son info-bulle. */
.visionneuse .legende-page .contenu-legende { display: block; max-height: calc(40vh - 1.2rem); overflow-y: auto; }
.visionneuse .legende-page .tag { display: flex; width: fit-content; margin-bottom: .4rem; }
.visionneuse .legende-page .tag { vertical-align: 1px; }

/* --- Correction de la nature d'une page --- */
.panneau-nature {
  position: fixed; top: 4.5rem; right: 1rem; z-index: 47; width: min(340px, calc(100vw - 2rem));
  line-height: 1.5; box-shadow: var(--ombre-panneau);
}
.panneau-nature .buttons { margin-bottom: 0; }
.panneau-nature .nature-origine { color: var(--bulma-text-weak); }

/* --- Recadrage des pages (outil « Recadrer » de la visionneuse, mosaique.js) --- */
.panneau-recadrage {
  position: fixed; top: 4.5rem; right: 1rem; z-index: 47; width: min(360px, calc(100vw - 2rem));
  line-height: 1.5; box-shadow: var(--ombre-panneau);
}
.panneau-recadrage .buttons { margin-bottom: 0; }
.panneau-recadrage :is(.aide-recadrage, .recadrage-portee) { font-size: .8rem; color: var(--bulma-text-weak); }
.visionneuse.outil-recadrage .calque-liens { display: none; }
.visionneuse .calque-recadrage { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.visionneuse .calque-recadrage.inactif { cursor: default; pointer-events: none; opacity: .6; }
/* Hors du cadre : assombri (ombre géante, coupée par la scène en overflow hidden). */
.visionneuse .cadre-recadrage {
  position: absolute; box-sizing: border-box; cursor: move;
  outline: 2px solid #f5c400; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .55);
}
.visionneuse .poignee-recadrage {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 3px;
  background: #f5c400; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
.visionneuse .poignee-recadrage[data-poignee="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.visionneuse .poignee-recadrage[data-poignee="n"] { left: 50%; top: 0; cursor: ns-resize; }
.visionneuse .poignee-recadrage[data-poignee="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.visionneuse .poignee-recadrage[data-poignee="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.visionneuse .poignee-recadrage[data-poignee="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.visionneuse .poignee-recadrage[data-poignee="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.visionneuse .poignee-recadrage[data-poignee="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.visionneuse .poignee-recadrage[data-poignee="w"] { left: 0; top: 50%; cursor: ew-resize; }
/* --- Filigranes des pages (outil « Filigrane » de la visionneuse, mosaique.js, inc/filigranes.js) --- */
.panneau-filigrane {
  position: fixed; top: 4.5rem; right: 1rem; z-index: 47; width: min(360px, calc(100vw - 2rem));
  max-height: calc(100vh - 6rem); overflow-y: auto; line-height: 1.5; box-shadow: var(--ombre-panneau);
}
.panneau-filigrane .buttons { margin-bottom: 0; }
.panneau-filigrane .aide-filigrane { font-size: .8rem; color: var(--bulma-text-weak); }
.panneau-filigrane .filigrane-liste .button { max-width: 100%; justify-content: flex-start; gap: .4rem; }
.panneau-filigrane .texte-liste-filigrane { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }
.panneau-filigrane .pastille-filigrane { width: .8rem; height: .8rem; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px var(--bulma-border); }
.panneau-filigrane .filigrane-couleur { width: 3.2rem; padding: .15rem; }
.panneau-filigrane .filigrane-taille { width: 6rem; }
.panneau-filigrane .filigrane-retrait { align-self: flex-end; }
.visionneuse.outil-filigrane .calque-liens { display: none; }
.visionneuse .calque-filigrane { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; overflow: visible; }
.visionneuse .calque-filigrane.inactif { pointer-events: none; opacity: .6; }
/* Aperçu dans la police standard du PDF (Helvetica), Arial à défaut : mêmes chasses. */
.visionneuse .calque-filigrane .texte-filigrane {
  font-family: Helvetica, Arial, "Liberation Sans", sans-serif; white-space: pre; cursor: move; user-select: none;
}
.visionneuse .calque-filigrane .cadre-filigrane {
  fill: none; stroke: #f5c400; stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none;
}
.visionneuse .legende-page { cursor: pointer; }
.visionneuse .legende-page:hover { background: rgba(20, 22, 26, .95); }
.visionneuse .legende-page[data-tooltip]:hover::after { top: auto; bottom: calc(100% + 6px); left: 0; transform: none; }

/* --- Recherche et filtre des pages --- */
.recherche-pages { gap: .5rem; flex-wrap: wrap; flex: 1; min-width: 0; }
.recherche-pages #controle-recherche { flex: 1; min-width: 12rem; max-width: 28rem; }
.recherche-pages .outil-article { position: relative; background: var(--bulma-scheme-main); box-shadow: 0 0 0 1px var(--bulma-border); }
.recherche-pages .outil-article.actif { color: var(--bulma-link); box-shadow: 0 0 0 1px var(--bulma-link); }
.pastille-filtre {
  position: absolute; top: -.35rem; right: -.35rem; min-width: 1rem; height: 1rem; padding: 0 .2rem;
  border-radius: 999px; background: var(--bulma-link); color: #fff; font-size: .6rem; font-weight: 700; line-height: 1rem;
}
.popover-types { left: 0; right: auto; width: 17rem; }
.popover-types .entete-popover { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.popover-types .lien-effacer { border: 0; background: none; color: var(--bulma-link); font-size: .75rem; cursor: pointer; }
.popover-types .choix-type input { accent-color: var(--bulma-link); }
.popover-types .choix-type i { width: 1rem; text-align: center; color: var(--bulma-text-weak); }
.mosaique .extrait-recherche {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .2rem; font-size: .7rem; line-height: 1.35; color: var(--bulma-text-weak);
}
.mosaique .extrait-recherche mark, .carte-magazine mark { background: var(--surlignage); color: inherit; padding: 0 .1em; border-radius: 2px; }

.recherche-magazines { margin-bottom: 1.5rem; }
.ligne-resume-recherche { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.lien-recherche-avancee { color: var(--bulma-link); white-space: nowrap; }
/* Onglets des supports de l'accueil (onglets « boîte » de Bulma, petits) : logo du support (nom à défaut) ; nombre de
   magazines sur l'onglet actif seulement (les autres l'ont en info-bulle). */
.tabs.onglets-supports-accueil { margin-bottom: 1.5rem; }
/* Onglets des supports : défilement horizontal gardé (doigt, pavé tactile, molette par accueil.js), barre masquée. */
.tabs.onglets-supports-accueil { scrollbar-width: none; }
.tabs.onglets-supports-accueil::-webkit-scrollbar { display: none; }
/* « Uploader les numéros manquants » : sa propre ligne, centrée, aérée. */
.zone-manquants { display: flex; justify-content: center; margin: 1.75rem 0 2rem; }
.zone-manquants .button { white-space: normal; height: auto; min-height: 3rem; padding-inline: 1.75rem; }
/* Page de création : numéros attendus (manquants d'un support), cherchés sur Sogest. */
.numeros-attendus { max-width: 46rem; }
.liste-numeros-attendus { max-height: 18rem; overflow-y: auto; margin: 0; }
.liste-numeros-attendus li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .3rem .25rem; border-bottom: 1px solid var(--bulma-border-weak); }
.liste-numeros-attendus li:last-child { border-bottom: 0; }
/* Import depuis les maquettes du NAS : un numéro par ligne, fichier recommandé (ou choix parmi plusieurs). */
.liste-maquettes { max-height: 55vh; overflow-y: auto; margin: 0; }
.liste-maquettes li { display: flex; align-items: center; gap: .75rem; padding: .35rem .25rem; border-bottom: 1px solid var(--bulma-border-weak); }
.liste-maquettes li:last-child { border-bottom: 0; }
.liste-maquettes .maquettes-numero { flex: none; min-width: 5.5rem; }
.liste-maquettes .maquettes-fichier { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.liste-maquettes .maquettes-fichier select { max-width: 100%; }
.liste-maquettes .maquettes-telecharger { flex: none; }
.liste-maquettes li.deja-importe { opacity: .6; }
/* Case « Import économique » à la dernière étape de chaque import (page de création). */
.case-eco { display: inline-flex; align-items: center; gap: .35rem; margin-right: .75rem; font-size: .85rem; color: var(--bulma-text-weak); }
.case-eco input { accent-color: var(--bulma-link); }
.onglets-supports-accueil a { display: flex; align-items: center; gap: .35rem; padding: .35rem .7rem; min-height: 2.1rem; }
.onglets-supports-accueil :is(img, svg).logo-onglet-support { height: .95rem; width: auto; max-width: 5rem; display: block; }
.onglets-supports-accueil .compte-onglet-support {
  font-size: .65rem; font-weight: 700; line-height: 1; padding: .15rem .35rem; border-radius: 999px;
  background: var(--bulma-link); color: var(--bulma-link-invert);
}
.onglets-supports-accueil li:not(.is-active) .compte-onglet-support { display: none; }
.onglets-supports-accueil li:not(.is-active) :is(img, svg).logo-onglet-support { opacity: .6; }
.onglets-supports-accueil li:not(.is-active) a:hover :is(img, svg).logo-onglet-support { opacity: 1; }
/* Groupe de supports ouvert : ses supports en seconde rangée (pilules), collée sous la barre des onglets. */
.tabs.onglets-supports-accueil:has(+ .sous-onglets-groupe:not(.is-hidden)) { margin-bottom: .6rem; }
.tabs.sous-onglets-groupe { margin-bottom: 1.5rem; }
.tabs.sous-onglets-groupe li.is-active :is(img, svg).logo-onglet-support { filter: brightness(0) invert(1); }
.tabs.sous-onglets-groupe li.is-active .compte-onglet-support { background: var(--bulma-link-invert); color: var(--bulma-link); }
/* Barre de filtres de l'accueil, sous la recherche : grille de colonnes égales (`.filtres-grille`), le nom de chaque
   filtre au-dessus de son menu ; 7 par ligne sur ordinateur, 4 puis 3 sous 1024 px, 2 par ligne sous 600 px ; bouton
   « Retirer tous les filtres » à droite, hors grille. Un filtre choisi (autre que « tous ») est cerné de la couleur des liens. */
.barre-filtres-magazines { display: flex; align-items: flex-end; gap: .5rem; margin-top: .6rem; }
.barre-filtres-magazines .filtres-grille { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.barre-filtres-magazines .bouton-reinitialiser-filtres { flex: none; }
.barre-filtres-magazines .filtre-colonne { min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.barre-filtres-magazines .filtre-libelle { font-size: .75rem; font-weight: 600; color: var(--bulma-text-weak); display: flex; align-items: center; gap: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre-filtres-magazines .select, .barre-filtres-magazines .select select { width: 100%; }
.barre-filtres-magazines .select:has(option:checked:not([value=""])) select { border-color: var(--bulma-link); color: var(--bulma-link); font-weight: 600; }
.barre-filtres-magazines .filtre-colonne:has(option:checked:not([value=""])) .filtre-libelle { color: var(--bulma-link); }
@media (max-width: 1023px) {
  .barre-filtres-magazines .filtres-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .barre-filtres-magazines .filtres-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .barre-filtres-magazines .select.is-small select { height: 2.5rem; }
  .bouton-reinitialiser-filtres { min-width: 2.5rem; min-height: 2.5rem; }
}

/* Fenêtre ouverte : son info-bulle la recouvrirait. */
.outil-article.ouvert[data-tooltip]:hover::after, .outil-article.actif#dossier-ajouter[data-tooltip]:hover::after { display: none; }

.popover-types .tout-types { margin-bottom: .25rem; padding-bottom: .45rem; border-bottom: 1px solid var(--bulma-border-weak); border-radius: 6px 6px 0 0; font-weight: 600; }

/* --- Article extrait (onglet Texte) --- */
.article-web { max-width: 44rem; margin: 0 auto; padding: 2rem 2.5rem; background: var(--bulma-scheme-main); border-radius: var(--bulma-radius-large); box-shadow: var(--bulma-shadow); }
/* Pages d'où l'article a été extrait, au-dessus du surtitre (repère de travail, hors export). */
.article-web .pages-extraites { font-size: .75rem; font-weight: 600; color: var(--bulma-text-weak); margin-bottom: .25rem; }
/* Surtitre et titre modifiables à leur place (page d'un article) : repère au survol, cadre à la saisie. */
.article-web [data-champ-titre] { cursor: text; border-radius: 4px; outline: 1px dashed transparent; outline-offset: 3px; transition: outline-color .15s; }
.article-web [data-champ-titre]:hover { outline-color: var(--bulma-border); }
.article-web [data-champ-titre]:focus { outline: 2px solid var(--bulma-link); }
.article-web .surtitre-vide:empty::before { content: attr(data-placeholder); color: var(--bulma-text-weak); font-weight: 600; }
.article-web:not(:hover) .surtitre-vide:empty:not(:focus) { opacity: 0; }
/* Descriptif de l'article (sous le titre, avant le chapô ; extrait du post WordPress) : modifiable en place comme le surtitre. */
.article-web .descriptif-article { margin: -.25rem 0 1rem; color: var(--bulma-text-weak); font-size: 1.05rem; font-style: italic; }
.article-web .descriptif-vide:empty::before { content: attr(data-placeholder); color: var(--bulma-text-weak); font-style: italic; }
.article-web:not(:hover) .descriptif-vide:empty:not(:focus) { opacity: 0; }
.article-web .surtitre { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--bulma-link); margin-bottom: .35rem; }
.article-web .titre-article { font-size: 2rem; font-weight: 800; line-height: 1.15; margin-bottom: .75rem; }
.article-web .soustitre { font-size: 1.2rem; font-weight: 600; margin-bottom: .75rem; }
.article-web .chapeau { font-size: 1.12rem; font-weight: 600; line-height: 1.55; margin-bottom: .6rem; }
.article-web .signature { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--bulma-text-weak); margin-bottom: 1.25rem; }
.article-web .corps-article p { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; line-height: 1.75; margin-bottom: 1rem; }
.article-web .intertitre { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 .75rem; }
.article-web .exergue { margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem; border-left: 4px solid var(--bulma-link); font-size: 1.25rem; font-style: italic; line-height: 1.45; }
.article-web .encadre { margin: 1.5rem 0; padding: 1rem 1.25rem; background: var(--bulma-scheme-main-bis); border-radius: var(--bulma-radius); }
.article-web .puces-article { margin: 0 0 1rem 1.4rem; list-style: disc; }
.article-web .puces-article li + li { margin-top: .35rem; }
.article-web .non-place { background: var(--non-place-fond); outline: 2px dashed var(--non-place-trait); outline-offset: 4px; }
.photo-article { margin: 1.25rem 0 1.5rem; }
/* Jamais agrandie au-delà de sa taille réelle ; width/height réservent la place avant chargement. */
.photo-article img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }
/* Lien de la photo : la largeur de l'image, centré (jamais étiré sur la colonne). */
.photo-article .lien-photo-article { display: block; width: fit-content; max-width: 100%; margin: 0 auto; }
.photo-article figcaption { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-top: .4rem; font-size: .8rem; color: var(--bulma-text-weak); }
.photo-article .photo-infos { flex: none; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.photo-article.principale img { box-shadow: 0 0 0 3px var(--filet-lien); }
.photo-article .definir-principale[data-tooltip]:hover::after { left: auto; right: 0; transform: none; }
.photo-article .retirer-principale[data-tooltip]:hover::after { left: auto; right: 0; transform: none; }
/* Article sans photo principale (choix manuel) : mention discrète à la place de la photo. */
.mention-sans-principale { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .75rem 0 1rem; color: var(--bulma-text-weak); }
.photo-article .titre-photo { color: var(--bulma-text-strong); }

/* --- Article de type galerie (galerie.js) --- */
.barre-type-article { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: .75rem; }
/* « Éditer l’article » calé à droite de la barre du type. */
.barre-type-article #bouton-editer { margin: 0 0 0 auto !important; }
.galerie-article { margin: 1.5rem 0 1rem; }
.galerie-scene { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.galerie-image {
  flex: 0 1 auto; min-width: 0; padding: 0; border: 0; background: var(--bulma-scheme-main-ter);
  border-radius: 4px; cursor: zoom-in; line-height: 0; position: relative;
}
.galerie-image img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(26rem, 60vh); margin: 0 auto; border-radius: 4px; user-select: none; }
.galerie-image[data-tooltip]:hover::after { top: .5rem; bottom: auto; }
.galerie-nav {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--bulma-border);
  background: var(--bulma-scheme-main); color: var(--bulma-text); cursor: pointer; position: relative;
}
.galerie-nav:hover:not(:disabled) { background: var(--teinte-lien); color: var(--bulma-link); border-color: var(--filet-lien); }
.galerie-nav:disabled { color: var(--bulma-border); cursor: default; }
.galerie-nav:disabled::after { display: none; }
.galerie-legende { max-width: 40rem; margin: .6rem auto 0; }
.galerie-entete { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.galerie-compteur { font-size: .85rem; font-weight: 600; color: var(--bulma-text-weak); font-variant-numeric: tabular-nums; }
.galerie-actions { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.galerie-titre-photo { font-weight: 700; color: var(--bulma-text-strong); margin-top: .3rem; }
.galerie-notule { font-size: .9rem; color: var(--bulma-text); margin-top: .2rem; }
.galerie-vignettes { display: flex; gap: .4rem; overflow-x: auto; padding: .5rem .1rem .3rem; margin-top: .6rem; }
.galerie-vignette {
  flex: none; width: 4rem; height: 3.2rem; padding: 0; border: 2px solid transparent; border-radius: 4px;
  background: var(--bulma-scheme-main-ter); cursor: pointer; overflow: hidden; position: relative;
}
.galerie-vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie-vignette.is-active { border-color: var(--bulma-link); }
/* Bande à défilement propre : la bulle se pose dans la vignette, jamais coupée par la bande. */
.galerie-vignette[data-tooltip]:hover::after, .galerie-vignette[data-tooltip]:focus-visible::after {
  top: auto; bottom: 2px; left: 2px; right: 2px; transform: none; width: auto; min-width: 0; max-width: none;
  padding: .1rem .2rem; font-size: .65rem; text-align: center; white-space: nowrap; overflow: hidden;
}
.galerie-vignette[data-tooltip] img { border-radius: 2px; }
/* Visionneuse plein écran : photo et légende (fond toujours sombre). */
.visionneuse-galerie .modal-content { flex-direction: column; }
.galerie-plein { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.visionneuse-galerie .v-image { background: transparent; max-height: calc(100vh - 11rem); }
.galerie-plein-legende { max-width: min(92vw, 50rem); color: #eee; font-size: .9rem; text-align: center; }
.galerie-plein-titre { display: block; font-weight: 700; color: #fff; }
.galerie-plein-notule { display: block; }

/* --- Article de type liste --- */
.liste-article { list-style: none; margin: 1.25rem 0; padding: 0; }
.liste-article .element-liste { padding: 1rem 0; border-top: 1px solid var(--bulma-border); }
.liste-article .element-liste:first-child { border-top: 0; }
.liste-article .titre-element { font-size: 1.15rem; font-weight: 700; color: var(--bulma-text-strong); margin-bottom: .5rem; display: flex; align-items: baseline; gap: .6rem; }
.liste-article .numero-element {
  flex: none; min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: 1rem; display: inline-flex; align-items: center; justify-content: center;
  background: var(--teinte-lien); color: var(--bulma-link); font-size: .95rem; font-variant-numeric: tabular-nums;
}
.liste-article .element-liste > p + p { margin-top: .6rem; }
.liste-article .photo-article { margin: .5rem 0 .75rem; }
/* Éditeur : éléments de la liste */
.secteur-liste { margin: 1rem 0 1.25rem; }
.entete-liste { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.elements-liste-edition { list-style: none; margin: .4rem 0 .6rem; padding: 0; }
.element-liste-edition { display: flex; align-items: flex-start; gap: .4rem; padding: .5rem 0; border-top: 1px solid var(--bulma-border); }
.element-liste-edition .poignee-element { flex: none; cursor: grab; color: var(--bulma-text-weak); padding: .25rem; position: relative; }
.element-liste-edition .numero-element-edition { flex: none; font-weight: 700; color: var(--bulma-link); min-width: 1.5rem; padding-top: .15rem; }
/* Visibilité liée à la case « Liste numérotée » (`.numerotee` sur l'`<ol>`), jamais à `:empty` : le champ est
   éditable, il doit rester visible et gardable le focus même vidé le temps d'une correction. */
.elements-liste-edition:not(.numerotee) .numero-element-edition { display: none; }
.numero-element-edition:not(:empty)::after { content: '.'; }
.numero-element-edition:empty::before { content: attr(data-placeholder); color: var(--bulma-text-weak); font-style: italic; font-weight: 400; }
.contenu-element-edition { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.titre-element-edition { font-weight: 700; color: var(--bulma-text-strong); }
.corps-element-edition { min-height: 2.5rem; }
.corps-element-edition p + p, .corps-element-edition div + div { margin-top: .4rem; }
.corps-element-edition:empty::before { content: attr(data-placeholder); color: var(--bulma-text-weak); font-style: italic; }
.image-element-edition { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.image-element-edition img { max-width: 7rem; max-height: 5rem; border-radius: 4px; object-fit: contain; }
.image-element-edition .ancre-popover { position: relative; }
.popover-image-element { position: absolute; left: 0; top: calc(100% + 4px); z-index: 31; width: min(20rem, 80vw); }
/* Popover ouvert : grille sans défilement propre (bulles entières), élément au-dessus des suivants. */
.popover-image-element, .popover-image-element .grille-photos { max-height: none; overflow: visible; }
.popover-image-element .choix-image-element[data-tooltip] { overflow: visible; }
.element-liste-edition:has(.popover-image-element:not(.is-hidden)) { position: relative; z-index: 32; }
.ecartes summary { cursor: pointer; font-size: .85rem; color: var(--bulma-text-weak); }
.ecartes ul { margin-top: .5rem; font-size: .8rem; }
.ecartes li + li { margin-top: .25rem; }
.ecartes li { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
/* Remettre un élément écarté dans l'article : petite icône devant son rôle. */
.ecartes .reinjecter-ecart {
  flex: none; border: 1px solid var(--bulma-border); background: var(--bulma-scheme-main); color: var(--bulma-link);
  border-radius: var(--bulma-radius); width: 1.75rem; height: 1.75rem; cursor: pointer; font-size: .75rem;
}
.ecartes .reinjecter-ecart:hover { background: var(--teinte-lien); }
.ecartes .vignette-ecart { height: 3rem; width: auto; border-radius: var(--bulma-radius); vertical-align: middle; }
/* Récapitulatif de l'envoi d'un article vers WordPress (groupe.html) : photo principale en vignette. */
.recap-wordpress { padding: 0.75rem; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); }
.recap-wordpress .vignette-recap-wordpress { display: flex; align-items: center; justify-content: center; width: 5rem; height: 5rem; object-fit: cover; border-radius: var(--bulma-radius); }
.recap-wordpress .vignette-recap-wordpress.vide { background: var(--bulma-background); color: var(--bulma-text-weak); font-size: 1.5rem; }
.recap-wordpress .media-content { min-width: 0; overflow-wrap: anywhere; }
.ecartes .reinjecter-ecart:disabled { color: var(--bulma-text-weak); cursor: default; }
/* Motif d'un écart (explication de la mise en ordre, jamais du contenu) et écarts refusés par le code. */
.ecartes .motif-ecart { color: var(--bulma-text-weak); font-style: italic; }
.ecartes .motif-ecart::before { content: "· "; font-style: normal; }
.ecartes .titre-refuses { margin-top: .6rem; font-size: .8rem; color: var(--bulma-text-weak); }
/* Précisions données à la dernière extraction (infos de l'extraction, discrètes). */
.precisions-extraction { font-size: .78rem; color: var(--bulma-text-weak); margin-bottom: .5rem; overflow-wrap: anywhere; white-space: pre-line; }

/* Bouton « Extraire l'article » accolé à son chevron (autres options), zone flottante du prompt. */
.extraire-groupe { position: relative; display: inline-flex; align-items: stretch; }
.extraire-groupe > #bouton-extraire { border-start-end-radius: 0; border-end-end-radius: 0; }
.extraire-groupe .bouton-chevron { border-start-start-radius: 0; border-end-start-radius: 0; margin-left: 1px; padding-inline: .65rem; }
.popover-precisions {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 32; width: min(26rem, calc(100vw - 2rem));
  padding: .75rem; border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main);
  box-shadow: var(--ombre-flottante);
}
.popover-precisions .textarea { min-height: 6rem; resize: vertical; }
.pied-precisions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }
.pied-precisions .aide-precisions { color: var(--bulma-text-weak); }
/* Menu et zone flottants accrochés à un bouton d'onglet (options audio) : position fixe calculée par groupe.js, dans l'écran. */
.menu-flottant, .popover-flottant { position: fixed; top: 0; left: 0; right: auto; z-index: 35; }
.menu-flottant { min-width: 12rem; max-width: calc(100vw - 16px); background: var(--bulma-scheme-main); box-shadow: var(--ombre-flottante); }
.menu-flottant .dropdown-item { white-space: normal; }
.popover-flottant { width: min(26rem, calc(100vw - 16px)); }
/* Casque et son chevron accolés (onglet actif). */
.actions-article { display: inline-flex; align-items: center; gap: .4rem; }
.actions-audio { display: inline-flex; }
.actions-wordpress { display: inline-flex; align-items: center; gap: .4rem; }
.actions-audio .action-article:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.actions-audio .chevron-audio { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 1px; padding-inline: .35rem; }
.action-article.est-danger:hover:not(:disabled) { color: var(--bulma-danger); }
.action-article:disabled { color: var(--bulma-border); }
.chevron-audio[aria-expanded="true"][data-tooltip]:hover::after { display: none; }
/* Photos refusées pour l'article : vignettes estompées, bouton « Rétablir ». */
.photos-refusees summary { cursor: pointer; font-size: .85rem; color: var(--bulma-text-weak); }
.photos-refusees .liste-refusees { margin: .5rem 0 0; padding: 0; list-style: none; }
.photos-refusees .photo-refusee { display: flex; align-items: center; gap: .75rem; font-size: .8rem; color: var(--bulma-text-weak); }
.photos-refusees .photo-refusee + .photo-refusee { margin-top: .5rem; }
.photos-refusees .photo-refusee img { flex: none; width: auto; height: auto; max-width: 6rem; max-height: 4.5rem; object-fit: contain; border-radius: 4px; filter: grayscale(1); opacity: .5; }
.photos-refusees .infos-refusee { flex: 1; min-width: 0; }
.photos-refusees .retablir-photo { flex: none; }
@media (max-width: 600px) { .article-web { padding: 1.25rem 1rem; } .article-web .titre-article { font-size: 1.5rem; } }

.article-web .pied-article { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--bulma-border-weak); }
.article-web .pied-article .signature { margin-bottom: .25rem; font-size: .85rem; color: var(--bulma-text); }
/* PS : petit texte après la signature, en fin d'article. */
.article-web .pied-article .ps-article { margin: .35rem 0 .5rem; font-size: .85rem; font-style: italic; color: var(--bulma-text); }
.article-web .pied-article .credits { font-size: .75rem; color: var(--bulma-text-weak); }

.article-web figure.non-place { padding: .5rem; background: var(--non-place-fond); outline: 2px dashed var(--non-place-trait); outline-offset: 2px; }

.laterale .etat-extraction { margin-left: .25rem; font-size: .7rem; }

/* --- Recherche dans les articles --- */
.laterale .extrait-article { display: block; margin-top: .15rem; font-size: .7rem; line-height: 1.3; color: var(--bulma-text-weak); font-weight: 400; }
.laterale .extrait-article mark { padding: 0 .1em; border-radius: 2px; }
#liste-groupes.filtree .poignee { visibility: hidden; }

/* --- Page d'un article : pages à gauche (largeur fixe), texte à droite --- */
.colonnes-article { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.colonne-pages { position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow-y: auto; padding: .25rem .5rem .5rem .25rem; }
.mosaique.mosaique-article { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .5rem; }
.colonne-texte .article-web { margin: 0; max-width: 46rem; }
/* Minimap de l'article (public/js/minimap.js) : copie réduite, semi-transparente, figée à l'écran sur le bord droit de
   la carte ; cadre de la partie visible. Ordinateur seulement. */
.colonne-texte .article-web { position: relative; }
@media (min-width: 1024px) { .colonne-texte .article-web.avec-minimap { padding-right: calc(2.5rem + 66px); } }
.minimap-article { position: absolute; top: .75rem; right: .35rem; bottom: .75rem; width: 66px; z-index: 3; pointer-events: none; }
.minimap-fixe {
  position: sticky; top: .5rem; height: calc(100vh - 1rem); max-height: 100%; pointer-events: auto; cursor: pointer;
  opacity: .45; transition: opacity .15s;
}
.minimap-fixe:hover { opacity: .95; }
.minimap-copie {
  position: relative; overflow: hidden; margin-left: auto; border-radius: 3px;
  background: var(--bulma-scheme-main); box-shadow: 0 0 0 1px var(--bulma-border);
}
.minimap-copie > .article-web { position: absolute; top: 0; left: 0; margin: 0; max-width: none; transform-origin: 0 0; box-shadow: none; }
.minimap-copie .minimap-article { display: none; }
.minimap-vue {
  position: absolute; top: 0; right: 0; border-radius: 3px; pointer-events: none;
  background: color-mix(in srgb, var(--bulma-link) 18%, transparent); box-shadow: 0 0 0 2px var(--bulma-link);
}
@media (max-width: 1023px) { .minimap-article { display: none; } }

/* Vue visionneuse des pages (page d'un groupe) : la colonne des pages prend toute la place restante, l'article garde
   sa largeur de lecture, la colonne de droite (voisins, liens connexes) se resserre ; les trois occupent toute la largeur. */
@media (min-width: 1024px) {
  .colonnes-article.vue-visionneuse { grid-template-columns: minmax(18rem, 1fr) 1.5rem min(46rem, 55%); gap: 0; }
  .colonnes-article.vue-visionneuse .colonne-pages { max-height: calc(100vh - 1rem); }
}
@media (min-width: 1400px) {
  .colonnes-article.vue-visionneuse { grid-template-columns: minmax(18rem, 1fr) 1.5rem calc(46rem + 13rem + 1.25rem); }
  .vue-visionneuse .article-et-liens { grid-template-columns: minmax(0, 46rem) 13rem; column-gap: 1.25rem; }
  .vue-visionneuse .colonne-droite-article { font-size: .82rem; gap: .6rem; }
  .vue-visionneuse .colonne-droite-article .voisin-article { padding: .5rem; gap: .3rem; }
  .vue-visionneuse .colonne-droite-article .voisin-vignette { width: 3.25rem; height: 2.75rem; }
  .vue-visionneuse .colonne-droite-article .liens-connexes { padding: .65rem .75rem; }
}
/* Séparation glissable des colonnes (vue visionneuse, ordinateur ; groupe.js, `brancherSeparateur`) : piste de 1.5rem
   entre les colonnes, collante sur la hauteur de l'écran ; largeur réglée (`largeur-reglee`, `--largeur-pages` en % de
   la grille) bornée à 18rem pour les pages et 30rem pour l'article, sans jamais déborder. */
.separateur-colonnes { display: none; }
@media (min-width: 1024px) {
  .colonnes-article.vue-visionneuse > .separateur-colonnes {
    display: block; position: sticky; top: .5rem; height: calc(100vh - 1rem); cursor: col-resize; touch-action: none; user-select: none;
    border-radius: 4px; outline: none;
    background: linear-gradient(var(--bulma-border), var(--bulma-border)) center / 2px 100% no-repeat;
  }
  .colonnes-article.vue-visionneuse > .separateur-colonnes::before {
    content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 2.75rem; transform: translate(-50%, -50%);
    border-radius: 3px; background: var(--bulma-border);
  }
  .colonnes-article.vue-visionneuse > .separateur-colonnes:is(:hover, :focus-visible, .glisse) {
    background-image: linear-gradient(var(--bulma-link), var(--bulma-link));
  }
  .colonnes-article.vue-visionneuse > .separateur-colonnes:is(:hover, :focus-visible, .glisse)::before { background: var(--bulma-link); }
  .colonnes-article.vue-visionneuse > .separateur-colonnes:focus-visible { box-shadow: 0 0 0 2px var(--teinte-lien); }
  .colonnes-article.vue-visionneuse > .separateur-colonnes.glisse::after { display: none; }
  .colonnes-article.vue-visionneuse.largeur-reglee {
    grid-template-columns: max(18rem, min(var(--largeur-pages, 50%), 100% - 31.5rem)) 1.5rem minmax(0, 1fr);
  }
}
body.glisse-colonnes { cursor: col-resize; user-select: none; }
body.glisse-colonnes iframe { pointer-events: none; }
.bascule-vue-pages .button.is-link { color: var(--bulma-link-invert); }
.mini-visionneuse { margin-bottom: .75rem; }
.ruban-pages { display: flex; gap: .4rem; overflow-x: auto; overflow-y: hidden; padding: .2rem .1rem .45rem; margin-bottom: .5rem; }
.ruban-page {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 3.4rem; padding: .15rem;
  border: 2px solid transparent; border-radius: var(--bulma-radius); background: none; cursor: pointer; color: var(--bulma-text-weak); font-size: .7rem;
}
.ruban-page img { display: block; width: 100%; height: auto; box-shadow: var(--ombre-legere); }
.ruban-page:hover { border-color: var(--filet-lien); }
.ruban-page.active { border-color: var(--bulma-link); color: var(--bulma-link); font-weight: 700; }
.mini-cadre { position: relative; }
.mini-page { display: block; cursor: zoom-in; }
.mini-page img { display: block; width: 100%; height: auto; box-shadow: var(--ombre-legere); }
/* Flèches posées sur la page (pastilles sombres sur image, exception assumée du thème). */
.mini-fleche {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mini-fleche.precedente { left: .4rem; }
.mini-fleche.suivante { right: .4rem; }
.mini-fleche:hover:not(:disabled) { background: rgba(0, 0, 0, .75); }
.mini-fleche:disabled { background: rgba(0, 0, 0, .2); color: rgba(255, 255, 255, .45); cursor: default; }
@media (max-width: 1023px) {
  .colonnes-article { grid-template-columns: minmax(0, 1fr); }
  .colonne-pages { position: static; max-height: none; }
  .mosaique.mosaique-article { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* Liens connexes de l'article : à droite de l'article sur grand écran, dessous sinon ; masqués en édition. */
/* Colonne de droite (grand écran) : articles précédent et suivant au-dessus des liens connexes, collants ensemble ;
   sous l'article sinon, liens connexes d'abord puis voisins (ordre inversé par `order`). */
.article-et-liens { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "onglets" "audio" "article" "droite"; align-items: start; }
.article-et-liens > #vue-article { grid-area: article; min-width: 0; }
.article-et-liens > .colonne-droite-article { grid-area: droite; display: flex; flex-direction: column; min-width: 0; }
.colonne-droite-article > .voisins-article { order: 2; }
.liens-connexes { max-width: 46rem; margin: 2rem 0 0; padding: 1rem 1.1rem; }
@media (min-width: 1400px) {
  .article-et-liens { grid-template-columns: minmax(0, 46rem) 18rem; grid-template-areas: "onglets onglets" "audio droite" "article droite"; column-gap: 1.5rem; }
  .article-et-liens > .colonne-droite-article { grid-row: 2 / span 2; position: sticky; top: .5rem; gap: 1rem; }
  .colonne-droite-article > .voisins-article { order: 0; grid-template-columns: minmax(0, 1fr); margin: 0; }
  .colonne-droite-article > .voisins-article > span { display: none; }
  .colonne-droite-article .voisin-article.suivant { text-align: left; }
  .colonne-droite-article .voisin-article.suivant .voisin-corps { flex-direction: row; }
  .colonne-droite-article .voisin-vignette { width: 4.5rem; height: 3.75rem; }
  .liens-connexes { margin: 0; }
}
.article-et-liens.en-edition { grid-template-columns: minmax(0, 1fr); grid-template-areas: "onglets" "article" "droite"; }

/* Version audio de l'article (synthèse vocale) : au-dessus de l'article ; lecteur du service en iframe,
   en schéma clair (fond transparent autour de sa carte blanche, aussi en mode sombre). */
.article-et-liens > .audio-article { grid-area: audio; min-width: 0; max-width: 46rem; margin: 0 0 1.25rem; padding: .8rem 1rem; }
.audio-entete { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .6rem; }
.audio-titre { display: flex; align-items: center; gap: .45rem; font-size: .95rem; font-weight: 700; margin: 0; }
.audio-titre > .fa-headphones { color: var(--bulma-link); }
.audio-actions { margin-left: auto; }
.audio-message:not(:empty) { margin-top: .6rem; }
.audio-notification { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem .75rem; padding: .6rem .8rem; margin-bottom: .5rem !important; }
.audio-lecteur:not(:empty) { margin-top: .5rem; }
/* color-scheme: normal : sinon, page en sombre, le navigateur peint un fond opaque derrière l'iframe (lecteur transparent en thème dark). */
.lecteur-tta { display: block; width: 100%; height: 96px; border: 0; color-scheme: normal; background: transparent; }
.lecteur-tta.en-attente { height: 0 !important; visibility: hidden; }
.audio-natif { display: block; width: 100%; }
.audio-repli { margin-top: .25rem; }
.audio-infos { color: var(--bulma-text-weak); margin-top: .35rem; }
.audio-infos:empty { display: none; }
.audio-consignes { color: var(--bulma-text-weak); margin-top: .35rem; overflow-wrap: anywhere; white-space: pre-line; }
.audio-consignes:empty { display: none; }

/* Onglets des articles d'un groupe de pages (au moins deux) : largeur partagée, titres tronqués. */
.onglets-articles { grid-area: onglets; display: flex; align-items: stretch; min-width: 0; margin-bottom: 1.25rem; border-bottom: 1px solid var(--bulma-border); }
.article-et-liens:not(.en-edition) .onglets-articles { max-width: calc(46rem + 18rem + 1.5rem); }
.onglet-article { flex: 1 1 0; min-width: 0; display: flex; align-items: center; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; }
.onglet-article:hover { border-bottom-color: var(--bulma-border); }
.onglet-article.is-active { border-color: var(--bulma-border); border-bottom: 2px solid var(--bulma-link); background: var(--teinte-lien); }
.onglet-article-lien { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .4rem; padding: .55rem .35rem .55rem .7rem; color: var(--bulma-text-weak); font-weight: 600; font-size: .9rem; }
.onglet-article.is-active .onglet-article-lien { color: var(--bulma-link); }
.onglet-article-titre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onglet-article-rang { flex: none; display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .3rem; border-radius: 999px; font-size: .72rem; background: var(--bulma-scheme-main-ter); color: var(--bulma-text); }
.onglet-article.is-active .onglet-article-rang { background: var(--bulma-link); color: var(--bulma-link-invert); }
.onglet-article.est-vide .onglet-article-titre { font-style: italic; }
.onglet-marque { flex: none; font-size: .75rem; }
.onglet-article-ajouter { flex: none; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; margin-right: .2rem; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--bulma-text-weak); cursor: pointer; }
.onglet-article-ajouter { align-self: center; margin: 0 0 0 .35rem; }
.onglet-article-ajouter:hover:not(:disabled) { color: var(--bulma-link); background: var(--teinte-lien); }
.onglet-article-ajouter:disabled { color: var(--bulma-border); cursor: default; }
/* Pendant l'édition : autres onglets pâlis par la couleur (le clic est ignoré par groupe.js ; l'info-bulle reste lisible). */
.onglets-articles.en-edition .onglet-article:not(.is-active) .onglet-article-lien { cursor: default; color: var(--bulma-border); }
.liens-connexes-entete { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.liens-connexes-titre { display: flex; align-items: center; gap: .45rem; font-size: .95rem; font-weight: 700; margin: 0; }
.liens-connexes-titre > .fa-link { color: var(--bulma-link); }
.liens-connexes-compte { font-size: .7rem; height: 1.4em; }
.liste-liens-connexes { margin: 0; }
.liste-liens-connexes .liens-vide { padding: .35rem 0; }
.lien-connexe { display: flex; align-items: flex-start; gap: .45rem; padding: .55rem 0; border-top: 1px solid var(--bulma-border-weak); }
.lien-connexe:first-child { border-top: 0; }
.lien-connexe.sortable-ghost { opacity: .45; }
.lien-connexe.en-modification { display: block; }
.poignee-lien { flex: none; padding: .2rem .1rem; color: var(--bulma-text-weak); cursor: grab; font-size: .8rem; }
.poignee-lien:active { cursor: grabbing; }
.icone-lien { flex: none; display: flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); color: var(--bulma-link); font-size: .8rem; }
.corps-lien { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.corps-lien .titre-lien { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.corps-lien .url-lien, .corps-lien .origine-lien { font-size: .72rem; line-height: 1.35; color: var(--bulma-text-weak); overflow-wrap: anywhere; }
.actions-lien { flex: none; display: flex; }
.actions-lien .button { width: 1.9rem; height: 1.9rem; padding: 0; color: var(--bulma-text-weak); }
.actions-lien .supprimer-lien:hover { color: var(--bulma-danger); }
/* Vignette du QR code au survol (ou au focus clavier) de son origine. */
.origine-qrcode { position: relative; align-self: flex-start; cursor: help; }
.apercu-qrcode { display: none; position: absolute; z-index: 30; left: 0; bottom: calc(100% + 6px); padding: .35rem; background: #fff; border-radius: var(--bulma-radius); box-shadow: var(--bulma-shadow); }
.apercu-qrcode img { display: block; width: 7.5rem; height: auto; }
.origine-qrcode:hover .apercu-qrcode, .origine-qrcode:focus-visible .apercu-qrcode { display: block; }
.form-lien { padding: .6rem 0 .15rem; }
.form-lien-ajout { border-top: 1px solid var(--bulma-border-weak); margin-top: .35rem; }
/* Pastille « QR code » sur une vignette de l'onglet Photos (sur image : toujours sombre). */
.vignette-photo > a { position: relative; }
.pastille-qrcode { position: absolute; left: .3rem; bottom: .3rem; padding: .1rem .4rem; border-radius: 999px; background: rgba(10, 10, 20, .8); color: #fff; font-size: .68rem; font-weight: 600; white-space: nowrap; }
.pastille-qrcode[data-tooltip]:hover::after { left: 0; transform: none; white-space: normal; width: 14rem; overflow-wrap: anywhere; }

/* Suppression d'une zone : petit bouton au coin haut droit, seulement zones montrées. */
.zone-supprimer {
  display: none; position: absolute; z-index: 2; width: 1.15rem; height: 1.15rem; padding: 0;
  transform: translate(-60%, -40%); border: 0; border-radius: 999px; line-height: 1;
  background: #e5484d; color: #fff; font-size: .65rem; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}
.zone-supprimer:hover { background: #c62a2f; transform: translate(-60%, -40%) scale(1.15); }
.visionneuse.zones-visibles .zone-supprimer { display: flex; align-items: center; justify-content: center; }

/* --- Barre de l'application : logo, grands onglets, menu burger --- */
body { position: relative; }
.barre-app { --barre-fond: var(--barre-app-fond); background: var(--barre-fond); min-height: 3.75rem; z-index: 30; }
.barre-app .navbar-brand { flex: 1; min-width: 0; align-items: stretch; min-height: 3.75rem; padding: 0 .75rem; }
.barre-app .logo-app { padding: .5rem .75rem .5rem .25rem; }
.barre-app .logo-app img { height: 1.4rem; max-height: none; width: auto; }
.barre-app .logo-app:hover, .barre-app .logo-app:focus-visible { background: transparent; opacity: .8; }
.onglets-app { display: flex; align-items: stretch; min-width: 0; margin-left: .75rem; }
.barre-app .navbar-item.onglet-app {
  gap: .6rem; padding: 0 1.25rem; font-size: 1.15rem; font-weight: 600; color: rgba(255, 255, 255, .7);
  border-bottom: 4px solid transparent; padding-top: 4px; white-space: nowrap;
}
.barre-app .navbar-item.onglet-app:hover { background: rgba(255, 255, 255, .08); color: #fff; border-bottom-color: rgba(255, 255, 255, .3); }
.barre-app .navbar-item.onglet-app.is-active { background: rgba(255, 255, 255, .06); color: #fff; border-bottom-color: var(--bulma-link, #485fc7); }
/* Libellé court d'un onglet (« Agenda ») : petits écrans seulement (bloc « Mobile » plus bas). */
.onglet-app .libelle-court { display: none; }
.menu-app { margin-left: auto; align-self: center; flex: none; }
.menu-app .dropdown-trigger .button { width: 2.5rem; background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.menu-app .dropdown-trigger .button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.barre-app + .section { padding-top: 1.75rem; }
@media (max-width: 768px) {
  .barre-app .navbar-brand { padding: 0 .5rem; }
  .barre-app .logo-app { padding-right: .25rem; }
  .barre-app .logo-app img { height: .78rem; } /* logo plus large que haut (6,35:1) : même largeur que l’ancien */
  .onglets-app { margin-left: .25rem; }
  .barre-app .navbar-item.onglet-app { padding: 0 .6rem; font-size: 1rem; gap: .4rem; }
  .barre-app + .section { padding-top: 1.25rem; }
}
@media (max-width: 400px) {
  .barre-app .navbar-item.onglet-app { padding: 0 .45rem; font-size: .95rem; }
  .barre-app .navbar-item.onglet-app i { display: none; }
}

/* --- Page Options --- */
.option-taches { max-width: 40rem; }
/* Types de page : tableau éditable, actions en icônes au bout de chaque ligne. */
.table-types td { vertical-align: middle; }
.table-types .actions-type { white-space: nowrap; }
.table-types .exclu input { cursor: pointer; accent-color: var(--bulma-link); }
/* Actions de ligne : bulle sur le côté gauche, toujours dans le tableau (même en dernière ligne). */
.actions-type [data-tooltip]:hover::after { top: 50%; left: auto; right: calc(100% + 6px); transform: translateY(-50%); }
.apercu-icone { min-width: 2.5rem; }
.curseur-taches { display: flex; align-items: center; gap: 1rem; }
.curseur-taches input[type=range] { flex: 1; accent-color: var(--bulma-link); height: 1.5rem; cursor: pointer; }
.curseur-taches output { min-width: 2.5rem; justify-content: center; font-weight: 700; }
.graduations { display: flex; justify-content: space-between; margin-right: 3.5rem; padding: 0 .35rem; font-size: .7rem; color: var(--bulma-text-weak); }
/* Jusqu'à 20 graduations : sous 600 px, seuls 1 et les multiples de 5 restent écrits (`graduation-mineure`, options.js). */
@media (max-width: 600px) { .graduations .graduation-mineure { visibility: hidden; } }

/* Progression d'une extraction, avec « Lancer tout de suite » à droite. */
.ligne-progression { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Barre d'outils des pages d'un article (colonne de gauche). */
.barre-pages { margin-bottom: .6rem; }
.barre-pages #compte-pages { margin-left: .25rem; }
/* Trace des pages de l'article exclues de l'affichage (publicité, sommaire…). */
.colonne-pages .pages-exclues { display: inline-block; margin: -.3rem 0 .6rem .35rem; cursor: help; }
.colonne-pages .pages-exclues[data-tooltip]:hover::after { left: 0; transform: none; white-space: normal; width: 16rem; }

/* --- Édition d'un article --- */
.barre-edition {
  position: sticky; top: .5rem; z-index: 5; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  max-width: 46rem; margin-bottom: 1rem; padding: .6rem 1rem; border-radius: var(--bulma-radius-large);
  background: var(--bulma-scheme-main); box-shadow: var(--bulma-shadow);
}
.barre-edition .aide-edition { flex: 1; min-width: 12rem; }
.article-edition .etiquette-secteur {
  margin: 1rem 0 .2rem; font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bulma-text-weak);
}
.article-edition .etiquette-secteur:first-child { margin-top: 0; }
.article-edition [contenteditable="true"] { outline: 1px dashed transparent; outline-offset: 3px; border-radius: 3px; min-height: 1.4em; }
.article-edition [contenteditable="true"]:hover { outline-color: var(--bulma-border); }
.article-edition [contenteditable="true"]:focus { outline: 2px solid var(--bulma-link); background: var(--teinte-lien); }
.article-edition [contenteditable="true"]:empty::before { content: attr(data-placeholder); color: var(--bulma-text-weak); font-style: italic; font-weight: 400; }
.corps-edition { display: flex; flex-direction: column; gap: .35rem; }
.composant .bloc-contenu { min-width: 0; }
.composant { position: relative; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .35rem; align-items: start; padding: .15rem 0; border-radius: 4px; }
.composant:hover { background: var(--bulma-scheme-main-bis); }
.poignee-composant {
  display: flex; align-items: center; gap: .2rem; padding: .35rem .2rem; cursor: grab; color: var(--bulma-text-weak);
  font-size: .75rem; user-select: none;
}
.poignee-composant:active { cursor: grabbing; }
.poignee-composant .type-icone { color: var(--bulma-link); }
.composant .outils-composant { display: flex; align-items: center; gap: .2rem; opacity: 0; transition: opacity .15s; }
.composant:hover .outils-composant, .composant:focus-within .outils-composant { opacity: 1; }
.composant .type-composant { font-size: .7rem; padding: .1rem; border: 1px solid var(--bulma-border); border-radius: 4px; background: var(--bulma-scheme-main); }
.composant .supprimer-composant { border: 0; background: transparent; color: var(--bulma-text-weak); cursor: pointer; padding: .2rem .35rem; border-radius: 4px; }
.composant .supprimer-composant:hover { color: var(--bulma-danger); background: var(--teinte-danger); }
.composant[data-type="paragraphe"] .bloc-contenu > .contenu { line-height: 1.7; }
.composant[data-type="intertitre"] .bloc-contenu > .contenu { font-size: 1.25rem; font-weight: 700; }
.composant[data-type="citation"] .bloc-contenu > .contenu { font-size: 1.2rem; font-style: italic; font-weight: 600; padding-left: .8rem; border-left: 3px solid var(--bulma-link); }
.composant[data-type="encadre"] .bloc-contenu > .contenu { padding: .6rem .8rem; background: var(--bulma-scheme-main-ter); }
.composant[data-type="legende"] .bloc-contenu > .contenu { font-size: .85rem; color: var(--bulma-text-weak); }
.composant[data-type="puce"] .bloc-contenu > .contenu { position: relative; padding-left: 1.4rem; line-height: 1.7; }
.composant[data-type="puce"] .bloc-contenu > .contenu::before { content: "•"; position: absolute; left: .4rem; color: var(--bulma-link); font-weight: 700; }
.composant .photo-article { margin: 0; }
.legende-edition { font-size: .85rem; color: var(--bulma-text-weak); margin-top: .35rem; }
.marque-edition { max-width: 46rem; margin-bottom: .6rem; }
/* En édition, photos en vignettes : les composants se déplacent plus facilement. */
.article-edition .photo-article { display: flex; gap: .75rem; align-items: flex-start; margin: .25rem 0; }
.article-edition .photo-article img { width: auto; height: auto; max-width: 9rem; max-height: 6.5rem; margin: 0; flex: none; object-fit: contain; border-radius: 4px; }
.article-edition .photo-article .legende-edition { flex: 1; margin-top: 0; }
/* Image de l'éditeur et bouton « Choisir une autre image » (médiathèque) en dessous ; secteur de la photo principale. */
.article-edition .cadre-image-edition { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; flex: none; }
.article-edition .photo-article.avec-titre-photo .cadre-image-edition { grid-row: span 2; }
.secteur-principale { margin-bottom: .75rem; }
/* Photo d'une galerie : titre au-dessus de la notule, à droite de la vignette. */
.article-edition .photo-article.avec-titre-photo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: .75rem; row-gap: .25rem; align-items: start; }
.article-edition .photo-article.avec-titre-photo img { grid-row: span 2; }
.article-edition .titre-photo-edition { font-weight: 700; color: var(--bulma-text-strong); }
/* En édition : pleine largeur de la colonne, et le même caractère que l'article publié. */
.colonne-texte .editeur-article .article-web.article-edition, .colonne-texte .editeur-article .barre-edition { max-width: none; width: 100%; }
.composant[data-type="paragraphe"] .bloc-contenu > .contenu { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; line-height: 1.75; }

/* Proposition d'assemblage d'une photo en double page. */
.proposition-double { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: 46rem; }

/* Barre de mise en forme, sous la barre d'édition (qui reste collée en haut). */
.barre-format { flex-basis: 100%; display: flex; align-items: center; gap: .15rem; flex-wrap: wrap; padding-top: .45rem; border-top: 1px solid var(--bulma-border-weak); }
.barre-format .separateur { width: 1px; height: 1.2rem; margin: 0 .3rem; background: var(--bulma-border); }
.barre-format .outil-format { position: relative; }
.barre-format .outil-format.actif { color: var(--bulma-link); background: var(--teinte-lien); box-shadow: none; }
.article-web u { text-decoration: underline; }
.article-web s { text-decoration: line-through; }

/* Insertion d'un composant au curseur. */
.barre-format .groupe-insertion { display: inline-flex; align-items: center; gap: .15rem; margin-left: auto; }
.popover-photos { right: 0; left: auto; width: 20rem; }
.grille-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; max-height: 16rem; overflow-y: auto; }
.choix-photo { padding: 0; border: 2px solid transparent; border-radius: 4px; background: var(--bulma-scheme-main-bis); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.choix-photo:hover { border-color: var(--bulma-link); }
.choix-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.composant.insere { background: var(--teinte-lien); transition: background .6s; }
.groupe-insertion [data-tooltip]:hover::after { left: auto; right: 0; transform: none; }

/* Attribution d'une exergue. */
.article-web .exergue .auteur-exergue { margin-top: .4rem; font-size: .85rem; font-style: normal; font-weight: 600; color: var(--bulma-text-weak); }
.composant .auteur-edition { margin-top: .3rem; font-size: .85rem; font-weight: 600; color: var(--bulma-text-weak); }

/* Sélection de blocs : case devant la poignée, actions groupées sur la ligne « Contenu »,
   case tous / aucun dans la colonne des cases des blocs. */
.editeur-article .composant { grid-template-columns: 1.6rem 2.4rem minmax(0, 1fr) auto; }
.coche-bloc { display: flex; align-items: center; justify-content: center; min-height: 1.9rem; cursor: pointer; user-select: none; }
.coche-bloc input, .groupe-blocs .tout-rien input { cursor: pointer; accent-color: var(--bulma-link); }
.composant.coche { background: var(--teinte-lien); }
.groupe-blocs { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: .15rem; margin: 1rem 0 .2rem; }
/* Au moins un bloc coché : la barre des blocs reste visible en défilant, sous la barre d'édition. */
.groupe-blocs.collante {
  position: sticky; top: var(--haut-barre-blocs, .5rem); z-index: 4; padding: .2rem .35rem;
  background: var(--bulma-scheme-main); border-radius: var(--bulma-radius); box-shadow: var(--ombre-outil);
}
.groupe-blocs > .etiquette-secteur { margin: 0 .5rem 0 .35rem; }
.groupe-blocs .tout-rien { display: flex; align-items: center; justify-content: center; width: 1.6rem; min-height: 1.9rem; cursor: pointer; }
.groupe-blocs .tout-rien[data-tooltip]:hover::after { left: 0; transform: none; }
.groupe-blocs .compte-coches { min-width: 1.2rem; font-size: .75rem; font-weight: 700; color: var(--bulma-link); text-align: center; }
.popover-type-blocs { left: 0; right: auto; width: 16rem; }

/* --- Onglet Photos --- */
.grille-photos-magazine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.vignette-photo { margin: 0; }
.vignette-photo > a { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); cursor: zoom-in; }
.vignette-photo img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; }
.vignette-photo > a:hover img { transform: scale(1.04); }
.vignette-photo figcaption { display: flex; align-items: center; justify-content: space-between; margin-top: .2rem; }
.vignette-photo .telecharger-photo { position: relative; padding: .1rem .3rem; color: var(--bulma-text-weak); }
.vignette-photo .telecharger-photo:hover { color: var(--bulma-link); }

/* Visionneuse de photos */
.visionneuse-photo .modal-content { width: min(92vw, 1400px); max-height: 94vh; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.photo-plein-ecran { margin: 0; display: flex; justify-content: center; }
.photo-plein-ecran img { width: auto; height: auto; max-width: 92vw; max-height: 82vh; object-fit: contain; background: #fff; }
/* Visionneuse des doubles pages : même habillage, plus large (deux pages côte à côte). */
#modale-double .modal-content { width: min(96vw, 2000px); }
#modale-double .photo-plein-ecran img { max-width: 96vw; }
.barre-photo { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.barre-photo .photo-infos { color: #ddd; }
.barre-photo .photo-infos a { color: #fff; text-decoration: underline; }
.description-photo { max-width: min(92vw, 60rem); color: #eee; font-size: .85rem; text-align: center; }
.description-photo .texte-image { margin-top: .3rem; color: #bbb; white-space: pre-line; }
.description-photo .texte-image i { margin-right: .35rem; }
#controle-recherche-photos { flex: 1; min-width: 12rem; max-width: 28rem; }
:is(#filtre-photos, #bascule-pubs) .button.is-selected { background: var(--bulma-link); color: #fff; border-color: var(--bulma-link); }
#bascule-pubs { flex-wrap: nowrap; }
.visionneuse-photo .modal-content { overflow-y: auto; }
.visionneuse-photo .modal-content:has(.description-photo:not(.is-hidden)) .photo-plein-ecran img { max-height: 70vh; }
.description-photo { font-weight: 400; }
@media (max-width: 600px) {
  #outils-photos .level-left { width: 100%; }
  #controle-recherche-photos { flex: 1 1 100%; width: 100%; max-width: none; }
  #filtre-photos { flex-wrap: nowrap; }
  /* Trois filtres : icônes seules (info-bulle et aria-label gardent le libellé). */
  #filtre-photos .button > span:not(.icon) { display: none; }
  #filtre-photos .button .icon { margin: 0; }
  /* Bascule des pubs (onglet Pages) : icônes seules sous 600 px, comme les filtres des photos. */
  #bascule-pubs .button > span:not(.icon) { display: none; }
  #bascule-pubs .button .icon { margin: 0; }
}

/* --- Onglet Articles --- */
#liste-articles-extraits { display: flex; flex-direction: column; gap: .6rem; }
.carte-article { display: flex; gap: 1rem; align-items: flex-start; margin: 0 !important; padding: .75rem; color: inherit; }
.carte-article:hover { box-shadow: var(--ombre-carte-survol); }
.carte-article-photo { flex: none; width: 7rem; height: 5.5rem; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); color: var(--bulma-text-weak); }
.carte-article-photo img { width: 100%; height: 100%; object-fit: cover; }
.carte-article-texte { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.carte-surtitre { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bulma-link); }
.carte-titre { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }
.carte-chapeau { font-size: .85rem; color: var(--bulma-text-weak); }
.carte-infos { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .75rem; margin-top: .25rem; font-size: .75rem; color: var(--bulma-text-weak); }

/* --- Onglet Doubles pages : planches larges, 3 par ligne au plus sur bureau, 1 sur mobile --- */
.grille-doubles-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.vignette-double { margin: 0; min-width: 0; position: relative; }
/* Case d'une double page (décochée : plus renvoyée par l'API) et double page décochée, pâlie par la couleur du fond. */
.vignette-double .case-double {
  position: absolute; top: .4rem; left: .4rem; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main); box-shadow: var(--ombre-legere); cursor: pointer;
}
.vignette-double .case-double input { width: 1.1rem; height: 1.1rem; cursor: pointer; accent-color: var(--bulma-link); }
.vignette-double.exclue .image-double img { filter: grayscale(1) opacity(.35); }
.vignette-double.exclue figcaption { color: var(--bulma-text-weak); text-decoration: line-through; }
.vignette-double .image-double { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); }
.vignette-double img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; }
.vignette-double .image-double:hover img { transform: scale(1.03); }
.vignette-double figcaption { display: flex; flex-direction: column; gap: .1rem; margin-top: .3rem; }
.vignette-double .titre-double { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
#mode-doubles .button.is-selected { background: var(--bulma-link); color: var(--bulma-link-invert); border-color: var(--bulma-link); }
#outils-doubles .level-left { flex-wrap: wrap; gap: .5rem; }

/* --- Page d'un article : cards vers l'article précédent et le suivant --- */
.voisins-article { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; max-width: 46rem; margin-top: 2rem; }
.voisin-article { display: flex; flex-direction: column; gap: .5rem; margin: 0 !important; padding: .75rem; color: inherit; }
.voisin-article:hover { box-shadow: var(--ombre-carte-survol); color: inherit; }
.voisin-article.suivant { text-align: right; }
.voisin-article.suivant .voisin-corps { flex-direction: row-reverse; }
.voisin-sens { font-weight: 600; }
.voisin-corps { display: flex; gap: .75rem; align-items: flex-start; }
.voisin-vignette { flex: none; width: 5.5rem; height: 4.5rem; overflow: hidden; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); }
.voisin-vignette img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.voisin-texte { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.voisin-surtitre { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bulma-link); }
.voisin-titre { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .voisins-article { grid-template-columns: minmax(0, 1fr); }
  .voisins-article > span { display: none; }
}

/* Origine du magazine sur sa carte : PDF ou archive XML Immanens. */
.carte-magazine .couverture { position: relative; }
.pastille-source {
  position: absolute; top: .5rem; left: .5rem; z-index: 1; display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pastille-source.pdf { background: rgba(38, 42, 51, .85); }
.pastille-source.immanens { background: rgba(62, 86, 214, .92); }
/* Magazine qui a des suppléments (accueil) : trombone sous la pastille d'origine, toujours sur la couverture (fond sombre). */
.pastille-supplements {
  position: absolute; top: 2.05rem; left: .5rem; z-index: 1; display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700;
  color: #fff; background: rgba(120, 60, 170, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pastille-supplements[data-tooltip]:hover::after { left: 0; transform: none; white-space: normal; width: max-content; max-width: 16rem; }

/* --- Kiosque : sections de magazines --- */
.sections-kiosque { display: flex; flex-direction: column; gap: 1rem; }
.section-kiosque { margin: 0 !important; padding: .75rem 1rem; }
.section-kiosque.ouverte { padding-bottom: 1.25rem; }
/* Section ouverte : moins haute que la fenêtre, pour laisser voir en dessous l'en-tête de la section suivante (amenée
   en haut de l'écran à l'ouverture) ; en-tête et onglets restent en place, la mosaïque défile dans la section. */
.section-kiosque { scroll-margin-top: .75rem; }
.section-kiosque.ouverte { display: flex; flex-direction: column; max-height: calc(100dvh - 7.5rem); }
.section-kiosque.ouverte > * { flex: none; }
.section-kiosque.ouverte > .grille-kiosque { flex: 1 1 auto; min-height: 12rem; overflow-y: auto; overscroll-behavior: contain; padding: .25rem .4rem .5rem .1rem; }
.entete-section { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .5rem; }
.poignee-section {
  flex: none; display: flex; align-items: center; align-self: stretch; padding: 0 .25rem;
  color: var(--bulma-text-weak); cursor: grab; opacity: .5; touch-action: none; user-select: none;
}
.poignee-section:hover { opacity: 1; }
.poignee-section:active { cursor: grabbing; }
.poignee-section[data-tooltip]:hover::after { left: 0; transform: none; }
.lien-section { flex: 1 1 14rem; min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .25rem; border-radius: var(--bulma-radius); color: inherit; }
.lien-section:hover { background: var(--bulma-scheme-main-bis); color: inherit; }
.logo-section {
  flex: none; display: flex; align-items: center; justify-content: flex-start; width: 7rem; height: 2.5rem;
}
.logo-section :is(img, svg) { max-width: 100%; max-height: 100%; object-fit: contain; object-position: left center; }
.logo-section.sans-logo { justify-content: center; width: 2.5rem; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); color: var(--bulma-text-weak); }
.textes-section { display: flex; flex-direction: column; min-width: 0; }
.titre-section { font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.infos-section { font-size: .8rem; color: var(--bulma-text-weak); }
.candidats-section { font-size: .8rem; font-weight: 600; color: var(--etat-info-texte); }
.chevron-section { margin-left: auto; color: var(--bulma-text-weak); transition: transform .15s; }
.section-kiosque.ouverte .chevron-section { transform: rotate(180deg); }
.outils-section { display: flex; align-items: center; gap: .15rem; margin-left: auto; padding: .2rem .3rem; border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main-bis); }
.outils-section .separateur { width: 1px; height: 1.2rem; margin: 0 .2rem; background: var(--bulma-border); }
.section-vide { margin: .75rem 0 0 2rem; }
.grille-kiosque {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; margin-top: 1rem;
}
.carte-kiosque { position: relative; }
.carte-kiosque { display: flex; flex-direction: column; }
.carte-kiosque .carte-magazine { height: auto; flex: 1; margin-bottom: 0; }
.carte-kiosque .retirer-magazine {
  position: absolute; top: .4rem; right: .4rem; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pastille-case); color: var(--bulma-text); box-shadow: var(--ombre-pastille);
  opacity: 0; transition: opacity .12s;
}
.carte-kiosque:hover .retirer-magazine, .carte-kiosque .retirer-magazine:focus-visible { opacity: 1; }
.carte-kiosque .retirer-magazine:hover { color: var(--bulma-danger); }
.carte-kiosque .retirer-magazine[data-tooltip]:hover::after { left: auto; right: 0; transform: none; }
@media (hover: none) { .carte-kiosque .retirer-magazine { opacity: 1; } }
.grille-kiosque .fantome { opacity: .35; }

/* Onglets par support d'une section (défilables : .tabs de Bulma a overflow-x auto) */
.onglets-supports { margin: .75rem 0 0 2rem; }
.onglets-supports:not(:last-child) { margin-bottom: 0; }
.onglets-supports a { gap: .45rem; padding: .4em .8em; }
.onglets-supports :is(img, svg) { display: block; height: 1.25rem; width: auto; max-width: 7rem; object-fit: contain; }
.onglets-supports .tag { height: 1.5em; padding: 0 .5em; font-size: .7rem; }
.onglets-supports li:not(.is-active) :is(img, svg.logo-multicolore) { opacity: .75; }
.onglets-supports li.onglet-sans-resultat a { opacity: .45; }
.onglets-supports + .grille-kiosque, .onglets-supports + .section-vide { margin-top: 1rem; }
/* Glisser d'une card : les autres onglets sont des cibles de dépôt (réaffectation au support) */
.onglets-supports.depot-possible li:not(.is-active) a { border-bottom-style: dashed; }
.onglets-supports.depot-possible li.cible-depot a {
  background: var(--teinte-lien); color: var(--bulma-link); border-bottom: 2px solid var(--bulma-link);
  box-shadow: inset 0 0 0 2px var(--bulma-link); border-radius: var(--bulma-radius) var(--bulma-radius) 0 0;
}
.onglets-supports.depot-possible .onglet-support[data-tooltip]:hover::after { display: none; }
.notif-flottante .annuler-notif { vertical-align: baseline; }
.notif-flottante.notif-bas { top: auto; bottom: 1rem; }

/* --- Corriger et ajuster avec l'IA (js/correction-ia.js, champs `data-ia`) --- */
.champ-ia { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.input.avec-ia, .textarea.avec-ia { padding-right: 2.2rem; }
[contenteditable].avec-ia { padding-right: 1.8rem; }
.bouton-ia {
  position: absolute; z-index: 5; top: 50%; right: .25rem; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer;
  /* Pâle par la couleur, jamais par opacity (l'info-bulle pâlirait aussi). */
  color: color-mix(in srgb, var(--bulma-link) 40%, transparent);
  transition: color .15s, background-color .15s;
}
.bouton-ia.haut { top: .3rem; transform: none; }
.bouton-ia:hover, .bouton-ia:focus-visible, .bouton-ia.en-cours { color: var(--bulma-link); background: color-mix(in srgb, var(--bulma-link) 12%, transparent); }
.bouton-ia.en-cours i { animation: fa-beat 1s infinite; }
.fenetre-ia {
  position: fixed; z-index: 90; width: min(26rem, calc(100vw - 1rem)); padding: .6rem .75rem .7rem;
  background: var(--bulma-scheme-main); color: var(--bulma-text); border: 1px solid var(--bulma-border);
  border-radius: .5rem; box-shadow: var(--ombre-flottante); font-size: .875rem; text-align: left;
}
.fenetre-ia-tete { position: relative; display: flex; align-items: center; gap: .4rem; padding-right: 1.5rem; margin-bottom: .45rem; font-weight: 600; color: var(--bulma-link); }
.fenetre-ia-tete .bulle-fermer { position: absolute; top: 0; right: 0; }
.fenetre-ia-texte { max-height: 14rem; overflow-y: auto; white-space: pre-wrap; padding: .45rem .55rem; border-radius: .35rem; background: var(--bulma-scheme-main-bis); border: 1px solid var(--bulma-border-weak); }
.fenetre-ia-corrections { margin: .4rem 0 0 1.1rem; list-style: disc; font-size: .78rem; color: var(--bulma-text-weak); }
.fenetre-ia-consigne, .fenetre-ia-attente, .fenetre-ia-rien { margin-top: .3rem; font-size: .8rem; color: var(--bulma-text-weak); }
.fenetre-ia-erreur { color: var(--bulma-danger); }

/* Magazines à ajouter : petite liste horizontale sous les onglets, défilement dans son conteneur */
.propositions-section { margin: 1rem 0 0 2rem; }
.onglets-supports + .propositions-section { margin-top: .9rem; }
.propositions-section + .grille-kiosque, .propositions-section + .section-vide { margin-top: 1rem; }
.titre-propositions {
  display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bulma-text-weak);
}
.titre-propositions .tag { height: 1.5em; padding: 0 .5em; font-size: .7rem; }
.titre-propositions .tout-ajouter { height: 1.9em; padding: 0 .65em; font-size: .7rem; text-transform: none; letter-spacing: 0; }
@media (max-width: 768px) { .titre-propositions .tout-ajouter { min-height: 40px; } }
.liste-propositions { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem .1rem .35rem; }
.proposition {
  flex: none; display: flex; align-items: center; gap: .5rem; width: 13rem; min-height: 40px;
  padding: .3rem .4rem; text-align: left; cursor: pointer;
  border: 1px dashed var(--bulma-border); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-bis);
}
.proposition:hover, .proposition:focus-visible { border-color: var(--bulma-link); background: var(--teinte-lien); }
.proposition[disabled] { cursor: default; color: var(--bulma-text-weak); border-style: solid; }
.vignette-proposition {
  flex: none; width: 1.9rem; aspect-ratio: 210 / 297; background: var(--bulma-scheme-main-ter); box-shadow: var(--ombre-legere);
}
.vignette-proposition img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.textes-proposition { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.textes-proposition > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titre-proposition { font-size: .8rem; font-weight: 600; }
.infos-proposition, .support-proposition { font-size: .7rem; color: var(--bulma-text-weak); }
.plus-proposition { flex: none; width: 1.4rem; text-align: center; color: var(--bulma-link); }

/* Support associé sur une card : petit bouton discret et son menu */
.support-carte { display: flex; max-width: 100%; min-width: 0; }
/* Pied de carte : poignée de glisser-déposer, puis support associé. */
.pied-carte-kiosque { display: flex; align-items: center; gap: .25rem; margin-top: .35rem; min-width: 0; }
.poignee-carte {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.8rem; border-radius: var(--bulma-radius); color: var(--bulma-text-weak);
  cursor: grab; touch-action: none; user-select: none;
}
.poignee-carte:hover { background: var(--bulma-scheme-main-ter); color: var(--bulma-text); }
.poignee-carte:active { cursor: grabbing; }
.poignee-carte[data-tooltip]:hover::after { left: 0; transform: none; }
.support-carte .dropdown-trigger { min-width: 0; max-width: 100%; }
.bouton-support-carte {
  display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .1rem .4rem;
  border: 0; border-radius: var(--bulma-radius); background: transparent; color: var(--bulma-text-weak);
  font-size: .72rem; cursor: pointer;
}
.bouton-support-carte span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bouton-support-carte .fa-chevron-down { font-size: .6rem; }
.bouton-support-carte:hover, .support-carte.is-active .bouton-support-carte { background: var(--bulma-scheme-main-ter); color: var(--bulma-text); }
.support-carte .dropdown-menu { min-width: 12rem; z-index: 30; }
.intitule-menu-support { font-size: .72rem; color: var(--bulma-text-weak); text-transform: uppercase; letter-spacing: .04em; }
/* Intitulé d'une section d'un menu « … » (page du magazine) : petit, en capitales, non cliquable. */
.dropdown-item.intitule-menu { font-size: .68rem; font-weight: 600; color: var(--bulma-text-weak); text-transform: uppercase; letter-spacing: .05em; padding-top: .35rem; padding-bottom: .1rem; cursor: default; }
.dropdown-item.intitule-menu:hover { background: none; }
.sortable-fallback { opacity: .9 !important; }

/* Modale de section : logo */
.logo-section-champ { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.apercu-logo-section {
  display: flex; align-items: center; justify-content: center; width: 10rem; height: 4rem; padding: .35rem;
  border: 1px dashed var(--bulma-border); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-bis);
}
.apercu-logo-section img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-section-champ .file-name { max-width: 12rem; }

/* Modale de section : supports choisis dans le champ multiple, montrés seulement dans la liste ordonnée */
.ts-wrapper.supports-section .ts-control > .item { display: none; }
.ts-wrapper.supports-section .ts-control > input { min-width: 12rem; }
.liste-supports-section { list-style: none; margin: .5rem 0 0 !important; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.liste-supports-section:empty { display: none; }
.support-section {
  display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem;
  border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main);
}
.support-section.fantome { opacity: .35; }
.poignee-support { flex: none; padding: 0 .2rem; color: var(--bulma-text-weak); cursor: grab; touch-action: none; user-select: none; }
.poignee-support:active { cursor: grabbing; }
.poignee-support[data-tooltip]:hover::after { left: 0; transform: none; }
.rang-support { flex: none; min-width: 1.2rem; font-size: .8rem; font-weight: 600; color: var(--bulma-text-weak); text-align: right; }
.support-section :is(img, svg) { flex: none; width: auto; max-width: min(200px, 100%); height: 24px; object-fit: contain; object-position: left center; }
.nom-support { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-section .retirer-support { flex: none; }
/* Nom de l'onglet du support dans la section (facultatif) : à droite du logo, passe à la ligne sur mobile. */
.support-section .libelle-onglet { flex: 0 1 13rem; min-width: 8rem; }
@media (max-width: 600px) { .support-section { flex-wrap: wrap; } .support-section .libelle-onglet { flex: 1 1 100%; order: 5; } }
.intertitre-ajout { margin: .6rem .5rem .2rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bulma-text-weak); }
.intertitre-ajout:first-child { margin-top: 0; }

/* Modale d'ajout de magazines */
.liste-ajout { display: flex; flex-direction: column; gap: .15rem; }
.ligne-ajout { display: flex; align-items: center; gap: .75rem; padding: .35rem .5rem; border-radius: var(--bulma-radius); cursor: pointer; }
.ligne-ajout:hover { background: var(--bulma-scheme-main-bis); }
.ligne-ajout input { flex: none; accent-color: var(--bulma-link); cursor: pointer; }
.ligne-ajout.deja { cursor: default; opacity: .6; }
.vignette-ajout { flex: none; width: 2.6rem; aspect-ratio: 210 / 297; background: var(--bulma-scheme-main-ter); box-shadow: var(--ombre-legere); }
.vignette-ajout img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.textes-ajout { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.titre-ajout .logo-support { height: 1.3rem; max-width: 10rem; }

@media (max-width: 600px) {
  .section-kiosque { padding: .6rem .6rem; }
  .logo-section { width: 4.5rem; height: 2rem; }
  .titre-section { font-size: 1.05rem; }
  .outils-section { margin-left: 1.75rem; }
  .section-vide, .onglets-supports, .propositions-section { margin-left: 0; }
  .proposition { width: 11.5rem; }
  .grille-kiosque { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .ligne-ajout .tag { display: none; }
}

/* --- API d'intégration : jetons (Options) et page de documentation --- */
.table-jetons td { vertical-align: middle; }
.table-jetons .actions-type { white-space: nowrap; }
.table-destinations td { vertical-align: middle; }
.table-destinations .actions-type { white-space: nowrap; }
.table-destinations .c-supports .tag { margin: 0 .25rem .25rem 0; }
/* Modale d'une destination WordPress : supports en liste défilante. */
.liste-supports-destination { max-height: 14rem; overflow-y: auto; padding: .5rem .75rem; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); }
.liste-supports-destination .checkbox { padding: .15rem 0; }
.table-routes td { vertical-align: middle; }
.table-routes td:first-child { width: 4.5rem; }
/* Quatre grands onglets (Magazines, Kiosque, Médiathèque, API) : resserrés sur les plus petits écrans. */
@media (max-width: 600px) {
  .onglet-app .libelle-long { display: none; }
  .onglet-app .libelle-court { display: inline; }
}
@media (max-width: 400px) {
  .barre-app .navbar-item.onglet-app { padding: 0 .35rem; font-size: .9rem; }
}
@media (max-width: 360px) {
  .barre-app .navbar-brand { padding: 0 .35rem; }
  .barre-app .logo-app { padding-left: 0; padding-right: .1rem; }
  .barre-app .logo-app img { height: .65rem; }
  .onglets-app { margin-left: 0; }
  .barre-app .navbar-item.onglet-app { padding: 0 .3rem; font-size: .8rem; }
  .menu-app .dropdown-trigger .button { width: 2.1rem; }
}

/* --- Compteur des tâches dans la barre de l'application --- */
.barre-app .navbar-item.compteur-taches {
  margin-left: auto; align-self: center; gap: .35rem; padding: .35rem .55rem; border-radius: 6px;
  color: rgba(255, 255, 255, .85); font-weight: 600; flex: none;
}
.barre-app .navbar-item.compteur-taches:hover, .barre-app .navbar-item.compteur-taches.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.compteur-taches .compte:not(:empty) {
  min-width: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--bulma-link, #485fc7);
  color: #fff; font-size: .72rem; line-height: 1.25rem; text-align: center;
}
.compteur-taches:not(.is-hidden) + .menu-app { margin-left: .35rem; }
@media (max-width: 360px) {
  .barre-app .navbar-item.compteur-taches { padding: .3rem .3rem; gap: .2rem; }
  .compteur-taches:not(.is-hidden) + .menu-app { margin-left: .15rem; }
}

/* Aperçu des tâches accroché au compteur (commun.js, `brancherApercuTaches`) : position calculée sous le bouton. */
.apercu-taches {
  position: fixed; z-index: 60; max-height: min(70vh, 32rem); overflow-y: auto; padding: .75rem;
  background: var(--bulma-scheme-main); color: var(--bulma-text); border: 1px solid var(--bulma-border);
  border-radius: 8px; box-shadow: var(--ombre-survol); font-size: .82rem;
}
.apercu-taches-entete { margin-bottom: .4rem; }
.apercu-taches-files { margin-bottom: .5rem; }
.apercu-taches-files li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .1rem 0; }
.apercu-taches-nombres { display: flex; gap: .25rem; flex: none; }
.apercu-taches-titre { margin-top: .5rem; font-weight: 600; color: var(--bulma-text-weak); text-transform: uppercase; font-size: .7rem; letter-spacing: .03em; }
.apercu-tache { display: flex; align-items: baseline; gap: .45rem; padding: .25rem 0; border-top: 1px solid var(--bulma-border); }
.apercu-tache > i { flex: none; color: var(--bulma-text-weak); }
.apercu-tache.etat-en_cours > i { color: var(--bulma-link); }
.apercu-tache-texte { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apercu-tache-avance { flex: none; color: var(--bulma-text-weak); font-size: .75rem; }
.apercu-taches-plus, .apercu-taches-vide { color: var(--bulma-text-weak); font-size: .75rem; padding-top: .2rem; }

/* --- Page Tâches --- */
.page-taches .resume-taches { display: flex; flex-direction: column; gap: .75rem; }
.chiffres-taches { display: flex; flex-wrap: wrap; gap: .75rem 2.5rem; }
.chiffres-taches .heading { margin-bottom: .1rem; }
.chiffres-taches .chiffre { display: flex; align-items: center; gap: .35rem; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.chiffres-taches .chiffre span { font-size: 1rem; font-weight: 500; color: var(--bulma-text-weak); }
.files-resume { display: flex; flex-wrap: wrap; gap: .35rem; }
.files-resume .file-resume { white-space: normal; height: auto; min-height: 1.5rem; }
.files-resume .file-resume.active { background: var(--etat-info-fond); color: var(--etat-info-texte); font-weight: 600; }
.onglets-taches .compte-onglet { margin-left: .35rem; }
.onglets-taches .compte-onglet:empty { display: none; }
.onglets-taches li[data-onglet="toutes"] { margin-left: auto; }
.recherche-taches { width: 100%; margin-bottom: .75rem; }
.filtres-taches { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.filtres-taches .select, .filtres-taches select { max-width: 100%; }
.filtres-taches .etat-sonde { margin-left: auto; }
.bloc-taches { margin-bottom: 1.75rem; }
.bloc-taches .title { display: flex; align-items: center; gap: .1rem; margin-bottom: .6rem; }
.bloc-taches .compte-bloc:empty { display: none; }
.bloc-taches .compte-bloc { margin-left: .5rem; }
.liste-taches { display: flex; flex-direction: column; gap: .5rem; }
.tache {
  display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .9rem; min-width: 0;
  border: 1px solid var(--bulma-border-weak, #ededed); border-radius: 8px; background: var(--bulma-scheme-main, #fff);
}
.tache .icone-tache {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bulma-background, #f5f5f5); color: var(--bulma-text-weak);
}
.tache .icone-tache.etat-en_cours { background: var(--etat-info-fond); color: var(--etat-info-texte); }
.tache .icone-tache.etat-attente { background: var(--etat-attente-fond); color: var(--etat-attente-texte); }
.tache .icone-tache.etat-terminee { background: var(--etat-succes-fond); color: var(--etat-succes-texte); }
.tache .icone-tache.etat-erreur { background: var(--etat-danger-fond); color: var(--etat-danger-texte); }
/* Extraction annulée : neutre (ni succès ni échec). */
.tache .icone-tache.etat-annulee { background: var(--bulma-background); color: var(--bulma-text-weak); }
.tag.tag-annulee { background: var(--bulma-background); color: var(--bulma-text-weak); }
.tache .corps-tache { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.tache .entete-tache { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.tache .origine-tache { font-size: .75rem; color: var(--bulma-text-weak); }
.tache .cible-tache { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .9rem; font-size: .9rem; min-width: 0; }
.tache .cible-tache:empty { display: none; }
.tache .magazine-tache { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; min-width: 0; }
.tache .magazine-tache span { color: var(--bulma-text); font-weight: 500; }
.tache .logo-tache { max-height: 1.1rem; max-width: 7rem; width: auto; }
.tache .article-tache, .tache .source-tache { min-width: 0; overflow-wrap: anywhere; }
.tache .source-tache { font-size: .8rem; color: var(--bulma-text-weak); }
.tache .progress { margin: .2rem 0 0; height: .5rem; }
.tache .libelle-avancement { font-size: .8rem; overflow-wrap: anywhere; }
.tache .erreur-tache { font-size: .85rem; color: var(--etat-danger-texte); overflow-wrap: anywhere; }
.tache .dates-tache { font-size: .75rem; color: var(--bulma-text-weak); }
.tache .actions-tache { flex: none; display: flex; gap: .15rem; }
.tache .bouton-prioriser { font-weight: 600; }
.tache .etapes-job { display: flex; flex-wrap: wrap; gap: .3rem; }
.tache .etape-job { white-space: normal; height: auto; min-height: 1.5rem; }
.chiffres-taches .outil-article[data-tooltip]:hover::after { left: 0; transform: none; }
@media (max-width: 600px) {
  .tache { padding: .6rem; gap: .5rem; }
  /* Bouton « Passer en priorité » (icône et texte) : passe sous la tâche plutôt que d'écraser son texte. */
  .tache:has(.bouton-prioriser) { flex-wrap: wrap; }
  .tache .actions-tache:has(.bouton-prioriser) { flex-basis: 100%; justify-content: flex-end; }
  .tache .icone-tache { width: 1.8rem; height: 1.8rem; font-size: .85rem; }
  .filtres-taches .etat-sonde { margin-left: 0; width: 100%; }
  .chiffres-taches { gap: .5rem 1.5rem; }
}
.tache .magazine-tache span { white-space: nowrap; }
.tache.compacte { padding: .5rem .9rem; }
.tache.compacte .corps-tache { gap: .1rem; }
.tache.compacte .icone-tache { width: 1.9rem; height: 1.9rem; font-size: .85rem; }

/* --- Page Statut : services externes et jetons --- */
.bandeau-statut { margin-bottom: 1.5rem; }
.groupe-statut { margin-bottom: 1.5rem; }
.liste-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: .5rem; }
.service-statut {
  display: flex; align-items: flex-start; gap: .75rem; padding: .75rem .9rem; min-width: 0;
  border: 1px solid var(--bulma-border-weak, #ededed); border-radius: 8px; background: var(--bulma-scheme-main, #fff);
}
.service-statut.etat-erreur { border-color: var(--etat-danger-texte); }
.service-statut .icone-service {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bulma-background, #f5f5f5); color: var(--bulma-text-weak);
}
.service-statut.etat-ok .icone-service { background: var(--etat-succes-fond); color: var(--etat-succes-texte); }
.service-statut.etat-erreur .icone-service { background: var(--etat-danger-fond); color: var(--etat-danger-texte); }
.service-statut .corps-service { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.service-statut .entete-service { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.service-statut .adresse-service, .service-statut .message-service { overflow-wrap: anywhere; }
.service-statut .message-service { font-size: .85rem; }
.service-statut .message-service.is-erreur { color: var(--etat-danger-texte); font-weight: 600; }
.jetons-service { list-style: none; margin: .25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.jeton-statut { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-width: 0; }
.jeton-statut code { overflow-wrap: anywhere; }
.jeton-statut .tag { margin-left: auto; }

/* --- Publication d'un magazine (ZIP d'export, API d'intégration) --- */
.publication-magazine { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-right: .5rem; }
.publication-magazine .tag { cursor: default; }
/* « Édition Sogest » et, dessous, dans le flux, l'état de son envoi, à la largeur du bouton (la rangée des actions
   est alignée en haut : la ligne suivante passe sous la mention, sans chevauchement). */
.bloc-sogest-edition { display: inline-flex; flex-direction: column; align-items: center; }
.etat-sogest-edition { width: 0; min-width: 100%; margin-top: .15rem; font-size: .75rem; line-height: 1.3; text-align: center; color: var(--bulma-text-weak, #6b6b6b); }
.etat-sogest-edition:empty { display: none; }
.etat-sogest-edition.erreur { color: var(--bulma-danger, #c0392b); }
.menu-zip .dropdown-item { white-space: nowrap; }
/* Bouton « Publier » accolé à son chevron (autres options de publication : mode rapide). */
.bascule-publication { display: inline-flex; align-items: stretch; }
.bascule-publication:has(#menu-publication:not(.is-hidden)) > #bouton-publication { border-start-end-radius: 0; border-end-end-radius: 0; }
.bascule-publication .bouton-chevron { border-start-start-radius: 0; border-end-start-radius: 0; margin-left: 1px; padding-inline: .65rem; }
.bascule-publication .dropdown-item { white-space: nowrap; }
.bascule-shopify:has(#menu-shopify:not(.is-hidden)) > #lien-shopify { border-start-end-radius: 0; border-end-end-radius: 0; }
.bascule-creer-shopify:has(#menu-creer-shopify:not(.is-hidden)) > #bouton-creer-shopify { border-start-end-radius: 0; border-end-end-radius: 0; }
.bascule-creer-shopify .papier-shopify { white-space: normal; max-width: 22rem; }
.menu-zip button.dropdown-item:disabled { color: var(--bulma-text-weak); cursor: not-allowed; background: none; }

/* --- Navigateur du ZIP publié (zip.html) --- */
/* Liste étroite (environ 28 %), aperçu majoritaire ; empilés sur mobile. */
.navigateur-zip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.navigateur-zip > * { min-width: 0; }
.navigateur-zip .box { min-width: 0; margin-bottom: 0; }
@media screen and (min-width: 769px) {
  .navigateur-zip { grid-template-columns: minmax(250px, 34%) minmax(0, 1fr); align-items: start; }
}
@media screen and (min-width: 1216px) {
  .navigateur-zip { grid-template-columns: minmax(270px, 28%) minmax(0, 1fr); }
}
.barre-chemin { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; min-width: 0; }
.barre-chemin .breadcrumb { min-width: 0; }
.barre-chemin .breadcrumb ul { flex-wrap: wrap; }
.barre-chemin .breadcrumb a { overflow-wrap: anywhere; }
.table-zip { table-layout: fixed; }
.table-zip th:nth-child(2) { width: 4.6rem; }
.table-zip th:nth-child(3) { width: 2.4rem; }
.table-zip td, .table-zip th { padding-left: .35rem; padding-right: .35rem; }
.table-zip td:last-child { padding: .2rem 0; }
.table-zip td { vertical-align: middle; }
.table-zip .nom-zip a { display: flex; align-items: center; gap: .35rem; min-width: 0; color: var(--bulma-text-strong); }
.table-zip .nom-tronque { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-zip .nom-zip a:hover { color: var(--bulma-link); }
.table-zip .nom-zip .icon { flex: none; color: var(--bulma-text-weak); }
.table-zip .ligne-dossier .nom-zip .icon { color: var(--bulma-warning); }
.table-zip .taille-zip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-zip tr.ligne-active td { background: var(--teinte-lien); }
.table-zip .button.is-ghost { color: var(--bulma-text-weak); }
.table-zip .button.is-ghost:hover { color: var(--bulma-link); }
.recherche-zip { margin-bottom: .75rem; }
.recherche-zip .effacer-recherche-zip { position: absolute; top: 0; right: 0; z-index: 5; }
.recherche-zip .effacer-recherche-zip .button { color: var(--bulma-text-weak); text-decoration: none; }
.recherche-zip .effacer-recherche-zip .button:hover { color: var(--bulma-link); }
.table-zip .nom-resultat { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.table-zip .chemin-resultat { font-size: .72rem; color: var(--bulma-text-weak); }
.table-zip mark { background: var(--surlignage); color: inherit; padding: 0 .05em; border-radius: 2px; }
@media screen and (min-width: 769px) {
  .apercu-zip { position: sticky; top: 1rem; }
}
.entete-apercu { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.nom-apercu { min-width: 0; overflow-wrap: anywhere; }
.entete-apercu .buttons { flex-wrap: nowrap; flex: none; }
.texte-zip { max-height: 78vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; padding: .75rem .75rem .75rem 0; background: var(--code-fond); color: var(--code-texte); }
/* Numéros de ligne en compteur CSS : ils ne sont pas copiés avec le texte. */
.code-zip { display: block; counter-reset: ligne; line-height: 1.5; background: none; color: inherit; padding: 0; font-size: inherit; }
.code-zip .ligne-code { display: block; position: relative; min-height: 1.5em; padding-left: calc(var(--chiffres, 3) * 1ch + 1.6rem); }
.code-zip .ligne-code::before {
  counter-increment: ligne; content: counter(ligne); position: absolute; left: 0; width: calc(var(--chiffres, 3) * 1ch + .6rem);
  text-align: right; color: var(--code-numero); user-select: none; opacity: .8;
}
.code-zip .hljs-attr, .code-zip .hljs-attribute, .code-zip .hljs-property, .code-zip .hljs-variable, .code-zip .hljs-template-variable { color: var(--code-cle); }
.code-zip .hljs-string, .code-zip .hljs-regexp, .code-zip .hljs-addition, .code-zip .hljs-link { color: var(--code-chaine); }
.code-zip .hljs-number, .code-zip .hljs-symbol, .code-zip .hljs-bullet { color: var(--code-nombre); }
.code-zip .hljs-literal, .code-zip .hljs-built_in, .code-zip .hljs-type, .code-zip .hljs-title, .code-zip .hljs-section { color: var(--code-litteral); }
.code-zip .hljs-keyword, .code-zip .hljs-selector-tag, .code-zip .hljs-meta, .code-zip .hljs-deletion { color: var(--code-mot-cle); }
.code-zip .hljs-comment, .code-zip .hljs-quote { color: var(--code-commentaire); font-style: italic; }
.code-zip .hljs-tag, .code-zip .hljs-name, .code-zip .hljs-selector-class, .code-zip .hljs-selector-id { color: var(--code-balise); }
.code-zip .hljs-punctuation { color: var(--code-numero); }
.code-zip .hljs-emphasis { font-style: italic; }
.code-zip .hljs-strong { font-weight: 700; }
.image-zip { display: flex; justify-content: center; padding: .5rem; border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-ter); }
.image-zip img { max-width: 100%; max-height: 75vh; object-fit: contain; }
/* Pastille d'état sur la couverture d'une carte : en bas à gauche (l'origine est en haut). */
.pastille-publication {
  position: absolute; bottom: .5rem; left: .5rem; z-index: 1; display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .45rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pastille-publication.publie { background: rgba(35, 138, 84, .92); }
/* ZIP publié en mode rapide (sans versions haute définition) : pastille bleue, jeton du thème. */
.pastille-publication.publie.rapide { background: var(--pastille-rapide); }
/* Publié, pas encore visible dans le kiosque (veille de la parution à 17 h) : pastille violette, jeton du thème. */
.pastille-publication.publie.programme { background: var(--pastille-programme); }
.pastille-publication.non-publie { background: rgba(90, 94, 104, .9); }
.pastille-publication.en-cours { background: rgba(200, 130, 0, .92); }
.pastille-publication[data-tooltip]:hover::after { top: auto; bottom: calc(100% + 6px); left: 0; transform: none; white-space: normal; width: max-content; max-width: 14rem; }
/*
 * Alertes d'un magazine (accueil filtré sur un support), en bas à droite de la couverture : date de parution erronée
 * d'après le calendrier (rouge), nombre de pages incohérent avec le support (orange).
 */
.pastilles-alerte { position: absolute; bottom: .5rem; right: .5rem; z-index: 1; display: inline-flex; gap: .3rem; }
.pastilles-alerte > :hover { position: relative; z-index: 2; }
.pastilles-alerte .pastille-pages { background: rgba(214, 120, 0, .95); }
.pastille-date {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; border-radius: 999px; font-size: .8rem; color: #fff;
  background: rgba(204, 15, 53, .92); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.pastille-date[data-tooltip]:hover::after { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; transform: none; white-space: normal; width: max-content; max-width: 16rem; }
/* Kiosque : magazine non publié estompé (absent de l'API), net au survol. */
.carte-kiosque.non-publie .carte-magazine { opacity: .55; filter: grayscale(.7); transition: opacity .15s, filter .15s; }
.carte-kiosque.non-publie:hover .carte-magazine, .carte-kiosque.non-publie .carte-magazine:focus-visible { opacity: .9; filter: none; }
.tache .magazine-tache { flex: none; flex-wrap: nowrap; }
.tache .magazine-tache .logo-support { height: 1.1rem; width: auto; max-width: 7rem; flex: none; }
.menu-app a[href="taches.html"][data-compte]:not([data-compte=""])::after {
  content: attr(data-compte); margin-left: .4rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--bulma-link, #485fc7); color: #fff; font-size: .7rem; font-weight: 700;
}
@media (max-width: 480px) {
  .barre-app .navbar-item.compteur-taches { display: none; }
  .compteur-taches + .menu-app { margin-left: auto !important; }
  .menu-app .dropdown-trigger .button[data-compte]::before {
    content: attr(data-compte); position: absolute; top: -.35rem; right: -.35rem; min-width: 1rem; height: 1rem; padding: 0 .2rem;
    border-radius: 999px; background: var(--bulma-link, #485fc7); color: #fff; font-size: .6rem; font-weight: 700; line-height: 1rem; text-align: center;
  }
}

/* --- Recherche globale (Ctrl+K, js/omnirecherche.js) ---
   Loupe de la barre de l'application, puis modale : champ en haut, zones côte à côte sur ordinateur
   (magazines, articles), empilées sur téléphone (plein écran sous 600 px, bloc « Mobile »). */
.barre-app .navbar-item.bouton-omni {
  margin-left: auto; align-self: center; flex: none; width: 2.5rem; height: 2.5rem; justify-content: center; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: rgba(255, 255, 255, .85); cursor: pointer; font-size: 1.05rem;
}
.barre-app .navbar-item.bouton-omni:hover, .barre-app .navbar-item.bouton-omni:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
/* La loupe prend la marge automatique : compteur des tâches et burger se serrent à sa droite. */
.barre-app .navbar-item.bouton-omni ~ .navbar-item.compteur-taches { margin-left: .35rem; }
.barre-app .bouton-omni ~ .menu-app { margin-left: .35rem !important; }
.menu-app .entree-omni { display: flex; align-items: center; cursor: pointer; }
.menu-app .entree-omni kbd { margin-left: auto; }
.omni-modale kbd, .menu-app .entree-omni kbd {
  display: inline-block; padding: 0 .35em; border: 1px solid var(--bulma-border); border-bottom-width: 2px; border-radius: 4px;
  background: var(--bulma-scheme-main-bis); color: var(--bulma-text-weak); font: inherit; font-size: .75rem; line-height: 1.5;
}
.omni-modale { justify-content: flex-start; padding-top: 6vh; }
.omni-modale .omni-carte {
  width: min(1100px, calc(100vw - 2rem)); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--bulma-scheme-main); border-radius: var(--bulma-radius-large, 12px); box-shadow: var(--ombre-panneau); overflow: hidden;
}
.omni-entete { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--bulma-border); flex: none; }
.omni-entete .omni-champ { flex: 1; min-width: 0; }
.omni-entete .omni-champ .input { box-shadow: none; }
.omni-corps { flex: 1 1 auto; min-height: 8rem; overflow-y: auto; overscroll-behavior: contain; padding: .75rem 1rem 1rem; }
.omni-etat:empty { display: none; }
.omni-etat { padding: .75rem .25rem; color: var(--bulma-text-weak); }
.omni-etat.omni-erreur { color: inherit; }
.omni-modale.omni-chargement .omni-zones { opacity: .6; transition: opacity .15s .2s; }
.omni-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.omni-zones:empty { display: none; }
.omni-zone { min-width: 0; }
.omni-zone-titre {
  display: flex; align-items: center; margin: 0 0 .4rem; padding: 0 .25rem .35rem; border-bottom: 1px solid var(--bulma-border-weak, var(--bulma-border));
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bulma-text-weak);
}
.omni-liste { display: flex; flex-direction: column; gap: .15rem; }
.omni-resultat {
  display: flex; align-items: flex-start; gap: .75rem; min-height: 2.5rem; padding: .45rem .5rem; border-radius: var(--bulma-radius);
  color: var(--bulma-text); text-decoration: none; scroll-margin: .5rem;
}
.omni-resultat:hover, .omni-resultat.is-active { background: var(--teinte-lien); color: var(--bulma-text-strong); }
.omni-resultat.is-active { box-shadow: inset 3px 0 0 var(--bulma-link); }
.omni-resultat:focus-visible { outline: 2px solid var(--bulma-link); outline-offset: -2px; }
.omni-vignette {
  flex: none; width: 3rem; height: 4.2rem; object-fit: cover; object-position: top; border-radius: 3px;
  background: var(--bulma-scheme-main-ter); box-shadow: var(--ombre-legere);
}
.omni-zone-articles .omni-vignette { width: 4.2rem; height: 3.2rem; object-position: center; }
.omni-vignette-vide { display: flex; align-items: center; justify-content: center; color: var(--bulma-text-weak); box-shadow: none; }
.omni-texte { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.omni-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; min-width: 0; overflow-wrap: anywhere; }
.omni-titre { font-weight: 600; color: var(--bulma-text-strong); line-height: 1.3; }
.omni-titre-article { display: block; }
.omni-numero { font-weight: 700; }
.omni-surtitre { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--bulma-link-text, var(--bulma-link)); }
.omni-meta, .omni-extrait { font-size: .8rem; color: var(--bulma-text-weak); }
.omni-meta > span + span::before { content: '·'; margin-right: .6rem; }
.omni-extrait { display: block; font-style: italic; }
.omni-slug { font-family: var(--bulma-code-family, monospace); }
.omni-etats.tags { margin: .15rem 0 0; }
.omni-etats .tag { margin-bottom: 0; }
.omni-logo { height: 1.25rem; width: auto; max-width: 9rem; flex: none; }
.omni-logo-petit { height: .95rem; max-width: 6rem; }
.omni-resultat mark { background: var(--surlignage); color: inherit; padding: 0 .05em; border-radius: 2px; }
.omni-vide, .omni-reste, .omni-indexation { padding: .4rem .5rem; font-size: .85rem; color: var(--bulma-text-weak); }
.omni-suite { white-space: nowrap; }
.omni-pied {
  display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; flex: none; padding: .55rem 1rem; border-top: 1px solid var(--bulma-border);
  font-size: .75rem; color: var(--bulma-text-weak); background: var(--bulma-scheme-main-bis);
}

/* --- Interrupteur du mode sombre (menu burger, commun.js) --- */
.menu-app .bascule-theme { display: flex; align-items: center; cursor: pointer; }
.menu-app .bascule-theme .interrupteur {
  position: relative; flex: none; width: 2.1rem; height: 1.2rem; margin-left: auto; padding-left: 0;
  border-radius: 999px; background: var(--bulma-border); transition: background .15s;
}
.menu-app .bascule-theme .interrupteur::after {
  content: ''; position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem;
  border-radius: 50%; background: var(--bulma-scheme-main); box-shadow: var(--ombre-pastille); transition: transform .15s;
}
.menu-app .bascule-theme[aria-checked="true"] .interrupteur { background: var(--bulma-link); }
.menu-app .bascule-theme[aria-checked="true"] .interrupteur::after { transform: translateX(.9rem); background: #fff; }
.menu-app .bascule-theme .libelle-theme { margin-right: 1rem; }
/* Même interrupteur sur un bouton (`role="switch"`) : « Vue détaillée », « Voir les dates passées » de la page Planning. */
.bascule-interrupteur { gap: .5rem; }
.bascule-interrupteur .interrupteur {
  position: relative; flex: none; width: 2.1rem; height: 1.2rem;
  border-radius: 999px; background: var(--bulma-border); transition: background .15s;
}
.bascule-interrupteur .interrupteur::after {
  content: ''; position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem;
  border-radius: 50%; background: var(--bulma-scheme-main); box-shadow: var(--ombre-pastille); transition: transform .15s;
}
.bascule-interrupteur[aria-checked="true"] .interrupteur { background: var(--bulma-link); }
.bascule-interrupteur[aria-checked="true"] .interrupteur::after { transform: translateX(.9rem); background: #fff; }

/* --- Verrou d'édition d'un magazine (js/presence.js) : bandeau sous la barre, collant --- */
.bandeau-verrou {
  position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem;
  padding: .6rem 1rem; background: linear-gradient(var(--etat-attente-fond), var(--etat-attente-fond)), var(--bulma-scheme-main); color: var(--etat-attente-texte);
  border-bottom: 1px solid var(--bulma-border);
}
/* Détenteur en train de recharger sa page (grâce de reconnexion) : « Prendre la main » indisponible, pâli par la couleur. */
.bandeau-verrou .prendre-main.en-reconnexion {
  cursor: not-allowed; background: var(--bulma-scheme-main); color: var(--bulma-text-weak); border-color: var(--bulma-border);
}
/*
 * Cadenas d'une card de l'accueil : quelqu'un d'autre a la main sur ce magazine, à la place de la case de sélection
 * (`.verrouillee`, aucune action en lot possible) ; soi-même, en vert sous la case.
 */
.carte-accueil.verrouillee > .case-carte { display: none; }
/* Case et cadenas superposés : la bulle de l'élément survolé passe au-dessus de l'autre. */
.carte-accueil > :is(.case-carte, .pastille-verrou):is(:hover, :focus-visible, :focus-within) { z-index: 6; }
.carte-accueil > .pastille-verrou.moi { top: 2.7rem; }
.carte-accueil > .pastille-verrou {
  position: absolute; top: .4rem; right: .4rem; z-index: 4; display: flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: 6px; background: var(--etat-attente-texte); color: var(--bulma-scheme-main);
  box-shadow: var(--ombre-pastille); font-size: .85rem;
}
.carte-accueil > .pastille-verrou.moi { background: var(--etat-succes-texte); border: 0; padding: 0; cursor: pointer; }
.carte-accueil > .pastille-verrou.moi:hover i::before { content: "\f3c1"; } /* cadenas ouvert au survol : un clic rend la main */
/* Pages séparées en cours de fusion (nouveau.html) : la zone de dépôt ne s'ouvre plus. */
.depot.en-fusion { cursor: progress; }
/*
 * Groupe de pages dont quelqu'un d'autre a la main (page de l'article ouverte), dans la liste des articles de
 * magazine.html : cadenas devant le titre, case de sélection désactivée (js/magazine.js, `groupesTenus`).
 */
#liste-groupes .verrou-article { color: var(--etat-attente-texte); font-size: .8em; cursor: help; }
#liste-groupes li.tenu-par-autre > .coche-article { cursor: not-allowed; }
/*
 * Lecture seule (js/presence.js, `body.lecture-seule`) : quelqu'un d'autre a la main sur ce magazine. Les actions
 * d'édition sont masquées ; le serveur (423) et `api` refusent de toute façon les écritures.
 */
.lecture-seule :is(#publication, .menu-actions, #barre-actions, .barre-articles, #outils-numero, #blocage-publication-extraire, #blocage-publication-ignorer, #ignores-publication-annuler, .liste-bloquants input, label:has(> #blocage-publication-tout),
  .case, .case-carte, #bouton-editer, #extraire-groupe, #outils-mosaique, .visionneuse [data-outil], .visionneuse .v-rotation,
  .visionneuse .v-zones, #bouton-ajouter-article, #lancer-immediat) { display: none !important; }
/*
 * Rôles (DROITS.md, js/commun.js) : `<html data-role>` et, pour le rôle utilisateur, `html.role-lecture` (mêmes
 * actions masquées que la lecture seule ci-dessus, plus `.reserve-editeur`). Rôle encore inconnu : tout ce qui est
 * réservé reste masqué. Le serveur (inc/droits.js) refuse de toute façon.
 */
html:not([data-role]) :is(.reserve-editeur, .reserve-admin),
html[data-role="utilisateur"] .reserve-editeur,
html:not([data-role="administrateur"]) .reserve-admin { display: none !important; }
/* Rôle utilisateur : actions d'édition masquées (lecture, recherche, filtres, téléchargements et liens restent). */
.role-lecture :is(#barre-actions, #doublons-retirer, #doublons-tout-label, .liste-doublons input, .barre-articles, #outils-numero, #blocage-publication-extraire, #blocage-publication-ignorer,
  #ignores-publication-annuler, .liste-bloquants input, label:has(> #blocage-publication-tout), .case, .case-carte,
  #bouton-editer, #extraire-groupe, .visionneuse [data-outil], .visionneuse .v-rotation, .visionneuse .v-zones,
  #bouton-ajouter-article, #lancer-immediat, #annuler-extraction, .coche-article, .coche-dossier, .poignee, a[href^="nouveau.html"],
  .action-article, .menu-article, .choisir-principale, .definir-principale, .retirer-principale, .assembler-double, .ignorer-double,
  .separer-double, .fond-transparent, .fond-transparent-ia, .fond-retablir, .retirer-photo, .retablir-photo, .ignorer-avertissement,
  .onglet-article-ajouter, .ajouter-lien, .modifier-lien, .supprimer-lien, .poignee-lien, .audio-reessayer, .audio-regenerer,
  .audio-regenerer-texte, #image-photopea, .case-double, a[href^="taches.html"]) { display: none !important; }
.auteurs-ressource { margin-top: -1rem; margin-bottom: .5rem; }
.auteurs-ressource:empty { display: none; }
.liste-connectes > li + li { margin-top: .75rem; }
.liste-connectes ul { margin: .25rem 0 0 1rem; }

/* --- Options, onglet « Supports » : un interrupteur par support (même dessin que celui du mode sombre) --- */
/* Supports visibles : liste d'une colonne, visibles d'abord ; interrupteur puis lien « Éditer » sur la même ligne. */
.grille-supports-visibles { display: flex; flex-direction: column; gap: .35rem; max-width: 40rem; }
.support-visible {
  display: flex; align-items: center; gap: .75rem; min-height: 3rem; padding: .5rem .75rem; width: 100%;
  border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main);
  color: var(--bulma-text); font: inherit; text-align: left; cursor: pointer;
}
.support-visible:hover { border-color: var(--bulma-link); }
.carte-support-visible { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.carte-support-visible .support-visible { flex: 1; min-height: 2.6rem; }
.lien-editer-support { flex: none; font-size: .75rem; padding: .1rem .35rem; color: var(--bulma-link); }
.lien-editer-support:hover { text-decoration: underline; }
@media (max-width: 600px) { .lien-editer-support { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .5rem; } }
.support-visible:disabled { cursor: progress; }
.support-visible.est-masque .nom-support-visible { color: var(--bulma-text-weak); filter: grayscale(1); opacity: .55; }
.support-visible .nom-support-visible { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.support-visible :is(img, svg).logo-support-visible { display: block; height: 1.5rem; max-width: 9rem; object-fit: contain; }
.support-visible .interrupteur {
  position: relative; flex: none; width: 2.1rem; height: 1.2rem; border-radius: 999px; background: var(--bulma-border); transition: background .15s;
}
.support-visible .interrupteur::after {
  content: ''; position: absolute; top: .15rem; left: .15rem; width: .9rem; height: .9rem;
  border-radius: 50%; background: var(--bulma-scheme-main); box-shadow: var(--ombre-pastille); transition: transform .15s;
}
.support-visible[aria-checked="true"] .interrupteur { background: var(--bulma-link); }
.support-visible[aria-checked="true"] .interrupteur::after { transform: translateX(.9rem); background: #fff; }

/* Sous-onglet « Tarifs » : un montant par champ, enregistré à la sortie du champ */
.table-tarifs td { vertical-align: middle; }
.table-tarifs td:not(.c-support) { min-width: 8rem; }
.table-tarifs .nom-support-tarif { font-weight: 600; }
.table-tarifs :is(img, svg).logo-support-tarif { display: inline-block; vertical-align: middle; height: 1.5rem; max-width: 9rem; object-fit: contain; }
.table-tarifs .montant-tarif { text-align: right; }
/* Intertitre d'un groupe de supports dans les tarifs (et « Sans groupe »). */
.table-tarifs tr.groupe-tarifs th { padding-top: 1rem; border-bottom: 2px solid var(--bulma-link); color: var(--bulma-text-strong); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.table-tarifs tr.groupe-tarifs th .fa-solid { color: var(--bulma-link); }
.table-tarifs tbody tr.groupe-tarifs:first-child th { padding-top: .4rem; }
/* Groupes de supports (Options, onglet « Supports », sous-onglet « Groupes de supports ») : une carte par groupe. */
/* Une carte par groupe : logo du groupe et nom, supports en texte. */
.grille-groupes-supports { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem; margin-top: .75rem; }
.carte-groupe-supports {
  display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .9rem 1rem;
  border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main); box-shadow: var(--ombre-legere);
}
.entete-carte-groupe { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.logo-carte-groupe { display: flex; align-items: center; min-height: 2.4rem; min-width: 0; font-size: 1.6rem; color: var(--bulma-link); }
.logo-carte-groupe :is(img, svg).logo-support-groupe { display: block; height: 2.2rem; width: auto; max-width: 12rem; object-fit: contain; }
.actions-carte-groupe { display: flex; flex: none; gap: .15rem; }
.nom-carte-groupe { margin: 0; font-weight: 700; color: var(--bulma-text-strong); }
.carte-groupe-supports .supports-groupe { display: flex; flex-wrap: wrap; gap: .3rem; }
.carte-groupe-supports .tag.est-principal { box-shadow: inset 0 -2px 0 var(--bulma-link); }
.apercu-logo-principal { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; opacity: .6; }
.apercu-logo-principal :is(img, svg) { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Planning des numéros (planning.html, page publique planning-partage.html ; js/planning-rendu.js) : tableau des
   étapes par numéro, état Mahalo, alertes, modale d'édition en grille d'étapes. Couleurs du thème seulement. */
.barre-planning { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.barre-planning .field { flex: 1 1 18rem; }
.tableau-planning th, .tableau-planning td { vertical-align: middle; white-space: nowrap; }
.tableau-planning th abbr { text-decoration: none; cursor: help; }
.tableau-planning .remarques-planning { white-space: normal; min-width: 14rem; max-width: 28rem; font-size: .8rem; color: var(--bulma-text-weak); }
.tableau-planning .support-planning { font-weight: 600; white-space: nowrap; }
/* Cases de sélection et barre des actions en lot (lignes cochées). */
.tableau-planning .case-ligne { width: 2rem; text-align: center; }
.barre-lot-planning { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .75rem 0 .25rem; padding: .5rem .75rem;
  border: 1px solid var(--bulma-link); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main-bis); }
/* En-têtes : tri (colonnes chiffrées ou datées) et entonnoir de filtre (colonnes de texte), comme un tableur. */
.tableau-planning .entete-planning { white-space: nowrap; }
.tableau-planning .tri-colonne, .tableau-planning .filtre-colonne { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.tableau-planning .tri-colonne i { color: var(--bulma-text-weak); font-size: .8em; }
.tableau-planning .tri-colonne.actif i, .tableau-planning .filtre-colonne.actif { color: var(--bulma-link); }
.tableau-planning .filtre-colonne { margin-left: .35rem; color: var(--bulma-text-weak); font-size: .75em; min-width: 1.2rem; }
.tableau-planning .reinitialiser-colonnes { background: none; border: 0; padding: .1rem .35rem; cursor: pointer; font: inherit; color: var(--bulma-border); }
.tableau-planning .reinitialiser-colonnes.actif { color: var(--bulma-link); }
.popover-filtre-colonne { position: fixed; z-index: 40; min-width: 13rem; max-width: 20rem; padding: .75rem; }
.popover-filtre-colonne .valeurs-filtre { display: flex; flex-direction: column; gap: .2rem; max-height: 16rem; overflow-y: auto; }
/* Modification sur place (éditeur), comme un tableur : cellule sélectionnée cernée, cellule en cours d'édition. */
.tableau-editable .cellule-editable { cursor: cell; }
.tableau-editable .cellule-editable:focus { outline: 2px solid var(--bulma-link); outline-offset: -2px; }
.tableau-editable .cellule-editable { position: relative; }
/* En édition, le contenu reste en place (masqué) et garde la taille de la cellule ; l'éditeur la recouvre. */
.tableau-editable .cellule-editable.en-edition { color: transparent; }
.tableau-editable .cellule-editable.en-edition > :not(.editeur-cellule) { visibility: hidden; }
.tableau-planning .editeur-cellule { position: absolute; inset: 0; z-index: 5; display: flex; align-items: stretch; color: var(--bulma-text); }
.tableau-planning .editeur-cellule > .input { height: 100%; min-height: 0; border-radius: 0; }
.tableau-planning .editeur-cellule > .select, .tableau-planning .editeur-cellule > .select select { height: 100%; width: 100%; border-radius: 0; }
.tableau-planning .editeur-cellule > .select:not(.is-multiple):not(.is-loading)::after { top: 50%; }
.tableau-planning .editeur-cellule.editeur-etape { right: auto; min-width: 100%; }
.tableau-planning .editeur-cellule.editeur-etape .edition-etape { height: 100%; }
.tableau-planning .editeur-cellule.editeur-etape .input { height: 100%; border-radius: 0; }
.tableau-planning .editeur-cellule.editeur-remarques { bottom: auto; right: auto; width: max(100%, 20rem); box-shadow: var(--ombre-survol); }
.tableau-editable .cellule-editable.enregistrement { opacity: .6; }
.tableau-planning .edition-etape { display: flex; gap: 0; }
.tableau-planning .edition-etape input[type="time"] { width: 6.5rem; }
/* Onglets du planning : même hauteur pour les onglets à logo et en texte (sinon le trait du bas, posé par chaque
   onglet, ne s'aligne pas et manque sous les plus bas), comme les onglets des supports de l'accueil. */
/* Onglets (défilants) et bouton d'export à droite, toujours visible ; le trait des onglets court sous le bouton. */
/* Historique du planning (modale `historique=1`, volet de la modale d'un numéro) et machine à remonter le temps (`le=`). */
.modale-historique-planning { width: min(52rem, calc(100vw - 2rem)); }
.jour-historique { font-weight: 600; margin: .9rem 0 .35rem; }
.jour-historique::first-letter { text-transform: uppercase; }
.jour-historique:first-child { margin-top: 0; }
.liste-evenements { border-left: 2px solid var(--bulma-border); margin-left: .35rem; }
.evenement-planning { padding: .35rem 0 .35rem .85rem; }
.evenement-tete { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.evenement-heure { font-variant-numeric: tabular-nums; color: var(--bulma-text-weak); font-size: .85rem; }
.evenement-titre { font-weight: 600; }
.evenement-tete .voir-instant { margin-left: auto; }
.evenement-changements { font-size: .85rem; margin: .2rem 0 0 .25rem; overflow-wrap: anywhere; }
.evenement-changements del { color: var(--bulma-text-weak); }
.historique-entree summary { cursor: pointer; color: var(--bulma-link); }
.machine-temps-planning { border: 1px solid var(--bulma-link); border-radius: var(--bulma-radius); padding: .6rem .85rem .4rem; background: var(--bulma-scheme-main-bis); }
.machine-temps-entete { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.machine-temps-entete > p { flex: 1 1 14rem; margin: 0; }
.machine-temps-entete .icon { color: var(--bulma-link); }
.curseur-machine-temps { width: 100%; margin-top: .5rem; accent-color: var(--bulma-link); }
.machine-temps-bornes { display: flex; justify-content: space-between; color: var(--bulma-text-weak); }
.machine-temps :is(.reserve-editeur, #action-exporter) { display: none !important; }
.tableau-planning tr.modifiee-instant > * { background: var(--surlignage); }

/* « + Ajouter » et son chevron (« Ajouter avec des consignes ») ; proposition à cocher de la modale des consignes. */
.bascule-ajout-planning { display: inline-flex; align-items: stretch; }
/* En-tête de la page Planning : trop étroit pour tenir sur une ligne, les boutons passent sous le titre puis à la ligne
   (jamais au-delà de l'écran). */
.page-planning > .container > .level.is-mobile { flex-wrap: wrap; row-gap: .75rem; }
.page-planning > .container > .level.is-mobile > .level-right { flex-wrap: wrap; justify-content: flex-end; row-gap: .5rem; flex-shrink: 1; min-width: 0; margin-left: auto; }
.bascule-ajout-planning > #action-ajouter { border-start-end-radius: 0; border-end-end-radius: 0; }
.bascule-ajout-planning .bouton-chevron { border-start-start-radius: 0; border-end-start-radius: 0; margin-left: 1px; padding-inline: .65rem; }
.bascule-ajout-planning .dropdown-item { white-space: nowrap; }
.modale-consignes-planning { width: min(72rem, calc(100vw - 2rem)); }
.proposition-planning td, .proposition-planning th { vertical-align: middle; white-space: nowrap; }
.proposition-planning tr.doublon td { color: var(--bulma-text-weak); }
.proposition-planning tr.doublon .c-champ { color: var(--bulma-text-weak); text-decoration: line-through; }
/* Cellules saisissables comme un tableur : champ sans cadre qui remplit la cellule, cadre de focus seulement. */
.proposition-planning td:has(.c-champ) { padding: 0; }
.proposition-planning .cellule-saisie { display: flex; align-items: center; gap: .25rem; padding-right: .35rem; }
.proposition-planning .c-champ { width: 100%; min-width: 0; min-height: 2.25rem; border: 0; border-radius: 0; background: transparent; color: var(--bulma-text);
  font: inherit; padding: .3rem .5rem; outline: none; }
.proposition-planning select.c-champ { cursor: pointer; padding-right: .25rem; }
.proposition-planning [data-champ="numero"] { width: 4.5rem; flex: none; }
.proposition-planning [data-champ="annee"] { width: 4.25rem; }
.proposition-planning [data-champ="libelle"] { width: 8.5rem; }
.proposition-planning [data-champ="type"] { width: 9.5rem; }
.proposition-planning [data-champ="mention"] { width: 5rem; }
.proposition-planning [data-champ^="etape:"] { width: 9.5rem; flex: none; }
.proposition-planning [data-champ="remarques"] { width: 100%; min-width: 12rem; }
.proposition-planning .c-champ:hover { background: var(--bulma-scheme-main-bis); }
.proposition-planning .c-champ:focus { box-shadow: inset 0 0 0 2px var(--bulma-link); background: var(--bulma-scheme-main); }
.proposition-planning .c-champ::placeholder { color: var(--bulma-text-weak); }
.proposition-planning select.c-champ option { background: var(--bulma-scheme-main); color: var(--bulma-text); }
.proposition-planning .estime { color: var(--bulma-text-weak); font-size: .75rem; margin-left: .25rem; }
.refus-planning { white-space: pre-line; }
.barre-onglets-planning { display: flex; align-items: flex-end; gap: .75rem; border-bottom: 1px solid var(--bulma-border); }
.barre-onglets-planning .tabs { flex: 1 1 auto; min-width: 0; }
.barre-onglets-planning .tabs ul { border-bottom: 0; }
.barre-onglets-planning #action-exporter { flex: none; margin-bottom: .4rem; }
#onglets-planning ul { align-items: stretch; }
#onglets-planning li { display: flex; }
#onglets-planning a { display: flex; align-items: center; min-height: 2.6rem; }
#onglets-planning :is(img, svg).logo-onglet-planning { height: 1rem; width: auto; max-width: 6.5rem; display: block; }
/* Groupe de supports ouvert : ses supports en seconde rangée (pilules), sous la barre des onglets ; à droite, les liens
   vers le calendrier Mahalo de chaque support affiché. */
.ligne-sous-onglets-planning { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .75rem; }
.ligne-sous-onglets-planning:has(> .sous-onglets-planning.is-hidden):has(> .liens-mahalo-planning:empty) { display: none; }
.ligne-sous-onglets-planning .sous-onglets-planning { flex: 0 1 auto; min-width: 0; margin: 0; }
.liens-mahalo-planning { margin-left: auto; }
.liens-mahalo-planning .button { margin-bottom: 0; }
.tabs.sous-onglets-planning { margin: .75rem 0 0; }
.mosaique-calendrier .carte-planning { aspect-ratio: auto; min-height: 13rem; }
.ligne-carte-calendrier { display: block; }
.page-calendrier .sous-onglets-planning a { min-height: 2.2rem; }
.sous-onglets-planning a { display: flex; align-items: center; min-height: 2.2rem; }
.sous-onglets-planning :is(img, svg).logo-onglet-planning { height: .9rem; width: auto; max-width: 6rem; display: block; }
.sous-onglets-planning li.is-active :is(img, svg).logo-onglet-planning { filter: brightness(0) invert(1); }
/* « Ajouter plusieurs numéros » (menu « Ajouter ») : petite fenêtre. */
.modale-plusieurs-planning { width: min(32rem, calc(100vw - 2rem)); }
.modes-plusieurs { display: flex; flex-direction: column; gap: .35rem; }
.modes-plusieurs .radio { margin-left: 0 !important; }
/* Page d'aide du planning (aide-planning.html) : colonne de lecture, captures encadrées. */
.contenu-aide { max-width: 56rem; }
.contenu-aide .chapo-aide { font-size: 1.1rem; margin-bottom: 1.25rem; }
.contenu-aide h2.title { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.contenu-aide ul { margin: 0 0 1rem 1.25rem; list-style: disc; }
.contenu-aide li { margin-bottom: .35rem; line-height: 1.5; }
.sommaire-aide { padding: .75rem 1rem; border: 1px solid var(--bulma-border-weak); border-radius: var(--bulma-radius); background: var(--bulma-scheme-main); }
.sommaire-aide ol { margin: 0 0 0 1.25rem; columns: 2 16rem; }
.capture-aide { margin: 0 0 1rem; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius); overflow: hidden; box-shadow: var(--ombre-legere); }
.capture-aide img { display: block; width: 100%; height: auto; }
.capture-aide.capture-petite { max-width: 24rem; }
.capture-aide.capture-moyenne { max-width: 30rem; }
.captures-cote-aide { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; max-width: 40rem; }
/* Import Excel du planning : revue des lignes (défilement propre), changements d'une ligne qui remplace un numéro. */
.modale-import-planning { width: min(70rem, calc(100vw - 2rem)); }
.tableau-import-defile { max-height: 55vh; overflow-y: auto; }
.tableau-import-planning td { vertical-align: top; font-size: .85rem; }
.tableau-import-planning thead th { position: sticky; top: 0; z-index: 1; background: var(--bulma-scheme-main); }
.tableau-import-planning tr.ligne-import-erreur td, .tableau-import-planning tr.ligne-import-identique td { color: var(--bulma-text-weak); }
.changements-import { margin: 0; list-style: none; }
.changements-import li { line-height: 1.35; }
.changements-import .avant-import { text-decoration: line-through; color: var(--bulma-text-weak); }
#i-choix.is-loading-import { opacity: .5; pointer-events: none; cursor: progress; }
/* Accueil du planning : mosaïque de cartes (planning global, groupes de supports, supports hors groupe). */
.mosaique-planning { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.carte-planning {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; aspect-ratio: 1; min-width: 0; padding: 1rem;
  border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius-large); background: var(--bulma-scheme-main);
  color: var(--bulma-text); text-align: center; box-shadow: var(--ombre-legere); transition: border-color .15s, box-shadow .15s;
}
.carte-planning:hover, .carte-planning:focus-visible { border-color: var(--bulma-link); color: var(--bulma-text); box-shadow: var(--ombre-carte-survol); }
.logo-carte-planning { display: flex; align-items: center; justify-content: center; height: 3rem; width: 100%; font-size: 2rem; color: var(--bulma-link); }
.logo-carte-planning :is(img, svg).logo-carte { height: 2.4rem; width: auto; max-width: 80%; object-fit: contain; }
.nom-seul-carte-planning { font-size: 1.15rem; font-weight: 700; color: var(--bulma-text-strong); }
.nom-carte-planning { font-weight: 600; color: var(--bulma-text-strong); }
.detail-carte-planning { font-size: .8rem; color: var(--bulma-text-weak); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* Logo So Press de la carte « Planning global » : SVG en masque, teint par la couleur du thème. */
.logo-sopress {
  display: block; width: 70%; max-width: 10rem; aspect-ratio: 247.5 / 60; background: var(--bulma-link);
  -webkit-mask: url("../img/sopress-logo.svg") center / contain no-repeat; mask: url("../img/sopress-logo.svg") center / contain no-repeat;
}
.carte-planning-global { border-color: var(--bulma-link); border-width: 2px; }
.carte-planning-global .nom-carte-planning { font-size: 1.15rem; letter-spacing: .04em; }
@media (max-width: 600px) { .mosaique-planning { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .carte-planning { padding: .6rem .5rem; } .detail-carte-planning { -webkit-line-clamp: 2; line-clamp: 2; } }
.tableau-planning :is(img, svg).logo-ligne-planning { height: 1rem; width: auto; max-width: 6rem; display: inline-block; vertical-align: middle; }
.tableau-planning .etape-vide { color: var(--bulma-text-weak); text-align: center; }
.tableau-planning .date-etape { display: block; }
.tableau-planning .heure-etape { display: block; font-size: .72rem; color: var(--etat-attente-texte); }
.tableau-planning .tags-planning { display: inline-flex; gap: .25rem; margin-left: .35rem; vertical-align: middle; }
.tableau-planning tr.annee-planning th { background: var(--bulma-scheme-main-bis); color: var(--bulma-text-strong); font-size: .85rem; }
.type-planning.special { background: var(--etat-info-fond); color: var(--etat-info-texte); }
.type-planning.hors_serie { background: var(--etat-attente-fond); color: var(--etat-attente-texte); }
.etat-mahalo.conforme { background: var(--etat-succes-fond); color: var(--etat-succes-texte); }
/* Orange franc : la date de Mahalo n'est pas celle prévue (jetons du thème, repeints en sombre). */
.etat-mahalo.different { background: var(--etat-ecart-fond); color: var(--etat-ecart-texte); font-weight: 600; }
.etat-mahalo.present { background: var(--etat-info-fond); color: var(--etat-info-texte); }
/* Mention, diffuseur, durée de la fenêtre d'une entrée : Tom Select reprend la classe `input` du champ sur son
   enveloppe ; le cadre est celui de `.ts-control`, pas de l'enveloppe. */
.ts-wrapper.input.liste-saisie { display: block; height: auto; padding: 0; border: 0; box-shadow: none; background: none; }
.ts-wrapper.liste-saisie .ts-control { padding-right: 3.6rem; }
.ts-wrapper.liste-saisie .ts-control > .item { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Croix « Vider » toujours visible quand il y a une valeur (aussi au doigt) ; `position` reprise sur [data-tooltip]. */
.ts-wrapper.liste-saisie .liste-saisie-vider {
  position: absolute; top: 50%; right: 1.9rem; transform: translateY(-50%); opacity: 1; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: var(--bulma-radius);
  background: none; color: var(--bulma-text-weak); font-size: 1.15rem; line-height: 1; cursor: pointer;
}
.ts-wrapper.liste-saisie .liste-saisie-vider:hover { color: var(--bulma-text-strong); background: var(--bulma-background); }
.ts-wrapper.liste-saisie:is(.disabled, :not(.has-items)) .liste-saisie-vider { display: none; }
.etat-mahalo.absent { background: var(--bulma-scheme-main-bis); color: var(--bulma-text-weak); }
.alerte-planning { color: var(--etat-attente-texte); }
.notes-planning { margin-top: 1rem; }
.notes-planning-texte { font-size: .85rem; }
.modale-planning { width: min(56rem, calc(100vw - 2rem)); }
.etapes-planning { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem .75rem; }
.etapes-planning .heure-etape-champ { width: 6.5rem; }
.supports-partage { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .25rem .75rem; }
.liste-partages li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--bulma-border-weak); }
.liste-partages li:last-child { border-bottom: 0; }
/* Boutons d'un lien public toujours sur une ligne, à droite, même sous un titre long (supports nombreux). */
.liste-partages li > div:first-child { min-width: 0; }
.liste-partages li > .buttons { flex: none; flex-wrap: nowrap; margin-bottom: 0; }
.liste-partages li > .buttons .button { margin-bottom: 0; }
/* Colonnes regroupées (retours du service abonnement) : daté et mention sous le numéro, diffuseur sous le dépôt,
   durée sous la fin en kiosque ; pastille des invendus à récupérer ; pastille Mahalo cliquable (report dans Mahalo). */
.tableau-planning .date-numero-planning { display: block; font-size: .75rem; color: var(--bulma-text-weak); }
.tableau-planning .precision-etape { display: block; font-size: .72rem; color: var(--bulma-text-weak); }
.tableau-planning .duree-support { color: var(--bulma-text-weak); font-style: italic; }
.mention-tag-planning { background: var(--bulma-scheme-main-bis); color: var(--bulma-text); }
.invendus-planning { display: inline-flex; margin-top: .15rem; background: var(--etat-attente-fond); color: var(--etat-attente-texte); font-weight: 600; }
.bouton-mahalo { display: inline-flex; align-items: center; background: none; border: 0; padding: 0; font: inherit; color: var(--bulma-text-weak); cursor: pointer; border-radius: var(--bulma-radius); }
.bouton-mahalo:hover .etat-mahalo, .bouton-mahalo:focus-visible .etat-mahalo { box-shadow: 0 0 0 2px var(--bulma-link); }
.bouton-mahalo:hover > i { color: var(--bulma-link); }
.modale-mahalo-planning { width: min(48rem, calc(100vw - 2rem)); }
.liste-mahalo li { display: flex; flex-direction: column; gap: .1rem; padding: .45rem 0 .45rem .75rem; border-left: 3px solid var(--bulma-border); margin-bottom: .35rem; }
.liste-mahalo li.refus { border-left-color: var(--etat-attente-texte); color: var(--bulma-text-weak); }
.liste-mahalo li.ecrit { border-left-color: var(--etat-succes-texte); }
.liste-mahalo li.rien { color: var(--bulma-text-weak); }
.liste-mahalo li > span { font-size: .85rem; }
/* Menu « Colonnes » (vues par métier, colonnes masquées) ; case « Vue détaillée » du menu « … ». */
.menu-colonnes-planning { min-width: 19rem; max-height: min(28rem, 70vh); overflow-y: auto; }
.menu-colonnes-planning .dropdown-item { display: flex; align-items: baseline; gap: .4rem; white-space: normal; padding-right: 1rem; cursor: pointer; }
.menu-colonnes-planning .titre-menu-colonnes { font-size: .75rem; font-weight: 600; color: var(--bulma-text-weak); text-transform: uppercase; letter-spacing: .03em; cursor: default; }
.bascule-affichage-planning .button { min-height: 2.5rem; }
/* Calendrier du planning (js/planning-graphiques.js) : SVG à sa taille, défilement horizontal dans son conteneur. */
.barre-graphique-planning { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .75rem 0 .5rem; }
.barre-graphique-planning .export-graphique-planning { margin-left: auto; }
.vue-graphique-planning { margin-top: .5rem; border: 1px solid var(--bulma-border-weak); border-radius: var(--bulma-radius); }
.vue-graphique-planning svg { display: block; width: 100%; min-width: 40rem; height: auto; }
/* Calendrier à gauche, événements du mois à droite (empilés sous 1024 px). */
.calendrier-planning { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.calendrier-planning .vue-graphique-planning { min-width: 0; }
.evenements-mois {
  margin-top: .5rem; padding: .75rem .9rem; border: 1px solid var(--bulma-border-weak); border-radius: var(--bulma-radius);
  background: var(--bulma-scheme-main); position: sticky; top: .75rem; max-height: calc(100dvh - 1.5rem); overflow-y: auto;
}
.titre-evenements-mois { font-weight: 700; text-transform: capitalize; margin-bottom: .5rem; }
.jour-evenements { margin: .75rem 0 .25rem; font-size: .8rem; font-weight: 600; color: var(--bulma-text-weak); text-transform: capitalize; }
.jour-evenements.est-aujourdhui { color: var(--bulma-danger); }
.liste-evenements-mois { margin: 0; list-style: none; }
.evenement-mois {
  display: flex; flex-direction: column; gap: .05rem; padding: .3rem .5rem; margin-bottom: .2rem;
  border-left: 3px solid var(--bulma-border); border-radius: var(--bulma-radius-small); background: var(--bulma-scheme-main-bis);
  color: var(--bulma-text); font-size: .85rem;
}
.evenement-mois.est-sortie { border-left-color: var(--bulma-link); }
.evenement-mois .libelle-evenement { font-weight: 600; }
/* Un numéro par ligne, cliquable (ouvre le numéro). */
.evenement-mois .numero-evenement {
  display: block; width: calc(100% + .5rem); padding: .1rem .25rem; margin: 0 -.25rem; border: 0; border-radius: var(--bulma-radius-small);
  background: none; color: inherit; font: inherit; font-size: .8rem; text-align: left; cursor: pointer;
}
.evenement-mois .numero-evenement:hover, .evenement-mois .numero-evenement:focus-visible { background: var(--bulma-scheme-main-ter); }
.evenement-mois .heure-evenement { color: var(--bulma-text-weak); }
@media (max-width: 1023px) { .calendrier-planning { grid-template-columns: minmax(0, 1fr); } .evenements-mois { position: static; max-height: none; } }
/* Couleurs des supports et repères des graphiques (lues par le script, portées en dur dans le SVG pour l'export). */
:root {
  --planning-1: #3b6fd6; --planning-2: #d9622b; --planning-3: #2e9e6a; --planning-4: #b0418f; --planning-5: #8a6d1f;
  --planning-6: #0f8c9c; --planning-7: #7a52c7; --planning-8: #c43c4c; --planning-9: #5b7a2b; --planning-10: #6b6f78;
  --planning-aujourdhui: #d64545; --planning-rappel: #c27c00;
}
:root[data-theme="dark"] {
  --planning-1: #6f9bff; --planning-2: #ff8a52; --planning-3: #4fd19a; --planning-4: #e070c0; --planning-5: #d6b24a;
  --planning-6: #45cfdd; --planning-7: #a988ff; --planning-8: #ff6b7d; --planning-9: #9ccc5a; --planning-10: #a3a8b3;
  --planning-aujourdhui: #ff6b6b; --planning-rappel: #f2b33d;
}
/* Impression (bouton « PDF » du calendrier) : le graphique seul, en paysage. */
@media print {
  html.impression-graphique-planning body * { visibility: hidden; }
  html.impression-graphique-planning .vue-graphique-planning, html.impression-graphique-planning .vue-graphique-planning * { visibility: visible; }
  html.impression-graphique-planning .vue-graphique-planning { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; overflow: visible; }
  html.impression-graphique-planning .vue-graphique-planning svg { min-width: 0; width: 100%; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* ==========================================================================
   Mode sombre : mêmes couleurs que le thème sombre de Suivi CA Régie
   (nuit violette, magenta adouci pour l'action, turquoise pour l'information).
   Activé par <html data-theme="dark"> (script en tête de page, js/theme.js),
   l'attribut du thème sombre de Bulma 1.x, dont on repeint les variables.
   Règle : ce bloc redéfinit des jetons ; une règle propre au sombre ne sert
   qu'aux composants tiers (Bulma, Tom Select) dont les couleurs sont figées.
   ========================================================================== */

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Palette de Suivi CA Régie */
  --encre: #e6e0f5;
  --encre-douce: #a094c4;
  --encre-tres-douce: #7566a3;
  --fond: #120b1e;
  --surface: #1a1030;
  --surface-2: #221541;
  --surface-bas: #170e2a;        /* bas des dégradés de surface, champs */
  --trait: #33204f;
  --trait-faible: #261741;
  --trait-fort: #4a2e73;
  --survol: #221541;
  --survol-fort: #2c1b52;
  --accent: #e8629f;
  --accent-vif: #ff7ab8;
  --accent-lueur: rgba(232, 98, 159, .22);
  --cyan: #45cfdd;
  --violet: #9d78e8;
  --positif: #3fd9a4;
  --negatif: #f4728c;
  --negatif-fond: #331525;
  --alerte: #f0b64a;
  --alerte-fond: #33260f;
  --lisere: linear-gradient(90deg, var(--cyan) 0%, var(--violet) 48%, var(--accent) 100%);

  /* Bulma : son thème sombre, repeint */
  --bulma-scheme-h: 268;
  --bulma-scheme-s: 46%;
  --bulma-scheme-main-l: 9%;
  --bulma-scheme-main-bis-l: 12%;
  --bulma-scheme-main-ter-l: 15%;
  --bulma-background-l: 14%;
  --bulma-border-l: 28%;
  --bulma-border-weak-l: 21%;
  --bulma-text-l: 89%;
  --bulma-text-weak-l: 70%;
  --bulma-text-strong-l: 97%;
  --bulma-link-h: 330; --bulma-link-s: 72%; --bulma-link-l: 65%;
  --bulma-primary-h: 330; --bulma-primary-s: 72%; --bulma-primary-l: 65%;
  --bulma-info-h: 186; --bulma-info-s: 69%; --bulma-info-l: 57%;
  --bulma-success-h: 162; --bulma-success-s: 69%; --bulma-success-l: 55%;
  --bulma-warning-h: 40; --bulma-warning-s: 85%; --bulma-warning-l: 62%;
  --bulma-danger-h: 348; --bulma-danger-s: 86%; --bulma-danger-l: 70%;
  --bulma-shadow: 0 0 0 1px var(--trait), 0 6px 22px rgba(0, 0, 0, .4);

  /* Jetons de l'application */
  --fond-page: var(--fond);
  --teinte-lien: rgba(232, 98, 159, .13);
  --filet-lien: rgba(232, 98, 159, .42);
  --teinte-primaire: rgba(232, 98, 159, .13);
  --teinte-danger: var(--negatif-fond);
  --focus-lien: var(--accent-lueur);
  --infobulle-fond: rgba(30, 17, 50, .97);
  --infobulle-texte: var(--encre);
  --infobulle-ombre: 0 0 0 1px var(--trait-fort), 0 6px 22px rgba(0, 0, 0, .5);
  --ombre-legere: 0 1px 2px rgba(0, 0, 0, .45);
  --ombre-survol: 0 6px 22px rgba(0, 0, 0, .5), 0 0 0 1px var(--trait-fort);
  --ombre-carte-survol: 0 0 0 1px var(--accent-lueur), 0 6px 22px rgba(232, 98, 159, .16);
  --ombre-outil: 0 0 0 1px var(--trait-fort);
  --ombre-flottante: 0 6px 22px rgba(0, 0, 0, .5), 0 0 0 1px var(--trait);
  --ombre-panneau: 0 12px 34px rgba(0, 0, 0, .6);
  --pastille-case: rgba(26, 16, 48, .92);
  --ombre-pastille: 0 1px 4px rgba(0, 0, 0, .6);
  --surlignage: rgba(240, 182, 74, .34);
  --non-place-fond: var(--alerte-fond);
  --non-place-trait: var(--alerte);
  --zone-lien: 232 98 159;
  --zone-brouillon: 240 182 74;
  --barre-app-fond: rgba(19, 11, 32, .96);
  /* Logos de supports (souvent des SVG noirs) : petite plaque claire derrière,
     plutôt qu'un filtre d'inversion qui fausserait les logos en couleur. */
  --fond-logo: #e6e0f5;
  --code-fond: var(--surface-bas);
  --code-texte: var(--encre);
  --code-numero: var(--encre-tres-douce);
  --code-cle: #8ab4ff;
  --code-chaine: #7ee2a8;
  --code-nombre: #f3c76a;
  --code-litteral: #d2a8ff;
  --code-mot-cle: #ff8fb1;
  --code-commentaire: #8b7fb0;
  --code-balise: #6fdde8;
  --etat-info-fond: rgba(69, 207, 221, .14);
  --etat-info-texte: #6fdde8;
  --etat-attente-fond: rgba(240, 182, 74, .14);
  --etat-attente-texte: #f3c76a;
  --etat-ecart-fond: rgba(255, 140, 50, .16);
  --etat-ecart-texte: #ffa45c;
  --etat-succes-fond: rgba(63, 217, 164, .14);
  --etat-succes-texte: #6ae0b8;
  --etat-danger-fond: rgba(244, 114, 140, .14);
  --etat-danger-texte: #f792a5;
  --pastille-rapide: rgba(46, 116, 205, .95);
  --pastille-programme: rgba(130, 92, 210, .95);
}

/* --- Fond et barre de l'application --- */
:root[data-theme="dark"] body {
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(157, 120, 232, .14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(69, 207, 221, .10), transparent 55%),
    var(--fond);
  background-attachment: fixed;
}
:root[data-theme="dark"] .barre-app { backdrop-filter: blur(8px); }
:root[data-theme="dark"] .barre-app::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none;
  background: var(--lisere); box-shadow: 0 0 14px rgba(232, 98, 159, .5);
}
:root[data-theme="dark"] .barre-app .navbar-item.onglet-app.is-active { color: #fff; border-bottom-color: var(--accent); }

/* --- Surfaces --- */
:root[data-theme="dark"] :is(.card, .box, .dropdown-content, .modal-card-head, .modal-card-body, .modal-card-foot, .article-web, .barre-edition, .tache, .popover-dossiers) {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-bas) 100%);
  border-color: var(--trait);
}
:root[data-theme="dark"] .modal-card-head, :root[data-theme="dark"] .modal-card-foot { border-color: var(--trait); }
:root[data-theme="dark"] .omni-modale .omni-carte { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-bas) 100%); }
:root[data-theme="dark"] :is(.omni-entete, .omni-pied, .omni-zone-titre) { border-color: var(--trait); }
:root[data-theme="dark"] .omni-pied { background: var(--surface-bas); }
:root[data-theme="dark"] .omni-modale kbd, :root[data-theme="dark"] .menu-app .entree-omni kbd { background: var(--surface-2); border-color: var(--trait-fort); }
:root[data-theme="dark"] .article-web .encadre,
:root[data-theme="dark"] .composant[data-type="encadre"] .bloc-contenu > .contenu { background: var(--surface-2); }
:root[data-theme="dark"] .card.carte-magazine:hover,
:root[data-theme="dark"] .card.carte-article:hover,
:root[data-theme="dark"] .card.voisin-article:hover { box-shadow: var(--ombre-carte-survol); }
:root[data-theme="dark"] .dropdown-item.is-active {
  background: var(--survol); color: var(--accent-vif); box-shadow: inset 3px 0 0 var(--accent);
}
:root[data-theme="dark"] :is(a.dropdown-item, button.dropdown-item):hover { background: var(--survol); }
:root[data-theme="dark"] .table { background: transparent; }
:root[data-theme="dark"] .table th { color: var(--cyan); }
:root[data-theme="dark"] .table.is-hoverable tbody tr:hover { background: var(--survol); }
:root[data-theme="dark"] .has-text-grey, :root[data-theme="dark"] .has-text-grey-light { color: var(--encre-douce) !important; }
/* Textes d'état de Bulma : ses nuances « dark » restent noires sur fond sombre. */
:root[data-theme="dark"] :is(.has-text-warning-dark, .has-text-warning) { color: var(--alerte) !important; }
:root[data-theme="dark"] :is(.has-text-success-dark, .has-text-success) { color: var(--positif) !important; }
:root[data-theme="dark"] :is(.has-text-danger-dark, .has-text-danger) { color: var(--negatif) !important; }
:root[data-theme="dark"] :is(.has-text-info-dark, .has-text-info) { color: var(--bulma-link) !important; }
:root[data-theme="dark"] mark { background: var(--surlignage); color: inherit; }

/* --- Champs --- */
:root[data-theme="dark"] :is(.input, .textarea, .select select) {
  background: var(--surface-bas); border-color: var(--trait); color: var(--encre);
}
:root[data-theme="dark"] :is(.input, .textarea, .select select):focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lueur), 0 0 18px var(--accent-lueur);
}
:root[data-theme="dark"] :is(.input, .textarea)::placeholder { color: var(--encre-tres-douce); }
/* Liste native d'une liste déroulante (diffuseur du planning, années…) : fond opaque posé sur les options, que
   certains navigateurs ne reprennent pas du champ. */
:root[data-theme="dark"] select :is(option, optgroup) { background-color: var(--surface); color: var(--encre); }

/* --- Boutons --- */
:root[data-theme="dark"] .button.is-link:not(.is-light):not(.is-outlined),
:root[data-theme="dark"] .button.is-primary:not(.is-light):not(.is-outlined) {
  background: linear-gradient(135deg, var(--accent) 0%, var(--violet) 100%);
  border-color: transparent; color: #fff; box-shadow: 0 0 16px var(--accent-lueur);
}
:root[data-theme="dark"] .button.is-link:not(.is-light):not(.is-outlined):hover { box-shadow: 0 0 24px rgba(232, 98, 159, .4); filter: brightness(1.08); }
:root[data-theme="dark"] .button.is-white { background: transparent; color: var(--encre); }
:root[data-theme="dark"] .button.is-white:hover { background: var(--survol); }
:root[data-theme="dark"] .button.is-light:not(.is-link):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger) {
  background: var(--surface-2); color: var(--encre); border: 1px solid var(--trait);
}
:root[data-theme="dark"] .button.is-link.is-light { background: rgba(232, 98, 159, .14); color: var(--accent-vif); }
:root[data-theme="dark"] .button.is-link.is-light:hover { background: rgba(232, 98, 159, .24); }
:root[data-theme="dark"] .button.is-danger.is-light { background: rgba(244, 114, 140, .14); color: var(--negatif); }
:root[data-theme="dark"] .button.is-warning.is-light { background: rgba(240, 182, 74, .14); color: var(--alerte); }
:root[data-theme="dark"] .button.is-success.is-light { background: rgba(63, 217, 164, .14); color: var(--positif); }
:root[data-theme="dark"] .button.is-info.is-light { background: rgba(69, 207, 221, .14); color: var(--cyan); }
/* Couleurs d'état pleines, claires en sombre : texte foncé (le blanc de Bulma y serait illisible). */
:root[data-theme="dark"] :is(.button, .tag):is(.is-success, .is-warning, .is-info):not(.is-light):not(.is-outlined) { color: var(--fond); }
:root[data-theme="dark"] .tag.is-link:not(.is-light), :root[data-theme="dark"] .tag.is-primary:not(.is-light) { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .button.is-selected { color: #fff; }

/* --- Étiquettes et notifications : les pastels de Bulma éblouiraient --- */
:root[data-theme="dark"] .tag:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) {
  background: rgba(69, 207, 221, .14); color: var(--cyan); border: 1px solid rgba(69, 207, 221, .28);
}
/* Étiquettes du planning (états Mahalo, type) : leurs propres couleurs, même spécificité que la règle ci-dessus + 1. */
:root[data-theme="dark"] .tag.etat-mahalo.conforme:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-succes-fond); color: var(--etat-succes-texte); border-color: transparent; }
:root[data-theme="dark"] .tag.etat-mahalo.different:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-ecart-fond); color: var(--etat-ecart-texte); border: 1px solid var(--etat-ecart-texte); }
:root[data-theme="dark"] .tag.etat-mahalo.present:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-info-fond); color: var(--etat-info-texte); border-color: transparent; }
:root[data-theme="dark"] .tag.etat-mahalo.absent:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--bulma-scheme-main-bis); color: var(--bulma-text-weak); border-color: transparent; }
:root[data-theme="dark"] .tag.type-planning.special:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-info-fond); color: var(--etat-info-texte); border-color: transparent; }
:root[data-theme="dark"] .tag.type-planning.hors_serie:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-attente-fond); color: var(--etat-attente-texte); border-color: transparent; }
:root[data-theme="dark"] .tag.mention-tag-planning:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--bulma-scheme-main-bis); color: var(--bulma-text); border-color: var(--bulma-border); }
:root[data-theme="dark"] .tag.invendus-planning:not(body):not(.is-link):not(.is-primary):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger):not(.is-dark) { background: var(--etat-attente-fond); color: var(--etat-attente-texte); border-color: transparent; }
:root[data-theme="dark"] .tag.is-link.is-light { background: rgba(232, 98, 159, .14); color: var(--accent-vif); border: 1px solid rgba(232, 98, 159, .3); }
:root[data-theme="dark"] .tag.is-success.is-light { background: rgba(63, 217, 164, .14); color: var(--positif); border: 1px solid rgba(63, 217, 164, .3); }
:root[data-theme="dark"] .tag.is-danger.is-light { background: rgba(244, 114, 140, .14); color: var(--negatif); border: 1px solid rgba(244, 114, 140, .3); }
:root[data-theme="dark"] .tag.is-warning.is-light { background: rgba(240, 182, 74, .14); color: var(--alerte); border: 1px solid rgba(240, 182, 74, .3); }
:root[data-theme="dark"] .tag.is-info.is-light { background: rgba(157, 120, 232, .16); color: var(--violet); border: 1px solid rgba(157, 120, 232, .32); }
:root[data-theme="dark"] .notification { border: 1px solid var(--trait); }
:root[data-theme="dark"] .notification.is-light:not(.is-link):not(.is-info):not(.is-success):not(.is-warning):not(.is-danger) { background: var(--surface-2); color: var(--encre); }
:root[data-theme="dark"] .notification.is-link.is-light { background: rgba(232, 98, 159, .12); color: var(--encre); border-color: rgba(232, 98, 159, .3); }
:root[data-theme="dark"] .notification.is-info.is-light { background: rgba(69, 207, 221, .10); color: var(--encre); border-color: rgba(69, 207, 221, .28); }
:root[data-theme="dark"] .notification.is-success.is-light { background: rgba(63, 217, 164, .10); color: var(--encre); border-color: rgba(63, 217, 164, .28); }
:root[data-theme="dark"] .notification.is-warning.is-light { background: var(--alerte-fond); color: var(--encre); border-color: rgba(240, 182, 74, .3); }
:root[data-theme="dark"] .notification.is-danger.is-light { background: var(--negatif-fond); color: var(--encre); border-color: rgba(244, 114, 140, .3); }

/* --- Onglets --- */
:root[data-theme="dark"] .tabs li a { color: var(--encre-douce); border-bottom-color: var(--trait); }
:root[data-theme="dark"] .tabs ul { border-bottom-color: var(--trait); }
:root[data-theme="dark"] .barre-onglets-planning { border-bottom-color: var(--trait); }
:root[data-theme="dark"] .tabs li.is-active a { color: var(--accent-vif); border-bottom-color: var(--accent); }
:root[data-theme="dark"] .tabs.is-boxed li.is-active a { background: var(--surface-2); border-color: var(--trait); border-bottom-color: transparent; }

/* --- Logos de supports : plaque claire discrète (voir --fond-logo) pour les images et les SVG
   multicolores ; un SVG monochrome prend la couleur du texte et n'en a pas besoin. --- */
:root[data-theme="dark"] :is(img.logo-support, svg.logo-multicolore, .logo-section img, .onglets-supports img, .option-titre img, .support-section img, .apercu-logo-section img) {
  box-sizing: content-box; padding: .1em .3em; border-radius: 4px; background: var(--fond-logo);
}

/* --- Tom Select (couleurs figées dans sa feuille) --- */
:root[data-theme="dark"] .ts-wrapper .ts-control,
:root[data-theme="dark"] .ts-wrapper.single .ts-control,
:root[data-theme="dark"] .ts-wrapper.single.input-active .ts-control,
:root[data-theme="dark"] .full .ts-control { background: var(--surface-bas); border-color: var(--trait); color: var(--encre); }
:root[data-theme="dark"] .ts-control input, :root[data-theme="dark"] .ts-control input::placeholder { color: var(--encre); }
:root[data-theme="dark"] .ts-control input::placeholder { color: var(--encre-tres-douce); }
:root[data-theme="dark"] .ts-wrapper.focus .ts-control { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-lueur); }
:root[data-theme="dark"] .ts-dropdown { background: var(--surface); border-color: var(--trait); color: var(--encre); box-shadow: var(--ombre-flottante); }
:root[data-theme="dark"] .ts-dropdown .active { background: var(--survol-fort); color: var(--accent-vif); }
:root[data-theme="dark"] .ts-dropdown .optgroup-header { background: var(--surface); color: var(--encre-douce); }
:root[data-theme="dark"] .ts-dropdown .optgroup { border-top-color: var(--trait); }
:root[data-theme="dark"] .ts-dropdown .create, :root[data-theme="dark"] .ts-dropdown .no-results { color: var(--encre-douce); }
:root[data-theme="dark"] .ts-dropdown [data-selectable] .highlight { background: var(--surlignage); }
:root[data-theme="dark"] .ts-wrapper.multi .ts-control > div { background: var(--surface-2); border-color: var(--trait-fort); color: var(--encre); background-image: none; text-shadow: none; }
:root[data-theme="dark"] .ts-wrapper.single .ts-control::after { border-top-color: var(--encre-douce); }

/* Accueil : magazine non publié estompé, comme dans le Kiosque. */
#liste .carte-magazine.non-publie { opacity: .55; filter: grayscale(.7); transition: opacity .15s, filter .15s; }
#liste .carte-magazine.non-publie:hover, #liste .carte-magazine.non-publie:focus-visible { opacity: .9; filter: none; }

/* ==========================================================================
   Mobile : agencement des petits écrans (vérifié par tools/audit-mobile.cjs).
   Principes : aucune page ne défile horizontalement ; les colonnes du bureau
   s'empilent (la liste des articles d'un numéro passe AU-DESSUS des onglets,
   hauteur bornée) ; les barres d'outils passent à la ligne ; les tableaux de
   réglages deviennent des cartes ; les modales occupent tout l'écran ; les menus
   et popovers restent dans l'écran ; cibles tactiles de 40 px au doigt.
   ========================================================================== */

/* Toutes largeurs : une barre d'outils trop longue pour sa colonne passe à la ligne
   (liste des articles étroite entre 769 et 1400 px), et l'en-tête d'une page (titre à
   gauche, actions à droite) se partage la place au lieu de pousser les actions hors de l'écran. */
.barre-articles { flex-wrap: wrap; }
.barre-articles .outils-articles { flex-wrap: wrap; justify-content: flex-end; row-gap: .15rem; }
.laterale .groupe-titre, .laterale .dossier-titre { overflow-wrap: anywhere; }
.laterale #liste-groupes { overflow-x: hidden; }
/* Vignette survolée au premier plan : la bulle de sa case passe au-dessus des vignettes voisines. */
.mosaique .vignette:hover, .mosaique .vignette:focus-within { position: relative; z-index: 3; }
/* Choix d'une photo (éditeur) : grille défilante, bulle au-dessus de la vignette. */
.grille-photos .choix-photo[data-tooltip] { overflow: visible; }
.popover-photos, .popover-photos .grille-photos { max-height: none; overflow: visible; }
.popover-photos { z-index: 31; }
/* Galerie d'un article : flèches de 40 px au doigt de part et d'autre de la photo, vignettes dans leur bande. */
@media (max-width: 600px) {
  .galerie-scene { gap: .25rem; }
  .galerie-image img { max-height: 50vh; }
  .galerie-vignette { width: 3.2rem; height: 2.6rem; }
  .visionneuse-galerie .v-image { max-height: calc(100vh - 13rem); }
}
/* Planning : modale d'un numéro, une étape par ligne ; liens publics empilés. */
@media (max-width: 600px) {
  .barre-onglets-planning #action-exporter > span:not(.icon) { display: none; }
  .barre-onglets-planning #action-exporter { min-width: 2.5rem; min-height: 2.5rem; }
  .etapes-planning { grid-template-columns: 1fr; }
  .liste-partages li { flex-direction: column; align-items: flex-start; }
  .bascule-affichage-planning .button > span:not(.icon) { display: none; }
  .bascule-affichage-planning .button { min-width: 2.5rem; }
  .barre-graphique-planning .export-graphique-planning { margin-left: 0; }
  #action-options-planning > span:not(.icon) { display: none; }
  .menu-colonnes-planning { min-width: min(19rem, calc(100vw - 2rem)); }
}
/* Colonne des articles étroite (bureau de 769 à ~1500 px, téléphone) : la case tout / rien sur
   la première ligne, les outils répartis sur la seconde ; à la souris, outils resserrés. */
.laterale { container-type: inline-size; }
@container (max-width: 20rem) {
  .laterale .barre-articles .outils-articles { flex: 1 1 auto; justify-content: space-between; gap: 0; }
  .laterale .barre-articles .separateur { margin: 0 .1rem; }
}
@media (hover: hover) {
  @container (max-width: 20rem) { .laterale .barre-articles .outil-article { width: 1.65rem; } }
}
@media (min-width: 769px) {
  .level:not(.is-mobile) { gap: 1rem; }
  .level:not(.is-mobile) > .level-left { flex-shrink: 1; min-width: 0; }
  .level:not(.is-mobile) > .level-right { flex-wrap: wrap; justify-content: flex-end; row-gap: .5rem; }
}
.modal-card-title { flex-shrink: 1; min-width: 0; overflow-wrap: anywhere; }
/* Onglets des articles d'un groupe de pages : sur un écran étroit, ils passent à la ligne (chaque
   onglet garde 9 rem ; pas de défilement, qui couperait les info-bulles des titres) ; au doigt,
   suppression et ajout en cibles de 40 px. */
@media (max-width: 768px) {
  .onglets-articles { flex-wrap: wrap; row-gap: .25rem; }
  .onglet-article { flex: 1 1 9rem; }
}
@media (hover: none) and (pointer: coarse) {
  .onglet-article-ajouter { width: 2.5rem; height: 2.5rem; }
  .action-article, .lien-wordpress { min-width: 2.5rem; min-height: 2.5rem; }
  .onglet-article-lien { min-height: 2.5rem; }
  .audio-actions .button, .audio-notification .button { min-width: 2.5rem; min-height: 2.5rem; }
}
/* Bulle recadrée dans l'écran par commun.js (recadrerBulle) : décalage horizontal ajouté au placement. */
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { translate: var(--bulle-dx, 0px) 0; }

@media (max-width: 768px) {
  /* Gouttière unique de 16 px : la section la porte, le conteneur fluide n'en ajoute pas. */
  .section { padding: 1.25rem 1rem 2rem; }
  .container.is-fluid { padding-left: 0; padding-right: 0; }
  .title { overflow-wrap: anywhere; }
  .subtitle, .breadcrumb a { overflow-wrap: anywhere; }
  .breadcrumb ul { flex-wrap: wrap; }

  /* En-tête de page : titre, puis actions calées à droite (le menu « … », ouvert vers la
     gauche, reste dans l'écran), sur la même ligne quand elles tiennent. */
  .level:not(.is-mobile) { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
  .level:not(.is-mobile) > .level-left { display: block; flex: 1 1 auto; min-width: 0; }
  .level:not(.is-mobile) > .level-right { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; flex: 0 1 auto; min-width: 0; max-width: 100%; margin: 0 0 0 auto !important; }
  .level:not(.is-mobile) > .level-right > * { margin: 0 !important; }
  .level:not(.is-mobile) .level-item { margin-bottom: 0; }
  .publication-magazine { margin-right: 0; }
  /* Menus des actions d'en-tête : calés sur le bord droit du groupe d'actions (donc de l'écran), sous lui. */
  .level:not(.is-mobile) > .level-right { position: relative; }
  .level:not(.is-mobile) > .level-right .dropdown { position: static; }
  .level:not(.is-mobile) > .level-right .dropdown-menu { left: auto; right: 0; max-width: calc(100vw - 2rem); }
  .level:not(.is-mobile) > .level-right .dropdown-item { white-space: normal; }
  /* Prompt d'extraction : calé comme les menus sur le bord droit du groupe d'actions. */
  .level:not(.is-mobile) > .level-right .extraire-groupe { position: static; }
  .level.is-mobile { gap: .5rem; }
  .level.is-mobile > .level-left { min-width: 0; flex-shrink: 1; }
  /* En-tête du Planning : titre sur sa ligne, boutons dessous, à la ligne au besoin (rangée, pas colonne). */
  .page-planning > .container > .level.is-mobile { flex-wrap: wrap; }
  .page-planning > .container > .level.is-mobile > .level-right { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: .5rem; flex: 1 1 100%; min-width: 0; }
  .page-planning > .container > .level.is-mobile > .level-right > * { margin: 0 !important; }

  /* Onglets serrés : les libellés restent lisibles, le reste défile dans la barre d'onglets. */
  .tabs a { padding: .5em .7em; }

  /* Modales : largeur de l'écran moins une marge. */
  .modal > .modal-card, .modal > .modal-card.carte-large { width: calc(100vw - 1.5rem); max-width: none; margin: 0; }
  .modal-card-foot .buttons { flex-wrap: wrap; }

  /* Recherche et filtres d'un onglet (pages, photos) : champ sur toute la largeur, filtres
     dessous ; le popover des types s'ouvre sous la barre, sur toute sa largeur. */
  .level.is-mobile:has(> .recherche-pages) { flex-wrap: wrap; position: relative; }
  .level.is-mobile > .level-left.recherche-pages { display: contents; }
  .recherche-pages > .control { flex: 1 1 100% !important; max-width: none !important; min-width: 0 !important; }
  .recherche-pages > .ancre-popover { position: static; }
  .recherche-pages > p { margin-right: auto; }
  .level.is-mobile:has(> .recherche-pages) > .level-right { margin-left: auto; }
  .ancre-popover > .popover-dossiers { left: 0; right: 0; width: auto; max-width: none; }

  /* Page d'un numéro : la liste des articles (colonne latérale) passe au-dessus des onglets,
     sa liste défile dans une hauteur bornée ; ses popovers s'ouvrent sous la barre d'outils. */
  .columns:has(> .column > .laterale) { display: flex; flex-direction: column; }
  .columns > .column:has(> .laterale) { order: -1; padding-bottom: 0; }
  .laterale { position: static; max-height: none; padding: .75rem; }
  .laterale #liste-groupes { max-height: 45vh; max-height: 45dvh; }
  .barre-articles { position: relative; }
  .barre-articles .ancre-popover { position: static; }
  .laterale .barre-articles .outils-articles { flex: 1 1 auto; justify-content: space-between; gap: 0; }
  .barre-articles .separateur { margin: 0 .1rem; }
  /* Colonne des groupes de pages repliée : simple bandeau (titre, compteur, chevron), cliquable ;
     pas d'ancre au bord de l'écran. Chevron vers le haut ouverte, vers le bas repliée. */
  .colonne-groupes > .ancre-groupes { display: none; }
  #titre-groupes { cursor: pointer; flex: 1; }
  .entete-laterale .bouton-repli-groupes > i { transform: rotate(-90deg); transition: transform .2s ease; }
  .colonne-groupes.est-repliee .entete-laterale .bouton-repli-groupes > i { transform: rotate(90deg); }
  .colonne-groupes.est-repliee .laterale > :not(.entete-laterale) { display: none; }
  .colonne-groupes.est-repliee .entete-laterale { margin-bottom: 0; }

  /* Mosaïque : vignettes un peu plus petites (S : 3 colonnes, M : 2, L : 1 sur un téléphone). */
  .mosaique:not(.mosaique-article) { grid-template-columns: repeat(auto-fill, minmax(min(calc(var(--vignette-min) * .8), 100%), 1fr)); gap: 1rem .75rem; }
  .barre-actions { top: 0; padding: .4rem .6rem; }
  .barre-actions .buttons { flex-wrap: wrap; }

  /* Page d'un article : ses pages en bande horizontale au-dessus du texte. */
  .colonne-pages { padding: 0; overflow: visible; }
  .mosaique.mosaique-article {
    display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(7.5rem, 40%);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: .4rem .25rem .6rem;
  }
  .mosaique.mosaique-article > * { scroll-snap-align: start; }
  .photo-article figcaption { flex-wrap: wrap; gap: .25rem .75rem; }
  .photo-article .photo-infos { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; white-space: normal; }
  .voisin-vignette { width: 4.5rem; height: 3.75rem; }

  /* Éditeur : barre collante compacte (sans titre ni aide), outils à la ligne. */
  .barre-edition { top: 0; gap: .5rem; padding: .5rem .75rem; }
  .barre-edition > .has-text-weight-semibold, .barre-edition .aide-edition { display: none; }
  .barre-edition > .buttons { margin-left: auto; }
  .barre-format .groupe-insertion { flex-wrap: wrap; margin-left: 0; }
  .barre-format { position: relative; }
  .barre-format .ancre-popover { position: static; }
  /* Photos à insérer : grille entière, sans défilement interne (il couperait les bulles). */
  .popover-photos, .popover-photos .grille-photos { max-height: none; overflow: visible; }
  .composant { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  /* Case, poignée, texte sur toute la largeur restante ; type et retrait du bloc passent sous
     le texte, affichés seulement quand on y travaille (sinon le texte n'aurait qu'un tiers de la ligne). */
  .editeur-article .composant { grid-template-columns: 1.6rem 2rem minmax(0, 1fr); }
  .editeur-article .composant .outils-composant { grid-column: 3; justify-self: end; display: none; }
  .editeur-article .composant:is(:hover, :focus-within) .outils-composant { display: flex; }
  /* Blocs cochés : actions en tête de la barre, mini-fenêtre du type sur toute sa largeur. */
  .groupe-blocs .ancre-popover { position: static; }
  .article-edition .photo-article img { max-width: 6rem; max-height: 5rem; }

  /* Onglet Articles : vignette réduite, étiquettes repliées. */
  .carte-article { gap: .75rem; padding: .6rem; }
  .carte-article-photo { width: 4.5rem; height: 4rem; }
  .carte-infos { min-width: 0; }
  .carte-infos .tag { white-space: normal; height: auto; max-width: 100%; }
  .carte-titre { overflow-wrap: anywhere; }

  /* Kiosque : le menu du support d'une carte s'ouvre sous la carte, à sa largeur. */
  .carte-kiosque .dropdown.support-carte { position: static; }
  .carte-kiosque .support-carte .dropdown-menu { left: 0; right: 0; min-width: 0; }
  .carte-kiosque .support-carte .dropdown-item { white-space: normal; }
  .logo-section-champ .file-name { max-width: 100%; }

  /* Visionneuse de pages : outils en haut, fermeture à droite ; compteur et flèches en bas ;
     légende au-dessus des flèches ; panneaux Liens et Nature sur toute la largeur. */
  .visionneuse .barre { justify-content: flex-start; padding: 0 3.5rem 0 .5rem; }
  .visionneuse .v-compteur { position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); white-space: nowrap; font-size: .85rem; }
  .visionneuse .modal-content { padding: 3.5rem .5rem 4.5rem; }
  .visionneuse .v-image { max-width: calc(100vw - 1rem); max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); }
  .visionneuse .legende-page { left: .5rem; right: .5rem; bottom: 4.5rem; width: auto; padding: .45rem .6rem; font-size: .75rem; }
  .visionneuse .legende-page .contenu-legende { max-height: 5.5rem; }
  .visionneuse .aide-outil { left: .5rem; right: .5rem; transform: none; border-radius: 10px; text-align: center; }
  .panneau-lien, .panneau-nature, .panneau-recadrage, .panneau-filigrane { left: .5rem; right: .5rem; width: auto; top: 6.25rem; }
  .visionneuse .poignee-recadrage { width: 24px; height: 24px; margin: -12px 0 0 -12px; }
  /* Bulles des flèches : sur le côté (au-dessus, la légende les couvrirait). */
  .visionneuse .nav.precedente[data-tooltip]:hover::after { top: 50%; bottom: auto; left: calc(100% + 6px); right: auto; transform: translateY(-50%); }
  .visionneuse .nav.suivante[data-tooltip]:hover::after { top: 50%; bottom: auto; left: auto; right: calc(100% + 6px); transform: translateY(-50%); }
  .panneau-lien .apercu-cible { flex-wrap: wrap; }

  /* Visionneuse de photos : toute la largeur, barre et description à la ligne. */
  .visionneuse-photo .modal-content { width: 100vw; max-height: 100vh; max-height: 100dvh; margin: 0; padding: 3.5rem .5rem 1rem; }
  .photo-plein-ecran img { max-width: 100%; }
  .description-photo { max-width: 100%; overflow-wrap: anywhere; }

  /* Tâches : lignes serrées, textes longs repliés. */
  .tache .entete-tache, .tache .cible-tache { min-width: 0; }
  .tache .magazine-tache { flex-wrap: wrap; flex: 0 1 auto; }
  .tache .magazine-tache span { white-space: normal; }
}

@media (max-width: 600px) {
  /* Modales plein écran sur téléphone (visionneuses exceptées : elles le sont déjà). */
  .modal > .modal-card, .modal > .modal-card.carte-large { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .mediatheque-grille { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; }
  .modal > .modal-card > .modal-card-head, .modal > .modal-card > .modal-card-foot { border-radius: 0; }
  .modal-card-head, .modal-card-body, .modal-card-foot { padding-left: 1rem; padding-right: 1rem; }
  .modal-card-title { font-size: 1.25rem; }

  /* Options : tableaux des types de page et des jetons en cartes. */
  .table-types thead, .table-jetons thead, .table-destinations thead { display: none; }
  .table-container:has(> .table-types, > .table-jetons, > .table-destinations) { overflow: visible; }
  .table-types, .table-types tbody, .table-jetons, .table-jetons tbody, .table-destinations, .table-destinations tbody { display: block; }
  .table-types tbody tr, .table-jetons tbody tr, .table-destinations tbody tr {
    display: grid; column-gap: .6rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--bulma-border-weak);
  }
  .table-types tbody td, .table-jetons tbody td, .table-destinations tbody td { display: block; padding: .1rem 0; border: 0; text-align: left !important; }
  .table-types td[data-label]::before, .table-jetons td[data-label]::before, .table-destinations td[data-label]::before {
    content: attr(data-label) " : "; font-size: .75rem; font-weight: 600; color: var(--bulma-text-weak);
  }
  .table-types tbody tr { grid-template-columns: 2rem minmax(0, 1fr) auto; grid-template-areas: "icone libelle actions" "icone code actions" "aide aide aide" "exclu exclu pages"; }
  .table-types .c-icone { grid-area: icone; }
  .table-types .c-libelle { grid-area: libelle; }
  .table-types .c-code { grid-area: code; }
  .table-types .c-aide { grid-area: aide; }
  .table-types .c-exclu { grid-area: exclu; }
  .table-types .c-exclu .exclu { vertical-align: middle; }
  .table-types .c-pages { grid-area: pages; justify-self: end; }
  .table-types .actions-type, .table-jetons .actions-type, .table-destinations .actions-type { grid-area: actions; }
  .table-destinations tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom actions" "site site" "supports supports" "statut statut"; }
  .table-destinations .c-nom { grid-area: nom; overflow-wrap: anywhere; }
  .table-destinations .c-site { grid-area: site; overflow-wrap: anywhere; }
  .table-destinations .c-supports { grid-area: supports; }
  .table-destinations .c-statut { grid-area: statut; }
  .table-destinations tbody tr:has(td[colspan]) { display: block; }
  /* Tarifs des supports en cartes : nom en tête, montants deux par deux */
  .table-tarifs thead { display: none; }
  .table-container:has(> .table-tarifs) { overflow: visible; }
  .table-tarifs, .table-tarifs tbody { display: block; }
  .table-tarifs tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem .75rem;
    padding: .6rem .75rem; margin-bottom: .5rem; border: 1px solid var(--bulma-border); border-radius: var(--bulma-radius);
  }
  .table-tarifs tbody td { display: block; padding: .1rem 0; border: 0; min-width: 0 !important; }
  .table-tarifs td.c-support { grid-column: 1 / -1; }
  .table-tarifs td[data-label]:not(.c-support)::before {
    content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--bulma-text-weak);
  }
  .table-tarifs tbody tr:has(td[colspan]) { display: block; }
  .table-tarifs tbody tr.groupe-tarifs { display: block; padding: 0; margin: 1rem 0 .4rem; border: 0; }
  .table-tarifs tbody tr.groupe-tarifs th { display: block; padding: 0 0 .25rem; }
  .table-tarifs .montant-tarif { min-height: 40px; }
  .table-jetons tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom actions" "jeton statut" "portees portees" "cree cree" "utilise utilise"; }
  .table-jetons .c-nom { grid-area: nom; overflow-wrap: anywhere; }
  .table-jetons .c-jeton { grid-area: jeton; }
  .table-jetons .c-statut { grid-area: statut; justify-self: end; }
  .table-jetons .c-portees { grid-area: portees; }
  .table-jetons .c-cree { grid-area: cree; }
  .table-jetons .c-utilise { grid-area: utilise; }
  .table-jetons tbody tr:has(td[colspan]) { display: block; }
  .table-routes td { overflow-wrap: anywhere; }

  /* Onglets de page : icônes masquées, libellés gardés. */
  #onglets-magazine a > .icon, #onglets a > .icon { display: none; }
}

/* Recherche globale (Ctrl+K) : loupe dans le burger sous 480 px (place des onglets, comme le compteur des tâches) ;
   zones empilées sous 769 px ; modale plein écran sous 600 px, sans aide clavier. */
@media (max-width: 480px) {
  .barre-app .navbar-item.bouton-omni { display: none; }
}
@media (min-width: 481px) {
  .menu-app .entree-omni, .menu-app .entree-omni + .dropdown-divider { display: none; }
}
@media (max-width: 768px) {
  .omni-zones { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .omni-modale { padding-top: 0; }
  .omni-modale .omni-carte { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .omni-entete { padding: .6rem .75rem; gap: .5rem; }
  .omni-entete .bulle-fermer .delete { width: 2.5rem; height: 2.5rem; max-width: none; max-height: none; }
  .omni-corps { padding: .5rem .5rem 1rem; }
  .omni-pied { display: none; }
}

/* Cibles tactiles : 40 px au doigt pour les outils en icônes et le menu de l'application
   (la barre de mise en forme de l'éditeur reste à 36 px pour ne pas envahir l'écran). */
@media (hover: none) and (pointer: coarse) {
  .outil-article { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
  .barre-format .outil-article { width: 2.25rem; height: 2.25rem; }
  .visionneuse .outil { min-width: 2.5rem; height: 2.5rem; }
  .menu-app .dropdown-trigger .button { width: 2.5rem; height: 2.5rem; }
  .laterale .poignee { opacity: .6; }
  /* Accueil : case des cartes et case tout / rien de la barre des actions en lot. */
  .carte-accueil > .case-carte { width: 2.5rem; height: 2.5rem; top: .3rem; right: .3rem; }
  .case-carte input { width: 1.25rem; height: 1.25rem; }
  .barre-lot .tout-rien { min-height: 2.5rem; }
  .barre-lot .tout-rien input { width: 1.25rem; height: 1.25rem; }
  /* Médiathèque : boutons resserrés du pied et de la barre des cochées, case tout / rien. */
  .carte-mediatheque .modal-card-foot .button, .mediatheque-lot .button { min-width: 2.5rem; min-height: 2.5rem; }
  .mediatheque-lot .tout-rien { min-height: 2.5rem; }
}
/* Accueil, écran étroit : case tout / rien et compteur sur la première ligne, outils répartis dessous. */
@media (max-width: 768px) {
  .barre-lot { top: 0; }
  .barre-lot .outils-lot { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  .barre-lot.detaillee .outils-lot .outil-article { min-height: 2.5rem; }
  .barre-lot .bouton-detail-lot { width: 2.5rem; height: 2.5rem; }
}

/* Nouveau magazine (un ou plusieurs fichiers) : sur un téléphone, le nom du fichier garde toute la
   ligne et le bouton Changer / Retirer passe dessous ; boutons de l'assistant et du lot au doigt. */
@media (max-width: 480px) {
  .fichier-choisi { flex-wrap: wrap; row-gap: .5rem; }
  .fichier-choisi .fichier-infos { flex: 1 1 calc(100% - 3rem); }
  .fichier-choisi > .button { margin-left: auto; }
  .boutons-assistant .button, .lot-entete .button, .lot-actions .button { min-height: 2.5rem; }
  .lot-entete #ajouter { margin-left: 0; }
}

/* --- Page Calendrier (parutions Mahalo) --- */
.logo-calendrier { height: 1.4em; max-width: 9rem; vertical-align: middle; }
.tableau-calendrier td { vertical-align: middle; }
.tableau-calendrier .lien-support { display: inline-flex; align-items: center; color: var(--bulma-text); font-weight: 600; }
.tableau-calendrier .progress { width: 8rem; margin-top: .25rem; }
/* Pastille « Publié » d'un numéro : dans le flux de la cellule (hors carte, la position absolue l'envoyait en bas de page). */
.tableau-calendrier .pastille-publication { position: static; vertical-align: middle; margin-left: .25rem; }
.tableau-calendrier tr.parution-courante td { background: var(--etat-succes-fond); }
.etat-parution.a-venir { background: var(--etat-info-fond); color: var(--etat-info-texte); }
.etat-parution.en-kiosque { background: var(--etat-succes-fond); color: var(--etat-succes-texte); }
.etat-parution.parue { background: var(--bulma-scheme-main-bis); color: var(--bulma-text-weak); }
#titre-page .logo-calendrier { height: 1.2em; max-width: 10rem; }
/* Sélecteurs de période (année du calendrier, mois du planning et du planning partagé) : un bouton Bulma
   n'a pas de hauteur fixe (`height: auto`) ; une icône seule, sans `.icon`, le laissait plus bas que la
   liste de l'année ou le bouton « Aujourd'hui » voisins. Même hauteur de contrôle pour tous. */
#choix-annee .button, :is(#periode-precedente, #periode-suivante).button { height: var(--bulma-control-height); }
