/*
Theme Name:   VéloCargoÉlectrique (Blocksy Child)
Theme URI:    https://velocargoelectrique.com
Description:  Thème enfant Blocksy pour VéloCargoÉlectrique
Author:       VéloCargoÉlectrique
Template:     blocksy
Version:      1.0
License:      GNU General Public License v2 or later
Text Domain:  velocargo-blocksy
*/

/* ════════════════════════════════════════════════════════════
   VARIABLES GLOBALES
   ════════════════════════════════════════════════════════════ */
:root {
  --vce-green-dark:   #1a3a1f;
  --vce-green-mid:    #2d5e34;
  --vce-green-accent: #4a9454;
  --vce-green-light:  #7bc47f;
  --vce-green-pale:   #e8f5e9;
  --vce-amber:        #f0a500;
  --vce-charcoal:     #1c1c1c;
  --vce-warm-white:   #fafaf7;
  --vce-text-muted:   #6b7a6d;
  --vce-border:       #d4e0d5;
  --vce-font-display: 'Syne', sans-serif;
  --vce-font-body:    'DM Sans', sans-serif;
}

/* ════════════════════════════════════════════════════════════
   BODY & TYPOGRAPHIE GLOBALE
   ════════════════════════════════════════════════════════════ */
body {
  font-family: var(--vce-font-body) !important;
  background: var(--vce-warm-white) !important;
  color: var(--vce-charcoal) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--vce-font-display) !important;
  color: var(--vce-green-dark) !important;
  letter-spacing: -0.02em;
}

a { color: var(--vce-green-accent); }
a:hover { color: var(--vce-green-dark); }

/* ════════════════════════════════════════════════════════════
   HEADER BLOCKSY — surcharge complète
   ════════════════════════════════════════════════════════════ */
.site-header,
#site-header,
[data-id="header"] {
  background: var(--vce-green-dark) !important;
  border-bottom: 2px solid var(--vce-green-accent) !important;
  box-shadow: none !important;
}

/* Logo texte */
.site-header .site-title,
.site-header .ct-site-title,
[data-id="header"] .site-title {
  font-family: var(--vce-font-display) !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  color: #fff !important;
  letter-spacing: -0.02em !important;
}

/* Logo image */
.site-header .ct-image-container img,
[data-id="header"] .ct-image-container img {
  max-height: 40px !important;
  width: auto !important;
}

/* Navigation principale */
.site-header nav a,
[data-id="header"] .ct-menu a,
[data-id="header"] nav a {
  color: rgba(255,255,255,0.78) !important;
  font-family: var(--vce-font-body) !important;
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  transition: color 0.2s !important;
  text-decoration: none !important;
}
.site-header nav a:hover,
[data-id="header"] .ct-menu a:hover {
  color: var(--vce-green-light) !important;
}

/* Burger mobile */
.site-header .ct-toggle-dropdown-desktop,
.site-header [data-id="menu-trigger"] {
  color: #fff !important;
}

/* Sous-menus dropdown */
.site-header .sub-menu,
[data-id="header"] .sub-menu {
  background: var(--vce-green-mid) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
}
.site-header .sub-menu a,
[data-id="header"] .sub-menu a {
  color: rgba(255,255,255,0.75) !important;
  padding: 8px 16px !important;
}
.site-header .sub-menu a:hover {
  background: rgba(255,255,255,0.08) !important;
  color: var(--vce-green-light) !important;
}

/* ════════════════════════════════════════════════════════════
   HERO — section page d'accueil
   ════════════════════════════════════════════════════════════ */
.vce-hero {
  background: var(--vce-green-dark);
  min-height: 78vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 5rem 5%;
  position: relative;
  overflow: hidden;
}
.vce-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(74,148,84,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.vce-hero-text { position: relative; z-index: 2; }
.vce-hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(74,148,84,0.25);
  color: var(--vce-green-light);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(123,196,127,0.3);
}
.vce-hero h1 {
  font-family: var(--vce-font-display) !important;
  font-weight: 800 !important;
  font-size: clamp(2.4rem, 5vw, 3.8rem) !important;
  color: #fff !important;
  line-height: 1.08 !important;
  letter-spacing: -0.03em !important;
  margin-bottom: 1.2rem !important;
}
.vce-hero h1 em {
  font-style: normal;
  color: var(--vce-green-light);
  display: block;
}
.vce-hero-desc {
  color: rgba(255,255,255,0.68);
  font-size: 1.08rem; font-weight: 300;
  max-width: 420px; margin-bottom: 2rem; line-height: 1.7;
}
.vce-hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

.vce-hero-visual {
  position: relative; z-index: 2;
  display: flex; justify-content: center; align-items: center;
}
/* Assure que l'image occupe tout l'espace disponible */
.vce-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image pour remplir le conteneur sans déformation */
    display: block;
}

/* Si le conteneur n'a pas de dimensions fixes, il faudra peut-être en définir une */
.vce-hero-visual {
    position: relative;
    overflow: hidden;
    /* Exemple de hauteur si nécessaire : height: 400px; */
}

/* ════════════════════════════════════════════════════════════
   BOUTONS
   ════════════════════════════════════════════════════════════ */
.vce-btn-primary,
.wp-block-button__link,
.ct-button {
  background: var(--vce-green-accent) !important;
  color: #fff !important;
  padding: 13px 26px !important;
  border-radius: 6px !important;
  font-family: var(--vce-font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border: none !important;
  transition: background 0.2s, transform 0.15s !important;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.vce-btn-primary:hover,
.wp-block-button__link:hover,
.ct-button:hover {
  background: #3d8046 !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.vce-btn-outline {
  border: 1.5px solid rgba(255,255,255,0.3) !important;
  color: rgba(255,255,255,0.82) !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  background: transparent !important;
  transition: border-color 0.2s, color 0.2s !important;
  display: inline-flex; align-items: center; gap: 6px;
}
.vce-btn-outline:hover {
  border-color: var(--vce-green-light) !important;
  color: var(--vce-green-light) !important;
}

/* ════════════════════════════════════════════════════════════
   STATS BAND
   ════════════════════════════════════════════════════════════ */
.vce-stats-band {
  background: var(--vce-green-mid);
  padding: 1.5rem 5%;
  display: flex; justify-content: space-around; flex-wrap: wrap;
}
.vce-stat-item {
  text-align: center; padding: 0.5rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.vce-stat-item:last-child { border-right: none; }
.vce-stat-num {
  font-family: var(--vce-font-display);
  font-weight: 700; font-size: 1.8rem;
  color: var(--vce-green-light); display: block;
}
.vce-stat-label {
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  font-weight: 300; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   SECTIONS GÉNÉRIQUES
   ════════════════════════════════════════════════════════════ */
.vce-section { padding: 4.5rem 5%; }
.vce-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--vce-border); padding-bottom: 1rem;
}
.vce-section-title {
  font-family: var(--vce-font-display) !important;
  font-weight: 700; font-size: 1.5rem;
  color: var(--vce-green-dark) !important; letter-spacing: -0.02em;
}
.vce-section-link {
  font-size: 0.85rem; color: var(--vce-green-accent);
  text-decoration: none; font-weight: 500;
}
.vce-section-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   GRILLE CATÉGORIES
   ════════════════════════════════════════════════════════════ */
.vce-categories-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.vce-cat-card {
  background: #fff; border: 1px solid var(--vce-border);
  border-radius: 10px; padding: 1.5rem;
  text-decoration: none; color: var(--vce-charcoal);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.vce-cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--vce-green-accent);
  box-shadow: 0 8px 24px rgba(45,94,52,0.1);
  color: var(--vce-charcoal);
}
.vce-cat-icon {
  width: 44px; height: 44px;
  background: var(--vce-green-pale); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.vce-cat-title {
  font-family: var(--vce-font-display);
  font-weight: 700; font-size: 1rem; color: var(--vce-green-dark);
}
.vce-cat-desc { font-size: 0.84rem; color: var(--vce-text-muted); font-weight: 300; line-height: 1.5; }
.vce-cat-count { font-size: 0.75rem; color: var(--vce-green-accent); font-weight: 600; margin-top: auto; }

/* ════════════════════════════════════════════════════════════
   FEATURED ARTICLES
   ════════════════════════════════════════════════════════════ */
.vce-featured-section { padding: 0 5% 4.5rem; }
.vce-featured-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; }

.vce-feat-main {
  background: linear-gradient(135deg, var(--vce-green-dark) 0%, var(--vce-green-mid) 100%);
  border-radius: 12px; padding: 2.5rem; color: #fff;
  text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 320px; position: relative; overflow: hidden;
  transition: transform 0.2s;
}
.vce-feat-main:hover { transform: scale(1.01); color: #fff; }
.vce-feat-main::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(123,196,127,0.2) 0%, transparent 60%);
}
.vce-feat-badge {
  display: inline-block; background: var(--vce-amber); color: var(--vce-charcoal);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 4px;
  margin-bottom: 0.75rem; position: relative; z-index: 2; width: fit-content;
}
.vce-feat-main h2 {
  font-family: var(--vce-font-display) !important;
  font-weight: 700 !important; font-size: 1.5rem !important;
  line-height: 1.2 !important; letter-spacing: -0.02em !important;
  margin-bottom: 0.75rem; position: relative; z-index: 2;
  color: #fff !important;
}
.vce-feat-main p {
  font-size: 0.88rem; color: rgba(255,255,255,0.72);
  font-weight: 300; position: relative; z-index: 2;
}
.vce-feat-meta {
  font-size: 0.75rem; color: rgba(255,255,255,0.45);
  margin-top: 1.2rem; position: relative; z-index: 2;
}

.vce-feat-side { display: flex; flex-direction: column; gap: 1rem; }
.vce-feat-side-card {
  background: #fff; border: 1px solid var(--vce-border); border-radius: 10px;
  padding: 1.25rem; text-decoration: none; color: var(--vce-charcoal); flex: 1;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vce-feat-side-card:hover {
  border-color: var(--vce-green-accent);
  box-shadow: 0 4px 12px rgba(45,94,52,0.08);
  color: var(--vce-charcoal);
}
.vce-feat-side-tag {
  font-size: 0.7rem; color: var(--vce-green-accent); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem; display: block;
}
.vce-feat-side-card h3 {
  font-family: var(--vce-font-display) !important;
  font-weight: 600 !important; font-size: 0.95rem !important;
  color: var(--vce-green-dark) !important; line-height: 1.3; margin-bottom: 0.5rem;
}
.vce-feat-side-card p { font-size: 0.82rem; color: var(--vce-text-muted); font-weight: 300; line-height: 1.5; }

/* ════════════════════════════════════════════════════════════
   GUIDES PRATIQUES
   ════════════════════════════════════════════════════════════ */
.vce-guides-section { background: var(--vce-green-pale); padding: 4rem 5%; }
.vce-guides-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-top: 1.5rem;
}
.vce-guide-card {
  background: #fff; border: 1px solid var(--vce-border); border-radius: 10px;
  padding: 1.25rem; text-decoration: none; color: var(--vce-charcoal);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vce-guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,94,52,0.1);
  color: var(--vce-charcoal);
}
.vce-guide-num {
  font-family: var(--vce-font-display);
  font-size: 2.2rem; font-weight: 800;
  color: var(--vce-border); line-height: 1; margin-bottom: 0.75rem;
}
.vce-guide-card h3 {
  font-family: var(--vce-font-display) !important;
  font-weight: 700 !important; font-size: 0.92rem !important;
  color: var(--vce-green-dark) !important; margin-bottom: 0.5rem;
}
.vce-guide-card p { font-size: 0.8rem; color: var(--vce-text-muted); font-weight: 300; line-height: 1.5; }

/* ════════════════════════════════════════════════════════════
   NEWSLETTER
   ════════════════════════════════════════════════════════════ */
.vce-newsletter {
  background: var(--vce-charcoal); padding: 3.5rem 5%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.vce-newsletter-text h2 {
  font-family: var(--vce-font-display) !important;
  font-weight: 700 !important; font-size: 1.6rem !important;
  color: #fff !important; margin-bottom: 0.4rem;
}
.vce-newsletter-text p { color: rgba(255,255,255,0.55); font-size: 0.9rem; font-weight: 300; }
.vce-newsletter-form {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15); flex-shrink: 0;
}
.vce-newsletter-form input[type="email"] {
  background: rgba(255,255,255,0.07) !important; border: none !important;
  padding: 13px 18px !important; color: #fff !important;
  font-family: var(--vce-font-body) !important;
  font-size: 0.9rem !important; outline: none !important; width: 260px;
  box-shadow: none !important;
}
.vce-newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.35); }
.vce-newsletter-form button {
  background: var(--vce-green-accent) !important; border: none !important;
  color: #fff !important; padding: 13px 22px !important;
  font-family: var(--vce-font-display) !important; font-weight: 600 !important;
  font-size: 0.88rem !important; cursor: pointer; transition: background 0.2s;
}
.vce-newsletter-form button:hover { background: #3d8046 !important; }

/* ════════════════════════════════════════════════════════════
   FOOTER BLOCKSY — surcharge
   ════════════════════════════════════════════════════════════ */
.site-footer,
#site-footer,
[data-id="footer"] {
  background: var(--vce-green-dark) !important;
  color: rgba(255,255,255,0.55) !important;
}
[data-id="footer"] a,
.site-footer a {
  color: rgba(255,255,255,0.5) !important;
  transition: color 0.2s;
}
[data-id="footer"] a:hover,
.site-footer a:hover { color: var(--vce-green-light) !important; }

[data-id="footer"] h4,
[data-id="footer"] .ct-widget-title,
.site-footer .widget-title {
  font-family: var(--vce-font-display) !important;
  font-weight: 600 !important; font-size: 0.85rem !important;
  color: rgba(255,255,255,0.85) !important;
  letter-spacing: 0.08em !important; text-transform: uppercase !important;
}
.ct-footer-copyright {
  border-top: 1px solid rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.4) !important;
}

/* ════════════════════════════════════════════════════════════
   CONTENU ARTICLES (single, pages)
   ════════════════════════════════════════════════════════════ */
.entry-content h2, .entry-content h3 {
  font-family: var(--vce-font-display) !important;
  color: var(--vce-green-dark) !important;
}
.entry-content a { color: var(--vce-green-accent); }
.entry-content a:hover { color: var(--vce-green-dark); }

/* ════════════════════════════════════════════════════════════
   BLOCKSY OVERRIDES — couleurs globales
   ════════════════════════════════════════════════════════════ */
:root {
  --theme-palette-color-1: var(--vce-green-accent) !important;
  --theme-palette-color-2: var(--vce-green-dark) !important;
  --theme-palette-color-3: var(--vce-green-light) !important;
  --theme-link-initial-color: var(--vce-green-accent) !important;
  --theme-link-hover-color: var(--vce-green-dark) !important;
  --theme-button-background-initial-color: var(--vce-green-accent) !important;
  --theme-button-background-hover-color: #3d8046 !important;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .vce-hero { grid-template-columns: 1fr; padding: 3rem 5%; }
  .vce-hero-visual { display: none; }
  .vce-categories-grid { grid-template-columns: repeat(2, 1fr); }
  .vce-featured-grid { grid-template-columns: 1fr; }
  .vce-guides-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .vce-categories-grid,
  .vce-guides-grid { grid-template-columns: 1fr; }
  .vce-stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0.75rem; }
  .vce-newsletter { flex-direction: column; }
  .vce-newsletter-form { width: 100%; flex-direction: column; }
  .vce-newsletter-form input[type="email"] { width: 100%; }
}
