/* Feuille publique concaténée, dans l'ordre des sources. Pas d'étape de build :
   modifier la source, puis reporter le même ordre ici. */

/* --- wattsup.css --- */
/* WattsUp - Styles spécifiques */

/* Couleurs turquoise personnalisées */
:root {
  --turquoise-50: #f0fdfa;
  --turquoise-100: #ccfbf1;
  --turquoise-200: #99f6e4;
  --turquoise-300: #5eead4;
  --turquoise-400: #2dd4bf;
  --turquoise-500: #159D91;
  --turquoise-600: #0E8C84;
  --turquoise-700: #0B6E68;
  --turquoise-800: #115e59;
  --turquoise-900: #134e4a;
}

/* Section Hero - Styles de base pour assurer le contraste */
.hero-section {
  background: linear-gradient(135deg, var(--turquoise-700), var(--turquoise-900)) !important;
  color: white !important;
  min-height: 80vh;
}

.hero-section,
.hero-section h1,
.hero-section p,
.hero-section span,
.hero-section div {
  color: white !important;
}

.hero-section .text-turquoise-200 {
  color: #99f6e4 !important;
}

.hero-section .text-turquoise-300 {
  color: #5eead4 !important;
}

.hero-section .bg-turquoise-500 {
  background-color: var(--turquoise-500) !important;
}

.hero-section .border-turquoise-400 {
  border-color: var(--turquoise-400) !important;
}

.hero-section .border-turquoise-300 {
  border-color: var(--turquoise-300) !important;
}

.hero-section .border-turquoise-200 {
  border-color: var(--turquoise-200) !important;
}

/* Forcer le fond turquoise même si Tailwind ne fonctionne pas */
.hero-section {
  background: #0B6E68 !important;
  background: linear-gradient(135deg, #0B6E68, #134e4a) !important;
}

/* Styles spécifiques pour le contenu principal */
.hero-section h1 {
  color: white !important;
  font-size: 4rem !important;
  font-weight: 800 !important;
}

.hero-section .hero-title {
  color: white !important;
}

.hero-section .hero-subtitle {
  color: #5eead4 !important;
}

.hero-section .hero-description {
  color: rgba(255, 255, 255, 0.9) !important;
}

.hero-section .hero-badge {
  background-color: rgba(21, 157, 145, 0.3) !important;
  border-color: rgba(45, 212, 191, 0.4) !important;
  color: white !important;
}

/* Styles pour les boutons d'action */
.hero-section .btn-white {
  background-color: white !important;
  color: #0B6E68 !important;
  border: none !important;
  font-weight: bold !important;
}

.hero-section .btn-white:hover {
  background-color: #f0fdfa !important;
  color: #134e4a !important;
  transform: translateY(-2px) !important;
}

/* En-têtes modernes - Design sobre et compact */
.bg-gradient-to-r.from-turquoise-dark.to-turquoise-600 {
  background: linear-gradient(135deg, #0B6E68 0%, #0E8C84 100%) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.bg-gradient-to-r.from-turquoise-600.to-turquoise-dark {
  background: linear-gradient(135deg, #0E8C84 0%, #0B6E68 100%) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Styles modernes pour les en-têtes de pages */
.modern-header {
  background: linear-gradient(135deg, #0B6E68 0%, #0E8C84 100%) !important;
  padding: 2rem 0 !important;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.15) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Effet subtil d'overlay */
.modern-header::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
  pointer-events: none !important;
}

/* Texte optimisé pour la lisibilité */
.bg-gradient-to-r.from-turquoise-dark.to-turquoise-600,
.bg-gradient-to-r.from-turquoise-600.to-turquoise-dark,
.modern-header {
  color: white !important;
}

.bg-gradient-to-r.from-turquoise-dark.to-turquoise-600 *,
.bg-gradient-to-r.from-turquoise-600.to-turquoise-dark *,
.modern-header * {
  color: white !important;
}

/* Titres modernes et compacts */
.modern-header h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.5rem !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

@media (min-width: 768px) {
  .modern-header h1 {
    font-size: 2.5rem !important;
  }
}

/* Descriptions plus subtiles */
.modern-header p {
  font-size: 1rem !important;
  opacity: 0.9 !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

@media (min-width: 768px) {
  .modern-header p {
    font-size: 1.125rem !important;
  }
}

/* Liens de retour modernisés */
.modern-header .breadcrumb-link {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.5rem 1rem !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modern-header .breadcrumb-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Icônes de catégorie modernisées */
.modern-header .category-icon {
  width: 3rem !important;
  height: 3rem !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 1rem !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Suppression des éléments décoratifs trop voyants */
.modern-header .decorative-element {
  display: none !important;
}

/* Barre de soulignement moderne */
.modern-header .title-underline {
  position: absolute !important;
  bottom: -2px !important;
  left: 0 !important;
  width: 3rem !important;
  height: 3px !important;
  background: #FFD100 !important;
  border-radius: 2px !important;
}

/* Responsive - version mobile encore plus compacte */
@media (max-width: 767px) {
  .modern-header {
    padding: 1.5rem 0 !important;
  }
  
  .modern-header h1 {
    font-size: 1.75rem !important;
  }
  
  .modern-header .category-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
}

.hero-section .btn-outline {
  background-color: transparent !important;
  color: white !important;
  border: 2px solid white !important;
}

.hero-section .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

/* Animation styles */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Hero section styles */
.hero-animation-pulse {
    animation-duration: 6s;
}

.hero-animation-pulse-slow {
    animation-duration: 8s;
}

.hero-badge-animation {
    animation-duration: 3s;
}

.scroll-indicator-animation {
    animation-duration: 2s;
}

/* Database cards */
.database-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-top-width: 4px;
    overflow: hidden;
}

.database-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-0.25rem);
}

.database-card-content {
    padding: 2rem;
}

.database-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
}

.database-icon i {
    font-size: 1.875rem;
}

.database-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.database-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.database-description {
    color: #4b5563;
    margin-bottom: 1.5rem;
    text-align: center;
}

.database-features {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.database-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.database-features li i {
    margin-right: 0.5rem;
}

.database-action {
    text-align: center;
}

/* Border colors */
.border-turquoise {
    border-top-color: #159D91;
}

.border-green {
    border-top-color: #22c55e;
}

.border-blue {
    border-top-color: #3b82f6;
}

.border-purple {
    border-top-color: #8b5cf6;
}

.border-yellow {
    border-top-color: #eab308;
}

/* Button styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: scale(1.05);
}

/* Gradient backgrounds */
.bg-gradient-turquoise {
    background-image: linear-gradient(to right, #0E8C84, #159D91);
}

.bg-gradient-green {
    background-image: linear-gradient(to right, #16a34a, #22c55e);
}

.bg-gradient-blue {
    background-image: linear-gradient(to right, #2563eb, #3b82f6);
}

.bg-gradient-purple {
    background-image: linear-gradient(to right, #7c3aed, #8b5cf6);
}

.bg-gradient-yellow {
    background-image: linear-gradient(to right, #ca8a04, #eab308);
}

/* Feature section */
.feature-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.25rem;
}

/* Testimonial section */
.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 2rem;
}

/* FAQ section */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: white;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    background-color: white;
}

.faq-question h3 {
    margin: 0;
}

.faq-answer {
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.faq-answer p {
    margin: 0;
}

/* Tags section */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

#toggle-tags {
    position: relative;
    overflow: hidden;
}

#toggle-tags::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

#toggle-tags:hover::before {
    transform: translateX(100%);
}

.testimonial-card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Styles pour les liens spéciaux du footer */
.special-footer-link {
    display: inline-block;
    position: relative;
    z-index: 9999;
}

/* Styles du menu de navigation */
/* Amélioration du comportement du sous-menu */
.nav-dropdown {
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
    padding: 8px 0;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: fixed;
    z-index: 9999;
    max-height: 80vh;
    overflow-y: auto;
    width: 250px;
    background-color: white;
    border-radius: 8px;
}

.nav-dropdown-container:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Maintenir le menu visible */
.nav-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Augmenter la zone de détection */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Style des éléments du menu */
.nav-dropdown a {
    position: relative;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-dropdown a:hover {
    border-left: 3px solid #0694a2;
    background-color: rgba(6, 148, 162, 0.1);
}

/* Indicateur visuel pour montrer que le menu est cliquable */
#wattsup-menu > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9998;
}

#wattsup-menu:hover > a::after,
#wattsup-menu.active > a::after {
    opacity: 1;
}

.testimonial-indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background-color: white;
}

.testimonial-indicator.active {
    opacity: 1;
}

.testimonial-indicator.inactive {
    opacity: 0.4;
}

/* FAQ section */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 0;
}

.faq-answer {
    padding-top: 1rem;
    color: #4b5563;
}

/* CTA section */
.cta-section {
    background-image: linear-gradient(135deg, #0B6E68, #0E8C84);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.cta-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .database-features {
        padding-left: 0;
    }
    
    .database-features li {
        justify-content: center;
    }
}

/* --- sidebar.css --- */
/* Sidebar moderne inspiré de DeepL et ChatGPT */

/* Styles globaux pour éviter les problèmes de layout */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%;
}

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --sidebar-bg: #1a1a1a;
    --sidebar-hover-bg: #2d2d2d;
    --sidebar-active-bg: #0E8C84;
    --sidebar-text: #e5e5e5;
    --sidebar-text-secondary: #a3a3a3;
    --sidebar-border: #333;
    --content-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Layout principal avec CSS Grid */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: var(--content-bg);
    transition: grid-template-columns 0.3s ease;
}

.app-container.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* Sidebar principal */
.modern-sidebar {
    width: 280px;
    height: 100vh;
    background: #FAF8F5;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
}

/* Ajouter les transitions seulement après le chargement */
.modern-sidebar.loaded {
    transition: width 0.3s ease;
}

.modern-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Styles pour sidebar collapsed - géré par CSS Grid maintenant */

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--sidebar-border);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--sidebar-hover-bg);
}

/* En-tête du sidebar */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FAF8F5;
}

.modern-sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
    justify-content: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.modern-sidebar.collapsed .sidebar-logo .logo-text {
    display: none;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--sidebar-active-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: none !important;
}

.modern-sidebar.collapsed .sidebar-logo img {
    width: 24px;
    height: 24px;
}

/* Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    padding: 0 20px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.modern-sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 12px;
    position: relative;
}

.modern-sidebar.collapsed .nav-link {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    margin: 2px 4px;
    justify-content: center;
}

/* Espacement entre les icônes et le texte */
.nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.modern-sidebar.collapsed .nav-link i {
    margin-right: 0;
}

/* Style pour les icônes SVG personnalisées */
.nav-icon-svg {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
}

.modern-sidebar.collapsed .nav-icon-svg {
    margin-right: 0;
}

/* Style pour les icônes Phosphor Duotone - Style Pro sobre */
.nav-icon-ph {
    font-size: 22px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: #94a3b8; /* slate-400 - Gris ardoise clair discret */
    --ph-duotone-opacity: 0.2;
}

.nav-icon-ph-small {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: #94a3b8; /* slate-400 */
    --ph-duotone-opacity: 0.2;
}

.modern-sidebar.collapsed .nav-icon-ph,
.modern-sidebar.collapsed .nav-icon-ph-small {
    margin-right: 0;
}

/* Hover avec couleur émeraude */
.nav-link:hover .nav-icon-ph,
.nav-link:hover .nav-icon-ph-small {
    color: #059669; /* emerald-600 au hover */
    transform: scale(1.05);
}

/* État actif : icône blanche sur fond émeraude */
.nav-link.active .nav-icon-ph,
.nav-link.active .nav-icon-ph-small {
    color: white !important;
}

/* État focus : assurer la visibilité de l'icône */
.nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Focus sans être actif : icône émeraude pour contraste */
.nav-link:focus:not(.active) .nav-icon-ph,
.nav-link:focus:not(.active) .nav-icon-ph-small {
    color: #059669; /* emerald-600 pour bon contraste avec outline bleu */
}

/* Focus ET actif : outline blanc pour contraste avec fond émeraude */
.nav-link.active:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Icônes blanches sur fond CEE (violet) */
.nav-link-cee .nav-icon-ph {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link-cee:hover .nav-icon-ph {
    color: white !important;
}

/* Admin : style rouge discret */
.nav-link-admin .nav-icon-ph {
    color: #f87171; /* red-400 plus doux */
}

.nav-link-admin:hover .nav-icon-ph {
    color: #dc2626; /* red-600 au hover */
}

.nav-link:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.nav-link.active {
    background: var(--sidebar-active-bg);
    color: white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #10b981;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.modern-sidebar.collapsed .nav-icon {
    margin-right: 0;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.modern-sidebar.collapsed .nav-text {
    display: block;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
}

.nav-arrow {
    margin-left: auto;
    transition: var(--transition);
    font-size: 12px;
}

.modern-sidebar.collapsed .nav-arrow {
    display: none;
}

.nav-item.expanded .nav-arrow {
    transform: rotate(90deg);
}

/* Sous-menu */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
    border-left: 3px solid #0E8C84;
    margin: 4px 12px;
    border-radius: 8px;
}

.nav-item.expanded .nav-submenu {
    max-height: 500px;
}

.nav-submenu .nav-link {
    padding: 12px 20px 12px 24px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    border-radius: 6px;
    margin: 2px 8px;
}

.sidebar.collapsed .nav-submenu .nav-link {
    padding: 10px 16px;
}

.nav-submenu .nav-link:hover {
    background: #e5f3f2;
    color: #0E8C84;
    transform: translateX(4px);
}

.nav-submenu .nav-link.active {
    color: white;
    background: #0E8C84;
    box-shadow: 0 2px 4px rgba(14, 140, 132, 0.2);
}

/* Contenu principal */
.main-content {
    background: var(--content-bg);
    overflow-x: hidden;
    padding: 0 8rem;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Ajustements pour sidebar collapsed - même espacement */
.app-container.sidebar-collapsed .main-content {
    padding: 0 6rem;
}

/* Veille publique: la mise en page éditoriale gère déjà ses marges.
   Garder les paddings globaux ici créait des gouttières blanches au repli du menu. */
body.veille-public-body .main-content,
body.veille-public-body .app-container.sidebar-collapsed .main-content {
    padding: 0 !important;
    background: var(--veille-paper, #f7f3ea) !important;
}

/* Forcer l'adaptation du contenu des pages */
/* Exception: Allow padding on CEE calculator page to prevent sidebar overlap */
body:not([data-page="cee-calculator"]) .main-content .container,
body:not([data-page="cee-calculator"]) .main-content .mx-auto {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Supprimer les contraintes de largeur Tailwind */
/* Exception: Allow max-width on CEE calculator to prevent sidebar overlap */
body:not([data-page="cee-calculator"]) .main-content .max-w-7xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-6xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-5xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-4xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-3xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-2xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-xl,
body:not([data-page="cee-calculator"]) .main-content .max-w-lg,
body:not([data-page="cee-calculator"]) .main-content .max-w-md,
body:not([data-page="cee-calculator"]) .main-content .max-w-sm {
    max-width: none !important;
    width: 100% !important;
}

/* For CEE calculator: restore Tailwind max-width and add proper centering */
body[data-page="cee-calculator"] .main-content .max-w-7xl {
    max-width: 80rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Header avec CSS Grid */
.main-content header {
    width: 100%;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0;
}

/* S'assurer que la barre décorative s'étend complètement */
.main-content header .h-2 {
    width: 100%;
}

/* Contenu du header */
.main-content header .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Espacement du contenu principal */
.main-content > div:not(header) {
    padding-right: 0;
}

/* Tooltip pour sidebar collapsed */
.nav-tooltip {
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
    border: 1px solid var(--sidebar-border);
    box-shadow: var(--shadow);
}

.sidebar.collapsed .nav-link:hover .nav-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Badge de notification */
.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    margin-left: 0;
}

/* Masquer tous les badges (HOT, NEW, BETA, EN) quand la sidebar est collapsed */
.modern-sidebar.collapsed .nav-link span[class*="bg-gradient"],
.modern-sidebar.collapsed .nav-link span[class*="bg-red"],
.modern-sidebar.collapsed .nav-link span[class*="bg-yellow"],
.modern-sidebar.collapsed .nav-link span[class*="bg-blue"],
.modern-sidebar.collapsed .nav-link div[class*="bg-yellow"] {
    display: none !important;
}

/* Footer du sidebar */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #FAF8F5;
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

.modern-sidebar.collapsed .sidebar-footer {
    padding: 15px 10px;
}

/* Bouton toggle */
.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
    box-sizing: border-box;
    position: relative;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}

.modern-sidebar.collapsed .sidebar-toggle {
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
}

.modern-sidebar.collapsed .sidebar-toggle .nav-text {
    display: none;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.user-profile:hover {
    background: var(--sidebar-hover-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sidebar-active-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.sidebar.collapsed .user-info {
    display: none;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--sidebar-text);
    margin-bottom: 2px;
}

.user-role {
    font-size: 12px;
    color: var(--sidebar-text-secondary);
}

/* Bouton hamburger pour mobile */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--sidebar-bg);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: var(--sidebar-text);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--sidebar-hover-bg);
}

.mobile-menu-btn i {
    font-size: 18px;
}

/* Responsive tablette - Correction du bouton toggle avec haute spécificité */
/* Inclut les grandes tablettes comme iPad A16 (1366px) */
@media (max-width: 1366px) and (min-width: 769px) {
    /* Utiliser le style par défaut (desktop) qui est plus propre */
    .modern-sidebar .sidebar-footer {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        background: #FAF8F5 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-top: auto !important;
        padding: 20px !important;
    }

    .modern-sidebar.collapsed .sidebar-footer {
        padding: 15px 10px !important;
        width: 100% !important;
    }
    
    /* Style du bouton toggle simple */
    .modern-sidebar .sidebar-footer .sidebar-toggle {
        background: transparent !important;
        border: 1px solid transparent !important;
        box-shadow: none !important;
    }
    
    .modern-sidebar .sidebar-footer .sidebar-toggle:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* Responsive desktop - Uniquement pour les vrais écrans desktop */
@media (min-width: 1367px) {
    /* Padding uniquement pour les pages d'articles (posts) */
    body[data-page="post"] .container {
        padding-left: 8rem;
        padding-right: 8rem;
    }
    
    .sidebar-collapsed body[data-page="post"] .container {
        padding-left: 6rem;
        padding-right: 6rem;
    }
    
    /* S'assurer que le bouton toggle est visible sur desktop */
    .sidebar-toggle {
        display: flex !important;
        z-index: 60 !important; /* Plus élevé que le bloc cookie (z-50) */
        position: relative !important;
    }
    
    .sidebar-footer {
        z-index: 60 !important;
        position: relative !important;
    }
    
    /* Ajuster le positionnement du bloc cookie pour qu'il prenne toute la largeur du contenu */
    #cookie-consent {
        left: 280px !important; /* 280px = largeur sidebar */
        right: 0 !important;
        transform: none !important;
        z-index: 55 !important; /* Entre sidebar (60) et ancien z-50 */
    }

    /* Quand sidebar est collée */
    .sidebar-collapsed #cookie-consent {
        left: var(--sidebar-collapsed-width) !important;
    }
}    

/* Responsive mobile - Exclure les tablettes */
@media (max-width: 768px) {
    /* Garantir le défilement sur mobile */
    html, body {
        overflow-x: hidden;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh;
        position: relative;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
    
    /* Empêcher les conflits avec d'autres styles */
    body.mobile-menu-open {
        overflow: hidden !important;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .app-container {
        grid-template-columns: 1fr;
        height: auto !important;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: visible !important;
    }
    
    .app-container.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
    
    .modern-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        position: fixed;
        z-index: 1000;
        height: 100vh;
        top: 0;
        left: 0;
        overflow-y: auto;
    }
    
    .modern-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
        height: auto !important;
        min-height: calc(100vh - 70px);
        padding: 0;
        padding-top: 70px; /* Espace pour le bouton hamburger */
        overflow-x: hidden;
        overflow-y: auto !important;
        position: relative;
    }
    
    /* Container principal responsive */
    .main-content .container {
        max-width: 100%;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin: 0 auto;
    }
    
    /* Espacement supplémentaire pour les éléments interactifs sur mobile */
    .main-content button,
    .main-content a:not(.nav-link),
    .main-content input,
    .main-content select {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Espacement entre les sections sur mobile */
    .main-content section,
    .main-content .section {
        padding: 1rem 0;
    }
}

/* Règle spécifique pour cacher le bouton toggle UNIQUEMENT sur mobile strict */
@media (max-width: 768px) and (orientation: portrait), 
       (max-width: 480px) {
    /* Cacher le bouton toggle desktop sur mobile uniquement */
    .sidebar-toggle {
        display: none !important;
    }
    
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--sidebar-bg);
        color: var(--sidebar-text);
        border: none;
        padding: 12px;
        border-radius: 8px;
        cursor: pointer;
        box-shadow: var(--shadow);
        transition: var(--transition);
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-toggle:hover {
        background: var(--sidebar-hover-bg);
    }
}

/* Protection du logo principal du header */
header .logo-container img,
header .logo img,
.header-logo img {
    transition: transform 0.3s ease !important;
    width: auto !important;
    height: auto !important;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slideIn 0.3s ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }

/* Thème sombre amélioré */
.sidebar {
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
}

.nav-link.active {
    background: linear-gradient(90deg, var(--sidebar-active-bg) 0%, #0B6E68 100%);
    box-shadow: 0 2px 4px rgba(14, 140, 132, 0.3);
}

/* Effets de brillance */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-link:hover::after {
    transform: translateX(100%);
}

/* =====================================================
   STYLES POUR SIDEBAR SIMPLIFIÉE (2024)
   ===================================================== */

/* Lien de recherche - mis en avant */
.nav-link-search {
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
    border: 1px solid #99f6e4;
    font-weight: 600;
    margin-bottom: 8px;
}

.nav-link-search:hover {
    background: linear-gradient(135deg, #ccfbf1 0%, #bae6fd 100%);
    border-color: #5eead4;
}

.nav-link-search i {
    color: #0E8C84;
}

.nav-link-search:focus {
    outline: 2px solid #0E8C84;
    outline-offset: 2px;
}

/* Badges mini pour les compteurs */
.nav-badge-mini {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.modern-sidebar.collapsed .nav-badge-mini {
    display: none;
}

/* Badge live (point vert pulsant) */
.nav-badge-live {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: auto;
    animation: pulse-live 2s infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}

@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.modern-sidebar.collapsed .nav-badge-live {
    position: absolute;
    top: 8px;
    right: 12px;
    margin-left: 0;
}

/* Lien Simulateur CEE - style premium */
.nav-link-cee {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: white !important;
    border: 1px solid #4338ca;
}

.nav-link-cee:hover {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
    color: white !important;
}

.nav-link-cee i {
    color: #a5b4fc !important;
}

.nav-link-cee.active {
    background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
}

.nav-link-cee:focus {
    outline: 2px solid #a5b4fc;
    outline-offset: 2px;
}

/* Liens secondaires (plus petits) */
.nav-section-secondary {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.nav-link-small {
    padding: 8px 20px;
    font-size: 13px;
}

.nav-link-small i {
    font-size: 14px;
    color: #9ca3af;
}

.modern-sidebar.collapsed .nav-link-small {
    padding: 10px 16px;
}

/* Lien Admin */
.nav-link-admin {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626 !important;
}

.nav-link-admin:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.nav-link-admin i {
    color: #dc2626 !important;
}

.nav-link-admin:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Amélioration du hover sur les icônes colorées */
.nav-link:hover .text-green-500,
.nav-link:hover .text-purple-500,
.nav-link:hover .text-blue-500,
.nav-link:hover .text-red-500 {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Espacement optimisé des sections */
.sidebar-nav {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.nav-section {
    margin-bottom: 16px;
}

.nav-section:first-child {
    margin-bottom: 20px;
}

/* Titres de section plus discrets */
.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 20px 8px;
}

.sidebar-live {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0 0 8px;
    color: #243036;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
}

.sidebar-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #15803D;
}

.modern-sidebar.collapsed .nav-section-title {
    padding: 0 4px 6px;
    text-align: center;
    font-size: 9px;
    color: #3A4449;
}

@media (min-width: 769px) {
    html.sidebar-rail .app-container {
        grid-template-columns: var(--sidebar-collapsed-width) 1fr;
    }

    html.sidebar-rail .modern-sidebar {
        width: var(--sidebar-collapsed-width);
    }

    html.sidebar-rail .modern-sidebar .sidebar-header {
        padding: 16px 8px;
        justify-content: center;
    }

    html.sidebar-rail .modern-sidebar .logo-text {
        display: none;
    }

    html.sidebar-rail .modern-sidebar .nav-link {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 4px;
        margin: 2px 4px;
        justify-content: center;
    }

    html.sidebar-rail .modern-sidebar .nav-text {
        display: block;
        font-size: 11px;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
    }

    html.sidebar-rail .modern-sidebar .nav-icon-ph,
    html.sidebar-rail .modern-sidebar .nav-link i {
        margin-right: 0;
    }

    html.sidebar-rail .sidebar-live,
    .modern-sidebar.collapsed .sidebar-live {
        display: flex;
    }
}

@media (max-width: 768px) {
    .sidebar-live {
        display: none !important;
    }
}

/* --- site-header.css --- */
/* Barre unique. z-index 200 : sous l'overlay d'auth WattsMonde (11000)
   et sous le rail replié (10030). Le fond reste sombre pour rester lisible
   tant que les pages ne sont pas passées au thème (lot suivant). */

.site-header {
  position: fixed;
  z-index: 200;
  inset: 0 0 auto 0;
  height: 64px;
  color: var(--ink);
  background: rgba(11, 16, 18, .94);
  border-bottom: 1px solid transparent;
  transition: transform .45s var(--ease), background .4s, border-color .4s;
}

.site-header.is-solid {
  background: rgba(11, 16, 18, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}

.site-header.is-up { transform: translateY(-100%); }

.site-header__bar {
  height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 18px;
}

a.site-header__mark {
  flex: none;
  font: 800 21px/1 var(--display);
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}

a.site-header__mark img {
  display: block;
  width: auto;
  height: 19px;
}

.site-header__panel {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.site-header__links,
.site-header__tools {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__tools { margin-left: auto; gap: 18px; }

.site-header a {
  color: var(--mute);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header a:hover,
.site-header a[aria-current="page"] { color: var(--ink); }

a.site-header__mark {
  font: 800 21px/1 var(--display);
  letter-spacing: -.02em;
  color: var(--ink);
  text-transform: none;
}

a.site-header__access {
  flex: none;
  color: var(--ink);
  border: 1px solid var(--line2);
  padding: 9px 14px;
  white-space: nowrap;
  transition: border-color .25s, background .25s;
}

.site-header__access-short { display: none; }

.site-header__access:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: rgba(254, 250, 240, .06);
}

.site-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--ink);
  place-items: center;
  cursor: pointer;
}

.site-header__burger,
.site-header__burger::before,
.site-header__burger::after {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
}

.site-header__burger { position: relative; }

.site-header__burger::before,
.site-header__burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.site-header__burger::before { top: -6px; }
.site-header__burger::after { top: 6px; }

.site-header .nav-badge-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--sig);
  vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(21, 157, 145, .45);
  animation: site-header-live 2s steps(1) infinite;
}

@keyframes site-header-live {
  50% { opacity: .3; }
}

.site-header__lang,
.site-header__account { position: relative; }

.site-header summary {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.site-header summary::-webkit-details-marker { display: none; }

.site-header summary:hover { color: var(--ink); }

.site-header__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2;
  min-width: 200px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line2);
}

.site-header__menu a {
  display: block;
  padding: 8px 10px;
}

.site-header :where(a, button, summary):focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
}

.app-container {
  display: block;
  min-height: 100vh;
}

.app-container > main { padding-top: 64px; }

body.veille-public-body .app-container > main { padding-top: 64px !important; }

body.home-agades .home-toolbar {
  margin-left: 0 !important;
  width: 100% !important;
}

body:has(#site-header) #app {
  position: relative;
  inset: auto;
  height: calc(100dvh - 64px);
  margin-top: 64px;
}

body:has(#site-header) header.wm-chrome-tier1 { top: 64px; }
body:has(#site-header) .wm-chrome-tier2 { top: 116px; }
body:has(#site-header) .wm-app-topbar { top: 78px; }

html:has(#site-header) {
  scroll-padding-top: 88px;
}

html:has(#site-header) :target {
  scroll-margin-top: 88px;
}

@media (max-width: 900px) {
  .site-header__access { margin-left: auto; padding: 8px 10px; }
  .site-header__toggle { display: grid; flex: none; margin-left: 0; }

  .site-header__panel {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px 20px 20px;
    background: rgba(11, 16, 18, .96);
    border-bottom: 1px solid var(--line);
  }

  .site-header__panel.is-open { display: flex; }

  .site-header__links,
  .site-header__tools {
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    gap: 14px;
  }

  .site-header__menu { position: static; min-width: 0; }
}

@media (max-width: 480px) {
  .site-header__access-long { display: none; }
  .site-header__access-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__access,
  .site-header .nav-badge-live {
    transition: none !important;
    animation: none !important;
  }

  .site-header.is-up { transform: none !important; }
}

/* --- cookie-consent.css --- */
/* Bandeau cookies : sobre, compact sur téléphone, Accepter et Refuser à égalité. */
.we-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--panel);
  border-top: 1px solid var(--line2);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .28);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.we-cookie__inner {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 14px 20px;
}

.we-cookie__text {
  flex: 1 1 auto;
  margin: 0;
  color: var(--mute);
}

.we-cookie__text b {
  color: var(--ink);
}

.we-cookie__text a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.we-cookie__actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.we-cookie__btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #0B1012;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.we-cookie__btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line2);
}

.we-cookie__btn:hover {
  background: var(--sig);
  color: #0B1012;
}

.we-cookie__btn--quiet:hover {
  background: rgba(254, 250, 240, .08);
}

.we-cookie__btn:focus-visible,
.we-cookie__text a:focus-visible {
  outline: 2px solid var(--sig);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .we-cookie__inner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }

  .we-cookie {
    font-size: 13px;
  }

  .we-cookie__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  }

  .we-cookie__btn {
    padding: 0 8px;
  }
}

/* Sur tablette et ordinateur, le bandeau laisse visible la barre latérale (ouverte ou repliée). */
@media (min-width: 769px) {
  .we-cookie { left: var(--sidebar-width, 280px); }
  html.sidebar-rail .we-cookie { left: var(--sidebar-collapsed-width, 80px); }
}

#cookie-modal-content {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line2);
}

#cookie-modal-content :is(p, .text-gray-600, .text-gray-500) {
  color: var(--mute);
}

#cookie-settings-btn {
  background: var(--panel);
  border-color: var(--teal);
  color: var(--teal);
}

#cookie-settings-btn i {
  color: var(--teal);
}

#cookie-modal-content .from-teal-600 {
  background-image: none !important;
  background-color: var(--teal) !important;
}

#cookie-modal-content .from-teal-600 :is(h2, button, i) {
  color: #0B1012 !important;
}

#cookie-modal-save,
#cookie-modal-save:hover {
  background-color: var(--teal) !important;
  color: #0B1012 !important;
}
