/*
 * Tournois (DA2) : la cup en vedette et les suivantes en bento, des lignes de calendrier plus lisibles.
 * Seulement du style : tournois-calendrier.js et la carte de tournoi de la page ne changent pas.
 */

/* ---------- Majeurs : vedette à gauche, les autres empilés à droite ---------- */
@media (min-width: 1100px) {
  html.da2 .majeurs:has(.vedette ~ .majeur) { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
  html.da2 .majeurs:has(.vedette ~ .majeur) .vedette { grid-row: span 2; }
  html.da2 .majeurs:has(.vedette ~ .majeur) .majeur:not(.vedette) { min-height: 0; }
  html.da2 .majeurs:has(.vedette ~ .majeur:nth-of-type(4)) .vedette { grid-row: span 3; }
  html.da2 .majeurs .vedette + .majeur:last-child { grid-row: span 2; }
}
html.da2 .majeur { border-radius: 20px; }
html.da2 .majeur.vedette { border-color: rgb(232 32 46 / .55); box-shadow: 0 24px 60px rgb(232 32 46 / .16); }
html.da2 .majeur:not(.vedette) .corps-majeur h3 { font-size: clamp(18px, 1.5vw, 22px); }

/* Compte à rebours : des blocs nets, chiffres dorés. */
html.da2 .blocs-rebours span { background: rgb(9 14 25 / .7); border: 1px solid rgb(251 191 36 / .28); border-radius: 12px; backdrop-filter: blur(4px); }
html.da2 .blocs-rebours small { color: rgb(255 255 255 / .6); letter-spacing: .04em; text-transform: uppercase; font-size: 10px; }

/* ---------- Semaine ---------- */
html.da2 .tete-semaine h2 { font: 800 clamp(18px, 1.6vw, 22px)/1.2 var(--f-titre); }
html.da2 .tuile-jour { border-radius: 14px; transition: transform .15s, border-color .15s, background .15s; }
html.da2 .tuile-jour:not(.vide):hover { transform: translateY(-2px); border-color: var(--trait-fort); }
html.da2 .tuile-jour.vide { opacity: .55; }
html.da2 .titre-jour { margin-top: 22px; font: 800 20px/1.2 var(--f-titre); text-transform: capitalize; }

/* ---------- Lignes du jour : une carte horizontale, comme le reste du site ---------- */
html.da2 .cartes-jour { display: grid; gap: 12px; }
html.da2 .case-tournoi .badges-majeur { display: none; }
html.da2 .case-tournoi .carte-tournoi {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden;
  background: var(--plaque); border: 1px solid var(--trait); border-radius: 18px;
  transition: transform .18s, border-color .18s;
}
html.da2 .case-tournoi .carte-tournoi:hover { transform: translateY(-2px); border-color: var(--trait-fort); }
html.da2 .case-tournoi .banniere-tournoi { min-height: 100%; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; }
html.da2 .case-tournoi .banniere-tournoi .filigrane { display: none; }
html.da2 .case-tournoi .corps { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 20px; padding: 16px 20px; }
html.da2 .case-tournoi .corps > * { grid-column: 1; margin: 0; }
html.da2 .case-tournoi .corps h3 { font: 800 20px/1.15 var(--f-titre); }
html.da2 .case-tournoi .compte-rebours { font: 600 13px/1.3 var(--f-texte); color: #ffc93c; }
html.da2 .case-tournoi .carte-tournoi.actif .compte-rebours { color: var(--rouge-vif); }
html.da2 .case-tournoi dl { display: flex; flex-wrap: wrap; gap: 6px; }
html.da2 .case-tournoi dl dt { display: none; }
html.da2 .case-tournoi dl dd { margin: 0; padding: 4px 10px; background: rgb(255 255 255 / .06); border-radius: 99px; color: var(--texte); font: 500 12px/1.3 var(--f-texte); }
html.da2 .case-tournoi .droit { color: var(--gris); font-size: 12px; }
html.da2 .case-tournoi .actions-tournoi { grid-column: 2; grid-row: 1 / span 6; align-self: center; display: grid; gap: 8px; justify-items: stretch; min-width: 150px; }
html.da2 .case-tournoi .actions-tournoi .btn { justify-content: center; min-height: 44px; }
/* Bouton indisponible : neutre, pas un rouge délavé. */
html.da2 .carte-tournoi .btn:disabled, html.da2 .carte-tournoi .btn[aria-disabled="true"] { background: rgb(255 255 255 / .06); border-color: transparent; color: var(--gris); box-shadow: none; opacity: 1; cursor: not-allowed; }

@media (max-width: 767px) {
  html.da2 .case-tournoi .carte-tournoi { grid-template-columns: minmax(0, 1fr); }
  html.da2 .case-tournoi .banniere-tournoi { min-height: 110px; }
  html.da2 .case-tournoi .corps { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  html.da2 .case-tournoi .actions-tournoi { grid-column: 1; grid-row: auto; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html.da2 .tuile-jour, html.da2 .case-tournoi .carte-tournoi { transition: none; }
  html.da2 .tuile-jour:hover, html.da2 .case-tournoi .carte-tournoi:hover { transform: none; }
}
