/* styles.css */
.icon .fa{
    color: #f44336;
    margin: 0 13px;
    cursor: pointer;
    padding: 18px 0;
}

:root {
  --bg-color: #0f0f0f;
  --primary-color: #1e90ff;
  --accent-color: #fcd34d;
  --text-color: #ffffff;
  --secondary-color: #1f2937;
  --max-width: 1400px;
}

body {
  margin: 0;
  /*background-color: var(--bg-color);*/
  color: var(--text-color);
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

body, .spacer, main, .main-content {
  background: #1f2937 !important;
}

/*.spacer {
  background: #1f2937 !important;
}*/
.spacer {
  height: 130px; /* 80px espace réservé pour le header fixé */
}

/*section, main {
  background: #181a29;
}*/


header {
  background-color: var(--secondary-color);
  padding: 1rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  min-height: 65px; /* sécurité hauteur logo */
}

.header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; /* utile pour positionnement mobile */
  
}


header > * {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

/* Ajout obligatoire : Empêche l'écartement du logo et du texte */
.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* ajuste pour rapprocher ou espacer */
  flex-shrink: 0;
}


.logo-container {
  
  padding: 0.1rem;
  text-align: center;
}

.logo-container img {
  width: 100%;
  max-width: 50px;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* ombre douce */
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 38px;
  min-height: 38px;
}

.logo-container img:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}


.logo {
  font-size: 1.8rem;
  color: var(--accent-color);
  font-weight: bold;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  flex-shrink: 0;
}

.logo-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
}

.logo .subtitle {
  font-size: 0.75rem;
  font-weight: normal;
  color: #00CAFF;
}

.nav {
  display: flex;
  align-items: center;
}

/* Navigation principale // ajout 01072025*/   
nav.nav {
  transition: opacity 0.4s, max-height 0.4s;
  width: 100%;
  left: 0;
  top: 100%;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  /* display: none; handled by classes */
  background-color: var(--secondary-color);
  position: absolute;
  z-index: 1200;
}

/* Desktop : menu principal visible */
.nav-desktop {
  display: flex;
}


nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-list a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
}

/* Ajout d'une classe pour les liens actifs */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--accent-color);
  font-weight: bold;
  margin-left: auto;
}

/*----Freshly added---------*/
/*#user-info.hidden,
#menu-login.hidden,
#menu-profile.hidden,
#menu-logout.hidden {
  display: none !important;
}*/

.header-right.user-session {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#user-info span {
  font-weight: bold;
  color: var(--accent-color);
}

#login-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

#profile-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}
/*----------------------------------------------*/

#logout-btn, #logout-btn-menu {
  background: transparent;
  border: 1px solid var(--accent-color);
  padding: 5px 10px;
  color: var(--accent-color);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-weight: bold;
}

#logout-btn:hover, #logout-btn-menu:hover {
  background: var(--accent-color);
  color: #000;
}

#user-info.hidden,
#menu-login.hidden,
#menu-profile.hidden,
#menu-logout.hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

/* Navigation responsive */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  gap: 5px;
  width: 40px;
  height: 40px;
  z-index: 1100;
}

.burger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  border-radius: 2px;
  transition: transform 0.4s ease, opacity 0.3s ease, background-color 0.3s ease;
  display: block;
  position: relative;
}

/* Transformation en X */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}


.banner {
  position: relative;
  text-align: center;
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-shadow: 0 0 5px #000;
  padding: 1rem;
}

.banner-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

.games,
.info {
  padding: 2rem;
  background-color: var(--secondary-color);
  width: 100%;
  margin: 0;
}

.games h2,
.info h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.game-card {
  background-color: #1c1c1e;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease;
}

.game-card:hover {
  transform: scale(1.05);
}

.game-card img {
  width: 100%;
  height: auto;
  display: block;
}

.game-card p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}
/* ----info pratique des heures d'ouverture et contact----- */
.info ul {
  list-style: none;
  padding: 0;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.info {
      padding: 2rem;
      background-color: var(--secondary-color);
      width: 100%;
      margin: 0;
    }

.info-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  text-align: center;
}

.info-item:hover {
      transform: translateY(-6px);
      box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}
.info-grid.visible {
      opacity: 1;
      transform: translateY(0);
}

@keyframes fadeSlideIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }


.info-item {
  background-color: #1c1c1e;
  padding: 1rem;
  border-radius: 10px;
  flex: 1 1 250px;
  min-width: 200px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  animation: fadeSlideIn 0.6s ease-out forwards;
  text-align: center;
}

.info-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.animated-cards .info-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 0.6s ease-out forwards;
}

.animated-cards .info-item:nth-child(2) {
  animation-delay: 0.2s;
}
.animated-cards .info-item:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-item h3 {
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.info-item p {
  margin: 0;
  font-size: 0.95rem;
}


footer {
  background-color: #000000;
  color: #aaa;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  margin: 0;
}

/*--------------------------------------------------------------------------*/

/* Bouton Connexion */
#nav-login a,
#login-link {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

#nav-login a:hover,
#login-link:hover {
  background-color: var(--accent-color);
  color: #000;
  text-decoration: none;
}


/* Bouton Déconnexion */
#nav-logout-btn,
#logout-btn,
#logout-btn-menu {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 6px 20px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#nav-logout-btn:hover,
#logout-btn:hover,
#logout-btn-menu:hover {
  background-color: var(--accent-color);
  color: #000;
}

#nav-user-name {
  display: inline-block;
  max-width: fit-content;
  padding: 6px 12px;
  margin: 0;
  background-color: rgba(252, 211, 77, 0.15);
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  border-radius: 6px;
  white-space: nowrap;
}


#nav-user-name::after {
  content: " ●";
  color: #4caf50;
  font-size: 0.8rem;
}

#nav-user-name:hover {
  background-color: rgba(252, 211, 77, 0.2);
  cursor: pointer;
}



/*-----------------------------------------------------------*/

.dropdown {
  position: relative;
}

/* Bouton visible */
.user-dropdown-toggle {
  color: var(--accent-color);
  font-weight: bold;
  padding: 6px 14px;
  background-color: rgba(252, 211, 77, 0.1);
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
}

/* Menu déroulant caché par défaut */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background-color: #2c2c2e;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 0.5rem 0;
  list-style: none;
  width: max-content;
  min-width: 180px;
  max-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 9999;
}


.dropdown-menu li {
  padding: 0.5rem 1rem;
  text-align: center;
}

.dropdown-menu li a,
.dropdown-menu li button {
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  font-size: 0.95rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-menu li:hover {
  background-color: #333;
}

.dropdown-menu.visible {
  display: block;
}

.user-dropdown-toggle .arrow {
  transition: transform 0.3s ease;
}

.dropdown-menu.visible + .arrow,
.dropdown:hover .arrow {
  transform: rotate(180deg);
}


.dropdown-menu li button {
  display: block;
  width: 100%;
  text-align: center; 
  color: #fff;
  background: none;
  border: none;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
}


/*------------------------- Responsive styles---------------------- */
@media (max-width: 768px) {

  header > * {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-content {
    flex-direction: row;
    justify-content: space-between;
    /*align-items: center;*/
    
  }

 
  .logo-container img {
    max-width: 40px;
  }

  .logo-title {
    font-size: 1.3rem;
  }

  .logo-subtitle {
    font-size: 0.75rem;
  }
/* ----------Responsive navigation-------------- */
  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .nav-desktop {
    display: none; /* Cacher le menu desktop */
  }
  .burger {
    display: flex;
  }

  .nav {
  display: none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  background-color: var(--secondary-color);
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  padding: 0 1rem;
}

  .nav.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); /* Ombre douce en bas */
  max-height: 500px; /* assez grand pour tous les liens visibles */
  padding: 1rem;
}

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    /*padding: 1rem;*/
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0;
    margin: 0;
  }

 /* Animation fade-in delay pour chaque lien */
  .nav-list li {
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInMenu 0.5s ease forwards;
  }

  .nav.active .nav-list li {
      animation-name: fadeInMenu;
  } 

.nav.active .nav-list li:nth-child(1) { animation-delay: 0.1s; }
.nav.active .nav-list li:nth-child(2) { animation-delay: 0.2s; }
.nav.active .nav-list li:nth-child(3) { animation-delay: 0.3s; }
.nav.active .nav-list li:nth-child(4) { animation-delay: 0.4s; }
.nav.active .nav-list li:nth-child(5) { animation-delay: 0.5s; }
.nav.active .nav-list li:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav:not(.active) .nav-list li {
  opacity: 0;
  transform: translateY(-10px);
}

 .info-grid {
        flex-direction: column;
        align-items: center;
        padding: 0 1rem;
  }


/* ---------------Banner styles------------------ */
  .banner-text h1 {
    font-size: 1.5rem;
  }

  .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .games-list {
    flex-direction: column;
    align-items: center;
  }

  .game-item {
    max-width: 100%;
  }

  .info {
    padding: 1rem;
  }

  .info h2 {
    text-align: center;
  }

  .info ul {
    padding: 0 1rem;
  }

  /*footer {
    font-size: 0.8rem;
  }*/
}
/*--------------------------------------------------------------*/
 @media (max-width: 1024px) {
      .info-grid {
        padding: 0 2rem;
      }

      .info-item {
        flex: 1 1 45%;
      }
    }

    @media (max-width: 600px) {
      .info-grid {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
      }

      .info-item {
        flex: 1 1 100%;
        margin: 0 auto;
        max-width: 90%;
      }
    }

    /*----------------------------------*/
/*******************************************************/

/*html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}*/

main.gallery-main {
  flex: 1;
}

footer {
  background-color: #111; /* adapte selon ton design */
  color: #fff;
  padding: 1rem;
  text-align: center;
}



@media (min-width: 768px) {
  .nav {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
    max-height: none !important;
    pointer-events: auto;
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }


  .nav-list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
  }

  .nav-list li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .burger {
    display: none !important;
  }

  .nav {
  display: flex !important;
  justify-content: center;
}

.nav-list {
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 2rem;
}

.dropdown:hover .dropdown-menu {
    display: block;
  }

  /* Animation slide-down pour le dropdown menu mobile */
.dropdown-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  right: 0.5rem; /* décalage pour éviter le menu burger */
  left: auto;
}

.dropdown-menu.visible {
  max-height: 300px; /* suffisante pour tout le menu */
  opacity: 1;
}






}
