/* ============================================================
   AFEBAS THEME — afebas-theme.css
   Thème WordPress autonome — Aucune dépendance externe
   
   TOUTES LES COULEURS VIENNENT DES VARIABLES :root{}
   Ces variables sont injectées dans <head> par functions.php
   selon les choix faits dans Apparence › Personnaliser.
   Ne modifiez pas les valeurs ici — utilisez le Customizer.
   ============================================================ */

/* ── Variables par défaut (remplacées par le Customizer) ── */
:root {
  --afb-primary:        #0d6b35;
  --afb-primary-mid:    #1a8a45;
  --afb-primary-light:  #22a855;
  --afb-primary-glow:   rgba(13,107,53,0.32);
  --afb-primary-bg:     rgba(13,107,53,0.09);
  --afb-accent:         #f5c400;
  --afb-alert:          #cc2200;
  --afb-dark:           #080e08;
  --afb-dark-mid:       #111811;
  --afb-dark-card:      #1a221a;
  --afb-teams:          #e65100;
  --afb-teams-bg:       rgba(230,81,0,0.08);
  --afb-header-bg:      #080e08;
  --afb-body-bg:        #eef2ee;
  --afb-text:           #1a1a1a;
  --afb-muted:          #7a9080;
  --afb-border:         #e0e0de;
  --afb-white:          #ffffff;
  --afb-font-display:   'Barlow Condensed','Arial Narrow',sans-serif;
  --afb-font-body:      'Inter','Helvetica Neue',Arial,sans-serif;
  --afb-radius:         8px;
  --afb-radius-lg:      13px;
  --afb-shadow:         0 2px 10px rgba(0,0,0,0.07);
  --afb-shadow-md:      0 6px 22px rgba(0,0,0,0.13);
  --afb-transition:     0.2s ease;
}

/* ── Reset complet (pas de dépendance normalize/reset externe) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--afb-font-body);
  background: var(--afb-body-bg);
  color: var(--afb-text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--afb-primary); text-decoration: none; transition: color var(--afb-transition); }
a:hover { color: var(--afb-primary-mid); }
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; color: var(--afb-text); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.afb-topbar {
  background: var(--afb-dark);
  border-bottom: 2px solid var(--afb-primary);
  height: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  font-size: 11px; font-family: var(--afb-font-body); color: var(--afb-muted);
  position: relative; z-index: 200;
}
.afb-topbar__info { display: flex; align-items: center; gap: 20px; }
.afb-topbar__info span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.afb-topbar__dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--afb-primary-light); flex-shrink: 0;
  animation: afb-blink 2s ease-in-out infinite;
}
@keyframes afb-blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.afb-topbar__socials { display: flex; align-items: center; gap: 6px; }
.afb-topbar__social {
  width: 22px; height: 22px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--afb-muted);
  transition: all var(--afb-transition);
}
.afb-topbar__social:hover { background: var(--afb-primary); border-color: var(--afb-primary); color: var(--afb-white); }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.afb-header {
  background: var(--afb-header-bg);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--afb-primary-glow);
}
.afb-header__inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 72px; gap: 16px;
}
.afb-header__brand {
  display: flex; align-items: center; gap: 0; flex-shrink: 0; text-decoration: none;
}

/* Logo image (custom logo WordPress) */
.afb-header__brand .custom-logo-link { display: flex; align-items: center; }
.afb-header__brand .custom-logo,
.afb-header__brand img {
  max-height: 44px !important; width: auto !important;
  max-width: 220px !important; object-fit: contain !important;
  display: block !important; border-radius: 6px !important;
}
.afb-header__text-logo {
  font-family: var(--afb-font-display); font-weight: 900; font-size: 26px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--afb-white);
  text-decoration: none;
}

/* Tagline à droite du logo */
.afb-logo-tagline {
  margin-left: 14px; padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-direction: column;
}
.afb-logo-tagline__l1 {
  font-family: var(--afb-font-display); font-weight: 800; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--afb-white); line-height: 1;
}
.afb-logo-tagline__l2 {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--afb-muted); font-weight: 500; margin-top: 3px; line-height: 1;
}

/* Navigation */
.afb-nav { display: flex; align-items: center; gap: 4px; }
.afb-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.afb-nav__list li { position: relative; }
.afb-nav__list li a {
  font-family: var(--afb-font-body); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: rgba(255,255,255,0.7); padding: 7px 11px; border-radius: 5px;
  display: block; transition: all var(--afb-transition); white-space: nowrap;
}
.afb-nav__list li a:hover { color: var(--afb-accent); background: rgba(255,255,255,0.05); }
.afb-nav__list li.current-menu-item>a,
.afb-nav__list li.current_page_item>a { color: var(--afb-primary-light); background: var(--afb-primary-bg); }

/* Sous-menus */
.afb-nav__list ul {
  display: none; position: absolute; top: 100%; left: 0; z-index: 200;
  background: var(--afb-dark-mid); min-width: 200px;
  border: 1px solid var(--afb-primary-glow); border-top: 2px solid var(--afb-primary);
  border-radius: 0 0 8px 8px; box-shadow: 0 14px 36px rgba(0,0,0,0.45);
  padding: 4px 0;
}
.afb-nav__list li:hover > ul { display: block; }
.afb-nav__list ul li a {
  font-size: 11px !important; color: rgba(255,255,255,0.6) !important;
  padding: 8px 16px !important; border-radius: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.afb-nav__list ul li:last-child a { border-bottom: none; }
.afb-nav__list ul li a:hover { color: var(--afb-accent) !important; background: var(--afb-primary-bg) !important; }

/* Bouton CTA dans la nav */
.afb-nav__cta {
  background: var(--afb-primary); color: var(--afb-white) !important;
  font-family: var(--afb-font-body); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 8px 16px; border-radius: 6px; margin-left: 6px;
  border: 1px solid var(--afb-primary-mid);
  transition: background var(--afb-transition); white-space: nowrap;
  text-decoration: none;
}
.afb-nav__cta:hover { background: var(--afb-primary-mid); color: var(--afb-white) !important; }

/* Burger mobile */
.afb-nav__toggle {
  display: none; flex-direction: column; justify-content: space-between;
  width: 26px; height: 18px; padding: 0; margin-left: 8px;
}
.afb-nav__toggle span {
  display: block; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px;
  transition: all var(--afb-transition);
}

/* ============================================================
   TICKER RÉSULTATS
   ============================================================ */
.afb-ticker {
  background: var(--afb-dark-card);
  border-top: 2px solid var(--afb-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex; align-items: center;
  height: 38px; overflow: hidden; padding: 0 16px;
}
.afb-ticker__label {
  background: var(--afb-primary); color: var(--afb-white);
  font-family: var(--afb-font-display); font-weight: 800; font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 4px;
  flex-shrink: 0; margin-right: 18px; white-space: nowrap;
}
.afb-ticker__track { flex: 1; overflow: hidden; }
.afb-ticker__inner {
  display: flex; white-space: nowrap;
  animation: afb-scroll 42s linear infinite;
}
.afb-ticker__inner:hover { animation-play-state: paused; }
@keyframes afb-scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.afb-ticker__item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 26px; font-size: 12px; font-family: var(--afb-font-body);
  color: rgba(255,255,255,0.62); border-right: 1px solid rgba(255,255,255,0.07); white-space: nowrap;
}
.afb-ticker__item strong { color: var(--afb-accent); font-weight: 700; }
.afb-ticker__cat {
  background: var(--afb-primary-bg); color: var(--afb-primary-light);
  font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.afb-hero {
  background: var(--afb-dark-card);
  position: relative; overflow: hidden;
  min-height: 440px; display: flex; align-items: center;
}
.afb-hero::before {
  content:''; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse 75% 90% at 68% 50%, var(--afb-primary-glow) 0%, transparent 60%),
    radial-gradient(ellipse 45% 60% at 5% 90%, rgba(245,196,0,0.05) 0%, transparent 50%),
    repeating-linear-gradient(0deg,   transparent 0,transparent 44px,rgba(255,255,255,.007) 44px,rgba(255,255,255,.007) 45px),
    repeating-linear-gradient(90deg,  transparent 0,transparent 44px,rgba(255,255,255,.007) 44px,rgba(255,255,255,.007) 45px);
}
.afb-hero__ball {
  position:absolute; right:80px; top:50%; transform:translateY(-50%);
  width:320px; height:320px; border-radius:50%; opacity:0.3;
  background:radial-gradient(circle at 38% 35%,rgba(50,50,50,.88) 0%,rgba(10,10,10,.95) 60%,#000 100%);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 80px rgba(0,0,0,.6),inset 0 8px 20px rgba(255,255,255,.07);
}
.afb-hero__ball-num {
  font-family:var(--afb-font-display); font-size:120px; font-weight:900;
  color:rgba(255,255,255,0.1); letter-spacing:-4px;
}
.afb-hero__ball-y {
  position:absolute; right:420px; bottom:40px; width:78px; height:78px;
  border-radius:50%; opacity:0.45;
  background:radial-gradient(circle at 34% 30%,#fff9cc,var(--afb-accent) 50%,#a07a00);
  box-shadow:0 8px 28px rgba(245,196,0,0.22);
}
.afb-hero__ball-r {
  position:absolute; right:310px; top:50px; width:54px; height:54px;
  border-radius:50%; opacity:0.4;
  background:radial-gradient(circle at 34% 30%,#ffaaaa,var(--afb-alert) 50%,#700);
  box-shadow:0 6px 20px rgba(204,34,0,.28);
}
.afb-hero__colorline {
  position:absolute; bottom:0; left:0; width:100%; height:3px;
  background:linear-gradient(90deg,var(--afb-primary) 0%,var(--afb-accent) 35%,var(--afb-alert) 65%,transparent 100%);
}
.afb-hero__inner { position:relative; z-index:2; padding:60px 48px; max-width:660px; }

.afb-hero__badge {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--afb-primary-bg); border:1px solid var(--afb-primary-glow);
  border-radius:100px; padding:5px 14px; margin-bottom:20px;
  font-size:10px; font-weight:700; letter-spacing:0.15em; text-transform:uppercase;
  color:var(--afb-primary-light); font-family:var(--afb-font-body);
}
.afb-hero__pulse {
  width:6px; height:6px; border-radius:50%; background:var(--afb-primary-light); flex-shrink:0;
  animation:afb-blink 1.8s ease-in-out infinite;
}
.afb-hero__title {
  font-family:var(--afb-font-display) !important;
  font-size:clamp(46px,6.5vw,74px); font-weight:900; line-height:0.93;
  letter-spacing:1px; text-transform:uppercase; color:var(--afb-white); margin:0;
}
.afb-hero__title .line-1     { display:block; }
.afb-hero__title .line-accent  { display:block; color:var(--afb-accent); }
.afb-hero__title .line-primary { color:var(--afb-primary-light); }
.afb-hero__subtitle {
  font-size:14px; color:rgba(255,255,255,0.45); margin:18px 0 30px;
  max-width:430px; line-height:1.7; font-family:var(--afb-font-body);
}
.afb-hero__actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.afb-hero__stats {
  display:flex; gap:30px; flex-wrap:wrap;
  margin-top:38px; padding-top:30px; border-top:1px solid rgba(255,255,255,0.07);
}
.afb-stat__num { font-family:var(--afb-font-display); font-size:30px; font-weight:800; line-height:1; display:block; margin-bottom:4px; }
.afb-stat__num--accent  { color:var(--afb-accent); }
.afb-stat__num--primary { color:var(--afb-primary-light); }
.afb-stat__num--alert   { color:#e05050; }
.afb-stat__lbl { font-size:9.5px; font-weight:600; text-transform:uppercase; letter-spacing:0.1em; color:rgba(255,255,255,0.28); display:block; }

/* ── Boutons globaux ───────────────────────────────────── */
.afb-btn-primary {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--afb-primary); color:var(--afb-white) !important;
  font-family:var(--afb-font-body); font-weight:700; font-size:12.5px;
  letter-spacing:0.06em; text-transform:uppercase; text-decoration:none !important;
  padding:13px 24px; border-radius:7px; border:1px solid var(--afb-primary-mid);
  transition:all var(--afb-transition); box-shadow:0 4px 18px var(--afb-primary-glow);
}
.afb-btn-primary:hover { background:var(--afb-primary-mid); transform:translateY(-2px); }
.afb-btn-secondary {
  display:inline-flex; align-items:center; gap:8px; background:transparent;
  border:1px solid rgba(255,255,255,0.18); color:rgba(255,255,255,0.65) !important;
  font-family:var(--afb-font-body); font-weight:600; font-size:12.5px;
  text-decoration:none !important; padding:13px 24px; border-radius:7px;
  transition:all var(--afb-transition);
}
.afb-btn-secondary:hover { border-color:rgba(255,255,255,0.45); color:var(--afb-white) !important; }

/* ============================================================
   PORTAIL DEUX UNIVERS
   ============================================================ */
.afb-universe-nav { display:grid; grid-template-columns:1fr 1fr; gap:3px; }
.afb-universe-btn {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:22px 20px; text-decoration:none !important;
  font-family:var(--afb-font-display); font-weight:900;
  font-size:clamp(16px,2.5vw,24px); text-transform:uppercase; letter-spacing:0.06em;
  color:var(--afb-white) !important; transition:filter var(--afb-transition);
}
.afb-universe-btn--indiv  { background:var(--afb-primary); }
.afb-universe-btn--indiv:hover  { filter:brightness(1.12); }
.afb-universe-btn--equipe { background:var(--afb-teams); }
.afb-universe-btn--equipe:hover { filter:brightness(1.12); }
.afb-universe-btn__icon { font-size:32px; margin-bottom:6px; display:block; }
.afb-universe-btn__sub  { font-size:11px; font-weight:400; opacity:0.75; display:block; margin-top:3px; font-family:var(--afb-font-body); text-transform:none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.afb-container { max-width:1200px; margin:0 auto; padding:0 20px; }
.afb-content-area { padding:32px 0; }
.afb-layout { display:grid; grid-template-columns:1fr 320px; gap:24px; align-items:start; }

.afb-section { margin-bottom:32px; }
.afb-section-head {
  display:flex; align-items:center; gap:10px; margin-bottom:16px;
  padding-bottom:12px; border-bottom:1px solid var(--afb-border); flex-wrap:wrap;
}
.afb-section-head__bar { width:4px; height:20px; background:var(--afb-primary); border-radius:2px; flex-shrink:0; }
.afb-section-head__bar--teams { background:var(--afb-teams); }
.afb-section-head__title { font-family:var(--afb-font-display); font-weight:800; font-size:16px; letter-spacing:0.08em; text-transform:uppercase; color:var(--afb-primary); }
.afb-section-head__link  { font-size:12px; color:var(--afb-primary); font-weight:700; text-decoration:none; margin-left:auto; }

/* ── Page header ────────────────────────────────────────── */
.afb-page-header { margin-bottom:28px; padding-bottom:16px; border-bottom:1px solid var(--afb-border); }
.afb-page-title  { font-family:var(--afb-font-display); font-size:32px; font-weight:900; letter-spacing:0.06em; text-transform:uppercase; color:var(--afb-primary); }

/* ── Article / blog ─────────────────────────────────────── */
.afb-article { background:var(--afb-white); border-radius:var(--afb-radius-lg); overflow:hidden; box-shadow:var(--afb-shadow); }
.afb-article__thumb img { width:100%; max-height:420px; object-fit:cover; }
.afb-article__header { padding:28px 28px 0; }
.afb-article__title  { font-family:var(--afb-font-display); font-size:30px; font-weight:900; letter-spacing:0.03em; text-transform:uppercase; color:var(--afb-text); margin:8px 0; }
.afb-article__meta   { font-size:12px; color:#aaa; margin-bottom:16px; display:flex; gap:12px; flex-wrap:wrap; }
.afb-article__content { padding:20px 28px 28px; font-size:15px; line-height:1.8; }
.afb-article__content h2 { font-family:var(--afb-font-display); font-size:22px; font-weight:800; text-transform:uppercase; color:var(--afb-primary); margin:28px 0 12px; }
.afb-article__content h3 { font-size:18px; font-weight:700; color:var(--afb-text); margin:20px 0 10px; }
.afb-article__content a  { color:var(--afb-primary); text-decoration:underline; }
.afb-article__footer { padding:16px 28px; border-top:1px solid var(--afb-border); }
.afb-post-nav { display:flex; justify-content:space-between; margin-top:24px; font-size:13px; font-weight:600; }

/* Post card blog */
.afb-posts-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.afb-post-card { background:var(--afb-white); border-radius:var(--afb-radius-lg); overflow:hidden; box-shadow:var(--afb-shadow); transition:transform var(--afb-transition),box-shadow var(--afb-transition); }
.afb-post-card:hover { transform:translateY(-3px); box-shadow:var(--afb-shadow-md); }
.afb-post-card__thumb img { width:100%; height:180px; object-fit:cover; }
.afb-post-card__body { padding:16px; }
.afb-post-card__cats a { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--afb-primary); }
.afb-post-card__title { font-family:var(--afb-font-display); font-size:17px; font-weight:800; text-transform:uppercase; margin:4px 0 6px; }
.afb-post-card__title a { color:var(--afb-text); }
.afb-post-card__title a:hover { color:var(--afb-primary); }
.afb-post-card__meta { font-size:11px; color:#aaa; margin-bottom:10px; }
.afb-post-card__excerpt { font-size:13px; color:#666; margin-bottom:12px; }

/* Actualités homepage */
.afb-news-item { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--afb-border); }
.afb-news-item:last-child { border-bottom:none; }
.afb-news-item__title { font-family:var(--afb-font-display); font-size:18px; font-weight:800; text-transform:uppercase; margin:0 0 4px; }
.afb-news-item__title a { color:var(--afb-text); }
.afb-news-item__title a:hover { color:var(--afb-primary); }
.afb-news-item__meta { font-size:11px; color:#aaa; margin-bottom:6px; }
.afb-news-item__excerpt { font-size:13px; color:#666; }

/* ============================================================
   CARTES TOURNOIS
   ============================================================ */
.afb-cards-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.afb-card {
  background:var(--afb-white); border-radius:var(--afb-radius-lg); overflow:hidden;
  box-shadow:var(--afb-shadow); border:1px solid rgba(0,0,0,0.06);
  display:flex; flex-direction:column;
  transition:transform var(--afb-transition),box-shadow var(--afb-transition);
}
.afb-card:hover { transform:translateY(-3px); box-shadow:var(--afb-shadow-md); }
.afb-card__head { background:var(--afb-primary); padding:9px 13px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.afb-card__head--dark   { background:#0a3a1a; }
.afb-card__head--teams  { background:var(--afb-teams); }
.afb-card__date  { font-family:var(--afb-font-display); font-weight:800; font-size:13px; color:var(--afb-accent); text-transform:uppercase; white-space:nowrap; }
.afb-card__badge { font-size:9px; font-weight:700; padding:2px 7px; border-radius:100px; background:rgba(255,255,255,0.15); color:rgba(255,255,255,0.75); text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; }
.afb-card__badge--accent { background:rgba(245,196,0,0.18); color:var(--afb-accent); border:1px solid rgba(245,196,0,0.3); }
.afb-card__body { padding:11px 13px; flex:1; }
.afb-card__nom  { font-family:var(--afb-font-display); font-weight:700; font-size:14px; letter-spacing:0.03em; text-transform:uppercase; color:var(--afb-text); margin:0 0 5px; line-height:1.3; }
.afb-card__meta { display:flex; flex-wrap:wrap; gap:5px 10px; font-size:11.5px; color:#888; }
.afb-card__meta-item { display:flex; align-items:center; gap:3px; }
.afb-card__foot { padding:7px 13px 10px; background:#f8f9f7; border-top:1px solid #eee; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.afb-card__places { flex:1; }
.afb-progress-wrap { height:3px; background:#ddd; border-radius:2px; overflow:hidden; margin-bottom:4px; }
.afb-progress-bar  { height:100%; background:var(--afb-primary); border-radius:2px; }
.afb-card__places-txt { font-size:10.5px; color:#888; display:block; }
.afb-card__places-txt--full { color:var(--afb-alert); font-weight:700; }
.afb-card__cta {
  display:inline-flex; align-items:center; gap:4px;
  background:var(--afb-primary); color:var(--afb-white) !important;
  font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em;
  padding:6px 14px; border-radius:6px; text-decoration:none !important;
  white-space:nowrap; flex-shrink:0; transition:background var(--afb-transition);
}
.afb-card__cta:hover { background:var(--afb-primary-mid); }
.afb-card__cta--disabled { background:#bbb; pointer-events:none; }
.afb-rang { display:inline-block; padding:1px 7px; border-radius:100px; font-size:10px; font-weight:700; color:var(--afb-white); vertical-align:middle; }

/* ============================================================
   SIDEBAR & WIDGETS
   ============================================================ */
.afb-sidebar .afb-widget,
.afb-widget {
  background:var(--afb-white); border-radius:var(--afb-radius-lg); overflow:hidden;
  margin-bottom:18px; box-shadow:var(--afb-shadow); border:1px solid rgba(0,0,0,0.05);
}
.afb-widget__title {
  background:var(--afb-dark) !important; padding:9px 15px !important; margin:0 !important;
  display:flex !important; align-items:center !important; gap:8px !important;
  border-bottom:2px solid var(--afb-primary) !important;
  font-family:var(--afb-font-display) !important; font-weight:800 !important;
  font-size:12px !important; letter-spacing:0.1em !important; text-transform:uppercase !important;
  color:var(--afb-accent) !important;
}
.afb-widget__body { padding:8px 14px; }
.afb-rank-row { display:flex; align-items:center; gap:9px; padding:6px 0; border-bottom:1px solid #f0f0f0; font-size:13px; }
.afb-rank-row:last-child { border-bottom:none; }
.afb-rank-n { font-family:var(--afb-font-display); font-weight:800; font-size:15px; color:var(--afb-primary); width:22px; text-align:center; flex-shrink:0; }
.afb-rank-n--gold { color:var(--afb-accent); }
.afb-rank-name { flex:1; font-weight:600; color:var(--afb-text); }
.afb-rank-pts  { font-family:var(--afb-font-display); font-weight:700; font-size:14px; color:var(--afb-primary-mid); }
.afb-result-item { padding:7px 0; border-bottom:1px solid #f0f0f0; }
.afb-result-item:last-child { border-bottom:none; }
.afb-result-date   { font-size:10px; color:#aaa; display:block; margin-bottom:2px; }
.afb-result-winner { font-weight:700; font-size:13px; }

/* ============================================================
   TABLEAUX
   ============================================================ */
.afb-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:16px; border-radius:var(--afb-radius); box-shadow:var(--afb-shadow); }
.afb-table { width:100%; border-collapse:collapse; font-size:13px; background:var(--afb-white); }
.afb-table thead tr { background:var(--afb-primary); color:var(--afb-white); }
.afb-table--teams thead tr { background:var(--afb-teams); }
.afb-table th { padding:10px 13px; text-align:left; font-size:10.5px; font-weight:800; letter-spacing:0.07em; text-transform:uppercase; white-space:nowrap; }
.afb-table td { padding:9px 13px; border-bottom:1px solid #f0f0f0; vertical-align:middle; }
.afb-table tbody tr:hover { background:var(--afb-primary-bg); }
.afb-table tbody tr:last-child td { border-bottom:none; }
.afb-table .tc { text-align:center; }
.afb-table .tw { font-weight:700; }
.afb-table tr.afb-row--gold td { background:rgba(245,196,0,0.06) !important; border-left:3px solid var(--afb-accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.afb-footer {
  background:var(--afb-dark); color:rgba(255,255,255,0.45);
  border-top:3px solid var(--afb-primary); padding-top:0; margin-top:0;
}
.afb-footer__colorbar {
  height:3px; border-radius:0; margin-bottom:40px;
  background:linear-gradient(90deg,var(--afb-primary) 0%,var(--afb-accent) 40%,var(--afb-alert) 70%,transparent 100%);
}
.afb-footer__grid {
  max-width:1200px; margin:0 auto 32px; display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr; gap:36px; padding:0 28px;
}
.afb-footer__brand {}
.afb-footer__logo .custom-logo { max-height:38px; width:auto; opacity:0.85; margin-bottom:12px; }
.afb-footer__logo-text { font-family:var(--afb-font-display); font-size:22px; font-weight:900; color:var(--afb-white); letter-spacing:0.1em; text-transform:uppercase; margin-bottom:12px; }
.afb-footer__desc { font-size:12px; line-height:1.7; max-width:240px; margin-bottom:14px; }
.afb-footer__socials { display:flex; gap:8px; flex-wrap:wrap; }
.afb-footer__social {
  width:28px; height:28px; border-radius:6px;
  background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.1);
  display:inline-flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; color:rgba(255,255,255,0.5);
  transition:all var(--afb-transition);
}
.afb-footer__social:hover { background:var(--afb-primary); border-color:var(--afb-primary); color:var(--afb-white); }
.afb-footer__col { }
.afb-footer__col h4 { font-family:var(--afb-font-display); font-weight:800; font-size:11px; letter-spacing:0.13em; text-transform:uppercase; color:var(--afb-primary-light); margin-bottom:12px; }
.afb-footer__menu li a { display:block; font-size:12px; color:rgba(255,255,255,0.4); margin-bottom:6px; transition:color var(--afb-transition); }
.afb-footer__menu li a:hover { color:var(--afb-accent); }
.afb-footer__col .afb-widget__title { background:transparent !important; color:var(--afb-primary-light) !important; border:none !important; padding:0 0 8px !important; font-size:11px !important; }
.afb-footer__bottom {
  max-width:1200px; margin:0 auto; padding:16px 28px 20px;
  border-top:1px solid rgba(255,255,255,0.07);
  display:flex; justify-content:space-between; align-items:center;
  font-size:11px; flex-wrap:wrap; gap:8px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.afb-pagination { margin-top:32px; text-align:center; }
.afb-pagination .page-numbers { display:inline-flex; gap:6px; flex-wrap:wrap; justify-content:center; list-style:none; }
.afb-pagination a.page-numbers, .afb-pagination span.page-numbers {
  display:inline-block; padding:8px 14px; border-radius:6px;
  font-size:13px; font-weight:600; border:1px solid var(--afb-border); color:var(--afb-text);
  transition:all var(--afb-transition);
}
.afb-pagination a.page-numbers:hover { background:var(--afb-primary); color:var(--afb-white); border-color:var(--afb-primary); }
.afb-pagination .current { background:var(--afb-primary) !important; color:var(--afb-white) !important; border-color:var(--afb-primary) !important; }

/* Recherche */
.search-form { display:flex; gap:8px; margin-top:16px; }
.search-form input { flex:1; padding:10px 14px; border:1px solid var(--afb-border); border-radius:6px; font-family:var(--afb-font-body); }
.search-form button { background:var(--afb-primary); color:var(--afb-white); padding:10px 18px; border-radius:6px; font-weight:700; }

/* États vides */
.afb-empty { text-align:center; padding:44px 20px; background:#f8f9f7; border-radius:var(--afb-radius-lg); border:1px dashed var(--afb-border); color:#999; }
.afb-empty__icon { font-size:40px; display:block; margin-bottom:12px; }

/* ============================================================
   FILTRES
   ============================================================ */
.afb-filters { margin-bottom:18px; }
.afb-filters__row { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:7px; }
.afb-filter {
  display:inline-block; padding:5px 13px; border:1px solid var(--afb-primary);
  border-radius:100px; background:var(--afb-white); color:var(--afb-primary);
  font-size:11.5px; font-weight:600; text-decoration:none; cursor:pointer;
  transition:all var(--afb-transition); white-space:nowrap;
}
.afb-filter:hover, .afb-filter--active { background:var(--afb-primary); color:var(--afb-white); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:900px) {
  .afb-layout { grid-template-columns:1fr; }
  .afb-footer__grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
  .afb-header__inner { padding:0 16px; height:60px; }
  .afb-header__brand .custom-logo { max-height:34px !important; }
  .afb-logo-tagline { display:none; }
  .afb-topbar { padding:0 16px; }
  .afb-topbar__event { display:none; }
  .afb-nav__toggle { display:flex; }
  .afb-nav .afb-nav__list { display:none; }
  .afb-nav .afb-nav__list.is-open {
    display:flex; flex-direction:column; position:fixed;
    top:92px; left:0; right:0; background:var(--afb-dark-mid);
    border-top:2px solid var(--afb-primary); padding:12px 0;
    box-shadow:0 10px 30px rgba(0,0,0,0.5); z-index:99;
  }
  .afb-nav__cta { display:none; }
  .afb-hero__ball, .afb-hero__ball-y, .afb-hero__ball-r { display:none; }
  .afb-hero__inner { padding:32px 20px; }
  .afb-hero__title { font-size:clamp(36px,10vw,56px) !important; }
  .afb-universe-nav { grid-template-columns:1fr; gap:2px; }
  .afb-ticker { display:none; }
  .afb-cards-grid { grid-template-columns:1fr; }
  .afb-posts-grid { grid-template-columns:1fr; }
}
@media (max-width:480px) {
  .afb-hero__actions { flex-direction:column; }
  .afb-btn-primary, .afb-btn-secondary { width:100%; justify-content:center; }
  .afb-hero__stats { gap:16px; }
  .afb-footer__grid { grid-template-columns:1fr; }
}
/* RESET COMPLET dans le scope .afc19 */
.afc19,
.afc19 *,
.afc19 *::before,
.afc19 *::after {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  text-decoration: none !important;
  list-style: none !important;
  font-style: normal !important;
  line-height: 1.4 !important;
}

.afc19 {
  --g:   #1db954;
  --glo: rgba(29,185,84,0.13);
  --dk:  #0e1117;
  --cd:  #141921;
  --br:  rgba(29,185,84,0.16);
  --tx:  #dde4ee;
  --mu:  #6b7690;
  --go:  #f0c040;
  --si:  #b8c4d4;
  --bz:  #d4835a;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
  font-size: 15px !important;
  background: var(--dk) !important;
  color: var(--tx) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  padding-bottom: 50px !important;
  width: 100% !important;
  display: block !important;
}

/* ── HERO ── */
.afc19-hero {
  position: relative !important;
  text-align: center !important;
  padding: 60px 20px 44px !important;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(29,185,84,0.17) 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(29,185,84,0.04) 40px) !important;
  display: block !important;
}
.afc19-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid rgba(29,185,84,0.35) !important;
  border-radius: 100px !important;
  padding: 5px 16px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--g) !important;
  margin-bottom: 18px !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
  background: rgba(29,185,84,0.08) !important;
}
.afc19-tag::before {
  content: '●' !important;
  font-size: 7px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.afc19-h1 {
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: clamp(38px, 8vw, 86px) !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  line-height: 1 !important;
  color: #ffffff !important;
  text-transform: uppercase !important;
  display: block !important;
  margin-bottom: 0 !important;
}
.afc19-h1-em {
  color: var(--g) !important;
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: inherit !important;
  font-weight: 700 !important;
}
.afc19-yr {
  display: block !important;
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: clamp(70px, 16vw, 160px) !important;
  font-weight: 700 !important;
  line-height: 0.88 !important;
  color: transparent !important;
  -webkit-text-stroke: 1px rgba(29,185,84,0.18) !important;
  letter-spacing: 6px !important;
  user-select: none !important;
  margin-top: -4px !important;
}
.afc19-sub {
  display: block !important;
  font-size: 12px !important;
  color: var(--mu) !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  margin-top: 12px !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}

/* ── SECTION HEADER ── */
.afc19-sec {
  max-width: 1260px !important;
  margin: 48px auto 18px !important;
  padding: 0 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.afc19-sh {
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: var(--g) !important;
  white-space: nowrap !important;
  display: block !important;
}
.afc19-ln {
  flex: 1 !important;
  height: 1px !important;
  background: linear-gradient(90deg, var(--br), transparent) !important;
  display: block !important;
}

/* ── GRID ── */
.afc19-grid {
  max-width: 1260px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 18px !important;
}

/* ── CARD ── */
.afc19-card {
  background: var(--cd) !important;
  border: 1px solid var(--br) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  display: block !important;
  transition: transform .3s ease, box-shadow .3s ease !important;
  cursor: default !important;
}
.afc19-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(29,185,84,.22) !important;
}

/* PHOTO */
.afc19-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9 !important;
  object-fit: cover !important;
  display: block !important;
  filter: brightness(.88) saturate(.9) !important;
  transition: filter .4s !important;
  border-radius: 0 !important;
  max-width: 100% !important;
}
.afc19-card:hover .afc19-img {
  filter: brightness(1) saturate(1.05) !important;
}

/* CARD HEAD */
.afc19-head {
  padding: 14px 18px 12px !important;
  border-bottom: 1px solid var(--br) !important;
  background: linear-gradient(135deg, rgba(29,185,84,.07) 0%, transparent 55%) !important;
  display: block !important;
}
.afc19-cat {
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  color: var(--g) !important;
  opacity: .75 !important;
  display: block !important;
  margin-bottom: 3px !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}
.afc19-tit {
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  letter-spacing: .5px !important;
  display: block !important;
  line-height: 1.1 !important;
}

/* ROWS */
.afc19-body { padding: 4px 0 !important; display: block !important; }

.afc19-row {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  padding: 8px 18px !important;
  border-bottom: 1px solid rgba(29,185,84,.06) !important;
  transition: background .2s !important;
}
.afc19-row:last-child { border-bottom: none !important; }
.afc19-row:hover { background: rgba(29,185,84,.05) !important; }
.afc19-win { background: rgba(240,192,64,.05) !important; }

.afc19-bx {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  flex-shrink: 0 !important;
}
.afc19-bx.bg { background: rgba(240,192,64,.15) !important; }
.afc19-bx.bs { background: rgba(184,196,212,.12) !important; }
.afc19-bx.bh {
  background: rgba(212,131,90,.11) !important;
  color: var(--bz) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  font-family: 'Oswald','Impact',sans-serif !important;
}
.afc19-bx.bq {
  background: rgba(255,255,255,.05) !important;
  color: var(--mu) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  font-family: 'Oswald','Impact',sans-serif !important;
}

.afc19-nfo { flex: 1 !important; min-width: 0 !important; display: block !important; overflow: hidden !important; }
.afc19-pos {
  font-size: 8px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--mu) !important;
  display: block !important;
  margin-bottom: 1px !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}
.afc19-nm {
  font-weight: 700 !important;
  font-size: 13px !important;
  color: var(--tx) !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}
.afc19-win .afc19-nm { color: #ffffff !important; }
.afc19-cl {
  font-size: 10.5px !important;
  color: var(--mu) !important;
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}

/* FOOTER */
.afc19-foot {
  max-width: 1260px !important;
  margin: 48px auto 0 !important;
  padding: 22px 20px !important;
  border-top: 1px solid var(--br) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
.afc19-fbr {
  font-family: 'Oswald','Impact',Arial,sans-serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: var(--g) !important;
  display: block !important;
}
.afc19-ftx {
  font-size: 11px !important;
  color: var(--mu) !important;
  letter-spacing: 1px !important;
  display: block !important;
  font-family: 'Nunito','Segoe UI',Arial,sans-serif !important;
}

@media(max-width:600px){
  .afc19-grid { grid-template-columns: 1fr !important; }
  .afc19-sec  { margin-top: 32px !important; }
}






/* 1) Le conteneur ne doit jamais dépasser l'écran */
.afb-container,
.afb-content-area,
.afb-layout,
.afb-main,
.afb-sidebar {
  max-width: 100%;
}

/* 2) Flex/Grid : autoriser la réduction (sinon ça déborde) */
.afb-layout { min-width: 0; }
.afb-main, .afb-sidebar { min-width: 0; }

/* 3) Médias : jamais plus large que le parent */
img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* 4) Gutenberg : certains blocs débordent (alignwide/full, figures, tables) */
.wp-block,
.wp-block-group,
.wp-block-columns,
.wp-block-table,
figure {
  max-width: 100%;
}

/* 5) Tables : si trop large, on scroll à l'intérieur (pas sur la page) */
.wp-block-table,
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 6) Longs textes/liens : forcer le retour à la ligne */
.afb-main, .afb-static-content, .entry-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 7) Code/pre : c’est souvent LE coupable */
pre, code {
  max-width: 100%;
  overflow-x: auto;
}

*[style*="100vw"], .alignfull {
  max-width: 100%;
}

/* FULL WIDTH GLOBAL */
.afb-header__inner,
.afb-container,
.afb-footer__grid,
.afb-footer__bottom {
  max-width: none !important;
  width: 100% !important;
}

/* Conserver un padding confortable (sinon c’est collé aux bords) */
.afb-header__inner,
.afb-container,
.afb-footer__grid,
.afb-footer__bottom {
  padding-left: clamp(14px, 2.5vw, 34px) !important;
  padding-right: clamp(14px, 2.5vw, 34px) !important;
}

/* Layout : sidebar fixe OK, mais éviter qu’elle “force” trop */
.afb-layout {
  grid-template-columns: 1fr minmax(280px, 360px) !important;
  max-width: none !important;
}
/* MOBILE FIRST FIX */
@media (max-width: 1024px) {
  .afb-layout {
    grid-template-columns: 1fr !important;
  }

  .afb-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* ============================================================
   AFB — PATCH LAYOUT STABLE (desktop 2 colonnes, mobile 1 colonne)
   À mettre EN FIN de fichier
   ============================================================ */

/* Base anti-débordement propre (pas besoin de overflow-x hidden en prod) */
html { overflow-x: clip; }
body { overflow-x: clip; }
* { box-sizing: border-box; }

/* Conteneurs full-width (vous avez choisi le mode full width) */
.afb-header__inner,
.afb-container,
.afb-footer__grid,
.afb-footer__bottom {
  max-width: none;
  width: 100%;
  padding-left: clamp(14px, 2.5vw, 34px);
  padding-right: clamp(14px, 2.5vw, 34px);
}

/* Grid desktop : contenu + sidebar flexible */
.afb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 24px;
  align-items: start;
}

/* Important : grid/flex enfants doivent pouvoir rétrécir */
.afb-main,
.afb-sidebar {
  min-width: 0;
}

/* Images/iframes jamais > parent */
img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* Gutenberg : éviter les surprises */
.wp-block,
.wp-block-group,
.wp-block-columns,
.wp-block-table,
figure {
  max-width: 100%;
}

/* Tables : scroll interne si trop large */
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Longs textes/liens : pas de débordement */
.afb-main, .entry-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* MOBILE/TABLETTE : 1 colonne, sidebar sous le contenu */
@media (max-width: 1024px) {
  .afb-layout {
    grid-template-columns: 1fr;
  }
  .afb-sidebar {
    width: 100%;
    max-width: 100%;
  }
}

/* ============================================================
   AFB — CLEAN PATCH FINAL (PC full width + anti overflow + Owl)
   À COLLER TOUT EN BAS DU CSS (et supprimer les anciens patchs)
   ============================================================ */

/* 0) Base : pas de “marge fantôme” et largeur 100% */
html, body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: clip; /* évite la barre horizontale + “vide” à droite */
}

/* 1) Wrappers WP (selon thème) : full width réel */
#page, #content, .site, .site-content, .site-main, .content-area, .wrap, .container {
  max-width: none !important;
  width: 100% !important;
}

/* 2) Vos conteneurs AFEBAS en full width (sans casser le padding) */
.afb-header__inner,
.afb-container,
.afb-footer__grid,
.afb-footer__bottom {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: clamp(14px, 2.5vw, 34px) !important;
  padding-right: clamp(14px, 2.5vw, 34px) !important;
}

/* 3) Grid : 2 colonnes desktop, 1 colonne tablette/mobile */
.afb-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px) !important;
  gap: 24px !important;
  align-items: start !important;
  max-width: none !important;
}

/* Important : autoriser le shrink (cause n°1 des débordements en grid/flex) */
.afb-main,
.afb-sidebar,
.entry-content,
.wp-block,
.wp-block-group,
.wp-block-columns {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 4) Médias : jamais plus large que le parent */
img, video, iframe, svg, canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* 5) Tables : NE PAS toucher “table” globalement.
      On ne scrolle que les tables Gutenberg/blocs si besoin. */
.wp-block-table {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}
.wp-block-table table {
  width: 100% !important;
  border-collapse: collapse;
}

/* 6) Longs textes/liens/code : anti-débordement */
.entry-content, .afb-main {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}
pre, code {
  max-width: 100% !important;
  overflow-x: auto !important;
}

/* 7) Responsive layout */
@media (max-width: 1024px) {
  .afb-layout {
    grid-template-columns: 1fr !important;
  }
  .afb-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 8) Owl / SlideAnything : éviter le “blanc” + empêcher le débordement */
.sa-owl-carousel,
.sa-owl-carousel .owl-stage-outer,
.owl-carousel,
.owl-carousel .owl-stage-outer {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Important : si le JS a un raté, Owl reste en display:none => “page blanche” sur la zone.
   On force l’affichage, mais on garde un comportement correct une fois chargé. */
.owl-carousel {
  display: block !important;
}
.owl-carousel:not(.owl-loaded) {
  visibility: hidden;  /* évite d’afficher les items en vrac */
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Quand Owl est OK */
.owl-carousel.owl-loaded {
  visibility: visible !important;
  height: auto !important;
}

/* ============================================================
   AFB — PATCH FINAL (anti débordement + pleine largeur desktop)
   À laisser UNIQUE et en FIN de fichier
   ============================================================ */

/* 0) Anti “marge vide à droite” = anti overflow horizontal */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* plus compatible que clip */
}

/* 1) Wrapper WP (selon thèmes / constructeurs) */
#page, .site, .site-content, .content-area, .site-main, .wp-site-blocks {
  max-width: 100%;
}

/* 2) Vos conteneurs full width */
.afb-header__inner,
.afb-container,
.afb-footer__grid,
.afb-footer__bottom {
  max-width: none !important;
  width: 100% !important;
  padding-left: clamp(14px, 2.5vw, 34px) !important;
  padding-right: clamp(14px, 2.5vw, 34px) !important;
}

/* 3) Grids/flex : autoriser la réduction (sinon déborde) */
.afb-layout { min-width: 0; }
.afb-main, .afb-sidebar { min-width: 0; }

/* 4) Gutenberg : alignfull/alignwide peuvent provoquer du overflow */
.alignfull,
.wp-block[data-align="full"],
.wp-site-blocks > .alignfull {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.alignwide,
.wp-block[data-align="wide"] {
  max-width: 100% !important;
}

/* 5) Médias */
img, video, iframe, svg, canvas {
  max-width: 100%;
  height: auto;
}

/* 6) Tables : scroll interne (ne casse pas la page) */
.entry-content table,
.wp-block-table table {
  width: 100%;
  max-width: 100%;
}
.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 7) Textes/liens longs */
.entry-content, .afb-main {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 8) FIX OWL / Slide Anything : empêcher que le carousel élargisse le layout */
#sample_slider,
.sa-owl-carousel,
.owl-carousel {
  width: 100% !important;
  max-width: 100% !important;
}

#sample_slider { overflow: hidden !important; }

/* la “fenêtre” doit clipper quoi qu’il arrive */
#sample_slider .owl-stage-outer,
.sa-owl-carousel .owl-stage-outer,
.owl-carousel .owl-stage-outer {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  display: block !important;
}

/* le stage peut être large (normal), mais ne doit pas imposer la largeur au parent */
#sample_slider .owl-stage,
.sa-owl-carousel .owl-stage,
.owl-carousel .owl-stage {
  display: block !important;
}

/* 9) Sécurité : si un bloc a un width en vw inline (classique), on neutralise */
*[style*="100vw"] {
  width: 100% !important;
  max-width: 100% !important;
}