/* assets/front.css — styles front pour sommaire sticky + accordéons + layout */
:root {
  --hl-accent: #6366f1;
  --hl-border: #e2e8f0;
  --hl-text: #0f172a;
  --hl-muted: #64748b;
  --hl-bg: #ffffff;
  --hl-bg-soft: #f8fafc;
}

.hl-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  margin-top:2rem;
  margin-bottom:2rem;
}

.hl-toc {
  position: sticky;
  top: 2rem;
  background: var(--hl-bg);
  border: 1px solid var(--hl-border);
  border-radius: 8px;
}
.hl-toc__title {
  font-weight: 800;
  margin-bottom: 8px;
  padding: 14px;
}
.hl-toc__nav {
  display: flex;
  flex-direction: column;
}
.hl-toc__link {
  display: block;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--hl-text);
  text-decoration: none !important;
}
.hl-toc__link:hover {
  background: var(--hl-bg-soft);
}
.hl-toc__link.is-active {
  background: var(--hl-bg-soft);
}

.hl-content h1 {
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 2rem 0;
}

.hl-acc {
  border-bottom: 1px solid var(--hl-border);
  border-radius: 0;
  background: #fff;
  margin: 10px 0;
  overflow: hidden;
}
.hl-acc:last-of-type {
  border-bottom: none;
}

.hl-acc > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hl-acc > summary::-webkit-details-marker {
  display: none;
}
.hl-acc > summary::after {
  content: "";
  margin-left: auto;
  inline-size: 10px;
  block-size: 10px;
  border-inline-end: 2px solid var(--hl-text);
  border-block-end: 2px solid var(--hl-text);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}
.hl-acc[open] > summary::after {
  transform: rotate(45deg);
}
.hl-acc__body {
  padding: 0 16px 16px 2.2rem;
  color: var(--hl-text);
  overflow: hidden;
}
.hl-acc__body p {
  margin: 0.35rem 0;
}
.hl-acc__body em {
  color: var(--hl-muted);
}

/* Responsive */
@media (max-width: 980px) {
  .hl-layout {
    grid-template-columns: 1fr;
  }
  .hl-toc {
    position: relative;
    top: auto;
  }
}
