/*
 * site-footer.css — Pied de page global riche (marque + colonnes de liens +
 * bandeau jeu responsable / partenaires / bonus + barre légale).
 * Layer : modules.
 *
 * Composant AUTONOME, scope .site-footer__* (BEM), zéro couplage entrant/sortant.
 * Chargé globalement (partials/header.php) ; rendu par partials/site-footer.php
 * piloté par data/config/footer.json (futur admin-crm).
 *
 * Discipline CSS (cf. mémoire feedback_css_module_discipline) :
 *   - Palette marketing verte (PMU-like) en variables LOCALES --footer-*,
 *     hors système de tokens bleu du site (même logique que --boutique-accent).
 *     Pas de nouveau token global.
 *   - Espacements / rayons / poids via tokens existants (--space-*, --radius-*,
 *     --font-*, --duration-*) quand neutres.
 *
 * Cascade : @layer modules > @layer legacy => écrase les règles `footer {}`
 * d'app.css (padding/color/font-size legacy) sans !important.
 *
 * Hooks principaux :
 *   .site-footer            <footer> full-bleed fond vert + filet rouge top
 *   .site-footer__inner     wrapper .container (largeur site, centré)
 *   .site-footer__cols      grille marque + 4 colonnes de liens
 *   .site-footer__band      bandeau responsable / partenaires / bonus
 *   .site-footer__legal     barre légale (copyright + paiements + réseaux)
 */

@layer modules {
  .site-footer {
    /* LE GRIS DU TURF-FR.COM (Xavier 2026-10-28, comparé au vert sur visuel) :
       le fond prend le gris du pied de page de l'ancien site et le bandeau
       responsable / partenaires / bonus le même gris deux crans plus foncé.
       Ce fond étant plus clair que l'ancien vert sombre, les textes ont été
       éclaircis pour garder 4,5:1 (texte, discret, titres, « 18+ », accroche
       du logo).
       RETOUR ARRIÈRE — le vert essayé juste avant (mêmes textes) :
       --footer-bg #1b764f, --footer-panel #14573a.
       Les valeurs d'origine (avant le 28/10/2026) : --footer-bg #0e3d2b,
       --footer-panel #0a3322, --footer-text #c7d8cf, --footer-muted #8ea397,
       --footer-heading #d7e3dc, --footer-red-texte #e96b72, et l'accroche du
       logo (.site-footer__brand-tagline) en var(--footer-green). */
    --footer-bg: #585858;
    --footer-panel: #424242;
    --footer-red: #e2353f;
    /* ROUGE POUR LE TEXTE, distinct du rouge des aplats (audit accessibilité
       16/08/2026). `--footer-red` reste tel quel là où il sert de FOND ou de
       LISERÉ — le changer y aurait modifié la pastille des partenaires et le
       filet du haut, alors que rien ne l'exige. En TEXTE sur le vert sombre du
       pied de page, en revanche, il ne donne que 3,19:1 là où la norme AA
       demande 4,5. Cette variante éclaircie atteignait 4,51:1 sur l'ancien
       `--footer-panel`. Sur le panneau du 28/10/2026, il faut plus clair :
       #f3b1b4 donne 5,63:1 sur le gris #424242 (4,79:1 sur le vert #14573a ;
       le « 18+ » est dans ce panneau). */
    --footer-red-texte: #f3b1b4;
    --footer-gold: #f4c44e;
    --footer-green: #2fcf7a;
    /* bouton vert (« Voir les offres ») assombri le 13/11/2026 pour son texte blanc : 4,6:1 (avant #1f9d57 : 3,5:1 ;
       Google demande 4,5) */
    --footer-green-btn: #1a864a;
    --footer-green-btn-hover: #16733f;
    --footer-logo: #15a44c;
    --footer-text: #eef4f0;
    /* #8aa093 donnait 4,38:1 sur l'ancien fond — à 0,12 point de la norme AA,
       pour trois textes (sous-titre du copyright, « paiement sécurisé »,
       libellé des réseaux) : #8ea397 passait à 4,55:1 (audit accessibilité
       16/08/2026). Sur les fonds du 28/10/2026, il ne fait plus que 2,09:1
       (vert #1b764f) : #e2ebe6 donne 5,85:1 sur le gris #585858 (4,60:1 sur
       le vert). */
    --footer-muted: #e2ebe6;
    --footer-heading: #ffffff;
    --footer-line: rgba(255, 255, 255, 0.1);
    --footer-line-strong: rgba(255, 255, 255, 0.22);
    --footer-on-gold: #1a2017;

    width: 100%;
    margin: 0;
    padding: 0;
    border-top: 3px solid var(--footer-red);
    background: var(--footer-bg);
    color: var(--footer-text);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
    /* Un mot trop long pour sa ligne (texte de l'admin sans espace) se coupe au lieu de
       faire défiler la page de côté sur téléphone (revue Codex du 08/10/2026 : 18 textes
       sur 19 débordaient à 360 px). Sans effet sur un texte qui tient déjà. */
    overflow-wrap: anywhere;
  }

  .site-footer a {
    text-decoration: none;
  }

  .site-footer__heading:focus-visible,
  .site-footer__link:focus-visible,
  .site-footer__btn:focus-visible,
  .site-footer__ghost-sm:focus-visible,
  .site-footer__partner:focus-visible,
  .site-footer__social-link:focus-visible,
  .site-footer__apps-more:focus-visible,
  .site-footer__app:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 2px;
  }

  .site-footer__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    /* + la hauteur du bandeau collant du bas d'Akcelo quand il est là (0 sinon) : sans elle, il cachait la
       ligne du copyright et le bloc « 18+ » tout en bas (04/11/2026, ads_bandeau_bas_suivi_html). */
    padding: 28px 16px calc(88px + var(--st-pub-bas-hauteur, 0px));
  }

  /* ─── Grille marque + colonnes ─── */
  .site-footer__cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px 22px;
  }

  .site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .site-footer__brand-head {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .site-footer__logo {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--footer-logo);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }

  .site-footer__logo svg {
    width: 32px;
    height: 32px;
  }

  .site-footer__logo-img {
    height: 54px;
    width: auto;
    flex: none;
  }

  .site-footer__brand-name {
    display: block;
    font-size: 22px;
    font-weight: var(--font-weight-700);
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.1;
  }

  .site-footer__brand-tagline {
    display: block;
    margin-top: 4px;
    font-size: var(--font-size-13);
    /* --footer-green ne fait que 3,50:1 sur le gris #585858 (2,75:1 sur le
       vert #1b764f) : le même vert, éclairci, donne 5,87:1 (28/10/2026) */
    color: #c9f3dc;
  }

  .site-footer__brand-desc {
    margin: 0;
    max-width: 360px;
    color: var(--footer-text);
    line-height: var(--line-height-loose);
  }

  .site-footer__brand-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 2px;
  }

  /* Applications mobiles (08/10/2026) : petit titre (même style que les titres de
     colonnes), lien facultatif à sa droite, puis les badges OFFICIELS d'Apple et de
     Google, à l'identique (leurs règles l'imposent). */
  .site-footer__apps {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .site-footer__apps-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    /* 12 px : titre et « En savoir plus » tiennent sur une ligne jusqu'à 360 px de large
       (à 16 px il manquait 0,7 px) ; un texte de lien plus long passe dessous. */
    gap: 4px 12px;
  }

  .site-footer__apps-title {
    margin: 0;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-600);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--footer-heading);
  }

  .site-footer__apps-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: var(--font-size-13);
    color: var(--footer-text);
    transition: color var(--duration-fast) var(--easing-ease);
  }

  .site-footer__apps-more svg {
    width: 15px;
    height: 15px;
    flex: none;
  }

  .site-footer__apps-more:hover {
    color: #fff;
  }

  .site-footer__apps-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .site-footer__app {
    display: inline-flex;
    border-radius: 7px;
  }

  .site-footer__app img {
    display: block;
    width: auto;
    height: 40px;
  }

  /* Le PNG officiel de Google garde une marge transparente en haut et en bas
     (29 px sur 250) : reprise ici, il a la même hauteur visible que celui d'Apple. */
  .site-footer__app--google img {
    height: 52px;
    margin: -6px 0;
  }

  /* ─── Boutons ─── */
  .site-footer__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-600);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--duration-base) var(--easing-ease),
      border-color var(--duration-base) var(--easing-ease);
  }

  .site-footer__btn svg {
    width: 18px;
    height: 18px;
  }

  .site-footer__btn--gold {
    background: var(--footer-gold);
    color: var(--footer-on-gold);
    font-weight: var(--font-weight-700);
  }

  .site-footer__btn--gold:hover {
    background: #f6cf6a;
  }

  .site-footer__btn--ghost {
    background: transparent;
    color: #fff;
    border-color: var(--footer-line-strong);
  }

  .site-footer__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .site-footer__btn--green {
    background: var(--footer-green-btn);
    color: #fff;
  }

  .site-footer__btn--green:hover {
    background: var(--footer-green-btn-hover);
  }

  /* ─── Colonnes de liens ─── */
  .site-footer__col {
    min-width: 0;
  }

  .site-footer__heading {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 14px;
    cursor: pointer;
    list-style: none;
  }

  .site-footer__heading::-webkit-details-marker {
    display: none;
  }

  .site-footer__heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .site-footer__heading-text {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-600);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--footer-heading);
  }

  .site-footer__col-chevron {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--footer-muted);
    transform: rotate(90deg);
    transition: transform var(--duration-base) var(--easing-ease);
  }

  .site-footer__col[open] .site-footer__col-chevron {
    transform: rotate(270deg);
  }

  .site-footer__rule {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: var(--footer-red);
  }

  .site-footer__rule--red {
    background: var(--footer-red);
  }

  .site-footer__rule--gold {
    background: var(--footer-gold);
  }

  .site-footer__rule--green {
    background: var(--footer-green);
  }

  .site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .site-footer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    color: var(--footer-text);
    line-height: 1.3;
    transition: color var(--duration-fast) var(--easing-ease);
  }

  .site-footer__link svg {
    width: 18px;
    height: 18px;
    color: var(--footer-muted);
    flex: none;
    transition: color var(--duration-fast) var(--easing-ease);
  }

  .site-footer__link:hover {
    color: #fff;
  }

  .site-footer__link:hover svg {
    color: var(--footer-green);
  }

  /* ─── Bandeau responsable / partenaires / bonus ─── */
  .site-footer__band {
    margin-top: 20px;
    background: var(--footer-panel);
    border: 1px solid var(--footer-line);
    border-radius: var(--radius-lg);
    padding: 14px 14px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-footer__band-item {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .site-footer__band-item--partners {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .site-footer__age {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex: none;
    border: 2px solid var(--footer-red);
    /* Le LISERÉ garde le rouge de marque, le TEXTE prend la variante lisible :
       un trait de 2 px n'est pas soumis au contraste du texte, le « 18+ » si. */
    color: var(--footer-red-texte);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-700);
    font-size: var(--font-size-15);
  }

  .site-footer__gift {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    flex: none;
    background: rgba(47, 207, 122, 0.14);
    color: var(--footer-green);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-footer__gift svg {
    width: 26px;
    height: 26px;
  }

  .site-footer__band-title {
    margin: 0 0 4px;
    font-size: var(--font-size-15);
    font-weight: var(--font-weight-600);
    color: #fff;
  }

  .site-footer__band-text {
    margin: 0 0 8px;
    font-size: var(--font-size-13);
    line-height: 1.5;
    color: var(--footer-muted);
  }

  .site-footer__band-label {
    font-size: var(--font-size-13);
    color: var(--footer-muted);
    letter-spacing: 0.03em;
  }

  .site-footer__ghost-sm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-13);
    color: #fff;
    border: 1px solid var(--footer-line-strong);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--easing-ease);
  }

  .site-footer__ghost-sm svg {
    width: 15px;
    height: 15px;
  }

  .site-footer__ghost-sm:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .site-footer__partners {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  .site-footer__partner-wm {
    font-size: 18px;
    font-weight: var(--font-weight-700);
    color: #fff;
    letter-spacing: 0.3px;
  }

  .site-footer__partner-wm sup {
    font-size: 0.6em;
    color: var(--footer-green);
  }

  .site-footer__partner-wm--zeturf .site-footer__partner-a {
    /* Texte sur le vert sombre : même raison que le « 18+ » ci-dessus. */
    color: var(--footer-red-texte);
  }

  .site-footer__partner-wm--genybet .site-footer__partner-a {
    color: var(--footer-green);
  }

  .site-footer__partner-wm--genybet .site-footer__partner-b {
    color: #f4a63a;
  }

  .site-footer__partner-logo {
    max-height: 34px;
    max-width: 130px;
    width: auto;
  }

  /* ─── Barre légale ─── */
  .site-footer__legal {
    margin-top: 24px;
    border-top: 1px solid var(--footer-line);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
  }

  .site-footer__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--font-size-13);
    color: var(--footer-muted);
  }

  .site-footer__copy-main {
    color: var(--footer-heading);
  }

  .site-footer__pay {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }

  .site-footer__pay-mark {
    display: inline-flex;
    align-items: center;
    color: #cdd8d2;
    height: 24px;
  }

  .site-footer__pay-mark--visa {
    font-style: italic;
    font-weight: var(--font-weight-800);
    letter-spacing: 0.5px;
    color: #fff;
    font-size: 17px;
  }

  .site-footer__pay-mark--amex {
    font-weight: var(--font-weight-700);
    font-size: 13px;
    color: #fff;
  }

  .site-footer__pay-mark--apple {
    gap: 3px;
    font-weight: var(--font-weight-600);
    font-size: 15px;
    color: #fff;
  }

  .site-footer__pay-mark--apple svg {
    width: 17px;
    height: 17px;
  }

  .site-footer__pay-mark--paypal {
    font-style: italic;
    font-weight: var(--font-weight-700);
    font-size: 15px;
  }

  .site-footer__pay-mark--paypal .site-footer__pay-a {
    color: #e6edf6;
  }

  .site-footer__pay-mark--paypal .site-footer__pay-b {
    color: #c2d2e9; /* éclairci le 13/11/2026 : 4,6:1 sur le fond du pied (avant #99b3da : 3,3:1) */
  }

  .site-footer__secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-13);
    color: var(--footer-muted);
    border-left: 1px solid var(--footer-line);
    padding-left: 14px;
  }

  .site-footer__secure svg {
    width: 15px;
    height: 15px;
  }

  .site-footer__social {
    display: flex;
    align-items: center;
    gap: 11px;
  }

  .site-footer__social-label {
    font-size: var(--font-size-13);
    color: var(--footer-muted);
  }

  .site-footer__social-link {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--footer-line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-heading);
    transition: background var(--duration-fast) var(--easing-ease),
      color var(--duration-fast) var(--easing-ease);
  }

  .site-footer__social-link svg {
    width: 17px;
    height: 17px;
  }

  .site-footer__social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  /* ─── Responsive ─── */
  @media (min-width: 600px) {
    .site-footer__cols {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__brand {
      grid-column: 1 / -1;
    }

    .site-footer__col-chevron {
      display: none;
    }

    .site-footer__heading {
      cursor: default;
      pointer-events: none;
    }

    .site-footer__col > .site-footer__links {
      display: block;
    }

    .site-footer__col::details-content {
      content-visibility: visible;
    }
  }

  @media (min-width: 768px) {
    .site-footer__band {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-footer__band-item + .site-footer__band-item {
      border-left: 1px solid var(--footer-line);
      padding-left: 18px;
    }
  }

  @media (min-width: 992px) {
    .site-footer__cols {
      /* --footer-cols : posé par partials/site-footer.php quand seules 1 à 3
         colonnes restent visibles sur ordinateur ; 4 sinon (inchangé). */
      grid-template-columns: minmax(220px, 1.5fr) repeat(var(--footer-cols, 4), minmax(0, 1fr));
      gap: 24px;
    }

    .site-footer__brand {
      grid-column: auto;
    }

    /* Avec les badges des applis (09/10/2026, demande de Xavier) : la colonne marque a la
       hauteur des colonnes de liens ; le bouton et le bloc des applis se partagent l'espace
       libre (même écart texte → bouton et bouton → « Téléchargez l'application »), et le bas
       des badges arrive au niveau du bas du dernier lien (« Boutique ») : 7 px = la marge
       intérieure basse des liens (.site-footer__link). */
    .site-footer__brand--apps .site-footer__brand-actions,
    .site-footer__brand--apps .site-footer__apps {
      margin-top: auto;
    }

    .site-footer__brand--apps .site-footer__apps {
      margin-bottom: 7px;
    }
  }

  @media (min-width: 1200px) {
    .site-footer__inner {
      padding: 44px 24px calc(44px + var(--st-pub-bas-hauteur, 0px));
    }
  }

  /* Lot 3 — masquer une colonne sur mobile (vue accordéon < 600px). */
  @media (max-width: 599.98px) {
    .site-footer__col--hide-mobile { display: none; }
  }

  /* Masquer une colonne sur ordinateur, tablette comprise (07/10/2026) :
     tout ce qui n'est pas la vue mobile ci-dessus. */
  @media (min-width: 600px) {
    .site-footer__col--hide-desktop { display: none; }
  }
}
