/* SEM ENTREPRISES : planche de catalogue technique, fond clair d'atelier, bleu SEM */
:root {
  --ground: #F4F5F7;     /* fond d'atelier */
  --white: #FFFFFF;
  --ink: #0B1424;        /* encre, sections sombres */
  --muted: #4B5568;
  --muted-dark: #B9C2D3; /* texte secondaire sur fond sombre */
  --line: #DDE1E8;
  --accent: #0B3AA8;     /* bleu SEM */
  --accent-soft: #DCE5FA;
  --amber: #F2A900;      /* repères */

  --font: "Archivo", system-ui, sans-serif;
  --wrap: 1280px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--ground); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
p, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.h2 { font-size: clamp(36px, 4.4vw, 60px); font-stretch: 118%; letter-spacing: -0.025em; }
.kicker { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 18px; }
.lead { font-size: 19px; color: var(--muted); max-width: 30em; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  font: 600 16px var(--font); text-decoration: none; padding: 0 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--ink); color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--amber); color: var(--ink); }
.btn--line-white { border-color: #fff; color: #fff; }
.btn--line-white:hover { background: #fff; color: var(--ink); }
.btn--full { width: 100%; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--ink); }
.link--dark { color: #fff; border-color: var(--amber); }
.link--dark:hover { color: var(--amber); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- En-tête ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"]:not(.nav__cta) { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.nav .nav__cta { background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 999px; }
.nav .nav__cta:hover { background: var(--ink); color: #fff; }
.nav-toggle { display: none; background: #fff; border: 1px solid var(--line); color: var(--ink); font: 600 15px var(--font); padding: 10px 18px; border-radius: 999px; cursor: pointer; min-height: 44px; }

/* ---------- Hero d'accueil : planche annotée ---------- */
.hero { background: #fff; }
.hero__grid { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 56px; }
.hero__text { flex: 1.1 1 380px; min-width: 0; }
.hero h1 { font-size: clamp(42px, 4.5vw, 68px); line-height: .98; font-stretch: 120%; letter-spacing: -0.03em; }
.hero .lead { margin-top: 24px; }
.plate { flex: 1.2 1 480px; min-width: 0; position: relative; }
.plate img { width: 100%; height: auto; }
.plate figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }
.co { position: absolute; display: flex; align-items: center; gap: 8px; }
.co__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ink); margin-left: -6px; margin-top: 0; }
.co__line { width: 28px; height: 1px; background: var(--ink); }
.co__label { background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { opacity: 0; translate: 0 18px; animation: rise .9s var(--ease) forwards; }
  .hero__text > :nth-child(2) { animation-delay: .1s; }
  .hero__text > :nth-child(3) { animation-delay: .2s; }
  .hero__text > :nth-child(4) { animation-delay: .3s; }
  .plate > img { opacity: 0; scale: .96; animation: settle 1.2s .15s var(--ease) forwards; }
  /* les repères se posent un à un, comme sur une planche que l'on annote */
  .co { opacity: 0; translate: -8px 0; animation: rise-x .6s calc(1s + var(--d) * .18s) var(--ease) forwards; }
  .co__line { transform: scaleX(0); transform-origin: left; animation: draw .4s calc(1.15s + var(--d) * .18s) var(--ease) forwards; }
}
@keyframes rise { to { opacity: 1; translate: 0 0; } }
@keyframes rise-x { to { opacity: 1; translate: 0 0; } }
@keyframes settle { to { opacity: 1; scale: 1; } }
@keyframes draw { to { transform: scaleX(1); } }

/* Chiffres */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 2px solid var(--ink); }
.facts div { padding: 24px 24px 32px 0; }
.facts strong { display: block; font-size: 40px; font-weight: 800; font-stretch: 115%; letter-spacing: -0.02em; line-height: 1.2; }
.facts span { color: var(--muted); }

/* ---------- Bandeau des pages intérieures ---------- */
.page-hero { background: #fff; padding: 64px 0 72px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.page-hero__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 48px; }
.page-hero h1 { flex: 1 1 560px; font-size: clamp(40px, 4.6vw, 68px); line-height: .98; font-stretch: 120%; letter-spacing: -0.03em; }
.page-hero .lead { flex: 1 1 320px; max-width: 26em; font-size: 18px; }
.page-hero__img { margin-top: 32px; }
.page-hero__img img { width: 100%; max-height: 720px; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .page-hero h1, .page-hero .lead, .crumbs, .page-hero__img { opacity: 0; translate: 0 16px; animation: rise .9s var(--ease) forwards; }
  .page-hero h1 { animation-delay: .06s; }
  .page-hero .lead { animation-delay: .14s; }
  .page-hero__img { animation-delay: .22s; }
}

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section--white { background: #fff; }
.section--ink { background: var(--ink); color: #fff; }
.section--accent { background: var(--accent); color: #fff; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 48px; margin-bottom: 48px; }
.head .h2 { flex: 1 1 360px; }
.head p { flex: 1 1 360px; max-width: 34em; color: var(--muted); font-size: 18px; }
.section--ink .head p { color: var(--muted-dark); }

/* Apparition des images : un balayage, comme une passe d'outil */
@media (prefers-reduced-motion: no-preference) {
  .reveal { clip-path: inset(0 100% 0 0 round 20px); transition: clip-path 1.1s var(--ease); }
  .reveal.in { clip-path: inset(0 0 0 0 round 20px); }
}

/* Métiers */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: #fff; border-radius: 20px; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.tile:hover { color: var(--ink); transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(11, 20, 36, .45); }
.tile__media { aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: scale .8s var(--ease); }
.tile:hover .tile__media img { scale: 1.04; }
.tile__media--contain img { object-fit: contain; }
.tile__body { padding: 22px 24px 26px; }
.tile h3 { font-size: 24px; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.1; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 16px; }
.tile--accent { background: var(--accent); color: #fff; }
.tile--accent:hover { color: #fff; }
.tile--accent p { color: var(--accent-soft); }

/* Atelier */
.atelier { display: flex; flex-wrap: wrap; gap: 48px; align-items: stretch; }
.atelier__text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.atelier__text p { margin-top: 20px; color: var(--muted-dark); font-size: 18px; max-width: 28em; }
.atelier__text .link { align-self: flex-start; }
.mosaic { flex: 2 1 560px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 12px; }
.mosaic figure { border-radius: 16px; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .tall { grid-row: span 2; }
.mosaic .wide { grid-column: span 2; }

/* Références : deux rangées de noms qui défilent */
.refs { overflow: hidden; }
.marquee { display: flex; flex-direction: column; gap: 14px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__row { display: flex; gap: 14px; width: max-content; }
.marquee__row span { flex: none; padding: 16px 26px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); font-size: 18px; font-weight: 700; font-stretch: 108%; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__row[data-dir="left"] { animation: slide 90s linear infinite; }
  .marquee__row[data-dir="right"] { animation: slide 100s linear infinite reverse; }
  .marquee:hover .marquee__row { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .marquee__row { flex-wrap: wrap; width: auto; padding: 0 24px; } }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sites */
.sites { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.site { background: #fff; border-radius: 20px; padding: 28px; }
.site__role { color: var(--accent); font-weight: 600; font-size: 15px; }
.site h3 { margin: 6px 0 16px; font-size: 34px; font-stretch: 116%; }
.site p:not(.site__role) { color: var(--muted); }
.site p + p { margin-top: 14px; }
.site a { text-decoration: none; font-weight: 500; }
.site a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Appel à l'action */
.cta__inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; }
.cta__text { flex: 1 1 480px; min-width: 0; }
.cta h2 { font-size: clamp(36px, 4.6vw, 64px); font-stretch: 118%; letter-spacing: -0.025em; }
.cta p { margin-top: 18px; font-size: 18px; color: var(--accent-soft); max-width: 32em; }
.cta .actions { margin-top: 0; }

/* ---------- Services ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 64px; }
.jump a { text-decoration: none; color: var(--ink); padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.jump a:hover { border-color: var(--ink); }
.srow { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.srow:nth-of-type(even) .srow__img { order: 2; }
.srow__img { border-radius: 20px; overflow: hidden; aspect-ratio: 5 / 4; background: #fff; }
.srow__img img { width: 100%; height: 100%; object-fit: cover; }
.srow__img img.is-contain { object-fit: contain; }
.srow h2 { font-size: clamp(32px, 3.4vw, 46px); font-stretch: 116%; }
.srow__text > p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.srow .link { display: inline-block; margin-top: 28px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230B3AA8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Réducteurs ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: #fff; border-radius: 20px; padding: 32px; }
.card h2, .card h3 { font-size: 30px; font-stretch: 116%; letter-spacing: -0.01em; }
.card p { margin-top: 12px; color: var(--muted); }
.process { display: flex; flex-wrap: wrap; gap: 48px; }
.process__intro { flex: 1 1 340px; min-width: 0; }
.process__intro img { width: 100%; margin-top: 40px; border-radius: 20px; background: #fff; }
.steps { flex: 1.2 1 420px; min-width: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 24px; padding: 26px 0; border-top: 1px solid #2A3550; }
.steps li::before {
  content: counter(step); flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--amber); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.steps h3 { font-size: 24px; font-stretch: 112%; line-height: 1.2; }
.steps p { margin-top: 6px; color: var(--muted-dark); }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split .lead { margin-top: 18px; }
.video { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; cursor: pointer; background: #000; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: scale .6s var(--ease), opacity .3s; }
.video:hover img { scale: 1.03; opacity: 1; }
.video:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.video__play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); box-shadow: 0 0 0 10px rgba(255,255,255,.2); transition: transform .3s var(--ease), background-color .2s; }
.video:hover .video__play { transform: scale(1.08); background: var(--amber); }
.video__play svg { width: 34px; height: 34px; fill: currentColor; margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- Réalisations ---------- */
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 2px solid var(--ink); margin-bottom: 56px; }
.machines div { padding: 22px 20px 6px 0; }
.machines strong { display: block; font-size: 22px; font-stretch: 110%; }
.machines span { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 240px; grid-auto-flow: dense; gap: 14px; }
.g { position: relative; border-radius: 18px; overflow: hidden; background: #fff; }
.g--tall { grid-row: span 2; }
.g--wide { grid-column: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; }
.g figcaption { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }

/* ---------- Entreprise ---------- */
.team { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.team__img { flex: 1.1 1 420px; min-width: 0; border-radius: 20px; overflow: hidden; }
.team__img img { width: 100%; }
.team__text { flex: 1 1 380px; min-width: 0; }
.team__text p { margin-top: 18px; color: var(--muted); font-size: 18px; }
.clients { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 32px; }
.clients li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 700; font-stretch: 105%; }

/* ---------- Contact ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.form { flex: 1.1 1 440px; min-width: 0; background: #fff; border-radius: 20px; padding: 36px; }
.contact__info { flex: 1 1 340px; min-width: 0; }
.form h2, .contact__info h2 { font-size: 32px; font-stretch: 114%; margin-bottom: 24px; }
.contact__info .sites { grid-template-columns: 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--ground);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; width: 100%; min-height: 48px;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6B7385; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 58, 168, .18); background: #fff; }
.field [aria-invalid="true"] { border-color: #B42318; }
.form__error { color: #B42318; font-weight: 600; margin-bottom: 14px; }
.form__note { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: var(--muted-dark); padding: 64px 0 28px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #2A3550; }
.footer__brand img { height: 40px; width: auto; }
.footer__brand p { margin-top: 16px; max-width: 26em; }
.footer__nav { display: flex; flex-direction: column; gap: 10px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--amber); }
.footer__contact p + p { margin-top: 8px; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-top: 24px; font-size: 14px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 900px) {
  .srow { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .srow:nth-of-type(even) .srow__img { order: 0; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 8px 16px 20px; border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"]:not(.nav__cta) { box-shadow: none; }
  .nav .nav__cta { margin-top: 14px; text-align: center; border: 0; }
  .hero__grid { padding-top: 40px; gap: 32px; }
  .co__label { font-size: 11px; padding: 3px 8px; }
  .co__line { width: 14px; }
  .plate figcaption { margin-top: 30px; }
  .facts strong { font-size: 30px; }
  .facts div { padding: 18px 12px 22px 0; }
  .section { padding: 72px 0; }
  .page-hero { padding: 40px 0 48px; }
  .mosaic { grid-auto-rows: 140px; gap: 8px; }
  .gallery { grid-auto-rows: 150px; gap: 10px; }
  .g figcaption { display: none; }
  .form { padding: 24px 18px; }
}
