/* J.A.I — Julien Hartmann Automatisme Industriel */
:root {
  --navy: #1E3350;
  --navy-2: #2E4A6B;
  --navy-3: #3D5A7E;
  --cream: #FBF7F1;
  --sand: #F3EEE6;
  --sky: #F6E3CF;
  --ink: #1E2B3C;
  --ink-2: #3A4658;
  --muted: #4A5566;
  --accent: #C4531F;
  --accent-dark: #9E4015;
  --accent-soft: #FBE4D6;
  --accent-light: #F4A06F;
  --radius-lg: 24px;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(30, 51, 80, 0.07);
  --pad: clamp(20px, 6vw, 100px);
  --f-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --f-logo: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 10px 16px; }

/* Logo */
.brand-mark { height: 52px; width: 52px; filter: drop-shadow(0 2px 6px rgba(30, 51, 80, 0.18)); }

/* En-tête */
.site-header { position: relative; z-index: 3; }
.site-header .wrap { height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 19px; }
.brand-sub { font-size: 14px; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 32px; font-weight: 600; font-size: 17px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-weight: 700; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; white-space: nowrap;
  font-family: inherit;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.nav .btn { min-height: 46px; padding: 0 22px; color: #fff; }
.header-actions { display: none; gap: 10px; }
.round-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.round-btn.call { background: var(--cream); }
.round-btn.menu { background: var(--navy); }

/* Accueil */
.hero { position: relative; background: var(--sky); overflow: hidden; }
.hero-mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(160px, 21vw, 400px); }
.hero-body { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 40px; padding-top: 56px; padding-bottom: clamp(130px, 18vw, 350px); }
.hero-text { max-width: 640px; display: flex; flex-direction: column; gap: 24px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px; background: var(--cream);
  font-weight: 600; font-size: 15px; color: var(--navy);
}
.hero h1 { font-weight: 800; font-size: clamp(40px, 5.2vw, 70px); line-height: 1.03; letter-spacing: -0.02em; }
.hero-lead { font-size: clamp(17px, 1.6vw, 21px); color: #2F3B4C; max-width: 600px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-logo { flex-shrink: 0; width: clamp(300px, 32vw, 460px); height: auto; align-self: flex-start; margin-top: 8px; }

/* Chiffres */
.facts {
  position: relative; z-index: 2; margin-top: -60px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 18px 40px rgba(30, 51, 80, 0.12);
  padding: 34px 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
}
.fact strong { display: block; font-family: var(--f-display); font-weight: 800; font-size: clamp(22px, 2vw, 30px); color: var(--navy); line-height: 1.2; }
.fact span { color: var(--muted); font-size: 16px; line-height: 1.4; display: block; }

/* Sections */
.section { padding-top: clamp(64px, 9vw, 130px); }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: clamp(24px, 3.5vw, 48px); }
.section-head.split { max-width: none; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 60px; }
.section-head.split p { max-width: 440px; color: var(--ink-2); }
.kicker { font-weight: 700; color: var(--accent); font-size: 16px; letter-spacing: 0.02em; }
.section h2 { font-weight: 800; font-size: clamp(32px, 3.8vw, 52px); line-height: 1.06; }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.service { border-radius: var(--radius-lg); padding: clamp(26px, 3.5vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.service.light { background: #fff; box-shadow: var(--shadow); }
.service.dark { background: var(--navy); color: var(--cream); }
.service.dark p { color: #D3DBE6; }
.service h3 { font-weight: 700; font-size: clamp(26px, 2.4vw, 32px); }
.service p { color: var(--ink-2); }
.icon-box { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.light .icon-box { background: var(--accent-soft); }
.dark .icon-box { background: var(--navy-2); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 7px 16px; border-radius: 999px; background: var(--sand); font-weight: 600; font-size: 15px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; counter-reset: step; }
.steps li { padding: 7px 16px; border-radius: 999px; background: var(--navy-2); display: flex; gap: 10px; counter-increment: step; }
.steps li::before { content: counter(step); color: var(--accent-light); }

/* Secteurs */
.sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
.sectors li { background: #fff; border-radius: 20px; padding: 24px; display: flex; align-items: center; gap: 14px; font-weight: 700; line-height: 1.3; }
.sectors svg { flex-shrink: 0; }
.sub-title { font-weight: 800; font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 28px; }

/* Terrain */
.mosaic { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: 290px 290px 400px; gap: 20px; }
.mosaic figure { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .big { grid-column: span 3; grid-row: span 2; }
.mosaic .small { grid-column: span 2; }
.mosaic .wide { grid-column: span 5; }
.mosaic figcaption {
  position: absolute; left: 18px; bottom: 18px; padding: 7px 16px; border-radius: 999px;
  background: var(--cream); font-weight: 700; font-size: 15px; color: var(--ink);
}

/* Réalisations */
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.ref { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.ref img, .ref .ref-visual { width: 100%; height: 280px; object-fit: cover; }
.ref-body { padding: 32px 36px 38px; display: flex; flex-direction: column; gap: 12px; }
.ref-meta { font-weight: 700; font-size: 14px; color: var(--muted); letter-spacing: 0.03em; }
.ref h3 { font-weight: 700; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; }
.ref p { color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 5px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-size: 14px; }
.ref.wide { grid-column: span 2; flex-direction: row; }
.ref.wide img { width: 44%; height: auto; min-height: 340px; flex-shrink: 0; }
.ref.wide .ref-body { justify-content: center; }
.ref-visual { background: var(--navy); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ref-visual .bg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }

/* Qui suis-je */
.about { display: flex; gap: clamp(40px, 6vw, 80px); align-items: center; padding-bottom: clamp(64px, 9vw, 130px); }
.about-visual { position: relative; width: min(360px, 100%); flex-shrink: 0; aspect-ratio: 1020 / 780; }
.about-visual .back { position: absolute; inset: 20px -20px -20px 20px; border-radius: 24px; background: var(--accent-soft); }
.about-visual .front { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 24px; }
.about-text { display: flex; flex-direction: column; gap: 22px; }
.about-text p { font-size: clamp(17px, 1.5vw, 20px); color: #2F3B4C; }
.values { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 6px 0 0; padding: 0; }
.values li { padding: 9px 18px; border-radius: 999px; background: #fff; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.values li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Contact */
.contact { margin: 0 clamp(12px, 3vw, 40px) clamp(12px, 3vw, 40px); border-radius: 32px; background: var(--navy); color: var(--cream); }
.contact .wrap { padding-top: clamp(48px, 7vw, 100px); }
.contact-grid { display: flex; gap: clamp(28px, 6vw, 80px); }
.contact-info { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; gap: 22px; }
.contact h2 { font-weight: 800; font-size: clamp(32px, 3.8vw, 52px); line-height: 1.06; }
.contact-info > p { color: #D3DBE6; font-size: clamp(17px, 1.5vw, 20px); }
.contact-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-links a {
  display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-radius: var(--radius);
  background: var(--navy-2); color: var(--cream); text-decoration: none; font-weight: 600; overflow-wrap: anywhere;
}
.contact-links a:hover { background: var(--navy-3); color: #fff; }
.contact-links svg { flex-shrink: 0; }
.form {
  flex-grow: 1; background: var(--cream); color: var(--ink); border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; align-content: start;
}
.form label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 15px; }
.form .full { grid-column: span 2; }
.form input, .form textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid #CFC5B6;
  background: #fff; font-size: 16px; font-family: inherit; color: var(--ink);
}
.form textarea { resize: vertical; min-height: 140px; }
.form input:focus, .form textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.form .hp { display: none; }
.form-foot { grid-column: span 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.form-foot small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.site-footer { margin-top: clamp(48px, 6vw, 80px); padding: 28px 0; border-top: 1px solid var(--navy-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; font-size: 15px; color: #B7C3D3; }
.site-footer a { color: #B7C3D3; }

/* Page mentions légales */
.legal-top { background: var(--sky); }
.legal { max-width: 780px; padding-top: 40px; padding-bottom: 80px; }
.legal h1 { font-weight: 800; font-size: clamp(34px, 4vw, 48px); margin-bottom: 28px; }
.legal h2 { font-weight: 700; font-size: 24px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; margin: 8px 0 0; }
.back-link { display: inline-block; margin-top: 40px; font-weight: 700; }

/* Écrans d'ordinateur peu hauts : garder les montagnes visibles */
@media (min-width: 801px) and (max-height: 860px) {
  .site-header .wrap { height: 80px; }
  .hero-body { padding-top: 20px; }
  .hero-text { gap: 18px; }
  .hero h1 { font-size: clamp(36px, 4vw, 56px); }
  .hero-lead { font-size: 18px; }
  .hero-logo { width: clamp(260px, 27vw, 390px); }
}

/* Tablette */
@media (max-width: 1080px) {
  .hero-logo { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { flex-direction: column; }
  .contact-info { width: auto; }
}

/* Mobile */
@media (max-width: 800px) {
  body { font-size: 17px; }
  .site-header .wrap { height: 72px; }
  .brand-text { display: none; }
  .brand-mark { height: 44px; width: 44px; }
  .header-actions { display: flex; }
  .nav {
    display: none; position: absolute; top: 72px; left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 14px;
    background: #fff; border-radius: 20px; box-shadow: 0 18px 40px rgba(30, 51, 80, 0.18);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .nav a:hover { background: var(--sand); }
  .nav .btn { margin-top: 6px; }
  .hero-body { padding-top: 20px; padding-bottom: 240px; }
  .hero-mountains { height: 250px; }
  .hero-cta .btn { width: 100%; }
  .facts { margin: -28px 16px 0; padding: 22px; gap: 20px 16px; }
  .fact span { font-size: 14px; }
  .section-head.split { flex-direction: column; align-items: flex-start; gap: 12px; }
  .services, .refs { grid-template-columns: minmax(0, 1fr); }
  .service .steps { flex-direction: column; align-items: stretch; }
  .sectors { gap: 10px; }
  .sectors li { padding: 14px; font-size: 15px; gap: 10px; border-radius: 14px; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 240px 160px 220px; gap: 12px; }
  .mosaic .big { grid-column: span 2; grid-row: auto; }
  .mosaic .small { grid-column: span 1; }
  .mosaic .wide { grid-column: span 2; }
  .mosaic figcaption { left: 10px; bottom: 10px; font-size: 13px; padding: 5px 12px; }
  .ref img, .ref .ref-visual { height: 200px; }
  .ref-body { padding: 22px; }
  .ref.wide { grid-column: auto; flex-direction: column; }
  .ref.wide img { width: 100%; min-height: 0; height: 200px; }
  .about { flex-direction: column; align-items: stretch; }
  .about-visual { width: min(340px, 100%); align-self: center; }
  .about-visual .back { display: none; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .form .full, .form-foot { grid-column: auto; }
  .form-foot { flex-direction: column; align-items: stretch; }
  .site-footer { flex-direction: column; }
}
