/* calendrier_frise.css — LA FRISE du calendrier (04/11/2026 soir, Thibaut : « que ça ressemble à ShowAdvisor : le graphique du
   calendrier avec les concours »). Une colonne par semaine, un concours = une barre posée sur ses jours. Idée reprise,
   habillage à nous : nuit / or / ivoire, serif des titres. Chargée après calendrier.css. */

/* « Mes concours » + « Liste / Frise » sur une même rangée */
.cal-rangee { display: flex; gap: 10px; margin: 10px 0 0; }
.simple .cal-rangee a.cal-mes { flex: 1; min-width: 0; margin: 0; }
.simple a.cal-bascule { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 16px; border: 2px solid var(--bord-btn);
  border-radius: 16px; background: #fff; color: var(--ink); font: 600 18px/1 var(--font); text-decoration: none; }
@media (hover: hover) { .simple a.cal-bascule:hover { border-color: var(--nuit); } }

/* couleurs par niveau (barres, bande des cartes, légende) — texte foncé sur fond clair : lisible sur l'ivoire comme sur la nuit */
.n5  { --c: #eaa192; --ct: #3d0e05; }     /* 5*  rouge brique clair */
.n4  { --c: #a9c3ee; --ct: #0b1b3d; }     /* 4*  bleu */
.n3  { --c: #f4dc98; --ct: #3b2a04; }     /* 3*  or pâle */
.n2  { --c: #a6dccd; --ct: #08302a; }     /* 2*  vert d'eau */
.n1  { --c: #e7d3b2; --ct: #3a2a10; }     /* 1*, jeunes chevaux, autres : sable */
.ng1 { --c: #e1e7f0; --ct: #0b1b3d; }     /* national, de plus en plus soutenu avec la hauteur */
.ng2 { --c: #cdd7e6; --ct: #0b1b3d; }
.ng3 { --c: #b6c4da; --ct: #0b1b3d; }
.cal-carte.n5, .cal-carte.n4, .cal-carte.n3, .cal-carte.n2, .cal-carte.n1, .cal-carte.ng1, .cal-carte.ng2, .cal-carte.ng3 { border-left: 8px solid var(--c); }
.cal-niv.n5, .cal-niv.n4, .cal-niv.n3, .cal-niv.n2, .cal-niv.n1, .cal-niv.ng1, .cal-niv.ng2, .cal-niv.ng3 { background: var(--c); color: var(--ct); border: 1px solid rgba(8, 16, 31, .22); }

/* légende repliable */
.fr-legende { margin: 12px 0 0; }
.fr-legende summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.fr-legende summary::-webkit-details-marker { display: none; }
.fr-legende-pt { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--nuit); color: var(--or);
  font: 700 17px/1 var(--serif); }
.fr-legende ul { list-style: none; margin: 6px 0 0; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 9px; }
.fr-legende li { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.fr-legende i { flex: none; width: 34px; height: 22px; border-radius: 6px; background: var(--c); border: 1px solid rgba(8, 16, 31, .25); }
.fr-legende i.fr-leg-etoile { background: none; border: 0; color: #8c6d2c; font: 700 22px/22px var(--font); text-align: center; }

/* le cadre : défile à l'horizontale, accroche par semaine ; défile aussi à la verticale (les en-têtes restent en haut) */
.fr { position: relative; margin: 8px 0 0; }
.fr-defile { display: flex; align-items: stretch; height: calc(100dvh - 175px); min-height: 430px; overflow: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--ombre); -webkit-overflow-scrolling: touch; }
.fr-sem { flex: 0 0 88%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; border-right: 3px solid var(--ivoire); }
.fr-tete { position: sticky; top: 0; z-index: 6; background: var(--nuit); color: #fff; }
.fr-mois { margin: 0; padding: 11px 10px 9px; font: 700 16px/1 var(--serif); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-mois span { color: var(--or); font-family: var(--font); letter-spacing: .03em; }
.fr-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.fr-jour { padding: 5px 0 6px; text-align: center; background: var(--nuit-2); border-left: 1px solid rgba(255, 255, 255, .14); color: var(--creme-txt); }
.fr-jour:first-child { border-left: 0; }
.fr-jour i { display: block; font-style: normal; font-size: 14px; line-height: 1.1; opacity: .85; }
.fr-jour b { display: block; font: 700 19px/1.2 var(--font); }
.fr-jour.auj { background: var(--or); color: var(--nuit); }
.fr-jour.auj i { opacity: 1; }
.fr-corps { position: relative; flex: 1; min-height: 120px; }
.fr-fond { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.fr-fond span { border-left: 1px solid rgba(8, 16, 31, .06); }
.fr-fond span:first-child { border-left: 0; }
.fr-fond .we { background: rgba(8, 16, 31, .045); }
.fr-fond .auj { background: rgba(201, 169, 97, .24); }
.fr-barres { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 78px; padding: 6px 0 30px; }

/* une barre = un concours, posée sur ses jours */
.fr-barre { position: relative; align-self: end; height: 54px; margin: 0 3px; padding: 4px 5px; min-width: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(8, 16, 31, .22); border-radius: 10px; background: var(--c); color: var(--ct); cursor: pointer; font: 700 15px/1.15 var(--font);
  text-align: center; -webkit-tap-highlight-color: rgba(8, 16, 31, .2); }
.fr-barre:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.fr-barre.g { margin-left: 0; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fr-barre.d { margin-right: 0; border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fr-barre.annule { opacity: .55; text-decoration: line-through; }
.fr-badge { position: absolute; left: 4px; top: -19px; max-width: calc(100% - 10px); height: 20px; padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 7px 7px 0 0; background: var(--nuit); color: #fff; font: 700 13px/20px var(--font); letter-spacing: .01em; }
.fr-lieu { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; max-width: 100%; text-transform: uppercase; }
.fr-lieu .s-drapeau { flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(8, 16, 31, .25); }
.fr-lieu-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-width: 0; }
.fr-barre.un .fr-lieu-t { display: none; }
.fr-barre.un .fr-lieu .s-drapeau { width: 24px; height: 16px; }
.fr-etoile { position: absolute; right: -7px; top: -11px; display: none; width: 25px; height: 25px; border-radius: 50%; background: var(--or); color: var(--nuit);
  font: 700 16px/21px var(--font); text-align: center; border: 2px solid var(--nuit); z-index: 2; }
.fr-barre.coche .fr-etoile { display: block; }
.fr-barre.d .fr-etoile { right: 3px; }
/* National : tout est du même pays, donc pas de drapeau ; le nom du lieu passe même sur une barre d'un jour */
.fr-nat .fr-lieu .s-drapeau { display: none; }
.fr-nat .fr-barre { font-size: 14px; }
.fr-nat .fr-barre.un { padding: 3px 2px; font-size: 12px; line-height: 1.1; }
.fr-nat .fr-barre.un .fr-lieu-t { display: -webkit-box; -webkit-line-clamp: 3; }
.fr-charge { margin: 8px 2px 0; font-size: 16px; color: var(--ink-3); }

/* « Aujourd'hui » : flottant, en bas à gauche, au-dessus de la barre d'onglets */
.fr-auj { position: fixed; left: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); z-index: 35; min-height: 48px; padding: 0 20px;
  border: 2px solid var(--or); border-radius: 999px; background: var(--nuit); color: #fff; font: 700 17px/1 var(--font); cursor: pointer; box-shadow: 0 6px 18px rgba(8, 16, 31, .35); }
.fr-auj:active { background: var(--nuit-2); }
body.fr-feuille-ouverte .fr-auj { display: none; }

/* la feuille du bas */
.fr-feuille { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.fr-feuille[hidden] { display: none; }
.fr-feuille-fond { position: absolute; inset: 0; background: rgba(8, 16, 31, .55); }
.fr-feuille-boite { position: relative; width: 100%; max-width: 560px; max-height: 82dvh; overflow: auto; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--ivoire); border-radius: 26px 26px 0 0; border-top: 3px solid var(--or); box-shadow: 0 -10px 40px rgba(8, 16, 31, .35); animation: fr-monte .2s ease-out; }
@keyframes fr-monte { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fr-feuille-boite { animation: none; } }
.fr-feuille-x { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--ombre-btn); }
.fr-fiche { padding-right: 44px; }
.simple .fr-fiche-nom { margin: 10px 0 0; font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
.cal-sources { margin: 12px 0 0; font-size: 16px; line-height: 1.4; color: var(--ink-3); }
.cal-feuille-page { display: block; }
.cal-feuille-page .fr-fiche { padding-right: 0; }

/* grand écran : plusieurs semaines côte à côte, la page s'élargit */
@media (min-width: 900px) {
  .s-frise .s-page { max-width: 1240px; }
  .fr-sem { flex-basis: 440px; }
  .fr-defile { height: calc(100dvh - 190px); }
}
@media (max-width: 380px) {
  .fr-barre { font-size: 14px; padding: 3px 3px; }
  .fr-badge { font-size: 12px; }
}

/* --- retouches après essai sur le vrai calendrier */
/* sur la frise le titre ne sert plus (l'onglet allumé le dit) : on gagne la place, il reste lu par les lecteurs d'écran */
.s-frise .cal-titre { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.s-frise .cal-mode { margin-top: 2px; }
.s-frise .cal-puces { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.s-frise .cal-puces::-webkit-scrollbar { display: none; }
.s-frise .cal-puce { flex: none; }
/* la légende « ? » en haut à droite de la frise */
.fr-legende { margin: 4px 0 0; }
.fr-legende summary { justify-content: flex-end; }
/* National, barre d'un jour : le mot du lieu en entier si possible, jamais coupé au milieu d'un mot */
.fr-nat .fr-barre.un { justify-content: flex-start; overflow: hidden; }
.fr-nat .fr-barre.un .fr-lieu { justify-content: flex-start; }
.fr-nat .fr-barre.un .fr-lieu-t { overflow-wrap: normal; word-break: normal; hyphens: none; font-size: 11px; letter-spacing: -.01em; text-align: left; }

/* --- 05/11/2026 (Fabien, « exemple 3 ») : le calendrier s'affiche dans la page ENTIÈREMENT — plus de cadre qui défile ni de
   semaine coupée à droite : les semaines sont les unes sous les autres, chacune sur toute la largeur, et on descend avec la
   page. Les semaines suivantes arrivent quand on approche du bas (calendrier.js). */
.fr-defile { display: block; height: auto; min-height: 0; overflow: visible; scroll-snap-type: none; background: none; border: 0; border-radius: 0;
  box-shadow: none; }
.fr-sem { display: flex; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; box-shadow: var(--ombre); }
.fr-tete { position: static; }
.fr-sem { scroll-margin-top: calc(80px + env(safe-area-inset-top, 0px)); }
@media (min-width: 900px) {
  .fr-defile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; height: auto; }
  .fr-sem { margin: 0; }
}

/* --- 05/11/2026 (Fabien) : « Start list et résultats » (le grand bouton) et « Site du concours » dans la fiche d'un concours */
.simple a.cal-live { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 64px;
  margin: 14px 0 10px; font-size: 19px; text-align: center; }
.cal-live-l { display: inline-flex; align-items: center; gap: 8px; }
.cal-live small { font-size: 15px; font-weight: 500; opacity: .88; }
.simple a.cal-site { margin: 0 0 4px; }

/* --- 16/11/2026 : les semaines passées (Thibaut : « pourquoi il n'y a pas dans le calendrier les semaines passées aussi ? »).
   Un concours passé se voit passé : barre et carte plus discrètes, « Terminé » ; le nombre de jeunes chevaux notés en étoile or. */
.fr-avant { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin: 0 0 14px; border: 2px solid var(--bord-btn, #c9c2b0);
  border-radius: 16px; background: #fff; color: var(--ink); font: 700 18px/1 var(--font); cursor: pointer; }
.fr-avant:active { background: var(--ivoire); }
.fr-avant[disabled] { opacity: .6; }
.simple .cal-avant { display: flex; width: 100%; margin: 0 0 14px; }
.fr-barre.passe { opacity: .62; filter: saturate(.55); border-style: dashed; }
.fr-notes { position: absolute; left: 3px; bottom: -11px; padding: 0 6px; border-radius: 9px; background: var(--or); color: var(--nuit); border: 2px solid var(--nuit);
  font: 700 12px/15px var(--font); z-index: 2; }
.cal-carte.cal-passe { opacity: .86; background: #f3efe6; }
.cal-carte.cal-passe .cal-nom { color: var(--ink-2); }
.cal-sem-passee .cal-sem-h { color: var(--ink-3); }

/* --- 22/11/2026 (contrôle qualité, règle de l'appli : texte ≥ 18 px) : les textes de la frise grandissent. Les barres et les
   voies grandissent avec. Seule exception : le nom écrit dans une barre d'UN jour (la place manque : 16 px, sur 2 lignes ;
   le nom entier est dans la fiche du concours, au toucher). */
.fr-mois { font-size: 18px; }
.fr-jour i { font-size: 18px; }
.fr-legende-pt { font-size: 18px; }
.fr-jour b { font-size: 20px; }
.fr-barres { grid-auto-rows: 92px; }
.fr-barre { height: 62px; font-size: 18px; line-height: 1.15; }
.fr-badge { top: -24px; height: 24px; font-size: 18px; line-height: 24px; padding: 0 8px; }
.fr-lieu-t { font-size: 18px; }
.fr-barre.un .fr-lieu-t, .fr-nat .fr-barre.un .fr-lieu-t { font-size: 16px; -webkit-line-clamp: 2; }
.fr-nat .fr-barre { font-size: 18px; }
.fr-notes { font-size: 16px; bottom: -13px; }
.fr-legende summary, .fr-legende li { font-size: 18px; }
.fr-auj { font-size: 18px; }
@media (max-width: 380px) { .fr-barre, .fr-lieu-t, .fr-badge { font-size: 17px; } }
