/* MG Impulsion - static site stylesheet.
   Brand colors sampled from the official logo:
   green #57AF42, anthracite #31373D, mid grey #646A6F. */

:root {
  --green: #57af42;
  /* Darker than the logo green on purpose: this variant only carries small text
     (links, eyebrows, sector tags), where #43912f fell just under the 4.5:1
     contrast ratio on white and on --green-tint. Buttons, icons and rules keep
     --green untouched, so the palette still reads the same. */
  --green-dark: #3a7d28;
  /* Buttons carry white text, and white on the logo green (#57af42) only reaches
     2.8:1, which is hard to read on a phone outdoors. This darker green reaches
     4.6:1. It is deliberately kept to one variable: set it back to var(--green)
     to restore the exact logo colour on the buttons. */
  --green-cta: #3e8529;
  --green-tint: #eef7ec;
  --ink: #31373d;
  --ink-mid: #646a6f;
  --ink-soft: #7b8288;
  --line: #e2e5e8;
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --alert: #b3541e;
  --alert-tint: #fdf3ec;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(49, 55, 61, .06), 0 8px 24px rgba(49, 55, 61, .06);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.55rem; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- Skip link ---------- */

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Header and navigation (CSS only, no JS) ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.brand:hover { text-decoration: none; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-btn {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer; background: #fff;
}
.nav-btn .bars { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-btn .bars::before, .nav-btn .bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.nav-btn .bars::before { top: -5px; }
.nav-btn .bars::after { top: 5px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; color: var(--ink); font-weight: 500; font-size: .97rem;
  padding: 10px 0;
}
.site-nav a:hover { color: var(--green-dark); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--green-dark); font-weight: 700; }

@media (max-width: 899px) {
  .site-nav {
    display: none; width: 100%;
    border-top: 1px solid var(--line);
    padding: 8px 0 16px;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { padding: 12px 2px; }
  .site-nav .nav-cta { margin-top: 12px; }
  .header-inner { flex-wrap: wrap; padding-bottom: 0; }
}

@media (min-width: 900px) {
  .nav-btn { display: none; }
  .brand img { height: 40px; }
  .site-nav ul { display: flex; align-items: center; gap: 26px; }
  .site-nav .nav-cta a {
    background: var(--green-cta); color: #fff; border-radius: var(--radius);
    padding: 9px 16px; font-weight: 600;
  }
  .site-nav .nav-cta a:hover { background: var(--green-dark); color: #fff; }
}

/* ---------- Urgency strip ---------- */

.urgency-bar {
  background: var(--ink); color: #fff;
  font-size: .93rem; text-align: center;
}
.urgency-bar .wrap { padding: 10px 20px; }
.urgency-bar strong { color: #fff; }
.urgency-bar a { color: #fff; text-decoration: underline; white-space: nowrap; font-weight: 700; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1.2;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green-cta); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #22272c; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Full-width buttons on narrow screens: bigger tap targets, no ragged edges. */
@media (max-width: 479px) {
  .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- Phone reveal ----------
   The phone number is shown only after the visitor opens the disclosure, so it
   never appears in clear on initial render. Built on <details>/<summary>, so it
   works with JavaScript disabled: closed shows the "Afficher le numéro" trigger,
   open shows the clickable tel: link and hides the trigger. */
.phone-reveal { display: inline-block; }
.phone-reveal > summary { cursor: pointer; list-style: none; }
.phone-reveal > summary::-webkit-details-marker { display: none; }
.phone-reveal > summary::marker { content: ""; }
.phone-reveal[open] > summary { display: none; }

/* Inline variant: trigger and revealed number read as a text link. Coloured for
   light backgrounds by default; dark contexts (urgency strip, footer, CTA band)
   override to white below. */
.phone-inline { display: inline; }
.phone-inline > summary {
  display: inline; font-weight: 700; color: var(--green-dark);
  text-decoration: underline; text-underline-offset: 2px;
}
.urgency-bar .phone-inline > summary,
.site-footer .phone-inline > summary,
.cta-band .phone-inline > summary { color: #fff; }

/* Button variant: pass the colour with a .btn-* class on both the <summary> and
   the <a>, so trigger and revealed number are the same full button. */
@media (max-width: 479px) {
  .btn-row .phone-btn { flex: 1 1 100%; }
  .phone-btn > summary.btn, .phone-btn > a.btn { width: 100%; }
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--ink-mid); margin-bottom: 0; }
.eyebrow {
  display: block; text-transform: uppercase; letter-spacing: .09em;
  font-size: .76rem; font-weight: 700; color: var(--green-dark); margin-bottom: 10px;
}

/* ---------- Hero ---------- */

.hero { padding: 44px 0 56px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { font-size: 1.95rem; margin-bottom: 18px; }
.hero .lead { font-size: 1.08rem; color: var(--ink-mid); }
.hero-quote {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 16px; margin: 22px 0 26px;
  font-size: 1.02rem; color: var(--ink); font-style: italic;
}
.hero-photo { margin: 0; }
.hero-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
/* The source photo is portrait 2:3. Full height eats the whole mobile viewport,
   so crop it to a band and keep the subject (upper body) in frame. */
@media (max-width: 799px) {
  .hero-photo img { max-height: 300px; object-fit: cover; object-position: 50% 20%; }
}
.hero-meta { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; }
.hero-meta li { color: var(--ink-mid); font-size: .95rem; padding-left: 24px; position: relative; }
.hero-meta li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 12px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

@media (min-width: 800px) {
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 48px; }
}

/* ---------- Cards ---------- */

.cards { display: grid; gap: 20px; }
@media (min-width: 700px) { .cards.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .cards.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column;
}
.section-alt .card { box-shadow: var(--shadow); border-color: transparent; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-mid); font-size: .96rem; }
.card ul { margin: 0; padding-left: 18px; color: var(--ink-mid); font-size: .95rem; }
.card ul li { margin-bottom: 5px; }
.card .card-link { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: .95rem; }
/* ---------- Pictograms ----------
   Hand-drawn line icons, inlined in the markup. No icon font, no sprite, no
   external request. Every icon shares the same parameters: 24x24 viewBox,
   stroke-width 1.6, round caps and joins, no fill, stroke set to currentColor.
   Sizing and colour live here, so a new icon only has to match those params.
   All of them are decorative and marked aria-hidden: the adjacent text always
   carries the meaning. */

.card-icon { width: 32px; height: 32px; color: var(--green); margin-bottom: 16px; }
.section-icon { width: 34px; height: 34px; color: var(--green); margin-bottom: 14px; }
.case-icon { width: 28px; height: 28px; color: var(--green); flex: 0 0 auto; }
.alert-icon { width: 36px; height: 36px; color: var(--alert); margin-bottom: 14px; }
.list-icon { width: 15px; height: 15px; color: var(--green); flex: 0 0 auto; }

.card-icon svg, .section-icon svg, .case-icon svg,
.alert-icon svg, .list-icon svg, .step-icon svg { display: block; width: 100%; height: 100%; }

/* Step cards keep the number top left (it carries the order) and take the icon
   top right, so the two never fight for the same spot. */
.step-icon {
  position: absolute; top: 18px; right: 14px;
  width: 22px; height: 22px; color: var(--green);
}
@media (min-width: 700px) {
  .step-icon { top: 24px; right: 20px; width: 26px; height: 26px; }
}

/* ---------- Alert card (crisis management) ---------- */

.alert-card {
  border: 1px solid #f0d9c8; background: var(--alert-tint);
  border-left: 4px solid var(--alert);
  border-radius: var(--radius); padding: 26px;
}
.alert-card .eyebrow { color: var(--alert); }
.alert-card h2 { font-size: 1.35rem; }
.alert-card h3 { font-size: 1.2rem; }
/* When the crisis block sits inside another section (e.g. nested in Hygiène
   alimentaire), keep it clear of the preceding content. */
.alert-card.nested { margin-top: 28px; }
.alert-card p { color: #6b4a35; }
.alert-card ul { margin: 0 0 20px; padding-left: 20px; color: #6b4a35; }
.alert-card ul li { margin-bottom: 4px; }
/* Links inside the alert body take the alert colour, so the green of the rest of
   the site does not fight the brown tint of this block. */
.alert-body a { color: var(--alert); font-weight: 700; }
@media (min-width: 860px) {
  .alert-card { display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center; padding: 32px; }
  .alert-card .alert-body { grid-column: 1; }
  .alert-card .alert-action { grid-column: 2; }
}

/* ---------- Steps ---------- */

/* Two columns even on the narrowest phones: each step is a title plus one short
   line, so a single stacked column just made the home page longer for nothing. */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) { .steps { gap: 20px; } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  counter-increment: step; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px; position: relative;
}
@media (min-width: 700px) { .steps li { padding: 24px 22px; } }
.steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 700; font-size: .95rem;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.02rem; margin-bottom: 6px; }
.steps p { color: var(--ink-mid); font-size: .94rem; }
.steps-note { margin: 22px 0 0; font-size: .95rem; font-weight: 600; }

/* ---------- Value list with check marks ---------- */

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .checklist.two-col { grid-template-columns: repeat(2, 1fr); gap: 10px 32px; } }
.checklist li { position: relative; padding-left: 28px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 13px; height: 7px;
  border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

/* ---------- Case studies ---------- */

.case { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; }
.case-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.case .sector {
  display: inline-block; background: var(--green-tint); color: var(--green-dark);
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.case-head .sector { margin-bottom: 0; }
.case ul { margin: 0; padding-left: 18px; color: var(--ink-mid); font-size: .96rem; }
.case ul li { margin-bottom: 6px; }

/* ---------- About page ---------- */

.about-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 340px 1fr; gap: 48px; align-items: start; } }
.about-photo { margin: 0; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 12px; }

.figures { display: grid; gap: 16px; margin: 28px 0 0; }
@media (min-width: 620px) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figure { border-top: 3px solid var(--green); padding-top: 14px; }
.figure strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--ink); }
.figure span { font-size: .92rem; color: var(--ink-mid); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 380px; gap: 48px; align-items: start; } }

.contact-direct { background: var(--bg-alt); border-radius: var(--radius); padding: 26px; }
.contact-direct h2 { font-size: 1.2rem; }
.contact-list { list-style: none; margin: 0 0 22px; padding: 0; }
.contact-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .label {
  display: flex; align-items: center; gap: 7px;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft); font-weight: 700; margin-bottom: 3px;
}
.contact-list .value { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.contact-list a.value { color: var(--green-dark); }

/* Spam honeypot: off-screen rather than display:none, which the cruder bots
   detect and skip. Real visitors never see it and tab order skips it. */
.hp-field {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.notice {
  background: var(--green-tint); border-left: 3px solid var(--green);
  border-radius: var(--radius); padding: 14px 16px;
  font-size: .93rem; color: #33562b; margin-bottom: 24px;
}
.notice p { margin: 0; }
.notice a { color: #2d5b22; font-weight: 700; }
.notice-error {
  background: var(--alert-tint); border-left-color: var(--alert); color: #6b4a35;
}
.notice-error a { color: var(--alert); }

/* ---------- Form ---------- */

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 11px 13px; background: #fff;
  border: 1px solid #cfd4d9; border-radius: var(--radius);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green); outline: 2px solid rgba(87, 175, 66, .25); outline-offset: 0;
}
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .9rem; font-weight: 400; color: var(--ink-mid);
}
.consent input { width: auto; margin-top: 4px; flex: 0 0 auto; }
.form-note { font-size: .86rem; color: var(--ink-soft); margin-top: 14px; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--ink); color: #fff; }
.cta-band h2, .cta-band strong { color: #fff; }
.cta-band p { color: #c8cdd2; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }
/* Green does not have enough contrast on the dark band: plain links go white. */
.cta-band a:not(.btn) { color: #fff; text-decoration: underline; }
.cta-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .cta-inner { grid-template-columns: 1fr auto; gap: 40px; } }

/* ---------- Footer ---------- */

.site-footer {
  background: #23282d; color: #b9bfc4;
  font-size: .93rem; padding: 44px 0 26px;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 28px; }
/* On phones the two link columns sit side by side rather than stacking, which
   keeps the footer from adding a screenful of scroll. */
@media (max-width: 759px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; } }
.site-footer h2 {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .09em;
  color: #fff; margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.footer-logo {
  height: 32px; width: auto; margin-bottom: 14px;
  /* The logo wordmark is dark; lighten it for the dark footer. */
  filter: brightness(0) invert(1);
}
.footer-bottom {
  border-top: 1px solid #343a40; margin-top: 32px; padding-top: 18px;
  font-size: .85rem; color: #8b9298;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* ---------- Page header ---------- */

.page-head { background: var(--bg-alt); padding: 40px 0; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 12px; }
.page-head p { color: var(--ink-mid); max-width: 680px; margin-bottom: 0; }

/* ---------- Prose blocks (legal pages) ---------- */

.narrow > h2 { margin-top: 38px; }
.narrow > h2:first-child { margin-top: 0; }

/* ---------- Utilities ---------- */

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
