/* ============================================================
 * Style D shared — CSS commun aux pages Direction D
 * Utilisé par : diagnostic.html, configurateur.html, resultats.html
 * (index.html garde son CSS inline, autonome)
 * ============================================================ */

:root {
  --obsidian: #0B0C0A;
  --charcoal: #181A15;
  --stone:    #636358;
  --mist:     #BABCAF;
  --ivory:    #F2F1EB;
  --ivory-2:  #E8E6DC;
  --lime:     #6FA832;
  --forest:   #1E3D14;
  --text:     #1A1A14;
  --hairline: rgba(11,12,10,0.10);
  --hairline-dark: rgba(255,255,255,0.10);
  --font-display: 'Lora', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-amp:     'Ubuntu', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ── Logo ── */
.tlogo-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1; }
.tlogo { display: inline-flex; align-items: baseline; line-height: 1; font-size: 22px; font-family: var(--font-display); }
.tlogo-name, .tlogo-co { font-weight: 400; letter-spacing: -0.01em; }
.tlogo-amp { font-family: var(--font-amp); margin: 0 0.22em; }
.tlogo-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  margin-left: 1px;
}
.t-dark .tlogo-name, .t-dark .tlogo-co { color: var(--ivory); }
.t-dark .tlogo-amp { color: var(--lime); }
.t-dark .tlogo-sub { color: rgba(242,241,235,0.42); }
.t-light .tlogo-name, .t-light .tlogo-co { color: var(--text); }
.t-light .tlogo-amp { color: var(--forest); }
.t-light .tlogo-sub { color: var(--stone); }

/* ── Nav ── */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 56px;
  z-index: 50;
}
.nav.is-sticky {
  position: sticky; top: 0;
  background: rgba(242,241,235,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav.is-overlay {
  position: absolute; top: 0; left: 0; right: 0;
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links > a, .nav-links > .nav-dropdown > button {
  font-size: 13px; letter-spacing: 0.02em;
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 200ms ease;
}
.nav.is-sticky .nav-links > a,
.nav.is-sticky .nav-links > .nav-dropdown > button { color: var(--stone); }
.nav.is-sticky .nav-links > a:hover,
.nav.is-sticky .nav-links > a.active,
.nav.is-sticky .nav-links > .nav-dropdown > button:hover { color: var(--text); }
.nav.is-overlay .nav-links > a,
.nav.is-overlay .nav-links > .nav-dropdown > button { color: rgba(242,241,235,0.7); }
.nav.is-overlay .nav-links > a:hover,
.nav.is-overlay .nav-links > a.active,
.nav.is-overlay .nav-links > .nav-dropdown > button:hover { color: var(--ivory); }
.nav-dropdown { position: relative; }
.nav-dropdown > button svg { transition: transform 200ms ease; }
.nav-dropdown.is-open > button svg { transform: rotate(180deg); }
.nav-dropdown-panel {
  position: absolute; top: calc(100% + 18px); left: -16px;
  min-width: 320px;
  background: var(--obsidian);
  border: 1px solid rgba(242,241,235,0.12);
  padding: 12px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  z-index: 60;
}
.nav-dropdown.is-open .nav-dropdown-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-panel a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  font-size: 13.5px;
  color: rgba(242,241,235,0.78);
  transition: background 200ms ease, color 200ms ease;
}
.nav-dropdown-panel a:hover { background: rgba(111,168,50,0.08); color: var(--ivory); }
.nav-dropdown-panel a small {
  display: block;
  font-size: 11px;
  color: rgba(242,241,235,0.45);
  letter-spacing: 0.02em;
  margin-top: 3px;
  font-weight: 300;
}
.nav-dropdown-panel a > span:first-child { display: flex; flex-direction: column; }
.nav-dropdown-panel a > .arrow {
  color: var(--lime); flex-shrink: 0; margin-left: 16px;
  opacity: 0; transition: opacity 200ms ease, transform 200ms ease;
}
.nav-dropdown-panel a:hover > .arrow { opacity: 1; transform: translateX(2px); }
.nav-dropdown-panel-divider {
  height: 1px; background: rgba(242,241,235,0.08);
  margin: 8px 16px;
}
.nav-cta {
  font-size: 13px; padding: 10px 22px;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.nav.is-sticky .nav-cta {
  background: var(--text); color: var(--ivory);
  border: 1px solid var(--text);
}
.nav.is-sticky .nav-cta:hover { background: var(--forest); border-color: var(--forest); }
.nav.is-overlay .nav-cta {
  border: 1px solid rgba(242,241,235,0.4); color: var(--ivory);
}
.nav.is-overlay .nav-cta:hover { background: var(--ivory); color: var(--text); border-color: var(--ivory); }
@media (max-width: 980px) {
  .nav { padding: 18px 24px; }
  .nav-links { display: none; }
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--lime); color: var(--obsidian);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  padding: 18px 32px;
  border: none; cursor: pointer;
  transition: opacity 200ms ease, transform 200ms ease, box-shadow 300ms ease;
}
.btn-primary:hover {
  opacity: 0.95; transform: translateY(-1px);
  box-shadow: 0 0 0 6px rgba(111,168,50,0.15);
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost-dark {
  font-size: 13px; color: rgba(242,241,235,0.75);
  border-bottom: 1px solid rgba(242,241,235,0.4);
  padding-bottom: 2px;
}
.btn-ghost-dark:hover { color: var(--ivory); border-color: var(--ivory); }
.btn-ghost-light {
  font-size: 13px; color: var(--stone);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.btn-ghost-light:hover { color: var(--text); }

/* ── Hero base ── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 0 64px 96px;
  min-height: 86vh;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center center;
  filter: grayscale(15%) contrast(1.08) brightness(0.92);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(11,12,10,0.92) 0%,
    rgba(11,12,10,0.78) 40%,
    rgba(11,12,10,0.42) 65%,
    rgba(11,12,10,0.55) 85%,
    rgba(11,12,10,0.92) 100%);
}
@media (max-width: 880px) {
  .hero-bg::after {
    background: linear-gradient(180deg,
      rgba(11,12,10,0.65) 0%,
      rgba(11,12,10,0.5) 35%,
      rgba(11,12,10,0.88) 85%,
      rgba(11,12,10,0.96) 100%);
  }
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 880px;
  padding-top: 200px;
}
.hero-filet {
  display: block;
  width: 56px; height: 1px;
  background: var(--lime);
  margin-bottom: 36px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ivory);
}
.hero h1 em { color: var(--lime); font-style: italic; }
.hero-lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  line-height: 1.55;
  color: rgba(242,241,235,0.88);
  max-width: 680px;
  margin-top: 32px;
}
.hero-cta-row {
  display: flex; gap: 32px; align-items: center;
  margin-top: 56px; flex-wrap: wrap;
}
/* Garde-fou anti-overflow horizontal global mobile */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Wrap propre mobile : empêche les coupures à droite */
.hero h1, .hero-lead, .strip-text,
.section-title, .catalogue-card-title,
.timeline-step h3, .pour-qui-list li,
.faq-q, .faq-a,
.recoit-list h3, .recoit-list p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.hero-content {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0; /* CRITICAL : permet le wrap dans flex parent */
}
.hero-cta-row { width: 100%; max-width: 100%; min-width: 0; }
.hero-cta-row a { flex: 0 1 auto; max-width: 100%; box-sizing: border-box; min-width: 0; }

@media (max-width: 768px) {
  .hero {
    padding: 0 18px 56px !important;
    min-height: 78vh;
  }
  .hero-content {
    padding-top: 120px;
    width: 100%;
  }
  .hero h1 {
    font-size: 1.7rem !important;
    line-height: 1.18 !important;
    max-width: 100% !important;
  }
  .hero-lead {
    font-size: 0.98rem !important;
    line-height: 1.5 !important;
    margin-top: 20px !important;
    max-width: 100% !important;
  }
  .hero-cta-row {
    gap: 12px !important;
    margin-top: 32px !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero-cta-row a {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
@media (max-width: 420px) {
  .hero { padding: 0 14px 48px !important; }
  .hero h1 { font-size: 1.5rem !important; }
  .hero-lead { font-size: 0.93rem !important; }
}

/* ── Strip ── */
.strip {
  padding: 36px 56px;
  background: var(--charcoal);
  color: var(--ivory);
  border-bottom: 1px solid var(--hairline-dark);
  text-align: center;
}
.strip-inner { max-width: 920px; margin: 0 auto; }
.strip-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.98rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  color: var(--ivory);
}
.strip-text em { color: var(--lime); font-style: italic; }
@media (max-width: 768px) {
  .strip { padding: 24px 16px; }
  .strip-text { font-size: 0.9rem; line-height: 1.45; }
}

/* ── Footer ── */
.footer {
  background: var(--charcoal);
  color: rgba(242,241,235,0.6);
  padding: 80px 56px 40px;
  font-size: 13px;
  border-top: 1px solid var(--hairline-dark);
}
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--hairline-dark);
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 24px;
  font-size: 13px;
  justify-content: flex-end;
}
.footer-nav a { color: rgba(242,241,235,0.7); }
.footer-nav a:hover { color: var(--ivory); }
.footer-bottom {
  max-width: 1240px; margin: 0 auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  font-size: 11px; color: rgba(242,241,235,0.55);
  letter-spacing: 0.02em;
}
.footer-contact { font-size: 12px; letter-spacing: 0.02em; }
.footer-contact a { color: rgba(242,241,235,0.7); }
.footer-contact a:hover { color: var(--ivory); }
.footer-legal-row {
  max-width: 1240px; margin: 0 auto;
  padding-top: 18px;
  display: flex; justify-content: space-between; gap: 32px;
  font-size: 11px; color: rgba(242,241,235,0.45);
}
.footer-legal-links { display: flex; gap: 24px; }
.footer-legal-links a:hover { color: var(--ivory); }
.footer-disclaimer {
  margin-top: 28px;
  font-size: 11px;
  color: rgba(242,241,235,0.4);
  line-height: 1.7;
  max-width: 760px;
}
@media (max-width: 768px) {
  .footer { padding: 56px 24px 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-nav { justify-content: flex-start; }
  .footer-bottom, .footer-legal-row { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ── Sections ── */
.section { padding: 120px 56px; }
.section-narrow { max-width: 880px; margin: 0 auto; }
.section-ivory { background: var(--ivory); }
.section-charcoal { background: var(--charcoal); color: var(--ivory); }
.section-obsidian { background: var(--obsidian); color: var(--ivory); }
@media (max-width: 768px) { .section { padding: 80px 24px; } }

.section-eyebrow {
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  margin-bottom: 28px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 12px;
}
.section-eyebrow::before {
  content: ''; display: inline-block;
  width: 40px; height: 1px;
}
.section-ivory .section-eyebrow { color: var(--forest); }
.section-ivory .section-eyebrow::before { background: var(--forest); }
.section-charcoal .section-eyebrow,
.section-obsidian .section-eyebrow { color: var(--lime); }
.section-charcoal .section-eyebrow::before,
.section-obsidian .section-eyebrow::before { background: var(--lime); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
}
.section-title em { font-style: italic; }
.section-ivory .section-title { color: var(--text); }
.section-ivory .section-title em { color: var(--forest); }
.section-charcoal .section-title,
.section-obsidian .section-title { color: var(--ivory); }
.section-charcoal .section-title em,
.section-obsidian .section-title em { color: var(--lime); }
