/* ==========================================================================
   SEO Facile Web - Stylesheet & Print Architecture
   Adapté à la charte graphique de ludovicfougere.com (Dark High-Tech + Amber)
   ========================================================================== */

:root {
  --bg-dark: #0b1326;
  --bg-card: rgba(23, 31, 51, 0.7);
  --border-card: rgba(62, 73, 93, 0.35);
  --primary-amber: #ffb77f;
  --primary-accent: #e47b02;
  --text-main: #dae2fd;
  --text-muted: #aeb9d0;
}

body.site-body {
  background-color: #0b1326 !important;
  color: #dae2fd !important;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

main {
  display: block !important;
  position: relative !important;
  z-index: 10 !important;
}

.font-headline {
  font-family: 'Space Grotesk', sans-serif;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.text-glow:hover {
  text-shadow: 0 0 15px rgba(255, 183, 127, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0b1326;
}
::-webkit-scrollbar-thumb {
  background: #222a3d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e495d;
}

/* Animation Scanner Pulse */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.scanner-pulse {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

/* ==========================================================================
   PRINT / PDF EXPORT RULES (@media print)
   Garantit un document PDF impeccable sans bibliothèques externes lourdes
   ========================================================================== */

@media print {
  /* Masquer tous les éléments interactifs et de navigation */
  header,
  #audit-form-container,
  #print-btn,
  #demo-btn,
  #loading-section,
  .no-print {
    display: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #results-section {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .glass-panel {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    color: #111827 !important;
  }

  /* Préservation des fonds de couleur pour les jauges */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Éviter les sauts de page au milieu d'un bloc de recommandation */
  .glass-panel,
  .break-inside-avoid {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Textes sombres et lisibles sur papier / PDF */
  .text-\[\#dae2fd\] {
    color: #111827 !important;
  }
  .text-\[\#aeb9d0\] {
    color: #4b5563 !important;
  }
  .text-primary {
    color: #b45309 !important; /* Ambre foncé lisible sur fond blanc */
  }

  /* En-tête imprimé spécifique */
  .print-header {
    display: block !important;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
  }

  /* Format A4 optimisé */
  @page {
    size: A4 portrait;
    margin: 15mm 15mm 15mm 15mm;
  }
}

.print-header {
  display: none;
}

/* ==========================================================================
   KADENCE HEADER & FOOTER LIVE STYLES
   Structure le header dynamique (évite le dédoublement mobile/desktop et l'empilement)
   ========================================================================== */

#live-header-container {
  background: #ffffff !important;
  color: #1f2933 !important;
  position: relative;
  z-index: 40;
}

#masthead {
  background: #ffffff !important;
}

.site-container {
  max-width: 1290px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.site-main-header-inner-wrap {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 1rem 0 !important;
}

.site-header-main-section-left {
  display: flex !important;
  align-items: center !important;
}

.site-branding a.brand {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
}

.site-branding a.brand img {
  display: block !important;
  max-height: 32px !important;
  width: auto !important;
}

.site-header-main-section-right {
  display: flex !important;
  align-items: center !important;
}

/* Menu de navigation Desktop */
.primary-menu-container ul.menu {
  display: flex !important;
  align-items: center !important;
  gap: 2rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.primary-menu-container ul.menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.primary-menu-container ul.menu li a {
  font-family: 'Raleway', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1f2933 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  padding: 0.5rem 0 !important;
}

.primary-menu-container ul.menu li a:hover {
  color: #e47b02 !important;
}

/* Règle vitale : Desktop vs Mobile pour masquer le second logo */
@media screen and (min-width: 1025px) {
  #main-header {
    display: block !important;
  }
  #mobile-header {
    display: none !important;
  }
}

@media screen and (max-width: 1024px) {
  #main-header {
    display: none !important;
  }
  #mobile-header {
    display: block !important;
  }
  #mobile-header .site-main-header-inner-wrap {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem 0 !important;
  }
  #mobile-toggle {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    color: #1f2933 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #mobile-toggle svg {
    width: 26px !important;
    height: 26px !important;
    fill: currentColor !important;
  }
}

/* Drawer Mobile (Masqué hors interaction) */
#mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #ffffff;
  color: #1f2933;
  z-index: 100;
  box-shadow: -4px 0 20px rgba(0,0,0,0.2);
  padding: 1.5rem;
}

#mobile-drawer.show-drawer {
  display: block !important;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

body.showing-popup-drawer-from-right .drawer-overlay {
  display: block !important;
}

#mobile-drawer .drawer-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

#mobile-drawer .menu-toggle-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1f2933;
}

#mobile-drawer ul.menu {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#mobile-drawer ul.menu li {
  margin-bottom: 1.25rem;
}

#mobile-drawer ul.menu li a {
  font-family: 'Raleway', sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #1f2933 !important;
  text-decoration: none !important;
}

#mobile-drawer ul.menu li a:hover {
  color: #e47b02 !important;
}

/* Footer officiel Kadence */
#live-footer-container {
  background: #ffffff !important;
  color: #52606d !important;
  font-family: 'Raleway', sans-serif !important;
  font-size: 14px !important;
  border-top: 1px solid #e5e7eb !important;
}

#colophon {
  padding: 1.5rem 0 !important;
  text-align: center !important;
}

#colophon p {
  margin: 0 !important;
  color: #7b8794 !important;
}

/* Isolation & reset des titres dans les cartes de recommandations */
#detailed-checklist-container h3,
#detailed-checklist-container h4 {
  margin: 0 !important;
  font-family: inherit;
  line-height: 1.3 !important;
}

#detailed-checklist-container p {
  margin: 0.25rem 0 0 0 !important;
}
