/* ========================================================================
   HEADER / NAV — styles du header partagé (importation-php/menu.php).
   Fichier dédié, chargé uniquement via menu.php : une branche qui ne touche
   qu'au header a un diff nul sur laforgedesjoueurs.css.
   ======================================================================== */

/* Compense la hauteur du header fixe (#lfdj-sticky-header) pour que le
   contenu de la page ne passe pas dessous. À garder synchronisé avec les
   min-height de .lfdj-nav-container / .lfdj-nav-grid et le top de
   .lfdj-dropdown-content ci-dessous si cette hauteur change. */
body{
  padding-top: 55px;
}

/* ========================== HEADER / NAV ========================== */
/* Fixed sticky header */
#lfdj-sticky-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  overflow: visible;
}

/* background wrapper — overflow visible pour que les sous-menus (absolute) ne soient pas rognés */
.lfdj-bg{
  position: relative;
  overflow: visible;
  background-color: var(--background2);
}

/* shared header link styles */
header a,
header i,
header button{
color: var(--white-color) !important;
  font-family: var(--font-third);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
}

header a:hover,
header i:hover,
header button:hover {
color: white !important;
    font-weight: 600 !important;
}

/* Thème, collé à droite */
.lfdj-header-tools{
  display: inline-flex;
  align-items: center;
  gap: 6px 10px;
  flex-shrink: 0;
  padding: 0;
  box-sizing: border-box;
}

.lfdj-header-tools--mobile{
  padding: 0;
  gap: 4px 8px;
  justify-self: end;
}

/* CTA Discord mis en valeur, inspiré du bouton "Essayer un cours" */
.lfdj-cta-discord{
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  background-color: #7289da;
  color: #ffffff !important;
  font-family: var(--font-third);
  font-weight: 700 !important;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background-color .2s ease, transform .15s ease;
}

.lfdj-cta-discord:hover,
.lfdj-cta-discord:focus-visible{
  background-color: #5a6eb8;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.lfdj-cta-discord i{
  font-size: 13px;
}

.lfdj-cta-discord__arrow{
  font-size: 11px;
  opacity: 0.75;
}

/* PC : gros logo à gauche, onglets + CTA groupés à droite */
.lfdj-nav-cluster__home{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
  justify-self: start;
}

.lfdj-nav-cluster__home img{
  width: auto;
  height: 46px;
  object-fit: contain;
}

.lfdj-nav-cluster__main{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(4px, 1vw, 14px);
  min-width: 0;
}

/* Liens à plat, sans dropdown ni clic supplémentaire (retour demandé par Quentin) */
.lfdj-nav-cluster__main > a{
  padding: 6px 8px;
  border-radius: 20px;
  font-weight: 500 !important;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.lfdj-nav-cluster__main > a:hover,
.lfdj-nav-cluster__main > a:focus-visible{
  background-color: rgba(255,255,255,.12);
  /* Neutralise le "header a:hover { font-weight: 600 }" global : sans ça, le
     texte s'épaissit au survol et fait légèrement grandir/décaler le lien. */
  font-weight: 500 !important;
}

.lfdj-nav-cluster__main > a.active{
  background-color: rgba(255,255,255,.18);
  font-weight: 700 !important;
}

/* Séparateur discret entre les pages Jeux et les pages Activité : garde les 6
   liens lisibles en un coup d'œil sans regrouper derrière un clic. */
.lfdj-nav-divider{
  display: inline-block;
  width: 1px;
  height: 16px;
  margin: 0 2px;
  background-color: rgba(255,255,255,.3);
  flex-shrink: 0;
}

.lfdj-nav-container{
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
  min-height: 55px;
  align-items: center;
  box-sizing: border-box;
}

/* Menu PC : pleine largeur du viewport (le contenu du site peut aller au-delà de 1400px) */
.lfdj-nav-container.lfdj-nav-pc{
  max-width: none;
  padding-left: clamp(12px, 2.5vw, 40px);
  padding-right: clamp(12px, 2.5vw, 40px);
}

.lfdj-nav-pc{ display: grid; }

.lfdj-nav-grid{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: clamp(8px, 1.5vw, 20px);
    min-height: 55px;
    margin: 0;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    font-size: 14px;
}

.lfdj-nav-grid > .lfdj-header-tools{
  justify-self: end;
}

/* MOBILE nav */
.lfdj-nav-mobile{
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

.lfdj-mobile-home{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 25px;
}

.lfdj-mobile-home img{
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* burger dropdown */
.lfdj-dropdown{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Rond Discord, à gauche du burger — accès direct sans ouvrir le menu */
.lfdj-mobile-discord-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #7289da;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.lfdj-mobile-discord-btn i{
  color: #ffffff !important;
  font-size: 15px;
}

.lfdj-mobile-discord-btn:hover,
.lfdj-mobile-discord-btn:focus-visible{
  background-color: #5a6eb8;
  transform: translateY(-1px);
}

.lfdj-burger{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 25px;
}

/* mobile panel */
.lfdj-dropdown-content{
  display: none;
  position: fixed;
  top: 55px;
  right: 0;
  z-index: 2147483647;
  min-width: 220px;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  padding: 10px;
  border-bottom-left-radius: 25px;
  background: var(--background2);
  border-top: 8px solid var(--white-color);
   overflow: visible; /* OBLIGATOIRE */
}

.lfdj-dropdown.open .lfdj-dropdown-content{
  display: block;
}

/* items */
.lfdj-dropdown-content a{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  white-space: nowrap;
  text-transform: none !important;
  font-size: 12px;
  font-weight: 500 !important;
}

.lfdj-dropdown-content a.active{
  background-color: rgba(255,255,255,.18);
  font-weight: 700 !important;
}

/* Séparateur mobile, même rôle que .lfdj-nav-divider en pleine largeur */
.lfdj-nav-divider--mobile{
  display: block;
  width: 100%;
  height: 1px;
  margin: 6px 0;
  background-color: rgba(255,255,255,.15);
}

/* Responsive switch */
@media screen and (max-width: 1100px){
  .lfdj-nav-pc{ display: none !important; }
  .lfdj-nav-mobile{ display: grid !important; }
}

/* ========================== DARK MODE TOGGLE ========================== */
.hidden {
  display: none;
}

/* Icône graphique : soleil = jour, lune = nuit (état coché = sombre) — crossfade + rotation au clic */
.lfdj-theme-toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.08);
  opacity: 0.75;
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.lfdj-theme-toggle:hover,
.lfdj-theme-toggle:focus-within{
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.16);
  transform: scale(1.08);
  outline: none;
}

.lfdj-theme-toggle:focus-visible{
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.lfdj-theme-toggle i{
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 15px;
  line-height: 1;
  color: var(--white-color) !important;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lfdj-theme-toggle .lfdj-theme-toggle__sun{
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
}

.lfdj-theme-toggle .lfdj-theme-toggle__moon{
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.4);
  opacity: 0;
}

.hidden:checked + .lfdj-theme-toggle .lfdj-theme-toggle__sun{
  transform: translate(-50%, -50%) rotate(90deg) scale(0.4);
  opacity: 0;
}

.hidden:checked + .lfdj-theme-toggle .lfdj-theme-toggle__moon{
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  opacity: 1;
}
