/*---------------------- VARIABLES ----------------------*/
:root {
  --green-dark: #01562D;
  --green-light: #99CA3C;
  --yellow: #FFEC00;
  --text: #1e1e1e;
  --bg: #fdfdfd;
  --bg-light: #f1f1f1;
  --font-main: 'Poppins', sans-serif;
}

/*---------------------- RESET ----------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/*---------------------- HEADER ----------------------*/
.header {
  background: white;
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--green-dark);
}
.logo span {
  color: var(--green-light);
}
.navlist {
  display: flex;
  list-style: none;
  gap: 20px;
}
.navlist a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 5px;
  transition: background 0.3s;
}
.navlist a.active,
.navlist a:hover {
  background: var(--green-light);
  color: white;
}

/*---------------------- HERO ----------------------*/
.hero {
  background: url('../../assets/img/home.jpg') no-repeat center center/cover;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}
.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
.btn {
  background: var(--yellow);
  color: black;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}
.btn:hover {
  background: var(--green-dark);
  color: white;
}

/*---------------------- ACTUALITES ----------------------*/
.actualites {
  background: var(--bg-light);
  padding: 80px 0;
  text-align: center;
}
.actualites h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--green-dark);
}
.evenements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.event-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.event-card:hover {
  transform: translateY(-5px);
}
.event-date {
  font-size: 0.9rem;
  color: var(--green-dark);
  margin-bottom: 10px;
  font-weight: bold;
}
.event-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

/*---------------------- CONTACT PAGE ----------------------*/
.contact-page {
  padding: 80px 0;
  background-color: var(--bg-light);
  animation: fadeIn 1s ease-in-out;
}
.section-title {
  font-size: 2.5rem;
  text-align: center;
  color: var(--green-dark);
  margin-bottom: 60px;
}
.contact-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}
.contact-card {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}
.contact-card:hover {
  transform: translateY(-5px);
}
.contact-card h2 {
  font-size: 1.4rem;
  color: var(--green-light);
  margin-bottom: 20px;
}
.contact-card ul {
  list-style: none;
}
.contact-card li {
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
}
.contact-card a {
  color: var(--green-dark);
  text-decoration: underline;
}

/*---------------------- FOOTER ----------------------*/
.footer {
  background: var(--green-dark);
  color: white;
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

/*---------------------- ANIMATIONS ----------------------*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

/* ---------------------- STAFF PAGE ---------------------- */
.staff-subtitle {
  text-align: center;
  font-size: 2rem;
  margin-top: 60px;
  margin-bottom: 30px;
  color: var(--green-dark);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.staff-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  background: white;
}

.staff-card:hover {
  transform: translateY(-6px);
}

.staff-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.staff-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(1, 86, 45, 0.85); /* vert foncé semi-transparent */
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: bold;
}

/* ---------------------- HERO SECTION REUTILISÉ ---------------------- */
.hero {
  background-size: cover;
  background-position: center;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.btn {
  background: var(--yellow);
  color: black;
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
  display: inline-block;
}

.btn:hover {
  background: var(--green-light);
  color: white;
}

/* ---------------------- PAGE SECTION ---------------------- */
.section-page {
  padding: 80px 0;
  background-color: var(--bg-light);
}

.section-text {
  max-width: 800px;
  margin: auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  animation: fadeIn 1s ease-in-out;
}

.section-text p {
  margin-bottom: 20px;
}

.btn-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
}

/* --- Bouton Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}
.hamburger .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  transition: all 0.3s ease;
}

/* --- Navigation responsive --- */
@media (max-width: 768px) {
  .navlist {
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    background: white;
    width: 100%;
    display: none;
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  .navlist.open {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
}

/* --- Animation du bouton hamburger --- */
.hamburger.open .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.open .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.redirect-card {
  background-color: #f0f0f0;
  padding: 1rem;
  margin-top: 1rem;
  border-left: 4px solid #000;
}

/* ---------------------- FORMULAIRE D'INSCRIPTION ---------------------- */
.inscription-page {
  padding: 80px 0;
  background-color: var(--bg-light);
  min-height: 100vh;
}

.inscription-form {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  animation: fadeIn 1s ease-in-out;
}

.form-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--bg-light);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.form-section h3 {
  color: var(--green-dark);
  font-size: 1.4rem;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(153, 202, 60, 0.1);
  background-color: white;
}

.form-group input:invalid {
  border-color: #e74c3c;
}

.checkbox-group {
  margin-bottom: 15px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 12px;
  margin-top: 2px;
  transform: scale(1.2);
}

.form-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--bg-light);
}

.btn-primary {
  background: var(--green-dark);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(1, 86, 45, 0.3);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.message-container {
  max-width: 800px;
  margin: 0 auto 30px;
}

.message {
  padding: 15px 20px;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
  animation: slideDown 0.3s ease;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Classe pour masquer les éléments */
.hidden {
  display: none !important;
}

/* Styles pour les champs en erreur */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Images de fond pour les sections */
.hero-benjas {
  background-image: url('../img/ecubenja.jpg');
}

.hero-etincelles {
  background-image: url('../img/ecuetincelles.jpg');
}

.hero-conquerants {
  background-image: url('../img/ecuconquerants.jpg');
}

.hero-preanimateurs {
  background-image: url('../img/ecupreanimateurs.jpg');
}

/* Responsive pour le formulaire */
@media (max-width: 768px) {
  .inscription-form {
    padding: 20px;
    margin: 0 10px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
  }
}

/*---------------------- ANIMATION DELAYS ----------------------*/
/* Classes pour les délais d'animation des événements */
.delay-0 { animation-delay: 0s; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }
.delay-9 { animation-delay: 0.9s; }
.delay-10 { animation-delay: 1.0s; }
.delay-11 { animation-delay: 1.1s; }
.delay-12 { animation-delay: 1.2s; }
.delay-13 { animation-delay: 1.3s; }
.delay-14 { animation-delay: 1.4s; }
.delay-15 { animation-delay: 1.5s; }
.delay-16 { animation-delay: 1.6s; }
.delay-17 { animation-delay: 1.7s; }
.delay-18 { animation-delay: 1.8s; }
.delay-19 { animation-delay: 1.9s; }
.delay-20 { animation-delay: 2.0s; }
.delay-21 { animation-delay: 2.1s; }
.delay-22 { animation-delay: 2.2s; }
.delay-23 { animation-delay: 2.3s; }
.delay-24 { animation-delay: 2.4s; }
.delay-25 { animation-delay: 2.5s; }
.delay-26 { animation-delay: 2.6s; }
.delay-27 { animation-delay: 2.7s; }
.delay-28 { animation-delay: 2.8s; }
.delay-29 { animation-delay: 2.9s; }
.delay-30 { animation-delay: 3.0s; }

/* ---------------------- STAFF BLUR ADMIN ---------------------- */

.staff-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
  /* Assurer la couverture complète sur mobile/tablette */
  overflow: hidden;
}

.staff-blur-overlay.active {
  display: flex;
}

.blur-message {
  text-align: center;
  color: white;
  background: rgba(1, 86, 45, 0.9);
  padding: 40px 60px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  animation: slideUp 0.5s ease-out;
}

.blur-message h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--yellow);
}

.blur-message p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive pour l'overlay admin */
@media (max-width: 768px) {
  .staff-blur-overlay {
    /* Forcer la hauteur complète sur mobile */
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height pour les navigateurs modernes */
    min-height: 100vh;
    min-height: 100dvh;
    /* Empêcher le scroll sur le body quand l'overlay est actif */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  .blur-message {
    padding: 30px 40px;
    margin: 20px;
  }
  
  .blur-message h2 {
    font-size: 1.5rem;
  }
  
  .blur-message p {
    font-size: 1rem;
  }
}

/* Correction spécifique pour les tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
  .staff-blur-overlay {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

/* Correction pour les navigateurs qui ne supportent pas dvh */
@supports not (height: 100dvh) {
  .staff-blur-overlay {
    height: 100vh;
    min-height: 100vh;
  }
}

/* ---------------------- PRÉANIMATEURS PAGE ---------------------- */
/* Styles spécifiques pour les titres h3 et h4 dans la page préanimateurs */
.section-page h3,
.section-page h4 {
  color: var(--green-light);
}