/* ============================================
   HEADER - Style par défaut
   ============================================ */
.site-header,
header {
  position: sticky;
  color: var(--text-medium);
  top: 0;
  z-index: 1000;
  background: none;
  border-bottom: 1px solid var(--ui-border);
  box-shadow: var(  --shadow-sm);
  width: 100%;
  height: 72px;
  transition: box-shadow var(--transition-base) var(--ease-smooth),
              background-color var(--transition-base) var(--ease-smooth);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Liens du header par défaut */
.header-nav a {
  color: var(--text-medium);
}

/* Burger par défaut */
.burger span,
.mobile-menu-btn span,
#hamburger-btn span {
  background: var(--text-medium);
}

/* ============================================
   HEADER - Sur page avec hero (texte blanc)
   ============================================ */
.has-hero .site-header,
.has-hero header {
  color: var(--text-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.has-hero .header-nav a {
  color: var(--text-white);
}

.has-hero .burger span,
.has-hero .mobile-menu-btn span,
.has-hero #hamburger-btn span {
  background: var(--text-white);
}

/* Scrolled state */
header.scrolled,
.site-header.scrolled {
  background: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  box-shadow: var(--shadow-md);
}

/* Liens de navigation en noir quand on scrolle */
header.scrolled .header-nav a,
header.scrolled .header-logo img,
header.scrolled .menu-right a {
  color: #000 !important;
  fill: #000 !important;
}

/* Burger en noir quand le header est scrolled */
header.scrolled .burger span,
header.scrolled .mobile-menu-btn span,
header.scrolled #hamburger-btn span {
  background-color: #000 !important;
}

/* Container */
.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* --- Logo --- */
.header-logo {
  flex-shrink: 0;
  z-index: 1001;
}

.header-logo a {
  display: block;
  line-height: 0;
  transition: opacity var(--transition-base) var(--ease-smooth);
}

.header-logo a:hover {
  opacity: 0.9;
}

.header-logo img {
  height: 42px;
  width: auto;
  display: block;
  transition: transform var(--transition-base) var(--ease-smooth);
}

.header-logo:hover img {
  transform: scale(1.05);
}

/* --- Navigation Desktop --- */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.header-nav a,
.header-nav .a {
  text-decoration: none;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  transition: color var(--transition-base) var(--ease-smooth);
  padding: var(--space-sm) 0;
  position: relative;
  cursor: pointer;
}

/* Underline animation */
.header-nav a::after,
.header-nav .a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  transition: width var(--transition-base) var(--ease-smooth);
}

.header-nav a:hover::after,
.header-nav a.active::after,
.header-nav .a:hover::after,
.header-nav .a.active::after {
  width: 100%;
}

/* Active state */
.header-nav a.active,
.header-nav .a.active {
  font-weight: var(--weight-semibold);
}

/* --- Header Right (optional CTA) --- */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-cta {
  padding: var(--space-sm) var(--space-lg);
  background: var(--btn-bg);
  border-radius: var(--btn-radius);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: all var(--transition-base) var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--btn-shadow);
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-hover-shadow);
}

.header-cta:active {
  transform: translateY(0);
}

/* ============================================
   BURGER MENU (Mobile)
   ============================================ */

.burger,
.mobile-menu-btn,
#hamburger-btn {
  display: none; /* Caché par défaut sur desktop */
  flex-direction: column;
  width: 40px;
  height: 40px;
  padding: 8px;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
  z-index: 1001;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger:active,
.mobile-menu-btn:active,
#hamburger-btn:active {
  transform: scale(0.95);
}

.burger span,
.mobile-menu-btn span,
#hamburger-btn span {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: var(--text-medium); /* AJOUTER LA COULEUR */
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus state */
.burger:focus,
.mobile-menu-btn:focus,
#hamburger-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Open state animation - CORRECTION ICI */
.burger.active span:nth-child(1),
.mobile-menu-btn.active span:nth-child(1),
#hamburger-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.active span:nth-child(2),
.mobile-menu-btn.active span:nth-child(2),
#hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3),
.mobile-menu-btn.active span:nth-child(3),
#hamburger-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   MOBILE BOTTOM SHEET MENU
   ============================================ */

/* Overlay */
.mobile-sheet-overlay,
#mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease,
              visibility 0.3s ease;
  z-index: 900;
}

.mobile-sheet-overlay.active,
#mobile-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Sheet - FERMÉ PAR DÉFAUT */
/* Sheet - FERMÉ PAR DÉFAUT */
.mobile-sheet,
#mobile-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-light);
  border-radius: 1.5rem 1.5rem 0 0; /* Valeurs en dur au lieu de var() */
  padding: 3rem 2rem;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Animation de 0.4s */
  z-index: 950;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  will-change: transform; /* AJOUTER CETTE LIGNE - optimisation GPU */
}

/* Sheet - OUVERT */
.mobile-sheet.active,
#mobile-sheet.active {
  transform: translateY(0);
  /* La transition est déjà définie ci-dessus, pas besoin de la redéfinir */
}
/* Sheet - OUVERT AVEC .active */
.mobile-sheet.active,
#mobile-sheet.active {
  transform: translateY(0); /* VISIBLE EN HAUT */
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Handle indicator (visual cue) */
.mobile-sheet::before,
#mobile-sheet::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #dff3f2;
  border-radius: 2px;
}

/* Header (optional close button) */
.mobile-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-top: var(--space-sm);
}

.mobile-sheet-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: 50%;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-sheet-close:hover {
  background: var(--bg-light);
}

.mobile-sheet-close:active {
  transform: scale(0.95);
}

/* Navigation */
.mobile-sheet-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.mobile-sheet-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  text-decoration: none;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  position: relative;
  cursor: pointer;
  color: var(--text-medium);
  overflow: hidden; /* Pour l'animation de la bordure */
  transition:
    color 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
}
.mobile-sheet-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--bg-dark);
  transition: width 0.3s ease;
}

.mobile-sheet-nav a:hover::after,
.mobile-sheet-nav a.active::after {
  width: 100%;
}

.mobile-sheet-nav a:hover,
.mobile-sheet-nav a.active {
  color: var(--text-dark);
  font-weight: var(--weight-bold);
}
/* Active indicator */

.mobile-sheet-nav a:active {
  transform: scale(0.97);
}


.mobile-sheet-nav a.active::after {
  content: "";
  position: absolute;
  right: var(--space-md);
  width: 8px;
  height: 8px;
  background: var(--accent); 
  border-radius: 50%;
  bottom: calc(50% - 4px);
}
/* CTA in mobile menu */
.mobile-sheet-cta {
  margin-top: auto;
  padding: var(--space-md);
  background: var(--btn-bg);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  box-shadow: var(--btn-shadow);
  border: none;
  
  cursor: pointer;
}

.mobile-sheet-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-hover-shadow);
}

.mobile-sheet-cta:active {
  transform: translateY(0);
}
/* ============================================
   FOOTER
   ============================================ */

footer
{  
    background: var(--gradient-accent-transparent);

}
.site-footer {
  padding: 20px;
  position: relative;

}

/* Container */
.fw-container {
  width: min(var(--container-max), 92%);
  
  margin: 0 auto;
}

/* Top grid */
.fw-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

/* About section */
.fw-about {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.fw-logo {
  width: 140px;
  height: auto;
  display: block;
}

.fw-desc {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 50ch;
}

/* Social links */
.fw-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.fw-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.125rem;
  transition: all var(--transition-fast) var(--ease-smooth);
  border: 1px solid var(--ui-border);
}

.fw-social a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* Links sections */
.fw-links h4,
.fw-contact h4,
.fw-newsletter h4 {
  margin: 0 0 var(--space-md);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.fw-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.fw-links li {
  margin: 0;
}

.fw-links a {
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast) var(--ease-smooth);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Contact */
.fw-contact p {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-sm);
}

.fw-contact a {
  text-decoration: none;
  transition: opacity var(--transition-fast) var(--ease-smooth);
}

.fw-contact a:hover {
  opacity: 0.8;
}

/* Bottom section */
.fw-copy {
  margin: 0;
}

.fw-copy .year {
  font-weight: var(--weight-semibold);
}

/* Legal links */
.fw-legal {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.fw-legal a {
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast) var(--ease-smooth);
}



/* ============================================
   UTILITIES
   ============================================ */

/* Screen reader only */
.sr-only,
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Skip to content link (accessibility) */
.skip-to-content {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1100;
  transition: top var(--transition-base) var(--ease-smooth);
  text-decoration: none;
  font-weight: var(--weight-semibold);
}

.skip-to-content:focus {
  top: 0;
}
/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
  opacity: 0;
  visibility: hidden;
  background: var(--btn-primary-bg);
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--btn-primary-bg-active);
  box-shadow: 0 6px 20px var(--accent-dark);
  transform: translateY(-3px);
}

.back-to-top:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
}

/* Animation de la flèche */
.back-to-top i {
  animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Version alternative avec effet de pulse */
.back-to-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--btn-primary-bg-active);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.back-to-top:hover::before {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
  .back-to-top {
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5);
  }
  
  .back-to-top:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
  }
}
/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide up animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Apply animations */
.mobile-sheet.active,
#mobile-sheet.active {
  animation: slideUp 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }


/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  header,
  .site-header,
  .burger,
  #hamburger-btn,
  .mobile-sheet,
  #mobile-sheet,
  .mobile-sheet-overlay,
  #mobile-sheet-overlay,
  .fw-social,
  .fw-newsletter,
  .fw-legal {
    display: none !important;
  }

  .site-footer,
  footer {
    border-top: 2px solid #000;
    padding: 1rem 0;
  }

  .fw-top {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
}