/* ==========================================================================
   Sanitair-Expert (sanitair-expert.com) — Design system
   Service d'urgence premium : bleu marine + accent ambre, très lisible.
   Mobile-first, minimal JS, contrastes AA, prefers-reduced-motion respecté.
   ========================================================================== */

:root {
  --navy: #0d2a4a;        /* bleu marine profond (principal) */
  --navy-2: #14487d;      /* bleu technique (secondaire) */
  --navy-grad: #1c5c9e;
  --accent: #f5820a;      /* ambre CTA très contrasté */
  --accent-dark: #d96c00;
  --green: #1f9d55;       /* validation */
  --bg: #ffffff;
  --bg-soft: #f2f6fb;     /* gris bleuté très clair */
  --border: #d9e2ec;
  --text: #1f2a37;
  --muted: #556575;
  --shadow: 0 4px 16px rgba(13, 42, 74, 0.10);
  --shadow-lg: 0 10px 30px rgba(13, 42, 74, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-2); }

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

h1, h2, h3 { line-height: 1.2; color: var(--navy); font-weight: 800; }

/* --- Accessibilité : focus visible & skip link --- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; border-radius: var(--radius-sm); text-decoration: none;
  font-weight: 800; font-size: 17px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  min-height: 52px; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(245,130,10,.4); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); }
.btn-secondary:hover { background: rgba(255,255,255,.22); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-outline:hover { border-color: var(--navy-2); color: var(--navy-2); }
.btn-white { background: #fff; color: var(--accent-dark); box-shadow: var(--shadow); }
.btn-white:hover { transform: translateY(-2px); }
.btn-lg { font-size: 19px; padding: 18px 34px; min-height: 58px; }
/* Icônes inline dans les boutons et liens d'appel : taille contrôlée */
.btn svg, .sticky-call a svg, .header-phone svg { width: 20px; height: 20px; flex: none; }
.btn-lg svg { width: 22px; height: 22px; }
.sticky-call a svg { width: 22px; height: 22px; }

/* --- Top bar --- */
.topbar {
  background: var(--navy); color: #eaf1f8; font-size: 13.5px;
  padding: 7px 0; text-align: center;
}
.topbar ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.topbar li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }

/* --- Header --- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 90; box-shadow: 0 2px 8px rgba(13,42,74,.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-badge {
  width: 40px; height: 40px; border-radius: 9px; background: var(--navy);
  color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none;
}
.brand-name { font-size: 18px; font-weight: 900; color: var(--navy); line-height: 1.1; }
.brand-name span { color: var(--accent); }
.brand-tag { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 14px; }
.header-phone { text-align: right; line-height: 1.15; }
.header-phone small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.header-phone a { font-size: 20px; font-weight: 900; color: var(--navy); text-decoration: none; }

/* --- Navigation (page d'accueil uniquement) --- */
.mainnav { border-top: 1px solid var(--border); background: #fff; }
.mainnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; padding: 10px 0; max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.mainnav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px; padding: 4px 0; }
.mainnav a:hover { color: var(--accent-dark); }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-grad) 100%);
  color: #fff; padding: 56px 0 60px;
}
.hero .wrap { display: grid; gap: 34px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-badges span {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px; border-radius: 40px; font-size: 13px; font-weight: 600;
}
.hero-badges span::before { content: "● "; color: var(--green); }
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); font-weight: 900; margin-bottom: 14px; }
.hero .lead { font-size: 18px; opacity: .94; margin-bottom: 24px; max-width: 620px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.hero-phone-txt { margin-top: 6px; font-size: 15px; opacity: .9; }
.hero-phone-txt strong { font-size: 22px; color: #fff; }

/* Réassurances hero */
.reassure { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.reassure li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; opacity: .95; }
.reassure li::before { content: "✓"; color: var(--green); font-weight: 900; flex: none; }

/* --- Sections génériques --- */
section { scroll-margin-top: 90px; }
.block { padding: 56px 0; }
.block-soft { background: var(--bg-soft); }
.block-navy { background: var(--navy); color: #fff; }
.block-navy h2, .block-navy h3 { color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 16px; }
.block-navy .section-head p { color: #cfe0f0; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 800; color: var(--accent-dark); margin-bottom: 8px; }
.block-navy .eyebrow { color: var(--accent); }

.prose p { margin-bottom: 14px; color: var(--text); }
.prose { max-width: 760px; }

/* --- Grilles de cartes --- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card-link { text-decoration: none; color: inherit; display: block; }
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c3d2e3; }
.card-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--bg-soft); color: var(--navy-2); display: grid; place-items: center; margin-bottom: 14px; }
.card-icon svg { width: 26px; height: 26px; }
.card-more { display: inline-block; margin-top: 12px; color: var(--accent-dark); font-weight: 700; font-size: 14px; }

/* USP / feature cards */
.usp { text-align: left; border-top: 4px solid var(--accent); }
.usp .card-icon { background: #fff5ea; color: var(--accent-dark); }

/* --- Étapes --- */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding-left: 4px; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff;
  display: grid; place-items: center; font-size: 22px; font-weight: 900; margin-bottom: 14px;
}
.block-navy .step-num { background: var(--accent); }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }
.block-navy .step p { color: #cfe0f0; }

/* --- Listes « nous intervenons pour » --- */
.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; list-style: none; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.checklist li::before { content: "✓"; color: var(--green); font-weight: 900; flex: none; margin-top: 1px; }

/* --- Tarifs --- */
.pricing { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.price-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.price-card .amount { font-size: 34px; font-weight: 900; color: var(--navy); }
.price-card .amount small { font-size: 15px; font-weight: 700; color: var(--muted); }
.price-card ul { list-style: none; margin-top: 14px; }
.price-card li { padding: 7px 0; border-top: 1px solid var(--border); font-size: 14.5px; color: var(--text); display: flex; gap: 8px; }
.price-card li::before { content: "•"; color: var(--accent); font-weight: 900; }
.note {
  background: #fff8ec; border: 1px solid #f3d9a8; border-left: 4px solid var(--accent);
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; color: #5a4415; margin-top: 16px;
}
.note strong { color: var(--accent-dark); }

/* --- FAQ (details/summary, sans JS) --- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 15.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-dark); font-size: 22px; font-weight: 700; flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--text); font-size: 14.5px; }

/* --- Avis --- */
.reviews-note {
  border: 2px dashed var(--accent); background: #fff8ec; border-radius: var(--radius);
  padding: 22px; text-align: center; color: #5a4415; max-width: 760px; margin: 0 auto; font-size: 14.5px;
}
.reviews-note strong { color: var(--accent-dark); }

/* --- CTA final --- */
.cta-final { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: #fff; text-align: center; }
.cta-final h2 { color: #fff; font-size: clamp(26px, 4vw, 34px); margin-bottom: 12px; }
.cta-final p { max-width: 620px; margin: 0 auto 26px; font-size: 17px; opacity: .96; }
.cta-final .phone-big { display: block; font-size: 30px; font-weight: 900; color: #fff; text-decoration: none; margin-top: 16px; }

/* --- Fil d'Ariane --- */
.breadcrumb { background: var(--bg-soft); font-size: 13.5px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.breadcrumb li { color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--muted); }
.breadcrumb a { color: var(--navy-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* --- Liens internes --- */
.related { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.related a { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; text-decoration: none; color: var(--navy); font-weight: 700; box-shadow: var(--shadow); }
.related a:hover { border-color: var(--navy-2); color: var(--navy-2); }
.related a::after { content: " →"; color: var(--accent-dark); }

/* --- Zones --- */
.zones-list { display: flex; flex-wrap: wrap; gap: 8px; }
.zones-list a, .zones-list span { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.2); color: #fff; text-decoration: none; padding: 6px 14px; border-radius: 40px; font-size: 14px; }
.zones-list a:hover { background: rgba(255,255,255,.22); }

/* --- Formulaire de rappel --- */
.callback { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-lg); }
.callback .field { margin-bottom: 14px; }
.callback label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.callback input, .callback select, .callback textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; color: var(--text); background: #fff;
}
.callback input:focus, .callback select:focus, .callback textarea:focus { border-color: var(--navy-2); }
.callback .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.callback .consent input { width: auto; margin-top: 3px; }
.field-error { color: #c0392b; font-size: 13px; margin-top: 4px; display: none; }
.field-error.show { display: block; }
.form-msg { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; margin-bottom: 14px; display: none; }
.form-msg.ok { display: block; background: #e6f6ee; color: #14683a; border: 1px solid #bfe6d1; }
.form-msg.err { display: block; background: #fbeaea; color: #a93226; border: 1px solid #f0c4c0; }

/* --- Images / photos --- */
.media-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); object-fit: cover; display: block; }
.media-img.wide { aspect-ratio: 16 / 9; }
.media-img.tall { aspect-ratio: 4 / 3; }
.hero-media { position: relative; }
.hero-media img { width: 100%; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.35); object-fit: cover; aspect-ratio: 16 / 9; }
.media-caption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.block-navy .media-caption { color: #cfe0f0; }

/* --- Split (contenu + form / image) --- */
.split { display: grid; gap: 34px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.split.media-left { grid-template-columns: 1fr 1.2fr; }
.split.center { align-items: center; }

/* --- Sticky call bar (mobile) --- */
.sticky-call {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none;
  background: var(--accent); box-shadow: 0 -3px 14px rgba(0,0,0,.22);
}
.sticky-call a { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-weight: 900; font-size: 18px; text-decoration: none; padding: 15px; min-height: 56px; }

/* --- Footer --- */
.site-footer { background: var(--navy); color: #b9cbe0; font-size: 14px; padding: 46px 0 90px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #b9cbe0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .phone-lg { font-size: 24px; font-weight: 900; color: #fff; text-decoration: none; display: inline-block; margin: 4px 0 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 20px; font-size: 13px; color: #8fa6c0; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer-legal-badge { color: #f3b25a; }

/* --- Consent banner --- */
.consent-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 18px 20px; max-width: 640px; margin: 0 auto; display: none;
}
.consent-banner.show { display: block; }
.consent-banner p { font-size: 13.5px; color: var(--text); margin-bottom: 14px; }
.consent-banner a { color: var(--navy-2); }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions .btn { font-size: 14px; padding: 10px 18px; min-height: 44px; }

/* --- 404 --- */
.err-page { text-align: center; padding: 80px 0; }
.err-page .code { font-size: 96px; font-weight: 900; color: var(--navy); line-height: 1; }

/* --- Utilitaires --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 24px; }
.hide { display: none !important; }

/* --- Responsive --- */
@media (min-width: 861px) {
  .hero .wrap.hero-split { grid-template-columns: 1.15fr .85fr; align-items: center; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .header-phone small { display: none; }
}
@media (max-width: 640px) {
  .sticky-call { display: block; }
  body { padding-bottom: 0; }
  .reassure { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 46px; }
  .block { padding: 42px 0; }
  .hero-ctas .btn { width: 100%; }
  .header-phone { display: none; }
  .topbar { font-size: 12px; }
}

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