/*
Theme Name: Web Basketball
Theme URI: https://www.webasketball.com.ar/
Description: Tema propio de Web Basketball, portal de noticias de básquetbol argentino: liviano, pensado para el SEO y Google Discover.
Version: 1.1.3
Requires PHP: 8.3
Text Domain: webasketball
*/

@font-face { font-family: "Barlow Condensed"; src: url(assets/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url(assets/fonts/inter-400-700.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
    --navy: #0d1830;
    --navy-2: #172544;
    --orange: #ff6418;
    --orange-dark: #d94c06;
    --ink: #111827;
    --text: #263041;
    --muted: #5f6b7d;
    --line: #e3e7ee;
    --bg: #f4f6f9;
    --card: #fff;
    --win: #0f8a4a;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(13, 24, 48, .06), 0 4px 16px rgba(13, 24, 48, .06);
    --display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--ink); line-height: 1.12; letter-spacing: .005em; margin: 1.4em 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-top: 0; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.1em; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { padding: .5em .65em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--ink); background: #eef1f6; letter-spacing: .02em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.table-scroll table { margin: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: .6em 1em; background: #fff; color: var(--ink); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- En-tête ---------- */

.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand img { width: auto; height: 46px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav li { position: relative; }
.nav a { display: block; padding: .55em .8em; color: #dfe5f1; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; border-radius: 6px; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a, .nav .current-category-ancestor > a { color: #fff; background: var(--navy-2); }
.nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; flex-direction: column; background: var(--navy-2); padding: 6px; border-radius: 0 0 8px 8px; box-shadow: var(--shadow); }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { display: flex; }
.nav .sub-menu a { text-transform: none; font-size: 1.05rem; }
.nav-toggle, .search-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle svg, .search-toggle svg { width: 26px; height: 26px; }
.header-search { flex: none; }
.header-search form { display: flex; }
.header-search input { width: 150px; border: 1px solid #2e3f64; background: var(--navy-2); color: #fff; border-radius: 6px 0 0 6px; padding: .45em .7em; font: inherit; font-size: .9rem; }
.header-search button { border: 0; background: var(--orange); color: #fff; border-radius: 0 6px 6px 0; padding: 0 .7em; cursor: pointer; }
.header-search button svg { width: 18px; height: 18px; display: block; }

/* ---------- Bandeau des résultats ---------- */

.scores-strip { background: #fff; border-bottom: 1px solid var(--line); }
.scores-strip .wrap { display: flex; gap: 10px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: thin; }
.scores-strip__label { flex: none; align-self: center; font-family: var(--display); font-weight: 700; text-transform: uppercase; color: var(--orange-dark); letter-spacing: .04em; }
.mini-score { flex: none; display: grid; grid-template-columns: 1fr auto; gap: 0 14px; min-width: 190px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); text-decoration: none; font-size: .86rem; line-height: 1.45; }
.mini-score:hover { border-color: var(--orange); color: var(--ink); }
.mini-score b { font-family: var(--display); font-size: 1.05rem; text-align: right; }
.mini-score .is-win { color: var(--ink); font-weight: 600; }
.mini-score small { grid-column: 1 / -1; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Mise en page ---------- */

.site-main { padding: 28px 0 56px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.layout > * { min-width: 0; }
.sidebar { display: grid; gap: 24px; position: sticky; top: 84px; }
.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.box__title, .section-title { font-family: var(--display); font-weight: 700; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.box__title::before, .section-title::before { content: ""; width: 5px; height: 1.05em; background: var(--orange); border-radius: 3px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; }
.section-head .section-title { margin: 0; }
.section-head a { font-size: .9rem; font-weight: 600; white-space: nowrap; }

.breadcrumbs { font-size: .84rem; color: var(--muted); margin: 0 0 14px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--orange-dark); }
.breadcrumbs span[aria-hidden] { margin: 0 .4em; }

/* ---------- Cartes ---------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card__img { aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-family: var(--display); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--orange-dark); }
.card__title { font-family: var(--display); font-weight: 700; font-size: 1.38rem; line-height: 1.12; color: var(--ink); margin: 0; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__excerpt { font-size: .92rem; color: var(--muted); margin: 0; }
.card__date { margin-top: auto; font-size: .8rem; color: var(--muted); }

.lead { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; }
.lead__side { display: grid; gap: 22px; }
.card--hero .card__title { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.card--hero .card__img { aspect-ratio: 16 / 10; }
.card--row { flex-direction: row; }
.card--row .card__img { width: 42%; flex: none; aspect-ratio: 4 / 3; }
.card--row .card__title { font-size: 1.18rem; }

.list-links { list-style: none; margin: 0; padding: 0; }
.list-links li { padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.35; }
.list-links li:last-child { border-bottom: 0; }
.list-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.list-links a:hover { color: var(--orange-dark); }
.list-links small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 0; }
.pagination .page-numbers { min-width: 40px; padding: .45em .8em; text-align: center; background: var(--card); border-radius: 6px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination .current { background: var(--orange); color: #fff; }

/* ---------- En-tête de page / d'archive ---------- */

.page-head { margin: 0 0 22px; }
.page-head h1 { margin: 0 0 .25em; }
.page-head__desc { color: var(--muted); max-width: 760px; margin: 0; }
.page-head__desc p:last-child { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: .25em .8em; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .86rem; font-weight: 600; text-decoration: none; }
.chips a:hover { border-color: var(--orange); color: var(--orange-dark); }

/* ---------- Article (gabarit Discover) ---------- */

.article { max-width: 780px; }
.article__cat { display: inline-block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--orange); padding: .12em .6em; border-radius: 4px; text-decoration: none; margin: 0 0 12px; font-size: .95rem; }
.article__cat:hover { color: #fff; background: var(--orange-dark); }
.article__standfirst { font-size: 1.15rem; line-height: 1.55; color: var(--text); margin: 0 0 16px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .88rem; color: var(--muted); margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.article__meta img { width: 34px; height: 34px; border-radius: 50%; }
.article__meta strong { color: var(--ink); }
.article__figure { margin: 0 0 24px; }
.article__figure img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; background: var(--navy); }
.article__figure figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.entry { font-size: 1.07rem; line-height: 1.75; overflow-wrap: break-word; }
.entry pre { white-space: pre-wrap; overflow-x: auto; font-size: .9rem; }
.team-links { font-weight: 600; margin: 0 0 8px; }
.entry > *:first-child { margin-top: 0; }
.entry img { border-radius: 6px; }
.entry figure, .entry .wp-caption { margin: 1.5em 0; max-width: 100%; }
.entry .wp-caption-text, .entry figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.entry .aligncenter { margin-left: auto; margin-right: auto; }
.entry .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.entry .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.entry blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid var(--orange); font-size: 1.12rem; color: var(--ink); }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry iframe { max-width: 100%; }
.entry::after { content: ""; display: table; clear: both; }
.article__tags { margin: 28px 0 0; }
.author-box { display: flex; gap: 16px; align-items: flex-start; margin: 32px 0 0; padding: 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.author-box img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.author-box__name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); margin: 0 0 4px; }
.author-box p { margin: 0; font-size: .94rem; color: var(--muted); }
.archive-note { font-size: .9rem; background: #fff7f0; border-left: 4px solid var(--orange); padding: .8em 1em; border-radius: 0 8px 8px 0; margin: 0 0 22px; color: var(--text); }

/* ---------- Partidos ---------- */

.scoreboard { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px 22px; margin: 0 0 22px; box-shadow: var(--shadow); }
.scoreboard__comp { text-align: center; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #aab6cf; font-size: 1rem; margin: 0 0 14px; }
.scoreboard__comp a { color: #ffb48a; text-decoration: none; }
.scoreboard__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.scoreboard__team { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 3.2vw, 1.9rem); line-height: 1.1; color: #fff; }
.scoreboard__team a { color: inherit; text-decoration: none; }
.scoreboard__team--away { text-align: right; }
.scoreboard__team small { display: block; font-family: var(--sans); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #8fa0c2; margin-top: 4px; }
.scoreboard__score { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 7vw, 3.8rem); line-height: 1; white-space: nowrap; }
.scoreboard__score .is-win { color: var(--orange); }
.scoreboard__meta { text-align: center; color: #aab6cf; font-size: .86rem; margin: 14px 0 0; }
.quarters td:not(:first-child), .quarters th:not(:first-child) { text-align: center; }
.quarters .total { font-weight: 700; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 22px; padding: 0; list-style: none; }
.facts li { background: var(--card); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 14px; font-size: .9rem; }
.facts b { display: block; font-family: var(--display); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.result-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.result-list li { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: .93rem; }
.result-list li:last-child { border-bottom: 0; }
.result-list time { color: var(--muted); font-size: .82rem; }
.result-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.result-list a:hover { color: var(--orange-dark); }
.result-list b { font-family: var(--display); font-size: 1.12rem; }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--navy); color: #b9c3d8; font-size: .92rem; padding: 40px 0 26px; }
.site-footer a { color: #e4e9f3; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer address { font-style: normal; line-height: 1.6; margin-top: 12px; }
.footer-bottom { border-top: 1px solid #23345a; margin-top: 28px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .84rem; }

/* ---------- Formulaires (CF7, recherche) ---------- */

.wpcf7 label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.wpcf7 input:not([type=submit]):not([type=checkbox]), .wpcf7 textarea, .search-form input[type=search] { width: 100%; padding: .65em .8em; border: 1px solid #cfd6e2; border-radius: 8px; font: inherit; background: #fff; }
.wpcf7 input[type=submit], .search-form button { background: var(--orange); color: #fff; border: 0; border-radius: 8px; padding: .7em 1.4em; font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.wpcf7 input[type=submit]:hover, .search-form button:hover { background: var(--orange-dark); }
.search-form { display: flex; gap: 8px; max-width: 560px; }

/* ---------- Écrans moyens ---------- */

@media (max-width: 1180px) {
    .header-search { display: none; }
    .header-search.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 10px 20px; }
    .header-search.is-open input { flex: 1; width: auto; }
    .search-toggle { display: block; }
    .nav { margin-left: auto; }
}
@media (max-width: 1020px) {
    .layout { grid-template-columns: minmax(0, 1fr); }   /* minmax : une table large défile dans son cadre au lieu d'élargir la page */
    .sidebar { position: static; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-toggle { display: block; order: 3; }
    .search-toggle { order: 2; margin-left: auto; }
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 8px 12px 16px; max-height: calc(100vh - 64px); overflow-y: auto; }
    .nav.is-open { display: block; }
    .nav ul { flex-direction: column; }
    .nav .sub-menu { display: flex; position: static; box-shadow: none; padding: 0 0 0 14px; background: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile : contenu utile au-dessus de la ligne de flottaison ---------- */

@media (max-width: 640px) {
    body { font-size: .98rem; }
    .wrap { padding: 0 16px; }
    .site-header .wrap { min-height: 54px; gap: 10px; }
    .brand img { height: 36px; }
    .site-main { padding: 14px 0 40px; }
    .breadcrumbs { display: none; }
    h1 { font-size: 1.95rem; }
    .page-head { margin-bottom: 14px; }
    .page-head__desc { font-size: .92rem; }
    .scores-strip .wrap { padding-top: 7px; padding-bottom: 7px; }
    .scores-strip__label { display: none; }
    .mini-score { min-width: 168px; padding: 4px 10px; }
    .cards, .cards--2, .lead { grid-template-columns: 1fr; gap: 14px; }
    .lead__side { gap: 14px; }
    .card--row .card__img { width: 36%; }
    .card__body { padding: 11px 13px 13px; }
    .card__title { font-size: 1.22rem; }
    .card__excerpt { display: none; }
    .section-head { margin: 24px 0 10px; }
    .article__cat { margin-bottom: 8px; font-size: .85rem; }
    .article__standfirst { font-size: 1.04rem; margin-bottom: 10px; }
    .article__meta { margin-bottom: 12px; padding-bottom: 10px; font-size: .82rem; }
    .article__meta img { width: 28px; height: 28px; }
    .article__figure { margin: 0 -16px 16px; }
    .article__figure img { border-radius: 0; }
    .article__figure figcaption { padding: 0 16px; }
    .entry { font-size: 1.02rem; line-height: 1.68; }
    .scoreboard { padding: 16px 12px; margin: 0 -16px 16px; border-radius: 0; }
    .scoreboard__row { gap: 8px; }
    .result-list li { grid-template-columns: 1fr auto; padding: 9px 12px; }
    .result-list time { grid-column: 1 / -1; }
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
    /* Tableaux (posiciones, fixtures, planillas) : compacts, défilement horizontal dans leur cadre, colonne Equipo fixe */
    table { font-size: .84rem; }
    th, td { padding: .45em .5em; white-space: nowrap; }
    th { font-size: .92rem; }
    .single-wb_tabla .table-scroll td:nth-child(2), .single-wb_tabla .table-scroll th:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line); }
    .single-wb_tabla .table-scroll th:nth-child(2) { background: #eef1f6; }
    /* Cibles tactiles ≥ 44 px (boutons du menu et de recherche, pagination, liens du menu et du pied) */
    .nav-toggle, .search-toggle { padding: 10px; }
    .nav a { padding: .7em .8em; }
    .pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .site-footer li a { display: inline-block; padding: .4em 0; }
    .list-links li { padding: 11px 0; }
}
