/*
Theme Name: Astra CLIMEDGE
Theme URI: https://climedge.pt
Description: Thème enfant personnalisé pour CLIMEDGE — Solaire, Climatisation et Maintenance en Algarve. Basé sur Astra.
Author: CLIMEDGE
Author URI: https://climedge.pt
Template: astra
Version: 1.0.0
Text Domain: astra-climedge
Tags: business, multilingual, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments
*/

/* ============================================
   CLIMEDGE — Variables de couleurs & typographie
   ============================================ */
:root {
  --climedge-orange: #F97316;
  --climedge-orange-light: #FFF7ED;
  --climedge-orange-border: #fed7aa;
  --climedge-orange-dark: #c2440c;
  --climedge-blue: #38BDF8;
  --climedge-blue-light: #EFF6FF;
  --climedge-blue-border: #bfdbfe;
  --climedge-blue-dark: #1d4ed8;
  --climedge-navy: #0F172A;
  --climedge-navy-light: #1e293b;
  --climedge-navy-border: #334155;
  --climedge-bg: #f1f5f9;
  --climedge-bg-alt: #f8fafc;
  --climedge-border: #e2e8f0;
  --climedge-text: #374151;
  --climedge-text-light: #64748b;
  --climedge-text-lighter: #94a3b8;
  --climedge-success: #15803d;
  --climedge-success-bg: #F0FDF4;
  --climedge-success-border: #bbf7d0;
  --climedge-radius: 12px;
  --climedge-radius-sm: 8px;
  --climedge-container: 1200px;
}

/* Typographie globale */
body,
.ast-container,
.entry-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--climedge-text);
  background: var(--climedge-bg);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 900;
  color: var(--climedge-navy);
  line-height: 1.2;
}

/* ============================================
   Largeur de contenu
   ============================================ */
.ast-container,
.site-content .ast-container {
  max-width: var(--climedge-container);
}

/* ============================================
   Entête (header) — fond blanc avec ombre subtile
   Le logo garde sa couleur naturelle
   ============================================ */
body .site-header,
body .ast-primary-header-bar,
body .main-header-bar,
body #ast-desktop-header .ast-main-header-wrap,
body #ast-mobile-header .ast-main-header-wrap {
  background: #ffffff !important;
  border-bottom: 1px solid var(--climedge-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Cacher le titre texte & la tagline quand on a un logo */
.ast-site-identity .ast-site-title-wrap,
.ast-site-identity .site-title,
.ast-site-identity .site-description {
  display: none !important;
}

body .site-header .main-header-menu a,
body .site-header .ast-masthead-custom-menu-items,
body .site-header nav a,
body .main-header-bar-navigation .menu-item a,
body .main-navigation ul li a {
  color: var(--climedge-navy) !important;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
  padding: 8px 14px;
  border-radius: var(--climedge-radius-sm);
}

body .site-header .main-header-menu a:hover,
body .main-header-bar-navigation .menu-item:hover > a,
body .main-navigation ul li a:hover {
  color: var(--climedge-orange) !important;
  background: var(--climedge-orange-light);
}

body .site-header .main-header-menu .current-menu-item > a,
body .main-header-bar-navigation .current-menu-item > a,
body .main-navigation ul li.current-menu-item > a {
  color: var(--climedge-orange) !important;
  background: var(--climedge-orange-light);
}

/* Logo bien cadré */
.site-logo-img img,
.custom-logo-link img {
  max-height: 56px;
  width: auto;
}

/* Bouton hamburger mobile */
.ast-mobile-menu-buttons-fill .ast-button-wrap .menu-toggle,
.ast-mobile-menu-buttons-minimal .menu-toggle {
  color: var(--climedge-navy);
}

/* Bouton CTA "Devis gratuit" dans le header (quand ajouté plus tard) */
.main-header-bar .ast-header-button-1 .button,
.main-header-bar-navigation .menu-item.cta-button > a {
  background: var(--climedge-orange) !important;
  color: #fff !important;
  padding: 8px 18px !important;
}

/* ============================================
   Boutons — style CLIMEDGE
   Note: pas de !important sur color — permet
   aux inline styles de surcharger (ex. bouton blanc)
   ============================================ */
.wp-block-button__link,
.ast-button,
.ast-custom-button,
button:not(.menu-toggle):not(.close-btn),
input[type="submit"] {
  background: var(--climedge-orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--climedge-radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

.wp-block-button__link:hover,
.ast-button:hover,
button:not(.menu-toggle):not(.close-btn):hover,
input[type="submit"]:hover {
  background: #ea6a0d;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(249, 115, 22, 0.25);
}

/* Bouton contour bleu */
.is-style-outline .wp-block-button__link,
.ast-button-outline {
  background: transparent;
  color: var(--climedge-blue);
  border: 1.5px solid var(--climedge-blue);
}

.is-style-outline .wp-block-button__link:hover,
.ast-button-outline:hover {
  background: var(--climedge-blue);
  color: #fff;
}

/* Bouton blanc dans section orange (CTA) */
.climedge-section-orange .wp-block-button__link.has-background {
  background: #fff !important;
  color: var(--climedge-orange) !important;
  padding: 14px 32px;
  font-size: 15px;
}

.climedge-section-orange .wp-block-button__link.has-background:hover {
  background: #fff4ea !important;
  color: var(--climedge-orange) !important;
  transform: translateY(-1px);
}

/* ============================================
   Sections CLIMEDGE réutilisables
   ============================================ */
.climedge-section {
  padding: 80px 24px;
}

.climedge-section-alt {
  padding: 80px 24px;
  background: var(--climedge-bg-alt);
}

.climedge-section-dark {
  background: var(--climedge-navy);
  padding: 80px 24px;
  color: #fff;
}

.climedge-section-dark h1,
.climedge-section-dark h2,
.climedge-section-dark h3 {
  color: #fff;
}

.climedge-section-orange {
  background: var(--climedge-orange);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}

.climedge-section-orange h1,
.climedge-section-orange h2,
.climedge-section-orange h3 {
  color: #fff;
}

.climedge-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--climedge-orange);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.climedge-section-title {
  font-size: 36px;
  font-weight: 900;
  color: var(--climedge-navy);
  margin-bottom: 12px;
  line-height: 1.2;
}

.climedge-section-subtitle {
  font-size: 16px;
  color: var(--climedge-text-light);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* ============================================
   Hero
   ============================================ */
.climedge-hero {
  background: var(--climedge-navy);
  padding: 96px 24px 72px;
  color: #fff;
}

.climedge-hero h1 {
  font-size: 48px;
  color: #fff;
  margin-bottom: 16px;
}

.climedge-hero .climedge-badge {
  display: inline-block;
  background: #1e3a5f;
  color: var(--climedge-blue);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.climedge-hero p.lead {
  font-size: 16px;
  color: var(--climedge-text-lighter);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ============================================
   Cards
   ============================================ */
.climedge-card {
  border: 1px solid var(--climedge-border);
  border-radius: var(--climedge-radius);
  padding: 32px 28px;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}

.climedge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.climedge-card-orange {
  background: var(--climedge-orange-light);
  border: 1px solid var(--climedge-orange-border);
  border-radius: var(--climedge-radius);
  padding: 28px;
}

.climedge-card-blue {
  background: var(--climedge-blue-light);
  border: 1px solid var(--climedge-blue-border);
  border-radius: var(--climedge-radius);
  padding: 28px;
}

.climedge-card-green {
  background: var(--climedge-success-bg);
  border: 1px solid var(--climedge-success-border);
  border-radius: var(--climedge-radius);
  padding: 28px;
}

/* ============================================
   Tags
   ============================================ */
.climedge-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-weight: 600;
}

.climedge-tag-orange { background: var(--climedge-orange-light); color: var(--climedge-orange-dark); }
.climedge-tag-blue { background: var(--climedge-blue-light); color: var(--climedge-blue-dark); }
.climedge-tag-green { background: var(--climedge-success-bg); color: var(--climedge-success); }

/* ============================================
   Reassurance bar (bandeau orange)
   ============================================ */
.climedge-reassurance {
  background: var(--climedge-orange);
  padding: 28px 16px;
}

.climedge-reassurance .wp-block-columns {
  gap: 8px;
  margin: 0;
}

.climedge-reassurance .wp-block-column {
  flex-basis: auto !important;
  min-width: 0;
}

.climedge-reassurance-item {
  text-align: center;
  color: #fff;
  padding: 4px;
}

.climedge-reassurance-val {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 6px;
  white-space: nowrap;
}

.climedge-reassurance-lbl {
  font-size: 12px;
  opacity: 0.95;
  letter-spacing: 0.3px;
  white-space: nowrap;
  font-weight: 500;
}

@media (max-width: 768px) {
  .climedge-reassurance .wp-block-columns {
    flex-wrap: wrap;
  }
  .climedge-reassurance .wp-block-column {
    flex-basis: 33.33% !important;
    margin-bottom: 16px;
  }
  .climedge-reassurance-val { font-size: 22px; }
}

/* ============================================
   Pied de page
   ============================================ */
body .site-footer,
body #colophon,
body .site-below-footer-wrap,
body .ast-below-footer-wrap,
body .site-primary-footer-wrap,
body .footer-adv {
  background: var(--climedge-navy) !important;
  color: var(--climedge-text-lighter) !important;
  border-top: 1px solid var(--climedge-navy-light);
  padding: 32px 24px;
}

body .site-footer p,
body #colophon p,
body .ast-footer-copyright p,
body .ast-footer-copyright {
  color: var(--climedge-text-lighter) !important;
  font-size: 12px;
  margin: 0;
}

body .site-footer a,
body #colophon a,
body .ast-footer-copyright a {
  color: var(--climedge-text-lighter) !important;
  text-decoration: none;
}

body .site-footer a:hover,
body #colophon a:hover {
  color: var(--climedge-orange) !important;
}

/* ============================================
   Sélecteur de langue CLIMEDGE (header)
   ============================================ */
.climedge-lang-switcher {
  display: inline-flex;
  gap: 4px;
  margin-left: 16px;
  align-items: center;
}

.climedge-lang-btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border: 1px solid var(--climedge-border);
  border-radius: 4px;
  color: var(--climedge-text-light) !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.15s;
  line-height: 1.4;
}

.climedge-lang-btn:hover {
  border-color: var(--climedge-orange);
  color: var(--climedge-orange) !important;
}

.climedge-lang-btn.active {
  border-color: var(--climedge-orange);
  background: var(--climedge-orange-light);
  color: var(--climedge-orange) !important;
}

/* Fallback pour l'affichage Polylang natif si présent */
.lang-item a {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--climedge-border);
  border-radius: 4px;
  color: var(--climedge-text-light);
  text-transform: uppercase;
  font-weight: 600;
}

.lang-item.current-lang a {
  border-color: var(--climedge-orange);
  color: var(--climedge-orange);
}

/* ============================================
   Numéro de téléphone dans le header
   ============================================ */
.climedge-header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--climedge-navy) !important;
  text-decoration: none !important;
  padding: 6px 12px;
  border: 1.5px solid var(--climedge-border);
  border-radius: var(--climedge-radius-sm);
  margin-right: 8px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.climedge-header-phone:hover {
  border-color: var(--climedge-orange);
  color: var(--climedge-orange) !important;
  background: var(--climedge-orange-light);
}

.climedge-header-phone svg {
  flex-shrink: 0;
  color: var(--climedge-orange);
}

/* ============================================
   Bouton WhatsApp flottant
   ============================================ */
.climedge-whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.climedge-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

/* ============================================
   Témoignages clients
   ============================================ */
.climedge-testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 0 auto;
  max-width: var(--climedge-container);
}

.climedge-testimonial-card {
  background: #fff;
  border: 1px solid var(--climedge-border);
  border-radius: var(--climedge-radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}

.climedge-testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.climedge-testimonial-stars {
  display: flex;
  gap: 2px;
}

.climedge-star {
  font-size: 18px;
  color: var(--climedge-border);
}

.climedge-star.filled {
  color: #f59e0b;
}

.climedge-testimonial-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--climedge-text);
  margin: 0;
  flex: 1;
}

.climedge-testimonial-author {
  font-size: 13px;
  color: var(--climedge-text-light);
  border-top: 1px solid var(--climedge-border);
  padding-top: 12px;
  margin-top: auto;
}

.climedge-testimonial-author strong {
  color: var(--climedge-navy);
}

/* ============================================
   Responsive
   ============================================ */
/* ============================================
   Menu mobile — popup / drawer Astra
   ============================================ */

/* Fond blanc, texte lisible */
.ast-mobile-popup-drawer,
.ast-mobile-popup-drawer .ast-mobile-popup-content,
.ast-mobile-popup-inner {
  background: #ffffff !important;
  color: #0F172A !important;
}

/* Tous les liens du menu mobile — sélecteurs larges pour battre le CSS Astra dynamique */
.ast-mobile-popup-drawer a,
.ast-mobile-popup-drawer .nav-menu a,
.ast-mobile-popup-drawer .main-navigation a,
.ast-mobile-popup-drawer ul li a,
.ast-mobile-popup-drawer ul.menu li a,
.ast-mobile-popup-drawer [data-section] a,
#ast-mobile-popup a,
#ast-mobile-popup .menu-item a,
#ast-mobile-popup .nav-menu li a,
body .ast-mobile-popup-drawer .main-navigation ul li a {
  color: #0F172A !important;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 20px;
  display: block;
  border-bottom: 1px solid #e2e8f0;
  background: transparent !important;
}

/* Item actif / page courante */
.ast-mobile-popup-drawer .current-menu-item > a,
.ast-mobile-popup-drawer .current-menu-ancestor > a,
#ast-mobile-popup .current-menu-item > a {
  color: #F97316 !important;
}

/* Survol */
.ast-mobile-popup-drawer a:hover,
.ast-mobile-popup-drawer ul li a:hover,
#ast-mobile-popup .menu-item a:hover {
  color: #F97316 !important;
  background: #FFF7ED !important;
}

/* Bouton fermer (×) */
.ast-mobile-popup-drawer .menu-toggle-close,
.ast-mobile-popup-drawer .close-btn,
.ast-mobile-popup-drawer button {
  color: #0F172A !important;
}

/* Sélecteur de langue dans le popup mobile */
.ast-mobile-popup-drawer .climedge-lang-switcher,
#ast-mobile-popup .climedge-lang-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--climedge-border);
  margin-top: 8px;
}

/* ============================================
   Responsive général
   ============================================ */
/* ============================================
   Barre de titre Astra (pages internes) — cachée globalement
   ============================================ */
.ast-page-header-wrap,
.ast-banner-header,
.site-header-primary-section-left ~ .ast-page-header-wrap,
.page-header-wrap,
.ast-archive-description {
  display: none !important;
}

/* Lang switcher : caché uniquement dans la barre mobile visible (pas dans le popup ni sur desktop) */
#ast-mobile-header .main-header-bar .climedge-lang-switcher,
#ast-mobile-header .ast-main-header-wrap > .climedge-lang-switcher {
  display: none !important;
}

/* ============================================
   Responsive général
   ============================================ */
@media (max-width: 768px) {
  .climedge-hero h1 { font-size: 32px; }
  .climedge-section-title { font-size: 26px; }
  .climedge-section,
  .climedge-section-alt,
  .climedge-section-dark { padding: 56px 20px; }
  .climedge-hero { padding: 64px 20px 48px; }
  .climedge-header-phone { display: none; }
  .climedge-whatsapp-float { bottom: 85px; right: 16px; width: 50px; height: 50px; }
  .climedge-whatsapp-float svg { width: 24px; height: 24px; }
}
