:root {
  --font-size: clamp(36px, 8vw, 120px);
  --nav-font: clamp(18px, 1.2vw, 25px);
  --bg: #000000;
  --turquoise: #42e2b2; 
  --hotpink: #2b2b2b;
  --white: #ffffff;
  --frame-thickness: clamp(6px, 0.3vw, 12px);
  --frame-gap: clamp(10px, 0.5vw, 20px);
  --radius: clamp(12px, 0.6vw, 30px);
  --button-height: clamp(35px, 2vw, 50px);
  --button-padding: clamp(10px, 1vw, 16px);
}

body {
  background: linear-gradient(to bottom, #000000 15%, #42e2b2 );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: rgb(255, 255, 255);
  font-family: "Poppins", sans-serif,;
  opacity: 1;
}

body { background: var(--bg); }

.bg {
  position: fixed;
  inset: 0;
  z-index:-1;
  background-size: cover;
  background-position: 50% 45%;
  background-repeat: no-repeat;
  transition: background-image 0.5s;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 96%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 2vw, 40px);
  background: transparent;
}

.logo_serv {
  margin-right: auto;
  height: clamp(80px, 6vw, 120px);
  width: clamp(80px, 6vw, 120px);
  position: relative;
  top: clamp(10px, 1vw, 15px);
  right: clamp(8px, 0.5vw, 12px);
}

nav a {
  text-decoration: none;
  color: white;
  font-family: Poppins, sans-serif;
  white-space: nowrap;
}

.text-surligner {
  position: relative;
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-block;

}

.text-surligner.active::after {
  transform: scaleX(0.8);
}

.navbar a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 5px;
  background-color: #42e2b2;
  border-radius: 4px;
  transform-origin: center;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: 0;
}

.navbar a:hover::after {
  transform: scaleX(0.8);
}

.text-surligner:hover {
  color: white;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: inline-block;
}

.navbar {
  display: flex;
  gap: clamp(30px, 4vw, 50px);
  list-style: none;
  margin: 0 auto;
  padding: 0;
  font-size: var(--nav-font);
  font-weight: 600;
  flex-grow: 1;
  justify-content: center;
  
}

.navbar a {
  text-decoration: none;
  color: white;
  text-transform: uppercase;
  display: inline-block;
  cursor: pointer;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.navbar a:hover {
opacity: 1;
}

.logo_navbar {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;  
}

.logo_navbar img {
  padding: 8px 12px;
  display: inline-block;
  height: 30px;
  cursor: pointer;
  opacity: 0.7;
}

.logo_navbar img:hover {
  opacity: 1;
}

.logo_navbar a.vote_bouton {
  display: flex;
  background: linear-gradient(to right, #420168 , #ff5f02 );
  color: white;
  padding: 0 var(--button-padding);
  height: var(--button-height);
  border-radius: var(--radius);
  text-decoration: none;
  text-transform: uppercase;
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 600;
  font-family: Poppins;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.logo_navbar a.vote_bouton:hover {
  background: linear-gradient(to bottom, #420168 , #ff5f02 );
  color:#42e2b2 ;
}

.menu_factions {
  display: none;
  position: absolute;
  border-radius: 10px;
  border: solid 5px #42e2b2;
  margin-top: 2px;
  text-decoration: none;
  left: -15px;
  padding: 10px;
  min-width: 175px;
  overflow-y: auto;
}

.menu_factions a {
    display: block;
    flex-direction: column;
    text-transform: uppercase;
    color: white;
    font-family: Poppins;
    position: relative;
    font-size: clamp(14px, 1.2vw, 20px);
    font-weight: 600;
    padding: 1px 10px;
    margin: 2px 10px;
    align-items: center;
    
}

.menu_factions a:hover {
    background: rgba(66, 226, 178, 0.8);
    border-radius: 10px;
}

.menu_deroulant1:hover .menu_factions {
    display: flex;
    flex-direction: column;

}

.menu_deroulant1:hover .menu_factions a {
    font-family: Poppins;
    text-align: center;
}
.menu_deroulant1 {
    position: relative;
}

.menu_factions a::after {
    content: none;
}

.menu_utile {
    display: none;
    position: absolute;
    border-radius: 10px;
    border: solid 5px #42e2b2;
    margin-top: 2px;
    text-decoration: none;
    left: -39px;
    padding: 10px;
    overflow-y: auto;
}

.menu_utile a {
    display: block;
    flex-direction: column;
    text-transform: uppercase;
    color: white;
    font-family: Poppins;
    position: relative;
    font-size: clamp(10px, 1.2vw, 20px);
    font-weight: 600;
    padding: 2px 5px;
    margin: 5px 5px;
    align-items: center;
    
}

.menu_utile a:hover {
  background: rgba(66, 226, 178, 0.8);
  border-radius: 10px;
}

.menu_deroulant2:hover .menu_utile {
  display: flex;
  flex-direction: column;

}

.menu_deroulant2:hover .menu_utile a {
  font-family: Poppins;
  text-align: center;
}

.menu_deroulant2 {
  position: relative;
}

.menu_utile a::after {
  content: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

main.reglement {
  position: fixed;
  top: clamp(50%, 64vh, 70%);
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(60%, 800px, 1200px);
  height: clamp(60vh, 80vh, 90vh);
  color: white;
  border-radius: 20px;
  padding: 1rem;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  z-index: 1;
}

.main-title {
  font-size: clamp(32px, 4vw, 60px);
  white-space: nowrap;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5rem;
  font-family: "Lacquer", sans-serif;
  background: linear-gradient(#42e2b2 20%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sections-wrapper::-webkit-scrollbar {
  width: 8px;
}

.sections-wrapper::-webkit-scrollbar-thumb {
  background: rgba(66, 226, 178, 0.7);
  border-radius: 4px;
}

.sections-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
  overflow-x: hidden;
}

.section {
  flex: 1 1 280px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sections-inner {
  width: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1vw, 1.2rem);
}

.section-title,
.section-content {
  width: 100%;
  box-sizing: border-box;

}

.section-title {
  background: #141414d5;
  color: var(--turquoise, #42e2b2);
  border: 2px solid #42e2b2;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  width: clamp(100%, 100%, 1200px); 
  font-family: "Poppins", sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.section-content {
  max-height: none;
  overflow: hidden;
  padding: 0 1rem;
  background: rgba(20, 20, 20, 0.8);
  border-radius: 12px;
  font-size: clamp(16px, 1.5vw, 20px);
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  font-weight: bolder;
  border:2px solid #42e2b2;
  display: none;
}

.section.active .section-content {
  width: auto;
  max-height: none;
  padding: clamp(1rem, 1.5vw, 2rem);
  opacity: 1;
  border-color: var(--turquoise);
  
}

.section-content-inner p {
  margin: 0.5rem 0;
  line-height: 1.3;
}

.section-content-inner p:first-child {
  margin-top: 2rem;
}

.section-content-inner p:last-child {
  margin-bottom: 2rem;
}

.rouge {
  color: rgb(255, 115, 0);
}

.vert {
  color: #42e2b2;
}

.container {
  position: relative;
}

.legende {
  font-weight: bold;
  position: fixed;
  bottom: 100px;
  right: 90%;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid #42e2b2;
  border-radius: 10px;
  padding: 10px 15px;
  font-family: sans-serif;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 0;
  max-width: 300px;
  transition: all 0.3s ease;
}

.legende-title {
  text-align: center;
  margin-bottom: 15px;
  font-size: 17px;
}

.legende-p {
  margin: 0;
}

.legal-popup {
  position: fixed;
  bottom: 15px;
  right: 20px;
  z-index: 9999;
  font-family: Poppins, sans-serif;
}

.legal-button {
 background: #141414d5;
  color: #aaa;
  border: 1px solid #42e2b2;
  border-radius: 8px;
  padding: clamp(1px, 0.5vw, 5px) clamp(5px, 1vw, 15px);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.legal-button:hover {
  background: #222;
  color: #42e2b2;
}

.legal-content {
  display: none;
  position: absolute;
  bottom: 40px;
  right: 0;
  width: 280px;
  background: #141414d5;
  border: 1px solid #42e2b2;
  border-radius: 10px;
  padding: 10px;
  color: #fffefe;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.legal-popup:hover .legal-content {
  display: block;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: none;
  z-index: 9999;
}

.mobile-menu.active {
  display: block;
  left: 0;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #141414d5;
  border-right: 2px solid var(--turquoise);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  overflow: visible !important;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem 1rem 2rem 1rem;
  box-sizing: border-box;
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.mobile-menu.active .mobile-menu-content {
  left: 0;
}

.mobile-menu-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.mobile-menu-content ul li a {
  display: block;
  color: var(--white);
  text-transform: uppercase;
  text-decoration: none;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  padding: 1.3rem 0;
  width: 100%;
  transition: color 0.3s ease;
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 1.3rem;
}

.mobile-menu li {
  margin-top: 60px;
}

.mobile-menu .close-menu {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--turquoise);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mobile-menu .close-menu:hover {
  transform: rotate(90deg);
}

.mobile-menu .vote_bouton {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 55px;
  height: 55px;
  background: linear-gradient(to right, #420168, #ff5f02);
  color: white;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 0 6px rgba(255, 95, 2, 0.4);
  line-height: 1;
  flex-shrink: 0;
}

.mobile-menu .vote_bouton:hover {
  background: linear-gradient(to bottom, #420168, #ff5f02);
  color: #42e2b2;
  transform: scale(1.05);
}

.top-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 2rem;
}

.logo-navbar {
  display: flex;
  gap: 20px;
}

.close-menu {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.logo-navbar a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #1a1a1a 40%, #000 100%);
  border: 2px solid #42e2b2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-navbar img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.logo-social {
  opacity: 0.7;
}

.logo-social:hover {
  opacity: 1;
}

.logo-navbar a:hover {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(66, 226, 178, 0.6);
}

.logo-navbar a.vote_bouton {
  background: linear-gradient(to right, #420168, #ff5f02);
  color: white;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  border: none;
  box-shadow: 0 0 8px rgba(255, 95, 2, 0.4);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: solid 2px #42e2b2;
}


.logo-navbar a.vote_bouton:hover {
  transform: scale(1.1);
  color: #42e2b2;
}

.mobile-menu-content ul li a {
  position: relative;
  color: white;
  text-transform: uppercase;
  text-decoration: none;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  padding: 0.8rem 0;
  width: 100%;
  text-align: center;
  transition: color 0.3s ease;
}

.mobile-menu-content ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(20%, 2em, 25%);
  height: 0.3rem;
  background-color: #42e2b2;
  border-radius: 4px;
  transform-origin: center;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s ease;
}

.mobile-menu-content ul li a:hover::after,
.mobile-menu-content ul li a.active::after {
  transform: translateX(-50%) scaleX(0.7);
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-legal-popup {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-legal-content {
  display: none;
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(250px, 80%, 400px);
  background: #141414d5;
  border: 1px solid #42e2b2;
  border-radius: 10px;
  padding: clamp(8px, 2vw, 15px);
  color: #fff;
  font-size: clamp(12px, 0.9vw, 16px);
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  margin-bottom: 5.5rem;
}

.mobile-legal-popup.active .mobile-legal-content {
  display: block;
}

.mobile-legal-button {
  cursor: pointer;
  background: #141414d5;
  color: #aaa;
  border: 1px solid #42e2b2;
  border-radius: 8px;
  padding: clamp(5px,0.5vw,10px) clamp(10px,1vw,15px);
  font-size: clamp(12px,1vw,18px);
  transition: all 0.3s ease;
  margin-bottom: 5rem;
}

.mobile-legal-button:hover {
  background: #222;
  color: #42e2b2;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10001;
  position: fixed;
  top: 20px;
  right: 20px;
  margin-top: 5px;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 100%;
  background-color: var(--turquoise);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 360px) {
  .navbar, .logo_navbar {
    display: none;
  }

  .logo_serv {
    cursor: pointer;
  }

  .legal-popup {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  main.reglement {
    top: 50%;
    width: 280px;
    height: 410px;
  }

  .main-title {
    margin-bottom: clamp(2rem, 1vw, 3rem);
    font-size: clamp(33px, 3vw, 60px);
  }

  .section-title {
    font-size: clamp(17px, 1.1vw, 20px);
    width: 100%;
    margin-bottom: 0.5rem; /* réduit l'espace entre titre et contenu */
  }

  .section-content {
    font-size:17px ;
     background: rgba(20, 20, 20, 1);
     padding: 0.5rem 1rem; /* ajuste le padding interne si besoin */
  }

  .legende {
    right: 30.5%;
    bottom: 10px;
    padding-bottom: 0;
    margin-bottom: 0;
    height: 40px;
    width: 140px;
  }

  .legende p {
    padding: 0;
  }

  .mobile-legal-popup {
    bottom: -8%;
  }

  .mobile-legal-content {
    background-color: black;
  }

}

@media (min-width:361px) and (max-width: 576px) {
  .navbar, .logo_navbar {
    display: none;
  }

  .logo_serv {
    cursor: pointer;
  }

  .legal-popup {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  main.reglement {
    top: clamp(40%, 40%, 60%);
    max-width: 280px;
    max-height: 430px;
  }

  .main-title {
    margin-bottom: clamp(2rem, 1vw, 3rem);
    font-size: clamp(33px, 3vw, 60px);
  }

  .section-title {
    font-size: clamp(17px, 1.1vw, 20px);
    width: 100%;
    margin-bottom: 0.5rem; /* réduit l'espace entre titre et contenu */
  }

  .section-content {
    font-size:17px ;
     background: rgba(20, 20, 20, 1);
     padding: 0.5rem 1rem; /* ajuste le padding interne si besoin */
  }

  .legende {
    right: 30.5%;
    bottom: 10px;
    padding-bottom: 0;
    margin-bottom: 0;
    height: 40px;
    width: 140px;
  }

  .legende p {
    padding: 0;
  }



}

@media (min-width: 577px) and (max-width: 1360px) {
   .navbar, .logo_navbar {
    display: none;
  }

  .logo_serv {
    cursor: pointer;
  }

  .legal-popup {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu-content ul li a::after {
    width: clamp(10%, 2em, 15%);
    height: 0.3rem; /* épaisseur de la barre */
}

.logo-navbar a {
    width: 40px;
    height: 40px;
  }

  .logo-navbar a.vote_bouton {
    font-size: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }

.mobile-menu .close-menu {
  font-size: 3.5rem;
}

.mobile-legal-button {
  font-size: clamp(20px,1vw,30px);
}

.mobile-legal-content {
  font-size: clamp(19px, 0.9vw, 22px);
  margin-bottom: 6rem;
}

.mobile-menu-content ul li a {
  font-size: 1.7rem;
}

.mobile-menu img {
  height: 25px;
  width: 25px;
}

 main.reglement {
    top: 50%;
    max-width: 500px;
    max-height: 700px;
  }

  .main-title {
    margin-bottom: clamp(2rem, 1vw, 3rem);
    font-size: 60px;
  }

  .section-title {
    font-size: clamp(17px, 1.1vw, 20px);
    width: 100%;
    margin-bottom: 0.5rem; /* réduit l'espace entre titre et contenu */
  }

  .section-content {
    font-size:17px ;
     background: rgba(20, 20, 20, 1);
     padding: 0.5rem 1rem; /* ajuste le padding interne si besoin */
  }

  .legende {
    right: 42%;
    bottom: 17px;
  }

  .legende-title {
    text-align: center;
  }

  .legende p {
    text-align: left;
  }
  
}


@media (min-width: 1361px) and (max-width: 1680px) {
  
  .sections-wrapper {
    gap: 0rem;
  }

  .section-title {
    width: 250px;
    font-size: 20px;
  }

  .section-content {
    width: 250px;
    font-size: 19px;
  }

}

@media (min-width: 1025px) {
  .section-content {
    display: flex; /* force affichage */
    max-height: none;
    padding: clamp(1rem, 1.5vw, 2rem);
    opacity: 1;
  }
}
