/*
 * themes/hippique.arrivees.css — Page /arrivees-rapports-pmu/ (thème hippique)
 * Layer : modules
 * Role : fidélité maquette juin 2026 — titre vert, bouton AUJOURD'HUI vert
 *        plein, chips réunions actives pleines (état .is-active géré par
 *        arrivees.js, ≠ aria-selected de la page programme), tableau à
 *        en-tête vert foncé, boutons RAPPORTS verts avec icône, onglets
 *        partants/montes verts. Le bandeau réunion (classes course-day-
 *        panel-*) est stylé ICI de façon AUTONOME, scope .arrivees-panel :
 *        sur cette page la maquette diffère de la page programme (pas de
 *        liseré titre/méta, séparation blanche épaisse avant le tableau).
 *        Chargé uniquement quand le thème est actif (css_extra).
 *        Les titres des tableaux (résultats + fenêtre des montes) prennent
 *        le vert foncé de l'en-tête du turf-fr.com, #1B764F (Xavier
 *        2026-10-29, sur visuel) ; puis tout le vert de la page, #166B3C
 *        (titre, dates, réunions, RAPPORTS, montes), passe aussi en #1B764F
 *        et le survol foncé #114F2C en #14573A (même jour, sur visuel).
 *        L'ancien vert est écrit en commentaire à côté de chaque valeur
 *        (retour arrière).
 */

@layer modules {

  /* ── En-tête : carte blanche, titre vert (remplace le dégradé bleu) ── */
  [data-theme="hippique"] .arrivees-header {
    background: var(--color-surface);
    border-bottom: 1px solid #eef2ef;
  }

  [data-theme="hippique"] .arrivees-title {
    color: #1b764f; /* était #166b3c */
    font-size: var(--font-size-base);
  }

  @media (max-width: 768px) {
    [data-theme="hippique"] .arrivees-title {
      font-size: clamp(13px, 4.2vw, 22px);
      white-space: nowrap;
    }
  }

  /* ── Barre date = bascule (segmented) : le pavé SÉLECTIONNÉ est vert plein,
     l'autre reste blanc bordé vert. La sélection suit la date affichée — le
     .is-active est posé côté vue : pavé date quand on n'est PAS « aujourd'hui »,
     bouton AUJOURD'HUI quand on l'est. Même vert que la page programme. ── */
  [data-theme="hippique"] .arrivees-date-pill,
  [data-theme="hippique"] .arrivees-today-pill {
    background: var(--color-surface);
    border: 1px solid #1b764f; /* était #166b3c */
    border-radius: 6px;
  }

  [data-theme="hippique"] .arrivees-date-arrow {
    color: #1b764f; /* était #166b3c */
  }

  [data-theme="hippique"] .arrivees-date-value {
    color: #14233b;
    font-weight: var(--text-bold-weight);
    font-style: normal;
  }

  [data-theme="hippique"] .arrivees-today-pill {
    color: #1b764f; /* était #166b3c */
    text-transform: uppercase;
    font-weight: var(--font-weight-800);
    letter-spacing: 0.04em;
  }

  /* État SÉLECTIONNÉ : vert plein, contenu en blanc pour rester lisible. */
  [data-theme="hippique"] .arrivees-date-pill.is-active,
  [data-theme="hippique"] .arrivees-today-pill.is-active {
    background: #1b764f; /* était #166b3c */
    border-color: #1b764f; /* était #166b3c */
    color: var(--color-text-inverse);
  }
  [data-theme="hippique"] .arrivees-date-pill.is-active .arrivees-date-value,
  [data-theme="hippique"] .arrivees-date-pill.is-active .arrivees-date-arrow {
    color: var(--color-text-inverse);
  }

  /* Survol : AUJOURD'HUI non sélectionné se teinte de vert clair ; sélectionné
     il fonce légèrement. */
  [data-theme="hippique"] .arrivees-today-pill:not(.is-active):hover {
    background: #eaf3ed;
  }
  [data-theme="hippique"] .arrivees-today-pill.is-active:hover {
    background: #14573a; /* était #114f2c */
  }

  /* ── Chips réunions : état actif PLEIN vert. Sur cette page l'actif est
     porté par .is-active (arrivees.js), pas par aria-selected. ── */
  [data-theme="hippique"] .course-day-tab-chip.is-active {
    background: #1b764f; /* était #166b3c */
    border-color: #1b764f; /* était #166b3c */
    box-shadow: 0 4px 14px rgba(13, 56, 31, 0.25);
  }

  [data-theme="hippique"] .course-day-tab-chip.is-active .course-day-chip-code,
  [data-theme="hippique"] .course-day-tab-chip.is-active .course-day-chip-name {
    color: var(--color-text-inverse);
  }

  [data-theme="hippique"] .course-day-tab-chip.is-active .course-day-chip-time {
    color: var(--color-text-inverse);
    background: rgba(255, 255, 255, 0.16);
  }

  [data-theme="hippique"] .course-day-tab-chip.is-active .course-day-chip-icon {
    filter: brightness(0) invert(1);
  }

  /* ── Bandeau réunion : UNE seule bande verte (titre + météo + méta),
     SANS liseré interne sous le titre, puis séparation blanche ÉPAISSE
     avant l'en-tête du tableau (maquette). Bloc AUTONOME : re-déclare
     tout (fond, liseré, marges) pour ne pas dépendre des règles de
     hippique.course-day.css, partagées avec la page programme. ── */
  [data-theme="hippique"] .arrivees-panel .course-day-panel-head {
    background: #1b764f; /* était #166b3c */
    border-bottom: 0;
    margin: 0;
    padding: 14px 22px 0;
    border-radius: 6px 6px 0 0;
  }

  [data-theme="hippique"] .arrivees-panel .course-day-panel-title {
    color: var(--color-text-inverse);
    font-size: clamp(20px, 1.8vw, 26px);
  }

  [data-theme="hippique"] .arrivees-panel .course-day-weather {
    color: var(--color-text-inverse);
  }

  [data-theme="hippique"] .arrivees-panel .course-day-panel-meta {
    background: #1b764f; /* était #166b3c */
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    padding: 4px 22px 14px;
  }

  [data-theme="hippique"] .arrivees-panel .course-day-panel-meta strong,
  [data-theme="hippique"] .arrivees-panel .course-day-panel-meta a,
  [data-theme="hippique"] .arrivees-panel .course-day-panel-link {
    color: var(--color-text-inverse);
  }

  /* la séparation : bande blanche entre la bande verte et le tableau
     (c'est le fond de la carte qui apparaît) */
  [data-theme="hippique"] .arrivees-panel .arrivees-table-wrap {
    margin-top: 3px;
  }

  /* mobile : paddings de bande resserrés (mêmes valeurs que la page
     programme ; re-déclarés car nos sélecteurs ci-dessus sont plus
     spécifiques que le bloc mobile de hippique.course-day.css) */
  @media (max-width: 560px) {
    [data-theme="hippique"] .arrivees-panel .course-day-panel-head {
      padding: 10px 14px 0;
    }

    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta {
      padding: 2px 14px 10px;
    }
  }

  /* ── Tableau des résultats : en-tête vert foncé (comme le tableau des
     partants de la fiche course), zébrage vert très clair ── */
  [data-theme="hippique"] .arrivees-table thead th {
    background: #1b764f; /* retour arrière : #14532d */
    color: var(--color-text-inverse);
    border-bottom: 0;
  }

  [data-theme="hippique"] .arrivees-table tbody tr:nth-child(even) {
    background: #f4f9f6;
  }

  /* ── Boutons RAPPORTS : verts avec icône graphique (maquette) ── */
  [data-theme="hippique"] .arrivees-action-btn.is-report {
    border-color: #1b764f; /* était #166b3c */
    color: #1b764f; /* était #166b3c */
    background: var(--color-surface);
    font-weight: var(--font-weight-800);
  }

  [data-theme="hippique"] .arrivees-action-btn.is-report::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: -1px;
    background: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 20V10h3v10H4Zm6.5 0V4h3v16h-3ZM17 20v-7h3v7h-3Z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 20V10h3v10H4Zm6.5 0V4h3v16h-3ZM17 20v-7h3v7h-3Z"/></svg>') center / contain no-repeat;
  }

  [data-theme="hippique"] .arrivees-action-btn.is-report:hover {
    background: #e9f2ec;
  }

  /* ── Checkbox + onglets partants/montes en vert ── */
  [data-theme="hippique"] .arrivees-toggle-row input[type="checkbox"] {
    accent-color: #1b764f; /* était #166b3c */
  }

  [data-theme="hippique"] .arrivees-roster-btn.is-active {
    background: #e9f2ec;
    color: #1b764f; /* était #166b3c */
    border-color: #cfe3d6;
    font-weight: var(--text-bold-weight);
  }

  /* noms de prix : title-case comme la home (donnée déjà via french_title_case) —
     plus de mise en MAJUSCULES forcée. */
  [data-theme="hippique"] .arrivees-col-prix a {
    text-transform: none;
    font-weight: var(--text-bold-weight);
    color: #14233b;
  }

  /* lien "voir tout" éventuel et codes PMU : verts */
  [data-theme="hippique"] .arrivees-partant-item a {
    color: #14233b;
    font-weight: var(--text-bold-weight);
  }

  /* ── Popup « montes d'un driver » : compact et soigné (TOUTES largeurs) ── */
  [data-theme="hippique"] .arrivees-montes-dialog {
    width: min(560px, calc(100% - 28px));
    border: 1px solid #e6ece8;
    border-radius: 6px;
    box-shadow: 0 24px 60px rgba(13, 56, 31, 0.22);
    padding: 0;
    overflow: hidden;
  }
  [data-theme="hippique"] .arrivees-montes-title {
    margin: 0;
    padding: 13px 18px;
    background: #1b764f; /* était #166b3c */
    font-size: 16px;
  }
  [data-theme="hippique"] .arrivees-montes-title-date { font-size: 12px; opacity: 0.9; }
  [data-theme="hippique"] .arrivees-montes-close {
    width: 30px;
    height: 30px;
    top: 11px;
    right: 12px;
    font-size: 20px;
    color: #1b764f; /* était #166b3c */
    box-shadow: 0 2px 8px rgba(13, 56, 31, 0.18);
  }
  [data-theme="hippique"] .arrivees-montes-table-wrap {
    max-height: min(58vh, 380px);
    overflow: auto;
  }
  [data-theme="hippique"] .arrivees-montes-table thead th {
    background: #1b764f; /* retour arrière : #1c4523 */
    font-size: 12px;
    padding: 10px 14px;
    border-right: 0;
    position: sticky;
    top: 0;
  }
  [data-theme="hippique"] .arrivees-montes-table tbody td {
    background: var(--color-surface);
    color: #14233b;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 14px;
    border-top: 1px solid #f0f3f1;
    border-right: 0;
  }
  [data-theme="hippique"] .arrivees-montes-table tbody tr:nth-child(even) td { background: #f7faf8; }
  [data-theme="hippique"] .arrivees-montes-table a { color: #1b764f; /* était #166b3c */ font-weight: 700; }

  /* ══════════════════════════════════════════════════════════════════════
   *  Refonte « SaaS 2026 » (reproduction maquette juin 2026).
   *  Appliqué à TOUTES les largeurs (bloc @media min-width:0 ci-dessous) ;
   *    les adaptations spécifiques MOBILE sont regroupées dans le bloc
   *    @media (max-width: 768px) tout en bas du fichier.
   *  ↩ Retour arrière : repointer le thème sur les copies figées
   *    views/themes/hippique/arrivees-rapports-pmu.legacy.php +
   *    assets/css/themes/hippique.arrivees.legacy.css
   *    (registre app/modules/theme/module.php : clés 'views' et 'css_extra').
   * ══════════════════════════════════════════════════════════════════════ */

  /* Éléments enrichis du DESKTOP : masqués PAR DÉFAUT → en mobile, rendu
     identique à l'actuel. Ils sont révélés uniquement dans @media (min-width:769px). */
  [data-theme="hippique"] .arrivees-panel .ah-quinte-badge,
  [data-theme="hippique"] .ah-cal-card,
  [data-theme="hippique"] .ah-date-wd,
  [data-theme="hippique"] .ah-today-icon,
  [data-theme="hippique"] .ah-today-wd { display: none; }

  /* Météo en fin de méta : masquée par défaut → visible UNIQUEMENT en mobile
     (≤768px). En desktop, c'est la carte météo du bandeau qui reste affichée. */
  [data-theme="hippique"] .arrivees-panel .ah-mw { display: none; }

  /* Saut de ligne de la méta : inerte par défaut, activé uniquement en mobile. */
  [data-theme="hippique"] .arrivees-panel .ah-meta-break { display: none; }

  @media (min-width: 0px) { /* = toutes largeurs ; adaptations mobile dans le @media max-width:768px en bas */
    /* La page n'est plus une « carte » : fond clair (--bg), chaque bloc
       respire ; les panneaux réunion deviennent les cartes blanches élevées. */
    [data-theme="hippique"] .arrivees-page {
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      /* padding-top 0 : la carte en-tête doit démarrer PILE au même Y que
         .cotes-page (aucun saut en passant cotes ↔ résultats). */
      padding: 0 0 10px;
    }
    [data-theme="hippique"] .arrivees-header {
      background: transparent;
      border-bottom: 0;
      border-radius: 0;
      /* padding 0 : le fil d'Ariane au-dessus fournit déjà 16px (margin-bottom)
         et le H1 doit être PILE au même X/Y que .cotes-title (aucun saut). */
      padding: 0;
    }

    /* Carte « en-tête de page » (harmonisation /cotes-pmu/) : fil d'Ariane +
       titre + bandeau date + onglets réunions dans UNE carte blanche. Le fond /
       bord / ombre viennent de .card (app.css, layer legacy) ; ici on aligne le
       padding ET le rayon discret (6px) sur .cotes-page (cotes.css). Sans le
       border-radius la carte hérite du --radius global (16px) et « saute » face
       à /cotes-pmu/ (dont les cartes sont rabotées par .layout-cotes .card). */
    [data-theme="hippique"] .arrivees-top-card { padding: 14px; border-radius: 6px; }

    /* ── Barre de dates : [mini-calendrier] [pavé date vert 2 lignes] · [carte AUJOURD'HUI] ──
       Largeur ~60/40 entre le bloc date (gauche) et AUJOURD'HUI (droite). */
    [data-theme="hippique"] .arrivees-toolbar {
      grid-template-columns: 3fr 2fr;
      gap: 14px;
      margin-top: 12px;
    }

    /* Le pavé date devient un conteneur transparent : mini-cal + cœur vert. */
    [data-theme="hippique"] .arrivees-date-pill,
    [data-theme="hippique"] .arrivees-date-pill.is-active {
      background: transparent;
      border: 0;
      border-radius: 0;
      min-height: 0;
      padding: 0;
      gap: 12px;
      justify-content: flex-start;
      align-items: stretch;
    }

    /* Déclencheur calendrier = vignette « page de calendrier » (mois / jour / jour-sem.). */
    [data-theme="hippique"] .arrivees-datepicker-inline {
      position: relative;
      left: auto;
      top: auto;
      transform: none;
      display: flex;
    }
    [data-theme="hippique"] .arrivees-cal-icon-btn { width: auto; height: auto; }
    [data-theme="hippique"] .arrivees-cal-icon-btn .arrivees-cal-icon { display: none; }
    [data-theme="hippique"] .ah-cal-card {
      display: flex;
      flex-direction: column;
      width: 60px;
      border: 1px solid #e3e8e4;
      border-radius: 6px;
      overflow: hidden;
      background: var(--color-surface);
      box-shadow: 0 2px 8px rgba(13, 56, 31, 0.06);
      line-height: 1;
    }
    [data-theme="hippique"] .ah-cal-month {
      background: #1b764f; /* était #166b3c */
      color: var(--color-text-inverse);
      font-size: 10px;
      font-weight: var(--font-weight-800);
      letter-spacing: 0.04em;
      text-align: center;
      padding: 4px 0;
    }
    [data-theme="hippique"] .ah-cal-day {
      color: #14233b;
      font-size: 20px;
      font-weight: var(--font-weight-800);
      text-align: center;
      padding: 4px 0 1px;
    }
    [data-theme="hippique"] .ah-cal-wd {
      color: #64726b;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-align: center;
      padding: 0 0 5px;
    }

    /* Cœur du pavé date = pilule (verte si date sélectionnée, blanche sinon). */
    [data-theme="hippique"] .ah-date-core {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      flex: 1;
      border-radius: 6px;
      padding: 6px 20px;
      background: var(--color-surface);
      border: 1px solid #dce4df; /* non sélectionné = bord gris (pas vert) */
    }
    [data-theme="hippique"] .arrivees-date-pill.is-active .ah-date-core {
      background: #1b764f; /* était #166b3c */
      border-color: #1b764f; /* était #166b3c */
    }
    [data-theme="hippique"] .ah-date-core .arrivees-date-arrow { font-size: 30px; color: #1b764f; /* était #166b3c */ }
    [data-theme="hippique"] .arrivees-date-pill.is-active .ah-date-core .arrivees-date-arrow {
      color: var(--color-text-inverse);
    }
    [data-theme="hippique"] .ah-date-stack {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
    }
    [data-theme="hippique"] .ah-date-stack .arrivees-date-value {
      min-width: 0;
      font-size: 16px;
      font-weight: var(--font-weight-800);
      font-style: normal;
      letter-spacing: 0.01em;
      color: #14233b;
      white-space: nowrap;
    }
    [data-theme="hippique"] .arrivees-date-pill.is-active .ah-date-stack .arrivees-date-value {
      color: var(--color-text-inverse);
    }
    [data-theme="hippique"] .ah-date-wd {
      display: block;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      color: #64726b;
    }
    [data-theme="hippique"] .arrivees-date-pill.is-active .ah-date-wd { color: rgba(255, 255, 255, 0.85); }

    /* Carte AUJOURD'HUI : icône calendrier + 2 lignes (libellé + jour). */
    [data-theme="hippique"] .arrivees-today-pill {
      min-height: 0;
      border-radius: 6px;
      border-color: #dce4df; /* non sélectionné = bord gris ; l'état actif (theme) repasse en vert */
      gap: 12px;
      padding: 10px 20px;
      justify-content: flex-start;
    }
    [data-theme="hippique"] .ah-today-icon {
      display: inline-block;
      width: 26px;
      height: 26px;
      flex: 0 0 auto;
      background: currentColor;
      -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"/></svg>') center / contain no-repeat;
      mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"/></svg>') center / contain no-repeat;
    }
    [data-theme="hippique"] .ah-today-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 2px;
      line-height: 1.1;
    }
    [data-theme="hippique"] .ah-today-main {
      font-size: 15px;
      font-weight: var(--font-weight-800);
      letter-spacing: 0.01em;
      white-space: nowrap;
    }
    [data-theme="hippique"] .ah-today-wd {
      display: block;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.06em;
      opacity: 0.92;
    }

    /* Onglets réunions : un peu d'air sous la barre de dates. */
    [data-theme="hippique"] .arrivees-reunions-wrap { margin: 14px 0 4px; }

    /* Pas de bloc blanc sous les onglets : le rail des chips est transparent
       (la règle partagée .course-day-tabs-list force un fond blanc !important
       pour la page programme — on l'annule ici, surcharge plus spécifique). */
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tabs-list {
      background: transparent !important;
      /* place verticale pour le survol (lift + bordure) : sinon le rail
         (overflow auto) rogne le bord HAUT de la chip survolée. */
      padding: 6px 0 4px;
    }

    /* Pas d'ombre sur les chips ici : le rail (overflow) la rognerait en un
       bloc gris disgracieux sous l'onglet. Bordure + fond plein suffisent.
       Sélecteurs d'état (.is-active / [aria-selected] / :hover) inclus pour
       battre en SPÉCIFICITÉ la règle partagée aria-selected (box-shadow !important). */
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip,
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active,
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip[aria-selected="true"],
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip:hover {
      box-shadow: none !important;
    }

    /* Tuile réunion ACTIVE (rails arrivées ET cotes, qui partagent ce wrapper) :
       vert plein. L'état est porté par .is-active (SSR + arrivees.js/cotes.js) —
       l'ancien style global [aria-selected] de hippique.course-day.css a été
       supprimé (il fuyait entre pages et dépendait du JS). */
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active {
      background: #1b764f; /* était #166b3c */
      border-color: #1b764f; /* était #166b3c */
    }
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active .course-day-chip-code,
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active .course-day-chip-name {
      color: var(--color-text-inverse);
    }
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active .course-day-chip-time {
      color: var(--color-text-inverse);
      background: rgba(255, 255, 255, 0.16);
    }
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip.is-active .course-day-chip-icon {
      filter: brightness(0) invert(1);
    }
    /* Onglets réunions : arrondi réduit (beaucoup moins prononcé). */
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-tab-chip { border-radius: 6px; }
    /* Badge Q+ du coin : texte centré dans le cartouche rouge. */
    [data-theme="hippique"] .arrivees-reunions-wrap .course-day-chip-badge {
      box-sizing: border-box;
      min-width: 0;
      height: 24px;
      padding: 9px 6px 0;
      display: inline-flex;
      align-items: flex-start;
      justify-content: center;
      line-height: 1;
      font-size: 11px;
      text-indent: -3px;
    }

    /* ── Panneau réunion = carte blanche arrondie + ombre douce ── */
    [data-theme="hippique"] .arrivees-panel {
      background: var(--color-surface);
      border: 1px solid #e6ece8;
      border-radius: 6px;
      box-shadow: 0 10px 30px rgba(13, 56, 31, 0.07);
      margin-top: 14px;
      overflow: hidden; /* sûr : la modale montes est position:fixed (non clippée) */
    }

    /* En-tête : fond BLANC (fin de la bande verte), titre bicolore. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-head {
      background: var(--color-surface);
      border-bottom: 0;
      border-radius: 0;
      margin: 0;
      padding: 22px 26px 10px;
      align-items: center;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #14233b;
      font-size: clamp(22px, 1.9vw, 28px);
      font-weight: var(--font-weight-800);
      letter-spacing: -0.01em;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rcode { color: #1b764f; /* était #166b3c */ }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rname { color: #14233b; }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rsep {
      width: 2px;
      height: 26px;
      align-self: center;
      background: #e3e8e4;
      border-radius: 2px;
      font-size: 0;
      overflow: hidden;
    }
    [data-theme="hippique"] .arrivees-panel .ah-quinte-badge {
      display: inline-flex;
      align-items: center;
      height: 22px;
      padding: 0 10px;
      border-radius: 999px;
      background: var(--palette-red-500d, #e11d48);
      color: var(--color-text-inverse);
      font-size: 12px;
      font-weight: var(--font-weight-800);
      letter-spacing: 0.02em;
    }

    /* Météo : carte claire — emoji · 28°C en gros · | · « Vent » / « 14 km/h » empilés. */
    [data-theme="hippique"] .arrivees-panel .course-day-weather {
      background: #eef4f0;
      border: 1px solid #dce7e0;
      border-radius: 6px;
      padding: 8px 18px;
      color: #14233b;
      gap: 12px;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-weather-icon { font-size: 26px; }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-lbl { display: none; }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-temp .ah-w-val {
      font-size: 24px;
      font-weight: var(--font-weight-800);
      color: #14233b;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-weather-sep { display: none; }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-wind {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 1px;
      padding-left: 12px;
      border-left: 1px solid #d0ddd5;
      line-height: 1.15;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-wind .ah-w-colon { display: none; }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-lbl2 { font-size: 12px; font-weight: 600; color: #64726b; }
    [data-theme="hippique"] .arrivees-panel .course-day-weather .ah-w-wind .ah-w-val { font-size: 14px; font-weight: 700; color: #14233b; }

    /* Méta : sur blanc, texte discret, séparée du tableau par un filet fin. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta {
      background: var(--color-surface);
      color: #64726b;
      margin: 0;
      padding: 0 26px 10px;
      font-size: 14px;
      border-bottom: 0;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta strong { color: #14233b; }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta a,
    [data-theme="hippique"] .arrivees-panel .course-day-panel-link {
      color: #1b764f; /* était #166b3c */
      font-weight: var(--text-bold-weight);
    }

    /* Méta : items à icône (🕐 🐎 📅 🗺) séparés par des filets verticaux. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0;
      padding-top: 8px;
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-mob,
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-sep { display: none; }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-item {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 0 16px;
      border-left: 1px solid #e3e8e4;
      color: #64726b;
      white-space: nowrap;
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-item:first-child { padding-left: 0; border-left: 0; }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-item strong { color: #14233b; }
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-carte { color: #1b764f; /* était #166b3c */ }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-item::before {
      content: "";
      width: 16px;
      height: 16px;
      flex: 0 0 auto;
      background: currentColor;
      -webkit-mask-position: center;
      mask-position: center;
      -webkit-mask-size: contain;
      mask-size: contain;
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-depart::before {
      -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm1-13h-2v6l5 3 1-1.7-4-2.3V7Z"/></svg>');
      mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm1-13h-2v6l5 3 1-1.7-4-2.3V7Z"/></svg>');
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-type::before {
      width: 20px;
      height: 20px;
      -webkit-mask-image: url('/images/trot.svg');
      mask-image: url('/images/trot.svg');
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-count::before {
      -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"/></svg>');
      mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7Zm12 7v10H5V9h14Z"/></svg>');
    }
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-carte::before {
      -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m15 5-6-2-6 2v16l6-2 6 2 6-2V3l-6 2Zm0 14-6-2V5l6 2v12Z"/></svg>');
      mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m15 5-6-2-6 2v16l6-2 6 2 6-2V3l-6 2Zm0 14-6-2V5l6 2v12Z"/></svg>');
    }

    /* Tableau quasi pleine largeur : la barre de titres garde un petit retrait
       de 5px sur les côtés (pas bord à bord). */
    [data-theme="hippique"] .arrivees-panel .arrivees-table-wrap {
      margin-top: 0;
      padding: 0 5px 6px;
    }

    /* En-tête de tableau = BARRE GRIS FONCÉ pleine largeur, texte blanc. */
    [data-theme="hippique"] .arrivees-panel .arrivees-table thead th {
      background: #1b764f; /* retour arrière : #1c4523 */
      color: var(--color-text-inverse);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.03em;
      padding: 12px 14px;
      border-bottom: 0;
    }
    /* Coins du bandeau gris à peine arrondis (border-collapse: separate requis
       pour que l'arrondi des cellules d'en-tête clippe bien le fond). */
    [data-theme="hippique"] .arrivees-panel .arrivees-table { border-collapse: separate; border-spacing: 0; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table thead th:first-child { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table thead th:last-child { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
    /* Aligne 1re / dernière colonne sur le retrait du bandeau réunion (~26px). */
    [data-theme="hippique"] .arrivees-panel .arrivees-table th:first-child,
    [data-theme="hippique"] .arrivees-panel .arrivees-table td:first-child { padding-left: 21px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table th:last-child,
    [data-theme="hippique"] .arrivees-panel .arrivees-table td:last-child { padding-right: 17px !important; }
    /* Lignes : cellules plus basses, zébrage blanc / vert pastel VISIBLE,
       séparateurs fins, survol un cran plus soutenu. */
    [data-theme="hippique"] .arrivees-panel .arrivees-table td {
      padding: 9px 14px;
      font-size: 14px;
      border-bottom: 1px solid #f0f3f1;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-table tbody tr:nth-child(even) { background: #edf6f0; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table tbody tr:hover { background: #d8ece0; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table tbody tr:last-child td { border-bottom: 0; }

    /* NP : peut contenir une longue liste de non-partants (ex. « 8-9-10-11-12 »).
       Les tirets collés ne sont pas un point de césure fiable → autoriser la
       coupure pour que le bloc s'empile au lieu de déborder sur la colonne
       « Départ & Arrivée » voisine. */
    [data-theme="hippique"] .arrivees-panel .arrivees-table td.arrivees-col-np {
      white-space: normal;
      overflow-wrap: anywhere;
      word-break: break-word;
      max-width: 120px;
    }

    /* Bouton RAPPORTS : pilule verte un peu plus présente. */
    [data-theme="hippique"] .arrivees-panel .arrivees-action-btn {
      height: 32px;
      padding: 0 18px;
      border-radius: 999px;
      font-size: 12px;
    }

    /* ── Pied de carte : « Afficher les partants/montes » + roster soigné ── */
    [data-theme="hippique"] .arrivees-panel .arrivees-toggle-row {
      padding: 14px 26px;
      border-top: 1px solid #eef2ef;
      margin: 0;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster {
      border-top: 0;
      padding: 0 14px 18px;
    }

    /* Onglets partants / montes : style « soulignement » épuré. */
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-head {
      display: flex;
      gap: 8px;
      border-bottom: 1px solid #eef2ef;
      margin: 0 12px 8px;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-btn {
      min-height: 0;
      border: 0;
      background: transparent;
      border-radius: 0;
      border-bottom: 3px solid transparent;
      margin-bottom: -1px;
      padding: 12px 6px;
      font-weight: 600;
      color: #64726b;
      transition: color 120ms ease, border-color 120ms ease;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-btn:hover { color: #1b764f; /* était #166b3c */ }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-btn.is-active {
      background: transparent;
      color: #1b764f; /* était #166b3c */
      border-color: transparent;
      border-bottom-color: #1b764f; /* était #166b3c */
      font-weight: var(--font-weight-800);
    }

    /* Liste : items en lignes arrondies survolables, plus d'air. */
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-body { padding: 12px 6px 4px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-list-grid { gap: 2px 14px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-list li {
      margin: 0;
      padding: 7px 10px;
      border-radius: 6px;
      transition: background 120ms ease;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-list li:hover { background: #f1f7f3; }
    [data-theme="hippique"] .arrivees-panel .arrivees-partant-casaque {
      width: 26px;
      height: 26px;
      border-radius: 7px;
      border-color: #e3e8e4;
      box-shadow: 0 1px 2px rgba(13, 56, 31, 0.08);
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-partant-name { font-weight: 600; color: #14233b; }
    [data-theme="hippique"] .arrivees-panel .arrivees-partant-code {
      margin-left: auto;
      color: #63746a; /* plus foncé le 13/11/2026 : 5,0:1 sur le blanc et 4,6:1 sur le fond de survol de la ligne (#f1f7f3) ; avant #9aa8a0 : 2,5:1 */
      font-size: 12px;
      font-weight: 600;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-monte-count { color: #9aa8a0; font-size: 12px; }
  }

  /* ══════════════════════════════════════════════════════════════════════
   *  MOBILE ≤ 768px — adaptations du design SaaS 2026 (mise en page étroite).
   *  Le style visuel (en-tête blanc, bandeau gris, zébrage, météo, roster…)
   *  vient du bloc ci-dessus (toutes largeurs) ; ici on n'ajuste QUE la
   *  disposition : empilement, tailles, retraits, onglets roster en colonne.
   * ══════════════════════════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    /* Page : on garde UNE carte blanche conteneur (pas de décartonnage mobile). */
    [data-theme="hippique"] .arrivees-page {
      background: var(--color-surface);
      border: 1px solid var(--line);
      border-radius: 6px;
      box-shadow: var(--shadow);
      padding: 0;
    }
    /* Carte en-tête : transparente en mobile (c'est la page-carte ci-dessus
       qui fait le cadre — pas de carte dans la carte). padding-top 14px : donne
       au fil d'Ariane le même espace blanc sous le header que /cotes-pmu/ et
       /programme (dont la carte a un padding 14px) — sinon il colle au header. */
    [data-theme="hippique"] .arrivees-top-card {
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      padding: 14px 0 0;
    }
    /* Panneau réunion : pas de double carte (il vit dans la page-carte). */
    [data-theme="hippique"] .arrivees-panel {
      border: 0;
      border-radius: 0;
      box-shadow: none;
      margin-top: 0;
    }
    [data-theme="hippique"] .arrivees-header { background: transparent; padding: 0 12px; }
    /* Fil d'Ariane : ici la carte en-tête est transparente à padding 0 (le cadre
       est porté par .arrivees-page), donc chaque enfant s'inset lui-même. On
       redonne au fil le même retrait que le titre (12px) — sinon la règle globale
       .card > .c-breadcrumb (padding 0) le colle au bord, 12px à gauche du titre. */
    [data-theme="hippique"] .arrivees-top-card > .c-breadcrumb { padding-inline: 12px; }

    /* Barre de dates : [mini-calendrier] + [AUJOURD'HUI] sur UNE ligne.
       Le pavé de navigation 24/06 est retiré (la navigation par date passe
       par le sélecteur du mini-calendrier → on gagne de la place). */
    [data-theme="hippique"] .arrivees-toolbar { grid-template-columns: auto 1fr; gap: 8px; margin: 10px 10px 2px; }
    [data-theme="hippique"] .arrivees-date-pill { align-items: center; }
    [data-theme="hippique"] .ah-date-core { display: none; }
    [data-theme="hippique"] .ah-cal-card { width: 52px; }
    [data-theme="hippique"] .ah-cal-day { font-size: 18px; }
    /* AUJOURD'HUI (mobile) : icône « aujourd'hui » conservée à gauche, ensemble centré. */
    [data-theme="hippique"] .arrivees-today-pill { padding: 9px 16px; justify-content: center; }
    [data-theme="hippique"] .ah-today-main { font-size: 13px; }
    [data-theme="hippique"] .ah-today-wd { font-size: 10px; }

    /* Onglets réunions : marge. */
    [data-theme="hippique"] .arrivees-reunions-wrap { margin: 12px 8px 0; }

    /* Bandeau réunion : paddings resserrés. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-head { padding: 14px 14px 6px; }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title { font-size: 19px; gap: 8px; }
    /* Nom hippodrome : JAMAIS sur 2 lignes → tronqué « … ». Le nom COMPLET reste
       dans le DOM (le CSS clippe seulement à l'écran) → Google le lit en entier. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-head { display: block; }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title {
      min-width: 0;
      max-width: 100%;
      justify-content: center;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rcode,
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rsep,
    [data-theme="hippique"] .arrivees-panel .ah-quinte-badge { flex: 0 0 auto; }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-title .ah-rname {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta { padding: 0 14px 10px; }
    /* Météo : on CACHE la carte (le bloc gris) — l'info passe en fin de méta (.ah-mw). */
    [data-theme="hippique"] .arrivees-panel .course-day-weather { display: none; }
    [data-theme="hippique"] .arrivees-panel .ah-mw {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 0 10px;
      border-left: 1px solid #e3e8e4;
      color: #64726b;
      white-space: nowrap;
    }
    [data-theme="hippique"] .arrivees-panel .ah-mw-ico { font-size: 15px; }
    [data-theme="hippique"] .course-day-panel-meta .ah-meta-item { padding: 0 10px; }
    /* Méta sur 2 lignes CENTRÉES : L1 = Départ/Plat/courses, L2 = Carte/météo. */
    [data-theme="hippique"] .arrivees-panel .course-day-panel-meta { justify-content: center; }
    [data-theme="hippique"] .arrivees-panel .ah-meta-break {
      display: block;
      flex-basis: 100%;
      width: 100%;
      height: 0;
      margin: 0;
      padding: 0;
      border: 0;
    }
    /* Carte = 1er item de la 2e ligne → pas de filet ni de retrait à gauche. */
    [data-theme="hippique"] .course-day-panel-meta .ah-mi-carte { border-left: 0; padding-left: 0; }

    /* Tableau : pleine largeur, paddings mobiles, alignement colonnes réduit. */
    [data-theme="hippique"] .arrivees-panel .arrivees-table-wrap { padding: 0 0 6px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table thead th { padding: 8px 6px; font-size: 11px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table td { padding: 8px 6px; font-size: 12px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table th:first-child,
    [data-theme="hippique"] .arrivees-panel .arrivees-table td:first-child { padding-left: 10px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-table th:last-child,
    [data-theme="hippique"] .arrivees-panel .arrivees-table td:last-child { padding-right: 10px !important; }

    /* Roster : onglets EMPILÉS (libellés longs) + liste 1 colonne (base). */
    [data-theme="hippique"] .arrivees-panel .arrivees-roster { padding: 0 10px 14px; }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-head {
      flex-direction: column;
      gap: 0;
      border-bottom: 0;
      margin: 0 0 6px;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-btn {
      border-bottom: 1px solid #eef2ef;
      margin: 0;
      padding: 11px 8px;
    }
    [data-theme="hippique"] .arrivees-panel .arrivees-roster-btn.is-active {
      border-bottom-color: #1b764f; /* était #166b3c */
      background: #eef6f1;
    }
  }
}
