/* ══════════════════════════════════════════
   Castro Terrassement — style.css
   ══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:        #1D9E75;
  --teal-dark:   #0F6E56;
  --teal-deeper: #085041;
  --teal-light:  #E1F5EE;
  --teal-mid:    #9FE1CB;
  --text:        #1a1a18;
  --muted:       #5a5a58;
  --border:      rgba(0,0,0,0.10);
  --bg:          #f5f4f0;
  --white:       #ffffff;
  --radius:      10px;
  --radius-lg:   14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAV ── */
.nav {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-icon {
  width: 40px; height: 40px;
  background: var(--teal); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 22px; height: 22px; fill: white; }
.nav-brand { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand-name { font-size: 15px; font-weight: 700; color: var(--teal-dark); letter-spacing: 0.3px; }
.nav-brand-sub  { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.8px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--teal-dark); }
.btn-nav {
  background: var(--teal); color: white;
  border: none; padding: 9px 18px;
  border-radius: 7px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s;
}
.btn-nav:hover { background: var(--teal-dark); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── HERO ── */
.hero {
  background: var(--teal-deeper);
  padding: 4rem 2rem 3rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; bottom: -60px; right: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.035);
  pointer-events: none;
}
.hero-inner { max-width: 700px; }
.hero-eyebrow {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 2.5px; color: rgba(255,255,255,0.55); margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700; color: white; line-height: 1.12; margin-bottom: 1rem;
}
.hero-title em { color: #5DCAA5; font-style: normal; }
.hero-sub { font-size: 15px; color: rgba(255,255,255,0.68); line-height: 1.7; max-width: 520px; margin-bottom: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-badge {
  background: rgba(255,255,255,0.09);
  border: 0.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.82);
  padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
}

/* ── STATS ── */
.stats {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.stat-item { text-align: center; padding: 1.5rem 1rem; border-right: 0.5px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-num  { font-size: 26px; font-weight: 700; color: var(--teal-dark); margin-bottom: 4px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; }

/* ── SECTIONS ── */
.section { padding: 3rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1.75rem; }
.section-line   { width: 4px; height: 24px; background: var(--teal); border-radius: 3px; flex-shrink: 0; }
.section-title  { font-size: 20px; font-weight: 700; color: var(--text); }

/* ── SERVICES ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.service-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  transition: border-color .15s, box-shadow .15s;
}
.service-card:hover {
  border-color: var(--teal-mid);
  box-shadow: 0 4px 16px rgba(29,158,117,0.08);
}
.service-icon {
  width: 42px; height: 42px;
  background: var(--teal-light); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.service-icon svg { width: 22px; height: 22px; fill: var(--teal-dark); }
.service-name { font-size: 14px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.service-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── GALERIE ── */
.gallery-wrap { background: var(--bg); padding-bottom: 3rem; }
.gallery-inner { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem 0; }

.gallery-section { margin-bottom: 2.5rem; }
.gallery-section:last-child { margin-bottom: 0; }
.gallery-section-title {
  font-size: 15px; font-weight: 600;
  color: var(--teal-dark); margin-bottom: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 1.5rem;
}

.photo-card {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden; position: relative;
  border: 0.5px solid var(--border);
  background: var(--teal-light);
  cursor: zoom-in;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.photo-card:hover img { transform: scale(1.03); }
.photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,80,65,0.72) 0%, transparent 55%);
  opacity: 0; transition: opacity .2s;
  display: flex; align-items: flex-end; padding: 12px 14px;
}
.photo-overlay-name { font-size: 12px; color: white; font-weight: 500; }

/* États galerie */
.gallery-loading,
.gallery-empty,
.gallery-error {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 4rem 2rem; text-align: center;
  color: var(--muted); font-size: 14px;
}
.gallery-empty svg, .gallery-error svg {
  width: 48px; height: 48px; fill: var(--teal-mid); opacity: .6;
}
.gallery-error svg { fill: #c0392b; }

/* Spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--teal-light);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.90); z-index: 1000;
  align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 90vh;
  border-radius: var(--radius); object-fit: contain;
  cursor: default;
}
.lightbox-close {
  position: fixed; top: 20px; right: 24px;
  background: rgba(255,255,255,0.12); border: none;
  color: white; font-size: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ── CONTACT ── */
.contact-wrap { padding: 2rem 2rem 3rem; max-width: 1100px; margin: 0 auto; }
.contact-box  { background: var(--teal-deeper); border-radius: var(--radius-lg); padding: 2rem; }
.contact-title { font-size: 20px; font-weight: 700; color: white; margin-bottom: 1.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.contact-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  border: 0.5px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: background .15s;
}
a.contact-item:hover { background: rgba(255,255,255,0.13); }
.contact-item-icon {
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,0.1); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.contact-item-icon svg { width: 20px; height: 20px; fill: #5DCAA5; }
.contact-item > div { min-width: 0; }
.c-label { font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 3px; }
.c-value { font-size: 14px; font-weight: 600; color: #5DCAA5; overflow-wrap: anywhere; }
.c-value.plain { color: white; }

/* ── FOOTER ── */
footer {
  background: var(--white);
  border-top: 0.5px solid var(--border);
  text-align: center; padding: 1.5rem 2rem;
}
footer p { font-size: 12px; color: var(--muted); }
footer a { color: var(--teal-dark); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--white); padding: 1rem 1.5rem;
    gap: 1rem; border-bottom: 0.5px solid var(--border); z-index: 99;
  }
  .hamburger { display: flex; }
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .section, .gallery-inner, .contact-wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-num { font-size: 20px; }
}
