/* ==========================================================================
   R2C Génie Climatique — Feuille de style
   ========================================================================== */

/* Polices hébergées localement (aucun appel à Google : conforme RGPD).
   Inter et Montserrat — licence SIL Open Font License 1.1 */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0b4aa8;
  --blue-dark: #062f6e;
  --blue-deep: #041d45;
  --blue-light: #e8f1fc;
  --red: #e63b35;
  --red-dark: #c42a25;
  --ink: #14213d;
  --text: #3b4a63;
  --muted: #6b7a93;
  --line: #dfe6ef;
  --bg-soft: #f4f7fb;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(10, 35, 80, .10);
  --container: 1200px;
  --header-h: 84px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Montserrat", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.015em; margin-top: .35em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(230, 59, 53, .3); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--blue-dark); }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--blue);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); }

/* En-tête : transparent sur la bannière, blanc au scroll */
.header {
  position: sticky; top: 0; z-index: 100;
  background: transparent; border-bottom: 1px solid rgba(255,255,255,.12);
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.header.scrolled, .header.menu-open {
  background: #fff; border-bottom-color: var(--line); box-shadow: 0 2px 12px rgba(10, 35, 80, .08);
}
.header > .container { display: flex; align-items: center; height: var(--header-h); gap: 32px; }
.logo { position: relative; }
.logo img { height: 58px; width: auto; transition: opacity .3s; }
.logo .logo-color { position: absolute; inset: 0; opacity: 0; }
.header.scrolled .logo-white, .header.menu-open .logo-white { opacity: 0; }
.header.scrolled .logo-color, .header.menu-open .logo-color { opacity: 1; }
.nav { flex: 1; height: 100%; }
.nav ul { display: flex; justify-content: center; height: 100%; gap: 8px; }
.nav li { display: flex; }
.nav-link {
  display: flex; align-items: center; height: 100%; padding: 0 16px;
  font-weight: 600; font-size: .95rem; color: #fff; position: relative; transition: color .3s;
}
.header.scrolled .nav-link { color: var(--ink); }
.nav-link::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px;
  background: var(--red); transform: scaleX(0); transition: transform .25s;
}
.nav-link:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.header-phone { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: .98rem; line-height: 1.2; transition: color .3s; }
.header-phone small { display: block; color: #9cc7f5; font-weight: 500; font-size: .74rem; transition: color .3s; }
.hp-icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; transition: background .3s, color .3s; }
.header.scrolled .header-phone { color: var(--ink); }
.header.scrolled .header-phone small { color: var(--muted); }
.header.scrolled .hp-icon { background: var(--blue-light); color: var(--blue); }
.header-phone:hover .hp-icon { background: var(--red); color: #fff; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff;
  transition: background .3s, color .3s, border-color .3s;
}
.header.scrolled .icon-btn, .header.menu-open .icon-btn { border-color: var(--line); background: #fff; color: var(--ink); }
.burger, .call-btn { display: none; }

/* Hero */
.hero {
  color: #fff; overflow: hidden;
  background: radial-gradient(1100px 600px at 80% 40%, #1f6fd1 0%, transparent 60%), linear-gradient(120deg, var(--blue-deep) 0%, var(--blue) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; min-height: 520px; }
/* le header fait --header-h + 1px de bordure : on remonte la bannière d'autant */
.hero { margin-top: calc(-1 * var(--header-h) - 1px); padding: calc(61px + var(--header-h)) 0 60px; }
.hero .eyebrow { color: #9cc7f5; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; margin: .4em 0 .45em; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: #7fc0ff; }
.lead { font-size: 1.15rem; color: #d3def0; max-width: 520px; margin-bottom: 2em; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual svg { width: 100%; max-width: 520px; margin: 0 auto; filter: drop-shadow(0 30px 50px rgba(0,0,0,.35)); }
.airflow path { stroke-dasharray: 8 14; animation: flow 2.2s linear infinite; }
.airflow path:nth-child(2) { animation-delay: -.6s; }
.airflow path:nth-child(3) { animation-delay: -1.2s; }
@keyframes flow { to { stroke-dashoffset: -88; } }
.float { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }

/* Sections */
.section { padding: 100px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 52px; }

/* Solutions */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product-media { background: linear-gradient(160deg, #f4f8fd 0%, #e3edf9 100%); aspect-ratio: 4 / 3; padding: 26px; }
.product-media svg { width: 100%; height: 100%; }
.product-body { padding: 22px; }
.product-cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); font-weight: 700; }
.product-body h3 { font-size: 1.12rem; margin: .4em 0 .5em; }
.product-body p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service {
  padding: 32px 26px; border-radius: var(--radius); border: 1px solid var(--line);
  border-top: 4px solid var(--blue); transition: border-color .3s, box-shadow .3s;
}
.service:hover { border-top-color: var(--red); box-shadow: var(--shadow); }
.si { width: 56px; height: 56px; border-radius: 14px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; margin-bottom: 20px; }
.si .icon { width: 28px; height: 28px; }
.service h3 { font-size: 1.15rem; }
.service p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Zone d'intervention */
.zone { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.zone-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin: 24px 0 10px; }
.zone-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zone-list li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .94rem;
}
.zone-list .icon { color: var(--red); }
.zone-list span { margin-left: auto; color: var(--blue); background: var(--blue-light); font-size: .78rem; padding: 2px 8px; border-radius: 6px; }
.zone-note { color: var(--muted); font-size: .92rem; margin: 24px 0 0; }
.zone-note a { color: var(--blue); font-weight: 600; }
.zone-map { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.zone-map svg { width: 100%; height: auto; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: start; }
.contact-list { display: grid; gap: 18px; margin-top: 30px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.ci { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.contact-list strong { display: block; color: var(--ink); }
.contact-list span, .contact-list a { color: var(--muted); font-size: .95rem; }
.contact-list a:hover { color: var(--blue); }
.form { background: #fff; border-radius: 20px; padding: 40px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.full { grid-column: 1 / -1; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; margin-bottom: 8px; }
.form input, .form textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: .95rem; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11,74,168,.12); }
.form .invalid { border-color: var(--red); }
.form-success { display: none; text-align: center; padding: 40px 10px; }
.ok { width: 72px; height: 72px; border-radius: 50%; background: #e3f6ea; color: #1e9e57; display: grid; place-items: center; margin: 0 auto 18px; }
.ok .icon { width: 36px; height: 36px; stroke-width: 2.4; }
.form.sent .form-fields { display: none; }
.form.sent .form-success { display: block; }

/* Footer */
.footer { background: var(--blue-deep); color: #a9bad6; font-size: .92rem; padding-top: 64px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 48px; margin-bottom: 48px; }
.footer-brand img { height: 56px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 320px; margin: 0; }
.footer h4 { font-family: var(--font-title); color: #fff; font-size: 1rem; margin: 0 0 18px; }
.footer ul { display: grid; gap: 10px; }
.footer a { transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { color: var(--red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-cta { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.footer-cta .icon { transition: transform .2s; }
.footer-cta:hover .icon { transform: translateX(4px); }

.footer-legal { display: flex; gap: 20px; }
.footer-simple { padding-top: 0; }

/* Mention RGPD du formulaire */
.form-notice { font-size: .82rem; color: var(--muted); margin: 0 0 20px; }
.form-notice a { color: var(--blue); font-weight: 600; }
.form-error { font-size: .88rem; color: var(--red-dark); background: #fdecea; border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.form-error[hidden] { display: none; }
.botcheck { display: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.form .btn:disabled { opacity: .7; cursor: wait; transform: none; }

/* Page 404 */
.not-found { padding: 96px 0 120px; min-height: 60vh; }
.not-found h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: .4em 0 .3em; }
.not-found p { font-size: 1.1rem; margin-bottom: 2em; }

/* Page mentions légales */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: .3em; }
.legal section + section { padding-top: 32px; border-top: 1px solid var(--line); margin-top: 40px; }
.legal h2 { font-size: 1.6rem; margin-top: 0; }
.legal h3 { font-size: 1.05rem; margin: 1.6em 0 .5em; }
.back-link { display: inline-block; margin-top: 40px; color: var(--blue); font-weight: 600; }

/* Responsive */
@media (max-width: 1100px) {
  .header-phone { display: none; }
}

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .products, .services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .logo img { height: 46px; }
  .burger { display: grid; }
  .call-btn { display: grid; background: var(--red); border-color: var(--red); color: #fff; }
  .header.scrolled .call-btn, .header.menu-open .call-btn { background: var(--red); border-color: var(--red); color: #fff; }
  .header-actions { gap: 10px; }
  .header-actions .btn { display: none; }
  .header-actions .btn-back { display: inline-flex; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; height: auto; background: #fff;
    clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .35s ease, visibility .35s;
  }
  .nav.open { clip-path: inset(0); visibility: visible; }
  .nav ul { flex-direction: column; height: auto; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; padding: 18px 24px; font-size: 1.05rem; color: var(--ink); }
  .nav-link::after { display: none; }

  .hero-inner, .zone, .contact { grid-template-columns: 1fr; }
  .hero-inner { min-height: 0; }
  .hero-visual { display: none; }
  .zone { gap: 40px; }
  .section { padding: 72px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }

  /* Bannière : boutons pleine largeur */
  .hero { padding-bottom: 48px; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { justify-content: center; }

  /* Solutions : cartes horizontales compactes */
  .products { grid-template-columns: 1fr; gap: 12px; }
  .product { display: flex; align-items: center; }
  .product:hover { transform: none; }
  .product-media { flex: 0 0 104px; aspect-ratio: 1; padding: 12px; align-self: stretch; }
  .product-body { padding: 14px 16px; }
  .product-body h3 { font-size: 1rem; margin: .2em 0 .3em; }
  .product-body p { font-size: .85rem; line-height: 1.5; }

  /* Services : icône à gauche */
  .services { grid-template-columns: 1fr; gap: 12px; }
  .service { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 18px; border-top-width: 1px; border-left: 4px solid var(--blue); }
  .service .si { width: 48px; height: 48px; margin: 0; grid-row: span 2; }
  .service .si .icon { width: 24px; height: 24px; }
  .service h3 { font-size: 1rem; margin: 0 0 .2em; align-self: end; }
  .service p { font-size: .85rem; line-height: 1.5; }

  /* Zone : deux colonnes compactes */
  .zone-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .zone-group h3 { margin-top: 18px; }
  .zone-list li { padding: 10px; font-size: .82rem; gap: 6px; line-height: 1.25; }
  .zone-list .icon { width: 1em; height: 1em; }
  .zone-list span { font-size: .72rem; padding: 1px 6px; }

  /* Contact */
  .contact { gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form { padding: 24px 18px; }
  .form .btn { width: 100%; justify-content: center; }

  /* Footer : la navigation fait doublon avec le menu burger */
  .footer-nav { display: none; }
  .footer { padding-top: 48px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
  .footer-bottom .container { flex-direction: column; text-align: center; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
.form-success a { color: var(--blue); font-weight: 600; }
