/* assets/cartoagri.css, cartoagri.fr (index.php, assets/cartoagri.js).
   Identité propre de CartoAgri : la vigne plutôt que le vert attendu. Encre aubergine, raisin pour les actions et la
   carte, lavande pour les fonds doux, pousse (vert de feuille) pour ce qui est à jour et téléchargeable, framboise pour
   les alertes. Une seule famille, Bricolage Grotesque (variable : chasse, graisse, taille optique). */

@font-face {
  font-family: 'Bricolage CartoAgri';
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('fonts/bricolage-grotesque-latin.woff2') format('woff2');
}

:root {
  --encre: #1D1640; --encre-doux: #5E577F; --encre-pale: #716B91;
  --raisin: #5B3FD9; --raisin-fort: #4329B8; --lavande: #EFEBFF; --lavande-fort: #E0D8FF;
  --pousse: #1F9D61; --pousse-fort: #167A4A; --pousse-clair: #E2F5EB;
  --framboise: #B02457; --framboise-clair: #FCE7EF;
  --ciel: #1E5BB8; --ciel-clair: #E3EEFF;
  --fond: #FBFAFF; --papier: #FFFFFF; --trait: #E6E2F5; --trait-fort: #CDC6EC;
  --sur-raisin: #FFFFFF;
  --carte-0: #F3F1FC; --carte-1: #E1DBFB; --carte-2: #C6BAF7; --carte-3: #A491F0; --carte-4: #7F68E3; --carte-5: #5B3FD9; --carte-6: #36208F;
  --carte-trait: #FFFFFF; --carte-choix: #1F9D61;
  --ombre: 0 1px 2px rgba(29, 22, 64, .06), 0 18px 40px -28px rgba(29, 22, 64, .45);
  --rayon-l: 24px; --rayon-m: 16px; --rayon-s: 10px;
  --police: 'Bricolage CartoAgri', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --entete-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --encre: #EEEBFF; --encre-doux: #B4ADD6; --encre-pale: #8A83AE;
    --raisin: #A895FF; --raisin-fort: #C3B6FF; --lavande: #261F4A; --lavande-fort: #33296A;
    --pousse: #4BD08E; --pousse-fort: #74E0AA; --pousse-clair: #123527;
    --framboise: #FF7FAA; --framboise-clair: #3A1426;
    --ciel: #8DB8FF; --ciel-clair: #16294A;
    --fond: #120E24; --papier: #1A1533; --trait: #2C2550; --trait-fort: #3E356C;
    --sur-raisin: #120E24;
    --carte-0: #221C40; --carte-1: #2E2560; --carte-2: #40338A; --carte-3: #5644B3; --carte-4: #7560DA; --carte-5: #9883F5; --carte-6: #C8BCFF;
    --carte-trait: #120E24; --carte-choix: #4BD08E;
    --ombre: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 44px -30px rgba(0, 0, 0, .9);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--entete-h) + 16px); }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--police); font-size: 16.5px; line-height: 1.55;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
a { color: var(--raisin); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--raisin-fort); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--raisin); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
.evitement { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: var(--raisin); color: var(--sur-raisin); border-radius: 10px; z-index: 60; }
.evitement:focus { left: 12px; }
.lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; height: var(--entete-h);
  padding: 0 clamp(16px, 2.4vw, 36px); background: color-mix(in srgb, var(--fond) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--trait); }
.marque { display: inline-flex; align-items: center; gap: 10px; color: var(--encre); text-decoration: none; font-weight: 780; font-stretch: 82%; font-size: 1.35rem; letter-spacing: -.02em; flex: none; }
.marque svg { width: 34px; height: 34px; }
.m-fond { fill: var(--raisin); }
.m-champs { fill: none; stroke: var(--sur-raisin); stroke-width: 2.4; stroke-linecap: round; opacity: .9; }
.m-point { fill: var(--pousse); stroke: var(--sur-raisin); stroke-width: 1.6; }
.menu { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.menu a { flex: none; padding: 8px 14px; border-radius: 999px; color: var(--encre-doux); text-decoration: none; font-weight: 600; font-size: .95rem; }
.menu a:hover { background: var(--lavande); color: var(--encre); }
.menu a[aria-current="page"] { background: var(--encre); color: var(--fond); }
.retour-dis21 { flex: none; font-size: .88rem; color: var(--encre-doux); text-decoration: none; }
.retour-dis21:hover { color: var(--raisin); text-decoration: underline; }

/* Deux volets : la carte à gauche, le contenu à droite */
.appli { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: clamp(16px, 2.4vw, 40px);
  padding: 20px clamp(16px, 2.4vw, 36px) 40px; align-items: start; }
.volet-carte { position: sticky; top: calc(var(--entete-h) + 16px); grid-column: 1; grid-row: 1; }
.carte-cadre { position: relative; }
#ca-carte { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--entete-h) - 96px); }
#ca-carte path.zone { stroke: var(--carte-trait); stroke-width: .8; stroke-linejoin: round; cursor: pointer; outline: none; }
#ca-carte path.zone:hover { filter: brightness(1.06) saturate(1.1); }
#ca-carte path.zone.voisin { opacity: .35; }
#ca-carte path.zone.voisin:focus { opacity: 1; }
/* Département choisi et focus clavier : un halo couleur du fond sous un trait, visibles sur toutes les teintes */
#ca-carte .anneau { fill: none; pointer-events: none; stroke-linejoin: round; }
#ca-carte .anneau.choix-halo, #ca-carte .anneau.focus-halo { stroke: var(--fond); stroke-width: 7; }
#ca-carte .anneau.choix { stroke: var(--carte-choix); stroke-width: 3.5; }
#ca-carte .anneau.focus { stroke: var(--encre); stroke-width: 3.5; stroke-dasharray: 6 3; }
#ca-carte path.region { fill: none; stroke: var(--encre); stroke-opacity: .28; stroke-width: 1.1; pointer-events: none; }
#ca-carte .encart { fill: none; stroke: var(--trait-fort); stroke-width: 1; stroke-dasharray: 3 4; }
#ca-carte .encart-nom { font: 600 16px var(--police); fill: var(--encre-doux); }
/* Paris et petite couronne : cadre de la zone agrandie sur la carte, numéros des départements dans l'encart */
#ca-carte .encart-zone { fill: none; stroke: var(--encre); stroke-opacity: .6; stroke-width: 1.2; stroke-dasharray: 3 2; pointer-events: none; }
#ca-carte .encart-code { font: 700 15px var(--police); text-anchor: middle; dominant-baseline: central; fill: var(--encre); pointer-events: none;
  paint-order: stroke; stroke: var(--fond); stroke-width: 5px; stroke-linejoin: round; }
.carte-bulle { position: absolute; pointer-events: none; padding: 7px 12px; border-radius: 12px; background: var(--encre); color: var(--fond);
  font-size: .9rem; font-weight: 600; white-space: nowrap; transform: translate(-50%, -130%); opacity: 0; }
.carte-bulle.vue { opacity: 1; }
.carte-legende { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: .86rem; color: var(--encre-doux); }
.carte-legende .gamme { display: inline-flex; border-radius: 999px; overflow: hidden; }
.carte-legende .gamme i { width: 22px; height: 10px; }

.volet-contenu { min-width: 0; outline: none; grid-column: 2; grid-row: 1; }
.chargement { color: var(--encre-doux); padding: 40px 0; }

/* Accueil : la question */
.accueil { padding-top: clamp(8px, 4vh, 48px); }
.question { font-size: clamp(2.5rem, 4.4vw, 4.6rem); font-weight: 780; font-stretch: 78%; line-height: .98; letter-spacing: -.035em; max-width: 15ch; text-wrap: balance; }
.chapeau { margin-top: 18px; font-size: 1.1rem; color: var(--encre-doux); max-width: 46ch; }
.recherche { position: relative; margin-top: 26px; max-width: 560px; }
.recherche input { width: 100%; height: 60px; padding: 0 20px 0 54px; border: 2px solid var(--trait-fort); border-radius: 18px; background: var(--papier);
  font-size: 1.1rem; outline: none; box-shadow: var(--ombre); border-color: var(--encre-pale); }
.recherche input:focus { border-color: var(--raisin); }
.recherche svg { position: absolute; left: 18px; top: 19px; width: 22px; height: 22px; fill: none; stroke: var(--encre-doux); stroke-width: 2; stroke-linecap: round; }
.suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--papier); border: 1px solid var(--trait); border-radius: 16px; box-shadow: var(--ombre); max-height: 340px; overflow-y: auto; }
.suggestions li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--lavande); }
.suggestions b { font-weight: 650; }
.suggestions small { color: var(--encre-doux); font-size: .85rem; text-align: right; }
.raccourcis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.raccourcis button { border: 1px solid var(--trait-fort); background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--encre); }
.raccourcis button:hover { border-color: var(--raisin); color: var(--raisin); }
.raccourcis span { align-self: center; color: var(--encre-doux); font-size: .92rem; margin-right: 2px; }
.alerte { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; border-radius: var(--rayon-m);
  background: var(--framboise-clair); color: var(--encre); max-width: 640px; }
.alerte .pastille { flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--framboise); box-shadow: 0 0 0 5px color-mix(in srgb, var(--framboise) 22%, transparent); }
.alerte b { display: block; }
/* Plusieurs grilles du même jour : une ligne chacune */
.alerte span + span { display: block; margin-top: 4px; }
.alerte button { margin-top: 6px; }
.entrees { margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--trait); max-width: 640px; }
.entrees li { border-bottom: 1px solid var(--trait); }
.entrees a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 16px 4px; color: var(--encre); text-decoration: none; }
.entrees a:hover b { color: var(--raisin); }
.entrees b { font-size: 1.15rem; font-weight: 680; }
.entrees span { grid-column: 1; color: var(--encre-doux); font-size: .95rem; }
.entrees em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 700; font-stretch: 85%; font-size: 1.4rem; color: var(--raisin); }
.base { margin-top: 18px; font-size: .88rem; color: var(--encre-pale); }

/* Fiche d'un département */
.fiche-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.fiche-tete h1 { font-size: clamp(2.2rem, 3.6vw, 3.6rem); font-weight: 780; font-stretch: 80%; letter-spacing: -.03em; line-height: 1; }
.fiche-tete p { color: var(--encre-doux); margin-top: 6px; }
.lien-bouton { border: 0; background: none; padding: 6px 0; color: var(--raisin); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.metiers { margin-top: 20px; }
.metiers > p { font-weight: 650; margin-bottom: 8px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--trait-fort); background: var(--papier); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.puce small { font-weight: 700; color: var(--encre-pale); font-size: .82rem; }
.puce:hover { border-color: var(--raisin); }
.puce[aria-pressed="true"] { background: var(--raisin); border-color: var(--raisin); color: var(--sur-raisin); }
.puce[aria-pressed="true"] small { color: var(--sur-raisin); opacity: .8; }
.sommaire { position: sticky; top: var(--entete-h); z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 22px 0 0; padding: 10px 0;
  background: var(--fond); border-bottom: 1px solid var(--trait); }
.sommaire a { flex: none; padding: 6px 12px; border-radius: 10px; color: var(--encre-doux); text-decoration: none; font-weight: 600; font-size: .92rem; }
.sommaire a:hover { background: var(--lavande); color: var(--encre); }
.sommaire a.actif { background: var(--lavande); color: var(--raisin-fort); }

.rubrique { padding: 30px 0 6px; scroll-margin-top: calc(var(--entete-h) + 64px); }
.rubrique > h2:focus { outline: none; }
.rubrique > h2 { font-size: 1.7rem; font-weight: 740; font-stretch: 84%; letter-spacing: -.02em; }
.rubrique > .intro { margin-top: 6px; color: var(--encre-doux); max-width: 70ch; }
.rubrique h3 { font-size: 1.08rem; font-weight: 680; margin: 22px 0 8px; }

/* L'essentiel : le seul bloc mis en avant */
.essentiel { margin-top: 16px; padding: clamp(18px, 2vw, 26px); border-radius: var(--rayon-l); background: var(--raisin); color: var(--sur-raisin); }
.essentiel :focus-visible { outline-color: var(--sur-raisin); }
.essentiel .etiquette { font-size: .95rem; opacity: .85; }
.essentiel h3 { margin: 4px 0 2px; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 760; font-stretch: 82%; letter-spacing: -.02em; }
.essentiel .meta { opacity: .85; font-size: .95rem; }
.essentiel .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.essentiel .bouton { background: var(--sur-raisin); color: var(--raisin-fort); }
.essentiel .bouton:hover { background: var(--lavande); color: var(--raisin-fort); }
.essentiel .bouton.discret { background: transparent; color: var(--sur-raisin); border: 1.5px solid color-mix(in srgb, var(--sur-raisin) 55%, transparent); }
.essentiel .bouton.discret:hover { background: color-mix(in srgb, var(--sur-raisin) 12%, transparent); }
.essentiel .accompagnent { margin-top: 18px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--sur-raisin) 30%, transparent); font-size: .95rem; }
.essentiel .accompagnent a { color: var(--sur-raisin); }
.essentiel .alerte { background: color-mix(in srgb, var(--sur-raisin) 14%, transparent); color: var(--sur-raisin); margin-top: 16px; }
.essentiel .alerte .pastille { background: var(--sur-raisin); box-shadow: none; }
.autres-conventions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

.bouton { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 14px; background: var(--raisin);
  color: var(--sur-raisin); font-weight: 700; text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--raisin-fort); color: var(--sur-raisin); }
.bouton.secondaire { background: var(--papier); color: var(--encre); border: 1.5px solid var(--trait-fort); }
.bouton.secondaire:hover { border-color: var(--raisin); color: var(--raisin); }
.bouton svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Listes de textes : des lignes, pas des cartes */
.lignes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--trait); }
.ligne { border-bottom: 1px solid var(--trait); }
.ligne-btn { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; width: 100%; padding: 13px 4px; border: 0; background: none; text-align: left; cursor: pointer; }
.ligne-btn:hover { background: color-mix(in srgb, var(--lavande) 55%, transparent); }
.ligne-btn:focus-visible { outline-offset: -3px; }
.ligne .titre { font-weight: 620; line-height: 1.35; }
.ligne .infos { grid-column: 1; color: var(--encre-doux); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ligne .cote { grid-row: 1 / span 2; grid-column: 2; align-self: center; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge.kali { background: var(--lavande); color: var(--raisin-fort); }
.badge.web { background: var(--ciel-clair); color: var(--ciel); }
/* Journal officiel : texte officiel, mais pas encore dans la base consolidée, d'où le badge en trait plutôt qu'en aplat */
.badge.jo { background: var(--papier); color: var(--raisin-fort); box-shadow: inset 0 0 0 1.5px var(--raisin); }
.badge.hds { background: var(--pousse-clair); color: var(--pousse-fort); }
.badge.alerte-b { background: var(--framboise-clair); color: var(--framboise); }
.badge.ancien { background: var(--trait); color: var(--encre-doux); }
.plus { margin-top: 10px; border: 0; background: none; color: var(--raisin); font-weight: 700; cursor: pointer; padding: 6px 0; }
.vide { color: var(--encre-doux); padding: 12px 0; }

/* Mutuelle et prévoyance : deux colonnes, non-cadres et cadres */
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 28px; }
.colonne h3 { display: flex; align-items: baseline; gap: 8px; }
.colonne h3 small { font-weight: 600; color: var(--encre-pale); font-size: .85rem; }
.document { padding: 12px 0; border-bottom: 1px solid var(--trait); }
.document a { font-weight: 640; text-decoration: none; color: var(--encre); }
.document a:hover { color: var(--raisin); text-decoration: underline; }
.document p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; color: var(--encre-doux); font-size: .88rem; }
/* Le régime couvert, en couleur : mutuelle en bleu, prévoyance en raisin, retraite en vert */
.regime { padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--lavande); color: var(--raisin-fort); }
.regime.r-sante, .regime.r-mixte { background: var(--ciel-clair); color: var(--ciel); }
.regime.r-retraite { background: var(--pousse-clair); color: var(--pousse-fort); }

/* Contacts et signataires */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 28px; }
.contact { padding: 12px 0; border-bottom: 1px solid var(--trait); }
.contact a { font-weight: 650; }
.contact p { color: var(--encre-doux); font-size: .9rem; margin-top: 2px; }
.sign { color: var(--encre-doux); font-size: .95rem; }
.sign b { color: var(--encre); font-weight: 650; }

/* Vues de liste (conventions, salaires, protection, sources) */
.vue-tete h1 { font-size: clamp(2rem, 3.2vw, 3.2rem); font-weight: 780; font-stretch: 80%; letter-spacing: -.03em; line-height: 1.02; }
.vue-tete p { margin-top: 10px; color: var(--encre-doux); max-width: 64ch; }
.filtre { margin-top: 18px; max-width: 420px; }
.filtre input, .filtre select { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--encre-pale); border-radius: 14px; background: var(--papier); outline: none; }
.filtre input:focus, .filtre select:focus { border-color: var(--raisin); }
.famille { margin-top: 30px; }
.famille > h2 { font-size: 1.35rem; font-weight: 720; font-stretch: 86%; }
.convention { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 4px; border-bottom: 1px solid var(--trait); align-items: center; }
.convention .nom { font-weight: 700; font-size: 1.08rem; }
.convention .infos { color: var(--encre-doux); font-size: .9rem; }
.convention .actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.convention .bouton { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.tableau { overflow-x: auto; margin-top: 16px; border: 1px solid var(--trait); border-radius: var(--rayon-m); background: var(--papier); }
.tableau table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th, .tableau td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--trait); }
.tableau th { font-weight: 700; color: var(--encre-doux); background: var(--fond); position: sticky; top: 0; }
.tableau tr[data-texte] { cursor: pointer; }
.tableau tr[data-texte]:hover td { background: color-mix(in srgb, var(--lavande) 55%, transparent); }
.texte-long { max-width: 72ch; }
.texte-long h2 { font-size: 1.4rem; margin: 30px 0 8px; font-weight: 720; font-stretch: 86%; }
.texte-long p, .texte-long li { color: var(--encre); margin-top: 8px; }

/* Tiroir de détail */
.tiroir-fond { position: fixed; inset: 0; z-index: 40; background: rgba(18, 14, 36, .45); }
.tiroir { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(640px, 100%); overflow-y: auto; padding: 22px 26px 40px; background: var(--papier);
  box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .6); }
.tiroir .fermer { position: sticky; top: 0; float: right; border: 1.5px solid var(--trait-fort); background: var(--papier); border-radius: 12px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.tiroir h2 { font-size: 1.45rem; font-weight: 730; font-stretch: 86%; line-height: 1.2; margin: 6px 90px 12px 0; }
.tiroir h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.tiroir dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 14px 0; font-size: .95rem; }
.tiroir dt { color: var(--encre-doux); }
.tiroir dd { margin: 0; }
.tiroir .citation { padding: 12px 14px; border-radius: 12px; background: var(--fond); font-size: .95rem; }
.tiroir .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.pied { padding: 18px clamp(16px, 2.4vw, 36px) 32px; border-top: 1px solid var(--trait); color: var(--encre-doux); font-size: .88rem; }
.pied p { max-width: 110ch; }
.pied .maj { margin-bottom: 8px; color: var(--encre); }
.pied .signature { margin-bottom: 8px; color: var(--encre); }
.pied .signature strong { font-weight: 600; }

/* Le seul mouvement d'ensemble : l'arrivée d'une fiche */
@media (prefers-reduced-motion: no-preference) {
  .entree { animation: entree .38s cubic-bezier(.2, .7, .2, 1) both; }
  #ca-carte path.zone { transition: fill .25s ease; }
  .carte-bulle { transition: opacity .12s; }
  @keyframes entree { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* Tablette et téléphone : la carte au-dessus, compacte */
@media (max-width: 1000px) {
  .appli { grid-template-columns: 1fr; }
  .volet-carte, .volet-contenu { grid-column: auto; grid-row: auto; }
  .volet-carte { position: static; }
  #ca-carte { max-height: 52vh; }
  .retour-dis21 { display: none; }
}
@media (max-width: 640px) {
  /* En-tête non fixé, menu en entier sur deux lignes : chaque rubrique reste visible ; le sommaire de la fiche colle en haut */
  :root { --entete-h: 0px; }
  body { font-size: 16px; }
  .entete { position: static; height: auto; flex-wrap: wrap; gap: 10px; padding-block: 12px; }
  .menu { order: 3; flex: 1 0 100%; flex-wrap: wrap; gap: 6px; overflow: visible; }
  .menu a { padding: 7px 12px; font-size: .9rem; border: 1px solid var(--trait-fort); }
  .menu a[aria-current="page"] { border-color: var(--encre); }
  .sommaire { mask-image: linear-gradient(to right, #000 82%, transparent); -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); }
  .sommaire::after { content: ''; flex: none; width: 48px; }
  .question { font-size: 2.35rem; }
  .ligne-btn, .convention { grid-template-columns: 1fr; }
  #ca-carte .encart-nom { font-size: 24px; }
  #ca-carte .encart-code { font-size: 22px; }
  .ligne .cote, .convention .actions { grid-row: auto; grid-column: 1; flex-direction: row; align-items: center; justify-content: flex-start; }
  .tiroir dl { grid-template-columns: 1fr; gap: 0; }
  .tiroir dt { margin-top: 8px; }
}

/* Grille de salaires en vigueur : une carte par convention (fiche d'un département, vue Salaires) */
.grille { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--trait-fort); border-radius: var(--rayon-m); background: var(--papier); max-width: 760px; }
.grille .etiquette { font-size: .85rem; color: var(--encre-doux); }
.rubrique .grille h3, .grille h3 { margin: 2px 0 8px; font-size: 1.08rem; font-weight: 700; }
.grille h3 small { margin-left: 4px; font-weight: 500; font-size: .85rem; color: var(--encre-doux); }
.grille .en-vigueur { font-weight: 650; }
.grille .note, .grille .precedente { margin-top: 10px; font-size: .92rem; color: var(--encre-doux); }
.grille .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.grille .alerte { margin-top: 14px; }
.grille details { margin-top: 12px; }
.grille summary { cursor: pointer; font-weight: 600; color: var(--raisin, var(--encre)); }
.grille .defile { overflow-x: auto; margin-top: 10px; }
.grille table { border-collapse: collapse; font-size: .92rem; min-width: 260px; }
.grille th, .grille td { padding: 6px 12px; border: 1px solid var(--trait-fort); text-align: left; vertical-align: top; }
.grille th { background: var(--fond); font-weight: 650; }
.grille td:last-child { white-space: nowrap; }
.grille table + table { margin-top: 12px; }
