: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);
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "Poppins", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: transparent;
  overflow-x: hidden;
}

.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-social {
  opacity: 0.7;
}

.logo-social: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(45%, 57%, 60%);
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 80vh;
  color: var(--white);
  border-radius: clamp(15px, 2vw, 30px);
  padding: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
  padding: 7px;
}

.main-title {
  font-size: clamp(28px, 3vw, 50px);
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(#42e2b2 20%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: clamp(0.3rem, 0.5vw, 1rem);
  font-family: "IM Fell Double Pica", sans-serif;
}

.reglement-content {
  overflow-y: auto;
  padding: 1rem;
  flex: 1;
}

.reglement-content::-webkit-scrollbar {
  width: 8px;
}

.reglement-content::-webkit-scrollbar-thumb {
  background: rgba(66, 226, 178, 0.7);
  border-radius: 4px;
}

.sections-wrapper {
  display: flex; 
  flex: 1 1 auto;
  min-height: 0; 
  box-sizing: border-box; 
  overflow-y: auto; 
  overflow-x: hidden; 
  max-height: 60vh;
  flex-direction: column; 
  gap: clamp(1.5rem, 1vw, 2rem);
}

.sections-inner {
  width: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: clamp(0.6rem, 1vw, 1.2rem);
}

.section-title {
  display: block;
  width: calc(85% - clamp(0.5rem, 1vw, 2rem));
  padding: clamp(0.8rem, 1vw, 1.5rem);
  margin: 0 auto;
  background: #141414d5;
  color: var(--turquoise);
  border-radius: 10px;
  border: 2px solid var(--turquoise);
  cursor: pointer;
  font-family: Poppins, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-size: clamp(14px, 1.1vw, 18px);
}

.section-content {
  position: relative;
  max-height: 0;
  overflow: hidden;
  padding: 0 clamp(1rem, 1.5vw, 2rem);
  margin: 0 auto;
  background: rgba(20, 20, 20, 0.8);
  border-radius: 10px;
  font-size: clamp(12px, 1vw, 14px);
  border: 2px solid transparent;
  opacity: 0;
  transition: 
    max-height 0.4s ease,
    padding 0.3s ease,
    opacity 0.3s ease,
    border-color 0.3s ease;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  width: 87%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.section.active .section-content {
  max-height: clamp(300px, 30vh, 600px);
  padding: clamp(1rem, 1.5vw, 2rem);
  opacity: 1;
  border-color: var(--turquoise);
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
}

.sections-wrapper::-webkit-scrollbar {
  width: 6px;
}
.sections-wrapper::-webkit-scrollbar-thumb {
  background: rgba(66, 226, 178, 0.7);
  border-radius: 4px;
}

.section-content::-webkit-scrollbar {
  width: 6px;
}
.section-content::-webkit-scrollbar-thumb {
  background: rgba(66, 226, 178, 0.7);
  border-radius: 4px;
}

.scroll-top {
  position: absolute; /* sort du flux, plus d’effet sur la scrollbar */
  bottom: clamp(10px, 2%, 20px); /* distance du bas adaptative */
  right: clamp(10px, 2%, 20px);  /* distance de la droite adaptative */
  width: clamp(20px, 2vw, 30px);
  height: clamp(20px, 2vw, 30px);
  display: flex;
  justify-content: center;
  align-items: center;
  background: #141414d5;
  color: #42e2b2;
  border-radius: 50%;
  border: 2px solid #42e2b2;
  font-weight: 500;
  font-size: clamp(22px, 2vw, 35px);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease;
}

.scroll-top:hover {
  transform: rotate(90deg);
}

.section-content .scroll-top {
  position: static;
  align-self: flex-end;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #42e2b2;
  font-size: 20px;
  cursor: pointer;
  z-index: 5;
  background: #141414d5;
  border-radius: 50%;
  font-weight: 500;
  transition: transform 0.2s ease;
}

.section-content .scroll-top:hover {
  transform: rotate(90deg);
}

.majuscule {
  text-transform: uppercase;
  font-weight: bold;
  color: #42e2b2;
  text-align: center;
  font-size: 20px;
}

.important {
  color: #42e2b2;
  font-weight: bold;
}

.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-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) {
  .mobile-legal-content {
    background-color: black;
  }
}

@media (max-width: 576px) {
  .navbar, .logo_navbar {
    display: none;
  }

  .logo_serv {
    cursor: pointer;
  }

  .legal-popup {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .scroll-top,
  .section-content .scroll-top,
  .section-content .scroll-top3,
  .section-content .scroll-top4,
  .section-content .scroll-top5 {
    display: none;
  }

  main.reglement {
    top: clamp(50%, 45%, 60%);
  }

  .main-title {
    margin-bottom: clamp(2rem, 1vw, 3rem);
    font-size: clamp(35px, 3vw, 60px);
  }

  .section-title {
    font-size: clamp(17px, 1.1vw, 24px);
  }
  .sections-wrapper {
    gap: clamp(1.5rem, 1vw, 2rem);
  }

  .majuscule {
    font-size: 15px;
  }
}


@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%);
  }

.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;
}

.scroll-top,
  .section-content .scroll-top,
  .section-content .scroll-top3,
  .section-content .scroll-top4,
  .section-content .scroll-top5 {
    display: none;
  }

  main.reglement {
    top: clamp(50%, 45%, 60%);
  }

  .main-title {
    margin-bottom: clamp(2rem, 1vw, 3rem);
    font-size: clamp(35px, 3vw, 60px);
  }

  .section-title {
    font-size: clamp(17px, 1.1vw, 24px);
  }
  .sections-wrapper {
    gap: clamp(1.5rem, 1vw, 2rem);
  }
}