/* ==========================================
   CONGRÈS & ATELIERS - VERSION AMÉLIORÉE
   ========================================== */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #333;
  line-height: 1.6;
}

/* --- HEADER --- */
.header {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #0077b6 0%, #08afd1 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: url('../image/headercongres.png') center/cover no-repeat;
  filter: blur(2px);
  transform: scale(1.05);
  z-index: 1;
  animation: pulse 15s ease-in-out infinite;
}
.header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 2;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.header h1 {
  margin-bottom: 15px;
  font-size: 2.8rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header p {
  font-size: 1.2rem;
  font-weight: 300;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}

/* --- TITRES DE SECTION --- */
h2 {
  color: #0077b6;
  text-align: center;
  margin-top: 80px;
  margin-bottom: 50px;
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 20px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #0077b6, #08afd1);
  border-radius: 2px;
}

/* --- SECTIONS ÉVÉNEMENTS --- */
.events-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Message "Aucun événement" */
.no-events-message {
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.08);
  margin: 0 auto;
  max-width: 600px;
}

.no-events-message p {
  color: #6c757d;
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.8;
}

.no-events-message p::before {
  content: "📅";
  display: block;
  font-size: 3rem;
  margin-bottom: 20px;
}

/* --- CARTES ÉVÉNEMENTS --- */
.event-card {
  display: flex;
  flex-wrap: wrap;
  background: white;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 119, 182, 0.1);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card img {
  width: 100%;
  max-width: 350px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover img {
  transform: scale(1.05);
}

.event-info {
  flex: 1;
  padding: 35px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 300px;
}

.event-info h3 {
  color: #0077b6;
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.event-info p {
  color: #495057;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.7;
}

.event-info p strong {
  color: #0077b6;
  font-weight: 600;
}

/* --- BOUTONS --- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #0077b6 0%, #08afd1 100%);
  color: white;
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 119, 182, 0.3);
  align-self: flex-start;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.4);
  background: linear-gradient(135deg, #005f8f 0%, #06a0c0 100%);
}

/* --- GALERIE --- */
.gallery {
  max-width: 1200px;
  margin: 80px auto;
  padding: 40px 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  height: 220px;
  box-shadow: 0 8px 25px rgba(0, 119, 182, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 119, 182, 0.25);
}

/* --- RESSOURCES --- */
.resources {
  max-width: 900px;
  margin: 80px auto 60px;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 119, 182, 0.1);
}

.resources h2 {
  margin-top: 0;
  text-align: left;
  padding-bottom: 20px;
}

.resources h2::after {
  left: 0;
  transform: translateX(0);
}

.resources ul {
  list-style-type: none;
  padding: 0;
}

.resources li {
  margin-bottom: 16px;
  padding-left: 30px;
  position: relative;
}

.resources li::before {
  content: '📄';
  position: absolute;
  left: 0;
  top: 0;
}

.resources a {
  color: #0077b6;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.resources a:hover {
  color: #08afd1;
  padding-left: 8px;
}

/* --- FOOTER --- */
.footer {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #0077b6 0%, #08afd1 100%);
  color: white;
  margin-top: 80px;
  font-size: 0.95rem;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 992px) {
  .header {
    padding: 60px 20px;
  }

  .header h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.9rem;
    margin-top: 60px;
  }

  .event-card {
    flex-direction: column;
  }

  .event-card img {
    max-width: 100%;
    height: 280px;
  }

  .event-info {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 50px 15px;
  }

  .header h1 {
    font-size: 1.9rem;
  }

  .header p {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.7rem;
    margin-top: 50px;
    margin-bottom: 35px;
  }

  .events-section {
    padding: 0 15px;
  }

  .event-info {
    padding: 25px;
  }

  .event-info h3 {
    font-size: 1.4rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .gallery-grid img {
    height: 180px;
  }

  .resources {
    padding: 30px 25px;
    margin: 60px 15px 40px;
  }

  .no-events-message {
    padding: 50px 30px;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .event-info {
    padding: 20px;
  }

  .event-info h3 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .resources {
    padding: 25px 20px;
  }
}
