/* Rubrique « Infrastructures numériques et énergie » (#224). Compléments aux classes sp-* des pages de contenu
   (simplanter-pages.css) : carte par commune, légende, tableau filtrable, blocs de fiche commune. Aucune police ni
   couleur de marque nouvelle ; les teintes de la carte sont décrites en toutes lettres dans la légende. */
.ne-page .sp-corps h3, .ne-page .sp-corps h4 { overflow-wrap: anywhere; }
.ne-page .sp-corps .ui-btn { max-width: 100%; height: auto; min-height: 44px; white-space: normal; text-align: center; margin: 0 8px 8px 0; }
.ne-sous { font-size: 14px; line-height: 20px; color: var(--sp-secondaire, #475569); margin: 4px 0 0; }
.ne-page .sp-table a, .ne-page .sp-corps .ne-liste a { color: var(--c-action, #0066CC); font-weight: 600; text-decoration: none; }
.ne-page .sp-table a:hover, .ne-page .sp-corps .ne-liste a:hover { text-decoration: underline; }
.ne-colonnes { columns: 1; column-gap: 32px; padding-left: 20px; }
@media (min-width: 768px) { .ne-colonnes { columns: 2; } }
.ne-colonnes li { break-inside: avoid; }

/* Carte */
.ne-carte { margin: 0 0 24px; }
.ne-carte__cadre { position: relative; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); overflow: hidden; background: #F8FAFC; }
#ne-carte { height: 420px; width: 100%; }
@media (min-width: 1024px) { #ne-carte { height: 540px; } }
.ne-choix { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 8px; padding: 0; border: 0; }
.ne-choix legend { font-size: 14px; line-height: 20px; font-weight: 700; margin-bottom: 4px; width: 100%; }
.ne-choix label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; line-height: 22px; cursor: pointer; }
.ne-choix input { width: 20px; height: 20px; accent-color: var(--c-brand); }
.ne-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: #334155; }
.ne-legende li { display: inline-flex; align-items: center; gap: 6px; }
.ne-pastille { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #1F2937; flex: none; }
.ne-marqueur { background: none; border: 0; }
.ne-poste { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; background: #FDE68A; border: 1px solid #92400E; font-size: 13px; line-height: 1; }

/* Tableau par commune : filtre, puis tableau empilé sous 640 px (règle sp-table) */
.ne-filtre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 12px; }
.ne-filtre label { font-weight: 600; font-size: 15px; }
.ne-filtre input { min-height: 44px; padding: 8px 12px; border: 1px solid #94A3B8; border-radius: 8px; font-size: 16px; width: 100%; max-width: 320px; }
.ne-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; }
.ne-table th, .ne-table td { overflow-wrap: anywhere; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.ne-table .sp-num { text-align: right; }
@media (min-width: 641px) { .ne-table { font-size: 14px; line-height: 20px; } .ne-table thead th { position: sticky; top: 0; } }
.ne-table tr[hidden] { display: none; }

/* Cartes d'information (centres de données, réseaux, programmes) */
.ne-fiches { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 0 0 16px; padding: 0; list-style: none; }
@media (min-width: 768px) { .ne-fiches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ne-fiche { min-width: 0; padding: 16px; background: #fff; border: 1px solid var(--sp-bord, #E2E8F0); border-radius: var(--r-md, 12px); }
.ne-fiche h3, .ne-fiche h4, .ne-fiche h5, .ne-fiche .ne-fiche__titre { margin: 0 0 8px; font-size: 17px; line-height: 24px; }
.ne-fiche h4, .ne-fiche h5, .ne-fiche .ne-fiche__titre { font-weight: 700; color: var(--c-text, #0F172A); }
.ne-fiche p, .ne-fiche li { font-size: 15px; line-height: 22px; margin: 0 0 6px; overflow-wrap: anywhere; }
.ne-fiche dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 12px; margin: 0 0 8px; font-size: 14px; line-height: 20px; }
.ne-fiche dt { font-weight: 600; color: #334155; }
.ne-fiche dd { margin: 0; overflow-wrap: anywhere; }
.ne-fiche .ne-src { font-size: 13px; line-height: 18px; color: #475569; }
.ne-fiche a { color: var(--c-action, #0066CC); }
.ne-absent { border-left: 4px solid #E8B04A; background: #FFFBEB; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 16px; }
.ne-absent li { margin-bottom: 8px; }

/* Bloc « Numérique et énergie » des fiches communes */
.ne-bloc { margin-top: 32px; }
.ne-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) { .ne-bloc__chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ne-bloc__chiffres li { min-width: 0; padding: 12px 16px; border: 1px solid var(--c-border, #E2E8F0); border-radius: 12px; background: #fff; }
.ne-bloc__n { display: block; font-size: 22px; line-height: 30px; font-weight: 700; color: var(--c-text, #0F172A); font-variant-numeric: tabular-nums; }
.ne-bloc__l { display: block; font-size: 14px; line-height: 20px; color: #475569; overflow-wrap: anywhere; }
.ne-bloc__liste { margin: 8px 0; padding: 0 0 0 20px; font-size: 15px; line-height: 24px; }
.ne-bloc h3, .ne-bloc .sp-h4 { font-size: 16px; line-height: 24px; font-weight: 700; margin: 16px 0 4px; color: var(--c-text, #0F172A); }
.ne-bloc__source { font-size: 13px; line-height: 20px; color: #475569; margin: 8px 0; }
.ne-bloc__liens a { color: var(--c-action, #0066CC); font-weight: 600; text-decoration: none; }
.ne-bloc__liens a:hover { text-decoration: underline; }

/* Tableaux de la rubrique : jusqu'à 1 023 px, chaque ligne devient une fiche (même règle que sp-table sous 640 px) */
@media (max-width: 1023.98px) {
    .ne-table, .ne-table tbody, .ne-table tr, .ne-table th, .ne-table td, .ne-table caption { display: block; }
    .ne-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ne-table tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--sp-bord, #E2E8F0); }
    .ne-table tbody tr:last-child { border-bottom: 0; }
    .ne-table tbody th, .ne-table tbody td { padding: 0; border: 0; }
    .ne-table tbody th { margin: 0 0 4px; font-size: 16px; line-height: 24px; }
    .ne-table tbody td { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; text-align: right; }
    .ne-table tbody td::before { content: attr(data-label); flex: 0 1 auto; text-align: left; font-size: 13px; line-height: 22px; font-weight: 600; color: var(--sp-secondaire, #475569); }
    .ne-table .sp-num { white-space: normal; }
}
