:root {
  --navy: #0d1420;
  --navy-2: #161f2e;
  --navy-3: #1f2b3d;
  --accent: #ff6a2b;
  --accent-dark: #e2551a;
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --ink: #201c18;
  --ink-soft: #5a564e;
  --line: #e4e0d6;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 50px -20px rgba(13, 20, 32, 0.35);
  --maxw: 1180px;
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 88px 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 12px 24px -10px rgba(255, 106, 43, 0.55);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.7); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--navy); }
.btn-block { width: 100%; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 20, 32, 0.92);
  backdrop-filter: blur(10px);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--white);
  text-decoration: none;
}
.brand-name { display: block; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--white); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 6px;
}

/* Ribbon */
.ribbon {
  display: block;
  text-align: center;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 0;
  text-decoration: none;
}
.ribbon:hover { filter: brightness(1.05); }

/* Hero — bandeau photo + bloc de texte séparés.
   Le texte n'est plus à l'intérieur de la photo : ainsi la hauteur de la
   photo (donc son cadrage/zoom) ne dépend jamais de la quantité de texte —
   les deux problèmes rencontrés (photo trop zoomée, puis texte coupé)
   venaient tous les deux du fait que l'un contraignait l'autre. */
.hero-photo {
  position: relative;
  /* width:100% explicite : sans ça, la combinaison aspect-ratio + max-height
     fait rétrécir la largeur de la section (au lieu de juste rogner la
     hauteur) dès que max-height entre en jeu — bug CSS classique. */
  width: 100%;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  max-height: 520px;
  background-size: cover;
  background-position: center 55%;
  overflow: hidden;
}
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 13, 20, 0.1) 0%, rgba(9, 13, 20, 0.35) 60%, rgba(9, 13, 20, 0.92) 100%);
}
.hero-content {
  position: relative;
  /* Le texte remonte sur la photo (transparent) puis se poursuit sur un fond
     bleu marine uni au-delà — ainsi il visualise "sur" la photo sans jamais
     dépendre de sa hauteur (la photo garde son propre ratio, fixe). */
  margin-top: -260px;
  padding: 40px 0 60px;
  background: linear-gradient(180deg, transparent 0, transparent 260px, var(--navy) 260px, var(--navy) 100%);
}
.hero-content-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d07f;
  box-shadow: 0 0 0 3px rgba(53, 208, 127, 0.25);
}
.hero-content h1 {
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
  max-width: 16ch;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero-photo-lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16.5px;
  max-width: 44ch;
  margin-bottom: 0;
}
.protect-card {
  background: var(--navy-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 26px;
}
.protect-card h3 {
  color: var(--white);
  font-size: 16px;
  text-align: center;
  margin-bottom: 18px;
}
.protect-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  margin-bottom: 12px;
  transition: transform 0.15s ease;
}
.protect-pill:last-child { margin-bottom: 0; }
.protect-pill:hover { transform: translateY(-1px); }
.protect-pill.filled { background: var(--accent); color: var(--white); }
.protect-pill.filled:hover { background: var(--accent-dark); }
.protect-pill.outline { background: rgba(255, 255, 255, 0.06); color: var(--white); border: 1.5px solid rgba(255, 255, 255, 0.3); }

/* Edge tab */
.edge-tab {
  position: fixed;
  top: 46%;
  right: 0;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 10px;
  border-radius: 10px 0 0 10px;
  z-index: 90;
  box-shadow: -6px 0 18px -8px rgba(13, 20, 32, 0.4);
}
.edge-tab:hover { background: var(--accent-dark); }

/* Value strip */
.value-strip { background: var(--navy-3); padding: 30px 0; }
.value-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.value-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 500;
}
.value-item svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

/* Cards grid: approach */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.approach-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.approach-card .num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 14px;
}
.approach-card h3 { font-size: 17px; }
.approach-card p { font-size: 14.5px; margin: 0; }

/* Services */
.services { background: var(--paper-2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.service-card-top {
  background: var(--navy);
  padding: 30px 26px;
  color: var(--white);
  position: relative;
}
.service-card.featured .service-card-top { background: linear-gradient(155deg, var(--accent-dark), var(--accent)); }
.service-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  padding: 5px 10px;
  border-radius: 999px;
}
.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card-top h3 { color: var(--white); font-size: 21px; margin-bottom: 6px; }
.service-card-top p { color: rgba(255, 255, 255, 0.72); font-size: 14px; margin: 0; }
.service-card-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.service-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  flex: 1;
}
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 7px 0;
}
.service-list svg { width: 17px; height: 17px; color: var(--accent-dark); flex-shrink: 0; margin-top: 2px; }

/* Steps */
.steps { counter-reset: step; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.step {
  position: relative;
  padding: 0 20px 0 0;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 44px;
  right: -20px;
  height: 1.5px;
  background: var(--line);
}
.step h3 { font-size: 16.5px; }
.step p { font-size: 14px; margin: 0; }

/* FAQ */
.faq { background: var(--paper-2); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.2s ease; color: var(--accent-dark); }
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 22px;
}
.faq-item.open .faq-a { max-height: 240px; padding: 0 22px 20px; }
.faq-a p { font-size: 14.5px; margin: 0; }

/* Contact */
.contact { background: var(--navy); color: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
.contact-info h2 { color: var(--white); }
.contact-info p { color: rgba(255, 255, 255, 0.68); }
.contact-points { list-style: none; margin: 28px 0 0; padding: 0; }
.contact-points li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.contact-points li:first-child { border-top: none; }
.contact-points svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.contact-points strong { color: var(--white); display: block; font-size: 14.5px; margin-bottom: 2px; }
.contact-points span { color: rgba(255, 255, 255, 0.6); font-size: 13.5px; }

/* Pages de devis dédiées par profil (maison / appartement / entreprise) */
.form-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}
.back-link-top {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 24px;
}
.back-link-top:hover { color: var(--ink); }
.form-page .lead { margin-bottom: 28px; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.contact-form h3 { font-size: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-family: var(--font-body);
  font-size: 14.5px;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-consent { display: flex; align-items: flex-start; gap: 10px; }
.field-consent input { width: auto; margin-top: 3px; }
.field-consent label { font-size: 12.5px; color: var(--ink-soft); font-weight: 400; }
.form-note { font-size: 12px; color: var(--ink-soft); margin-top: 12px; text-align: center; }
.form-feedback { font-size: 14px; font-weight: 600; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; display: none; }
.form-feedback.show { display: block; }
.form-feedback.ok { background: #e8f7ee; color: #1c7a43; }
.form-feedback.error { background: #fdecea; color: #c62828; }
.hide-field { position: absolute; left: -9999px; }

/* Footer */
footer { background: #0a0f18; color: rgba(255, 255, 255, 0.55); padding: 56px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand p { color: rgba(255, 255, 255, 0.5); font-size: 13.5px; max-width: 32ch; }
.footer-col h4 {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.55); text-decoration: none; font-size: 13.5px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 12.5px;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-photo { aspect-ratio: 16 / 9; min-height: 280px; max-height: 420px; }
  .hero-content {
    margin-top: -190px;
    padding-top: 36px;
    background: linear-gradient(180deg, transparent 0, transparent 190px, var(--navy) 190px, var(--navy) 100%);
  }
  .hero-content h1 { max-width: none; }
  .hero-content-inner { grid-template-columns: 1fr; }
  .protect-card { max-width: 360px; }
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .step:nth-child(2)::after { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .value-strip .container { grid-template-columns: repeat(2, 1fr); row-gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 60px 0; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .brand small { display: none; }
  .brand { font-size: 16px; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-photo { aspect-ratio: 4 / 3; min-height: 240px; max-height: 360px; }
  .hero-content {
    margin-top: -150px;
    padding-top: 28px;
    background: linear-gradient(180deg, transparent 0, transparent 150px, var(--navy) 150px, var(--navy) 100%);
  }
  .protect-card { max-width: none; }
  .edge-tab { display: none; }
  .approach-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--navy);
  z-index: 99;
  padding: 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-nav .btn { margin-top: 24px; }
