/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #F5F7F0;
  color: #2C3A1E;
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

img { display: block; max-width: 100%; }

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --green-deep:   #173404;
  --green-mid:    #3B6D11;
  --green-vivid:  #639922;
  --green-soft:   #C0DD97;
  --green-pale:   #EAF3DE;
  --cream:        #F5F7F0;
  --earth:        #BA7517;
  --earth-light:  #FAC775;
  --text-dark:    #1C2E0D;
  --text-body:    #3A4A2A;
  --text-muted:   #6B7A58;
  --white:        #FFFFFF;
  --border:       #D2E4B8;
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
}

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* ── NAVIGATION ───────────────────────────────────────────── */
.nav-wrapper {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245, 247, 240, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav-wrapper.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(23,52,4,0.06);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 2rem;
  height: 68px; display: flex; align-items: center; gap: 2rem;
}
.nav-logo {
  flex: 0 0 auto; display: flex; align-items: center;
}
.nav-logo-img {
  height: 42px; border-radius: var(--radius-sm); display: block;
}
.nav-links {
  display: flex; gap: 2rem; margin-left: auto; align-items: center;
}
.nav-links a {
  font-size: 0.9rem; color: var(--text-body);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green-vivid); }
.nav-cta {
  background: var(--green-vivid); color: var(--white) !important;
  padding: 0.45rem 1.1rem; border-radius: var(--radius-sm);
  font-weight: 500; transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--green-mid) !important; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--green-deep); border-radius: 2px;
}
.nav-mobile {
  display: none; flex-direction: column; gap: 0;
  background: var(--white); border-top: 1px solid var(--border);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 1rem 2rem; font-size: 1rem; color: var(--text-body);
  border-bottom: 1px solid var(--green-pale);
  transition: background 0.2s;
}
.nav-mobile a:hover { background: var(--green-pale); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; padding: 8rem 2rem 6rem;
  background: linear-gradient(145deg, #EBF4DB 0%, #F5F7F0 60%, #EAF3DE 100%);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  max-width: 100%;
}
.hero-inner {
  max-width: 600px; position: relative; z-index: 2;
  margin: 0 auto 0 calc((100% - 1120px) / 2 + 2rem);
}
@media (max-width: 1160px) { .hero-inner { margin-left: 2rem; } }

.hero-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-mid);
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 700; line-height: 1.05;
  color: var(--green-deep); letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.1rem; color: var(--text-body);
  max-width: 480px; margin-bottom: 2.5rem; line-height: 1.7;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green-vivid); color: var(--white);
  padding: 0.8rem 1.8rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--green-mid); transform: translateY(-1px);
}

/* ── Hero decorative ──────────────────────────────────────── */
.hero-visual {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 50%; pointer-events: none; overflow: hidden;
}
.circle-bg {
  position: absolute; right: -10%; top: 10%;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, #C0DD97 0%, #EAF3DE 55%, transparent 75%);
  opacity: 0.55;
}
.leaf {
  position: absolute;
  border-radius: 50% 0 50% 0;
  opacity: 0.18;
}
.leaf-1 {
  width: 240px; height: 340px;
  background: var(--green-mid);
  right: 18%; top: 15%; transform: rotate(-25deg);
}
.leaf-2 {
  width: 160px; height: 220px;
  background: var(--green-vivid);
  right: 8%; top: 45%; transform: rotate(20deg);
}
.leaf-3 {
  width: 100px; height: 160px;
  background: var(--earth);
  right: 34%; top: 55%; transform: rotate(-10deg);
}

/* ── STATS ────────────────────────────────────────────────── */
.stats {
  background: var(--green-deep); padding: 3.5rem 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  text-align: center;
}
.stat-number {
  display: block; font-size: 2.6rem; font-weight: 700;
  color: var(--green-soft); letter-spacing: -0.02em; line-height: 1.1;
}
.stat-label {
  display: block; font-size: 0.85rem; color: rgba(192,221,151,0.65);
  margin-top: 0.3rem;
}

/* ── SECTION HEADER ───────────────────────────────────────── */
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-vivid);
  margin-bottom: 0.6rem;
}
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 700;
  color: var(--green-deep); letter-spacing: -0.02em; margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem; color: var(--text-muted); max-width: 560px; margin: 0 auto;
}

/* ── PORTFOLIO ────────────────────────────────────────────── */
.portfolio { padding: 6rem 0; background: var(--cream); }

.portfolio-categories { display: flex; flex-direction: column; gap: 3rem; }

.portfolio-category {}

.category-header { margin-bottom: 1.25rem; }

.category-pill {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--green-mid);
  background: var(--green-pale);
  border: 1px solid var(--border);
  padding: 5px 14px; border-radius: 20px;
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.company-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.company-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(23,52,4,0.1);
  border-color: var(--green-soft);
}

.card-logo-wrap {
  background: var(--green-pale);
  padding: 1.25rem 1.5rem 0.75rem;
  display: flex; align-items: center;
}
.card-logo-placeholder {
  width: 56px; height: 56px;
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.logo-initials {
  font-weight: 700; font-size: 0.85rem; color: var(--green-deep);
  letter-spacing: 0.05em; line-height: 1; z-index: 1;
}
.company-logo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; padding: 6px;
  background: var(--white); z-index: 2;
}

.card-body { padding: 0 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }

.card-name {
  font-size: 1.1rem; font-weight: 700;
  color: var(--green-deep); margin: 0.8rem 0 0.25rem; letter-spacing: -0.01em;
}
.card-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--green-vivid); margin-bottom: 0.7rem;
}
.card-desc {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; flex: 1;
  margin-bottom: 1rem;
}
.card-link {
  font-size: 0.83rem; font-weight: 600; color: var(--green-mid);
  display: flex; align-items: center; gap: 0.3rem;
  transition: color 0.2s;
}
.company-card:hover .card-link { color: var(--green-vivid); }
.arrow { transition: transform 0.2s; }
.company-card:hover .arrow { transform: translateX(3px); }

/* ── ABOUT ────────────────────────────────────────────────── */
.about {
  padding: 6rem 0;
  background: var(--green-pale);
}
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start;
}
.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700;
  color: var(--green-deep); letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.about-text p {
  font-size: 1rem; color: var(--text-body); margin-bottom: 1.1rem; line-height: 1.75;
}
.about-blocks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
.about-block {
  background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 1.5rem;
}
.about-block-icon { font-size: 1.5rem; margin-bottom: 0.7rem; }
.about-block h3 {
  font-size: 0.95rem; font-weight: 700;
  color: var(--green-deep); margin-bottom: 0.5rem;
}
.about-block p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ── CONTACT ──────────────────────────────────────────────── */
.contact { padding: 6rem 0; background: var(--cream); }
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start;
}
.contact-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700;
  color: var(--green-deep); letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.contact-text p {
  font-size: 1rem; color: var(--text-body); margin-bottom: 1rem; line-height: 1.75;
}
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.82rem; font-weight: 600;
  color: var(--green-mid); letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem; color: var(--text-dark);
  background: var(--white);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--green-vivid);
  box-shadow: 0 0 0 3px rgba(99,153,34,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #A8B89A; }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.9rem; margin-top: 0.5rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: var(--green-deep); padding: 3.5rem 0 2rem; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; padding-bottom: 2rem;
  border-bottom: 1px solid rgba(192,221,151,0.15);
}
.footer-logo {
  display: block; font-size: 1.4rem; font-weight: 700;
  color: var(--green-soft); letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.footer-brand p { font-size: 0.85rem; color: rgba(192,221,151,0.5); line-height: 1.6; }
.footer-nav {
  display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end;
}
.footer-nav a {
  font-size: 0.88rem; color: rgba(192,221,151,0.6);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--green-soft); }
.footer-bottom { padding-top: 1.5rem; text-align: center; }
.footer-bottom p { font-size: 0.78rem; color: rgba(192,221,151,0.3); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-blocks { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-visual { opacity: 0.4; width: 60%; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .hero-inner { margin-left: 0; }
  .portfolio { padding: 4rem 0; }
  .about, .contact { padding: 4rem 0; }
  .about-blocks { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-nav { align-items: flex-start; }
  .container { padding: 0 1.25rem; }
}

/* ── Mentions légales ─────────────────────────────────────── */
.legal-link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-muted); font: inherit; font-size: 0.82rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.legal-link:hover { color: var(--green-mid); }

.legal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(23, 52, 4, 0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.legal-overlay.open { opacity: 1; pointer-events: auto; }

.legal-modal {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.legal-modal h2 {
  font-size: 1.4rem; color: var(--green-deep);
  margin-bottom: 1.5rem;
}
.legal-modal h3 {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green-mid);
  margin: 1.5rem 0 0.5rem;
}
.legal-modal h3:first-of-type { margin-top: 0; }
.legal-modal p { font-size: 0.9rem; color: var(--text-body); line-height: 1.7; }
.legal-modal a { color: var(--green-mid); text-decoration: underline; }

.legal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.legal-close:hover { background: var(--green-pale); color: var(--green-deep); }
