/* ==========================================================================
   Le Poêle Idéal — lepoeleideal.fr
   Design system v1.0
   ========================================================================== */

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --ink: #26201a;
  --ink-soft: #4a4038;
  --muted: #7a6f64;
  --line: #e8dfd3;
  --brand: #d9541e;
  --brand-dark: #b03e10;
  --brand-soft: #fdeadd;
  --gold: #f4a259;
  --green: #2e6b4f;
  --green-soft: #e6f1ea;
  --blue: #2b5d8a;
  --blue-soft: #e7eff6;
  --header-bg: #211a13;
  --header-ink: #f7f1e8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(38, 32, 26, .08);
  --shadow-lg: 0 12px 40px rgba(38, 32, 26, .14);
  --maxw: 1160px;
  --content-w: 760px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 2em 0 .7em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
h4 { font-size: 1.05rem; margin: 1.2em 0 .4em; }

p { margin-bottom: 1.1em; }
ul, ol { margin: 0 0 1.2em 1.4em; }
li { margin-bottom: .45em; }

a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }

strong { color: var(--ink); }

img, svg { max-width: 100%; height: auto; }

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

/* ==========================================================================
   Header & navigation
   ========================================================================== */

.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--header-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
}
.logo:hover { color: #fff; }
.logo .flame { width: 30px; height: 30px; flex: none; }
.logo em { font-style: normal; color: var(--gold); }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 22px;
  position: relative;
  flex: none;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  background: var(--header-ink);
  left: 0;
  transition: all .25s;
}
.nav-toggle-label span { top: 9px; }
.nav-toggle-label span::before { top: -9px; }
.nav-toggle-label span::after { top: 9px; }

.main-nav ul { list-style: none; margin: 0; display: flex; gap: 2px; }
.main-nav li { position: relative; margin: 0; }
.main-nav a {
  display: block;
  color: var(--header-ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: 21px 9px;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--gold); }

.main-nav .sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: var(--surface);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  padding: 8px 0;
}
.main-nav li:hover > .sub,
.main-nav li:focus-within > .sub { display: flex; }
.main-nav .sub a {
  color: var(--ink);
  padding: 9px 18px;
  font-weight: 400;
}
.main-nav .sub a:hover { background: var(--brand-soft); color: var(--brand-dark); }

.main-nav .nav-cta a {
  background: linear-gradient(120deg, var(--brand), var(--gold));
  color: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  margin: 12px 0 12px 6px;
  font-weight: 600;
  white-space: nowrap;
}
.main-nav .nav-cta a:hover { color: #fff; filter: brightness(1.08); }

@media (max-width: 1180px) {
  .nav-toggle-label { display: block; }
  .main-nav .nav-cta a { display: inline-block; margin: 10px 24px; }
  .main-nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-toggle:checked ~ .main-nav { max-height: calc(100vh - 66px); overflow-y: auto; }
  .main-nav ul { flex-direction: column; padding: 10px 0 20px; }
  .main-nav a { padding: 12px 24px; }
  .main-nav .sub {
    position: static;
    display: flex;
    box-shadow: none;
    background: transparent;
    min-width: 0;
    padding: 0 0 4px;
  }
  .main-nav .sub a { color: #cdbfae; padding: 8px 40px; font-size: .88rem; }
  .main-nav .sub a:hover { background: transparent; color: var(--gold); }
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
  font-size: .85rem;
  color: var(--muted);
  padding: 18px 0 0;
}
.breadcrumb ol { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin: 0 7px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-dark); text-decoration: underline; }

/* ==========================================================================
   Hero (homepage)
   ========================================================================== */

.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(217, 84, 30, .28), transparent 60%),
    radial-gradient(900px 420px at 10% 110%, rgba(244, 162, 89, .18), transparent 60%),
    var(--header-bg);
  color: var(--header-ink);
  padding: 72px 0 84px;
}
.hero h1 { color: #fff; max-width: 720px; }
.hero p.lead {
  font-size: 1.2rem;
  max-width: 640px;
  color: #d9cbb8;
  margin-bottom: 1.8em;
}
.hero .btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 470px;
  display: flex;
  align-items: center;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/assets/images/hero-poele-maison.png") center right / cover no-repeat;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(24, 18, 12, .96) 0%, rgba(27, 20, 13, .89) 37%, rgba(30, 21, 13, .46) 62%, rgba(30, 21, 13, .08) 100%);
}
.hero-caption { color: #d9cbb8; font-size: .82rem; margin: 22px 0 0; max-width: 470px; }

/* Page hero (inner pages) */
.page-head { padding: 10px 0 8px; max-width: var(--content-w); }
.page-head .intro { font-size: 1.15rem; color: var(--ink-soft); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--gold));
  color: #fff;
  box-shadow: 0 6px 20px rgba(217, 84, 30, .35);
}
.btn-primary:hover { color: #fff; }
.btn-ghost {
  border: 1.5px solid rgba(247, 241, 232, .4);
  color: var(--header-ink);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline {
  border: 1.5px solid var(--brand);
  color: var(--brand-dark);
}

/* ==========================================================================
   Layout : article + grille
   ========================================================================== */

main { padding-bottom: 70px; }

.article { max-width: var(--content-w); }
.article-wide { max-width: 920px; }

.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin-top: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand-dark); }
.card p { font-size: .95rem; color: var(--ink-soft); margin-bottom: .6em; }
.card .more { font-size: .9rem; font-weight: 600; text-decoration: none; }
.card .icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.card-visual { padding: 0 26px 26px; overflow: hidden; }
.card-visual .card-photo {
  display: block;
  margin: 0 -26px 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--line);
}
.card-visual .card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.card-visual:hover .card-photo img { transform: scale(1.04); }
@media (max-width: 700px) {
  .hero-photo { min-height: 525px; align-items: flex-start; padding-top: 50px; }
  .hero-photo::before { background-position: 63% center; }
  .hero-photo::after { background: linear-gradient(90deg, rgba(24, 18, 12, .94) 0%, rgba(27, 20, 13, .76) 75%, rgba(30, 21, 13, .4) 100%); }
}

/* ==========================================================================
   Sommaire (table of contents)
   ========================================================================== */

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 20px 26px;
  margin: 28px 0 36px;
  max-width: var(--content-w);
}
.toc strong { display: block; margin-bottom: 8px; font-family: "Fraunces", Georgia, serif; font-size: 1.05rem; }
.toc ol { margin: 0 0 0 1.2em; }
.toc li { margin-bottom: 4px; font-size: .95rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ==========================================================================
   Encadrés (callouts)
   ========================================================================== */

.box {
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: .98rem;
}
.box p:last-child { margin-bottom: 0; }
.box-info { background: var(--blue-soft); border-left: 4px solid var(--blue); }
.box-tip { background: var(--green-soft); border-left: 4px solid var(--green); }
.box-warn { background: #fdf3e0; border-left: 4px solid #d99a1e; }
.box-key { background: var(--brand-soft); border-left: 4px solid var(--brand); }
.box strong:first-child { display: inline-block; margin-bottom: 2px; }

/* ==========================================================================
   Tableaux
   ========================================================================== */

.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .95rem;
  min-width: 480px;
}
caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  padding: 12px 16px;
  background: var(--surface);
  font-family: "Fraunces", Georgia, serif;
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--header-bg); color: var(--header-ink); font-weight: 600; font-size: .88rem; }
tbody tr:nth-child(even) { background: #fbf8f3; }
tbody tr:last-child td { border-bottom: none; }

/* ==========================================================================
   FAQ (details/summary)
   ========================================================================== */

.faq { margin: 26px 0; max-width: var(--content-w); }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 46px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--brand);
  transition: transform .2s;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 16px; color: var(--ink-soft); font-size: .97rem; }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
  background:
    radial-gradient(520px 260px at 15% -20%, rgba(217, 84, 30, .30), transparent 65%),
    radial-gradient(520px 260px at 85% 120%, rgba(244, 162, 89, .22), transparent 65%),
    var(--header-bg);
  border: 1px solid rgba(244, 162, 89, .25);
  color: var(--header-ink);
  border-radius: var(--radius);
  padding: 52px 44px;
  margin: 56px auto;
  max-width: 920px;
  text-align: center;
}
.cta h2, .cta h3 { color: #fff; margin-top: 0; margin-bottom: .5em; }
.cta p { color: #d9cbb8; max-width: 620px; margin-left: auto; margin-right: auto; }
.cta .btn-primary { margin-top: 6px; }
.cta .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
}
.cta .btn-ghost { border-color: rgba(247, 241, 232, .45); color: var(--header-ink); }
.cta .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
@media (max-width: 600px) {
  .cta { padding: 36px 24px; }
  .cta .btn-row .btn { width: 100%; text-align: center; }
}

/* Variante encart article : reste aligné à gauche, plus compact */
.cta-devis { text-align: left; }
.cta-devis p { margin-left: 0; margin-right: 0; }
.cta-devis .btn-row { justify-content: flex-start; }

/* ==========================================================================
   Métadonnées article & liens connexes
   ========================================================================== */

.meta {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.related {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 48px 0 0;
  max-width: var(--content-w);
}
.related h2, .related h3 { margin-top: 0; font-size: 1.25rem; }
.related ul { margin: 0 0 0 1.2em; }
.related li { margin-bottom: 8px; }

/* Badges */
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  margin-bottom: 14px;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }

/* Steps */
.steps { counter-reset: step; list-style: none; margin: 26px 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 58px;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--brand), var(--gold));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", Georgia, serif;
}
.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.steps strong { display: block; margin-bottom: 2px; }

/* Stat blocks */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 30px 0; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.stat .num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: block;
}
.stat .lbl { font-size: .85rem; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--header-bg);
  color: #b9ab99;
  margin-top: 80px;
  padding: 56px 0 30px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 34px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--header-ink); font-size: .95rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b9ab99; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-brand p { margin-top: 12px; max-width: 280px; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 22px 22px 0;
  border-top: 1px solid rgba(247, 241, 232, .12);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: .82rem;
}
.footer-bottom a { color: #b9ab99; }

/* ==========================================================================
   Divers
   ========================================================================== */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-title { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-title h2 { margin-top: 0; }
.section-title p { color: var(--muted); }

::selection { background: var(--gold); color: var(--header-bg); }

/* ==========================================================================
   CTA devis inséré dans les articles
   ========================================================================== */

.cta-devis {
  padding: 30px 34px;
  margin: 44px 0;
  max-width: var(--content-w);
}
.cta-devis .cta-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.cta-devis p { margin-bottom: 14px; }
.cta-devis .trust {
  font-size: .8rem;
  color: #b9ab99;
  margin: 14px 0 0;
}

/* Barre devis sticky (mobile uniquement) */
.devis-bar { display: none; }
@media (max-width: 768px) {
  .devis-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: linear-gradient(120deg, var(--brand), var(--gold));
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: .95rem;
    padding: 14px 16px;
    text-decoration: none;
    box-shadow: 0 -4px 18px rgba(38, 32, 26, .25);
  }
  .devis-bar:hover { color: #fff; }
  body { padding-bottom: 52px; }
}

/* ==========================================================================
   Landing devis / leads
   ========================================================================== */

.lead-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: start;
  padding: 48px 0;
}
@media (max-width: 900px) { .lead-layout { grid-template-columns: 1fr; } }

.lead-form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  position: sticky;
  top: 90px;
}
.lead-form-panel h2 { margin-top: 0; font-size: 1.35rem; }
.lead-form-panel .note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 18px 0 6px;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--ink-soft);
}
.trust-row li { margin: 0; }
.trust-row li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.checklist { list-style: none; margin: 0 0 1.2em; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
