/* ====== Base ====== */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* Animation fade-in globale */
.site-header, .site-footer {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInMove 0.8s ease forwards;
}
.site-footer {
  transform: translateY(10px);
  animation-delay: 0.4s;
}
@keyframes fadeInMove {
  to { opacity: 1; transform: translateY(0); }
}

/* ====== Conteneur ====== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ====== Header ====== */
.site-header {
  background: #1a1a1a;
  color: #fff;
  padding: 15px 0;
}
.logo a {
  font-size: 1.6em;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

/* ====== Navigation ====== */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}
.btn-nav {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: #ff6600;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-nav:hover {
  background: #e65c00;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* ====== Dropdown ====== */
.dropdown { position: relative; }

/* Flèche animée premium */
.arrow {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.25, 1.25, 0.5, 1.0);
}
.dropdown:hover .arrow { transform: rotate(180deg); }

/* Menu déroulant animé */
.dropdown-menu {
  display: block;
  position: absolute;
  top: 100%; left: 0;
  background: #444;
  min-width: 160px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 999;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

/* Effet cascade sur les liens */
.dropdown-menu li {
  display: block;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dropdown-menu a {
  display: block;
  padding: 10px;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s;
}
.dropdown-menu a:hover { background: #555; }

/* Desktop: affichage au survol */
.dropdown:hover .dropdown-menu {
  max-height: 500px;
  opacity: 1;
}
.dropdown:hover .dropdown-menu li {
  opacity: 1;
  transform: translateY(0);
}
.dropdown:hover .dropdown-menu li:nth-child(1) { transition-delay: 0.1s; }
.dropdown:hover .dropdown-menu li:nth-child(2) { transition-delay: 0.2s; }
.dropdown:hover .dropdown-menu li:nth-child(3) { transition-delay: 0.3s; }

/* ====== Burger menu (mobile) ====== */
.menu-toggle {
  display: none;
  font-size: 1.8em;
  cursor: pointer;
  color: #fff;
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
    width: 100%;
    background: #1a1a1a;
  }
  .main-nav.open { max-height: 500px; }

  .main-nav ul {
    flex-direction: column;
    padding: 10px;
    gap: 0;
  }
  .main-nav ul li { margin: 10px 0; }

  /* Dropdown en accordéon vertical sur mobile */
  .dropdown-menu {
    position: static;
    border-radius: 0;
    background: #444;
    box-shadow: none;
    max-height: 0;
    opacity: 1;
    overflow: hidden;
  }
}

/* ====== Footer ====== */
.site-footer {
  background: #222;
  color: #ccc;
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
}
.site-footer p { margin: 0; }

.footer-links {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 10px 0 0;
  padding: 0;
  justify-content: center;
}
.footer-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  background: #444;
  color: #fff;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}
.footer-links a:hover {
  background: #ff6600;
  transform: translateY(-2px);
}

/* ====== Admin button ====== */
.btn-admin-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  background: #444;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-admin-link:hover {
  background: #ff6600;
  transform: translateY(-2px);
}

/* ====== Cookie UI ====== */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  color: #f5f5f5;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  text-align: center;
  z-index: 9999;
}
#cookie-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.cookie-modal-content {
  background: #1e1e1e;
  padding: 25px;
  border-radius: 12px;
  color: #f5f5f5;
  max-width: 400px;
  text-align: left;
}
#open-preferences2 {
  padding: 10px 18px;
  border: 2px solid #ff6600;
  border-radius: 6px;
  background: transparent;
  color: #ff6600;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#open-preferences2:hover {
  background: #ff6600;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

#open-preferences2:active {
  transform: translateY(0);
  box-shadow: none;
}