/* Variables dynamiques pour le header Admin */
:root {
  --nav-bg: #f5f5f5; /* Gris trs clair pour le mode clair */
}
body.gamefr-dark-theme {
  --nav-bg: #1a1a1a; /* Gris trs sombre pour le mode dark */
}

/* Admin CSS - New Layout */

/* --- Extracted from header.php --- */
/* Forcer la suppression du fond et de l'ombre d'origine pour activer le drop-shadow intelligent ! */
#gamefr-nav.gamefr-nav, .gamefr-nav {
  border-bottom: none !important;
  box-shadow: none !important; 
  background: transparent !important; /* TRÈS IMPORTANT pour l'ombre */
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3)) !important; /* L'ombre intelligente ! */
  position: relative;
  z-index: 1000;
}

/* Empêche l'overlay sombre du mega menu de griser le header tout en haut */
.fusion-header-wrapper {
  z-index: 1001 !important;
  position: relative !important;
}

/* Fond gris derrière les ampoules, uniquement pour les admins */
.gamefr-nav-bg-container {
  background: var(--surface2) !important;
}

.gamefr-nav-top {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 16px !important;
  height: 100px !important;
  position: relative !important;
  background: var(--nav-bg) !important; /* Fond blanc */
}/* La ligne droite jaune (gauche et droite) */
.gamefr-nav-top::before, .gamefr-nav-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: calc(50% - 137.5px); /* 137.5 = moitié de 275 */
  height: 2px;
  background: #eed64f;
  z-index: 10;
}
.gamefr-nav-top::before { left: 0; }
.gamefr-nav-top::after { right: 0; }

/* Motif mosaique dans le fond du header - remplacé par des ampoules animées */
.gamefr-nav-bg-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  z-index: 1 !important;
  pointer-events: none !important;
}

.gamefr-bulb {
  position: absolute;
  width: 35px;
  height: 35px;
  background-image: url('/wp-content/uploads/ampoule.png');
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.8 !important; /* Opacité augmentée pour bien les voir sur fond clair */
  /* FILTRE COULEUR RETIRÉ COMME DEMANDÉ */
}

@keyframes floatBulb {
  0% {
    transform: translate(0px, 0px) rotate(var(--start-rot));
  }
  100% {
    transform: translate(calc(var(--move-x) * 1px), calc(var(--move-y) * 1px)) rotate(calc(var(--start-rot) + var(--rot-diff)));
  }
}

/* La courbe jaune devient OVALE (ellipse large) pour mieux suivre le logo */
.gamefr-nav-curve {
  position: absolute;
  top: 100%; /* S'accroche sous la barre blanche */
  left: 50%;
  transform: translateX(-50%);
  width: 275px; 
  height: 109px; 
  background: var(--surface2) !important; /* Le gris descend dans la courbe ! */
  border: 2px solid #eed64f;
  border-top: none;
  border-radius: 0 0 50% 50% / 0 0 100% 100%; 
  pointer-events: none;
  z-index: 999 !important; /* Passe DEVANT le mega menu (z-index 998) */
}

.gamefr-nav-actions {
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  display: flex !important;
  align-items: flex-end !important;
  flex-direction: column !important;
  gap: 12px !important;
  z-index: 999999 !important;
}

.gamefr-logo-link, .custom-logo-link {
  position: absolute !important;
  bottom: -80px !important; /* Centré exactement sur la ligne pour un calcul parfait */
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  display: block !important;
}

.gamefr-custom-logo, .custom-logo, .custom-logo-link img, .gamefr-nav-top img.custom-logo, .fusion-logo-link img, .fusion-logo-image {
  height: 160px !important; /* Hauteur fixe = rayon Y de 80px */
  width: 280px !important;  /* Largeur fixe = rayon X de 140px. 140 + 50 = 190 de courbe. C'est mathématiquement parfait ! */
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

/* Container du menu */
.gamefr-nav-rubriques {
  position: absolute !important;
  top: 100% !important; /* Point 0 = la ligne jaune droite */
  left: 0 !important;
  width: 100% !important;
  height: 0 !important;
  padding: 0 !important;
  display: block;
  overflow: visible !important;
  border-top: none !important;
  background: #333333 !important;
  z-index: 999999 !important; /* Force le menu à passer par-dessus TOUT, y compris le logo */
}

/* Base pour tous les liens du menu */
.gamefr-rubrique-link {
  position: absolute !important;
  margin: 0 !important;
  padding: 0 !important;
  transform-origin: center bottom !important; /* Le pivot est à la base du texte ! */
  white-space: nowrap !important;
  font-weight: 800 !important;
  border-bottom: none !important; /* Retire le trait droit au survol/actif */
}

/* Couleur du texte SVG par défaut et au survol */
.gamefr-nav-svg-text a { fill: var(--text-color, #111); transition: fill 0.2s ease-in-out; pointer-events: auto; }
.gamefr-nav-svg-text a:hover,
.gamefr-nav-svg-text a.active { fill: var(--text-color, #111) !important; }

/* 
   Placement MAGIQUE : Les textes sont placés SUR la courbe jaune (top = position de la ligne).
   L'ordre des transforms est crucial : on remonte le texte (translateY) PUIS on le tourne (rotate).
*/

/* Actualités (ligne droite) */
.gamefr-rubrique-link:nth-child(1) { left: calc(50% - 220px) !important; top: 0 !important; transform: translateX(-50%) translateY(calc(-100% - 5px)) rotate(0deg) !important; }
/* L'élément SVG prend la place centrale */
/* Bons plans (dernière rubrique à droite) */
.gamefr-rubrique-link:last-child { position: absolute !important; left: calc(50% + 220px) !important; top: 0 !important; transform: translateX(-50%) translateY(calc(-100% - 5px)) rotate(0deg) !important; }

/* ── DECALAGE DES COLONNES CENTRALES DES MEGA MENUS ── */
/* On annule le décalage global, le panneau reste accroché en haut */
.gamefr-mega-panel {
  margin-top: 0 !important;
}

/* On repousse uniquement le contenu des colonnes du milieu (ex: Gacha, Sport, Switch, PC) 
   pour qu'elles apparaissent en dessous de l'ovale du logo géant.
   Comme le menu a 6 colonnes, le centre exact correspond aux colonnes 3 et 4 ! */
#mega-panel-jeux .gamefr-mega-col:nth-child(3),
#mega-panel-plateformes .gamefr-mega-col:nth-child(3),
#mega-panel-plateformes .gamefr-mega-col:nth-child(4),
#mega-panel-tests .gamefr-mega-col:nth-child(3),
#mega-panel-guides .gamefr-mega-col:nth-child(3),
#mega-panel-guides .gamefr-mega-col:nth-child(4) {
  padding-top: 120px !important; /* 109px de courbe + marge */
}

@media (min-width: 768px) {
  .gamefr-rubrique-link { font-size: 13px !important; }
}

@media (max-width: 899px) {
  /* Masque totalement le menu texte courbé sur mobile (le burger prend le relais) */
  .gamefr-nav-rubriques { display: none !important; }
}

@media (max-width: 900px) {
  /* On cache la moitié des ampoules sur mobile pour ne pas surcharger */
  .gamefr-bulb:nth-child(even) {
    display: none !important;
  }
}
/* Surcharge admin gérée différemment maintenant */
@media (min-width: 768px) {
    #gamefr-search-input {
        width: 200px !important;
        max-width: 200px !important;
    }
}

/* Switch Dark Mode iOS Style */

.gamefr-theme-switch {
  position: relative !important;
  display: inline-block !important;
  width: 34px !important;
  height: 34px !important;
  flex-shrink: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 4px !important;
  z-index: 99999 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.gamefr-theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gamefr-theme-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  border-radius: 4px; /* Same curve as hamburger/search */
  transition: .4s;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gamefr-theme-switch .slider:before {
  content: "☀️";
  font-size: 22px;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.6s;
  transform: rotate(0deg) scale(1);
}

.gamefr-theme-switch input:checked + .slider {
  background-color: transparent;
  border: none;
}

.gamefr-theme-switch input:checked + .slider:before {
  content: "🌙";
  transform: rotate(360deg) scale(1);
}

/* Remove old slider.round styles if they exist */

/* --- Extracted Inline Styles from header.php --- */
.gamefr-svg-link { pointer-events:auto; font-weight:800; font-size:13px; text-transform:uppercase; }
.gamefr-svg-separator { pointer-events:none; font-weight:800; font-size:13px; opacity:0.3; }
.gamefr-menu-icon { margin-right:6px; margin-bottom:1px; vertical-align: -3px; }
.gamefr-nav-svg-text { position:absolute; top:0; left:50%; transform:translateX(-50%); width:275px; height:109px; overflow:visible; pointer-events:none; z-index:999999; }
.gamefr-menu-item-flex { display:flex; align-items:center; }
.gamefr-menu-highlight { color:var(--yellow-dark); font-weight:700; }


/* --- Extracted Inline Styles from front-page.php --- */
.gamefr-tag-latest { background:#000; color:#fff; }
.gamefr-section-fc-margin { margin-top: 16px; margin-bottom: 32px; }
.gamefr-section-tests-margin { margin-top: 48px; }
.gamefr-section-feed-margin { margin-top: 48px; margin-bottom: 48px; }
.gamefr-fc-content-wrap { flex: 1; z-index: 2; width: 100%; }
.gamefr-fc-tag { background: #6366f1; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; display: inline-block; }
.gamefr-fc-title { font-size: 24px; font-weight: 800; color: inherit; margin: 0 0 12px; line-height: 1.2; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.gamefr-fc-link { color: inherit; text-decoration: none; }
.gamefr-fc-desc { font-size: 15px; color: var(--text-muted, #4b5563); margin: 0 0 20px; line-height: 1.5; }
.gamefr-fc-btn { display: inline-block; background: var(--text, #111111); color: var(--surface, #ffffff); padding: 10px 20px; border-radius: 20px; font-weight: 700; font-size: 14px; text-decoration: none; transition: opacity 0.2s; }
.gamefr-front-feed-list-wrap { background: var(--surface, #fff); border: 1px solid var(--border, #eaeaea); border-radius: 8px; margin-top: 24px; padding: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.gamefr-front-feed-ul { list-style: none; margin: 0; padding: 0; }
.gamefr-front-feed-li { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border, #eaeaea); }
.gamefr-front-feed-pag { text-align: center; padding: 16px; border-bottom: 1px solid var(--border, #eaeaea); }
.gamefr-front-feed-footer { display: flex; gap: 12px; padding: 24px; flex-wrap: wrap; justify-content: center; background: var(--surface2, #fafafa); border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }

/* --- Extracted Inline Styles from front-page.php --- */
.gamefr-tag-latest { background:#000; color:#fff; }
.gamefr-section-fc-margin { margin-top: 16px; margin-bottom: 32px; }
.gamefr-section-tests-margin { margin-top: 48px; }
.gamefr-section-feed-margin { margin-top: 48px; margin-bottom: 48px; }
.gamefr-fc-content-wrap { flex: 1; z-index: 2; width: 100%; }
.gamefr-fc-tag { background: #6366f1; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; display: inline-block; }
.gamefr-fc-title { font-size: 24px; font-weight: 800; color: inherit; margin: 0 0 12px; line-height: 1.2; font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.gamefr-fc-link { color: inherit; text-decoration: none; }
.gamefr-fc-desc { font-size: 15px; color: var(--text-muted, #4b5563); margin: 0 0 20px; line-height: 1.5; }
.gamefr-fc-btn { display: inline-block; background: var(--text, #111111); color: var(--surface, #ffffff); padding: 10px 20px; border-radius: 20px; font-weight: 700; font-size: 14px; text-decoration: none; transition: opacity 0.2s; }
.gamefr-front-feed-list-wrap { background: var(--surface, #fff); border: 1px solid var(--border, #eaeaea); border-radius: 8px; margin-top: 24px; padding: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
.gamefr-front-feed-ul { list-style: none; margin: 0; padding: 0; }
.gamefr-front-feed-li { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border, #eaeaea); }
.gamefr-front-feed-pag { text-align: center; padding: 16px; border-bottom: 1px solid var(--border, #eaeaea); }
.gamefr-front-feed-footer { display: flex; gap: 12px; padding: 24px; flex-wrap: wrap; justify-content: center; background: var(--surface2, #fafafa); border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }

/* Réduire la taille des ampoules de moitié sur mobile */
@media (max-width: 767px) {
  .gamefr-bulb {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Cacher les ampoules supplémentaires sur PC */
@media (min-width: 768px) {
  .gamefr-bulb-mobile-only {
    display: none !important;
  }
}
