/* Gabarits SEO + GEO (seo.py) : réponse, encadré faits, cartes, tableaux, liens, bloc confiance.
   Tokens de bdz.css (charte). Mobile d'abord, aucune largeur fixe. */
.sx { padding-bottom: 56px }
.sx section { margin-top: 40px }
.sx h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 16px }
.sx-hero { padding-bottom: 8px }
.sx-hero h1 { font-size: clamp(28px, 4.2vw, 48px); line-height: 1.12; letter-spacing: -.6px; margin-top: 10px; max-width: 22em; overflow-wrap: anywhere }
.sx-rep { font-size: 19px; line-height: 1.55; font-weight: 400; max-width: 44em; margin: 18px 0 0 }
.sx-m { color: var(--muted); font-size: 15px }

/* Encadré faits */
.sx-faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 26px 0 0; padding: 0 }
.sx-faits > div { background: var(--surface); border-radius: 16px; padding: 14px 16px; min-width: 0 }
.sx-faits dt { font-family: var(--f-titre); font-weight: 700; font-size: var(--t-precision); color: var(--muted); margin: 0 0 4px }
.sx-faits dd { margin: 0; font-weight: 500; overflow-wrap: anywhere }
.sx-faits a { color: var(--fg) }

/* Cartes de stage */
.sx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px }
.sx-card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--fg); box-shadow: 0 2px 12px rgba(39,47,53,.06); transition: transform .18s ease }
.sx-card a:hover { transform: translateY(-2px) }
.sx-ph { position: relative; display: block; aspect-ratio: 4 / 3; min-height: 0; flex: 0 0 auto; overflow: hidden; background: var(--surface-2) }
.sx-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block }
/* Photo de banque ERP d'abord, vraie photo du stage au survol (règle Bastien). Sans souris : la photo de banque seule. */
.sx-ph img.sx-h { opacity: 0; transition: opacity .4s ease }
.sx-card a:hover .sx-ph img.sx-h, .sx-card a:focus-visible .sx-ph img.sx-h { opacity: 1 }
@media (hover: none) { .sx-ph img.sx-h { display: none } }
@media (prefers-reduced-motion: reduce) { .sx-ph img.sx-h { transition: none } }
.sx-u { position: absolute; left: 12px; top: 12px; padding: 4px 11px; border-radius: 999px; font-size: var(--t-precision); font-weight: 700; background: #fff; color: var(--bdz-ardoise) }
/* Même stage dans plusieurs centres (Bastien 03/12) : une carte, ses lieux nommés, la pastille le dit. */
.sx-2l { position: absolute; right: 12px; top: 12px; padding: 4px 11px; border-radius: 999px; font-size: var(--t-precision); font-weight: 700; background: var(--bdz-ardoise); color: #fff }
.sx-b { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 18px; font-size: 16px }
.sx-t { font-family: var(--f-titre); font-size: 19px; line-height: 1.25 }
.sx-p { margin-top: 4px }
@media (prefers-reduced-motion: reduce) { .sx-card a { transition: none } .sx-card a:hover { transform: none } }

/* Tableau des semaines : défile dans son cadre, jamais la page */
.sx-tab { overflow-x: auto; background: var(--surface); border-radius: 18px; -webkit-overflow-scrolling: touch }
.sx-tab table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 16px }
.sx-tab th, .sx-tab td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top }
.sx-tab th { font-family: var(--f-titre); font-size: var(--t-precision); color: var(--muted) }
.sx-tab tr:last-child td { border-bottom: 0 }
.sx-tab a { color: var(--fg); font-weight: 600 }
.sx-n { font-variant-numeric: tabular-nums; white-space: nowrap }

/* Pastilles d'activités, grilles de liens */
.sx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px }
.sx-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--fg); text-decoration: none; font-family: var(--f-titre); font-weight: 600; font-size: 15px; border: 2px solid transparent }
.sx-chips a:hover { border-color: var(--fg) }
.sx-chips a span { font-size: var(--t-precision); color: var(--muted) }
.sx-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px }
.sx-grille a { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 16px 18px; background: var(--surface); border-radius: 18px; color: var(--fg); text-decoration: none }
.sx-grille a span { color: var(--muted); font-size: 15px }
.sx-grille a:hover { box-shadow: inset 0 0 0 2px var(--fg) }
.sx-liens ul, .sx-arrets, .sx-avis { margin: 0; padding-left: 20px; display: grid; gap: 8px }
.sx-liens a, .sx-arrets a, .sx-avis a, .sx-bientot a:not(.btn) { color: var(--fg) }

/* Bloc confiance */
.sx-conf { background: var(--surface); border-radius: 22px; padding: 22px }
.sx-conf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px }
.sx-conf li { display: flex; gap: 10px; align-items: flex-start }
.sx-conf svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--bdz-ardoise); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; background: var(--bdz-sports); border-radius: 50%; padding: 3px; box-sizing: border-box }
.sx-conf a { color: var(--fg) }
@media (min-width: 900px) { .sx-conf { padding: 30px } }

/* FAQ : mêmes détails que les pages vitrine */
.sx .qa { background: var(--surface); border-radius: 16px; margin-top: 10px }
.sx .qa summary { cursor: pointer; padding: 16px 18px; font-family: var(--f-titre); font-weight: 700; min-height: 44px; list-style-position: inside }
.sx .qa .a { padding: 0 18px 16px }
.sx .qa .a p { margin: 0 }
.sx .qa a { color: var(--fg) }
.sx-hub section:first-of-type { margin-top: 28px }

/* Téléphone : cartes en ligne (vignette à gauche), la liste reste courte */
@media (max-width: 560px) {
  .sx-cards { gap: 10px }
  .sx-card a { flex-direction: row; border-radius: 16px }
  .sx-ph { width: 112px; aspect-ratio: auto; min-height: 112px }
  .sx-u { left: 6px; top: 6px; font-size: var(--t-precision); padding: 2px 8px }
  .sx-2l { right: auto; top: auto; left: 6px; bottom: 10px; font-size: var(--t-precision); padding: 2px 8px }
  .sx-b { padding: 10px 12px; font-size: var(--t-precision); gap: 2px; min-width: 0 }
  .sx-t { font-size: 16px }
}
@media (max-width: 560px) {
  .sx-faits { display: block; background: var(--surface); border-radius: 18px; padding: 4px 16px }
  .sx-faits > div { display: grid; grid-template-columns: 38% 1fr; gap: 10px; padding: 11px 0; border-radius: 0; background: none; border-bottom: 1px solid var(--line) }
  .sx-faits > div:last-child { border-bottom: 0 }
  .sx-faits dt { margin: 0; font-size: var(--t-precision) }
  .sx-faits dd { font-size: 15px }
  .sx-rep { font-size: 17px }
}

/* Proposition du 07/11 (BDZ_DESIGN) : hub avec la liste des stages d'abord */
.sx-bas { margin-top: 8px }
.sx-plie { background: var(--surface); border-radius: 18px; padding: 0 16px }
.sx-plie summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font-family: var(--f-titre); font-weight: 700; font-size: 17px }
.sx-plie summary::-webkit-details-marker { display: none }
.sx-plie summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--fg); border-bottom: 2px solid var(--fg); transform: rotate(45deg); margin-right: 6px; transition: transform .2s }
.sx-plie[open] summary::after { transform: rotate(-135deg) }
.sx-plie .sx-faits { margin: 0 0 12px; background: none; padding: 0 }
.sx-plie .sx-faits > div { background: #fff }
@media (max-width: 700px) { .sx-plie .sx-faits > div { background: none } }
@media (max-width: 700px) {
  .sx-defile { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none }
  .sx-defile::-webkit-scrollbar { display: none }
  .sx-defile li { flex: 0 0 auto; scroll-snap-align: start }
}
.sx-liste { list-style: none; margin: 0; padding: 0 }
.sx-liste li + li { border-top: 1px solid var(--line) }
.sx-liste a { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-height: 48px; padding: 12px 0; color: var(--fg); text-decoration: none }
.sx-liste b { font-family: var(--f-titre) }
.sx-liste span { color: var(--muted); font-size: var(--t-precision) }
@media (max-width: 700px) { .sx-bas section { margin-top: 28px } }

/* Guide « centre de loisirs ou stage » : sur téléphone, le comparatif s'empile (critère, puis les deux réponses nommées).
   En tableau qui défile, la colonne bloomdayz restait hors de l'écran. */
.sx-cmp + .sx-m { margin-top: 12px }
.sx-choix p { margin: 0 0 12px; max-width: 46em }
@media (max-width: 700px) {
  .sx-cmp table { min-width: 0 }
  .sx-cmp thead { display: none }
  .sx-cmp tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line) }
  .sx-cmp tr:last-child { border-bottom: 0 }
  .sx-cmp th[scope="row"] { display: block; padding: 0 0 4px; border: 0; font-size: 17px; color: var(--fg) }
  .sx-cmp td { display: block; padding: 6px 0 0; border: 0 }
  .sx-cmp td::before { content: attr(data-l); display: block; font-family: var(--f-titre); font-size: var(--t-precision); font-weight: 700; color: var(--muted) }
}
