/* ===== Variables (à ajuster pour coller à la charte d'origine) ===== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1f2937;
  --text-muted: #5b6573;
  --heading: #0f1b2d;
  --accent: #1d4ed8;
  --accent-dark: #1638a8;
  --border: #e3e7ee;
  --radius: 10px;
  --header-h: 72px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
ul { padding-left: 1.2em; }
strong { color: var(--heading); font-weight: 650; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 750; letter-spacing: -.02em; }
h2.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); text-align: center; margin-bottom: 1.4em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.4rem; font-weight: 600; }

/* ===== Boutons ===== */
.btn {
  display: inline-block;
  padding: .75em 1.5em;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: background .2s, color .2s, transform .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 2px;
}

/* ===== En-tête ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--heading); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }

.main-nav { display: flex; align-items: center; gap: 24px; }
.nav-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav-list a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-actions .btn { padding: .55em 1.2em; }
.icon-link { color: var(--heading); display: inline-flex; transition: color .2s; }
.icon-link:hover { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { padding: 72px 0 80px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-text p { color: var(--text-muted); font-size: 1.1rem; }
.hero-text .btn { margin-top: .8em; }
.hero-media { display: flex; justify-content: center; }
.hero-media img { width: 100%; max-width: 440px; height: auto; object-fit: contain; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.services { background: var(--bg-alt); }

/* ===== Services ===== */
.service { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 72px; }
.service:last-child { margin-bottom: 0; }
.service-reverse .service-media { order: 2; }
.service-media picture { display: block; }
.service-media img { width: 100%; height: auto; border-radius: 16px; background: #fff; box-shadow: 0 6px 24px rgba(15, 27, 45, .10); }
.service-text ul { color: var(--text-muted); }
.service-text li { margin-bottom: .5em; }

/* ===== Méthodes ===== */
.methods-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.methods-intro p { color: var(--text-muted); }
.methods-intro .btn { margin-top: .6em; }

.accordion { border-top: 1px solid var(--border); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion summary {
  list-style: none; cursor: pointer;
  padding: 1.1em 2.2em 1.1em 0;
  font-weight: 600; font-size: 1.1rem; color: var(--heading);
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .25s;
}
.accordion details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.accordion-body { padding: 0 0 1.2em; color: var(--text-muted); }
.accordion-body p { margin: 0; }

/* ===== Références ===== */
.logos { background: var(--bg-alt); }
.logos-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 32px; }
.logos-grid:empty { display: none; }
.logos-grid li { flex: 0 0 calc((100% - 96px) / 4); max-width: 200px; aspect-ratio: 1 / 1; }
.logos-grid a {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 12px;
  background: #fff; border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s;
}
.logos-grid a:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 27, 45, .12); }
.logos-grid img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

@media (max-width: 767px) {
  .logos-grid { gap: 16px; }
  .logos-grid li { flex-basis: calc((100% - 16px) / 2); max-width: 170px; }
}

/* ===== Contact ===== */
.contact-inner { max-width: 680px; }
.contact-form .field { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--heading); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .8em 1em;
  font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.contact-form .invalid { border-color: #c2410c; }
.contact-form textarea { resize: vertical; }
.form-status { margin: 16px 0 0; font-weight: 500; }
.form-status.ok { color: #15803d; }
.form-status.error { color: #c2410c; }

/* ===== Pied de page ===== */
.site-footer { background: var(--heading); color: #cbd5e1; padding: 48px 0 32px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.site-footer .brand, .site-footer .icon-link { color: #fff; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.copyright { margin: 8px 0 0; font-size: .9rem; opacity: .8; }

/* ===== Responsive ===== */
@media (max-width: 1040px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 24px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav-actions { margin-top: 16px; justify-content: space-between; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .hero { padding: 40px 0 56px; }
  .hero-inner, .service, .methods-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; }
  .service-reverse .service-media { order: 0; }
  .section { padding: 64px 0; }
  .service { margin-bottom: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
