/* Avant de signer — rénos QC */
:root {
  --cream: #F6F1E8;
  --cream-deep: #EDE6D8;
  --paper: #FFFDF8;
  --pine: #1F4D3A;
  --pine-ink: #16382B;
  --pine-soft: rgba(31, 77, 58, 0.12);
  --pine-line: rgba(31, 77, 58, 0.28);
  --white: #fff;
  --max: 1100px;
  --radius: 14px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--pine);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--pine);
  overflow-wrap: anywhere;
  word-break: break-word;
}
a:hover { color: var(--pine-ink); }
a:focus-visible {
  outline: 3px solid var(--pine);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--pine);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 20;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 2px solid var(--pine);
  background: var(--cream);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--pine);
  min-height: 44px;
}
.brand img {
  width: 52px;
  height: 48px;
  object-fit: contain;
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name strong {
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.brand-name span {
  font-size: 0.88rem;
  font-weight: 500;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { background: var(--pine-soft); }
.nav a[aria-current="page"] {
  background: var(--pine);
  color: var(--white);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem 0 1.6rem;
}
.frame {
  background: var(--cream);
  border: 3px solid var(--pine);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 12px 28px var(--pine-soft);
}
.frame img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}
h1, h2, h3 { line-height: 1.22; margin: 0 0 0.75rem; }
h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}
h2 { font-size: 1.35rem; }
p { margin: 0 0 0.9rem; }
.lead { font-size: 1.08rem; }

.quote {
  margin: 1.1rem 0 1.4rem;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 4px solid var(--pine);
  font-size: 1.28rem;
  font-weight: 700;
  font-style: italic;
  overflow-wrap: anywhere;
}

.btn {
  display: inline-block;
  background: var(--pine);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  padding: 0.85rem 1.35rem;
  border-radius: 10px;
  border: 2px solid var(--pine);
}
.btn:hover {
  background: var(--pine-ink);
  color: var(--white);
  border-color: var(--pine-ink);
}
.btn-ghost {
  background: transparent;
  color: var(--pine);
}
.btn-ghost:hover {
  background: var(--pine);
  color: var(--white);
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  padding: 0.4rem 0 2.4rem;
}
.card {
  background: var(--paper);
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card .thumb {
  background: var(--cream);
  border-bottom: 2px solid var(--pine);
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 0.7rem;
}
.card .thumb img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
}
.card .thumb.thumb-logo {
  min-height: 0;
  padding: 1.15rem;
}
.card .thumb.thumb-logo img {
  width: auto;
  max-height: 72px;
  object-fit: contain;
}

.card .thumb.thumb-plain {
  position: relative;
  background: #F6F1E8;
  min-height: 170px;
  padding: 14px;
}
.card .thumb.thumb-plain::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid #1F4D3A;
  border-radius: 4px;
  pointer-events: none;
}
.card .thumb.thumb-plain img {
  width: 48px;
  height: auto;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}
.card .body {
  padding: 1rem 1.05rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card h2 { font-size: 1.12rem; }
.card h2 a { text-decoration: underline; text-underline-offset: 3px; }
.card p { font-size: 0.98rem; }
.card .more {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}
.card .more:hover { text-decoration: underline; }

.note {
  border: 1px solid var(--pine-line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  background: var(--paper);
  margin: 0 0 1.4rem;
}

.page { padding: 2rem 0 2.6rem; }
.pictos-frame { max-width: 720px; margin: 0 auto 1.8rem; }
.pictos-frame img { width: 100%; }

.checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 1.8rem;
}
.check {
  background: var(--paper);
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.15rem;
}
.check img {
  width: 92px;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.55rem;
}
.check h2 { font-size: 1.08rem; }
.check ul { margin: 0.2rem 0 0; padding-left: 1.15rem; }
.check li { margin: 0.25rem 0; }
.check a { font-weight: 700; }

.warn {
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.6rem;
  background: var(--cream-deep);
}
.warn h2 { font-size: 1.1rem; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1rem 1.1rem 1.1rem 1.15rem;
  margin: 0 0 0.9rem;
}
.steps > li h2 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
}
.mini {
  border: 2px dashed var(--pine);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
  background: var(--paper);
}

.sources {
  font-size: 0.92rem;
  margin-top: 1.6rem;
}
.sources a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cta-band {
  margin: 1.5rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 2px solid var(--pine);
}

.site-footer {
  border-top: 2px solid var(--pine);
  padding: 1.1rem 0 1.4rem;
  font-size: 0.92rem;
}
.site-footer p { margin: 0 0 0.45rem; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.toc {
  background: var(--paper);
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.1rem;
  margin: 0 0 1.6rem;
}
.toc h2 { font-size: 1.08rem; }
.toc ol { margin: 0.15rem 0 0; padding-left: 1.25rem; }
.toc li { margin: 0.28rem 0; }
.toc a { font-weight: 700; }

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  background: var(--paper);
}
.page th,
.page td {
  border: 2px solid var(--pine);
  padding: 0.65rem 0.8rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page th {
  background: var(--cream-deep);
  font-weight: 700;
}

.guides {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 1.8rem;
}
.guides .check { position: relative; }
.guides .check h2 { font-size: 1.05rem; }
.guides .check h2 a {
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.guides .check h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* Tablet / compact: stack foyer, desktop ≥900px inchangé */
@media (max-width: 899px) {
  .hero,
  .cards,
  .guides { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 1.5rem; }

  .site-header .wrap {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.35rem 0;
  }
  .brand { align-self: flex-start; }
  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    flex-wrap: nowrap;
    gap: 0.15rem;
  }
  .nav a {
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
    width: 100%;
    padding: 0.55rem 0.25rem;
    font-size: clamp(0.72rem, 1.7vw, 0.9rem);
    letter-spacing: -0.02em;
  }
}

/* Mobile réel: ≤640px (cibles 320–430) */
@media (max-width: 640px) {
  .wrap {
    width: min(var(--max), calc(100% - 2rem));
  }
  .checks { grid-template-columns: 1fr; }
  .hero { gap: 1.2rem; padding: 1.25rem 0 1.1rem; }

  h1 { font-size: clamp(1.35rem, 6vw, 1.75rem); }
  h2 { font-size: 1.18rem; }
  .quote {
    font-size: 1.08rem;
    padding-left: 0.85rem;
  }

  .nav a {
    font-size: clamp(0.62rem, 2.7vw, 0.82rem);
    letter-spacing: -0.035em;
    padding: 0.5rem 0.12rem;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .btn-row .btn,
  .hero .btn,
  .cta-band .btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
    box-sizing: border-box;
  }

  .check img {
    width: 92px;
    height: auto;
  }
  .check ul { overflow-wrap: anywhere; }
  .check li { overflow-wrap: anywhere; }

  .page table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page th,
  .page td {
    padding: 0.5rem 0.4rem;
    font-size: 0.9rem;
  }

  .sources,
  .sources a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .site-footer {
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 400px) {
  .nav a {
    font-size: clamp(0.6rem, 3.05vw, 0.72rem);
    letter-spacing: -0.045em;
    padding: 0.5rem 0.06rem;
  }
  .brand img {
    width: 44px;
    height: 40px;
  }
}

/* AdSense slot — 1 max, sous le fold, 0 sticky */
.ad-slot {
  margin: 1.5rem auto 0.75rem;
  padding: 0.75rem 0 0.25rem;
  text-align: center;
  position: static;
}
/* Stub: invisible tant que ca-pub pas activé — 0 boîte vide « Publicité » en live */
.ad-slot[data-adsense-ready="0"] {
  display: none;
}
.ad-slot[data-adsense-ready="1"] {
  display: block;
  min-height: 90px;
}
.ad-slot-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pine-ink);
  opacity: 0.7;
}
.ad-slot-container {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-slot[data-adsense-ready="1"] .ad-slot-container {
  border: none;
  background: transparent;
}
.footer-legal {
  margin-top: 0.65rem !important;
}
.footer-legal a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media print {
  .site-header, .site-footer, .btn, .nav, .ad-slot { display: none !important; }
  body { background: #fff; }
}


/* Accueil dual Rénos | Auto */
.cards-dual {
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
@media (min-width: 720px) {
  .cards-dual {
    grid-template-columns: 1fr 1fr;
  }
}
.cards-dual .card .kicker {
  margin-bottom: 0.25rem;
}
.cards-dual .btn-row {
  margin: 0.75rem 0 0.5rem;
}
