/* Complements du site (au-dela des maquettes validees) : tableaux, outils, carte, pages generees.
   Charge apres styles.css ; reprend ses variables. */

/* ---------- contenu genere ---------- */
.prose { overflow-wrap: anywhere; }
.prose img { height: auto; }
/* vignettes des cartes (« À lire aussi », hubs, accueil) : paysage 3:2 comme les images, pas en hauteur */
.carte > img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
/* appels de source format Wikipedia : [3] en exposant, renvoi vers la liste Sources */
.ref { font-size: .72em; line-height: 0; vertical-align: super; white-space: nowrap; }
.ref a { text-decoration: none; color: var(--ardoise); }
.ref a:hover { text-decoration: underline; color: var(--rouge); }
.sources li:target { background: var(--fond-2, #F0F4F7); outline: 2px solid var(--rouge); outline-offset: 2px; }
/* image a la une de l'accueil : suit le format de son cadre (16:8, 16:10 sur mobile) */
.une__img img { width: 100%; height: auto; aspect-ratio: inherit; object-fit: cover; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--trait); max-width: 100%; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.45; min-width: 520px; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--trait); }
.table-wrap thead th { background: var(--ardoise); color: #fff; font-weight: 700; position: sticky; top: 0; }
.table-wrap tbody tr:nth-child(even) td { background: var(--fond); }
.prose h4 { font-size: 1.125rem; margin: 1.3em 0 .4em; }
.prose hr { border: 0; border-top: 1px solid var(--trait); margin: 2em 0; }
.prose .retenir ul { margin-bottom: .6em; }
.prose .encadre-aide ul { margin: 0 0 .8em; }
.prose ol { padding-left: 1.6em; }
.prose ol li { padding-left: 4px; margin-bottom: .5em; }
.prose code { background: var(--fond); padding: 1px 5px; font-size: .9em; }
.a-completer { background: #FFF1B8; color: #5A4300; padding: 1px 6px; font-weight: 700; border: 1px dashed #B88A00; }
.article-img { margin: 0 auto; aspect-ratio: auto; }
.article-img img { width: 100%; height: auto; max-height: 460px; object-fit: cover; aspect-ratio: 3 / 2; border-radius: 0; background: var(--fond-2); }
.article-img figcaption, .credit { font-size: .8125rem; color: var(--texte-doux); margin-top: 8px; }
.article-img figcaption a, .credit a { color: var(--texte-doux); }
.auteurs { gap: 24px; }
.dates { margin: 0; }
.carte img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--fond-2); }
.carte__texte { color: var(--texte-doux); font-size: .9375rem; }
.liste-ch .liste-ch__type { white-space: nowrap; }
.hub-ch__corps { align-items: start; }
.btn-telecharger { margin: 0 12px 12px 0; }
.page-simple-tete h1, .article-tete h1, .hub-ch h1 { overflow-wrap: anywhere; }

/* page 404, plan du site */
.page-404 { padding: 56px 0 72px; }
.plan-site ul { columns: 2; column-gap: 40px; padding-left: 1.2em; }
.plan-site li { margin-bottom: 6px; break-inside: avoid; }

/* ---------- outils ---------- */
.outil-ch { border: 1px solid var(--trait); border-top: 4px solid var(--rouge); background: #fff; padding: 26px 28px; margin: 2em 0; box-shadow: var(--ombre); font-size: 1rem; line-height: 1.55; }
.outil-ch__titre { font-size: 1.375rem; margin: 0 0 .4em; }
.prose .outil-ch__titre { margin-top: 0; }
.outil-ch__intro { color: var(--texte-doux); margin-bottom: .6em; }
.outil-ch__conf { font-size: .875rem; color: var(--texte-doux); background: var(--fond); padding: 8px 12px; margin: 0 0 1.2em; }
.outil-ch__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; }
.outil-ch__form > .test__avert, .outil-ch__form > p, .outil-ch__form > fieldset, .outil-ch__form > div[data-ss], .outil-ch__form > div[data-mises], .outil-ch__form > div[data-regime], .outil-ch__form > div[data-roul], .outil-ch__form > div[data-sport] { grid-column: auto; }
.outil-ch__form > fieldset.outil-cases, .outil-ch__form > fieldset.outil-mesure, .outil-ch__form > p { grid-column: 1 / -1; }
.outil-ch__form [hidden] { display: none !important; }
.champ { margin: 0 0 14px; min-width: 0; }
.champ label { display: block; font-weight: 700; color: var(--ardoise); margin-bottom: 4px; font-size: .9375rem; }
.champ__aide { font-size: .8125rem; color: var(--texte-doux); margin: 0 0 6px; line-height: 1.4; }
.champ__ligne { display: flex; align-items: center; gap: 10px; }
.champ__unite { font-size: .875rem; color: var(--texte-doux); white-space: nowrap; }
.champ input[type=text], .champ input[type=date], .champ select, .champ textarea { width: 100%; min-height: 46px; padding: 9px 12px; border: 2px solid var(--trait); border-radius: var(--rayon); font: inherit; background: #fff; color: var(--texte); }
.champ input[type=text]:focus, .champ select:focus, .champ textarea:focus, .champ input[type=date]:focus { border-color: var(--ardoise); }
.champ input[type=range] { width: 100%; accent-color: var(--rouge); min-height: 34px; }
.champ--case label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--texte); cursor: pointer; }
.champ--case input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ardoise); }
fieldset.outil-cases, fieldset.outil-mesure { border: 1px solid var(--trait); padding: 14px 18px 6px; margin: 0 0 14px; min-width: 0; }
fieldset.outil-cases legend, fieldset.outil-mesure legend { font-weight: 700; color: var(--ardoise); padding: 0 8px; }
fieldset.outil-mesure { padding-bottom: 12px; }
.outil-ch__res { margin-top: 18px; }
.outil-ch__res:empty { display: none; }
.outil-table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .9375rem; }
.outil-table th, .outil-table td { padding: 9px 12px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.outil-table th[scope=row] { width: 46%; font-weight: 600; color: var(--ardoise); background: var(--fond); }
.outil-table td { font-weight: 700; }
.outil-table small { font-weight: 400; color: var(--texte-doux); }
.outil-table--col thead th { background: var(--ardoise); color: #fff; }
.outil-table--col tbody th { width: auto; }
.outil-gros { font-size: 1.125rem; line-height: 1.5; }
.outil-note { font-size: .9375rem; margin: 0 0 .7em; }
.outil-hyp { font-size: .8125rem; color: var(--texte-doux); margin: 0 0 .7em; }
.outil-err { background: #FDECEC; border-left: 4px solid var(--rouge); color: #7A1015; padding: 10px 14px; font-weight: 600; margin: 0 0 12px; }
.outil-sos { background: var(--fond); border-left: 4px solid var(--rouge); padding: 10px 14px; margin: 14px 0 0; font-weight: 600; }
.outil-urgence { background: #FFF8E6; border: 1px solid #E8C766; padding: 10px 14px; font-size: .9375rem; margin: 0 0 16px; color: #4A3A00; }
.outil-urgence a { color: #4A3A00; font-weight: 700; }
.outil-avert { font-size: .875rem; color: var(--texte-doux); padding-left: 1.3em; }
.outil-avert-jaune { margin: 14px 0 0; }
.outil-ch__pied { font-size: .8125rem; color: var(--texte-doux); border-top: 1px solid var(--trait); margin-top: 18px; padding-top: 10px; }
.outil-actions { margin: 14px 0 6px; }
.outil-rien { font-size: .8125rem; color: var(--texte-doux); margin: 0; }
.outil-sim { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--trait); }
.outil-sim .btn { margin: 0 8px 12px 0; }
.outil-gestes { padding-left: 1.2em; }
.outil-gestes li { margin-bottom: .8em; }
.outil-art { margin: 0 0 1em; }
.outil-art h4 { margin: 0 0 .3em; }
.outil-imprimable { border: 1px dashed var(--trait); padding: 10px 16px; margin: 12px 0; }
.courbe { width: 100%; height: auto; max-height: 180px; background: var(--fond); margin: 8px 0 12px; }
.q10 { border: 0; margin: 20px 0 0; padding: 0; min-width: 0; }
.q10 legend { display: flex; gap: 12px; font-weight: 700; color: var(--ardoise); font-size: 1.1875rem; line-height: 1.4; padding: 0; margin-bottom: 14px; float: left; width: 100%; }
.q10 legend b { flex-shrink: 0; width: 32px; height: 32px; background: var(--ardoise); color: #fff; display: grid; place-items: center; font-size: .875rem; }
.q10__choix { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 10px; }
.q10__choix--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.q10__choix label { position: relative; display: block; cursor: pointer; margin: 0; }
.q10__choix input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.q10__choix span { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 2px solid var(--trait); padding: 8px 10px; font-weight: 600; color: var(--ardoise); background: #fff; text-align: center; font-size: .9375rem; }
.q10__choix label:hover span { border-color: var(--ardoise); }
.q10__choix input:checked + span { background: var(--ardoise); border-color: var(--ardoise); color: #fff; }
.q10__choix input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.outil-ch--questionnaire .progression { position: static; margin-top: 8px; }
.outil-ch--questionnaire .resultat { margin-top: 20px; }
.outil-ch--questionnaire .resultat__corps h4 { font-size: 1.375rem; margin-top: 0; }
.pastilles { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0 14px; }
.pastille { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 2px solid transparent; }
.pastille--R { background: #C8202A; }
.pastille--N { background: #1B1F24; }
.pastille--Z { background: #1E8449; }
.pastille--serie { border-color: #FFBF47; box-shadow: 0 0 0 2px var(--ardoise); }

/* ---------- carte des centres ---------- */
.carte-ch { margin: 2em 0; }
.carte-ch__zone { width: 100%; background: var(--fond-2); border: 1px solid var(--trait); z-index: 1; }
.carte-ch__legende { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: .875rem; padding: 0; list-style: none; }
.carte-ch__legende li::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; background: var(--c); vertical-align: -1px; }
.carte-ch__fiche { min-height: 20px; }
.carte-fiche { border-left: 4px solid var(--rouge); background: var(--fond); padding: 12px 16px; margin: 10px 0 0; }
.carte-fiche h4 { margin: 4px 0; font-size: 1.0625rem; }
.carte-fiche p { margin: 0 0 4px; font-size: .9375rem; }
.carte-fiche__type { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-doux); font-weight: 700; }
.pin-ch span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .8125rem; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.carte-ch__liste summary { cursor: pointer; font-weight: 700; color: var(--ardoise); padding: 10px 0; }
.carte-ch__liste ol { padding-left: 0; list-style: none; margin: 0; }
.carte-ch__liste li { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.carte-ch__liste li > b { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: .8125rem; background: var(--ardoise); }
.carte-ch__liste li p { margin: 0; font-size: .9375rem; }
.leaflet-container { font-family: var(--police); }

/* ---------- impression ---------- */
@media print {
  .util, .header, .nav, .aide-ch, .organismes, .footer-ch, .article-cote, .lire-aussi, .outil-sim, .outil-ch__form button, [data-imprimer], .actions { display: none !important; }
  .outil-ch { box-shadow: none; border: 1px solid #999; }
  .article-grille { display: block; }
}

@media (max-width: 760px) {
  .outil-ch { padding: 18px 16px; }
  .outil-ch__form { grid-template-columns: minmax(0, 1fr); }
  .q10__choix { grid-template-columns: minmax(0, 1fr); }
  .q10__choix--3 { grid-template-columns: minmax(0, 1fr); }
  .outil-table th[scope=row] { width: 42%; }
  .plan-site ul { columns: 1; }
  .champ__ligne { flex-wrap: wrap; }
}

/* evite qu'un tableau large elargisse la page sur mobile */
.article-grille > *, .hub-ch__corps > *, .prose { min-width: 0; }
.prose { max-width: 100%; }

/* fiche budget : section imprimable (bouton « Imprimer la fiche ») */
.fiche-budget { border: 1px solid var(--trait); padding: 8px 24px 16px; margin: 1.6em 0; background: #fff; }
.fiche-bouton { margin: 14px 0 0; }
.fiche-pied { display: none; font-size: .8125rem; border-top: 1px solid #000; padding-top: 6px; margin-top: 1.4em; }
.outil-saisie { width: 100%; border-collapse: collapse; min-width: 560px; }
.outil-saisie th, .outil-saisie td { padding: 6px 8px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: middle; }
.outil-saisie input { width: 100%; min-height: 40px; padding: 6px 8px; border: 2px solid var(--trait); font: inherit; }
@media print {
  body.imprime-fiche .util, body.imprime-fiche .header, body.imprime-fiche .nav, body.imprime-fiche .article-tete, body.imprime-fiche .article-cote, body.imprime-fiche .article-img, body.imprime-fiche .aide-ch, body.imprime-fiche .organismes, body.imprime-fiche .footer-ch, body.imprime-fiche .lire-aussi, body.imprime-fiche .skip { display: none !important; }
  body.imprime-fiche .prose > *:not(.fiche-budget) { display: none !important; }
  body.imprime-fiche .fiche-budget { border: 0; padding: 0; margin: 0; }
  body.imprime-fiche .fiche-bouton { display: none; }
  body.imprime-fiche .fiche-pied { display: block; }
  body.imprime-fiche .fiche-budget h3 { break-before: page; }
  body.imprime-fiche .fiche-budget h2 + h3 { break-before: auto; }
  body.imprime-fiche .fiche-budget table { break-inside: auto; font-size: 10pt; }
  body.imprime-fiche .fiche-budget tr { break-inside: avoid; }
  body.imprime-fiche .fiche-budget td { height: 7mm; }
  body.imprime-fiche .table-wrap { overflow: visible; border: 0; }
  body.imprime-fiche .table-wrap table { min-width: 0; }
  body.imprime-fiche .table-wrap thead th { position: static; background: #fff; color: #000; border-bottom: 2px solid #000; }
  body.imprime-fiche .table-wrap tbody tr:nth-child(even) td { background: #fff; }
  body.imprime-fiche .article-grille, body.imprime-fiche .container { display: block; max-width: none; padding: 0; }
  @page { size: A4; margin: 14mm; }
}
.table-wrap { position: relative; }
.fiche-bouton .btn { white-space: normal; text-align: center; }

/* ---------- equipe de la redaction (page /a-propos/equipe/, signature des articles) ---------- */
a.auteur__nom { text-decoration: underline; text-decoration-color: var(--rouge); text-underline-offset: 3px; }
a.auteur__nom:hover { color: var(--rouge); }
.equipe { display: grid; gap: 0; margin: 1.6em 0; border-top: 1px solid var(--trait); }
.membre { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; padding: 24px 0 24px 20px; border-bottom: 1px solid var(--trait); border-left: 4px solid var(--rouge); scroll-margin-top: 120px; }
.membre:target { background: var(--fond-2, #F0F4F7); }
.membre__photo { width: 96px; height: 96px; object-fit: cover; display: block; }
.membre__photo--vide { display: flex; align-items: center; justify-content: center; background: var(--ardoise); color: #fff; font-weight: 700; font-size: 1.5rem; letter-spacing: .04em; }
.prose .membre__nom { margin: 0 0 4px; font-size: 1.25rem; }
.prose .membre__role { margin: 0 0 10px; color: var(--texte-doux); font-size: .9375rem; font-weight: 600; }
.prose .membre__texte { margin: 0; }
@media (max-width: 560px) { .membre { grid-template-columns: 64px 1fr; gap: 16px; padding-left: 14px; } .membre__photo { width: 64px; height: 64px; } .membre__photo--vide { font-size: 1.1rem; } }

/* Verificateur de site et liste officielle (pages sites autorises / non autorises) */
.verif-site__champ { grid-column: 1 / -1; }
.verif-site__champ input { flex: 1 1 220px; min-width: 0; font-size: 1.0625rem; }
.verif-site__verdict { border-left: 6px solid var(--ardoise); background: var(--fond); padding: 14px 18px; margin: 0 0 14px; }
.verif-site__verdict p { margin: 0 0 .6em; }
.verif-site__verdict p:last-child { margin-bottom: 0; }
.verif-site__verdict strong { overflow-wrap: anywhere; }
.verif-site__titre { font-weight: 700; font-size: 1.125rem; color: var(--ardoise); }
.verif-site__verdict--ok { border-left-color: #1F7A3A; background: #EEF7F0; }
.verif-site__verdict--ok .verif-site__titre { color: #1F5F30; }
.verif-site__verdict--non { border-left-color: var(--rouge); background: #FDECEC; }
.verif-site__verdict--non .verif-site__titre { color: #7A1015; }
.verif-site__verdict--attention { border-left-color: #B7791F; background: #FFF6E5; }
.verif-site__verdict--attention .verif-site__titre { color: #6B4A00; }
.verif-site__source { color: #4B5563; font-size: .875rem; }
.liste-officielle { margin: 1.5em 0; }
.liste-officielle__source { font-size: .9375rem; color: #4B5563; margin: 0 0 .6em; }
.adresse-brute { font-family: ui-monospace, Consolas, monospace; font-size: .9375rem; overflow-wrap: anywhere; }
.verif-site__verdict--neutre { border-left-color: var(--ardoise); background: #EEF2F6; }
