/* ============================================================
   AFEBAS — 02-components.css
   Articles, cartes tournois, widgets sidebar, tables, badges
   ============================================================ */

/* ───────────────────────────────────────────────────────────
   ARTICLE / BLOG
   ─────────────────────────────────────────────────────────── */
.afb-article{
  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.05);
}
.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:.03em; text-transform:uppercase;
  margin:8px 0;
}
.afb-article__meta{
  font-size:12px; color:#8c97aa;
  margin-bottom:16px;
  display:flex; gap:12px; flex-wrap:wrap;
}
.afb-article__content{
  padding:20px 28px 28px;
  font-size:15px; line-height:1.85;
}
.afb-article__content h2{
  font-family:var(--afb-font-display);
  font-size:22px; font-weight:900;
  text-transform:uppercase; color:var(--afb-primary);
  margin:28px 0 12px;
}
.afb-article__content a{ text-decoration:underline; }
.afb-article__footer{
  padding:16px 28px;
  border-top:1px solid var(--afb-border);
}

/* ───────────────────────────────────────────────────────────
   CARTES TOURNOIS
   ─────────────────────────────────────────────────────────── */
.afb-cards-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
@media (max-width:1100px){ .afb-cards-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px){ .afb-cards-grid{ grid-template-columns:1fr; } }

.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:linear-gradient(180deg, var(--afb-primary) 0%, #081e41 100%);
  padding:9px 13px;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.afb-card__date{
  font-family:var(--afb-font-display);
  font-weight:900; font-size:13px;
  color:var(--afb-accent); text-transform:uppercase; white-space:nowrap;
}
.afb-card__badge{
  font-size:9px; font-weight:900;
  padding:2px 8px; border-radius:999px;
  background:rgba(255,255,255,0.14);
  color:rgba(255,255,255,0.92);
  text-transform:uppercase; letter-spacing:.04em; white-space:nowrap;
}
.afb-card__body{ padding:11px 13px; flex:1; }
.afb-card__nom{
  font-family:var(--afb-font-display);
  font-weight:900; font-size:14px;
  letter-spacing:.03em; text-transform:uppercase;
  margin:0 0 5px; line-height:1.3;
}
.afb-card__meta{
  display:flex; flex-wrap:wrap;
  gap:5px 10px; font-size:11.5px; color:#73819a;
}
.afb-card__foot{
  padding:7px 13px 10px;
  background:#f7f9fd;
  border-top:1px solid #e9eef7;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.afb-progress-wrap{ height:3px; background:#d8deea; border-radius:2px; overflow:hidden; margin-bottom:4px; }
.afb-progress-bar{ height:100%; background:var(--afb-accent); border-radius:2px; }
.afb-card__places-txt{ font-size:10.5px; color:#6f7f98; display:block; }
.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:900;
  text-transform:uppercase; letter-spacing:.06em;
  padding:6px 14px; border-radius:7px; white-space:nowrap;
  transition:background var(--afb-transition);
}
.afb-card__cta:hover{ background:var(--afb-primary-mid); }

/* Badges Individuel / Équipe */
.afebas-tc__badge.individuel{
  background:rgba(13,107,53,0.15);
  color:#81c784;
  border:1px solid rgba(13,107,53,0.3);
}
.afebas-tc__badge.equipe{
  background:rgba(230,81,0,0.12);
  color:#ff9800;
  border:1px solid rgba(230,81,0,0.3);
}
.afebas-tc__header.equipe-mode{ background:#7a2900 !important; }

/* ───────────────────────────────────────────────────────────
   SIDEBAR / WIDGETS
   ─────────────────────────────────────────────────────────── */
.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-primary) !important;
  padding:9px 15px !important;
  border-bottom:2px solid var(--afb-accent) !important;
  font-family:var(--afb-font-display) !important;
  font-weight:900 !important; font-size:12px !important;
  letter-spacing:.10em !important; text-transform:uppercase !important;
  color:var(--afb-white) !important;
}
.afb-widget__body{ padding:8px 14px; }

/* ───────────────────────────────────────────────────────────
   TABLES
   ─────────────────────────────────────────────────────────── */
.wp-block-table{
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.wp-block-table table{ width:100%; }

/* ───────────────────────────────────────────────────────────
   BANDEAU COUPE (jaune) & FIX TITRES WIDGETS
   ─────────────────────────────────────────────────────────── */
.af-coupe-badge{
  background:var(--afebas-yellow); color:var(--afebas-blue);
  font-family:var(--afebas-font-title); font-weight:900;
  text-transform:uppercase; letter-spacing:.08em;
  text-align:center; padding:6px 10px; font-size:12px;
  border-bottom:3px solid var(--afebas-blue);
  border-radius:8px 8px 0 0;
}

/* Fix titres widgets — anti-gradient/text-fill */
.af-lastres-title-wrap,
.af-lastres-title-wrap *{ color:#fff !important; -webkit-text-fill-color:#fff !important; }
.af-lastres-title-wrap h2,
.af-lastres-title-wrap h2 *{
  background:none !important; background-image:none !important;
  -webkit-background-clip:border-box !important; background-clip:border-box !important;
  text-shadow:0 2px 8px rgba(0,0,0,.35) !important;
  opacity:1 !important; filter:none !important; mix-blend-mode:normal !important;
}
h2.af-future-title,
h2.af-future-title *{ color:#fff !important; -webkit-text-fill-color:#fff !important; }
h2.af-future-title{
  background:none !important; background-image:none !important;
  -webkit-background-clip:border-box !important; background-clip:border-box !important;
  text-shadow:0 2px 8px rgba(0,0,0,.35) !important;
  opacity:1 !important; filter:none !important; mix-blend-mode:normal !important;
}
.af-future-title-wrap,
.af-future-title-wrap *{ color:#fff !important; -webkit-text-fill-color:#fff !important; }

/* ───────────────────────────────────────────────────────────
   CALLOUT / KPI génériques
   ─────────────────────────────────────────────────────────── */
.af-callout{
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.af-callout h3{ margin:0 0 6px 0; }
.af-callout p{ margin:6px 0; }
.af-kpi{ border:1px solid rgba(0,0,0,.06); }

/* =========================================================
   AFEBAS - HOME INTRO / SEO / EVENT
   Version finale corrigée
   Remplace entièrement l'ancien bloc CSS
   ========================================================= */

/* -----------------------------------------
   Compatibilité ancien bloc liens SEO
----------------------------------------- */
.af-home-seo-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.af-home-seo-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 13px;
  border-radius:999px;
  background:rgba(11,42,91,.08);
  border:1px solid rgba(11,42,91,.12);
  color:var(--afb-primary, #0b2a5b);
  font-weight:800;
  font-size:13px;
  text-decoration:none;
  transition:all .2s ease;
}

.af-home-seo-links a:hover{
  background:var(--afb-primary, #0b2a5b);
  color:#fff;
  transform:translateY(-1px);
}

/* -----------------------------------------
   Bloc principal
----------------------------------------- */
.af-home-intro{
  position:relative;
  width:100%;
  max-width:none;
  margin:0;
  background:
    linear-gradient(135deg, rgba(11,42,91,.035) 0%, rgba(214,161,19,.055) 100%),
    #f8f6f1;
  border:1px solid rgba(11,42,91,.08);
  border-radius:24px;
  box-shadow:0 8px 24px rgba(11,42,91,.05);
  overflow:hidden;
  isolation:isolate;
}

.af-home-intro__inner{
  position:relative;
  z-index:1;
  width:100%;
  max-width:none;
  padding:24px 28px 22px;
}

/* -----------------------------------------
   Décor de fond discret
----------------------------------------- */
.af-home-intro::before{
  content:"";
  position:absolute;
  top:-60px;
  right:-70px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(214,161,19,.08) 0%, rgba(214,161,19,.04) 42%, rgba(214,161,19,0) 72%);
  pointer-events:none;
  z-index:0;
}

.af-home-intro::after{
  content:"";
  position:absolute;
  right:60px;
  top:56px;
  width:140px;
  height:140px;
  border-radius:50%;
  border:8px solid rgba(11,42,91,.035);
  pointer-events:none;
  z-index:0;
}

/* -----------------------------------------
   Kicker
----------------------------------------- */
.af-home-intro__kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(214,161,19,.14);
  color:#8d6700;
  font-size:11px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
  line-height:1;
}

/* -----------------------------------------
   Titre
----------------------------------------- */
.af-home-intro__title{
  margin:0 0 14px;
  max-width:1280px;
  color:var(--afb-primary, #0b2a5b);
  font-size:clamp(24px, 2.35vw, 42px);
  line-height:1.08;
  font-weight:900;
  letter-spacing:-.01em;
}

.af-home-intro__title span{
  color:var(--afb-accent, #d6a113);
}

.af-home-intro__title--sm{
  font-size:clamp(22px, 2vw, 34px);
  line-height:1.1;
  margin-bottom:14px;
}

/* -----------------------------------------
   Textes
----------------------------------------- */
.af-home-intro__text,
.af-home-intro__text--sub{
  max-width:1280px;
  margin:0 0 12px;
  color:#223046;
  font-size:16px;
  line-height:1.6;
  font-weight:400;
}

.af-home-intro__text--sub{
  color:#324156;
  font-size:15px;
}

.af-home-intro__text strong,
.af-home-intro__text--sub strong,
.af-home-intro__content strong{
  font-weight:800;
  color:#0f2242;
}

/* -----------------------------------------
   Chips / liens
----------------------------------------- */
.af-home-intro__chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}

.af-home-intro__chips a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 13px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(11,42,91,.10);
  color:var(--afb-primary, #0b2a5b);
  font-size:13px;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 4px 12px rgba(11,42,91,.045);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.af-home-intro__chips a:hover{
  transform:translateY(-1px);
  background:var(--afb-primary, #0b2a5b);
  color:#fff;
  border-color:var(--afb-primary, #0b2a5b);
  box-shadow:0 8px 16px rgba(11,42,91,.12);
}

/* -----------------------------------------
   Variante event / bloc éditorial
----------------------------------------- */
.af-home-intro--event .af-home-intro__inner{
  padding-top:22px;
  padding-bottom:22px;
}

.af-home-intro--event .af-home-intro__kicker{
  margin-bottom:12px;
}

.af-home-intro__content{
  width:100%;
  max-width:none;
  padding:0;
}

.af-home-intro__content p{
  max-width:1280px;
  margin:0 0 12px;
  color:#223046;
  font-size:16px;
  line-height:1.62;
}

.af-home-intro__content p:last-child{
  margin-bottom:0;
}

.af-home-intro--event a,
.af-home-intro__content a{
  color:var(--afb-primary, #0b2a5b);
  font-weight:700;
  text-decoration:none;
  border-bottom:1px solid rgba(11,42,91,.25);
  transition:color .18s ease, border-color .18s ease;
}

.af-home-intro--event a:hover,
.af-home-intro__content a:hover{
  color:var(--afb-accent, #d6a113);
  border-bottom-color:rgba(214,161,19,.45);
}

/* -----------------------------------------
   Largeur assurée dans vos sections
----------------------------------------- */
.af-section.af-section--narrow .af-home-intro{
  width:100%;
  max-width:none;
}

.af-section.af-section--narrow .af-home-intro__inner{
  width:100%;
  max-width:none;
}

/* -----------------------------------------
   Responsive
----------------------------------------- */
@media (max-width:1200px){
  .af-home-intro__title{
    font-size:clamp(24px, 2.9vw, 38px);
  }

  .af-home-intro__title--sm{
    font-size:clamp(21px, 2.4vw, 30px);
  }

  .af-home-intro__text,
  .af-home-intro__text--sub,
  .af-home-intro__content p{
    font-size:15px;
  }

  .af-home-intro::before{
    width:220px;
    height:220px;
  }

  .af-home-intro::after{
    width:120px;
    height:120px;
  }
}

@media (max-width:900px){
  .af-home-intro{
    border-radius:20px;
  }

  .af-home-intro__inner{
    padding:20px 16px 18px;
  }

  .af-home-intro__kicker{
    margin-bottom:10px;
    padding:7px 11px;
    font-size:10px;
  }

  .af-home-intro__title{
    font-size:30px;
    line-height:1.1;
    margin-bottom:12px;
  }

  .af-home-intro__title--sm{
    font-size:26px;
    margin-bottom:12px;
  }

  .af-home-intro__text,
  .af-home-intro__text--sub,
  .af-home-intro__content p{
    font-size:15px;
    line-height:1.58;
  }

  .af-home-intro__chips{
    gap:8px;
    margin-top:14px;
  }

  .af-home-intro__chips a,
  .af-home-seo-links a{
    min-height:36px;
    padding:7px 12px;
    font-size:12px;
  }

  .af-home-intro::before{
    top:-50px;
    right:-60px;
    width:180px;
    height:180px;
  }

  .af-home-intro::after{
    right:36px;
    top:46px;
    width:90px;
    height:90px;
    border-width:6px;
  }
}

@media (max-width:640px){
  .af-home-intro{
    border-radius:18px;
  }

  .af-home-intro__inner{
    padding:18px 14px 16px;
  }

  .af-home-intro__title{
    font-size:26px;
  }

  .af-home-intro__title--sm{
    font-size:23px;
  }

  .af-home-intro__text,
  .af-home-intro__text--sub,
  .af-home-intro__content p{
    font-size:14px;
    line-height:1.55;
  }

  .af-home-intro__chips a,
  .af-home-seo-links a{
    width:100%;
    justify-content:center;
  }

  .af-home-intro::before,
  .af-home-intro::after{
    display:none;
  }
}