/* ==========================================================================
   AXIOR HABITAT — styles.css
   Charte : bleu marine dominant, or en accent, sobriété, respiration.
   ========================================================================== */

/* ---------- 1. Variables (design tokens) ---------- */
:root {
  /* Couleurs officielles */
  --color-navy: #071F37;
  --color-navy-light: #0F3053;
  --color-gold: #D6A323;
  --color-gold-light: #E7C567;
  --color-white: #FFFFFF;
  --color-grey-light: #F4F5F6;
  --color-text: #222A30;
  --color-text-muted: #5A6570;
  --color-border: #E2E5E8;

  /* Typographie
     V1 : pile de polices système uniquement (aucune police externe téléchargée),
     choisie pour une apparence proche de Montserrat (titres) / Inter (texte). */
  --font-heading: -apple-system, "Segoe UI", "Helvetica Neue", "Century Gothic", Roboto, Arial, sans-serif;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Échelle */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 10px rgba(7, 31, 55, 0.06);
  --shadow-md: 0 8px 30px rgba(7, 31, 55, 0.10);

  --container-width: 1180px;
  --header-height: 84px;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.25;
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.1rem; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---------- 3. Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy);
}
.btn-primary:hover { background: var(--color-gold-light); }

.btn-outline {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}
.btn-outline:hover { background: var(--color-navy); color: var(--color-white); }

.btn-outline-light {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn-outline-light:hover { background: var(--color-white); color: var(--color-navy); }

.btn-lg { padding: 15px 32px; font-size: 1rem; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link { flex-shrink: 0; }
.logo { height: 56px; width: auto; }

.main-nav ul {
  display: flex;
  gap: 28px;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-navy);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero {
  background: var(--color-grey-light);
  padding: 64px 0 72px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-lead {
  margin-top: 20px;
  font-size: 1.15rem;
  color: var(--color-text);
  max-width: 46ch;
}
.hero-sub {
  margin-top: 10px;
  color: var(--color-text-muted);
  max-width: 46ch;
}
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-tags {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.hero-media { margin: 0; }
.hero-image {
  display: block;
  width: 100%;
  height: clamp(400px, 38vw, 520px);
  object-fit: cover;
  object-position: 72% center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.hero-image--professionnels { object-position: 44% center; }
.visual-caption {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  text-align: right;
}
.service-visual {
  margin: 48px auto 0;
  max-width: 1080px;
}
.service-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- 6. Sections génériques ---------- */
section { padding: 88px 0; }
.section-heading {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-heading p {
  margin-top: 14px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ---------- 7. Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-gold);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-grey-light);
  color: var(--color-navy);
  margin-bottom: 18px;
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--color-text-muted); font-size: 0.95rem; }

/* ---------- 8. Positionnement ---------- */
.positioning {
  background: var(--color-navy);
  color: var(--color-white);
  text-align: center;
}
.positioning h2 { color: var(--color-white); max-width: 760px; margin: 0 auto; }
.positioning > .container > p {
  max-width: 620px;
  margin: 20px auto 48px;
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
}
.chain {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.chain li {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-gold-light);
  position: relative;
}
.chain li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

/* ---------- 9. Méthode / timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.timeline-step {
  position: relative;
  padding-top: 44px;
  border-top: 3px solid var(--color-gold);
}
.step-number {
  position: absolute;
  top: -22px;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-content h3 { margin-bottom: 8px; font-size: 1rem; }
.step-content p { color: var(--color-text-muted); font-size: 0.92rem; }

/* ---------- 10. Particuliers / Professionnels ---------- */
.audiences-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.audience-card {
  background: var(--color-grey-light);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
}
.audience-card--pro {
  background: var(--color-white);
  border: 1px solid var(--color-border);
}
.audience-card p { margin-top: 16px; color: var(--color-text-muted); }
.audience-card .btn { margin-top: 24px; }
.audience-tags {
  margin-top: 18px !important;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-navy) !important;
}

/* ---------- 11. Zone d'intervention ---------- */
.zone-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.zone-note {
  margin-top: 14px;
  color: var(--color-text-muted);
}
.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.zone-list li {
  background: var(--color-grey-light);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-navy);
}
.zone-illustration {
  display: flex;
  justify-content: center;
  color: var(--color-gold);
  opacity: 0.85;
}

/* ---------- 12. Confiance ---------- */
.trust { background: var(--color-grey-light); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.trust-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.trust-item h3 { font-size: 1rem; margin-bottom: 8px; }
.trust-item p { color: var(--color-text-muted); font-size: 0.88rem; }

/* ---------- 13. Formulaire de devis ---------- */
.devis-inner {
  max-width: 720px;
  margin: 0 auto;
}
.devis-form {
  background: var(--color-grey-light);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--color-navy);
}
.field-optional { font-weight: 400; color: var(--color-text-muted); }
.form-note {
  margin: -2px 0 20px;
  padding: 12px 14px;
  border-left: 3px solid var(--color-gold);
  background: rgba(214, 163, 35, 0.08);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.form-honeypot {
  position: absolute !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  width: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: 0.95rem;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--color-gold);
}
.form-field textarea { resize: vertical; }

.form-field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-field--checkbox input { margin-top: 4px; }
.form-field--checkbox label {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.form-feedback {
  margin-bottom: 16px;
  font-size: 0.9rem;
  font-weight: 600;
}
.form-feedback[data-state="error"] { color: #B3261E; }
.form-feedback[data-state="success"] { color: #1E7A34; }

/* ---------- 14. CTA final ---------- */
.cta-final {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  text-align: center;
}
.cta-final h2 { color: var(--color-white); }
.cta-final p {
  margin-top: 14px;
  color: rgba(255,255,255,0.8);
}
.cta-final-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.75);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 24px 48px;
}
.footer-logo {
  height: 52px;
  width: auto;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.footer-tagline {
  margin-top: 14px;
  color: var(--color-gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.footer-col h3 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
}
.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-phone-text { display: none; }

  .main-nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 12px 24px 24px;
  }
  .main-nav.is-open ul { flex-direction: column; gap: 4px; }
  .main-nav.is-open a {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--color-border);
  }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media { max-width: 640px; margin: 0 auto; }
  .hero-image { height: auto; aspect-ratio: 16 / 10; object-position: 70% center; }
  .hero-image--professionnels { object-position: 42% center; }
  .visual-caption { text-align: center; }

  .audiences-grid { grid-template-columns: 1fr; }
  .zone-inner { grid-template-columns: 1fr; text-align: center; }
  .zone-illustration { order: -1; }
  .zone-list { justify-content: center; }
  .chain { flex-direction: column; align-items: center; }
  .chain li::after { display: none; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .devis-form { padding: 28px 22px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .cta-final-buttons { flex-direction: column; align-items: stretch; }
  .cta-final-buttons .btn { width: 100%; }
}


@media (max-width: 640px) {
  .hero-image { height: auto; aspect-ratio: 4 / 3; object-position: 72% center; }
  .hero-image--professionnels { object-position: 40% center; }
  .service-visual { margin-top: 36px; }
}
