/* Console agent-encheres : identité de l'application d'Erwan (orange Amazon pour l'action, bleu nuit, Inter,
   cartes blanches arrondies sur fond gris clair). Mobile d'abord (375 px), élargi par min-width.
   Toutes les couleurs en OKLCH ; équivalents sRGB : --action = FF9900, --nuit = 232F3E, --fond = F6F6F3. */
:root {
  --fond: oklch(97.2% 0.004 95);
  --carte: oklch(99.6% 0.002 95);
  --texte: oklch(26% 0.025 254);
  --titre: var(--nuit);
  --discret: oklch(49% 0.022 254);
  --bord: oklch(91% 0.006 254);
  --bord-champ: oklch(62% 0.015 254);
  --nuit: oklch(30.1% 0.032 254.3);
  --sur-nuit: oklch(97% 0.004 95);
  --sur-nuit-discret: oklch(82% 0.015 254);
  --action: oklch(77.2% 0.174 64.6);
  --action-survol: oklch(72% 0.165 58);
  --action-appui: oklch(68% 0.16 55);
  --sur-action: var(--nuit);
  --lien: var(--nuit);
  --focus: var(--nuit);
  --pouce: oklch(99.6% 0.002 95);
  --attente: oklch(47% 0.12 55);
  --baisse: oklch(50% 0.17 27);
  --hausse: oklch(47% 0.11 150);
  --pause: oklch(48% 0.15 310);
  --exploration: oklch(49% 0.14 255);
  --neutre: oklch(50% 0.02 254);
  --danger: oklch(50% 0.18 27);
  --sur-danger: oklch(98.5% 0.004 95);
  --dose-voile: 7%;
  --dose-pastille: 14%;
  --rayon-carte: 12px;
  --rayon-bouton: 10px;
  --rayon-champ: 10px;
  --ombre-carte: 0 1px 2px oklch(30% 0.03 254 / 0.06), 0 4px 14px oklch(30% 0.03 254 / 0.06);
  --t-1: 1rem;
  --t-2: 1.25rem;
  --t-3: 1.5625rem;
  --t-4: 1.953rem;
  --police: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --duree: 150ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: oklch(18% 0.014 254);
    --carte: oklch(23% 0.016 254);
    --texte: oklch(94% 0.004 95);
    --titre: oklch(97% 0.004 95);
    --discret: oklch(74% 0.015 254);
    --bord: oklch(33% 0.015 254);
    --bord-champ: oklch(55% 0.015 254);
    --nuit: oklch(13.5% 0.018 254);
    --sur-nuit: oklch(94% 0.004 95);
    --sur-nuit-discret: oklch(78% 0.015 254);
    --action-survol: oklch(82% 0.15 68);
    --action-appui: oklch(86% 0.13 72);
    --sur-action: oklch(30.1% 0.032 254.3);
    --lien: oklch(84% 0.1 70);
    --focus: var(--action);
    --pouce: oklch(97% 0.004 95);
    --attente: oklch(82% 0.13 70);
    --baisse: oklch(73% 0.15 27);
    --hausse: oklch(76% 0.13 150);
    --pause: oklch(75% 0.12 310);
    --exploration: oklch(75% 0.11 255);
    --neutre: oklch(73% 0.015 254);
    --danger: oklch(73% 0.15 27);
    --sur-danger: oklch(18% 0.014 254);
    --dose-voile: 12%;
    --dose-pastille: 22%;
    --ombre-carte: 0 0 0 1px oklch(32% 0.015 254);
  }
}

/* --- base --- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 1rem/1.5 var(--police); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.conteneur { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main.conteneur { padding-top: 8px; padding-bottom: 40px; }
h1, h2, h3 { color: var(--titre); letter-spacing: -0.011em; }
h1 { font-size: var(--t-3); line-height: 1.2; font-weight: 700; margin: 1.25rem 0 0.75rem; overflow-wrap: anywhere; }
h2 { font-size: var(--t-2); line-height: 1.3; font-weight: 650; margin: 2rem 0 0.75rem; }
h3 { font-size: var(--t-1); line-height: 1.4; font-weight: 650; }
h1 .discret, h2 .discret, h3 .discret { font-weight: 400; }
a {
  color: var(--lien); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, var(--lien) 35%, transparent);
  transition: text-decoration-color var(--duree);
}
a:hover { text-decoration-color: var(--action); text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: 1rem; }
.discret { color: var(--discret); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lecteur-ecran { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.coupe { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.icone { font-size: 1.4rem; line-height: 1.2; flex: none; }
.vide { margin: 0; }
.tableau, .marche-stats dd, .regle-valeurs dd, .courbe-dernier-acos { font-variant-numeric: tabular-nums; }

/* --- en-tête : bleu nuit ; sur mobile deux lignes (marque et actions compactes, puis onglets défilants, 96 px),
   une seule ligne au-dessus de 900 px --- */
.entete { background: var(--nuit); color: var(--sur-nuit); }
.entete-contenu { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.marque {
  display: inline-flex; align-items: center; min-height: 48px; margin-right: auto; color: var(--sur-nuit);
  font-weight: 700; letter-spacing: -0.015em; text-decoration: none; white-space: nowrap;
}
.marque::before { content: ""; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: var(--action); }
.entete-actions { display: flex; align-items: center; gap: 4px; }
.entete-actions form { margin: 0; }
.menu {
  order: 5; flex: 1 0 100%; position: relative; display: flex; flex-wrap: nowrap; gap: 0; min-width: 0;
  margin: 0 -16px; padding: 0 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.menu::-webkit-scrollbar { display: none; }
.menu a {
  flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  color: var(--sur-nuit-discret); font-weight: 500; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: color var(--duree), border-color var(--duree);
}
.menu a:hover { color: var(--sur-nuit); border-bottom-color: color-mix(in oklab, var(--action) 45%, var(--nuit)); }
.menu a[aria-current="page"] { color: var(--sur-nuit); font-weight: 650; border-bottom-color: var(--action); }
.entete :focus-visible { outline-color: var(--action); outline-offset: -2px; }
.icone-entete { width: 18px; height: 18px; flex: none; fill: currentColor; }
.icone-trait { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* partie longue d'un libellé de l'en-tête : lue par les lecteurs d'écran, masquée à l'œil sur mobile */
.entete-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.lien-entete {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; background: none;
  color: var(--sur-nuit-discret); font: inherit; cursor: pointer; text-decoration: none; border-radius: var(--rayon-bouton);
}
.lien-entete:hover { color: var(--sur-nuit); text-decoration: underline; text-underline-offset: 3px; }
.lien { background: none; border: 0; padding: 4px 0; color: var(--lien); font: inherit; cursor: pointer; text-decoration: underline; }
/* agent suspendu : bandeau rouge sous l'en-tête, avec le lien vers la relance (cible de 44 px) */
.bandeau-arret { margin: 0; background: var(--danger); color: var(--sur-danger); font-weight: 650; }
.bandeau-arret .conteneur { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; overflow-wrap: anywhere; }
.bandeau-arret a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.bandeau-arret :focus-visible { outline: 2px solid var(--sur-danger); outline-offset: 2px; }
@media (min-width: 900px) {
  .entete-contenu { flex-wrap: nowrap; gap: 16px; }
  .marque { min-height: 56px; margin-right: 8px; }
  .menu { order: 1; flex: 1 1 auto; margin: 0; padding: 0; }
  .menu a { min-height: 56px; }
  .entete-actions { order: 2; gap: 8px; }
}

/* --- cartes --- */
.carte { background: var(--carte); border: 0; border-radius: var(--rayon-carte); box-shadow: var(--ombre-carte); padding: 16px; }
.carte + .carte { margin-top: 12px; }
.carte > :first-child { margin-top: 0; }
.carte > :last-child { margin-bottom: 0; }

/* --- teintes d'état : une variable --teinte par classe, reprise par les pastilles et les fonds teintés --- */
.carte { --teinte: initial; }
.c-neutre, .marche-neutre { --teinte: var(--neutre); }
.c-baisse, .marche-baisse { --teinte: var(--baisse); }
.c-hausse, .marche-hausse { --teinte: var(--hausse); }
.c-pause, .marche-pause { --teinte: var(--pause); }
.c-exploration, .marche-exploration, .etape-finale { --teinte: var(--exploration); }
.c-baisse, .c-hausse, .c-pause, .c-exploration, .c-neutre { color: var(--teinte); }
.bandeau-applique, .nuit-applique, .run-carte-applique, .proposition-appliquee, .version-courante, .flash-ok { --teinte: var(--hausse); }
.bandeau-attente_go, .nuit-attente_go, .run-carte-attente_go, .proposition-proposee { --teinte: var(--attente); }
.bandeau-echec, .bandeau-arrete, .nuit-echec, .nuit-arrete, .run-carte-echec, .run-carte-arrete, .proposition-erreur, .confirmation-danger,
.flash-erreur { --teinte: var(--danger); }
.flash-info { --teinte: var(--exploration); }
/* fond très légèrement teinté de la couleur d'état (jamais de bande latérale) */
.bandeau, .nuit, .run-carte, .marche, .etape-finale, .proposition, .version-courante, .confirmation-danger, .flash {
  background: color-mix(in oklab, var(--teinte, var(--carte)) var(--dose-voile), var(--carte));
}

/* --- pastilles : toujours un texte, sur un fond clair de la teinte --- */
.pastille-action, .pastille-statut {
  --teinte: var(--attente);
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 999px;
  font-size: var(--t-1); font-weight: 600; line-height: 1.3; white-space: nowrap;
  color: var(--teinte); background: color-mix(in oklab, var(--teinte) var(--dose-pastille), var(--carte));
}
.pastille-statut { --teinte: var(--neutre); }
.pastille-action.c-baisse { --teinte: var(--baisse); }
.pastille-action.c-hausse { --teinte: var(--hausse); }
.pastille-action.c-pause { --teinte: var(--pause); }
.pastille-action.c-exploration { --teinte: var(--exploration); }
.pastille-action.c-neutre { --teinte: var(--neutre); }
.statut-applique, .statut-proposition-appliquee, .statut-proposition-acceptee { --teinte: var(--hausse); }
.statut-attente_go, .statut-en_cours, .statut-proposition-proposee { --teinte: var(--attente); }
.statut-echec, .statut-arrete, .statut-proposition-erreur { --teinte: var(--danger); }
.statut-annule, .statut-proposition-annulee { --teinte: var(--pause); }

/* --- boutons --- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  font: inherit; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  color: var(--sur-action); background: var(--action); border: 0; border-radius: var(--rayon-bouton);
  box-shadow: 0 1px 2px oklch(30% 0.03 254 / 0.12);
  transition: background-color var(--duree), box-shadow var(--duree), color var(--duree);
}
.bouton:hover { background: var(--action-survol); color: var(--sur-action); }
.bouton:active { background: var(--action-appui); box-shadow: none; }
.bouton:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bouton:disabled, .bouton[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.bouton-secondaire, .bouton-secondaire:hover, .bouton-secondaire:active { color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord-champ); }
.bouton-secondaire { background: var(--carte); }
.bouton-secondaire:hover { background: color-mix(in oklab, var(--texte) 5%, var(--carte)); }
.bouton-secondaire:active { background: color-mix(in oklab, var(--texte) 10%, var(--carte)); }
.bouton-danger, .bouton-danger:hover, .bouton-danger:active { color: var(--sur-danger); }
.bouton-danger { background: var(--danger); }
.bouton-danger:hover { background: color-mix(in oklab, var(--danger) 88%, var(--texte)); }
.bouton-danger:active { background: color-mix(in oklab, var(--danger) 78%, var(--texte)); }
.bouton-petit { padding: 8px 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions form { margin: 0; }

/* --- champs de saisie --- */
.champ-saisie, .formulaire input[type="password"], .formulaire input[type="text"], .formulaire-regles input[type="text"],
.confirmation input[type="text"], .filtres select, .filtres input[type="search"], .livre-ligne input[type="text"],
.livre-ligne select, .filtres-recolte select {
  min-height: 44px; padding: 10px 12px; font: inherit; color: var(--texte); background: var(--carte);
  border: 1px solid var(--bord-champ); border-radius: var(--rayon-champ); max-width: 100%;
  transition: border-color var(--duree);
}
.formulaire input:focus-visible, .formulaire-regles input:focus-visible, .confirmation input:focus-visible,
.filtres select:focus-visible, .filtres input:focus-visible, .livre-ligne input:focus-visible,
.livre-ligne select:focus-visible, .filtres-recolte select:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus);
}
input[aria-invalid="true"] { border-color: var(--danger); }
input:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--action); }
.formulaire { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.formulaire input[type="password"], .formulaire input[type="text"] { width: 100%; }
.champ { display: flex; flex-direction: column; gap: 4px; }
.champ-libelle { font-weight: 600; }
.champ-aide { font-size: var(--t-1); }

/* --- messages --- */
.flash {
  margin: 12px 0; padding: 12px 14px; border-radius: var(--rayon-carte); overflow-wrap: anywhere;
  border: 1px solid color-mix(in oklab, var(--teinte, var(--bord-champ)) 40%, var(--carte));
}
.flash ul, .regles-erreurs ul { margin: 6px 0 0; padding-left: 1.2rem; }
.flash p, .regles-erreurs p { margin: 0; }

/* --- tableaux : liste de cartes sur mobile, vrai tableau au-dessus de 960 px --- */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; }
.tableau th, .tableau td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--bord); }
.tableau thead th { color: var(--discret); font-weight: 600; }
.tableau tr:last-child > * { border-bottom: 0; }
.cartes-mobiles, .cartes-mobiles tbody, .cartes-mobiles tr, .cartes-mobiles th, .cartes-mobiles td { display: block; }
.cartes-mobiles { border: 0; background: none; }
.cartes-mobiles thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cartes-mobiles tr { background: var(--carte); border-radius: var(--rayon-carte); box-shadow: var(--ombre-carte); padding: 10px 14px; margin-bottom: 10px; }
.cartes-mobiles th, .cartes-mobiles td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cartes-mobiles td::before, .cartes-mobiles th::before { content: attr(data-label); color: var(--discret); font-weight: 400; text-align: left; flex: none; }
.cartes-mobiles th[scope="row"] { font-size: var(--t-1); font-weight: 650; justify-content: flex-start; text-align: left; }
.cartes-mobiles th[scope="row"]::before { display: none; }
.cartes-mobiles .cellule-cible { flex-direction: column; gap: 0; text-align: left; }
.cartes-mobiles .cellule-cible::before { display: none; }
/* termes en attente : livre et pays, terme, groupe, puis six chiffres sur deux lignes de trois */
.termes-attente tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.termes-attente .terme-livre { grid-column: 1 / 3; }
.termes-attente .terme-pays { grid-column: 3; justify-content: flex-end; }
.termes-attente .terme-pays::before { display: none; }
.termes-attente .terme-texte { grid-column: 1 / -1; font-weight: 700; flex-direction: column; text-align: left; gap: 0; }
.termes-attente .terme-groupe { grid-column: 1 / -1; flex-direction: column; text-align: left; gap: 0; }
.termes-attente .terme-chiffre { flex-direction: column; justify-content: flex-start; text-align: left; gap: 0; padding: 6px 0 0; border-top: 1px solid var(--bord); }
.termes-attente .terme-chiffre::before { font-size: var(--t-1); }
@media (min-width: 960px) {
  .cartes-mobiles { display: table; border: 0; background: var(--carte); border-radius: var(--rayon-carte); box-shadow: var(--ombre-carte); }
  .cartes-mobiles thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: table-header-group; }
  .cartes-mobiles tbody { display: table-row-group; }
  .cartes-mobiles tr, .termes-attente tr { display: table-row; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; }
  .cartes-mobiles th, .cartes-mobiles td, .termes-attente .terme-chiffre { display: table-cell; padding: 10px 12px; text-align: left; border: 0; border-bottom: 1px solid var(--bord); }
  .cartes-mobiles tr:last-child > * { border-bottom: 0; }
  .cartes-mobiles td::before, .cartes-mobiles th::before { display: none; }
  .cartes-mobiles th[scope="row"] { font-weight: 600; }
  .cartes-mobiles .cellule-cible { max-width: 22rem; }
  .termes-attente .terme-texte { font-weight: 600; }
  .cartes-mobiles th, .cartes-mobiles td { overflow-wrap: normal; }
  .termes-attente th, .termes-attente td, .termes-attente .terme-chiffre { padding: 10px 6px; }
  .cartes-mobiles thead th, .termes-attente .terme-chiffre, .termes-attente .terme-pays { white-space: nowrap; }
}

/* --- bandeau d'un run (page d'un run) --- */
.bandeau-titre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: 0; }
.bandeau-statut, .nuit-statut {
  display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; overflow-wrap: anywhere;
  font-size: var(--t-2); font-weight: 700; color: var(--titre);
}
.bandeau-statut::before, .nuit-statut::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teinte, var(--neutre));
}
.bandeau-lien, .nuit-lien { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.bandeau-infos { margin: 4px 0 0; }
.bandeau-annule { margin: 6px 0 0; font-weight: 600; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pastille-pays {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--carte); color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord-champ);
  font-weight: 600; text-decoration: none; transition: background-color var(--duree);
}
.pastille-pays:hover { background: color-mix(in oklab, var(--texte) 5%, var(--carte)); }
.pastille-pays[aria-current="true"] { background: var(--nuit); color: var(--sur-nuit); box-shadow: none; }
/* en sombre, le bleu nuit se confond avec le fond : la pastille active passe à l'orange d'action */
@media (prefers-color-scheme: dark) {
  .pastille-pays[aria-current="true"] { background: var(--action); color: var(--sur-action); }
}
.courbe-bloc { max-width: 720px; }
.courbe-dernier-acos { margin: 0 0 8px; font-size: var(--t-3); font-weight: 700; color: var(--titre); }
.courbe-dernier-acos .discret { font-size: var(--t-1); font-weight: 400; }
.courbe-zone { display: flex; gap: 8px; }
.courbe-axe-y { display: flex; flex-direction: column; justify-content: space-between; color: var(--discret); min-width: 3.6rem; text-align: right; }
.courbe-dessin { flex: 1; min-width: 0; }
.courbe { display: block; width: 100%; height: auto; background: var(--fond); border-radius: 8px; }
.courbe-ligne { stroke: var(--titre); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.courbe-point { fill: var(--titre); }
.courbe-objectif { stroke: var(--action); stroke-width: 2; }
.courbe-axe-x { display: flex; justify-content: space-between; margin: 4px 0 0 calc(3.6rem + 8px); }

/* --- bulletin du matin --- */
/* 1. ce qui attend : une carte, une ligne par sujet ; le premier porte le seul bouton orange */
.attente { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.attente > * { margin: 0; }
.attente-titre { margin: 0; font-size: var(--t-2); }
.attente-titre .discret { font-size: var(--t-1); }
.attente-vide .tout-a-jour { font-size: var(--t-2); }
.sujets { list-style: none; margin: 0; padding: 0; }
.sujet { min-width: 0; overflow-wrap: anywhere; }
.sujet + .sujet { border-top: 1px solid var(--bord); }
.sujet p { margin: 0; }
.sujet-urgent { display: grid; gap: 4px; padding-bottom: 14px; }
.sujet-urgent .sujet-titre { font-size: var(--t-2); font-weight: 700; color: var(--titre); line-height: 1.3; }
.sujet-urgent .actions { margin-top: 8px; }
.sujet-urgent:only-child { padding-bottom: 0; }
.sujet-titre { font-weight: 650; color: var(--titre); }
.sujet-detail { color: var(--discret); }
.sujet-lien {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 44px;
  padding: 10px 0; color: var(--texte); text-decoration: none;
}
.sujet-lien:hover .sujet-titre { text-decoration: underline; text-decoration-color: var(--action); text-underline-offset: 3px; }
.sujet-texte { display: flex; flex-direction: column; min-width: 0; }
.fleche {
  flex: none; width: 8px; height: 12px; background: var(--discret);
  clip-path: polygon(0 0, 38% 0, 100% 50%, 38% 100%, 0 100%, 62% 50%);
}
.sujet .feu-vert { margin-top: 8px; font-weight: 600; }
/* lot et lignes de validation (dans la carte du haut ou dans « Dépassements de plafond ») */
.lot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: var(--rayon-bouton); background: var(--fond); }
.lot-titre { margin: 0; overflow-wrap: anywhere; }
.lot .actions { margin-top: 0; }
.lot-bas { margin: 4px 0 0; }
.liste-validations, .evenements { list-style: none; margin: 0; padding: 0; }
.validation { padding: 14px 0; min-width: 0; }
.validation + .validation, .evenement + .evenement { border-top: 1px solid var(--bord); }
.validation:last-child { padding-bottom: 0; }
/* case à cocher : zone tactile de 44 px autour d'une case de 24 px */
.case-lot {
  display: flex; align-items: flex-start; justify-content: center; flex: none; min-width: 44px; min-height: 44px;
  padding: 10px; margin: -10px -10px -10px; cursor: pointer;
}
.case-lot input { width: 24px; height: 24px; margin: 0; }
.validation-texte, .a-traiter-texte { display: flex; gap: 12px; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.validation-texte > span:last-child, .a-traiter-texte > span:last-child { min-width: 0; flex: 1; }
.evenement { display: flex; gap: 12px; padding: 12px 0; min-width: 0; overflow-wrap: anywhere; }
.evenement:first-child { padding-top: 0; }
.evenement:last-child { padding-bottom: 0; }
.evenement-texte { min-width: 0; flex: 1; }
.evenements-autres { margin: 10px 0 0; }
.evenements-autres a { display: inline-flex; align-items: center; min-height: 44px; }
/* 2. la nuit : fond légèrement teinté de son état, jamais de bande latérale */
.nuit { margin-top: 12px; }
.nuit > * { margin: 0; }
.nuit-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.nuit-resume { margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.nuit-annule { margin-top: 6px; font-weight: 600; }
.nuit-relance { margin-top: 6px; }
.nuit-infos { margin-top: 6px; overflow-wrap: anywhere; }
h2.nuit-statut { margin: 0; }
/* 3. l'essentiel : une liste compacte (une ligne par chiffre sur téléphone, une rangée au-delà de 640 px) */
.essentiel h2 { margin-bottom: 8px; }
.essentiel-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 4px 16px; }
.chiffre {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "libelle valeur" "precision precision";
  column-gap: 12px; padding: 10px 0; min-width: 0;
}
.chiffre + .chiffre { border-top: 1px solid var(--bord); }
.chiffre dt { grid-area: libelle; color: var(--discret); align-self: center; }
.chiffre dd { margin: 0; }
.chiffre-valeur {
  grid-area: valeur; font-size: var(--t-2); font-weight: 700; color: var(--titre); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chiffre-precision { grid-area: precision; color: var(--discret); overflow-wrap: anywhere; }
.essentiel-pays { margin: 4px 0 0; }
.essentiel-pays a { display: inline-flex; align-items: center; min-height: 44px; }
/* 4. actions détaillées, 5. détail replié */
.bloc-action h2 { margin-bottom: 8px; }
.bloc-action > .carte { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bloc-action > .carte > * { margin: 0; }
.titre-detail { margin-bottom: 8px; }
.titre-detail + .replie { margin-top: 0; }
.replie > summary .discret { font-weight: 400; }
.compteurs { list-style: none; margin: 0; padding: 0; }
.compteur { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; color: var(--texte); }
.compteur + .compteur { border-top: 1px solid var(--bord); }
.compteur-nombre {
  min-width: 2.5rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--teinte);
}
/* tableaux dans un volet replié : lignes séparées par un filet, pas de cartes dans la carte */
.replie .cartes-mobiles tr { background: none; box-shadow: none; border-radius: 0; margin: 0; padding: 10px 0; }
.replie .cartes-mobiles tr + tr { border-top: 1px solid var(--bord); }
@media (min-width: 640px) {
  .essentiel-liste { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); padding: 0; }
  .chiffre {
    grid-template-columns: minmax(0, 1fr); grid-template-areas: "libelle" "valeur" "precision";
    padding: 14px 16px; row-gap: 2px;
  }
  .chiffre + .chiffre { border-top: 0; box-shadow: inset 1px 0 0 var(--bord); }
  .chiffre-valeur { text-align: left; font-size: var(--t-3); }
  .lot { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .sujet-urgent .actions-pouce .bouton { width: auto; }
}
@media (min-width: 960px) {
  .replie .cartes-mobiles { box-shadow: none; background: none; }
  .replie .cartes-mobiles tr + tr { border-top: 0; }
}

/* --- escalier et détail d'un run --- */
.cible-titre { overflow-wrap: anywhere; }
.cible-infos { margin-top: -0.25rem; overflow-wrap: anywhere; }
.escalier-carte { max-width: 440px; padding: 8px; }
.escalier { display: block; width: 100%; height: auto; }
.escalier-sol { stroke: var(--bord-champ); stroke-width: 1; }
.escalier-depart { fill: var(--neutre); opacity: 0.45; }
.escalier-marche { fill: currentColor; }
/* texte SVG en unités du viewBox (340 de large) : rendu à l'échelle du dessin */
.escalier-valeur { fill: var(--texte); font-size: 16px; font-weight: 600; }
.escalier-etiquette { fill: var(--discret); font-size: 16px; }
.escalier-absent::first-letter { text-transform: uppercase; }
.marches { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.marches > .carte + .carte { margin-top: 0; }
.marche-titre { margin: 0 0 8px; }
.marche-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; }
.marche-stats div { min-width: 0; }
.marche-stats dt { color: var(--discret); }
.marche-stats dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.marche-decision { margin: 10px 0 0; overflow-wrap: anywhere; }
.marche-decision .pastille-action { margin-right: 6px; }
.etape-finale { margin: 10px 0 0; overflow-wrap: anywhere; }
.filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 14px; }
.filtres label { display: flex; flex-direction: column; gap: 4px; color: var(--discret); min-width: 0; }
.filtre-recherche { flex: 1 1 12rem; }
.filtre-recherche input { width: 100%; }
.lien-filtre { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 640px) {
  .marche-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- fil du récit --- */
.run-carte { margin-top: 12px; }
.run-carte-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.run-date { margin: 0; font-size: var(--t-3); line-height: 1.2; }
.run-annee { font-size: var(--t-1); }
.recit p { margin: 8px 0 0; overflow-wrap: anywhere; }
.run-evenements { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--bord); display: grid; gap: 8px; }
.run-evenements li { display: flex; gap: 10px; overflow-wrap: anywhere; min-width: 0; }
.run-evenements .icone { font-size: var(--t-2); }
.run-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 14px; }
.run-actions form { margin: 0; }
.confirmation p { margin: 0 0 10px; overflow-wrap: anywhere; }
.confirmation .actions form { margin: 0; }
.confirmation-quand { margin-top: 4px; }

/* --- règles --- */
.regles-intro { margin-top: -0.25rem; }
.suspension { margin-bottom: 12px; }
.suspension h2 { margin: 0 0 6px; font-size: var(--t-1); }
.suspension p { margin: 0; overflow-wrap: anywhere; }
.regles, .versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.regles > .carte + .carte, .versions > .carte + .carte { margin-top: 0; }
.regle h2 { margin: 0; font-size: var(--t-1); overflow-wrap: anywhere; }
.regle-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 6px; }
.regle-numero {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; height: 1.75rem; margin-right: 6px;
  border-radius: 999px; background: var(--nuit); color: var(--sur-nuit); font-size: var(--t-1); font-weight: 650;
}
.regle-phrase { margin: 6px 0 0; overflow-wrap: anywhere; }
.regle-valeurs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 16px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--bord); }
.regle-valeurs div { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.regle-valeurs dt { color: var(--discret); min-width: 0; }
.regle-valeurs dd { margin: 0; font-weight: 700; white-space: nowrap; }
.tableau-compact { margin-top: 12px; }
.tableau-compact caption { text-align: left; padding: 0 0 4px; }
.tableau-compact th, .tableau-compact td { padding: 8px 10px; }
.version-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.version-motif { margin: 6px 0 0; font-style: italic; overflow-wrap: anywhere; }
.version-changements { margin: 6px 0 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.version form { margin: 10px 0 0; }
.version p.discret { margin: 6px 0 0; }
.formulaire-regles { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.formulaire-regles .actions { margin-top: 0; }
.formulaire-regles input[type="text"], .confirmation input[type="text"] { width: 100%; max-width: 14rem; }
.confirmation input[type="text"] { max-width: none; }
.grille-saisie { margin: 0; padding: 12px; border: 1px solid var(--bord); border-radius: var(--rayon-carte); display: grid; gap: 8px; min-width: 0; }
.grille-saisie legend { padding: 0 4px; font-weight: 600; }
.grille-ligne { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.grille-ligne input[type="text"] { max-width: none; min-width: 0; }
.tableau-avant-apres { margin: 4px 0 12px; }
.valeur-apres { font-weight: 700; }
@media (min-width: 640px) {
  .regle-valeurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- livres --- */
.livres-intro { margin-top: -0.25rem; }
.livres { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.livres > .carte + .carte { margin-top: 0; }
.livre h2 { margin: 0 0 4px; overflow-wrap: anywhere; }
.livre-pays { padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--bord); }
.livre-ligne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; margin-top: 8px; }
.livre-tete { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.livre-ligne input[type="text"], .livre-ligne select { width: 100%; min-width: 0; }
.livre-valide { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.livre-valide input { width: 22px; height: 22px; margin: 0; }
.livre-ligne .bouton { justify-self: start; }
@media (min-width: 900px) {
  .livre-ligne { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; }
}

/* --- propositions de Dawan expert --- */
.proposition { margin-bottom: 12px; }
.proposition-tete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.proposition-tete h3 { margin: 0; overflow-wrap: anywhere; }
.proposition-texte { white-space: pre-line; overflow-wrap: anywhere; }
.proposition-effet { margin: 8px 0; }
.proposition-effet dt { color: var(--discret); }
.proposition-effet dd { margin: 0; }
.proposition-refus { margin-top: 12px; }

/* --- volets <details> : marqueur dessiné (chevron) ; rien n'est caché sans JS, un toucher ouvre --- */
.livre-resume, .replie > summary, .terme > summary, .plus-options > summary, .lien-changer > summary,
.comment > summary, .groupes-livre-bloc > summary, .en-savoir-plus > summary { list-style: none; cursor: pointer; }
.livre-resume::-webkit-details-marker, .replie > summary::-webkit-details-marker, .terme > summary::-webkit-details-marker,
.plus-options > summary::-webkit-details-marker, .lien-changer > summary::-webkit-details-marker,
.comment > summary::-webkit-details-marker, .groupes-livre-bloc > summary::-webkit-details-marker,
.en-savoir-plus > summary::-webkit-details-marker { display: none; }
.chevron, .replie > summary::after, .terme > summary::after, .plus-options > summary::after, .lien-changer > summary::after,
.comment > summary::after, .groupes-livre-bloc > summary::after, .en-savoir-plus > summary::after {
  content: ""; flex: none; width: 12px; height: 8px; background: currentColor;
  clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 38%, 50% 100%, 0 38%); transition: transform var(--duree);
}
.chevron { color: var(--discret); }
.livre-recolte[open] > .livre-resume .chevron, .replie[open] > summary::after, .terme[open] > summary::after,
.plus-options[open] > summary::after, .lien-changer[open] > summary::after, .comment[open] > summary::after,
.groupes-livre-bloc[open] > summary::after, .en-savoir-plus[open] > summary::after { transform: rotate(180deg); }
.lien-changer > summary, .comment > summary, .plus-options > summary, .groupes-livre-bloc > summary, .en-savoir-plus > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--lien); font-weight: 600;
}

/* --- page « Récolte » : tête, bandeau d'état en deux étapes, livres, sections repliées --- */
.tete-page h1 { margin-bottom: 0.25rem; }
.sous-titre { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.comment { margin: 0 0 8px; }
.comment p { margin: 0 0 8px; max-width: 65ch; }
.etat-recolte { display: grid; gap: 14px; }
.tout-a-jour { margin: 0; display: flex; align-items: center; gap: 10px; font-size: var(--t-2); font-weight: 700; color: var(--hausse); }
.tout-a-jour::before {
  content: ""; flex: none; width: 18px; height: 14px; background: currentColor;
  clip-path: polygon(0 55%, 14% 40%, 38% 64%, 86% 0, 100% 14%, 38% 92%);
}
.etapes-recolte { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.etape { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; }
.etape + .etape { padding-top: 14px; border-top: 1px solid var(--bord); }
.etape-numero {
  display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--nuit); color: var(--sur-nuit); font-weight: 650;
}
.etape-corps { min-width: 0; }
.etape-corps h3 { margin: 3px 0 2px; }
.etape-corps p { margin: 0; overflow-wrap: anywhere; }
.etape-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 10px; }
.etape-actions .bouton { width: 100%; min-height: 48px; }
.etape-lien { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.alerte-recolte {
  margin: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: var(--rayon-bouton);
  background: color-mix(in oklab, var(--danger) var(--dose-voile), var(--carte));
}
.alerte-recolte .etape-lien { color: var(--danger); text-decoration-color: color-mix(in oklab, var(--danger) 45%, transparent); }
.alerte-point { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.livres-recolte h2 { margin-bottom: 10px; }
.filtres-livres .pastille-pays { padding: 0 14px; white-space: nowrap; }
.liste-livres { list-style: none; margin: 0; padding: 0; background: var(--carte); border-radius: var(--rayon-carte); box-shadow: var(--ombre-carte); }
.liste-livres > li + li { border-top: 1px solid var(--bord); }
.liste-livres .flash { margin: 10px 12px 0; }
/* livre visé par une ancre après une action : son message, juste au-dessus, reste visible */
.livre-recolte, .replie { scroll-margin-top: 12px; }
.liste-livres .flash + .livre-recolte { scroll-margin-top: 96px; }
.flash form { margin-top: 8px; }
.livre-resume {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px;
  padding: 6px 14px; border-radius: var(--rayon-carte);
}
.livre-resume:hover { background: color-mix(in oklab, var(--texte) 3%, var(--carte)); }
.livre-drapeau { font-size: var(--t-2); line-height: 1; }
.livre-texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.livre-titre { font-weight: 650; color: var(--titre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livre-recolte[open] .livre-titre { white-space: normal; overflow-wrap: anywhere; }
.livre-statut { display: inline-flex; align-items: center; gap: 6px; color: var(--discret); }
.livre-statut::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--teinte, var(--neutre)); }
.statut-a_valider { --teinte: var(--attente); color: var(--attente); font-weight: 600; }
.statut-probleme { --teinte: var(--danger); color: var(--danger); font-weight: 600; }
.statut-prets { --teinte: var(--hausse); }
.statut-exclus { --teinte: var(--neutre); }
.livre-corps { display: grid; gap: 12px; padding: 2px 14px 16px; min-width: 0; }
.livre-corps > p { margin: 0; overflow-wrap: anywhere; }
.livre-alerte { padding: 10px 12px; border-radius: var(--rayon-bouton); background: color-mix(in oklab, var(--danger) var(--dose-voile), var(--carte)); }
.recolte-liens { display: grid; gap: 12px; }
.liens-livre { list-style: none; margin: 0; padding: 0; }
.lien-recolte { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--bord); min-width: 0; }
.lien-recolte:first-child { padding-top: 0; border-top: 0; }
.lien-ligne, .lien-alerte { margin: 0; overflow-wrap: anywhere; }
.lien-type, .lien-fleche { color: var(--discret); }
.lien-groupe { font-weight: 650; }
.lien-ligne .pastille-action { min-height: 0; padding: 0 8px; margin-left: 4px; }
.lien-invalide .lien-groupe { color: var(--discret); text-decoration: line-through; }
.lien-alerte { color: var(--danger); font-weight: 600; }
.lien-changer .champ { margin-top: 2px; }
.lien-changer select {
  display: block; width: 100%; max-width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--texte);
  background: var(--carte); border: 1px solid var(--bord-champ); border-radius: var(--rayon-champ);
}
.lien-changer select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lien-changer .bouton, .recolte-liens .actions .bouton, .livre-corps form > .bouton { width: 100%; min-height: 48px; }
.recolte-liens .actions { margin-top: 0; }
.plus-options { padding-top: 4px; border-top: 1px solid var(--bord); }
.options-corps { display: grid; gap: 12px; padding-top: 4px; }
.options-corps h4 { margin: 0 0 4px; font-size: var(--t-1); font-weight: 600; color: var(--discret); }
.options-corps p { margin: 0; overflow-wrap: anywhere; }
.liste-simple { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.liste-simple li + li { margin-top: 2px; }
.groupes-livre-bloc p { margin: 4px 0; }
.groupes-livre { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.groupe { padding: 8px 10px; border: 1px solid var(--bord); border-radius: 8px; overflow-wrap: anywhere; }
.groupe-type { color: var(--discret); }
.groupe-inactif { color: var(--discret); background: var(--fond); border-style: dashed; }
.groupe-mention { display: inline-block; padding: 0 8px; border: 1px solid currentColor; border-radius: 999px; font-size: var(--t-1); }
/* sections repliées du bas de page */
.replie { margin-top: 12px; padding: 0 16px; }
.replie > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font-weight: 650; color: var(--titre); }
.replie[open] { padding-bottom: 16px; }
.replie > p { margin: 0 0 10px; }
.termes-livre { margin: 16px 0 4px; overflow-wrap: anywhere; }
.termes { list-style: none; margin: 0; padding: 0; }
.termes > li + li { border-top: 1px solid var(--bord); }
.terme > summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "texte chevron" "chiffres chevron";
  column-gap: 12px; align-items: center; min-height: 52px; padding: 6px 0;
}
.terme > summary::after { grid-area: chevron; color: var(--discret); }
.terme-texte { grid-area: texte; font-weight: 650; overflow-wrap: anywhere; }
.terme-chiffres { grid-area: chiffres; color: var(--discret); font-variant-numeric: tabular-nums; }
.terme p { margin: 0 0 4px; }
.terme[open] { padding-bottom: 10px; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.filtres-recolte { margin: 0 0 8px; }
.filtres-recolte label { flex: 1 1 9rem; }
.filtres-recolte select { width: 100%; }
.historique { list-style: none; margin: 8px 0 0; padding: 0; }
.historique-ligne { padding: 10px 0; border-top: 1px solid var(--bord); overflow-wrap: anywhere; }
.historique-ligne p { margin: 0; }
.historique-ligne p + p { margin-top: 2px; }
.historique-statut.statut-erreur { color: var(--danger); font-weight: 600; }
.historique-statut.statut-creee { color: var(--hausse); font-weight: 600; }
.livres-exclus { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.livre-exclu { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--bord); }
.livre-exclu p { margin: 0; overflow-wrap: anywhere; }
.livre-exclu .bouton { width: 100%; min-height: 48px; }
/* écran récapitulatif de « Valider les propositions » */
.recap-livres { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 14px; }
.recap-livre { margin: 0 0 4px; font-size: var(--t-1); overflow-wrap: anywhere; }
.actions-pouce { gap: 12px; }
.actions-pouce .bouton { width: 100%; min-height: 48px; }

/* --- ACOS cible (catalogue) : une ligne par livre × pays, « Modifier » déplie la saisie ; récapitulatif, résultat,
   historique des renommages --- */
.alerte-acos {
  margin: 0 0 12px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: var(--rayon-bouton);
  background: color-mix(in oklab, var(--danger) var(--dose-voile), var(--carte));
}
.alerte-acos .etape-lien { color: var(--danger); text-decoration-color: color-mix(in oklab, var(--danger) 45%, transparent); }
.livre-acos { padding: 4px 0 0; scroll-margin-top: 12px; }
.livre-acos-vide { margin: 8px 0 0; overflow-wrap: anywhere; }
.acos-etat { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 32px; }
.acos-etat strong { font-variant-numeric: tabular-nums; }
.acos-modifier > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--lien); font-weight: 600;
}
.acos-modifier > summary::-webkit-details-marker { display: none; }
.acos-modifier > summary::after {
  content: ""; flex: none; width: 12px; height: 8px; background: currentColor;
  clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 38%, 50% 100%, 0 38%); transition: transform var(--duree);
}
.acos-modifier[open] > summary::after { transform: rotate(180deg); }
.acos-campagnes { margin: 4px 0 10px; padding-left: 1.2rem; overflow-wrap: anywhere; }
.acos-campagnes li + li { margin-top: 4px; }
.acos-campagnes .pastille-statut, .lotterie-nom .pastille-statut, .renommage-tete .pastille-statut { min-height: 0; padding: 0 8px; }
.acos-formulaire { display: grid; gap: 10px; padding-bottom: 6px; }
.acos-formulaire input[type="number"] {
  width: 8rem; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--texte); background: var(--carte);
  border: 1px solid var(--bord-champ); border-radius: var(--rayon-champ);
}
.acos-formulaire input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.acos-formulaire .bouton { width: 100%; min-height: 48px; }
.lotterie { margin-top: 12px; }
.lotterie > h2 { margin-top: 0; }
.lotterie-pays { margin: 16px 0 0; }
.lotterie-nom { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--bord); font-weight: 600; overflow-wrap: anywhere; }
.lotterie-pays + .lotterie-nom { border-top: 0; padding-top: 0; margin-top: 8px; }
.recap-acos > p { overflow-wrap: anywhere; }
.acos-changements { margin: 0 0 12px; padding-left: 1.2rem; display: grid; gap: 10px; overflow-wrap: anywhere; }
.acos-avant { color: var(--discret); }
.acos-mention { display: block; margin-top: 2px; font-size: var(--t-1); color: var(--attente); font-weight: 600; }
.acos-mention.discret { color: var(--discret); font-weight: 400; }
.acos-a-part { margin: 0 0 12px; overflow-wrap: anywhere; }
.acos-a-part > p { margin: 0 0 4px; }
.acos-alerte { padding: 10px 12px; border-radius: var(--rayon-bouton); font-weight: 600; background: color-mix(in oklab, var(--attente) var(--dose-voile), var(--carte)); }
.renommages, .acos-resultats { list-style: none; margin: 0; padding: 0; }
.renommage, .acos-resultat { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--bord); overflow-wrap: anywhere; }
.renommage:first-child, .acos-resultat:first-child { border-top: 0; padding-top: 0; }
.renommage p, .acos-resultat p { margin: 0; }
.renommage-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.renommage form { margin-top: 6px; }
.statut-renommage-fait, .statut-sort-fait { --teinte: var(--hausse); }
.statut-renommage-erreur, .statut-sort-erreur { --teinte: var(--danger); }
.statut-renommage-a_verifier, .statut-sort-a_verifier { --teinte: var(--attente); }
.statut-renommage-annule { --teinte: var(--pause); }
.statut-sort-essai { --teinte: var(--exploration); }
@media (min-width: 640px) {
  .acos-formulaire { grid-template-columns: auto auto; justify-content: start; align-items: end; }
  .acos-formulaire .bouton { width: auto; }
}

/* --- bloc « Récolte des termes » des règles : interrupteurs, choix exclusifs (mode d'enchère, période) --- */
.interrupteur-bloc { display: grid; gap: 2px; }
.bascule { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-top: 9px; cursor: pointer; }
.bascule input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 44px; height: 26px; margin: 0;
  border-radius: 999px; background: var(--neutre); cursor: pointer; transition: background-color var(--duree);
}
.bascule input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--pouce); transition: transform var(--duree);
}
.bascule input[type="checkbox"]:checked { background: var(--action); }
.bascule input[type="checkbox"]:checked::after { transform: translateX(18px); }
.bascule input:focus-visible, .mode-choix input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bascule-texte { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
/* conséquence d'une récolte éteinte : affichée quand la case est décochée (CSS seul, sans script) */
.si-eteint { display: none; color: var(--attente); font-weight: 600; }
.bascule input:not(:checked) ~ .bascule-texte .si-eteint { display: block; }
.en-savoir-plus { margin-left: 56px; }
.en-savoir-plus p { margin: 0 0 4px; }
.choix-exclusifs { margin: 0; padding: 12px; border: 1px solid var(--bord); border-radius: var(--rayon-carte); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.choix-exclusifs legend { padding: 0 4px; font-weight: 600; }
.mode-enchere { display: grid; gap: 6px; min-width: 0; }
.mode-choix { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.mode-choix input { width: 22px; height: 22px; margin: 0; }
.saisie-suffixe { display: flex; align-items: center; gap: 8px; }
.saisie-suffixe input[type="text"] { max-width: 9rem; }
.suffixe { color: var(--discret); font-weight: 600; }
@media (min-width: 640px) {
  .etape-actions .bouton, .lien-changer .bouton, .recolte-liens .actions .bouton, .livre-corps form > .bouton,
  .livre-exclu .bouton, .actions-pouce .bouton { width: auto; }
  .lien-changer select { width: auto; min-width: 16rem; align-self: flex-start; }
  .filtres-recolte label { flex: 0 1 14rem; }
  .modes-enchere { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .etapes-recolte { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .etape + .etape { padding-top: 0; border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Chargement d'une page (entete.js) : bandeau fixe en haut, contenu atténué */
body.chargement main { opacity: .45; }
body.chargement::after {
  content: "Chargement…"; position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  padding: 10px 18px; border-radius: var(--rayon-bouton); background: var(--action); color: var(--sur-action);
  font-weight: 600; font-size: 1rem; box-shadow: 0 4px 16px oklch(20% 0.02 254 / 25%);
}
