:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --ink: #0f172a;
  --muted: #64748b;
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.logo span { color: var(--emerald); }
.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface); }
.btn {
  display: inline-block; background: var(--emerald); color: #fff !important;
  padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: .9rem;
  text-decoration: none; border: none; cursor: pointer;
}
.btn:hover { background: var(--emerald-dark); }
.btn-outline { background: transparent; color: var(--emerald) !important; border: 1.5px solid var(--emerald); }
.menu-toggle { display: none; }

/* Hero */
.hero { background: linear-gradient(135deg, rgba(6,78,59,.72), rgba(5,150,105,.68)), url('../images/hero-bg.webp') center center/cover no-repeat; color: #fff; padding: 72px 0; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.15; max-width: 720px; }
.hero p { margin-top: 16px; max-width: 560px; opacity: .92; }
.hero .btn { margin-top: 24px; background: #fff; color: var(--emerald) !important; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat b { font-size: 1.5rem; display: block; }
.hero-stat small { opacity: .85; }

section { padding: 56px 0; }
.section-alt { background: var(--surface); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 8px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 32px; }

/* Cards & grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px;
}
.feature-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: #ecfdf5; color: var(--emerald);
  display: grid; place-items: center; font-weight: 700; margin-bottom: 12px;
}

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: .95rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--emerald); outline-offset: -1px; border-color: var(--emerald);
}
.range-row { display: flex; align-items: center; gap: 12px; }
input[type=range] { flex: 1; accent-color: var(--emerald); }
.range-val { min-width: 110px; font-weight: 600; text-align: right; }
.form-msg { margin-top: 12px; padding: 12px; border-radius: 8px; display: none; }
.form-msg.ok { background: #ecfdf5; color: #065f46; }
.form-msg.err { background: #fef2f2; color: #991b1b; }

/* Result panel */
.result-panel { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: var(--radius); padding: 24px; }
.result-big { font-size: 2rem; font-weight: 800; color: var(--emerald-dark); }
.result-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #a7f3d0; font-size: .92rem; }
.result-row:last-child { border-bottom: none; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--surface); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:hover td { background: #f0fdf4; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #ecfdf5; color: #059669; }
.badge-amber { background: #fffbeb; color: #b45309; }

/* Quiz */
.quiz-opt {
  display: block; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  cursor: pointer; font-size: .95rem; font-family: inherit;
}
.quiz-opt:hover { border-color: var(--emerald); }
.quiz-opt.selected { border-color: var(--emerald); background: #ecfdf5; font-weight: 600; }
.score-gauge { font-size: 3.5rem; font-weight: 800; color: var(--emerald-dark); }

/* Checklist */
.check-group h3 { margin-bottom: 12px; }
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .95rem; }
.check-item input { margin-top: 5px; accent-color: var(--emerald); }

/* Blog */
.post-card { transition: box-shadow .15s; }
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.post-card a { color: inherit; text-decoration: none; }
.tagline { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--emerald); font-weight: 700; }
.article-body h2 { font-size: 1.35rem; margin: 28px 0 10px; }
.article-body p, .article-body li { color: #334155; margin-bottom: 10px; }
.article-body ul { padding-left: 22px; }

/* Footer */
footer { background: var(--ink); color: #cbd5e1; padding: 48px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
footer ul { list-style: none; }
footer a { color: #94a3b8; text-decoration: none; font-size: .88rem; display: block; padding: 4px 0; }
footer a:hover { color: #fff; }
.copyright { border-top: 1px solid #1e293b; margin-top: 36px; padding-top: 20px; font-size: .82rem; color: #64748b; }

.page-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 48px 0; }
.page-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.page-hero p { color: var(--muted); max-width: 640px; }

@media (max-width: 860px) {
  .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .menu-toggle {
    display: block; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink);
  }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 20px 20px; border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
}

/* Hide Netlify badge */
#nl-badge, #nl-card, .nl-badge { display: none !important; }


/* Cookie banner: accept/reject equal visual weight (GDPR/CNIL parity requirement) */
.cc-compliance.cc-highlight .cc-btn,
.cc-compliance.cc-highlight .cc-btn:first-child {
  background-color: #059669;
  border-color: #059669;
  color: #fff;
  min-width: 140px;
}
.cc-compliance.cc-highlight .cc-btn:hover,
.cc-compliance.cc-highlight .cc-btn:focus,
.cc-compliance.cc-highlight .cc-btn:first-child:hover,
.cc-compliance.cc-highlight .cc-btn:first-child:focus {
  background-color: #047857;
  border-color: #047857;
  text-decoration: none;
}
