/* Le widget des horaires : grille à sept colonnes, un jour à la fois sur un
   téléphone, cartes aux couleurs de Bsport, sélecteurs, bascule de période,
   détail au toucher. Aucune police chargée : la grille hérite de celle du site.
   Spécification : Extranet/Horaire/2026-09-11-widget-horaires-filtres-et-selecteurs.md */

.eqh { --eqh-ink: #1b1f1c; --eqh-muted: #5c625a; --eqh-line: #e6e2d8; --eqh-fond: #f7f5f0; --eqh-accent: #7a4da1; color: var(--eqh-ink); line-height: 1.4; }
.eqh *, .eqh *::before, .eqh *::after { box-sizing: border-box; }
.eqh [hidden] { display: none !important; }

/* Aperçu dans l'éditeur Elementor seulement */
.eqh-edition { background: #eef3ff; color: #1d3a8a; border: 1px solid #b9c9f5; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.eqh-edition--alerte { background: #fff3cd; color: #6b4e00; border-color: #f0d67a; }

/* Boutons (sélecteurs, bascule, détail) */
.eqh-bouton { display: inline-block; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--eqh-ink); background: #fff; color: var(--eqh-ink); cursor: pointer; margin: 0; }
.eqh-bouton[aria-pressed="true"], .eqh-bouton--pri { background: var(--eqh-ink); color: #fff; }
.eqh-bouton[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
.eqh-bouton:focus-visible { outline: 3px solid var(--eqh-accent); outline-offset: 2px; }
.eqh-compte { font-weight: 400; opacity: .75; margin-left: 4px; font-size: .9em; }

.eqh-periodes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.eqh-periodes .eqh-bouton { border-radius: 8px; }

/* Les sélecteurs se rangent sur une même ligne quand la largeur le permet, et passent à la ligne sinon */
.eqh-selecteurs { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 24px; margin: 0 0 18px; }
.eqh-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eqh-sel-etiquette { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--eqh-muted); }
.eqh-boutons { display: flex; flex-wrap: wrap; gap: 8px; }

/* La liste déroulante : un bouton, un panneau qui ne s'ouvre que le temps du choix */
.eqh-liste { position: relative; }
.eqh-liste-bouton { display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; font-weight: 600; max-width: 320px; }
.eqh-liste-bouton .eqh-liste-texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eqh-liste-fleche { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); flex: none; }
.eqh-liste-bouton[aria-expanded="true"] .eqh-liste-fleche { transform: translateY(2px) rotate(225deg); }
.eqh-liste-panneau { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 280px; max-width: min(420px, 90vw); background: #fff; border: 1px solid var(--eqh-ink); border-radius: 12px; box-shadow: 0 12px 36px rgba(0, 0, 0, .18); padding: 8px; }
.eqh-liste-panneau--droite { left: auto; right: 0; }
.eqh-liste-recherche { display: block; width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--eqh-line); border-radius: 8px; margin: 0 0 6px; }
.eqh-liste-options { max-height: 300px; overflow: auto; display: grid; gap: 2px; }
.eqh-option { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: 15px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--eqh-ink); cursor: pointer; }
.eqh-option::before { content: ""; width: 16px; height: 16px; flex: none; border: 2px solid var(--eqh-ink); border-radius: 4px; background: #fff; }
[aria-multiselectable="false"] .eqh-option::before { border-radius: 50%; }
.eqh-option[aria-selected="true"]::before { background: var(--eqh-ink); box-shadow: inset 0 0 0 3px #fff; }
.eqh-option:hover, .eqh-option:focus-visible { background: var(--eqh-fond); outline: none; }
.eqh-option[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
.eqh-option[hidden] { display: none; }

.eqh-tete { margin: 0 0 14px; }
.eqh-titre { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; margin: 0 0 4px; }
.eqh-sous { margin: 0; color: var(--eqh-muted); font-size: 15px; }
.eqh-a-venir { margin: 6px 0 0; color: #8a5a12; font-size: 14px; }
.eqh-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 14px; }
.eqh-legende-item i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.eqh-fichiers { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; color: var(--eqh-muted); }
.eqh-fichiers a { color: var(--eqh-ink); font-weight: 700; text-decoration: underline; }

.eqh-onglets { display: none; }

/* Les pages de jours : une flèche à droite vers les jours suivants, une à gauche vers les précédents */
.eqh-pages { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; min-height: 30px; }
.eqh-page { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--eqh-ink); background: #fff; color: var(--eqh-ink); cursor: pointer; padding: 0; position: relative; }
.eqh-page::before { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.eqh-page-suiv::before { transform: translate(-65%, -50%) rotate(-45deg); }
.eqh-page-prec::before { transform: translate(-35%, -50%) rotate(135deg); }
.eqh-page:hover, .eqh-page:focus-visible { background: var(--eqh-ink); color: #fff; outline: none; }
.eqh-page[disabled] { visibility: hidden; }
.eqh-pages-texte { font-size: 14px; font-weight: 700; color: var(--eqh-muted); }
.eqh-jour--horspage { display: none !important; }

/* Le glissement d'une page ou d'un jour à l'autre */
.eqh-grille { transition: transform .18s ease, opacity .18s ease; }
.eqh-grille--sortie-gauche { transform: translateX(-48px); opacity: 0; }
.eqh-grille--sortie-droite { transform: translateX(48px); opacity: 0; }
.eqh-grille--entree-droite { transition: none; transform: translateX(48px); opacity: 0; }
.eqh-grille--entree-gauche { transition: none; transform: translateX(-48px); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .eqh-grille { transition: none; } }

/* La grille. Le script mesure la largeur du widget et choisit le nombre de
   colonnes : sept jours, puis 4 + 3, puis 2 + 2 + 2 + 1, puis un jour à la fois
   avec des onglets. Dans les modes à colonnes, jours et cartes deviennent des
   éléments directs de la grille (display: contents) et le script place chaque
   carte sur sa rangée : le matin en haut, le midi au milieu, le soir en bas,
   alignés d'une colonne à l'autre comme sur le PNG. */
.eqh-grille { --eqh-cols: 7; display: grid; grid-template-columns: repeat(var(--eqh-cols), minmax(0, 1fr)); column-gap: 8px; row-gap: 6px; align-items: start; }
.eqh-jour, .eqh-cartes { display: contents; }
.eqh-jour-titre { margin: 0; text-transform: capitalize; font-size: 16px; font-weight: 700; text-align: center; background: var(--eqh-fond); border-radius: 8px; padding: 6px; min-width: 0; }
.eqh-jour-titre + .eqh-cartes > .eqh-carte:first-of-type { margin-top: 2px; }
/* Sans script, ou avant lui : les cartes s'empilent depuis le haut, chaque jour dans sa colonne. */
.eqh-grille:not([data-dispose]) .eqh-jour { display: grid; grid-auto-rows: max-content; gap: 6px; align-content: start; min-width: 0; }
.eqh-grille:not([data-dispose]) .eqh-cartes { display: contents; }

/* Un jour à la fois : onglets collants, un seul jour visible, cartes plus grandes */
.eqh--cols-1 .eqh-onglets { display: flex; position: sticky; top: 0; z-index: 2; background: #fff; padding: 8px 0; gap: 4px; border-bottom: 1px solid var(--eqh-line); margin-bottom: 10px; }
.eqh--cols-1 .eqh-onglets button { flex: 1; font: inherit; font-weight: 700; font-size: 14px; padding: 8px 0; border: 0; border-radius: 8px; background: var(--eqh-fond); color: var(--eqh-ink); cursor: pointer; }
.eqh--cols-1 .eqh-onglets button[aria-selected="true"] { background: var(--eqh-ink); color: #fff; }
.eqh--cols-1 .eqh-onglets button[hidden] { display: none; }
.eqh--cols-1 .eqh-grille { display: block; }
.eqh--cols-1 .eqh-jour { display: none; }
.eqh--cols-1 .eqh-jour.eqh-jour--actif { display: block; }
.eqh--cols-1 .eqh-jour-titre { display: none; }
.eqh--cols-1 .eqh-cartes { display: grid; gap: 8px; }
.eqh--cols-1 .eqh-carte { padding: 12px 14px; }
.eqh--cols-1 .eqh-carte .eqh-nom { font-size: 17px; } .eqh--cols-1 .eqh-carte .eqh-niveau { font-size: 14px; } .eqh--cols-1 .eqh-carte .eqh-heure { font-size: 16px; } .eqh--cols-1 .eqh-carte .eqh-qui, .eqh--cols-1 .eqh-carte .eqh-studio { font-size: 14px; }
.eqh--cols-1 .eqh-sym { width: 17px; height: 17px; }
.eqh--cols-1 .eqh-selecteurs { gap: 12px; }
.eqh--cols-1 .eqh-sel { width: 100%; }
.eqh--cols-1 .eqh-liste-panneau { max-width: calc(100vw - 48px); }

/* La carte : couleur du cours, ou du studio quand plusieurs studios sont visibles */
.eqh-carte { --c: var(--cc); display: grid; gap: 1px; width: 100%; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; border: 3px solid color-mix(in srgb, var(--c) 72%, #000); background: var(--c); color: #fff; border-radius: 10px; padding: 8px 9px; font: inherit; line-height: 1.2; cursor: pointer; margin: 0; }
.eqh--multi .eqh-carte { --c: var(--cs); }
.eqh-carte:hover, .eqh-carte:focus-visible { outline: 3px solid var(--eqh-accent); outline-offset: 1px; }
.eqh-carte .eqh-nom { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; white-space: normal; }
.eqh-carte .eqh-niveau { font-size: 12px; opacity: .95; }
.eqh-carte .eqh-heure { font-weight: 800; font-size: 13px; }
.eqh-carte .eqh-qui { font-size: 12px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.eqh-carte .eqh-salle { opacity: .9; }
.eqh-carte .eqh-studio { display: none; font-size: 12px; font-weight: 700; margin-top: 2px; }
.eqh--multi .eqh-carte .eqh-studio { display: block; }
.eqh-carte--sauna { padding: 3px 9px; border-width: 2px; cursor: default; border-radius: 6px; }
.eqh-carte--sauna .eqh-nom { font-size: 12px; justify-content: center; }
.eqh--cols-1 .eqh-carte--sauna { padding: 5px 14px; }
.eqh--cols-1 .eqh-carte--sauna .eqh-nom { font-size: 14px; }
.eqh-sym { display: inline-block; width: 14px; height: 14px; background: no-repeat center / contain; vertical-align: middle; }
.eqh-sym--petit { width: 11px; height: 11px; margin-left: 2px; }

.eqh-vide { margin: 12px 0; padding: 14px 16px; background: var(--eqh-fond); border-radius: 10px; color: var(--eqh-muted); }

.eqh-notes { margin: 22px 0 0; padding: 16px 18px; background: var(--eqh-fond); border-radius: 12px; font-size: 15px; }
.eqh-notes p { margin: 0 0 8px; }
.eqh-exceptions-titre { font-weight: 700; }
.eqh-exceptions { margin: 0 0 8px 18px; padding: 0; }
.eqh-exceptions li { margin: 3px 0; }
.eqh-exceptions-vide { list-style: none; margin-left: -18px; color: var(--eqh-muted); }
.eqh-version { color: var(--eqh-muted); font-size: 13px; margin: 8px 0 0; }

/* Le détail d'un cours. Avec la réservation, la fiche tient dans l'écran et son corps défile. */
.eqh-detail { border: 0; border-radius: 16px; padding: 0; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--eqh-ink); }
/* La fiche est un bloc simple qui défile en entier quand l'écran est trop bas :
   ni grille, ni rangée « 1fr », ni zone collante. La 2.1.0 et la 2.1.1 les
   employaient, et chaque moteur en faisait autre chose (Olivier, 2026-09-16 :
   Safari étirait la fiche à la hauteur de l'écran, l'iPhone la rétrécissait à
   chaque toucher, Chrome seul la rendait comme prévu). */
.eqh-detail--resa { max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; -webkit-overflow-scrolling: touch; }
.eqh-detail--resa .eqh-detail-corps { padding: 12px 18px 14px; }
.eqh-detail--resa .eqh-detail-tete { padding: 14px 18px 10px; }
.eqh-detail--resa .eqh-detail-tete h4 { font-size: 20px; }
.eqh-detail--resa .eqh-detail-sous { font-size: 14px; margin-top: 2px; }
.eqh-detail::backdrop { background: rgba(27, 31, 28, .45); }
.eqh-detail-tete { padding: 18px 20px 12px; color: #fff; border-radius: 16px 16px 0 0; background: var(--eqh-ink); }
.eqh-detail-tete h4 { margin: 0; font-size: 22px; font-weight: 800; color: inherit; }
.eqh-detail-sous { margin: 2px 0 0; font-size: 15px; }
.eqh-detail-corps { padding: 14px 20px 20px; font-size: 15px; }
.eqh-detail-h5 { margin: 12px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--eqh-muted); }
.eqh-detail-h5:first-child { margin-top: 0; }
.eqh-detail-descriptif { white-space: pre-line; font-size: 15px; line-height: 1.45; margin: 0 0 6px; max-height: 40vh; overflow: auto; }
.eqh-detail-exceptions { margin: 0 0 0 18px; padding: 0; }
.eqh-detail-fermer { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .22); color: #fff; cursor: pointer; padding: 0; }
.eqh-detail-fermer::before, .eqh-detail-fermer::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; background: currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.eqh-detail-fermer::after { transform: translate(-50%, -50%) rotate(-45deg); }
.eqh-detail-fermer:hover, .eqh-detail-fermer:focus-visible { background: rgba(255, 255, 255, .4); outline: none; }
.eqh-detail-tete h4 { padding-right: 40px; }

/* ── La réservation dans la fiche (2.1.0, 2026-09-15) : le calendrier des dates du cours, la séance choisie, le bouton vers Bsport ── */
.eqh-resa { --c: var(--eqh-accent); }
.eqh-cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; flex-wrap: wrap; }
.eqh-cal-tete .eqh-detail-h5 { margin: 0; font-size: 12.5px; }
.eqh-cal-nav { display: inline-flex; gap: 4px; }
.eqh-cal-nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--eqh-line); background: #fff; color: var(--eqh-ink); cursor: pointer; padding: 0; position: relative; }
.eqh-cal-nav button::before { content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.eqh-cal-nav .eqh-cal-suiv::before { transform: translate(-65%, -50%) rotate(-45deg); }
.eqh-cal-nav .eqh-cal-prec::before { transform: translate(-35%, -50%) rotate(135deg); }
.eqh-cal-nav button[disabled] { opacity: .3; cursor: not-allowed; }
.eqh-cal-nav button:not([disabled]):hover, .eqh-cal-nav button:focus-visible { background: var(--eqh-ink); color: #fff; outline: none; }
.eqh-cal { --eqh-mois: 2; display: grid; grid-template-columns: repeat(var(--eqh-mois), minmax(0, 1fr)); gap: 14px; }
.eqh-mois { min-width: 0; }
.eqh-mois:not(.eqh-mois--visible) { display: none; }
.eqh-mois-titre { text-align: center; font-weight: 800; font-size: 14px; margin: 0 0 4px; }
.eqh-mois-jours { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.eqh-mois-jours .eqh-ent { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--eqh-muted); text-transform: uppercase; padding-bottom: 1px; }
.eqh-jr { height: 30px; display: flex; align-items: center; justify-content: center; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; color: #b7b2a5; background: transparent; border: 0; border-radius: 50%; padding: 0; margin: 0 auto; width: 30px; max-width: 100%; position: relative; line-height: 1; }
.eqh-jr--vide { visibility: hidden; }
.eqh-jr--seance { color: #fff; background: var(--c); font-weight: 800; cursor: pointer; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 72%, #000); }
.eqh-jr--seance:hover, .eqh-jr--seance:focus-visible { outline: 3px solid var(--eqh-accent); outline-offset: 1px; }
.eqh-jr--seance[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--eqh-ink); }
.eqh-jr--passee { background: transparent; color: #b7b2a5; font-weight: 800; cursor: default; text-decoration: line-through; box-shadow: none; }
.eqh-jr--passee::after { content: ""; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--c); opacity: .6; }
.eqh-jr--complet { background: #fff; color: var(--eqh-ink); box-shadow: inset 0 0 0 2px var(--c); }
.eqh-jr--complet::after { content: ""; position: absolute; top: 50%; left: 50%; width: 60%; height: 2px; background: var(--c); transform: translate(-50%, -50%) rotate(-30deg); opacity: .8; }
.eqh-jr--annulee { background: #fff; color: #b7b2a5; box-shadow: inset 0 0 0 2px #cfcabd; cursor: default; text-decoration: line-through; }
.eqh-jr--aujourdhui:not(.eqh-jr--seance) { color: var(--eqh-ink); font-weight: 800; }
.eqh-cal-legende { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; font-size: 12px; color: var(--eqh-muted); }
.eqh-leg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; background: var(--c); }
.eqh-leg-complet { background: #fff; box-shadow: inset 0 0 0 2px var(--c); }
.eqh-leg-passe { background: var(--eqh-line); }
.eqh-choix { margin: 12px 0 0; padding: 11px 14px; border-radius: 10px; background: var(--eqh-fond); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date bouton" "places bouton" "note note"; column-gap: 12px; row-gap: 2px; align-items: center; }
.eqh-choix-date { grid-area: date; font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.eqh-choix-places { grid-area: places; color: var(--eqh-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.eqh-choix-places:only-child { grid-area: date; }
.eqh-choix-places strong { color: var(--eqh-ink); }
.eqh-choix-places.eqh-complet strong { color: #a3301c; }
.eqh-choix .eqh-bouton { grid-area: bouton; justify-self: end; margin: 0; text-decoration: none; font-size: 15px; padding: 9px 14px; white-space: nowrap; }
.eqh-choix .eqh-bouton--pri.eqh-attente { background: #fff; color: var(--eqh-ink); }
.eqh-choix-note { grid-area: note; color: var(--eqh-muted); font-size: 12px; margin-top: 4px; }
.eqh-resa-vide { margin: 0; color: var(--eqh-muted); font-size: 14px; }
/* Le descriptif et les exceptions, deux volets repliés côte à côte ; ouvert, un volet prend la ligne. */
.eqh-detail-plus-rangee { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 8px; border-top: 1px solid var(--eqh-line); padding-top: 4px; }
.eqh-detail-plus { margin: 0; padding: 4px 0; }
.eqh-detail-plus[open] { flex-basis: 100%; }
.eqh-detail-plus summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--eqh-muted); list-style: revert; }
.eqh-detail-plus .eqh-detail-descriptif { margin-top: 6px; font-size: 14px; max-height: none; }
.eqh-detail-plus .eqh-detail-exceptions { margin-top: 6px; font-size: 14px; }
.eqh-detail--resa .eqh-detail-fermer { top: 8px; right: 8px; width: 28px; height: 28px; }
@media (max-width: 760px) {
  .eqh-cal { --eqh-mois: 1; }
  .eqh-choix { grid-template-columns: 1fr; grid-template-areas: "date" "places" "bouton" "note"; }
  .eqh-choix .eqh-bouton { justify-self: start; margin-top: 6px; }
}
