/* =============================================
   CLT Diagnostic — Global Stylesheet
   Charte : #6abf2e (lime green) / #fff / #1a1a1a
   Typographie : Inter (Google Fonts)
   Mobile-first, responsive
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #6abf2e;
  --color-primary-dark: #559a24;
  --color-primary-light: #e8f5e0;
  --color-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-light: #555555;
  --color-accent-bg: #f5f5f5;
  --color-border: #e0e0e0;
  --color-footer: #1a1a1a;
  --color-footer-text: #cccccc;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --container-max: 1200px;
  --header-height: 72px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* --- Container --- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }

/* --- Section --- */
.section { padding: 60px 0; }
.section--alt { background: var(--color-accent-bg); }
.section-title {
  font-size: 1.75rem; font-weight: 700; text-align: center;
  margin-bottom: 12px; color: var(--color-text);
}
.section-subtitle {
  text-align: center; color: var(--color-text-light);
  max-width: 640px; margin: 0 auto 40px; font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center; justify-content: center;
}
.btn-primary {
  background: var(--color-primary); color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark); border-color: var(--color-primary-dark);
  color: var(--color-white); transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent; color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary); color: var(--color-white);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.btn-sm { padding: 10px 20px; font-size: 0.9rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* --- Header --- */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
  height: var(--header-height);
}
.header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.header__logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; color: var(--color-text); }
.header__logo img { height: 40px; width: auto; }
.header__logo span { color: var(--color-primary); }

/* Navigation */
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--color-text); font-weight: 500; font-size: 0.95rem;
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--color-primary);
  transition: width var(--transition);
}
.nav a:hover, .nav a.active { color: var(--color-primary); }
.nav a:hover::after, .nav a.active::after { width: 100%; }

/* Header phone CTA */
.header__cta {
  display: flex; align-items: center; gap: 8px;
  color: var(--color-primary); font-weight: 700; font-size: 1rem;
}
.header__cta svg { width: 20px; height: 20px; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px; cursor: pointer; z-index: 1010;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--color-text);
  transition: all var(--transition); border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav overlay */
.nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 1005;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
  flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
.nav-overlay.active { display: flex; }
.nav-overlay a {
  font-size: 1.25rem; font-weight: 600; color: var(--color-text); padding: 8px;
}
.nav-overlay a:hover { color: var(--color-primary); }

/* --- Hero --- */
.hero {
  position: relative; padding: 80px 0 60px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 50%, #e8f5e0 100%);
  overflow: hidden; min-height: 500px; display: flex; align-items: center;
}
.hero__bg-circle {
  position: absolute; border-radius: 50%;
  background: rgba(106,191,46,0.08); pointer-events: none;
}
.hero__bg-circle--1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.hero__bg-circle--2 { width: 300px; height: 300px; bottom: -80px; left: -60px; }
.hero__bg-circle--3 { width: 200px; height: 200px; top: 50%; left: 60%; }
.hero__content { position: relative; z-index: 2; max-width: 640px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-primary-light); color: var(--color-primary-dark);
  padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 20px;
}
.hero__title {
  font-size: 2.2rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; color: var(--color-text);
}
.hero__title span { color: var(--color-primary); }
.hero__subtitle {
  font-size: 1.1rem; color: var(--color-text-light);
  margin-bottom: 32px; line-height: 1.7;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Cards --- */
.card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 28px; transition: all var(--transition);
}
.card:hover {
  border-color: var(--color-primary); transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  background: var(--color-primary-light); display: flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; color: var(--color-primary); }
.card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.card__text { color: var(--color-text-light); font-size: 0.95rem; line-height: 1.6; }
.card__link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--color-primary); font-weight: 600; margin-top: 12px; font-size: 0.9rem;
}
.card__link:hover { gap: 8px; }

/* Cards grid */
.cards-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}

/* --- Trust badges --- */
.trust { display: grid; gap: 24px; grid-template-columns: 1fr; text-align: center; }
.trust__item { padding: 24px; }
.trust__icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  background: var(--color-primary-light); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.trust__icon svg { width: 28px; height: 28px; color: var(--color-primary); }
.trust__title { font-weight: 700; margin-bottom: 6px; }
.trust__text { color: var(--color-text-light); font-size: 0.9rem; }

/* --- Zone intervention --- */
.zone-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.zone-card {
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 20px;
  transition: all var(--transition);
}
.zone-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.zone-card__dept { font-weight: 700; color: var(--color-primary); margin-bottom: 8px; }
.zone-card__cities { display: flex; flex-wrap: wrap; gap: 6px; }
.zone-card__city {
  background: var(--color-accent-bg); padding: 4px 12px;
  border-radius: 16px; font-size: 0.85rem; color: var(--color-text-light);
  transition: all var(--transition);
}
.zone-card__city:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }

/* --- Contact form --- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-white);
  transition: border-color var(--transition);
  font-size: 1rem;
}
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  box-shadow: none;
  cursor: pointer;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(106,191,46,0.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .error-msg {
  color: #d32f2f; font-size: 0.85rem; margin-top: 4px; display: none;
}
.form-group.has-error input,
.form-group.has-error textarea { border-color: #d32f2f; }
.form-group.has-error .error-msg { display: block; }

/* --- Footer --- */
.footer {
  background: var(--color-footer); color: var(--color-footer-text);
  padding: 48px 0 24px;
}
.footer__grid {
  display: grid; gap: 32px; grid-template-columns: 1fr;
  margin-bottom: 32px;
}
.footer__col-title { color: var(--color-white); font-weight: 700; margin-bottom: 12px; font-size: 1rem; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { color: var(--color-footer-text); font-size: 0.9rem; }
.footer__links a:hover { color: var(--color-primary); }
.footer__contact-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.9rem; }
.footer__contact-item svg { width: 18px; height: 18px; color: var(--color-primary); flex-shrink: 0; }
.footer__bottom {
  border-top: 1px solid #333; padding-top: 20px;
  text-align: center; font-size: 0.85rem; color: #888;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 16px 0; font-size: 0.9rem; color: var(--color-text-light);
}
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 6px; }

/* --- Page header --- */
.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #e8f5e0 100%);
  padding: 48px 0 32px;
}
.page-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.page-header p { color: var(--color-text-light); font-size: 1.05rem; max-width: 600px; }

/* --- Service detail (services page) --- */
.service-block { padding: 40px 0; }
.service-block:nth-child(even) { background: var(--color-accent-bg); }
.service-block__inner { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
.service-block__image {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.service-block__image img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.service-block__image::after {
  content: ''; position: absolute; inset: 0;
  background-color: var(--color-text); opacity: 0.15; pointer-events: none;
}
.service-block__icon {
  width: 72px; height: 72px; border-radius: var(--radius-md);
  background: var(--color-primary-light); display: flex;
  align-items: center; justify-content: center;
}
.service-block__icon svg { width: 36px; height: 36px; color: var(--color-primary); }
.service-block__title { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.service-block__text { color: var(--color-text-light); line-height: 1.7; margin-bottom: 16px; }

/* --- Scroll animations --- */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- CTA banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white); padding: 48px 0; text-align: center;
}
.cta-banner h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; }
.cta-banner p { margin-bottom: 24px; opacity: 0.9; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-banner .btn {
  background: var(--color-white); color: var(--color-primary);
  border-color: var(--color-white);
}
.cta-banner .btn:hover { background: transparent; color: var(--color-white); }

/* --- Ville page specifics --- */
.ville-services { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 24px 0; }
.ville-service-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.ville-service-item:hover { border-color: var(--color-primary); }
.ville-service-item svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }
.ville-service-item strong { display: block; margin-bottom: 2px; }
.ville-service-item span { font-size: 0.9rem; color: var(--color-text-light); }

/* ========================
   RESPONSIVE BREAKPOINTS
   ======================== */

/* Tablet (≥ 600px) */
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .zone-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .ville-services { grid-template-columns: repeat(2, 1fr); }
  .hero__title { font-size: 2.6rem; }
  .section-title { font-size: 2rem; }
}

/* Desktop (≥ 768px) */
@media (min-width: 768px) {
  .section { padding: 80px 0; }
  .container { padding: 0 32px; }
  .hero { padding: 100px 0 80px; }
  .service-block__inner { grid-template-columns: 1fr 1fr; }
  .service-block:nth-child(even) .service-block__inner { direction: rtl; }
  .service-block:nth-child(even) .service-block__inner > * { direction: ltr; }
}

/* Large desktop (≥ 1024px) */
@media (min-width: 1024px) {
  .hamburger { display: none; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .trust { grid-template-columns: repeat(4, 1fr); }
  .zone-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .hero__title { font-size: 3rem; }
  .page-header h1 { font-size: 2.5rem; }
  .ville-services { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile only (< 1024px) */
@media (max-width: 1023px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .header__cta { font-size: 0; }
  .header__cta svg { width: 24px; height: 24px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .hero__title { font-size: 1.75rem; }
}

/* =============================================
   BLOG CARDS & LATEST ARTICLES SECTION
   ============================================= */

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.blog-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.blog-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}
.blog-card__tag {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}
.blog-card__ville {
  background: var(--color-accent-bg);
  color: var(--color-text-light);
  padding: 2px 8px;
  border-radius: 12px;
}
.blog-card__date {
  color: var(--color-text-light);
  margin-left: auto;
}
.blog-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--color-text);
}
.blog-card__text {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}
.blog-card__link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.blog-card__link:hover {
  gap: 8px;
}

/* Premium asymmetric grid for exactly 5 articles on desktop */
@media (min-width: 1024px) {
  .latest-articles-grid-custom.has-5-items {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(6, 1fr);
  }
  .latest-articles-grid-custom.has-5-items > :nth-child(1) {
    grid-column: span 3;
  }
  .latest-articles-grid-custom.has-5-items > :nth-child(2) {
    grid-column: span 3;
  }
  .latest-articles-grid-custom.has-5-items > :nth-child(3) {
    grid-column: span 2;
  }
  .latest-articles-grid-custom.has-5-items > :nth-child(4) {
    grid-column: span 2;
  }
  .latest-articles-grid-custom.has-5-items > :nth-child(5) {
    grid-column: span 2;
  }
  /* Enhance the first two featured cards slightly on desktop */
  .latest-articles-grid-custom.has-5-items > :nth-child(-n+2) .blog-card__title {
    font-size: 1.3rem;
  }
}

