/* F22 : tournois majeurs, filtres et calendrier de la semaine. */
.vue-calendrier .etapes-tournoi, .vue-calendrier .onglets-modes, .vue-calendrier .accroche-mode, .vue-calendrier [data-tournois], .vue-calendrier .titre-vue > p { display: none; }
[data-calendrier-tournois] { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); }

/* Les majeurs */
.majeurs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.majeur { position: relative; display: flex; align-items: flex-end; min-height: clamp(320px, 34vw, 420px); overflow: hidden; border: 1px solid var(--trait); background: var(--plaque-2); transition: border-color .2s, transform .2s; }
.majeur:hover, .majeur:focus-within { border-color: var(--rouge-vif); transform: translateY(-2px); }
.majeur .fond-majeur { position: absolute; inset: 0; width: auto; height: auto; min-height: 0; aspect-ratio: auto; margin: 0; border: 0; }
.fond-majeur img { width: 100%; height: 100%; object-fit: cover; }
/* Sans image, chaque mode garde sa couleur, comme sur les cartes de la page Jouer. */
.majeur .fond-majeur { background: linear-gradient(145deg, #a30f18, #2a0c0f); }
.majeur .fond-majeur[data-mode="zonewars"] { background: linear-gradient(145deg, #0f8a83, #0a2a2c); }
.majeur .fond-majeur[data-mode="realistic"] { background: linear-gradient(145deg, #8f7a24, #2a240c); }
.majeur .fond-majeur[data-mode="endgame"] { background: linear-gradient(145deg, #6a3bbd, #1e1038); }
.majeur::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(10 6 7 / .96) 15%, rgb(10 6 7 / .55) 55%, rgb(10 6 7 / .1)); pointer-events: none; }
.corps-majeur { position: relative; z-index: 1; display: grid; gap: 8px; width: 100%; padding: 20px; }
.corps-majeur h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.05; overflow-wrap: anywhere; }
.date-majeur { color: var(--texte); font-size: 14px; }
.date-majeur::first-letter { text-transform: uppercase; }
.badges-majeur { display: flex; flex-wrap: wrap; gap: 6px; }
.badges-majeur span { padding: 4px 8px; background: var(--rouge); color: #fff; font: 700 11px/1.1 var(--f-titre); letter-spacing: .08em; text-transform: uppercase; }
.badges-majeur span + span { background: var(--plaque-2); border: 1px solid var(--trait); padding: 3px 7px; }
.actions-majeur { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.actions-majeur .btn { min-height: 44px; padding: 0 16px; font-size: 13px; }
.majeur-inscrit { color: var(--ok); font-weight: 700; }
.majeur-raison { color: var(--gris); font-size: 13px; }

/* Les filtres restent à portée pendant la descente */
.barre-filtres-t { position: sticky; top: calc(var(--haut-entete) + 8px); z-index: 5; display: grid; gap: 8px; padding: 12px; background: var(--sol); border: 1px solid var(--trait); }
.groupe-filtre { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.groupe-filtre::-webkit-scrollbar { display: none; }
.nom-filtre { flex: 0 0 84px; color: var(--gris); font-size: 12px; font-weight: 600; }
.puce-filtre { flex: none; min-height: 40px; padding: 0 14px; background: var(--plaque-2); border: 1px solid var(--trait); color: var(--texte); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.puce-filtre:hover, .puce-filtre:focus-visible { border-color: var(--rouge-vif); }
.puce-filtre[aria-pressed="true"] { background: var(--rouge); border-color: var(--rouge); color: #fff; }

/* Le calendrier */
.calendrier-t { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tete-semaine { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tete-semaine h2 { font-size: clamp(16px, 2.2vw, 24px); text-align: center; }
.tuiles-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tuile-jour { display: grid; align-content: start; gap: 4px; justify-items: start; min-width: 0; padding: 12px; background: var(--plaque-2); border: 1px solid var(--trait); color: var(--texte); text-align: left; cursor: pointer; }
.tuile-jour:hover, .tuile-jour:focus-visible { border-color: var(--rouge-vif); }
.tuile-jour[aria-pressed="true"] { border-color: var(--or); box-shadow: inset 0 0 0 1px var(--or); }
.tuile-jour.vide { opacity: .55; }
.tuile-jour.vide[aria-pressed="true"] { opacity: 1; }
.tuile-jour.aujourdhui .numero-jour { color: var(--rouge-vif); }
.nom-jour { color: var(--gris); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.numero-jour { font: 700 clamp(18px, 2.4vw, 26px)/1 var(--f-titre); }
.nb-jour { color: var(--gris); font-size: 12px; }
.titre-jour { font-size: 18px; }
.titre-jour::first-letter { text-transform: uppercase; }
.cartes-jour { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.case-tournoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.case-tournoi .carte-tournoi { width: 100%; opacity: 1; transform: none; }
.case-tournoi.non-eligible .carte-tournoi { opacity: .55; filter: grayscale(.6); }
.bouton-une { justify-self: start; min-height: 44px; font-size: 13px; }
.vide-jour { display: grid; gap: 12px; justify-items: start; padding: 20px; border: 1px dashed var(--trait); color: var(--gris); }

@media (max-width: 640px) {
  .barre-filtres-t { top: calc(var(--haut-entete) + 4px); padding: 8px; }
  .nom-filtre { display: none; }
  .tuiles-jours { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .tuile-jour { flex: 0 0 76px; scroll-snap-align: start; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .majeur { transition: none; } .majeur:hover, .majeur:focus-within { transform: none; } }

/* Le haut d'un majeur : seulement ce qui sort de l'ordinaire. */
.haut-majeur { position: absolute; z-index: 1; inset: 14px 14px auto; display: flex; align-items: center; gap: 8px; }
.plateforme-majeur { margin-left: auto; padding: 6px 11px; background: #0f8a83; border-radius: 10px; color: #fff; font: 700 12px/1.25 var(--f-titre); white-space: nowrap; }
.live-majeur { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; background: var(--rouge); border-radius: 10px; color: #fff; font: 800 13px/1.25 var(--f-titre); letter-spacing: .04em; text-decoration: none; box-shadow: 0 6px 18px rgb(232 32 46 / .45); }
.live-majeur i { width: 8px; height: 8px; background: #fff; border-radius: 50%; animation: pulse-live 1.1s ease-in-out infinite; }
@keyframes pulse-live { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-majeur i { animation: none; } }

/* Quand : la date, puis le temps restant. */
.quand-majeur { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0; }
.quand-majeur .date-majeur { margin: 0; }
.quand-majeur .compte-rebours { margin: 0; }

/* La cup en vedette : toute la largeur, le temps restant en grand. */
.majeurs { display: flex; flex-wrap: wrap; }
.majeurs .majeur { flex: 1 1 280px; min-width: 0; }
.majeurs .majeur.vedette { flex-basis: 100%; }
.blocs-rebours { display: flex; gap: 8px; margin: 2px 0; }
.blocs-rebours span { display: grid; justify-items: center; gap: 2px; min-width: 62px; padding: 8px 10px; background: rgb(9 14 25 / .78); border: 1px solid rgb(255 255 255 / .12); border-radius: 12px; backdrop-filter: blur(6px); }
.blocs-rebours b { font: 800 clamp(22px, 2.400vw, 32px)/1 var(--f-chiffre); color: #ffc93c; }
.blocs-rebours small { color: var(--gris); font-size: 11px; }

/* Récompense */
.recompense-majeur { display: inline-flex; align-items: baseline; gap: 7px; margin: 0; }
.recompense-majeur small { color: var(--gris); font-size: 12px; }
.recompense-majeur b { color: #ffc93c; font: 800 18px/1.2 var(--f-titre); }
.recompense-t { color: #ffc93c; font-weight: 700; }

/* Places */
.places-majeur { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.places-majeur .illimite { color: var(--gris); font-weight: 400; }
.places-majeur em { color: #ffc93c; font-style: normal; font-weight: 700; }
.places-majeur em.complet { color: var(--rouge-vif); }
.barre-places { height: 8px; overflow: hidden; background: rgb(255 255 255 / .12); border-radius: 99px; }
.barre-places i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .4s; }
.barre-places.presque i { background: #ffc93c; }
.barre-places.complet i { background: var(--rouge-vif); }
.jauge.presque span { background: #ffc93c; }
.jauge.complet span { background: var(--rouge-vif); }

/* Ta prochaine cup */
.mes-tournois { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px 10px 16px; background: rgb(62 207 142 / .1); border: 1px solid rgb(62 207 142 / .35); border-radius: 13px; font-size: 14px; }
.etiquette-mes { color: var(--ok); font-size: 12px; font-weight: 700; }
.mes-tournois strong { font: 700 15px/1.2 var(--f-titre); }
.autres-mes { color: var(--gris); font-size: 13px; }
.mes-tournois .btn { min-height: 36px; margin-left: auto; padding: 0 14px; font-size: 13px; }

/* La couleur de chaque mode : pastilles de la semaine. */
:where(.pastilles-jour i, .legende-modes i) { --m: #8fa3bd; }
[data-mode="buildfight"] { --m: #ff8a3c; }
[data-mode="zonewars"] { --m: #3c96ff; }
[data-mode="realistic"] { --m: #ff4d57; }
[data-mode="endgame"] { --m: #a66bff; }
.pastilles-jour { display: none; }
.legende-modes, .inscrit-jour { display: none; }
