/* Extension TVS — styles des codes courts (fonctionne avec n'importe quel thème) */
.tvs-note { color: #4a5566; font-style: italic; }
.tvs-notice { background: #e7f4ec; border-radius: 10px; padding: 12px 14px; }

/* Agenda */
.tvs-agenda { display: grid; gap: 10px; }
.tvs-event { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(16,35,63,.06), 0 6px 20px rgba(16,35,63,.06); color: inherit !important; text-decoration: none !important; }
.tvs-event:hover { box-shadow: 0 0 0 2px #e7f4ec, 0 6px 20px rgba(16,35,63,.08); }
.tvs-date { display: grid; text-align: center; border-radius: 10px; background: #e7f4ec; color: #16703c; padding: 6px 0; line-height: 1.05; }
.tvs-date b { font-family: "Barlow Condensed", sans-serif; font-size: 1.8rem; }
.tvs-date i { font-style: normal; font-size: .72rem; text-transform: uppercase; font-weight: 600; letter-spacing: .05em; }
.tvs-event.is-org .tvs-date { background: #10233f; color: #fff; }
.tvs-event-body { display: grid; gap: 2px; min-width: 0; }
.tvs-event-body small { color: #4a5566; }
.tvs-event-more { font-size: .85rem; font-weight: 600; border: 1px solid #e2e6ec; border-radius: 8px; padding: 5px 10px; }

/* Prochaine épreuve */
.tvs-feature { background: #10233f; color: #fff; border-radius: 14px; overflow: hidden; }
.tvs-feature img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.tvs-feature-body { padding: 22px; display: grid; gap: 10px; }
.tvs-feature h3 { color: #fff; margin: 0; }
.tvs-feature p { margin: 0; color: #c9d4e3; }
.tvs-pill { justify-self: start; background: #1d8a4b; color: #fff; border-radius: 99px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
.tvs-countdown { justify-self: start; background: rgba(255,255,255,.1); border-radius: 10px; padding: 8px 14px; text-align: center; }
.tvs-countdown b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; line-height: 1; }
.tvs-countdown span { font-size: .72rem; color: #9fb0c8; text-transform: uppercase; }
.tvs-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tvs-link-light { color: #cfe9d9 !important; }

/* Résultats */
.tvs-results { margin: 1rem 0 2rem; }
.tvs-results-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.tvs-results-q { flex: 1; min-width: 200px; border: 1px solid #e2e6ec; border-radius: 10px; padding: 8px 12px; font: inherit; }
.tvs-results-cat { border: 1px solid #e2e6ec; border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }
.tvs-results-csv { font-size: .88rem; font-weight: 600; }
.tvs-results-count { font-size: .82rem; color: #4a5566; margin: 0 0 6px; }
.tvs-table-wrap { overflow: auto; max-height: 70vh; border: 1px solid #e2e6ec; border-radius: 10px; }
.tvs-table-wrap table { border-collapse: collapse; width: 100%; font-size: .88rem; margin: 0; }
.tvs-table-wrap th, .tvs-table-wrap td { padding: 7px 10px; border-bottom: 1px solid #e2e6ec; text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tvs-table-wrap th { background: #f1f4f8; color: #10233f; position: sticky; top: 0; cursor: pointer; user-select: none; }
.tvs-table-wrap tr.is-tvs td { background: #e7f4ec; font-weight: 600; }

/* Partage */
.tvs-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 2rem 0 1rem; }
.tvs-share span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #4a5566; margin-right: 4px; }
.tvs-share a, .tvs-share button { border: 0; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: .88rem; font-weight: 600; color: #fff !important; text-decoration: none !important; cursor: pointer; }
.tvs-share .is-wa { background: #1fa855; }
.tvs-share .is-fb { background: #1877f2; }
.tvs-share .is-copy { background: #10233f; }

/* Strava */
.tvs-strava { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.tvs-strava-card { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 1px 2px rgba(16,35,63,.06), 0 6px 20px rgba(16,35,63,.06); }
.tvs-strava-card h4 { font-family: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #fc4c02; margin: 0 0 12px; }
.tvs-strava-card iframe { width: 100%; border: 0; display: block; }

/* Partenaires */
.tvs-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tvs-partners a { background: #fff; border-radius: 12px; height: 92px; display: grid; place-items: center; padding: 12px; box-shadow: 0 1px 2px rgba(16,35,63,.06); }
.tvs-partners img { max-height: 62px; width: auto; object-fit: contain; }

/* Sous-pages */
.tvs-subpages { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 1.5rem 0; }
.tvs-subpage { display: grid; gap: 4px; align-content: start; background: #f6f7f9; border: 1px solid #e2e6ec; border-radius: 12px; padding: 12px; color: inherit !important; text-decoration: none !important; }
.tvs-subpage:hover { border-color: #1d8a4b; }
.tvs-subpage img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.tvs-subpage strong { color: #10233f; }
.tvs-subpage span { font-size: .85rem; color: #4a5566; }
.tvs-crumbs { font-size: .85rem; color: #9fb0c8; }

/* Galeries reprises du wiki */
.tvs-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 1rem 0; }
.tvs-galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.tvs-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(8,15,28,.94); display: flex; align-items: center; justify-content: center; }
.tvs-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.tvs-lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 99px; width: 46px; height: 46px; font-size: 1.4rem; cursor: pointer; }
.tvs-lightbox .c { top: 16px; right: 16px; } .tvs-lightbox .p { left: 16px; top: 50%; } .tvs-lightbox .n { right: 16px; top: 50%; }

/* Formulaires */
.tvs-form { display: grid; gap: 6px; max-width: 560px; }
.tvs-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.tvs-form input, .tvs-form select, .tvs-form textarea { width: 100%; border: 1px solid #e2e6ec; border-radius: 9px; padding: 9px 11px; font: inherit; background: #fff; }
.tvs-hp { position: absolute; left: -9999px; }
.tvs-login form { display: grid; gap: 8px; max-width: 420px; }
.tvs-login input[type=text], .tvs-login input[type=password] { width: 100%; border: 1px solid #e2e6ec; border-radius: 9px; padding: 9px 11px; }

@media (max-width: 900px) {
	.tvs-strava { grid-template-columns: 1fr; }
	.tvs-event { grid-template-columns: 56px 1fr; }
	.tvs-event-more { display: none; }
}

/* Pages d'épreuve : grande photo de tête et galerie « En images » */
.tvs-epreuve-cover { margin: 0 0 1.5rem; }
.tvs-epreuve-cover img { display: block; width: 100%; aspect-ratio: 2.4; object-fit: cover; border-radius: 12px; }
.tvs-epreuve-cover figcaption { font-size: .8rem; color: #4a5566; text-align: right; margin-top: .35rem; }
.tvs-galerie-epreuve { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tvs-credit { font-size: .8rem; color: #4a5566; margin-top: .25rem; }

/* Trombinoscope : une carte par membre, la deuxième photo apparaît au survol */
.tvs-trombi { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 1.5rem 0; align-items: start; }
.tvs-trombi .tvs-membre { margin: 0; background: #f6f7f9; border: 1px solid #e2e6ec; border-radius: 12px; overflow: hidden; }
.tvs-trombi .tvs-membre-photo { position: relative; aspect-ratio: 4 / 5; background: #e7f4ec; }
.tvs-trombi .tvs-membre-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; margin: 0; transition: opacity .25s; }
.tvs-trombi .tvs-membre-photo .tvs-membre-alt { opacity: 0; }
.tvs-trombi .tvs-membre:hover .tvs-membre-alt { opacity: 1; }
.tvs-trombi figcaption { display: grid; gap: 2px; padding: 10px 12px 12px; font-size: .85rem; text-align: left; color: #4a5566; }
.tvs-trombi figcaption strong { color: #10233f; font-size: .95rem; }
.tvs-trombi .tvs-membre-role { color: #16703c; font-weight: 600; }
.tvs-trombi details { margin-top: 4px; }
.tvs-trombi summary { cursor: pointer; color: #16703c; font-weight: 600; }
.tvs-trombi details p { margin: .4rem 0 0; font-size: .82rem; line-height: 1.45; }
.tvs-trombi .tvs-membre-initiales { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 2.6rem; color: #fff; background: linear-gradient(135deg, #1d8a4b, #10233f); }
