/* ==========================================================================
   Adaptation PC + mobile (2026) — ajustements responsives non destructifs.
   Ce fichier est chargé en dernier : il affine la mise en page sans
   remplacer l'identité visuelle existante.
   ========================================================================== */

:root {
  --cpa-shell: 1120px;
  --cpa-gap: clamp(14px, 3vw, 28px);
  --cpa-radius: 16px;
}

html { scroll-behavior: smooth; }
* { min-width: 0; }
img, video, table, pre { max-width: 100%; }
body { overflow-x: hidden; }

/* ---------- Largeurs et respiration ---------- */
main, .home-hero, .hero, .featured-wrap, .content-section,
.seo-promo-description, .football-news, .cpa-ai-editorial-update {
  box-sizing: border-box;
}
main {
  width: 100%;
  max-width: var(--cpa-shell);
  margin-inline: auto;
  padding-inline: var(--cpa-gap);
}
.hero, .home-hero {
  max-width: var(--cpa-shell);
  margin-inline: auto;
  padding-inline: var(--cpa-gap);
}
.content-section { padding: clamp(16px, 3vw, 34px) !important; border-radius: var(--cpa-radius) !important; }

/* ---------- Typographie fluide ---------- */
h1 { font-size: clamp(1.75rem, 1.1rem + 2.8vw, 3rem) !important; }
h2 { font-size: clamp(1.32rem, 1rem + 1.5vw, 2.05rem) !important; }
h3 { font-size: clamp(1.05rem, .95rem + .6vw, 1.35rem) !important; }
p, li { overflow-wrap: anywhere; }

/* ---------- Navigation ---------- */
.topnav {
  position: sticky; top: 0; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 4px 6px; padding: 8px 12px !important;
  backdrop-filter: saturate(1.2) blur(8px);
}
@media (max-width: 860px) {
  .topnav {
    flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { white-space: nowrap; flex: 0 0 auto; padding: 7px 10px !important; border-radius: 999px; }
  .topnav .sep { display: none; }
}

/* ---------- Code + bouton copier ---------- */
.code-widget {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px;
}
.btn-copy, .cta-button, .cpa-register-btn, .cpa-submit, .cpa-social-btn {
  min-height: 44px; cursor: pointer;
}

/* ---------- Tableaux : confort PC, cartes en mobile ---------- */
.seo-table-wrap { border-radius: var(--cpa-radius) !important; overflow: hidden; }
.seo-table-wrap > table, table.seo-table { width: 100%; border-collapse: collapse; }
@media (min-width: 861px) {
  table.seo-table th, table.seo-table td { padding: 12px 16px !important; vertical-align: top; }
  table.seo-table tbody tr:nth-child(even) td { background: rgba(18, 97, 216, .035); }
  table.seo-table tbody tr:hover td { background: rgba(18, 97, 216, .07); }
}
@media (max-width: 860px) {
  .seo-table-wrap { overflow-x: auto; }
}

/* ---------- Grilles / cartes ---------- */
.seo-promo-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }

/* ---------- Bandeau de vérification ---------- */
.cpa-verified {
  max-width: var(--cpa-shell);
  margin: 22px auto 28px;
  padding: clamp(16px, 2.6vw, 26px);
  border: 1px solid #cfe3d6;
  border-radius: var(--cpa-radius);
  background: linear-gradient(140deg, #f2fbf5 0%, #ffffff 62%, #f4f9ff 100%);
  box-shadow: 0 14px 34px -22px rgba(12, 63, 158, .45);
}
.cpa-verified-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.cpa-verified-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: #0f8a4d; color: #fff !important;
  font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
}
.cpa-verified-badge span { color: #fff !important; }
.cpa-verified h2 { margin: 0 !important; font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem) !important; }
.cpa-verified > p { margin: 0 0 14px; }
.cpa-verified-list {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.cpa-verified-list li {
  position: relative;
  padding: 12px 14px 12px 40px;
  border: 1px solid #dce8f4; border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  font-size: .95rem; line-height: 1.55;
}
.cpa-verified-list li::before {
  content: "✔";
  position: absolute; left: 13px; top: 12px;
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #0f8a4d; color: #fff !important;
  font-size: .7rem; font-weight: 900;
}
.cpa-verified-terms {
  padding: 12px 14px;
  border-left: 4px solid #0c3f9e;
  border-radius: 10px;
  background: #eef5ff;
  font-size: .9rem;
}
@media (max-width: 640px) {
  .cpa-verified { margin: 18px 0 22px; }
  .cpa-verified-list li { font-size: .92rem; }
}

/* ---------- Confort tactile / accessibilité ---------- */
a, button { touch-action: manipulation; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #1261d8; outline-offset: 2px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Impression ---------- */
@media print {
  .topnav, #float-bar, .cpa-social-bar, .football-news { display: none !important; }
}
