/* ====== Sunwave - feuille de style (reecriture vanilla HTML/CSS/JS) ====== */
:root {
  /* Palette de marque */
  --color-ember:      #2b525c;
  --color-flare:      #4796aa;
  --color-flare-soft: #8ecbd8;
  --color-action:     #3a7f90;
  --color-action-hi:  #4a9db1;
  --color-void:       #141414;
  --color-nebula-2:   #242426;
  --color-flash:      #ffffff;

  /* Alias utilises dans la feuille */
  --dark:          var(--color-void);
  --darker:        var(--color-nebula-2);
  --darker-50:     rgba(51, 49, 49, .5);
  --darker-80:     rgba(63, 60, 60, .8);
  --light-dark:    rgba(2, 2, 2, .4);
  --light-darke:   rgba(2, 2, 2, .8);
  --dard-darker:   rgba(2, 2, 2, .9);
  --purple:        var(--color-ember);       /* couleur d accent */
  --light-purple3: color-mix(in srgb, var(--color-flare) 40%, transparent);
  --white:         var(--color-flash);
  --white-50:      rgba(255, 255, 255, .5);

  /* Typographie */
  --font-sans:    "Poppins", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

/* ====== 2. Reset et base ====== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 10px;               /* 1rem = 10px : toutes les tailles en rem */
  scroll-behavior: smooth;
  background: var(--dark);
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--dark);
  background-image: linear-gradient(rgba(20, 20, 20, 0.5), rgba(20, 20, 20, 0.5)), url('../assets/sunwave-logo.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--dark);
  opacity: 0.95;
  z-index: -1;
}

a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  position: relative;
}

ul,
li { list-style: none; }
li  { margin: .5em; }
p   { line-height: 2; }

img { display: block; }

/* Barre de defilement */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-thumb { background-color: var(--purple); border-radius: 3px; }
::-webkit-scrollbar-track { background-color: var(--light-dark); }

/* ====== 3. En-tete et navigation ====== */
header {
  font-size: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 1s;
  padding: .5% 2%;
  position: relative;
  z-index: 999;
  margin-bottom: 3vh;
  width: 100%;
}

header img { height: 6.5rem; }

/* --- Liens du menu --- */
.menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.menu > li {
  margin: 0;
  position: relative;
}

.menu > li > a {
  text-transform: none;
  padding: 1rem 1.2rem;
  color: var(--white-50);
  transition: color .5s;
  font-weight: 500;
  font-size: 1.5rem;
  white-space: nowrap;
}

.menu > li > a:hover,
.menu > li > a.active { color: var(--white); }

/* Soulignement anime sous les liens */
.menu > li > a::after {
  content: "";
  position: absolute;
  bottom: .4rem;
  left: 1.2rem;
  right: 1.2rem;
  height: 3px;
  background: var(--purple);
  border-radius: 5vh;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease-in-out;
}

.menu > li > a:hover::after { transform: scaleX(1); }

.menu > li > a.active::after {
  transform: scaleX(1);
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: .45rem;
  border-left: .4rem solid transparent;
  border-right: .4rem solid transparent;
  border-top: .45rem solid currentColor;
  vertical-align: middle;
  opacity: .75;
}

.has-dropdown.open .caret,
.has-dropdown:hover .caret {
  transform: rotate(180deg);
}

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% - .2rem);
  left: 0;
  min-width: 22rem;
  padding: .6rem 0;
  background: rgba(20, 20, 20, .96);
  border: 1px solid rgba(71, 150, 170, .25);
  border-radius: .6rem;
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, .45);
  z-index: 2000;
}

.has-dropdown:hover > .dropdown,
.has-dropdown.open > .dropdown {
  display: block;
}

.dropdown li {
  margin: 0;
}

.dropdown a {
  display: block;
  width: 100%;
  padding: .8rem 1.6rem;
  color: var(--white-50);
  text-transform: none;
  font-size: 1.4rem;
  font-weight: 500;
}

.dropdown a:hover,
.dropdown a.active {
  color: var(--white);
  background: rgba(43, 82, 92, .55);
}

.dropdown a::after { content: none; }

.logo-link::after { content: none; }

/* --- Pastilles reseaux sociaux --- */
.menu .social {
  margin-left: auto;
}

.menu .rs3 {
  display: flex;
  justify-content: center;
  gap: 3%;
  width: auto;
}

.menu .rs3 .rs2 { margin-left: .3vw; }

.menu .back {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--darker-50);
  height: 4.5vh;
  width: 4.5vh;
  border-radius: 150px;
  cursor: pointer;
  padding: 0;
}

.menu .back:hover  { background: var(--darker-80); transition: background .3s; }
.menu .back::after { content: none; }
.menu .back .rs    { height: 2vh; width: 2vh; }

/* --- Compteur de joueurs --- */
.players-bloc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1%;
  width: auto;
  min-width: 18rem;
  margin-right: 1vw;
  cursor: pointer;
  position: relative;
}

.players-bloc img {
  transition: all .3s;
  padding: 20%;
  height: 4vh;
  width: 4vh;
  border-radius: .2vh;
}

.players-bloc .players h1 {
  font-size: 1em;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
}

/* Message de confirmation de copie */
.copy-message {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--light-purple3);
  color: #fff;
  padding: 5px 20px;
  border-radius: 3px;
  opacity: .9;
  font-size: 1.3rem;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
}

.copy-message[hidden] { display: none; }

/* --- Burger (masque au-dessus de 862px) --- */
#toggle-menu,
#toggle-menu + label { display: none; cursor: pointer; }

#toggle-menu + label {
  height: 1.5em;
  width: 2em;
  position: relative;
  margin: 2em;
}

#toggle-menu + label span,
#toggle-menu + label span:nth-child(2)::after {
  display: inline-block;
  height: 3px;
  border-radius: 5vh;
  position: absolute;
  left: 0;
  right: 0;
  background: #fff;
  transition: transform .2s, left .2s, right .2s;
}

#toggle-menu + label span:first-child { top: 0; left: 50%; }

#toggle-menu + label span:nth-child(2),
#toggle-menu + label span:nth-child(2)::after {
  content: "";
  top: 50%;
  transform: translateY(-50%);
}

#toggle-menu + label span:last-child { bottom: 0; right: 50%; }

#toggle-menu:checked + label span:first-child         { left: 100%; }
#toggle-menu:checked + label span:nth-child(2)        { transform: translateY(-50%) rotate(45deg); }
#toggle-menu:checked + label span:nth-child(2)::after { transform: translateY(-50%) rotate(-90deg); }
#toggle-menu:checked + label span:last-child          { right: 100%; }

/* -------------------------------------------------------------------------
   4. Accueil (video de fond + accroche)
   ---------------------------------------------------------------------- */
/* ====== 4. Accueil : video de fond et accroche ====== */
.red { 
  background: linear-gradient(rgba(20, 20, 20, 0.7), rgba(20, 20, 20, 0.7));
}

.background-video {
  width: 102vw;
  height: 100vh;
  object-fit: cover;
  position: fixed;
  inset: 0;
  left: -1vw;
  z-index: 0;
  opacity: .7;
  filter: grayscale(.5);
}

.home-table {
  position: relative;
  margin-top: 40vh;
  transform: translateY(-40%);
  text-align: center;
  z-index: 2;
}

.home-table .titre {
  font-size: 3em;
  font-weight: 600;
}

.home-table .description {
  font-weight: 800;
  font-size: 4em;
  color: #fff;
}

.home-table .bouton {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1em;
}

.home-table .bouton-notif {
  display: flex;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  padding: 8px 50px;
  margin-top: 1vw;
  border-radius: .5rem;
  background: var(--light-dark);
  box-shadow: 0 20px 25px -5px #02020233;
  transition: background .4s cubic-bezier(.4, 0, .2, 1), transform .3s;
}

.home-table .bouton-notif:hover {
  background: var(--purple);
  transform: translateY(-.3rem);
}

.home-table .bouton-notif::after { content: none; }

/* Effet 3D au survol du bouton */
.tilty {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  will-change: transform;
}

.tilty a { transform-style: preserve-3d; }
.tilty p { transform: translateZ(20px); }

/* -------------------------------------------------------------------------
   8. Page Règlement
   ---------------------------------------------------------------------- */
/* ====== 8. Page Règlement ====== */
.reglement-container {
  position: relative;
  margin-top: 8vh;
  margin-bottom: 5vh;
  text-align: center;
  z-index: 2;
  padding: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.reglement-container .titre {
  font-size: 2.5em;
  font-weight: 600;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Onglets principaux */
.main-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.main-tab {
  background: rgba(36, 36, 38, 0.7);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.main-tab:hover {
  background: rgba(63, 60, 60, 0.75);
  color: rgba(255, 255, 255, 0.75);
}

.main-tab.active {
  background: rgba(43, 82, 92, 0.7);
  color: rgba(255, 255, 255, 0.75);
}

/* Sous-onglets */
.sub-tabs {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.sub-tab {
  background: rgba(36, 36, 38, 0.7);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sub-tab:hover {
  background: rgba(63, 60, 60, 0.75);
  color: rgba(255, 255, 255, 0.75);
}

.sub-tab.active {
  background: rgba(43, 82, 92, 0.7);
  color: rgba(255, 255, 255, 0.75);
}

.reglement-content {
  background: rgba(36, 36, 38, 0.75);
  padding: 2rem;
  border-radius: 1rem;
  text-align: left;
}

.reglement-section {
  margin-bottom: 0;
  padding-bottom: 0;
}

.reglement-section h3 {
  font-size: 1.8em;
  font-weight: 600;
  color: rgba(71, 150, 170, 0.75);
  margin-bottom: 1.5rem;
}

.reglement-section h4 {
  font-size: 1.4em;
  font-weight: 500;
  color: rgba(142, 203, 216, 0.7);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.reglement-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-style: italic;
}

.reglement-section strong {
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
}

.reglement-section ul {
  list-style: disc;
  padding-left: 2rem;
}

.reglement-section li {
  margin: 0.8rem 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.reglement-section li:hover {
  color: rgba(255, 255, 255, 1);
  transition: color 0.3s;
}

/* Contenu des sous-onglets */
.sub-tab-content {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== Recrutement Staff ====== */
.recrutement-container {
  position: relative;
  margin-top: 8vh;
  margin-bottom: 5vh;
  text-align: center;
  z-index: 2;
  padding: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.recrutement-container .titre {
  font-size: 2.5em;
  font-weight: 600;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.75);
}

.recrutement-content {
  background: rgba(36, 36, 38, 0.75);
  padding: 2rem;
  border-radius: 1rem;
  text-align: left;
}

.form-embed {
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
}

.form-embed iframe {
  border: none;
  border-radius: 0.5rem;
}

/* -------------------------------------------------------------------------
   6. Pied de page
   ---------------------------------------------------------------------- */
/* ====== 6. Pied de page ====== */
.ava-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: .75rem;
  letter-spacing: .15em;
  color: #ffffff8c;
}

.ava-footer a {
  color: #ffffffbf;
  transition: color .3s;
}

.ava-footer a:hover  { color: var(--white); }
.ava-footer a::after { content: none; }

/* -------------------------------------------------------------------------
   9. Animations d apparition
   ---------------------------------------------------------------------- */
/* ====== 9. Animations d apparition ====== */
.appear-d1 { animation: appear-d1 .5s cubic-bezier(.5, 0, .73, 1); }
.appear-d2 { animation: appear-d2 .7s cubic-bezier(.5, 0, .73, 1); }
.appear-d3 { animation: appear-d2 .9s cubic-bezier(.5, 0, .73, 1); }
.appear-d4 { animation: appear-d2 1.1s cubic-bezier(.5, 0, .73, 1); }
.appear-d5 { animation: appear-d2 1.3s cubic-bezier(.5, 0, .73, 1); }

@keyframes appear-d1 {
  0%, 15% { opacity: 0; transform: translateY(10px); }
  to      { opacity: 1; transform: translateY(0); }
}

@keyframes appear-d2 {
  0%, 30% { opacity: 0; transform: translateY(10px); }
  to      { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------------
   10. Responsive
   ---------------------------------------------------------------------- */
/* ====== 10. Responsive ====== */
@media screen and (max-width: 1000px) {
  .home-table   { padding: 10px; max-width: 100%; }
  .titre        { font-size: 2em; font-weight: 600; }
  .description  { margin: auto; font-weight: 800; font-size: 2.5em; color: #fff; }
  .bouton-notif { font-size: 20px; padding: 10px 40px; }
  .social       { padding: 1rem 0; }
  .rs3          { padding: 1rem 0; }
  .rs           { height: 4vh; width: 4vh; }
  .rs2          { height: 4vh; width: 4vh; margin-right: 0; }
  .reseaux      { display: flex; align-items: center; justify-content: center; text-align: center; }
}

@media screen and (max-width: 1150px) {
  /* Le burger prend la main */
  #toggle-menu + label { display: inline-block; z-index: 999; }

  .menu {
    background: var(--dard-darker);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    width: 100vw;
    transform: translateX(-100%);
    transition: transform .7s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    overflow-y: auto;
    padding: 8rem 0 4rem;
  }

  #toggle-menu:checked ~ .menu { transform: translateX(0); }

  .menu .social {
    margin-left: 0;
  }

  .menu > li > a {
    font-size: 2rem;
    padding: 1.2rem 2rem;
  }

  .has-dropdown:hover > .dropdown {
    display: none;
  }

  .has-dropdown.open > .dropdown {
    display: block;
    position: static;
    min-width: 0;
    margin: 0 auto 1rem;
    background: rgba(36, 36, 38, .9);
    box-shadow: none;
  }

  .players-bloc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2%;
    width: 100vw;
    margin-right: 0;
  }

  .players-bloc img {
    padding: 15%;
    height: 4vh;
    width: 4vh;
    border-radius: .3vh;
  }

  .logo { height: 7rem; margin-left: 6vw; }
}

@media screen and (max-width: 425px) {
  html { font-size: 8px; }
  
  .reglement-container {
    padding: 1rem;
    margin-top: 10vh;
  }
  
  .reglement-container .titre {
    font-size: 2em;
  }
  
  .reglement-content {
    padding: 1.5rem;
  }
  
  .reglement-section h3 {
    font-size: 1.5em;
  }
  
  .reglement-section ul {
    padding-left: 1.5rem;
  }
  
  .sub-tabs {
    gap: 0.3rem;
  }
  
  .sub-tab {
    padding: 0.6rem 1rem;
    font-size: 1.2rem;
  }
  
  .main-tabs {
    gap: 0.3rem;
  }
  
  .main-tab {
    padding: 0.8rem 1.5rem;
    font-size: 1.4rem;
  }
  
  .recrutement-container {
    padding: 1rem;
    margin-top: 10vh;
  }
  
  .recrutement-container .titre {
    font-size: 2em;
  }
  
  .recrutement-content {
    padding: 1.5rem;
  }
  
  .form-embed iframe {
    height: 600px;
  }
}

/* Respect des preferences systeme : on coupe les animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
