/* ===== MISTRATEL-EVOLUTION — DESIGN SYSTEM ===== */

:root {
  --blue: #1a56db;
  --blue-dark: #1040b0;
  --blue-light: #eff6ff;
  --text: #0f172a;
  --text-secondary: #1e3a5f;
  --muted: #3b5a82;
  --border: #c5d5e8;
}

/* ===== FOND MEDICAL ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text) !important;
  font-size: 16px;
  line-height: 1.7;
  background-color: #e8f0fe !important;
  background-image: url('https://images.unsplash.com/photo-1576091160399-112ba8d25d1d?w=1920&q=80&auto=format&fit=crop') !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* Overlay global */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(210, 228, 255, 0.85);
  z-index: 0;
  pointer-events: none;
}

#page,
.site,
.wp-site-blocks {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* Sections blanches */
.wp-block-group:not(.wp-block-cover):not([style*="background-color:#1a56db"]):not([style*="background-color: #1a56db"]) {
  background: rgba(255,255,255,0.95) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(4px) !important;
}

/* ===== TEXTES GLOBAUX ===== */
p {
  color: #1a2e4a !important;
}

li {
  color: #1a2e4a !important;
}

/* Textes secondaires / descriptions */
.wp-block-paragraph,
.wp-block-list li {
  color: #1e3a5f !important;
}

/* Textes muted (sous-titres sections) */
p[style*="color:#64748b"],
p[style*="color: #64748b"],
p[style*="#475569"],
p[style*="#64748b"] {
  color: #2d5080 !important;
}

/* ===== MASQUER LE TEXTE DU LOGO ===== */
.site-title,
.site-title a,
.site-branding .site-title,
h1.site-title,
p.site-title,
.site-description {
  display: none !important;
}

/* ===== HEADER ===== */
#masthead,
.site-header,
.header-main,
.gutener-header,
.gutener-medical-header {
  background: rgba(255,255,255,0.97) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important;
  backdrop-filter: blur(8px) !important;
}

/* ===== MENU PRINCIPAL ===== */
#primary-menu li a,
.main-navigation ul li a,
.nav-menu li a {
  color: #1a2e4a !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  transition: color 0.2s !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

#primary-menu li a:hover,
.main-navigation ul li a:hover,
.nav-menu li a:hover {
  color: var(--blue) !important;
  background: transparent !important;
}

/* SOUS-MENU DEROULANT */
#primary-menu .sub-menu,
.main-navigation .sub-menu,
.nav-menu .sub-menu {
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
  padding: 6px 0 !important;
  min-width: 220px !important;
}

#primary-menu .sub-menu li a,
.main-navigation .sub-menu li a,
.nav-menu .sub-menu li a {
  color: #1a2e4a !important;
  font-size: 13px !important;
  padding: 9px 18px !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#primary-menu .sub-menu li a:hover,
.main-navigation .sub-menu li a:hover {
  color: var(--blue) !important;
  background: var(--blue-light) !important;
}

/* BOUTON DEVIS dans le menu */
#primary-menu li:last-child > a,
.nav-menu li:last-child > a {
  background: var(--blue) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 9px 20px !important;
  margin-left: 8px !important;
}

#primary-menu li:last-child > a:hover,
.nav-menu li:last-child > a:hover {
  background: var(--blue-dark) !important;
}

/* ===== BOUTONS ===== */
.wp-block-button__link,
.wp-element-button {
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  padding: 11px 26px !important;
  transition: all 0.2s !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--blue) !important;
  color: #fff !important;
  border: none !important;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--blue-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(26,86,219,0.3) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--blue) !important;
  border: 1.5px solid var(--blue) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--blue-light) !important;
}

/* Boutons dans section CTA bleu */
.wp-block-cover .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: #ffffff !important;
  color: var(--blue) !important;
}

.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link {
  color: #ffffff !important;
  border-color: rgba(255,255,255,0.6) !important;
  background: transparent !important;
}

/* ===== TITRES ===== */
h1, h2, h3, h4, h5, h6 {
  color: #0a1f3d !important;
}

h1 { font-size: 34px !important; font-weight: 600 !important; line-height: 1.25 !important; }
h2 { font-size: 26px !important; font-weight: 600 !important; line-height: 1.3 !important; }
h3 { font-size: 17px !important; font-weight: 600 !important; }

/* Titres et textes sur fond bleu (hero, CTA) */
.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3,
.wp-block-cover h4 {
  color: #ffffff !important;
}

.wp-block-cover p {
  color: rgba(255,255,255,0.95) !important;
}

/* ===== CARDS hover ===== */
.wp-block-group[style*="border"] {
  transition: box-shadow 0.2s, transform 0.2s !important;
}

.wp-block-group[style*="border"]:hover {
  box-shadow: 0 6px 24px rgba(26,86,219,0.12) !important;
  transform: translateY(-2px) !important;
}

/* ===== CHIFFRES CLÉS (hero) ===== */
h3[style*="color:#1a56db"],
h3[style*="color: #1a56db"] {
  color: #1a56db !important;
}

/* ===== TESTIMONIALS ===== */
.wp-block-quote {
  border-left: 3px solid var(--blue) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  padding: 20px 24px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}

.wp-block-quote p {
  font-style: italic !important;
  color: #1a2e4a !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin-bottom: 12px !important;
}

.wp-block-quote cite {
  font-size: 12px !important;
  color: #2d5080 !important;
  font-style: normal !important;
  font-weight: 500 !important;
}

/* ===== LISTES ===== */
.wp-block-list li {
  color: #1a2e4a !important;
  margin-bottom: 6px !important;
}

/* ===== FOOTER ===== */
#colophon,
.site-footer,
.footer-area,
.gutener-footer {
  background: rgba(15,23,42,0.97) !important;
  color: #94a3b8 !important;
}

.site-footer a,
#colophon a {
  color: #94a3b8 !important;
  text-decoration: none !important;
}

.site-footer a:hover,
#colophon a:hover {
  color: #ffffff !important;
}

.site-footer p,
#colophon p {
  color: #94a3b8 !important;
}

.site-footer .site-info,
#colophon .site-info {
  border-top: 1px solid #1e293b !important;
  padding-top: 20px !important;
  font-size: 12px !important;
  text-align: center !important;
  color: #64748b !important;
}

/* ===== SEPARATEURS ===== */
.wp-block-separator {
  border-color: var(--border) !important;
  opacity: 1 !important;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
  h1 { font-size: 26px !important; }
  h2 { font-size: 20px !important; }

  body {
    background-attachment: scroll !important;
  }

  .wp-block-cover {
    min-height: 400px !important;
    padding: 40px 20px !important;
  }

  .wp-block-buttons {
    flex-direction: column !important;
    align-items: center !important;
  }
}

/* ===== CORRECTIFS LISIBILITÉ HERO ===== */

/* Badge "19 ans d'expérience" */
.wp-block-cover .wp-block-paragraph,
.wp-block-cover p,
.wp-block-cover span,
.wp-block-cover .wp-block-cover__inner-container p {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}

/* Sous-titre hero */
.wp-block-cover .wp-block-cover__inner-container > p,
.wp-block-cover__inner-container p[style*="color:#475569"],
.wp-block-cover__inner-container p[style*="color: #475569"],
.wp-block-cover__inner-container p[style*="475569"],
.wp-block-cover__inner-container p[style*="64748b"] {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}

/* Badge bleu pâle dans le hero */
.wp-block-cover p[style*="background"],
.wp-block-cover p[style*="dde8f8"] {
  color: #0a1f3d !important;
  text-shadow: none !important;
}

/* Titre H1 hero bien visible */
.wp-block-cover h1 {
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* ===== OVERLAY HERO PLUS FONCÉ ===== */
.wp-block-cover[style*="background-color:#f0f5ff"],
.wp-block-cover[style*="background-color: #f0f5ff"],
.wp-block-cover[style*="#f0f5ff"] {
  background-color: #1a3a6b !important;
}

/* ===== OVERLAY HERO SOMBRE ===== */
.wp-block-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 70, 0.65) !important;
  z-index: 1;
  pointer-events: none;
}

.wp-block-cover__inner-container {
  position: relative;
  z-index: 2 !important;
}

.wp-block-cover__image-background,
.wp-block-cover video {
  filter: brightness(0.7) !important;
}