/*
Theme Name: Scalience
Theme URI: https://scalience.fr
Author: Coraline
Version: 1.1
Requires at least: 6.0
*/

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important; 
  color: #0f1e2d; 
  background: #f4f7ef; 
  line-height: 1.6; 
}
img { max-width: 100%; height: auto; display: block; }
a { color: #ac841e; text-decoration: none; transition: 0.2s; }
a:hover { color: #8a6b18; }

h1, h2, h3, h4, h5, h6 { 
  font-family: system-ui, -apple-system, sans-serif !important; 
  font-weight: 800; 
  line-height: 1.2; 
  margin-bottom: 1rem; 
  color: #0f1e2d; 
}
p { margin-bottom: 1rem; color: #4a5568; }

/* === LAYOUT === */
.section { padding: clamp(3rem, 6vw, 6rem) 1.5rem; max-width: 1200px; margin: 0 auto; }
.hero { 
  min-height: 75vh; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  text-align: center; 
  background: linear-gradient(135deg, #f4f7ef 0%, #ffffff 100%);
  padding: 4rem 1.5rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1.5rem; }
.hero p { font-size: 1.2rem; max-width: 650px; margin: 0 auto 2rem; }

/* === BOUTONS (CORRECTION VISIBILITÉ) === */
.wp-block-button__link, .btn {
  background: #ac841e !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.9rem 2rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
  text-align: center;
}
.wp-block-button__link:hover, .btn:hover {
  background: #8a6b18 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(172, 132, 30, 0.3);
}

/* Boutons sur fond sombre */
.cta-dark .wp-block-button__link, .cta-dark .btn {
  background: #ffffff !important;
  color: #061940 !important;
}
.cta-dark .wp-block-button__link:hover, .cta-dark .btn:hover {
  background: #f4f7ef !important;
  color: #0f1e2d !important;
}

/* === GRILLE & CARTES === */
.grid-3 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
  gap: 2rem; 
  margin-top: 2rem; 
}
.card { 
  padding: 2rem; 
  background: #ffffff; 
  border-radius: 12px; 
  box-shadow: 0 4px 15px rgba(15,30,45,0.06); 
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); }
.card-icon { font-size: 1.8rem; margin-bottom: 1rem; display: block; }

/* === SECTION CTA SOMBRE === */
.cta-dark { 
  background: #061940; 
  color: #ffffff; 
  text-align: center; 
  border-radius: 16px; 
  margin: 2rem auto;
  max-width: 1100px;
}
.cta-dark h2, .cta-dark p { color: #ffffff !important; }
.cta-dark p { opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }

/* === FOOTER === */
.site-footer { 
  background: #0f1e2d; 
  color: rgba(255,255,255,0.7); 
  padding: 2.5rem 1rem; 
  text-align: center; 
  font-size: 0.95rem; 
  margin-top: 4rem;
}
/* Rééquilibrage du header */
header .wp-block-group.alignwide {
  max-width: 1200px !important; /* Réduit la largeur max */
  padding-left: 1rem !important; /* Plus de padding à gauche */
  padding-right: 0rem !important; /* Plus de padding à droite */
}
/* Élargir les sous-menus */
.wp-block-navigation__submenu-container {
  min-width: 380px !important; /* Plus large que 320px */
}
/* Centrer et styliser les sous-menus */
.wp-block-navigation__submenu-container {
  min-width: 320px !important;
  padding: 1rem 1.2rem !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08) !important;
  border: 1px solid rgba(0,0,0,0.04) !important;
  margin-top: 0.6rem !important;
  gap: 0.4rem !important;
  z-index: 9999 !important;
  
  /* Centrage sous le parent */
  left: 50% !important;
  transform: translateX(-50%) !important;
}

/* Items du dropdown */
.wp-block-navigation__submenu-container .wp-block-navigation-item {
  background: transparent !important;
  width: 100%;
  text-align: left !important;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item > a {
  width: 100%;
  padding: 0.6rem 0.8rem !important;
  border-radius: 8px;
  font-weight: 600;
  color: #2c3e50 !important;
  transition: all 0.2s ease;
}

/* Survol des items */
.wp-block-navigation__submenu-container .wp-block-navigation-item > a:hover {
  background-color: rgba(172, 132, 30, 0.12) !important;
  font-weight: 700 !important;
  transform: translateX(4px);
  color: #0f1e2d !important;
}
/* === SOLUTION ULTRA-SIMPLE : Gras sur TOUS les liens du menu === */
header nav li:hover a,
header nav li:hover button,
header nav li:hover span {
  font-weight: 700 !important;
}
/* === SOUS-MENUS : Normal par défaut === */
.wp-block-navigation__submenu-container a {
    font-weight: 400 !important;
    transition: font-weight 0.2s ease;
}