/* ==========================================================
   SERRURIER OISE — PAGES ARTICLES DU BLOG
   Complète les styles du site (variables --ink, --blue, --signal,
   --mist, --steel… définies dans la page). Aucune nouvelle couleur.
   1. En-tête de l'article (dans le hero compact)
   2. Image principale
   3. Mise en page : sommaire + texte
   4. Sommaire
   5. Texte de l'article
   6. Encadrés : à retenir, checklist, réflexes, avertissement
   7. Articles associés
   8. Responsive
   ========================================================== */

/* 1. EN-TÊTE ------------------------------------------------ */
.article-hero { padding-bottom: clamp(6rem, 12vw, 9rem); }
.article-hero h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}
.article-cat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(255,107,26,.16);
  color: var(--signal);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.article-hero .lead { color: rgba(255,255,255,.78); max-width: 64ch; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255,255,255,.7);
  font-size: .92rem;
  font-weight: 600;
}
.article-meta li { display: flex; align-items: center; gap: .4rem; }
.article-meta i { color: var(--signal); font-size: 1.1rem; }

/* 2. IMAGE PRINCIPALE --------------------------------------- */
.article-cover {
  position: relative;
  z-index: 2;
  margin: calc(clamp(6rem, 12vw, 9rem) * -1 + 1.5rem) auto 0;
}
.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-lg);
  box-shadow: 0 30px 60px -30px rgba(15,29,54,.55);
  background: linear-gradient(150deg, var(--ink-2), var(--blue));
}
.article-cover figcaption {
  margin-top: .6rem;
  color: var(--steel);
  font-size: .85rem;
}

/* 3. MISE EN PAGE ------------------------------------------- */
.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* 4. SOMMAIRE ----------------------------------------------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  border: 1px solid var(--steel-line);
  border-radius: var(--r-md);
  background: #fff;
}
.toc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary i { color: var(--blue); transition: transform .2s; }
.toc[open] summary i { transform: rotate(180deg); }
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0 .6rem .8rem;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex;
  gap: .55rem;
  padding: .5rem .55rem;
  border-radius: 8px;
  color: var(--steel);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex-shrink: 0;
  color: var(--signal);
  font-weight: 800;
  font-size: .8rem;
  padding-top: .1rem;
}
.toc a:hover { background: var(--mist); color: var(--ink); }
.toc a.is-active {
  background: var(--mist);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--signal);
}

/* 5. TEXTE DE L'ARTICLE ------------------------------------- */
.prose { max-width: 72ch; font-size: 1.08rem; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose h2 {
  margin: 2.6em 0 .7em;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 1.25rem; }
.prose ul, .prose ol { margin-bottom: 0; padding-left: 1.3rem; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--signal); }
.prose a {
  color: var(--blue);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--signal-dark); }
.prose strong { color: var(--ink); }
.prose .intro { font-size: 1.2rem; color: var(--ink); }

/* 6. ENCADRÉS ----------------------------------------------- */
/* À retenir */
.keypoints {
  padding: 1.5rem 1.6rem;
  border-radius: var(--r-md);
  background: var(--mist);
  border-left: 4px solid var(--blue);
}
.keypoints h2, .keypoints .box-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .8rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.keypoints .box-title i { color: var(--blue); }
.keypoints ul { padding-left: 1.2rem; }

/* Checklist du devis */
.checklist {
  list-style: none;
  padding: 0 !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.checklist li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin: 0 !important;
  padding: .9rem 1rem;
  border: 1px solid var(--steel-line);
  border-radius: var(--r-md);
  background: #fff;
  font-size: .98rem;
  line-height: 1.45;
}
.checklist li i {
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--ok);
  font-size: 1.25rem;
}
.checklist strong { display: block; }

/* Les 8 réflexes */
.reflexes {
  list-style: none;
  padding: 0 !important;
  counter-reset: reflex;
  display: grid;
  gap: .75rem;
}
.reflexes li {
  counter-increment: reflex;
  position: relative;
  margin: 0 !important;
  padding: 1rem 1.1rem 1rem 3.6rem;
  border-radius: var(--r-md);
  background: var(--mist);
}
.reflexes li::before {
  content: counter(reflex);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--signal);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
}
.reflexes strong { display: block; margin-bottom: .15rem; }

/* Avertissement neutre (informations juridiques) */
.notice {
  display: flex;
  gap: .8rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  border: 1px dashed var(--steel-line);
  color: var(--steel);
  font-size: .95rem;
}
.notice i { flex-shrink: 0; color: var(--blue); font-size: 1.3rem; }

/* FAQ de l'article : reprend .faq-list du site */
.article-faq { margin-top: 1rem; }

/* 7. ARTICLES ASSOCIÉS -------------------------------------- */
.related-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.related-head h2 { margin: 0; }

/* 8. RESPONSIVE --------------------------------------------- */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 640px) {
  .checklist { grid-template-columns: 1fr; }
  .prose { font-size: 1.02rem; }
  .article-cover img { border-radius: var(--r-md); }
}

/* Rubrique Blog soulignée dans le menu (on est dans un article du blog) */
.nav-link[aria-current="true"]::after { transform: scaleX(1); }
