/*
 * JLMV — Tennis de table
 * Feuille de style autonome (sans dépendance à Tailwind CDN).
 * Contient : design tokens, typographie, animations, et les classes
 * utilitaires nécessaires au site (générées puis figées en CSS classique).
 */

/* Polices auto-hébergées (remplace le chargement via fonts.googleapis.com,
   pour des raisons de confidentialité RGPD et de performance/fiabilité).
   Fichiers attendus dans css/fonts/ — voir instructions de récupération. */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/barlow-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/barlow-700.woff2") format("woff2");
}
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/bebas-neue-400.woff2") format("woff2");
}

:root {
  --radius: 0.625rem;

  --background: oklch(0.985 0.003 250);
  --foreground: oklch(0.204 0.042 250.5);
  --primary: oklch(0.50 0.22 250);
  --primary-foreground: oklch(0.985 0.003 250);
  --secondary: oklch(0.93 0.01 250);
  --muted-foreground: oklch(0.50 0.04 250.5);
  --border: oklch(0.204 0.042 250.5 / 10%);
  --win: oklch(0.6 0.16 145);
  --loss: oklch(0.55 0.22 25);
  --draw: oklch(0.58 0.12 85);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Barlow", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Bebas Neue", sans-serif;
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
}

input, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 1px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;               /* au-dessus du header sticky (z-50) */
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
  transform: translateY(-100%); /* masqué hors écran, mais reste focusable */
}
.skip-link:focus {
  transform: translateY(0);
}

/* Le header est sticky (h-20 = 5rem) : évite qu'il masque le haut du contenu */
main {
  scroll-margin-top: 5rem;
}
main:focus {
  outline: none; /* main n'est pas interactif, pas besoin d'anneau de focus */
}

/* Ping-pong navigation ball */
.ping-ball {
  opacity: 0;
  transform: translateX(-6px);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.nav-item:hover .ping-ball,
.nav-item[data-active="true"] .ping-ball {
  opacity: 1;
  transform: translateX(0);
}

/* Snappy button press */
.press-button {
  transition: transform 0.15s ease;
}

.press-button:hover {
  transform: scale(1.02);
}

.press-button:active {
  transform: scale(0.98);
}

/* Gallery image zoom on hover */
.gallery-img {
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}
.gallery-thumb:focus-visible {
  outline: 3px solid var(--foreground);
  outline-offset: -4px;
}

/* ===== Utilitaires (équivalent Tailwind, généré statiquement) ===== */

.flex { display: flex; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.-left-4 { left: -1rem; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }
.h-full { height: 100%; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-64 { height: 16rem; }
.min-h-screen { min-height: 100vh; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-\[16\/9\] { aspect-ratio: 16 / 9; }
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.text-center { text-align: center; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-12 { grid-column: span 12 / span 12; }
.order-1 { order: 1; }
.order-2 { order: 2; }
.mt-0\.5 { margin-top: 0.125rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.p-2 { padding: 0.5rem; }
.pl-2 { padding-left: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-3 { margin-top: 0.75rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pr-3 { padding-right: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.gap-6 { gap: 1.5rem; }
.mt-6 { margin-top: 1.5rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.p-6 { padding: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-12 { row-gap: 3rem; }
.mt-8 { margin-top: 2rem; }
.p-8 { padding: 2rem; }
.pl-9 { padding-left: 2.25rem; }
.pt-8 { padding-top: 2rem; }
.pb-8 { padding-bottom: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.gap-12 { gap: 3rem; }
.mt-12 { margin-top: 3rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.mt-16 { margin-top: 4rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-xs { max-width: 20rem; }
.max-w-\[40ch\] { max-width: 40ch; }
.max-w-\[48ch\] { max-width: 48ch; }
.max-w-\[56ch\] { max-width: 56ch; }
.max-w-\[70ch\] { max-width: 70ch; }
.font-display { font-family: "Bebas Neue", sans-serif; }
.font-body { font-family: "Barlow", sans-serif; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.list-disc { list-style-type: disc; }
.resize-none { resize: none; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: var(--radius); }
.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.border-b { border-bottom: 1px solid; }
.border-t { border-top: 1px solid; }
.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }
.divide-foreground\/5 > * + * { border-color: color-mix(in oklch, var(--foreground) 5%, transparent); }
.border-foreground\/5 { border-color: color-mix(in oklch, var(--foreground) 5%, transparent); }
.border-foreground\/10 { border-color: color-mix(in oklch, var(--foreground) 10%, transparent); }
.ring-1 { box-shadow: 0 0 0 1px var(--tw-ring-color, currentColor); }
.ring-black\/5 { --tw-ring-color: rgb(0 0 0 / 0.05); }
.ring-foreground\/10 { --tw-ring-color: color-mix(in oklch, var(--foreground) 10%, transparent); }
.ring-primary { --tw-ring-color: var(--primary); }
.bg-background { background-color: var(--background); }
.bg-background\/90 { background-color: color-mix(in oklch, var(--background) 90%, transparent); }
.bg-foreground { background-color: var(--foreground); }
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-transparent { background-color: transparent; }
.text-foreground { color: var(--foreground); }
.text-foreground\/40 { color: color-mix(in oklch, var(--foreground) 40%, transparent); }
.text-foreground\/60 { color: color-mix(in oklch, var(--foreground) 65%, transparent); }
.text-foreground\/70 { color: color-mix(in oklch, var(--foreground) 70%, transparent); }
.text-foreground\/80 { color: color-mix(in oklch, var(--foreground) 80%, transparent); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-background { color: var(--background); }
.text-background\/60 { color: color-mix(in oklch, var(--background) 60%, transparent); }
.text-background\/70 { color: color-mix(in oklch, var(--background) 70%, transparent); }
.text-background\/80 { color: color-mix(in oklch, var(--background) 80%, transparent); }
.text-muted-foreground { color: var(--muted-foreground); }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.2s; transition-timing-function: ease; }
.transition-shadow { transition-property: box-shadow; transition-duration: 0.2s; transition-timing-function: ease; }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:bg-secondary:hover { background-color: var(--secondary); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.hover\:underline:hover { text-decoration: underline; }
.focus\:border-primary:focus { border-color: var(--primary); }
.group:hover .group-hover\:text-primary { color: var(--primary); }
.group:hover .group-hover\:underline { text-decoration-line: underline; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.list-none { list-style: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .sm\:col-span-1 { grid-column: span 1 / span 1; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .md\:w-2\/5 { width: 40%; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:flex-row { flex-direction: row; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:order-1 { order: 1; }
  .lg\:order-2 { order: 2; }
  .lg\:px-12 { padding-left: 3rem; padding-right: 3rem; }
  .lg\:px-24 { padding-left: 6rem; padding-right: 6rem; }
  .lg\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .lg\:p-12 { padding: 3rem; }
  .lg\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .lg\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* Home : image d'illustration en format réduit, détachée du bord droit */
.home-media {
  padding: 0 1.5rem 2.5rem;      /* aligné sur le px-6 du bloc texte (mobile) */
}
.home-media img {
  display: block;
  width: 100%;
  height: auto;                  /* ratio naturel de l'image, aucun rognage */
  border-radius: 0.75rem;
}

@media (min-width: 1024px) {
  .home-split {
    align-items: center;         /* image centrée face au texte */
  }
  .home-media {
    flex: 0 0 auto;
    width: 32%;
    max-width: 400px;
    margin-right: 4rem;          /* décolle l'image du bord droit */
    padding: 0;
  }
  .home-media img {
    max-height: 300px;
  }
}

/* Compléments (icônes de taille fixe + espacement manquant) */
.pl-5 { padding-left: 1.25rem; }
.size-1\.5 { width: 0.375rem; height: 0.375rem; }
.size-3 { width: 0.75rem; height: 0.75rem; }
.size-4 { width: 1rem; height: 1rem; }
.size-5 { width: 1.25rem; height: 1.25rem; }
.size-6 { width: 1.5rem; height: 1.5rem; }
.size-8 { width: 2rem; height: 2rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Bannières de confirmation/erreur du formulaire de contact.
   Masquées par défaut, affichées uniquement quand contact.php redirige vers
   contact.html#form-envoye ou contact.html#form-erreur (pseudo-classe :target,
   aucun JavaScript nécessaire). */
.confirmation-banner {
  display: none;
  margin-top: 2rem;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: var(--radius);
  padding: 1rem;
}
#form-envoye:target,
#form-erreur:target {
  display: flex;
}
.confirmation-success {
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
}
.field-error {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: oklch(0.45 0.17 25);          /* rouge foncé : 6,6:1 sur le fond du formulaire */
}

/* ===== Galerie : menu déroulant d'albums + lightbox ===== */
.album-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 22rem;
}
.album-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius, 0.5rem);
  border: 1px solid color-mix(in oklch, var(--foreground) 12%, transparent);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.album-dropdown-toggle:hover,
.album-dropdown-toggle[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 8px 10px -6px rgb(0 0 0 / 0.08);
}
.album-dropdown-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.01em;
}
.album-dropdown-label #album-dropdown-current {
  color: var(--primary);
}
.album-dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.album-dropdown-toggle[aria-expanded="true"] .album-dropdown-chevron {
  transform: rotate(180deg);
}
.album-dropdown-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 100%;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border-radius: var(--radius, 0.5rem);
  border: 1px solid color-mix(in oklch, var(--foreground) 10%, transparent);
  background: var(--background);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.08);
}
.album-dropdown-panel[hidden] { display: none; }
.album-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: calc(var(--radius, 0.5rem) - 0.2rem);
  font-size: 0.8rem;
  color: var(--foreground);
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.album-option:hover {
  background: var(--secondary);
}
li[aria-selected="true"] .album-option {
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  font-weight: 700;
}
.album-option-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
li[aria-selected="true"] .album-option-count {
  color: var(--primary);
  opacity: 0.75;
}

.gallery-thumb {
  cursor: pointer;
}
.gallery-item {
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.gallery-item[hidden] { display: none; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.pagination[hidden] { display: none; }
.pagination-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pagination-arrow,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: var(--radius, 0.5rem);
  border: 1px solid color-mix(in oklch, var(--foreground) 12%, transparent);
  background: var(--background);
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pagination-arrow:hover,
.pagination-page:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-page.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground, #fff);
  cursor: default;
}
.pagination-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination-arrow:disabled:hover {
  border-color: color-mix(in oklch, var(--foreground) 12%, transparent);
  color: var(--foreground);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklch, black 88%, transparent);
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}
.lightbox-caption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: color-mix(in oklch, white 80%, transparent);
  text-transform: uppercase;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: color-mix(in oklch, white 12%, transparent);
  color: white;
  transition: background-color 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: color-mix(in oklch, white 22%, transparent);
}
.lightbox-close {
  top: -0.5rem;
  right: -0.5rem;
}
.lightbox :focus-visible {
  outline-color: #fff;
}
@media (max-width: 640px) {
  .lightbox-close { top: 0.5rem; right: 0.5rem; }
}
.lightbox-prev { left: -1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
}

.confirmation-error {
  background: color-mix(in oklch, oklch(0.55 0.22 25) 12%, transparent);
  color: oklch(0.55 0.22 25);
}

/* Liste de dates (calendrier des journées de championnat) */
.date-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem 1.5rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}
.date-list li {
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 3px solid var(--primary);
  font-size: 0.7em;
}
.date-list-j {
  font-weight: 600;
  color: var(--primary);
}

.steps {
  list-style: decimal outside;
  padding-left: 2.25rem;
}
.steps li {
  padding-left: 0.25rem;
}
.steps li::marker {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.25rem;
  color: #53a3f2; /* voir remarque ci-dessous */
}

/* ===== Tableau de résultats de championnat ===== */
.results-wrap {
  overflow: hidden;
  overflow-x: auto;
}
table.results {
  width: 100%;
  border-collapse: collapse;
}
table.results thead th {
  text-align: left;
  padding: 0.3rem 0.25rem;
  background: var(--secondary);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
table.results tbody td {
  padding: 0.3rem 0.25rem;
  border-top: 1px solid color-mix(in oklch, var(--foreground) 5%, transparent);
  font-size: 0.75rem;
  vertical-align: middle;
}

.badge-division {
  display: inline-block;
  background: var(--secondary);
  color: var(--foreground);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.4rem;
  border-radius: 9999px;
}

.team-jouy {
  color: var(--primary);
  font-weight: 700;
}
.team-adverse {
  color: var(--foreground);
  opacity: 0.8;
}
.vs-sep {
  color: var(--muted-foreground);
  font-size: 0.62rem;
  margin: 0 0.2rem;
}

.badge-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.8rem;
}
.badge-result.win {
  background: color-mix(in oklch, var(--win) 15%, transparent);
  color: var(--win);
}
.badge-result.loss {
  background: color-mix(in oklch, var(--loss) 12%, transparent);
  color: var(--loss);
}
.badge-result.draw {
  background: color-mix(in oklch, var(--draw) 12%, transparent);
  color: var(--draw);
}

.score-cell {
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ===== Critérium individuel ===== */
.badge-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: color-mix(in oklch, var(--primary) 12%, transparent);
  color: var(--primary);
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.85rem;
}

.badge-rank {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  text-align: center;
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}
.badge-rank.rank-1 { background: color-mix(in oklch, oklch(0.8 0.15 85) 30%, transparent);  color: oklch(0.45 0.1 85); }
.badge-rank.rank-2 { background: color-mix(in oklch, oklch(0.75 0.01 250) 35%, transparent); color: oklch(0.40 0.02 250); }
.badge-rank.rank-3 { background: color-mix(in oklch, oklch(0.7 0.12 55) 28%, transparent);   color: oklch(0.42 0.1 55); }

/* En-têtes de ligne du corps du tableau (catégorie, division, joueur) :
   on neutralise le style par défaut des <th> (gras, centré, 1rem) */
table.results tbody th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--foreground);
  vertical-align: middle;
  padding: 0.3rem 0.25rem;
  border-top: 1px solid color-mix(in oklch, var(--foreground) 5%, transparent);
}

/* Catégorie / division sur plusieurs lignes : alignées sur le 1er joueur */
table.results tbody th[rowspan] {
  vertical-align: top;
}

/* Colonnes Cat. et Div. étroites, le reste de la place va au joueur */
table.results-individuel thead th:nth-child(1),
table.results-individuel thead th:nth-child(2) {
  width: 1%;
  white-space: nowrap;
  padding-right: 1rem;
}
table.results-individuel tbody th:not([headers]) {
  padding-right: 1rem;
}

/* Trait de séparation entre deux catégories */
table.results tbody + tbody > tr:first-child > th,
table.results tbody + tbody > tr:first-child > td {
  border-top: 2px solid color-mix(in oklch, var(--foreground) 20%, transparent);
}

/* Séparateur entre deux divisions d'une même catégorie */
table.results tbody tr:has(> th:not([headers])) > * {
  border-top: 2px solid color-mix(in oklch, var(--foreground) 10%, transparent);
}

/* ===== Actualités : image réduite au format vignette ===== */
.news-thumb {
  flex: 0 0 auto;
  width: 160px;
  height: 120px;
  margin: 1.5rem 0 0 2rem;      /* mobile : en haut, alignée sur le texte (p-8) */
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05);
}
.news-thumb--contain {
  object-fit: contain;          /* logos : pas de rognage */
  background: #fff;
}
@media (min-width: 768px) {
  .news-thumb {
    align-self: center;         /* vignette centrée verticalement sur le contenu */
    margin: 2rem 0 2rem 2rem;
  }
}
@media (min-width: 1024px) {
  .news-thumb {
    margin: 3rem 0 3rem 3rem;   /* symétrique, aligné sur le padding lg:p-12 du texte */
  }
}