/* Module Formation initiale — CFC AURA. Couleur principale : bleu foncé charte #066286.
   Le bleu région #2492d1 reste la couleur de la famille « lycées » et des grappes de la carte. */
@font-face { font-family: 'Raleway'; font-weight: 100 900; font-display: swap; src: url(fonts/Raleway-var.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Raleway'; font-weight: 100 900; font-display: swap; src: url(fonts/Raleway-var-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bleu: #066286; --bleu-fonce: #04455f; --bleu-region: #2492d1; --bleu-clair: #6dbdeb; --bleu-pale: #e7f1f6; --bleu-brume: #f4f9fc;
  --vert: #73b72b; --jaune: #ebac02; --rouge: #e52317; --orange: #ed6b1f; --violet: #5c4495;
  --bord: #cde3f2; /* contour bleuté commun à tous les blocs */
  --gris: #353d4d; --texte: #353d4d; --texte-doux: #667082; --texte-leger: #6d7686; --deco: #98a0ad;
  --blanc: #fff; --fond: #f3f4f6; --ligne: #e1e4e9; --ligne-forte: #cfd4dc;
  /* Arrondis alignés sur le site principal : pilules pour les éléments cliquables,
     courbure identique (32px) pour les grands contenants. */
  --pilule: 999px; --rayon-xl: 32px; --rayon: 18px; --rayon-s: 12px;
  --police-titre: 'Raleway', sans-serif; --police-texte: 'Raleway', sans-serif;
  --doux: cubic-bezier(.2,.8,.2,1);
  --c: var(--bleu);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; background: var(--blanc); color: var(--texte); font-family: var(--police-texte); font-size: 1rem; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--police-titre); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.15rem); color: var(--bleu); }
p { margin: 0; }
a { color: var(--bleu-fonce); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; height: auto; }
.conteneur { width: 100%; margin-inline: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lien-discret { background: none; border: 0; padding: 0; color: var(--bleu-fonce); font-weight: 600; border-bottom: 1.5px solid var(--bleu-clair); transition: border-color .15s, color .15s; }
.lien-discret:hover { color: var(--bleu); border-color: var(--bleu); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 4px; }
.ligne__btn:focus-visible { outline-offset: -3px; border-radius: var(--rayon); }


/* ---------- Barre de recherche unifiée ---------- */
.outils-recherche { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--ligne); border-bottom: 1px solid var(--ligne); padding: 1rem 0 .9rem; }
.embed .outils-recherche { position: static; border-top: 0; border-bottom: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding-top: 2rem; }
#reinit[hidden] { display: none; }
.ligne-familles > * { min-width: 0; }
.titre-module { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); margin-bottom: 1.4rem; }
.resume { font-size: .95rem; color: var(--texte-doux); margin-bottom: .8rem; }
.resume strong { color: var(--bleu-fonce); font-family: var(--police-titre); font-weight: 800; }
.barre { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(150px, 1fr)); border: 1px solid var(--bord); border-radius: var(--pilule); background: var(--blanc); overflow: visible; }
.barre__cellule { position: relative; padding: .55rem 1rem .5rem; min-width: 0; }
.barre__cellule + .barre__cellule { border-left: 1px solid var(--ligne); }
.barre__cellule--recherche { padding-left: 1.9rem; }
.barre__cellule:last-child { padding-right: 1.6rem; }
.barre__libelle { display: block; font-family: var(--police-titre); font-weight: 700; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-leger); margin-bottom: .1rem; }
.barre__saisie { position: relative; }
.barre__icone { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--bleu); pointer-events: none; }
.barre input { width: 100%; height: 28px; padding: 0 0 0 1.6rem; border: 0; background: none; font: inherit; font-size: 1rem; color: var(--texte); }
.barre input::placeholder { color: var(--texte-leger); }
.barre input:focus { outline: 0; }
.barre__cellule:focus-within { background: var(--bleu-brume); }
.barre__cellule:first-child:focus-within { border-radius: var(--pilule) 0 0 var(--pilule); }
.barre__cellule:last-child:focus-within { border-radius: 0 var(--pilule) var(--pilule) 0; }
.barre select { width: 100%; height: 28px; border: 0; background: none; font: inherit; font-size: 1rem; color: var(--texte); padding: 0; appearance: none; -webkit-appearance: none; }
@media (min-width: 900px) { .barre select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; } }

/* Menu déroulant sur mesure */
.menu { position: relative; }
.menu__btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; height: 28px; padding: 0; border: 0; background: none; text-align: left; font-size: 1rem; color: var(--texte); }
.menu__valeur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu__btn--choisi .menu__valeur { color: var(--bleu-fonce); font-weight: 600; }
.menu__fleche { flex: none; width: 16px; height: 16px; color: var(--texte-leger); transition: transform .2s var(--doux), color .15s; }
.menu--ouvert .menu__fleche { transform: rotate(180deg); color: var(--bleu); }
.menu__panneau { position: absolute; left: -1rem; right: -1rem; top: calc(100% + .7rem); z-index: 30; min-width: 260px; background: var(--blanc); border: 1px solid var(--ligne-forte); border-radius: var(--rayon-s); padding: .4rem; animation: menu-apparition .16s var(--doux) both; }
.menu__panneau[hidden] { display: none; }
@keyframes menu-apparition { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu__recherche { width: 100%; height: 36px; margin-bottom: .35rem; padding: 0 .75rem; border: 1px solid var(--ligne); border-radius: 8px; font: inherit; font-size: .95rem; background: var(--fond); }
.menu__recherche:focus { outline: 0; border-color: var(--bleu); background: var(--blanc); }
.menu__liste { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.menu__option { display: flex; align-items: center; gap: .6rem; padding: .48rem .65rem; border-radius: 8px; font-size: .97rem; cursor: pointer; color: var(--texte); }
.menu__option[hidden] { display: none; }
.menu__option:hover, .menu__option--focus { background: var(--bleu-pale); }
.menu__option[aria-selected="true"] { color: var(--bleu-fonce); font-weight: 600; }
.menu__coche { flex: none; width: 16px; height: 16px; color: var(--bleu); visibility: hidden; }
.menu__option[aria-selected="true"] .menu__coche { visibility: visible; }
.menu__code { flex: none; font-family: var(--police-titre); font-weight: 700; font-size: .78rem; color: var(--bleu); min-width: 2ch; }
.menu__texte { flex: 1; min-width: 0; }
.menu__nb { flex: none; font-size: .8rem; color: var(--texte-leger); font-variant-numeric: tabular-nums; }
.menu__vide { padding: .6rem .65rem; color: var(--texte-leger); font-size: .92rem; }

/* Familles : légende à souligné coloré */
.ligne-familles { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }
.familles { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 0; }
.famille { display: inline-flex; align-items: baseline; gap: .32rem; padding: .42rem .9rem; border: 1.5px solid var(--c); border-radius: var(--pilule); background: var(--blanc); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--texte); transition: background .18s var(--doux), color .18s var(--doux), border-color .18s var(--doux); }
.famille__nb { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: inherit; font-variant-numeric: tabular-nums; opacity: .78; }
.famille__nb::before { content: '('; }
.famille__nb::after { content: ')'; }
.famille:hover { background: var(--c); border-color: var(--c); color: #fff; }
.famille--active { background: var(--c); border-color: var(--c); color: #fff; }
.famille--active:hover { background: var(--c); border-color: var(--c); }
.famille--active .famille__nb { color: #fff; opacity: .78; }
.barre-resultats { display: flex; align-items: center; gap: .9rem; flex: none; }
.compteur { font-size: .92rem; color: var(--texte-doux); white-space: nowrap; }
.compteur strong { color: var(--texte); font-family: var(--police-titre); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Explorateur ---------- */
.explorateur { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: 1.5rem; padding: 1.5rem 0 3rem; align-items: start; }
.carte-bloc { position: relative; }
.carte { height: min(78vh, 720px); min-height: 460px; border-radius: var(--rayon-xl); background: #f2f3f0; overflow: hidden; border: 1px solid var(--bord); }
.carte--chargement { position: relative; }
.carte--chargement::before { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(100deg, #f2f3f5 30%, #fafbfc 50%, #f2f3f5 70%); background-size: 220% 100%; animation: miroitement 1.6s linear infinite; }
.carte--chargement::after { content: "Chargement de la carte…"; position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; font-family: var(--police-titre); font-weight: 700; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-leger); }
@keyframes miroitement { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.carte--indisponible { display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--texte-doux); }

/* Liste façon annuaire */
.colonne-liste { min-width: 0; }
.liste { display: flex; flex-direction: column; gap: .6rem; position: relative; padding: 2px 4px; }
@media (min-width: 1024px) {
  /* La colonne défile à la hauteur de la carte, avec une barre bien visible
     et un dégradé de bas de liste qui montre qu'il reste des établissements. */
  .liste { max-height: min(78vh, 720px); min-height: 460px; overflow-y: auto; overscroll-behavior: contain; padding-right: 10px; }
  /* Dégradé de bas de liste : la carte suivante s'efface au lieu d'être tranchée net. */
  .liste--suite { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 70px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 70px), transparent); }
  .liste::-webkit-scrollbar { width: 10px; }
  .liste::-webkit-scrollbar-track { background: var(--fond); border-radius: var(--pilule); }
  .liste::-webkit-scrollbar-thumb { background: #b9c0cb; border-radius: var(--pilule); border: 2px solid var(--fond); }
  .liste::-webkit-scrollbar-thumb:hover { background: var(--bleu); }
}
.liste__vide { padding: 2.5rem 1rem; text-align: center; color: var(--texte-doux); line-height: 1.9; background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon-xl); }
/* Au survol, la ligne se détache : un liseré complet à la couleur de la famille
   remplace le filet de séparation (box-shadow interne, donc sans décaler la mise en page). */
.ligne { position: relative; background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); transition: background .26s var(--doux), box-shadow .26s var(--doux), border-color .26s; }
.ligne:hover, .ligne--survol { background: color-mix(in srgb, var(--c) 5%, white); border-color: var(--c); }
.ligne--actif { background: color-mix(in srgb, var(--c) 8%, white); border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.ligne--actif .ligne__dept { color: var(--c); }
.ligne--actif .ligne__chevron { color: var(--bleu); }
.ligne[hidden] { display: none; }
.ligne.anim { animation: apparition .4s var(--doux) both; animation-delay: calc(var(--i, 0) * 28ms); }
.ligne__btn { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto 20px; gap: .8rem; align-items: center; width: 100%; padding: 1.05rem .7rem 1.05rem .9rem; background: none; border: 0; text-align: left; color: inherit; }
.ligne__logo { width: 74px; height: 58px; display: flex; align-items: center; justify-content: center; }
.ligne__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .3s var(--doux); }
.ligne:hover .ligne__logo img { transform: scale(1.07); }
.ligne__initiale { display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--rayon-s); background: color-mix(in srgb, var(--c) 10%, white); font-family: var(--police-titre); font-weight: 800; font-size: 1.3rem; color: var(--c); }
.ligne__corps { display: grid; gap: 0; min-width: 0; }
.ligne__nom { font-family: var(--police-titre); font-weight: 700; font-size: 1.06rem; line-height: 1.28; letter-spacing: -.01em; color: var(--texte); }
.ligne__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .7rem; margin-top: .3rem; font-size: .82rem; color: var(--texte-leger); }
.ligne__famille { display: inline-flex; align-items: center; padding: .2rem .62rem; border: 1.5px solid var(--c); border-radius: var(--pilule); background: var(--c); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.ligne__info { display: inline-flex; align-items: center; gap: .34rem; white-space: nowrap; }
.ligne__info svg { width: 14px; height: 14px; flex: none; color: var(--texte-leger); }
.ligne__nb { white-space: nowrap; }
.ligne__dept { font-family: var(--police-titre); font-weight: 800; font-size: 1.15rem; color: var(--deco); letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .15s; }
.ligne:hover .ligne__dept { color: var(--c); }
.ligne__chevron { width: 22px; height: 22px; color: var(--texte-leger); transition: transform .28s var(--doux), color .2s; }
.ligne__chevron svg { width: 22px; height: 22px; }
.ligne:hover .ligne__chevron { color: var(--bleu); transform: translateX(4px); }
@keyframes apparition { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ---------- MapLibre ---------- */
.maplibregl-ctrl-group { border-radius: var(--rayon-s) !important; box-shadow: none !important; border: 1px solid var(--ligne-forte) !important; background: var(--blanc) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 38px !important; height: 38px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--ligne) !important; }
.maplibregl-ctrl-group button:hover { background: var(--bleu-pale) !important; }
.maplibregl-ctrl-top-right { top: 14px !important; right: 14px !important; }
.maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 0 0 10px 0 !important; }
.ctrl-recentrer svg { width: 20px; height: 20px; display: block; margin: auto; color: var(--bleu-fonce); }
.maplibregl-ctrl-attrib { font-family: var(--police-texte); font-size: .7rem !important; background: rgba(255,255,255,.75) !important; }
.maplibregl-ctrl-attrib a { color: var(--texte-doux); }
.maplibregl-canvas:focus { outline: 0; }
.maplibregl-popup { max-width: 280px !important; font-family: var(--police-texte); z-index: 5; }
.maplibregl-popup-content { padding: 0 !important; border-radius: var(--rayon) !important; box-shadow: none !important; overflow: hidden; border: 1.5px solid var(--ligne-forte); }
.maplibregl-popup-tip { display: none; }
.popup-nom .maplibregl-popup-content { padding: .38rem .8rem !important; border-radius: var(--pilule) !important; background: var(--gris); color: var(--blanc); font-size: .85rem; font-weight: 600; border: 0; white-space: nowrap; }
.popup-fiche__corps { padding: .85rem 1rem .95rem; }
.popup-fiche__bande { height: 5px; background: var(--c); }
.popup__type { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-leger); display: flex; gap: .35rem; align-items: center; }
.popup__nom { font-family: var(--police-titre); font-weight: 800; font-size: .98rem; line-height: 1.25; margin: .25rem 0 .1rem; color: var(--texte); }
.popup__lieu { font-size: .88rem; color: var(--texte-doux); }
.popup__btn { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; padding: .42rem 1rem; border-radius: var(--pilule); background: var(--bleu); color: var(--blanc); border: 0; font-weight: 600; font-size: .86rem; transition: background .15s; }
.popup__btn:hover { background: var(--bleu-fonce); }

/* ---------- Fiche ---------- */
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
.fiche { background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon-xl); overflow: hidden; animation: fiche-apparition .28s var(--doux) both; }
/* Déclaré APRÈS la règle ci-dessus, sinon son `overflow: hidden` bloque le défilement. */
@media (min-width: 1024px) {
  .fiche { max-height: min(78vh, 720px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .fiche::-webkit-scrollbar { width: 10px; }
  .fiche::-webkit-scrollbar-track { background: var(--fond); }
  .fiche::-webkit-scrollbar-thumb { background: #b9c0cb; border-radius: var(--pilule); border: 2px solid var(--fond); }
  .fiche::-webkit-scrollbar-thumb:hover { background: var(--c, var(--bleu)); }
}
@keyframes fiche-apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fiche[hidden] { display: none; }
.explorateur--fiche .colonne-liste { display: none; }
.fiche__barre { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .8rem 1rem; background: var(--blanc); border-bottom: 1px solid var(--ligne); }
.fiche__outils { display: flex; gap: .35rem; }
.fiche__outil { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ligne-forte); border-radius: var(--pilule); background: var(--blanc); color: var(--c, var(--bleu)); text-decoration: none; transition: background .2s var(--doux), border-color .2s var(--doux), color .2s var(--doux); }
.fiche__outil svg { width: 18px; height: 18px; }
.fiche__outil:hover { background: var(--c, var(--bleu)); border-color: var(--c, var(--bleu)); color: var(--blanc); }
/* Infobulle au survol et au clavier */
.fiche__outil::after { content: attr(data-infobulle); position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; padding: .35rem .7rem; border-radius: var(--rayon-s); background: var(--gris); color: var(--blanc); font-size: .78rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .18s var(--doux), transform .18s var(--doux); }
.fiche__outil:hover::after, .fiche__outil:focus-visible::after { opacity: 1; transform: none; }
.fiche__retour { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .4rem .95rem .4rem .7rem; border: 1px solid var(--ligne-forte); border-radius: var(--pilule); background: var(--blanc); font-weight: 600; font-size: .9rem; color: var(--texte-doux); transition: all .2s var(--doux); }
.fiche__retour svg { width: 17px; height: 17px; }
.fiche__retour:hover { border-color: var(--c, var(--bleu)); color: var(--c, var(--bleu)); }
/* Ouverture à la souris : pas d'anneau de focus, il n'apporte rien et alourdit. */
.fiche--pointeur .fiche__retour:focus { outline: none; }
.fiche__contenu { padding-bottom: 0; }
.fiche__entete { display: flex; align-items: center; gap: 1.1rem; padding: 1.5rem 2rem 1.25rem; }
.fiche__ident { min-width: 0; }
.fiche__logo { flex: none; width: 118px; height: 90px; display: flex; align-items: center; justify-content: center; }
.fiche__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.fiche__logo--vide { display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--rayon-s); background: color-mix(in srgb, var(--c) 10%, white); font-family: var(--police-titre); font-weight: 800; font-size: 1.7rem; color: var(--c); }
.fiche__type { display: inline-flex; align-items: center; padding: .2rem .62rem; border: 1.5px solid var(--c); border-radius: var(--pilule); background: var(--c); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fiche h2 { font-size: 1.4rem; margin: .45rem 0 .2rem; line-height: 1.2; color: var(--c, var(--bleu-region)); }
.fiche__sous { color: var(--texte-doux); font-size: .92rem; }
.fiche__corps { padding: 0 2rem 2rem; }
.fiche__section { margin-top: 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--ligne); }
.fiche__section:first-of-type { margin-top: 1.25rem; padding-top: 0; border-top: 0; }
.fiche__section h3 { font-family: var(--police-titre); font-weight: 800; font-size: 1.02rem; line-height: 1.25; letter-spacing: -.01em; color: var(--c, var(--bleu-fonce)); margin-bottom: .65rem; }
.coordonnees { list-style: none; margin: 0; padding: 0; }
.coordonnees li { display: grid; grid-template-columns: 22px 1fr; gap: .7rem; align-items: start; padding: .5rem 0; border-bottom: 1px solid var(--ligne); }
.coordonnees li:last-child { border-bottom: 0; padding-bottom: 0; }
.coordonnees__icone { width: 22px; height: 22px; color: var(--c, var(--bleu)); display: grid; place-items: center; margin-top: 2px; }
.coordonnees__icone svg { width: 18px; height: 18px; }
.coordonnees a { word-break: break-word; text-decoration: none; font-weight: 600; color: var(--c, var(--bleu-fonce)); }
.coordonnees a:hover { text-decoration: underline; text-underline-offset: 3px; }
.formations { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.formations li { display: grid; gap: .5rem; justify-items: start; padding: .8rem .95rem; border-radius: var(--rayon-s); background: var(--fond); }

.formations__nom { font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--texte); }
.voies { display: flex; gap: .3rem; flex-wrap: wrap; }
.voie { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .28rem .75rem; border-radius: var(--pilule); background: var(--blanc); border: 1px solid var(--ligne-forte); color: var(--texte-doux); }
.btn { --btn: var(--c, var(--bleu)); display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .6rem 1.4rem; border-radius: var(--pilule); font-weight: 600; text-decoration: none; border: 1.5px solid var(--btn); background: var(--btn); color: var(--blanc); transition: all .18s var(--doux); }
.btn:hover { background: color-mix(in srgb, var(--btn) 82%, black); border-color: color-mix(in srgb, var(--btn) 82%, black); }
.btn--secondaire { background: var(--blanc); color: var(--btn); border-color: color-mix(in srgb, var(--btn) 40%, white); }
.btn--secondaire:hover { background: var(--btn); color: var(--blanc); border-color: var(--btn); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Boîte à outils ---------- */
.boite-outils { padding: 2rem 0 1rem; }
.boite-outils .conteneur { background: var(--bleu-region); border: 1px solid var(--bleu-region); border-radius: var(--rayon-xl); padding: 2.25rem 2rem 2rem; }
.boite-outils__entete { max-width: 62ch; }
.boite-outils__entete p { margin: .35rem 0 0; color: rgba(255,255,255,.85); font-size: 1.02rem; }
.boite-outils h2 { color: var(--blanc); font-weight: 800; }

/* Avec 8 familles (v74), les compteurs par famille ne tiennent plus qu'au-delà de 1400 px ; en dessous ils cèdent la place pour garder les pilules sur une seule ligne. */
@media (min-width: 721px) and (max-width: 1400px) {
  .familles { gap: .1rem .8rem; }
  .famille { font-size: .84rem; }
  .famille__nb { display: none; }
  .barre-resultats { gap: .75rem; }
}
/* Sous 1000 px, on resserre encore. */
@media (min-width: 721px) and (max-width: 999px) {
  .familles { gap: .1rem .6rem; }
  .famille { font-size: .8rem; gap: .35rem; }
  .compteur { font-size: .86rem; }
  .barre-resultats { gap: .6rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  /* Une seule colonne : la liste se déroule sous la carte. */
  .explorateur { grid-template-columns: 1fr; gap: 1.5rem; }
  .carte { height: min(60vh, 520px); }
}
/* ---------- Tablettes : barre sur deux rangées, sélecteurs natifs ---------- */
@media (max-width: 899px) {
  .barre { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 26px; }
  .barre__cellule--recherche { grid-column: 1 / -1; border-bottom: 1px solid var(--ligne); padding-left: 1.4rem; }
  .barre__cellule:nth-child(2) { border-left: 0; }
  .barre__cellule:last-child { padding-right: 1rem; }
  .barre__cellule { padding: .6rem .9rem .55rem; }
  .menu { display: none; }
  .barre input, .barre select { height: 40px; }
  .famille__nb { display: inline; } /* sous 900 px les pills passent à la ligne : les compteurs ont la place */
  .barre select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23066286' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0 center; background-size: 16px; padding-right: 1.4rem; text-overflow: ellipsis; }
}
/* ---------- Petits écrans ---------- */
@media (max-width: 599px) {
  .barre { grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 22px; }
  .barre__cellule { padding: .5rem .6rem .45rem; }
  .barre__cellule--recherche { padding: .55rem 1rem .5rem 1.2rem; }
  .barre__cellule:last-child { padding-right: .85rem; }
  .barre__cellule:nth-child(2) { border-left: 0; }
  .barre__libelle { font-size: .6rem; letter-spacing: .07em; }
  .barre input, .barre select { height: 34px; font-size: .97rem; }
  .barre select { background-size: 14px; padding-right: 1.15rem; }
  .compteur { font-size: .88rem; }
}
@media (max-width: 720px) {
  .ligne-familles { flex-direction: column; align-items: stretch; }
  .familles { gap: .1rem 1rem; }
  .barre-resultats { justify-content: space-between; flex-wrap: wrap; gap: .5rem .75rem; }
  .ligne__btn { grid-template-columns: 64px minmax(0, 1fr) auto 18px; gap: .7rem; padding: .85rem .6rem .85rem .75rem; }
  .ligne__logo { width: 64px; height: 50px; }
  .fiche__entete, .fiche__corps { padding-inline: 1.15rem; }
    .fiche__logo { width: 130px; height: 88px; }
  .outils-vide { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .outils-vide img { width: 88px; }
}
/* ---------- Écrans tactiles : cibles d'au moins 44 px ---------- */
@media (pointer: coarse) {
  .fiche__outil { width: 44px; height: 44px; }
  .famille { min-height: 42px; padding: .45rem 1rem; }
  .familles { gap: .45rem; }
  .maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
  .ligne__btn { min-height: 64px; }
  .popup__btn { min-height: 40px; }
  .lien-discret { display: inline-block; padding: .4rem 0; }
  .menu__option { padding: .7rem .75rem; }
}
/* ---------- Mobile et tablette : les filtres se replient derrière un bouton ---------- */
.filtres-bascule { display: none; }
@media (max-width: 899px) {
  .outils-recherche > .conteneur { display: flex; flex-direction: column; }
  .titre-module { order: 1; }
  .ligne-familles { order: 2; margin-top: 0; flex-direction: row; align-items: center; }
  .barre { order: 3; margin-top: .85rem; }
  .filtres-bascule { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1.05rem; border: 1px solid var(--ligne-forte); border-radius: var(--pilule); background: var(--blanc); font-weight: 600; font-size: .95rem; color: var(--bleu); transition: border-color .2s var(--doux), background .2s var(--doux); }
  .filtres-bascule svg { width: 18px; height: 18px; }
  .filtres-bascule:hover { border-color: var(--bleu); background: var(--bleu-pale); }
  .filtres-bascule[aria-expanded="true"] { background: var(--bleu); border-color: var(--bleu); color: var(--blanc); }
  .filtres-bascule__nb { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .3rem; border-radius: var(--pilule); background: var(--bleu); color: var(--blanc); font-size: .74rem; font-variant-numeric: tabular-nums; }
  .filtres-bascule__nb[hidden] { display: none; }
  .filtres-bascule[aria-expanded="true"] .filtres-bascule__nb { background: var(--blanc); color: var(--bleu); }
  /* Repliés : seuls le bouton et le compteur restent. */
  .filtres-replies .barre, .filtres-replies .familles { display: none; }
  .ligne-familles { flex-wrap: wrap; }
  .familles { order: 3; width: 100%; }
}
/* Sous 360 px les trois sélecteurs ne tiennent plus : retour à deux rangées. */
@media (max-width: 359px) {
  .barre { grid-template-columns: 1fr 1fr; }
  .barre__cellule:nth-child(3) { border-left: 1px solid var(--ligne); }
  .barre__cellule:nth-child(4) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--ligne); }
}
/* Petits écrans : encombrement réduit, cible tactile conservée (min-height du bloc « coarse » ci-dessus). */
@media (max-width: 599px) {
  .famille { padding: .4rem .72rem; gap: .38rem; font-size: .82rem; }
  .familles { gap: .35rem; }
  .ligne-familles { margin-top: 1.1rem; gap: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.ufa { list-style: none; margin: 0; padding: 0; }
.ufa li { padding: .45rem 0; border-bottom: 1px solid var(--bord); font-size: .95rem; }
.ufa li:last-child { border-bottom: 0; }
.ufa__lien { background: none; border: 0; padding: 0; font: inherit; color: var(--c); text-decoration: underline; cursor: pointer; }
.ufa__dept { color: var(--texte-leger); font-size: .85rem; }

/* Boîte à outils v75 : documents à couverture + liste de liens à filets */
.outils { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.75rem; align-items: start; }
.outils__docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.doc { display: grid; grid-template-columns: 118px minmax(0, 1fr); grid-template-rows: auto auto; align-items: start; gap: .6rem 1.25rem; padding: 1.25rem; background: var(--blanc); border-radius: var(--rayon); color: var(--texte); text-decoration: none; border: 1px solid transparent; transition: transform .35s ease, border-color .35s ease; }
.doc:hover { transform: translateY(-4px); border-color: var(--bleu-pale); text-decoration: none; }
.doc__couv { grid-row: 1 / 3; display: block; width: 118px; aspect-ratio: 210 / 297; border-radius: var(--rayon-s); overflow: hidden; background: var(--bleu-pale); border: 1px solid var(--bord); }
.doc__couv img { display: block; width: 100%; height: 100%; object-fit: cover; }
.doc__txt { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.doc__type { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bleu); }
.doc__titre { font-family: var(--police-titre); font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--texte); }
.doc__desc { font-size: .9rem; line-height: 1.5; color: var(--texte-doux); }
.doc__btn { grid-column: 2; align-self: start; display: inline-flex; align-items: center; gap: .45rem; justify-self: start; white-space: nowrap; padding: .5rem 1rem; border-radius: var(--pilule); background: var(--bleu-region); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .02em; transition: background .25s ease; }
.doc__btn small { font-weight: 500; opacity: .85; font-size: .78rem; }
.doc__btn svg { width: 16px; height: 16px; }
.doc:hover .doc__btn { background: var(--bleu-fonce); }
@media (max-width: 1000px) { .outils { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .doc { grid-template-columns: 84px minmax(0, 1fr); gap: 1rem; } .doc__couv { width: 84px; } .doc__btn { grid-column: 1 / -1; justify-self: stretch; justify-content: center; margin-top: .4rem; } .doc__couv { grid-row: 1; } .outils__liens { padding: 1rem 1.1rem .75rem; } }

/* v76 : outils Équi-ressources en cartes images */
.er { background: var(--blanc); border-radius: var(--rayon); padding: 1.5rem; }
.er__entete { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding-bottom: 1.1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--bord); }
.er__logo { display: block; width: 200px; height: auto; }
.er__entete p { margin: 0; color: var(--texte-doux); font-size: .95rem; }
.er__cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.er-carte { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; color: var(--texte); text-decoration: none; background: var(--blanc); transition: transform .35s ease, border-color .35s ease; }
.er-carte:hover { transform: translateY(-4px); border-color: var(--bleu-clair); text-decoration: none; }
.er-carte__img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bleu-pale); overflow: hidden; }
.er-carte__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.er-carte__picto { position: absolute; left: .85rem; bottom: .85rem; width: 40px; height: 40px; border-radius: 50%; background: var(--blanc); color: var(--bleu-region); display: grid; place-items: center; }
.er-carte__picto svg { width: 20px; height: 20px; }
.er-carte__txt { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.er-carte__titre { font-family: var(--police-titre); font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.er-carte__desc { font-size: .9rem; line-height: 1.5; color: var(--texte-doux); }
.er-carte__lien { margin-top: auto; padding-top: .5rem; display: inline-flex; align-items: center; gap: .35rem; color: var(--bleu-region); font-weight: 700; font-size: .85rem; }
.er-carte__lien svg { width: 16px; height: 16px; }
.er-carte:hover .er-carte__titre { color: var(--bleu-region); }
@media (max-width: 1000px) { .outils__docs { grid-template-columns: 1fr; } .er__cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .er { padding: 1.1rem; } .er__cartes { grid-template-columns: 1fr; } .er__logo { width: 170px; } }

/* v77 : catégories secondaires (option hippologie, section sportive) */
.ligne__famille--sec, .fiche__type--sec { background: var(--blanc); border-color: var(--c2); color: var(--c2); }
.fiche__type--sec { margin-left: .35rem; }
.mention-sources { margin: .75rem .25rem 0; font-size: .82rem; font-style: italic; line-height: 1.5; color: var(--texte-leger); }

/* v78 : quand une seule catégorie est filtrée, l'étiquette de cette catégorie passe devant, en plein */
.liste[data-filtre="hippologie"] .ligne:not([data-famille="hippologie"])[data-familles~="hippologie"] .ligne__famille:not(.ligne__famille--sec) { background: var(--blanc); color: var(--c); }
.liste[data-filtre="hippologie"] .ligne__famille--sec[data-f="hippologie"] { background: var(--c2); color: #fff; order: -1; }
.liste[data-filtre="section-sportive"] .ligne:not([data-famille="section-sportive"])[data-familles~="section-sportive"] .ligne__famille:not(.ligne__famille--sec) { background: var(--blanc); color: var(--c); }
.liste[data-filtre="section-sportive"] .ligne__famille--sec[data-f="section-sportive"] { background: var(--c2); color: #fff; order: -1; }
.liste[data-filtre="ufa"] .ligne:not([data-famille="ufa"])[data-familles~="ufa"] .ligne__famille:not(.ligne__famille--sec) { background: var(--blanc); color: var(--c); }
.liste[data-filtre="ufa"] .ligne__famille--sec[data-f="ufa"] { background: var(--c2); color: #fff; order: -1; }
/* v80 : fiche UFA */
.ufa-rattache { margin: 0 0 .6rem; font-size: .95rem; line-height: 1.55; }
/* v80 : 9 pilules — on resserre jusqu'à 1400 px pour garder une seule ligne */
@media (min-width: 721px) and (max-width: 1400px) { .famille { padding: .42rem .72rem; } .familles { gap: .3rem; } }
