/* Rubrique « Formation, enseignement supérieur et recherche » (#215). Compléments aux classes sp-* des pages de contenu
   (simplanter-pages.css) : carte, graphiques en barres, listes d'établissements. Aucune police ni couleur nouvelle. */
.fr-page .sp-corps h3 { overflow-wrap: anywhere; }
.fr-page .sp-corps .ui-btn { max-width: 100%; height: auto; min-height: 44px; white-space: normal; text-align: center; margin: 0 8px 8px 0; }
.fr-compte { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--sp-secondaire, #475569); }
.fr-sous { font-size: 14px; line-height: 20px; color: var(--sp-secondaire, #475569); font-weight: 400; margin: 4px 0 0; }
.sp-corps p.fr-sous { font-size: 14px; line-height: 20px; margin: 4px 0 0; }
.fr-colonnes { columns: 1; column-gap: 32px; }
@media (min-width: 768px) { .fr-colonnes { columns: 2; } }
.fr-colonnes li { break-inside: avoid; }

/* Tableaux : empilés sous 640 px (règle sp-table), défilement horizontal interdit au-delà */
.fr-defile { max-width: 100%; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); overflow: hidden; margin: 0 0 16px; background: #fff; }
.fr-table th, .fr-table td { overflow-wrap: anywhere; }
.fr-table--dense th, .fr-table--dense td { padding: 8px 12px; }
.fr-page .sp-table a { color: var(--c-action, #0066CC); font-weight: 600; text-decoration: none; }
.fr-page .sp-table a:hover { text-decoration: underline; }

/* Étiquettes */
.fr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.fr-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 9999px; background: var(--c-brand-soft, #DBEAFE);
    color: #123F7C; font-size: 13px; line-height: 20px; font-weight: 600; }
.fr-badge { display: inline-block; padding: 0 8px; border-radius: 9999px; border: 1px solid #1853A2; color: #123F7C; font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap; }

/* Visuel maison : sigle de l'établissement */
.fr-sigle { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 32px; padding: 0 10px; border-radius: 8px;
    background: var(--c-brand, #1853A2); color: #fff; font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.fr-sigle--grand { min-width: 96px; height: 96px; font-size: 18px; line-height: 24px; border-radius: var(--r-md, 12px); text-align: center; flex: 0 0 auto; margin: 0; }
.fr-identite { display: flex; gap: 24px; align-items: flex-start; margin: 0 0 16px; }
@media (max-width: 639.98px) { .fr-identite { flex-direction: column; gap: 16px; } .fr-sigle--grand { height: 64px; } }

/* Listes de définitions */
.fr-dl { flex: 1 1 auto; min-width: 0; margin: 0 0 16px; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); background: #fff; }
.fr-dl > div { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--sp-bord, #E2E8F0); }
.fr-dl > div:last-child { border-bottom: 0; }
.fr-dl dt { font-size: 14px; line-height: 22px; font-weight: 600; color: var(--sp-secondaire, #475569); }
.fr-dl dd { margin: 0; font-size: 16px; line-height: 24px; color: var(--c-text, #0F172A); overflow-wrap: anywhere; }
@media (max-width: 639.98px) { .fr-dl > div { grid-template-columns: minmax(0, 1fr); } }

/* Détails repliables */
.fr-details { margin: 0 0 12px; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); background: #fff; }
.fr-details > summary, .fr-graph details > summary { cursor: pointer; min-height: 44px; padding: 10px 16px; font-size: 15px; line-height: 24px; font-weight: 600; color: var(--c-text, #0F172A); overflow-wrap: anywhere; }
.fr-details > :not(summary) { margin-left: 16px; margin-right: 16px; }
.fr-details > summary:focus-visible, .fr-graph details > summary:focus-visible { outline: 2px solid var(--c-action, #0066CC); outline-offset: 2px; }
.sp-corps .fr-details h3 { font-size: 16px; line-height: 24px; margin: 12px 16px 4px; }

/* Graphiques : une série, une teinte ; valeurs en encre de texte */
.fr-graph { padding: 16px; }
.fr-barres { display: block; width: 100%; max-width: 640px; height: auto; }
.fr-barres__barre { fill: #1853A2; }
.fr-barres g:hover .fr-barres__barre { fill: #123F7C; }
.fr-barres__lib { font-size: 13px; fill: #1E293B; }
.fr-barres__val { font-size: 13px; font-weight: 700; fill: #0F172A; font-variant-numeric: tabular-nums; }
.fr-graph details { margin-top: 12px; border-top: 1px solid var(--sp-bord, #E2E8F0); }

/* Carte */
.fr-carte { margin: 0 0 16px; }
.fr-carte__cadre { position: relative; z-index: 0; isolation: isolate; aspect-ratio: 4 / 3; border: 1px solid var(--c-border, #E2E8F0); border-radius: var(--r-md, 12px); overflow: hidden; background: #E2E8F0; }
@media (min-width: 1024px) { .fr-carte__cadre { aspect-ratio: 16 / 9; } }
#fr-carte { position: absolute; inset: 0; z-index: 0; }
.fr-carte .leaflet-container { font-family: inherit; }
.fr-carte .leaflet-control-attribution { font-size: 12px; line-height: 16px; }
.fr-carte .leaflet-popup-content { margin: 12px 16px; font-size: 14px; line-height: 20px; }
.fr-carte .leaflet-popup-content a { color: var(--c-action, #0066CC); font-weight: 600; }
@media (pointer: coarse), (max-width: 1023.98px) { .fr-carte .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; } }
.fr-carte__legende { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 8px; padding: 0; list-style: none; }
.fr-carte__legende label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; line-height: 22px; color: var(--c-text-body, #1E293B); cursor: pointer; }
.fr-carte__legende input { width: 20px; height: 20px; accent-color: #1853A2; }
.fr-pin { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 24px; height: 24px; border: 2px solid #fff; color: #fff;
    font-size: 12px; line-height: 1; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 23, 42, .45); }
.fr-pin--superieur { background: #1853A2; border-radius: 9999px; }
.fr-pin--laboratoire { background: #7A1F5C; border-radius: 4px; }
.fr-pin--lycee { background: #0B5D4B; border-radius: 9999px 9999px 4px 4px; }
.fr-pin--cfa { background: #8A4B00; border-radius: 4px 9999px 9999px 4px; }
.fr-marqueur { background: none !important; border: 0 !important; display: flex !important; }
.fr-marqueur .fr-pin { width: 100%; height: 100%; }
.fr-marqueur:focus-visible { outline: 2px solid #0F172A; outline-offset: 2px; }

/* Lycées par commune */
.fr-etabs { margin: 0 0 16px; padding: 0; list-style: none; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); background: #fff; }
.fr-etabs > li { padding: 12px 16px; border-bottom: 1px solid var(--sp-bord, #E2E8F0); scroll-margin-top: 96px; }
.fr-etabs > li:last-child { border-bottom: 0; }
.sp-corps .fr-etab__nom { margin: 0 0 6px; font-size: 16px; line-height: 24px; font-weight: 600; overflow-wrap: anywhere; }
.sp-corps .fr-etab__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.fr-etabs .fr-details { border: 0; margin: 0 0 4px; }
.fr-etabs .fr-details > summary { padding: 6px 0; min-height: 32px; font-size: 14px; }
.fr-etabs .fr-details > :not(summary) { margin: 0 0 8px; font-size: 14px; line-height: 22px; }
.fr-besoins h3 { font-size: 18px; line-height: 26px; }
.fr-page [id] { scroll-margin-top: 96px; }

/* Bloc « Formation et recherche » des fiches communes */
.fr-bloc { margin-top: 32px; }
.fr-bloc__chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .fr-bloc__chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fr-bloc__chiffres li { padding: 12px 16px; border: 1px solid var(--c-border, #E2E8F0); border-radius: 12px; background: #fff; }
.fr-bloc__n { display: block; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--c-text, #0F172A); font-variant-numeric: tabular-nums; }
.fr-bloc__l { display: block; font-size: 14px; line-height: 20px; color: #475569; }
.fr-bloc__liste { margin: 8px 0; padding: 0 0 0 20px; font-size: 15px; line-height: 24px; }
.fr-bloc__liste a, .fr-bloc__liens a { color: var(--c-action, #0066CC); font-weight: 600; text-decoration: none; }
.fr-bloc__liste a:hover, .fr-bloc__liens a:hover { text-decoration: underline; }
.fr-bloc h3 { font-size: 16px; line-height: 24px; font-weight: 700; margin: 16px 0 4px; color: var(--c-text, #0F172A); }
.fr-bloc__source { font-size: 13px; line-height: 20px; color: #475569; margin: 8px 0; }
@media print { .fr-carte, .fr-carte__legende { display: none; } .fr-details { border: 0; } }
