/* ========== RESET & BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f0;
  color: #1a1a1a;
  line-height: 1.6;
}

/* ========== HEADER ========== */
header {
  background: #f5f5f0;
  color: #1a1a1a;
  padding: 25px 20px;
  text-align: center;
  border-bottom: 3px solid #7a9e7e;
}

header h1 {
  font-size: 2em;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 1px;
}

header .subtitle {
  color: #7a9e7e;
  font-size: 1em;
  margin-top: 5px;
}

/* ========== NAVIGATION ========== */
nav {
  background: #111111;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: #ccc;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

nav a:hover {
  background: #7a9e7e;
  color: white;
}

nav a.active {
  background: #7a9e7e;
  color: white;
  font-weight: bold;
}

/* ========== HERO ========== */
.hero {
  background: #1a1a1a;
  color: white;
  text-align: center;
  padding: 80px 20px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero h2 {
  font-size: 2.2em;
  margin-bottom: 15px;
  color: white;
}

.hero p {
  font-size: 1.1em;
  color: #ccc;
  margin-bottom: 30px;
}

/* ========== BOUTONS ========== */

.btn {
  background: #7a9e7e;
  color: white !important;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #5c7d60;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(122, 158, 126, 0.3);
}

/* ========== SECTIONS ========== */
.section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.section h2 {
  font-size: 1.8em;
  margin-bottom: 25px;
  text-align: center;
  color: #1a1a1a;
  position: relative;
  padding-bottom: 12px;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #7a9e7e;
  border-radius: 2px;
}

/* ========== CARDS ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 3px solid #7a9e7e;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card h3 {
  font-size: 1.1em;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.card p {
  color: #555;
  font-size: 0.95em;
}

.card a {
  color: #7a9e7e;
  text-decoration: none;
  font-weight: bold;
}

.card a:hover {
  text-decoration: underline;
}

/* ========== ICONES ========== */
.icon {
  font-size: 2.5em;
  margin-bottom: 15px;
}

/* ========== RÉSULTATS ========== */
.resultat-card {
  background: white;
  border-radius: 12px;
  padding: 20px 25px;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  border-left: 4px solid #7a9e7e;
  transition: transform 0.3s ease;
}

.resultat-card:hover {
  transform: translateX(5px);
}

.medaille {
  font-size: 2em;
  min-width: 50px;
  text-align: center;
}

.resultat-info h3 {
  font-size: 1em;
  margin-bottom: 5px;
  color: #1a1a1a;
}

.resultat-info p {
  color: #555;
  font-size: 0.9em;
}

.resultat-info a {
  color: #7a9e7e;
  text-decoration: none;
  font-weight: bold;
}

/* ========== TABLEAUX ========== */
table thead tr {
  background: #1a1a1a !important;
  color: white;
}

table tbody tr:hover {
  background: #f0f4f0;
}

/* ========== GALERIE ========== */
.galerie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.galerie-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
}

.galerie-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.galerie-item:hover img {
  transform: scale(1.05);
}

.galerie-item .legende {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 26, 26, 0.85);
  color: white;
  padding: 8px 12px;
  font-size: 0.85em;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.galerie-item:hover .legende {
  transform: translateY(0);
}

.galerie-categorie {
  margin: 40px 0 15px;
  color: #7a9e7e;
  font-size: 1.3em;
  border-bottom: 2px solid #7a9e7e;
  padding-bottom: 8px;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.lightbox .legende-lb {
  color: #ccc;
  margin-top: 15px;
  font-size: 1em;
}

.lightbox .fermer {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2em;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.3s ease;
}

.lightbox .fermer:hover {
  color: #7a9e7e;
}

/* ========== FORMULAIRE ========== */
input:focus, textarea:focus {
  outline: none;
  border-color: #7a9e7e !important;
  box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.15);
}

/* ========== FOOTER ========== */
footer {
  background: #1a1a1a;
  color: #aaa;
  text-align: center;
  padding: 25px 20px;
  margin-top: 60px;
  font-size: 0.9em;
}

footer a {
  color: #7a9e7e;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5em;
  }

  .hero h2 {
    font-size: 1.6em;
  }

  nav a {
    font-size: 0.8em;
    padding: 6px 10px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .resultat-card {
    flex-direction: column;
    gap: 10px;
  }

  table {
    font-size: 0.85em;
  }
}
