/*
Theme Name:   BFoot
Theme URI:    https://www.bfoot.fr
Author:       Bcrea
Description:  Thème du portail sportif bfoot.fr : actualités, scores en direct, classements et boutique partenaire. Conçu pour fonctionner avec l'extension BFoot Live.
Version:      1.5.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
Text Domain:  bsports
Tags:         news, sports, two-columns, three-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* Mise en page : en-tête vert gazon collant, bandeau des matchs, grille 3 colonnes à l'accueil (scores | à la une | classements), 2 colonnes ailleurs (contenu | barre latérale) */
/* Montserrat hébergée localement (pas d'appel à Google Fonts). */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/montserrat-regular.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/montserrat-medium.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/montserrat-semibold.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/montserrat-bold.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("assets/fonts/montserrat-extrabold.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 900; font-display: swap; src: url("assets/fonts/montserrat-black.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 700; font-display: swap; src: url("assets/fonts/montserrat-bolditalic.woff") format("woff"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 900; font-display: swap; src: url("assets/fonts/montserrat-blackitalic.woff") format("woff"); }

:root {
	/* Vert BFoot (marque) + gris ardoise (#1f2933 · #6b7280 · #f9fafb) */
	--pitch: #3f7a2a;
	--pitch-deep: #24511a;
	--gold: #f0b21c;
	--live: #e1262c;
	--bg: #f9fafb;
	--surface: #ffffff;
	--surface-2: #f1f3f5;
	--ink: #1f2933;
	--muted: #6b7280;
	--line: #e3e6ea;
	--on-pitch: #ffffff;
	--footer-bg: #1f2933;
	--footer-ink: #f9fafb;
	--footer-muted: #9ca3af;
	--display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--radius: 10px;
	--wrap: 1240px;
}
/* Clair par défaut pour tous ; le mode sombre s'active avec le bouton lune (mémorisé). */
:root[data-theme="dark"] {
	--pitch: #5fa245; --pitch-deep: #1d4316; --gold: #f5bf3a; --live: #ff4a4f;
	--bg: #161d25; --surface: #1f2933; --surface-2: #27323e; --ink: #f9fafb; --muted: #9ca3af; --line: #323d4a;
	--footer-bg: #11171e; --footer-ink: #f9fafb; --footer-muted: #9ca3af;
	color-scheme: dark;
}

/* L'extension BFoot Live suit les couleurs du thème, y compris en mode sombre. */
body .bsl {
	--bsl-pitch: var(--pitch); --bsl-gold: var(--gold); --bsl-live: var(--live);
	--bsl-surface: var(--surface); --bsl-surface-2: var(--surface-2); --bsl-ink: var(--ink);
	--bsl-muted: var(--muted); --bsl-line: var(--line); --bsl-display: var(--display); --bsl-radius: var(--radius);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.6; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--gold); color: #1a1405; padding: 8px 14px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- En-tête ---------- */
.site-header { background: var(--pitch-deep); color: var(--on-pitch); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header .wrap { display: flex; align-items: center; gap: 20px; padding-block: 10px; }
.brand { display: flex; align-items: flex-end; gap: 5px; flex: none; }
.brand img { height: 50px; width: auto; display: block; }
.site-footer .brand img { height: 56px; }
.brand .custom-logo-link img { width: auto; max-height: 46px; }
.brand-name { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 26px; letter-spacing: -.5px; line-height: 1; color: #fff; }
.main-nav { flex: 1; min-width: 0; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav ul::-webkit-scrollbar { display: none; }
.main-nav ul ul { display: none; }
.main-nav a { display: block; font-family: var(--display); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; padding: 9px 11px; border-radius: 6px; white-space: nowrap; opacity: .88; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-category-ancestor > a, .main-nav .current-post-ancestor > a { opacity: 1; background: rgba(255, 255, 255, .12); }
.main-nav .current-menu-item > a, .main-nav .current-post-ancestor > a, .main-nav .current-category-ancestor > a { box-shadow: inset 0 -3px 0 var(--gold); }
.header-tools { display: flex; gap: 6px; flex: none; align-items: center; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: transparent; display: grid; place-items: center; color: var(--on-pitch); padding: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.icon-btn svg { width: 18px; height: 18px; }
.header-cta { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .3px; background: var(--gold); color: #1a1405; border-radius: 999px; padding: 0 16px; height: 38px; display: inline-flex; align-items: center; font-size: 13px; }
.header-search { background: var(--pitch-deep); border-top: 1px solid rgba(255, 255, 255, .12); }
.header-search .wrap { padding-block: 12px; }
.header-search form { display: flex; gap: 8px; max-width: 640px; }
.header-search input[type="search"] { flex: 1; min-width: 0; height: 44px; border-radius: 999px; border: 0; padding: 0 18px; background: #fff; color: #1f2933; }
.header-search button { height: 44px; border: 0; border-radius: 999px; padding: 0 20px; background: var(--gold); color: #1a1405; font-weight: 700; }

/* Bandeau : le bloc de l'extension prend toute la largeur */
.match-band .bsl-tk-track { max-width: var(--wrap); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- Composants communs ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.h2 { font-family: var(--display); font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .2px; margin: 0; line-height: 1.1; text-wrap: balance; }
.h2 i { font-style: normal; color: var(--pitch); }
.link-more { font-size: 13px; font-weight: 600; color: var(--pitch); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--pitch); }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px 12px; flex-wrap: wrap; }
.livetag { color: #fff; background: var(--live); border-radius: 3px; padding: 0 6px; font-weight: 700; letter-spacing: .4px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.livetag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* Vignettes : image à la une, ou illustration générée selon le sport */
.thumb { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; position: relative; max-width: 100%; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.thumb .badge { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .5px; }
.thumb.is-video::after { content: ""; position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%2324511a'/%3E%3C/svg%3E") center / 26px no-repeat; }

/* ---------- Accueil ---------- */
.home-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 24px; padding-block: 24px 40px; }
.col { display: grid; gap: 24px; align-content: start; min-width: 0; }

.hero { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 380px; display: flex; align-items: flex-end; background: var(--pitch-deep); }
.hero .hero-media { position: absolute; inset: 0; }
.hero .hero-media img, .hero .hero-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-copy { position: relative; padding: 28px; display: grid; gap: 10px; width: 100%; background: linear-gradient(transparent, rgba(5, 14, 7, .88) 45%); }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); }
.hero h1, .hero h2 { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -.5px; margin: 0; text-transform: uppercase; text-wrap: balance; max-width: 22ch; }
.hero p { margin: 0; max-width: 60ch; opacity: .9; }
.hero .meta { color: #fff; opacity: .78; }

.stories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.story { display: grid; gap: 8px; align-content: start; }
.story h3 { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.25; margin: 0; text-wrap: balance; }
.story:hover h3 { color: var(--pitch); }
.story small { color: var(--muted); font-size: 12px; }

.feed { display: grid; }
.feed a { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.feed a:last-child { border-bottom: 0; }
.feed a:hover b { color: var(--pitch); }
.feed time { font-family: var(--display); font-weight: 800; font-size: 14px; color: var(--pitch); line-height: 1.3; }
.feed b { display: block; font-weight: 600; line-height: 1.4; font-size: 14px; }
.feed span { font-size: 12px; color: var(--muted); }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; }
.vid { display: grid; gap: 6px; }
.vid b { font-weight: 600; font-size: 13px; line-height: 1.35; }

.ranked { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.ranked li { counter-increment: r; border-bottom: 1px solid var(--line); }
.ranked li:last-child { border-bottom: 0; }
.ranked a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 11px 14px; font-weight: 600; font-size: 13px; line-height: 1.4; }
.ranked a::before { content: counter(r); font-family: var(--display); font-weight: 900; font-size: 20px; line-height: 1; color: var(--pitch); }
.ranked a:hover { color: var(--pitch); }

/* Section boutique */
.shop { background: var(--surface); border-block: 1px solid var(--line); }
.shop .wrap { padding-block: 32px; display: grid; gap: 18px; }
.shop-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.shop-head p { margin: 4px 0 0; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.prod { display: grid; gap: 8px; align-content: start; }
.prod .pic { aspect-ratio: 1; border-radius: var(--radius); background: var(--surface-2); display: grid; place-items: center; position: relative; overflow: hidden; max-width: 100%; }
.prod .pic img { width: 100%; height: 100%; object-fit: contain; }
.prod .pic svg { width: 58%; height: 58%; }
.prod .promo { position: absolute; left: 10px; top: 10px; background: var(--live); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.prod b { font-weight: 600; line-height: 1.3; }
.prod .shop-name { font-size: 12px; color: var(--muted); }
.price { display: flex; gap: 8px; align-items: baseline; }
.price strong { font-family: var(--display); font-size: 18px; font-weight: 800; }
.price s { color: var(--muted); font-size: 13px; }
.btn-line { border: 1px solid var(--ink); background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; justify-self: start; }
.btn-line:hover { background: var(--ink); color: var(--surface); }
.shop-note { font-size: 12px; color: var(--muted); margin: 0; }

/* Newsletter */
.newsletter { background: var(--pitch-deep); color: #fff; }
.newsletter .wrap { padding-block: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 24px; align-items: center; }
.newsletter h2 { font-family: var(--display); font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; margin: 0 0 6px; }
.newsletter p { margin: 0; opacity: .85; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input[type="email"] { flex: 1; min-width: 0; height: 46px; border-radius: 999px; border: 0; padding: 0 18px; background: #fff; color: #1f2933; }
.newsletter button { height: 46px; border: 0; border-radius: 999px; padding: 0 22px; background: var(--gold); color: #1a1405; font-family: var(--display); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .3px; }
.admin-hint { font-size: 13px; padding: 10px 12px; border: 1px dashed var(--gold); border-radius: 8px; color: inherit; }

/* ---------- Pages intérieures ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-block: 28px 48px; }
.layout.is-full { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.sidebar { display: grid; gap: 24px; align-content: start; min-width: 0; }

.breadcrumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--pitch); }

.archive-head { display: grid; gap: 8px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 3px solid var(--ink); }
.archive-head h1 { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.5px; text-transform: uppercase; margin: 0; }
.archive-head p { margin: 0; color: var(--muted); max-width: 65ch; }

.post-list { display: grid; gap: 22px; }
.post-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.post-row h2 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; margin: 4px 0 8px; text-wrap: balance; }
.post-row:hover h2 { color: var(--pitch); }
.post-row p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.post-grid-lead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.post-grid-lead .story h3 { font-size: 20px; }

.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 28px; }
.pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-weight: 600; }
.pagination .page-numbers.current { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--pitch); color: var(--pitch); }

/* Article */
.entry-header { display: grid; gap: 12px; margin-bottom: 20px; }
.entry-title { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.5px; margin: 0; text-wrap: balance; }
.entry-lead { font-size: 17px; line-height: 1.5; color: var(--muted); margin: 0; max-width: 65ch; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.byline img { border-radius: 50%; }
.byline strong { color: var(--ink); }
.entry-media { margin: 0 0 24px; }
.entry-media .thumb { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.entry-media figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.entry-content { font-size: 16.5px; line-height: 1.75; max-width: 70ch; }
.entry-content > * { margin-block: 0 1.1em; }
.entry-content h2, .entry-content h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin-top: 1.6em; }
.entry-content h2 { font-size: 22px; }
.entry-content h3 { font-size: 19px; }
.entry-content a { color: var(--pitch); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); font-family: var(--display); font-size: 20px; line-height: 1.35; font-weight: 600; font-style: italic; }
.entry-content blockquote cite { display: block; font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--muted); font-style: normal; margin-top: 8px; }
.entry-content figure { margin-inline: 0; }
.entry-content table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-footer { display: grid; gap: 18px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.tags a:hover { border-color: var(--pitch); color: var(--pitch); }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); }
.share a { border-radius: 999px; padding: 7px 14px; color: #fff; font-weight: 700; font-size: 13px; }
.share .s-wa { background: #1f9d55; }
.share .s-fb { background: #1f5fbf; }
.share .s-x { background: #111; }
.related { margin-top: 36px; display: grid; gap: 16px; }

/* Commentaires */
.comments { margin-top: 36px; display: grid; gap: 16px; }
.comment-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.comment-list .children { list-style: none; padding-left: 24px; margin-top: 14px; display: grid; gap: 14px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 15px; }
.comment-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment-meta img { border-radius: 50%; }
.comment-respond { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
.comment-respond .submit, .btn { border: 0; border-radius: 999px; padding: 10px 22px; background: var(--pitch); color: #fff; font-weight: 700; display: inline-block; }

/* Recherche / 404 */
.search-form { display: flex; gap: 8px; max-width: 560px; }
.search-form input[type="search"] { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; background: var(--surface); }
.search-form button { height: 46px; border: 0; border-radius: 999px; padding: 0 20px; background: var(--pitch); color: #fff; font-weight: 700; }
.not-found { display: grid; gap: 16px; justify-items: start; padding-block: 40px; }
.not-found .score404 { font-family: var(--display); font-weight: 900; font-size: clamp(56px, 12vw, 120px); line-height: .85; color: var(--pitch); }

/* Widgets */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.widget-title { font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; margin: 0 0 10px; }
.widget ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.site-footer .wrap { padding-block: 34px 24px; display: grid; gap: 24px; }
.fcols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 24px; }
.fcols h4 { font-family: var(--display); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; margin: 0 0 10px; color: var(--gold); }
.fcols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.fcols ul a { opacity: .8; }
.fcols ul a:hover { opacity: 1; text-decoration: underline; }
.fcols p { font-size: 14px; opacity: .75; margin: 10px 0 0; max-width: 34ch; }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--footer-ink) 30%, transparent); display: grid; place-items: center; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legal-links a { text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover { opacity: 1; }
.legal { border-top: 1px solid color-mix(in srgb, var(--footer-ink) 20%, transparent); padding-top: 16px; font-size: 12px; opacity: .7; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Application installée (PWA) ---------- */
/* Sous la barre d'état de l'iPhone en mode application, l'en-tête s'étend sous l'heure et la batterie. */
.site-header { padding-top: env(safe-area-inset-top, 0px); }
html { scroll-padding-top: 140px; }
.pwa-banner {
	position: fixed; z-index: 70;
	left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	max-width: 520px; margin-inline: auto;
	display: flex; align-items: center; gap: 12px;
	background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
	padding: 12px 12px 12px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	animation: pwa-in .35s ease-out;
}
@keyframes pwa-in { from { transform: translateY(20px); opacity: 0; } }
.pwa-banner img { border-radius: 10px; flex: none; }
.pwa-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; line-height: 1.4; }
.pwa-text b { font-size: 14px; }
.pwa-text span { color: var(--muted); }
.pwa-install { border: 0; border-radius: 999px; background: var(--pitch); color: #fff; font-weight: 700; font-size: 13px; padding: 9px 16px; flex: none; }
.pwa-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; width: 32px; height: 32px; border-radius: 50%; flex: none; }
.pwa-close:hover { background: var(--surface-2); }
.pwa-footer-link { border: 1px solid color-mix(in srgb, var(--footer-ink) 35%, transparent); background: transparent; color: inherit; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; }
.pwa-footer-link:hover { background: color-mix(in srgb, var(--footer-ink) 12%, transparent); }
.offline-bar {
	position: fixed; z-index: 69; left: 0; right: 0; bottom: 0;
	padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; text-align: center;
}
/* Dans l'application installée, le bouton « Mon compte » laisse plus de place au menu. */
.is-app .header-cta { display: none; }

/* ---------- Alignements WordPress ---------- */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--muted); }
.sticky, .bypostauthor, .gallery-caption { }

/* Dans les colonnes étroites, le classement masque la colonne Forme */
.sidebar .bsl .bsl-form, .home-grid aside .bsl .bsl-form { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.home-grid { grid-template-columns: minmax(0, 1fr) 300px; }
	.col-scores { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 860px) {
	.home-grid, .layout { grid-template-columns: minmax(0, 1fr); }
	/* Sur téléphone : les scores d'abord, puis la une, le fil info et les classements. */
	.col-scores { display: contents; }
	.col-scores > :first-child { order: 1; }
	.home-grid > .col:nth-child(2) { order: 2; }
	.col-scores > .panel { order: 3; }
	.home-grid > #classements { order: 4; }
	.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.newsletter .wrap { grid-template-columns: minmax(0, 1fr); }
	.fcols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fcols > div:first-child { grid-column: 1 / -1; }
	.header-cta { display: none; }
	.post-row { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.stories, .post-grid-lead { grid-template-columns: minmax(0, 1fr); }
	.stories .story { grid-template-columns: 120px minmax(0, 1fr); gap: 4px 12px; }
	.stories .story .thumb { grid-row: span 3; }
	.stories .story h3 { font-size: 15px; }
	.post-row { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
	.post-row h2 { font-size: 16px; margin-top: 2px; }
	.post-row p { display: none; }
	.hero { min-height: 320px; }
	.hero-copy { padding: 20px; }
	.brand img { height: 42px; }
	.site-header .wrap { flex-wrap: wrap; gap: 6px 12px; padding-block: 8px 4px; }
	.main-nav { order: 3; flex-basis: 100%; margin-inline: -6px; }
	.header-tools { margin-left: auto; }
	.entry-content { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
