/*
Theme Name: Jour2Foot
Theme URI: https://jour2foot.com/
Author: Jour2Foot
Description: Thème sur mesure de jour2foot.com : matchs du jour, scores en direct, classements, actus et blog.
Version: 1.0.8
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: jour2foot
*/
/* Jour2Foot — feuille de style (v2 : accueil centré sur les matchs + fil info) */
:root {
  --bg: #f1f3f6;
  --bg-2: #ffffff;
  --card: #ffffff;
  --soft: #f5f7fa;
  --line: #e3e7ee;
  --text: #141a26;
  --muted: #667089;
  --accent: #008a52;
  --accent-ink: #ffffff;
  --accent-soft: #e3f5ec;
  --red: #e0393e;
  --blue: #2f80ed;
  --orange: #f2994a;
  --shadow: 0 1px 2px rgba(20, 26, 38, .06);
  --radius: 14px;
  --font-title: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b0f18;
  --bg-2: #121826;
  --card: #151c2c;
  --soft: #1b2436;
  --line: #263149;
  --text: #eef2fb;
  --muted: #94a1bf;
  --accent: #c6ff3d;
  --accent-ink: #0b0f18;
  --accent-soft: #1f2b1a;
  --shadow: none;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-title); line-height: 1.08; margin: 0; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; text-transform: uppercase; }
h2 { font-size: 1.45rem; font-weight: 700; text-transform: uppercase; }
h3 { font-size: 1.25rem; font-weight: 700; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { margin-right: auto; }
.logo img { height: 52px; width: 198px; object-fit: cover; object-position: 30% 50%; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
#nav { display: flex; gap: 2px; }
#nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .93rem; color: var(--muted); }
#nav a:hover { color: var(--text); background: var(--soft); }
#nav a.active { background: var(--accent); color: var(--accent-ink); }
.icon-btn { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 1.05rem; flex: 0 0 auto; }
.burger { display: none; }

/* Mise en page d'accueil : fil info | matchs | classement */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr) 320px; gap: 18px; align-items: start; padding: 20px 0 8px; }
.col { display: grid; gap: 18px; min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1.2rem; }
.panel-foot { display: block; padding: 11px 16px; border-top: 1px solid var(--line); text-align: center; font-weight: 600; font-size: .88rem; color: var(--accent); }
.panel-foot:hover { background: var(--soft); }
.more { color: var(--accent); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.note { color: var(--muted); font-size: .82rem; margin: 10px 0 0; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.soon { display: inline-block; font-size: .72rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }

/* Onglets des jours */
.day-tabs { display: flex; gap: 8px; padding: 12px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.day-tab { flex: 0 0 auto; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 7px 14px; cursor: pointer; text-align: center; line-height: 1.2; }
.day-tab b { display: block; font-family: var(--font-title); font-size: 1.05rem; text-transform: uppercase; }
.day-tab small { color: var(--muted); font-size: .72rem; }
.day-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-tab.on small { color: inherit; opacity: .85; }
.league-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; background: var(--soft); font-weight: 700; font-size: .85rem; border-bottom: 1px solid var(--line); }
.league-row span { color: var(--muted); font-weight: 600; }

/* Lignes de match */
.matches { display: block; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match:hover { background: var(--soft); }
.team { display: flex; align-items: center; gap: 9px; font-weight: 600; min-width: 0; }
.team.home { flex-direction: row-reverse; text-align: right; }
.team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team .rk { color: var(--muted); font-weight: 500; font-size: .78rem; }
.badge { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-title); font-weight: 700; font-size: .68rem; color: #fff; }
.mid { text-align: center; min-width: 78px; }
.time { font-weight: 700; font-size: 1rem; }
.score { font-weight: 800; font-size: 1.05rem; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; display: inline-block; }
.tv { font-size: .68rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }
.live-pill { display: inline-block; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: .06em; margin-top: 3px; }
.day-label { padding: 9px 16px; background: var(--soft); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.empty { padding: 22px 16px; color: var(--muted); text-align: center; }

/* Fil info */
.feed a { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.feed a:last-child { border-bottom: 0; }
.feed a:hover { background: var(--soft); }
.feed time { color: var(--accent); font-weight: 700; font-size: .8rem; line-height: 1.3; }
.feed strong { display: block; font-size: .92rem; line-height: 1.35; }
.feed span { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* Classement */
.table-wrap { overflow-x: auto; }
.page .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 8px; text-align: center; white-space: nowrap; }
th { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--soft); }
td.club, th.club { text-align: left; }
td.club { display: flex; align-items: center; gap: 8px; font-weight: 600; }
td.club .badge { width: 24px; height: 24px; font-size: .56rem; }
td.pts { font-weight: 800; }
td.rank { font-weight: 700; border-left: 4px solid transparent; width: 34px; }
tr.z-ldc td.rank { border-left-color: var(--blue); }
tr.z-ldcq td.rank { border-left-color: #7fbdf5; }
tr.z-el td.rank { border-left-color: var(--orange); }
tr.z-ecl td.rank { border-left-color: #27ae60; }
tr.z-bar td.rank { border-left-color: #f2c94c; }
tr.z-rel td.rank { border-left-color: var(--red); }
table.compact .hide-c { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* Pages intérieures */
.page-head { padding: 26px 0 20px; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 640px; }
.kicker { display: inline-block; margin-bottom: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
section { padding: 0 0 22px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
#fixtures section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; padding: 0; margin-bottom: 18px; }
#fixtures .sec-head { margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); }

/* Cartes blog / médias */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; font-family: var(--font-title); font-weight: 800; font-size: 2.2rem; text-transform: uppercase; color: #fff; text-align: center; padding: 12px; background: linear-gradient(135deg, #0b6b45, #0e1a2e); }
.thumb.t2 { background: linear-gradient(135deg, #24459a, #0e1a2e); }
.thumb.t3 { background: linear-gradient(135deg, #7a2b63, #0e1a2e); }
.thumb.t4 { background: linear-gradient(135deg, #9a6a1c, #0e1a2e); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tag { font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.meta { margin-top: auto; padding-top: 6px; font-size: .78rem; color: var(--muted); }
.embed { aspect-ratio: 16 / 9; width: 100%; border: 0; }

/* Article */
.article { width: min(760px, 100% - 32px); margin: 22px auto 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px clamp(18px, 4vw, 40px) 34px; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 8px 0 12px; }
.article .meta { margin: 0 0 22px; }
.article h2 { font-size: 1.5rem; margin: 30px 0 8px; }
.article p, .article li { font-size: 1.02rem; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.lead { font-size: 1.15rem !important; font-weight: 500; }
.back { color: var(--accent); font-weight: 600; font-size: .92rem; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0; }
.callout p { margin: 0; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; margin-top: 24px; color: var(--muted); font-size: .88rem; }
.foot { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot nav a:hover { color: var(--text); }
.foot small { display: block; margin-top: 8px; max-width: 520px; }

/* Adaptation aux écrans */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .col.left { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .col.left { order: 3; }
  .burger { display: block; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  #nav.open { display: flex; }
  #nav a { padding: 12px 14px; }
  .logo img { height: 44px; width: 168px; }
  .match { padding: 11px 10px; gap: 6px; }
  .mid { min-width: 62px; }
  .team { font-size: .88rem; gap: 6px; }
  .team .rk { display: none; }
  .hide-m { display: none; }
}

/* Barre des championnats */
.leagues { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 0; scrollbar-width: thin; }
.league { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font-weight: 600; font-size: .9rem; cursor: pointer; box-shadow: var(--shadow); }
.league:hover { border-color: var(--accent); }
.league.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.score.live { background: var(--red); border-color: var(--red); color: #fff; }
.pill.red { background: var(--red); color: #fff; }
.page .page-head { padding-top: 18px; }

/* Écussons des clubs (la pastille au sigle reste dessous si l'image ne charge pas) */
.badge-box { position: relative; flex: 0 0 auto; width: 30px; height: 30px; display: inline-block; }
.badge-box .badge { width: 100%; height: 100%; }
.badge-box .crest { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--card); border-radius: 4px; }
.match:hover .crest, tbody tr:hover .crest { background: var(--soft); }
td.club .badge-box { width: 24px; height: 24px; }
td.club .badge-box .badge { font-size: .56rem; }
.league span { font-size: .68rem; font-weight: 700; letter-spacing: .05em; opacity: .65; }

/* Titre d'accueil, texte de présentation et FAQ */
.h1-home { font-size: clamp(1.35rem, 3.2vw, 1.9rem); padding-top: 16px; }
.seo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px clamp(16px, 3vw, 28px); margin-bottom: 22px; }
.seo h2 { font-size: 1.25rem; margin: 18px 0 8px; }
.seo h2:first-child { margin-top: 0; }
.seo p { margin: 0 0 10px; color: var(--muted); max-width: 860px; }
.seo strong { color: var(--text); }
.seo-links, .foot-leagues { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-links a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .88rem; color: var(--text); background: var(--soft); }
.seo-links a:hover { border-color: var(--accent); color: var(--accent); }
.seo details { border-top: 1px solid var(--line); padding: 10px 0; }
.seo summary { cursor: pointer; font-weight: 600; }
.seo details p { margin: 8px 0 0; }
.foot-leagues { margin-top: 8px; gap: 6px 18px; }
a.league { text-decoration: none; }

/* Page d'une actu */
.credit { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 0; margin: 0 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.credit b { color: var(--text); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 11px 18px; border-radius: 999px; }
.btn:hover { filter: brightness(1.08); }
.news-img { width: 100%; height: auto; border-radius: 12px; margin: 6px 0 0; }
.src-link { color: var(--accent); font-weight: 600; text-decoration: underline; }

/* Pied de page : logo et texte de présentation alignés à droite */
.foot > div:first-child { order: 2; margin-left: auto; text-align: right; }
.foot > div:first-child .logo { display: inline-block; margin-right: 0; }
.foot > div:first-child small { margin-left: auto; }

/* Fil info : miniature de la photo */
.feed a.has-pic { grid-template-columns: 76px 1fr; align-items: start; }
.feed-pic { width: 76px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.feed a.has-pic time { display: block; margin-bottom: 2px; }
.feed a.no-pic { grid-template-columns: 1fr; }
.feed a.no-pic time { display: block; margin-bottom: 2px; }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }

/* Menu des compétitions : pays, puis compétitions du pays */
.leagues { display: block; overflow: visible; }
.top-leagues, .sub-leagues { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.league i { font-style: normal; font-size: .68rem; font-weight: 700; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 7px; }
.league.on i { background: rgba(255, 255, 255, .22); color: inherit; }
.sub-leagues { margin-top: 10px; padding-bottom: 2px; border-bottom: 1px solid var(--line); gap: 4px; }
.sub-league { flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font-weight: 600; font-size: .92rem; color: var(--muted); cursor: pointer; text-decoration: none; }
.sub-league:hover { color: var(--text); }
.sub-league.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Lien « Annoncer » du menu */
#nav a.nav-ad { border: 1px solid var(--accent); color: var(--accent); margin-left: 6px; }
#nav a.nav-ad:hover { background: var(--accent-soft); color: var(--accent); }
#nav a.nav-ad.active { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 940px) {
  .burger { display: block; }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
  #nav.open { display: flex; }
  #nav a { padding: 12px 14px; }
  #nav a.nav-ad { margin: 6px 0 0; text-align: center; }
}

/* Ajustements pour WordPress */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.article img { height: auto; }
.article .wp-block-image, .article figure { margin: 18px 0; }
.article figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.article blockquote { border-left: 4px solid var(--accent); margin: 18px 0; padding: 4px 18px; color: var(--muted); }

/* Commentaires sous les actus */
.comments { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.comments h2 { margin: 0 0 12px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 22px; }
.comment-body { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.comment-body p { margin: 6px 0 0; font-size: .97rem; }
.comment-author { font-weight: 700; }
.comment-author .says { display: none; }
.comment-metadata, .comment-metadata a, .reply a { color: var(--muted); font-size: .8rem; }
.comment-awaiting-moderation { display: block; color: var(--muted); font-size: .82rem; font-style: normal; }
.comment-join { background: var(--accent-soft); border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.comment-join p { margin: 0 0 10px; }
.comment-join p:last-child { margin-bottom: 0; }
.comment-respond { margin-top: 18px; }
.comment-reply-title { font-family: var(--font-title); font-size: 1.3rem; text-transform: uppercase; margin: 0 0 8px; }
.comment-respond label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.comment-respond textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; background: var(--card); color: var(--text); }
.comment-respond .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.logged-in-as { color: var(--muted); font-size: .88rem; }

/* Création de compte par code (commentaires) */
#j2f-join label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
#j2f-join input[type=text], #j2f-join input[type=email] { width: 100%; max-width: 360px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--card); color: var(--text); }
#j2f-join .j2f-check label { font-weight: 400; font-size: .86rem; display: block; }
#j2f-join .j2f-check input { margin: 0 6px 0 0; vertical-align: middle; }
#j2f-join .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; margin-right: 10px; }
#j2f-join .btn[disabled] { opacity: .6; cursor: default; }
#j2f-join .j2f-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#j2f-join[data-step="1"] .j2f-step2, #j2f-join[data-step="2"] .j2f-step1 { display: none; }
#j2f-join[data-mode="new"] .j2f-login-only, #j2f-join[data-mode="login"] .j2f-new-only { display: none; }
#j2f-join .j2f-msg { font-weight: 600; font-size: .92rem; min-height: 1.2em; }
#j2f-join .j2f-msg.err { color: var(--red); }
#j2f-join .j2f-msg.ok { color: var(--accent); }
#j2f-code { letter-spacing: .3em; font-weight: 700; font-size: 1.2rem; max-width: 200px !important; }

/* Partage et page Facebook */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-label { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.share-btn { display: inline-block; border: 1px solid var(--line); background: var(--soft); color: var(--text); border-radius: 999px; padding: 8px 15px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; text-decoration: none; }
.share-btn:hover { border-color: var(--accent); }
.share-btn.fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-btn.fb:hover { filter: brightness(1.08); border-color: #1877f2; }
.share-btn.follow { margin-left: auto; color: var(--accent); background: none; border-color: transparent; padding-right: 0; }
.follow-body { padding: 14px 16px 16px; }
.follow-body p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .share-btn.follow { margin-left: 0; padding-left: 0; width: 100%; } }
