/* =========================================================
   Ingenium SARL — charte : jaune (primaire), noir, blanc
   ========================================================= */

:root {
  /* Couleurs */
  --yellow: #F4C21B;        /* jaune Ingenium, d'après le robinet du logo */
  --yellow-deep: #E0AC00;   /* survol */
  --yellow-soft: #FFF4C9;   /* surlignage */
  --ink: #111110;           /* noir */
  --ink-2: #1D1C1A;
  --text: #2A2925;
  --muted: #5E5B53;
  --line: #E7E3D8;
  --paper: #FFFFFF;
  --sand: #FAF7EF;

  /* Typo */
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1rem + 0.4vw, 1.3rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --fs-h2: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --fs-h1: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  /* Espacements */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-6: 1.5rem;  --s-8: 2rem;   --s-12: 3rem;   --s-16: 4rem;
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);

  --radius: 14px;
  --wrap: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; color: var(--ink); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: var(--yellow); padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: 0 1.5rem;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: var(--yellow-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--yellow); }
.btn-sm { min-height: 44px; padding: 0 1.15rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: var(--s-6); }
.brand img { height: 56px; width: auto; }

.nav { display: flex; align-items: center; gap: var(--s-8); }
.nav ul { display: flex; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.nav ul a {
  font-weight: 500; text-decoration: none; color: var(--ink);
  padding: .4rem 0; background: linear-gradient(var(--yellow), var(--yellow)) left bottom / 0 3px no-repeat;
  transition: background-size .25s var(--ease);
}
.nav ul a:hover, .nav ul a[aria-current="true"] { background-size: 100% 3px; }

.nav-toggle { display: none; }

@media (max-width: 1000px) {
  :root { --header-h: 66px; }
  .brand img { height: 40px; }
  .nav-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--yellow); cursor: pointer;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform .25s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: var(--s-6);
    padding: var(--s-6) 1.25rem var(--s-8);
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0,0,0,.3);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: .9rem 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); background: none; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2rem, 1rem + 4vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-8); align-items: center; }
.tagline {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 700; color: var(--ink); margin-bottom: var(--s-4);
}
.tagline::before { content: ""; width: 28px; height: 4px; border-radius: 2px; background: var(--yellow); }
.hero h1 mark {
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%);
  color: inherit; padding: 0 .05em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.lead { font-size: var(--fs-lg); color: var(--muted); margin-top: var(--s-6); max-width: 34rem; }
.lead a { color: var(--ink); font-weight: 700; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

.hero-media { margin: 0; position: relative; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius);
  position: relative; z-index: 1;
}
.hero-media::after {
  content: ""; position: absolute; z-index: 0;
  inset: 18px -14px -14px 18px; border-radius: var(--radius); background: var(--yellow);
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1.1fr; gap: var(--s-16); }
  .hero-media img { aspect-ratio: 5 / 4; }
  .hero-media::after { inset: 28px -24px -24px 28px; }
}

/* Chiffres clés */
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr);
  margin: clamp(3rem, 2rem + 4vw, 5rem) 0 0; padding: 0;
  border-top: 1px solid var(--line);
}
.facts > div { padding: var(--s-6) var(--s-4) var(--s-6) 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: var(--fs-sm); color: var(--muted); }
.facts dd {
  margin: 0 0 .15rem; font-family: var(--font-display); font-stretch: 112%;
  font-weight: 800; font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem); color: var(--ink); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.facts > div { display: flex; flex-direction: column-reverse; }
.facts > div:first-child { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(5, 1fr); }
  .facts > div { border-bottom: 0; padding-left: var(--s-6); border-left: 1px solid var(--line); }
  .facts > div:first-child { border-left: 0; padding-left: 0; grid-column: auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section--sand { background: var(--sand); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section-head p { margin-top: var(--s-4); font-size: var(--fs-lg); color: var(--muted); }

/* Services : deux blocs principaux */
.feature { display: grid; gap: var(--s-8); align-items: center; margin-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.feature img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.feature-body p { margin-top: var(--s-4); color: var(--muted); }
.ticks { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.ticks li { position: relative; padding-left: 2rem; font-weight: 500; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23111110' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}
@media (min-width: 960px) {
  .feature { grid-template-columns: 1.15fr 1fr; gap: var(--s-16); }
  .feature--flip img { order: 2; }
}

/* Services secondaires : liste à filets */
.service-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--ink);
}
.service-list li { padding: var(--s-8) 0; border-bottom: 1px solid var(--line); }
.service-list h3 { font-size: 1.2rem; }
.service-list h3::before {
  content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .55em;
  background: var(--yellow); border-radius: 2px; transform: translateY(-.05em);
}
.service-list p { margin-top: var(--s-2); color: var(--muted); }
@media (min-width: 760px) {
  .service-list { grid-template-columns: 1fr 1fr; column-gap: var(--s-12); }
}

/* Moto électrique Babana 237 */
.moto { display: grid; gap: var(--s-8); }
.badge {
  display: inline-block; background: var(--ink); color: var(--yellow);
  font-weight: 700; font-size: var(--fs-sm); padding: .35rem .8rem; border-radius: 999px; margin-bottom: var(--s-4);
}
.moto-text > p:not(.badge) { margin-top: var(--s-4); color: var(--muted); font-size: var(--fs-lg); max-width: 34rem; }
.moto-text strong { color: var(--ink); }
.moto figure { margin: 0; position: relative; }
.moto img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.moto-main img { aspect-ratio: 3 / 4; }
.moto-wide img { aspect-ratio: 16 / 9; object-position: 35% center; }
.moto figcaption {
  position: absolute; left: var(--s-3); bottom: var(--s-3);
  background: var(--ink); color: var(--paper); font-size: var(--fs-sm); font-weight: 500;
  padding: .45rem .75rem; border-radius: 8px;
}
@media (min-width: 960px) {
  .moto { grid-template-columns: 1.25fr 1fr; column-gap: var(--s-16); row-gap: var(--s-8); align-items: start; }
  .moto-main { grid-column: 2; grid-row: 1 / span 2; }
  .moto-main img { aspect-ratio: auto; max-height: 760px; }
  .moto-wide { grid-column: 1; grid-row: 2; }
}

/* Bande noire : démarche */
.band { background: var(--ink); color: #D9D6CC; padding-block: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.band h2 { color: var(--paper); }
.steps {
  list-style: none; margin: var(--s-12) 0 0; padding: 0; counter-reset: step;
  display: grid; gap: var(--s-8);
}
.steps li { counter-increment: step; display: grid; gap: var(--s-2); padding-top: var(--s-6); border-top: 1px solid #3A3934; }
.steps li::before {
  content: counter(step); display: grid; place-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-weight: 800; margin-bottom: var(--s-2);
}
.steps strong { font-family: var(--font-display); font-stretch: 112%; font-size: 1.3rem; color: var(--yellow); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* Réalisations */
.gallery { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .6s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: var(--s-3); bottom: var(--s-3); right: var(--s-3);
  width: fit-content; max-width: calc(100% - 1.5rem);
  background: var(--ink); color: var(--paper); font-size: var(--fs-sm); font-weight: 500;
  padding: .45rem .75rem; border-radius: 8px;
}
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .gallery { grid-template-columns: 1.6fr 1fr; grid-template-rows: 280px 280px 340px; }
  .g-c img { object-position: center 30%; }
  .g-d img { object-position: 70% center; }
  .gallery img { aspect-ratio: auto; }
  .g-a { grid-row: span 2; }
  .g-b { grid-row: span 2; }
  .g-c, .g-d { grid-column: auto; }
  .g-c { grid-row: 3; grid-column: 1; }
  .g-d { grid-row: 3; grid-column: 2; }
}

/* Références clients */
.section--refs { padding-top: 0; }
.section--refs .wrap { border-top: 1px solid var(--line); padding-top: var(--section); }
.logos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.logos li {
  background: var(--paper); display: grid; place-items: center; text-align: center;
  min-height: 132px; padding: var(--s-6) var(--s-4);
}
.logos img { width: auto; height: auto; max-width: 78%; max-height: 76px; object-fit: contain; }
.logos img[src*="giz"], .logos img[src*="creolink"], .logos img[src*="cenadi"] { max-width: 88%; max-height: 52px; }
.logo-text strong { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: .02em; line-height: 1; }
.logo-text span { display: block; margin-top: .35rem; font-size: .78rem; color: var(--muted); line-height: 1.3; }
.logo-text::before { content: ""; display: block; width: 22px; height: 4px; border-radius: 2px; background: var(--yellow); margin: 0 auto .6rem; }
@media (min-width: 560px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .logos { grid-template-columns: repeat(4, 1fr); } .logos li { min-height: 150px; } }
@media (min-width: 1100px) { .logos { grid-template-columns: repeat(6, 1fr); } }

/* À propos */
.about { display: grid; gap: var(--s-12); align-items: center; }
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.about-text p { margin-top: var(--s-4); color: var(--muted); }
.about-text h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: var(--s-2); }
.values { list-style: none; padding: 0; margin: var(--s-8) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.values li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .55rem 1rem; font-size: .95rem; }
.values strong { color: var(--ink); }
@media (min-width: 960px) { .about { grid-template-columns: 1fr 1fr; gap: var(--s-16); } }

/* Contact */
.contact { background: var(--yellow); padding-block: var(--section); }
.contact-grid { display: grid; gap: var(--s-12); }
.contact h2 { color: var(--ink); }
.contact-lead { margin-top: var(--s-4); font-size: var(--fs-lg); color: var(--ink); max-width: 30rem; }
.contact-list { list-style: none; margin: var(--s-8) 0 0; padding: 0; border-top: 2px solid var(--ink); }
.contact-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid rgba(17,17,16,.2); color: var(--ink); }
.contact-list .label { font-weight: 700; }
.contact-list a { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-list small { color: rgba(17,17,16,.7); font-size: .85em; }
@media (max-width: 420px) { .contact-list li { grid-template-columns: 1fr; gap: 0; } }

.form { background: var(--paper); border-radius: calc(var(--radius) + 4px); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); display: grid; gap: var(--s-4); box-shadow: 0 30px 60px -30px rgba(17,17,16,.45); }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .8rem .9rem; min-height: 50px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--yellow-soft); }
.field [aria-invalid="true"] { border-color: #C2410C; }
.form .btn-primary { background: var(--ink); color: var(--yellow); margin-top: var(--s-2); }
.form .btn-primary:hover { background: var(--ink-2); color: var(--paper); }
.form-note { font-size: var(--fs-sm); color: var(--muted); text-align: center; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: var(--s-16); align-items: start; } }

/* Pied de page */
.site-footer { background: var(--ink); color: #A8A59C; font-size: var(--fs-sm); padding-block: var(--s-8); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding-right: 72px; }
.site-footer strong { color: var(--yellow); }

/* Bouton WhatsApp */
.wa {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-content: center;
  background: var(--ink); color: var(--yellow);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
  transition: transform .2s var(--ease);
}
.wa:hover { transform: scale(1.06); }
.wa svg { width: 28px; height: 28px; fill: currentColor; }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
