/* =========================================
   Thème global La Boule Méessoise
   Rouge / Noir – Dark mode
   ========================================= */

:root {
  --red: #e02424;
  --red-soft: #ff4b4b;
  --red-dark: #7f1d1d;
  --bg-dark: #050509;
  --bg-card: #0b0b0f;
  --text-main: #f5f5f5;
  --text-muted: #d1d5db;
  --border-soft: rgba(255, 255, 255, 0.08);
}

/* ===== Reset de base ===== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top, #1a1a1f, var(--bg-dark) 60%);
  color: var(--text-main);
  line-height: 1.6;
}

/* Liens */

a {
  color: var(--red-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================================
   HEADER COMMUN
   ========================================= */

header {
  background: #000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo à gauche */

.logo {
  width: 70px;
  border-radius: 10%;
  box-shadow: 0 0 12px rgba(224, 36, 36, 0.6);
  flex-shrink: 0;
}

/* Bloc titre central */

.header-title-block {
  text-align: center;
  flex-grow: 1;
}

header h1 {
  color:var(--red-soft);
  font-size: 1.6rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.9;
}

/* Bouton à droite (Retour au menu) */

.image1 {
  text-align: right;
  flex-shrink: 0;
}

.image2 {
  text-align: center;
  flex-shrink: 0;
}

.image1 button {
  background: linear-gradient(135deg, var(--red), var(--red-soft));
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255, 50, 50, 0.45);
  transition: 0.2s ease;
  white-space: nowrap;
}

.image1 button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 50, 50, 0.6);
}

.image1 button:active {
  transform: translateY(0);
}


.image2 button {
  background: linear-gradient(135deg, var(--red), var(--red-soft));
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255, 50, 50, 0.45);
  transition: 0.2s ease;
  white-space: nowrap;
}

.image2 button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 50, 50, 0.6);
}

.image2 button:active {
  transform: translateY(0);
}

/* Version bouton générique réutilisable */

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-soft));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 50, 50, 0.4);
  transition: 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 50, 50, 0.65);
}

/* =========================================
   LAYOUT GLOBAL
   ========================================= */

main {
  max-width: 1100px;
  margin: 2rem auto 3rem;
  padding: 0 1rem 2rem;
}

/* Titre de page */

.page-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.page-subtitle {
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
}

/* =========================================
   CARTES (sections avec fond sombre)
   ========================================= */

.card {
  background: rgba(10, 10, 14, 0.96);
  border-radius: 16px;
  padding: 1.6rem 1.5rem 1.8rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-soft);
  position: relative;
}

.card--accent {
  border-left: 4px solid var(--red);
}

/* Titre de section */

h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 1.3rem;
  color: var(--red-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

h2::before {
  content: "";
  width: 7px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red-soft), var(--red-dark));
}

/* Sous-titres dans les cartes */

h3 {
  margin: 14px 0 8px;
  font-size: 1.05rem;
  text-transform: uppercase;
  color: #ffdddd;
}

/* Texte */

p {
  margin-bottom: 0.9rem;
  color: var(--text-main);
}

/* Petites notes */

.note,
.small-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.note {
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: linear-gradient(to right, #111827, #1f2933);
  border: 1px solid rgba(248, 113, 113, 0.6);
}

/* =========================================
   TABLEAUX
   ========================================= */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  color: #e5e7eb;
}

th {
  background: radial-gradient(circle at top, var(--red-dark), #111827);
  font-weight: 600;
  color: #f9fafb;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.8);
}

tr:nth-child(odd) td {
  background: rgba(15, 15, 20, 0.9);
}

/* Centrage optionnel d’un tableau */

.table-centered {
  margin: 0 auto;
  width: 80%;
}

.table-centered th,
.table-centered td {
  text-align: center;
}

/* =========================================
   GRILLES & CARTES SPÉCIFIQUES
   (sponsors, qualifs, événements…)
   ========================================= */

/* Grille sponsors */

.grid-sponsors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.grid-sponsors img {
  width: 100%;
  background: #111;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 27, 27, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  transition: 0.25s ease;
}

.grid-sponsors img:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--red-soft);
  box-shadow: 0 0 18px rgba(255, 75, 75, 0.7);
}

/* Grille d’événements (calendrier jeunes, qualifs…) */

.events-grid,
.qualifs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.event,
.card-qualif {
  background: rgba(15, 15, 22, 0.96);
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(248, 113, 113, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  transition: 0.2s ease;
  text-align: center;
}

.event:hover,
.card-qualif:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(248, 113, 113, 0.4);
  border-color: var(--red-soft);
}

.event-title,
.type {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: #ffeded;
}

/* Bouton dans les cartes (qualifs) */

.tag-btn {
  background: linear-gradient(135deg, var(--red-soft), var(--red));
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  color: white;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  margin-top: 6px;
  box-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
  transition: 0.2s ease;
}

.tag-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(255, 50, 50, 0.8);
}

/* Tags */

.tag {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #ff9999;
  letter-spacing: 0.08em;
}

/* Liste d’événements (Objectifs, programme sportif…) */

.event-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.event-item {
  background: linear-gradient(90deg, rgba(212, 0, 0, 0.25), rgba(0, 0, 0, 0.9));
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 4px solid var(--red);
}

.event-item strong {
  font-size: 0.98rem;
  color: #ffffff;
  text-transform: uppercase;
}

.event-item span {
  font-size: 0.9rem;
  display: block;
  margin-top: 3px;
  color: #f0eaea;
}

/* =========================================
   FOOTER
   ========================================= */

footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  opacity: 0.9;
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablettes / petits écrans paysage */
@media (max-width: 900px) {
  main {
    padding: 0 0.75rem 2rem;
  }

  header h1 {
    font-size: 1.3rem;
  }
}

/* Smartphones */
@media (max-width: 700px) {
  header {
    padding: 0.6rem 0.4rem;
  }

  .header-content {
    flex-direction: column;        /* tout passe en colonne */
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
  }

  /* Logo en haut, centré */
  .logo {
    order: 1;
    margin-bottom: 0.1rem;
  }

  /* Titre au milieu */
  .header-title-block {
    order: 2;
  }

  header h1 {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }

  .header-subtitle {
    font-size: 0.85rem;
  }

  /* Bouton en bas, pleine largeur */
  .image1 {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .image1 button {
    width: 100%;
    max-width: 260px;
  }

  /* Tables : défilement horizontal sur mobile */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-spacing: 0;
  }

  th, td {
    white-space: nowrap;
    font-size: 0.85rem;
  }
}
