/* Automation LM — direction « Industriel épuré » */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --navy: #333568;
  --red: #e91f29;
  --ink: #111;
  --graphite: #343334;
  --muted: #55565c;
  --paper: #fff;
  --mist: #f2f2f4;
  --line: #e4e4e8;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--navy); text-underline-offset: .18em; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
h1 em, h2 em { font-style: normal; color: var(--red); }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 8px; top: -60px;
  background: var(--ink); color: #fff;
  padding: 8px 14px; border-radius: var(--radius);
  z-index: 10;
}
.skip:focus { top: 8px; color: #fff; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .8em 1.2em;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-secondary { background: var(--mist); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn .ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }

/* En-tête */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}
.brand { margin-right: auto; }
.brand img { width: auto; height: 48px; }
.header-phone { padding: .55em .9em; font-size: .95rem; }

.menu { position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius);
}
.menu summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after {
  display: block; width: 22px; height: 2px; background: var(--ink); position: relative;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { top: 0; transform: rotate(45deg); }
.menu[open] .burger::after { top: 0; transform: rotate(-45deg); }
.menu nav {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(17, 17, 17, .12);
  min-width: 220px;
  z-index: 5;
}
.menu ul { list-style: none; margin: 0; padding: 8px; }
.menu a, .nav-desktop a {
  display: block; padding: 10px 12px; border-radius: 6px;
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.menu a:hover, .nav-desktop a:hover { background: var(--mist); }
.menu a[aria-current="page"] { color: var(--navy); box-shadow: inset 3px 0 0 var(--red); }
.lang-switch { color: var(--muted) !important; }

/* Mobile : menu repliable ; grand écran : navigation en ligne */
.nav-desktop { display: none; }
@media (min-width: 820px) {
  .header-inner { min-height: 88px; gap: 24px; }
  .brand img { height: 56px; }
  .menu { display: none; }
  .nav-desktop { display: block; }
  .nav-desktop ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
  .nav-desktop a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
  .header-phone { order: 3; }
}

/* Contenu */
main { display: block; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section-alt { background: var(--mist); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40em; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: .75em;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Héros */
.hero { padding-block: clamp(32px, 7vw, 96px) clamp(40px, 8vw, 104px); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero-address { margin-top: 16px; color: var(--muted); font-size: .95rem; }
.hero-art .ill { width: 100%; max-width: 560px; margin-inline: auto; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}

.page-intro { padding-block: clamp(40px, 7vw, 88px) 8px; }

/* Cartes de services */
.cards { display: grid; gap: 20px; margin-top: 32px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.card-art { aspect-ratio: 3 / 2; display: grid; place-items: center; margin-bottom: 16px; }
.card-art .ill { max-height: 100%; width: 100%; }
.card p { color: var(--muted); margin: 0; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(4, 1fr); } }

/* Sections texte + dessin */
.split { display: grid; gap: 32px; align-items: center; }
.split p { max-width: 38em; }
.split-art .ill { width: 100%; max-width: 420px; margin-inline: auto; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.2fr 1fr; gap: 64px; }
  .split-reverse > :first-child { order: 2; }
}

/* Bandeau de contact */
.band { background: var(--ink); color: #fff; }
.band .lead { color: #c9c9d1; margin-bottom: 0; }
.band-inner { display: grid; gap: 24px; align-items: center; }
.band .btn-primary { background: #fff; color: var(--ink); }
.band .btn-primary:hover { background: var(--mist); color: var(--ink); }
.band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.band .btn-secondary:hover { border-color: #fff; color: #fff; }
.band :focus-visible { outline-color: #fff; }
@media (min-width: 860px) { .band-inner { grid-template-columns: 1fr auto; } }

/* Contact */
.h3 { font-size: 1.25rem; letter-spacing: -.01em; margin-top: 32px; }
.contact-section { padding-top: 32px; }
.contact-grid { display: grid; gap: 48px; align-items: start; }
.contact-info address { font-style: normal; font-size: 1.15rem; line-height: 1.5; margin-bottom: 16px; }
.hours { margin: 0; color: var(--muted); }
.map {
  display: block; margin-top: 32px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  max-width: 480px;
}
.map:hover { border-color: var(--navy); }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.contact-form {
  background: var(--mist);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 36px);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.req { color: var(--red); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #c8c8d0;
  border-radius: var(--radius);
  padding: .7em .85em;
}
.field textarea { resize: vertical; min-height: 9em; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--navy); }
.has-error input, .has-error textarea { border-color: #b3141c; }
.field-error { color: #b3141c; font-weight: 600; font-size: .95rem; margin: 6px 0 0; }
.form-note { font-size: .9rem; color: var(--muted); }
.contact-form button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.notice { border-radius: var(--radius); padding: 12px 16px; font-weight: 600; }
.notice-ok { background: #e6f4ea; color: #14532d; }
.notice-error { background: #fdecec; color: #8a1016; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Illustrations */
.ill { stroke: var(--navy); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ill .r { stroke: var(--red); stroke-width: 2; }
.ill .thin { stroke-width: 1; }
.ill .dash { stroke-dasharray: 10 4 2 4; stroke-width: 1; }
.ill .fill-r { fill: var(--red); stroke: none; }
.ill .fill-n { fill: var(--navy); stroke: none; }
.ill .fill-w { fill: var(--paper); stroke: none; }
.ill text { fill: var(--navy); stroke: none; font-family: var(--font); font-size: 11px; font-weight: 600; }

/* Plan d'accès (carte.svg) : unités = pixels de la capture d'origine, d'où les grandes valeurs */
.ill .map { stroke-width: 3; }
.ill .map .thin { stroke-width: 2; }
.ill .road-o { stroke: var(--navy); stroke-width: 46; stroke-linecap: butt; }
.ill .road-i { stroke: var(--paper); stroke-width: 40; stroke-linecap: butt; }
.ill .rail { stroke-width: 2.5; }
.ill .rail-ties { stroke-width: 16; stroke-dasharray: 2.5 12; stroke-linecap: butt; }
.ill .bldg { stroke-width: 2; stroke-dasharray: 9 4; }
.ill .target { stroke: var(--red); stroke-width: 4; }
.ill .target-hatch { fill: url(#hachure); stroke: none; }
.ill .map-hatch { stroke: var(--red); stroke-width: 2; }
.ill .frame { stroke-width: 5; }
.ill .map text { font-size: 18px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; dominant-baseline: central; }
.ill .map text.label { fill: var(--red); font-size: 20px; dominant-baseline: auto; }

/* Pied de page */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  font-size: .95rem;
  color: var(--graphite);
}
.footer-grid { display: grid; gap: 24px; }
.site-footer address { font-style: normal; }
.footer-legal { padding-block: 24px; color: var(--muted); font-size: .85rem; }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
