/* ==========================================================================
   Sport Pulse : pages « catégorie / rubrique » (categorie.html) et
   « comparateurs » (comparateur.html). Chargé APRÈS accueil.css (jetons,
   panneau gris « Les derniers articles », vedette, liste à vignettes,
   classements, bloc Turf, publicité) et commun.css (mise en page à colonne
   droite, fil d'Ariane, cartes en grille, sites de paris, champ de recherche).
   Ici, seulement ce qui est propre à ces deux gabarits.
   ========================================================================== */

/* ==========================================================================
   Catégories et rubriques
   ========================================================================== */
.categorie .page__grille { margin-top: 14px; }
.categorie__tete { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.categorie__compte { font-size: 14px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.categorie__compte:empty { display: none; }
.categorie__description { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--texte-2); max-width: 72ch; }
.categorie__liste { margin-top: 22px; }

/* Sous-rubriques du football : liens au gabarit des onglets gris des « Derniers articles » */
.categorie__panneau .onglets { margin: 16px 0 0; }
.categorie__onglets .onglet { text-decoration: none; }
.categorie__onglets .onglet[aria-current="page"] { background: var(--bordure); color: var(--texte); font-weight: 700; }
.categorie__services { flex-wrap: wrap; gap: 6px; }

/* Une seule carte (rubrique peu fournie) : photo à gauche, texte à droite, comme une vedette couchée */
.derniers__grille--seul { grid-template-columns: minmax(0, 1fr); }
.derniers__grille--seul .vedette {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: 28px; align-content: start;
}
.derniers__grille--seul .vedette > * { grid-column: 2; }
.derniers__grille--seul .vedette > .vedette__image-lien { grid-column: 1; grid-row: 1 / span 6; align-self: start; }
.derniers__grille--seul .vedette .rubrique-texte { margin-top: 0; }
.categorie__panneau .vedette > .lien-fleche { margin-top: 14px; }

/* Suite de la page 1 : grille de cartes sous un filet, dans le même panneau */
.categorie__suite { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--bordure-2); }
.categorie__vide { padding: 8px 0; }
@media (min-width: 561px) { .categorie__suite--3 .grille-articles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.categorie__sq-item { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 16px; padding: 0 0 18px; }

/* Recherche : champ sous le titre */
.categorie__recherche { margin-top: 16px; max-width: 560px; }

/* Colonne droite : nom de la compétition quand il n'y a pas de menu */
.categorie__competition { margin-top: 2px; font-weight: 600; font-size: 15px; }
.categorie__competition:empty { display: none; }
.categorie__cote .lien-fleche { margin-top: 10px; }
.categorie__cote .etat { padding: 14px 0; }

/* ---------- Pagination : numéros soulignés de rouge (comme le jour choisi de la page des scores) ---------- */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--bordure-2);
}
.pagination__pages { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pagination__num {
  display: block; min-width: 38px; padding: 9px 6px 6px; text-align: center;
  font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--texte-2); text-decoration: none;
  border-bottom: 3px solid transparent; font-variant-numeric: tabular-nums;
}
a.pagination__num:hover { color: var(--texte); border-bottom-color: var(--bordure-2); }
.pagination__num--actif { color: var(--texte); font-weight: 700; border-bottom-color: var(--rouge); }
.pagination__ellipse { padding: 0 4px; color: var(--texte-3); }
.pagination__fleche {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  background: var(--blanc); border-radius: 4px; color: var(--texte); font-weight: 600; font-size: 14.5px; text-decoration: none;
}
.pagination__fleche .ico { width: 16px; height: 16px; }
a.pagination__fleche:hover { background: var(--bordure); }
.pagination__fleche--inactive { visibility: hidden; }

/* ==========================================================================
   Comparateurs
   ========================================================================== */
.comparateur .page__grille { margin-top: 22px; }
.comparateur__tete { margin-top: 14px; max-width: 860px; }
.comparateur__tete .rubrique-texte { display: block; }
.comparateur__titre {
  margin-top: 6px; font-family: var(--police-serif); font-weight: 700; font-size: 42px; line-height: 1.12;
  letter-spacing: -.012em; text-wrap: balance;
}
/* Chapô et signature : mêmes réglages que l'en-tête des articles (article.css) */
.comparateur__chapo { margin-top: 16px; font-size: 20px; line-height: 1.5; font-weight: 500; color: var(--texte); text-wrap: pretty; }
.comparateur__chapo a { color: inherit; text-decoration-color: var(--bordure-2); text-underline-offset: 3px; }
.comparateur__meta {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--bordure);
  font-size: 14px; line-height: 1.5; color: var(--texte-3);
}
.comparateur__meta strong { color: var(--texte); font-weight: 700; }
.comparateur__meta > span { white-space: nowrap; }

/* ---------- Classement des opérateurs : une liste éditoriale, une ligne par site ---------- */
.palmares { scroll-margin-top: 16px; }
.palmares__tete { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.palmares__maj { font-size: 13.5px; color: var(--texte-3); }
.palmares__liste { margin-top: 14px; border: 1px solid var(--bordure); border-radius: var(--rayon); background: var(--blanc); }
.palmares__ligne {
  display: grid; align-items: start; column-gap: 20px;
  grid-template-columns: 34px 64px minmax(0, 1.15fr) minmax(0, 1fr) 160px;
  padding: 20px 22px; border-top: 1px solid var(--bordure);
}
.palmares__ligne:first-child { border-top: 0; }
.palmares__liste--simple .palmares__ligne { grid-template-columns: 34px 64px minmax(0, 1fr) 160px; align-items: center; }
.palmares__rang {
  font-family: var(--police-etroite); font-weight: 700; font-size: 38px; line-height: 56px;
  color: var(--texte); text-align: center; font-variant-numeric: tabular-nums;
}
.palmares__ligne:first-child .palmares__rang { color: var(--rouge); }
.palmares__logo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--bordure); background: var(--fond); }
.palmares__logo--texte { display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--texte-2); }
.palmares__ident { min-width: 0; }
.palmares__nom { font-weight: 700; font-size: 21px; line-height: 1.2; }
.palmares__note { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--texte-3); }
.palmares__etoiles { display: inline-flex; gap: 1px; font-size: 15px; line-height: 1; }
.palmares__etoiles .etoile--pleine { color: #C98A06; }
.palmares__libelle {
  display: block; margin-top: 12px; font-family: var(--police-etroite); font-weight: 700; font-size: 12.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3);
}
.palmares__liste--simple .palmares__libelle { margin-top: 6px; }
.palmares__offre { margin-top: 2px; font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--texte); text-wrap: pretty; }
.palmares__points { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.palmares__points ul { display: flex; flex-direction: column; gap: 5px; }
.palmares__points li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; font-size: 14.5px; line-height: 1.35; color: var(--texte-2); }
.palmares__signe { font-weight: 700; text-align: center; }
.palmares__plus .palmares__signe { color: var(--r-tennis); }
.palmares__moins .palmares__signe { color: var(--texte-3); }
.palmares__action { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 6px; }
.palmares__bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px;
  background: var(--texte); color: #fff; border: 2px solid var(--texte); border-radius: 3px;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.palmares__bouton:hover { background: var(--rouge); border-color: var(--rouge); }
.palmares__bouton .ico { width: 15px; height: 15px; }
.palmares__depot { font-size: 13px; color: var(--texte-3); text-align: center; }
.palmares__liste .etat { padding: 22px; }
.palmares__sq { display: grid; grid-template-columns: 34px 64px minmax(0, 1fr) 160px; gap: 20px; align-items: center; padding: 20px 22px; border-top: 1px solid var(--bordure); }
.palmares__sq:first-child { border-top: 0; }

/* ---------- Contenu éditorial de la page (HTML nettoyé par /api/contenu) ---------- */
.texte-page { margin-top: 44px; max-width: 760px; }
.texte-page > * + * { margin-top: 18px; }
.texte-page p, .texte-page li { font-size: 18px; line-height: 1.7; color: var(--texte); }
/* Intertitres : ceux des articles (condensé, liseré rouge) */
.texte-page h2 {
  margin-top: 44px; padding-left: 12px; border-left: 4px solid var(--rouge);
  font-family: var(--police-etroite); font-weight: 700; font-size: 29px; line-height: 1.12; letter-spacing: .002em;
  scroll-margin-top: 20px; text-wrap: balance;
}
.texte-page h3 { margin-top: 30px; font-weight: 700; font-size: 21px; line-height: 1.28; scroll-margin-top: 20px; }
.texte-page h2 + * { margin-top: 14px; }
.texte-page h4 { margin-top: 22px; font-weight: 700; font-size: 17.5px; }
.texte-page > :first-child { margin-top: 0; }
.texte-page a { color: var(--bleu); text-underline-offset: 2px; }
.texte-page a:hover { color: var(--bleu-fonce); }
.texte-page ul, .texte-page ol { padding-left: 22px; }
.texte-page ul { list-style: disc; }
.texte-page ol { list-style: decimal; }
.texte-page li + li { margin-top: 6px; }
.texte-page strong { font-weight: 700; }
.texte-page img { height: auto; border-radius: 4px; }
.texte-page blockquote { margin: 24px 0 0; padding-left: 18px; border-left: 3px solid var(--rouge); color: var(--texte-2); }

/* Tableaux comparatifs : défilement horizontal si la place manque ; logos des opérateurs en tête de colonne */
/* position: relative : les textes .visuellement-cache (position absolue) des cases ✓ / ✗ restent rognés par ce cadre
   au lieu d'élargir la page sur téléphone. */
.texte-page__tableau { position: relative; margin-top: 22px; overflow-x: auto; border: 1px solid var(--bordure); border-radius: var(--rayon); }
.texte-page table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.texte-page th, .texte-page td { padding: 10px 12px; border-bottom: 1px solid var(--bordure); text-align: center; vertical-align: middle; }
.texte-page thead th {
  background: var(--fond); font-family: var(--police-etroite); font-size: 14px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--texte-2); vertical-align: bottom;
}
.texte-page tbody tr:last-child td, .texte-page tbody tr:last-child th { border-bottom: 0; }
.texte-page th:first-child, .texte-page td:first-child { text-align: left; font-weight: 600; color: var(--texte); white-space: nowrap; }
.texte-page td { color: var(--texte-2); }
.texte-page td.texte-page__oui { color: var(--r-tennis); font-weight: 700; }
.texte-page td.texte-page__non { color: var(--texte-3); }
.texte-page__sans-lien { color: var(--texte-3); }
.texte-page__operateur { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.texte-page__operateur img { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; border: 1px solid var(--bordure); background: var(--blanc); }
.texte-page__operateur span { font-family: var(--police); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--texte-2); white-space: nowrap; }

/* Questions fréquentes en menu déroulant : la question sur une ligne cliquable, la réponse se déplie dessous */
.faq { margin-top: 18px; border-top: 1px solid var(--bordure); }
.faq__item { border-bottom: 1px solid var(--bordure); }
.faq .faq__question {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; margin-top: 0; font-weight: 700; font-size: 18px; line-height: 1.35;
  cursor: pointer; list-style: none;
}
.faq .faq__question::-webkit-details-marker { display: none; }
.faq .faq__question:hover span { color: var(--bleu); }
.faq__chevron { flex: none; width: 18px; height: 18px; color: var(--texte-3); transform: rotate(90deg); transition: transform .2s ease; }
.faq__item[open] .faq__chevron { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .faq__chevron { transition: none; } }
.faq__reponse { padding-bottom: 18px; }
.faq__reponse p { font-size: 16.5px; line-height: 1.6; color: var(--texte-2); }
.faq__reponse p + p { margin-top: 8px; }

/* À lire aussi */
.comparateur__lies { margin-top: 48px; }
.comparateur__lies .grille-articles { margin-top: 18px; }
/* Trois ou six cartes : trois colonnes tant que la place le permet (jamais une carte seule sur sa rangée) */
@media (min-width: 561px) { .comparateur__lies .grille-articles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Colonne droite : sommaire, autre comparateur, publicité ---------- */
.comparateur__cote { align-self: stretch; }
.sommaire__liste { margin-top: 12px; border-left: 2px solid var(--bordure); }
.sommaire__liste a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--texte-2); text-decoration: none; font-size: 14.5px; line-height: 1.35; font-weight: 500;
  transition: color .15s ease, border-color .15s ease;
}
.sommaire__liste a:hover { color: var(--texte); text-decoration: underline; text-underline-offset: 3px; }
.sommaire__liste a[aria-current="true"] { color: var(--texte); border-left-color: var(--rouge); }
.sommaire__liste a:focus-visible { outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .sommaire__liste a { transition: none; } }
.comparateur__voir { padding-top: 16px; border-top: 1px solid var(--bordure); }
.comparateur__voir-titre { font-size: 13px; color: var(--texte-3); }
.comparateur__voir .lien-fleche { margin-top: 4px; font-size: 15px; }
.comparateur__collant { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 28px; }

/* Sommaire replié en tête du contenu (tablette et téléphone, où la colonne droite passe dessous) */
.sommaire-mobile { display: none; margin-top: 28px; border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }
.sommaire-mobile summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; cursor: pointer;
  font-family: var(--police-etroite); font-weight: 700; font-size: 18px; line-height: 1; text-transform: uppercase; letter-spacing: .01em;
  list-style: none;
}
.sommaire-mobile summary > span:first-child { padding-left: 10px; border-left: 4px solid var(--rouge); }
.sommaire-mobile summary::-webkit-details-marker { display: none; }
.sommaire-mobile summary .ico { width: 18px; height: 18px; transition: transform .15s ease; }
.sommaire-mobile[open] summary .ico { transform: rotate(180deg); }
.sommaire-mobile .sommaire__liste { margin: 0 0 16px; }
.sommaire-mobile .sommaire__liste a { padding-block: 8px; font-size: 15.5px; }
@media (prefers-reduced-motion: reduce) { .sommaire-mobile summary .ico { transition: none; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* En dessous de 1280 px, les points forts passent sous l'offre (la colonne principale n'a plus la place de 5 colonnes) */
@media (max-width: 1279px) {
  .palmares__ligne { grid-template-columns: 30px 56px minmax(0, 1fr) 150px; }
  .palmares__ligne .palmares__points { grid-column: 3; grid-row: 2; padding-top: 12px; }
  .palmares__ligne .palmares__action { grid-column: 4; grid-row: 1; }
  .palmares__liste--simple .palmares__ligne { grid-template-columns: 30px 56px minmax(0, 1fr) 150px; }
  .palmares__logo { width: 56px; height: 56px; }
  .palmares__rang { font-size: 34px; line-height: 50px; }
}

@media (max-width: 1024px) {
  .comparateur__cote .comparateur__sommaire { display: none; }
  .sommaire-mobile { display: block; }
  .sommaire-mobile[hidden] { display: none; }
  /* Colonne droite sous le contenu : « Voir aussi » à gauche, publicité à droite */
  .comparateur__collant { position: static; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
}

@media (max-width: 1024px) and (min-width: 761px) {
  /* Colonne droite passée sous le contenu : deux colonnes ; la publicité seule sur sa rangée quand elle est 3e */
  .categorie__cote { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .categorie__cote > .pub:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .categorie .page__grille { margin-top: 10px; }
  .categorie__description { font-size: 15px; }
  .categorie__liste { margin-top: 18px; }
  /* Quatre liens au plus : ils passent à la ligne plutôt que de défiler (aucun libellé coupé) */
  .categorie__panneau .onglets { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; gap: 6px 4px; }
  .derniers__grille--seul .vedette { display: block; }
  .derniers__grille--seul .vedette .rubrique-texte { margin-top: 14px; }
  .categorie__suite { margin-top: 20px; padding-top: 18px; }

  .comparateur__titre { font-size: 30px; line-height: 1.15; letter-spacing: -.008em; }
  .comparateur__chapo { margin-top: 12px; font-size: 18px; }
  .comparateur__meta { margin-top: 16px; padding-top: 12px; font-size: 13.5px; }
  .palmares__ligne, .palmares__liste--simple .palmares__ligne {
    grid-template-columns: 22px 48px minmax(0, 1fr); column-gap: 12px; padding: 16px 14px; align-items: start;
  }
  .palmares__rang { font-size: 26px; line-height: 48px; }
  .palmares__logo { width: 48px; height: 48px; border-radius: 8px; }
  .palmares__nom { font-size: 18px; }
  .palmares__ligne .palmares__points { grid-column: 2 / -1; grid-row: auto; padding-top: 12px; }
  .palmares__ligne .palmares__action { grid-column: 2 / -1; grid-row: auto; flex-direction: row; align-items: center; padding-top: 14px; }
  .palmares__bouton { flex: 1; }
  .palmares__depot { flex: none; }
  .palmares__sq { grid-template-columns: 22px 48px minmax(0, 1fr); padding: 16px 14px; }
  .palmares__sq > :last-child { display: none; }
  .texte-page { margin-top: 32px; }
  .texte-page p, .texte-page li { font-size: 17px; line-height: 1.65; }
  .texte-page h2 { font-size: 25px; margin-top: 36px; }
  .texte-page h3 { font-size: 19px; }
  /* Tableau plus large que l'écran : il défile, la colonne des libellés reste fixe à gauche */
  .texte-page table { font-size: 13.5px; }
  .texte-page th, .texte-page td { padding: 9px 8px; }
  .texte-page th:first-child, .texte-page td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--blanc); white-space: normal; min-width: 128px; max-width: 150px;
    box-shadow: 1px 0 0 var(--bordure);
  }
  .texte-page thead th:first-child { background: var(--fond); }
  .faq__question { font-size: 17px; }
  .comparateur__collant { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .pagination { gap: 6px; }
  .pagination__loin { display: none; }
  .pagination__fleche { padding: 9px 10px; }
  .pagination__fleche > span:not(.ico) {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .pagination__num { min-width: 32px; }
}
