/* Fiches de lecture : la feuille et son onglet se détachent d'une tranche fixe. */
html[data-fat-topic="index"] .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
html[data-fat-topic="index"] .guide-card {
  position: relative;
  isolation: isolate;
  align-items: flex-start;
  padding: clamp(1.35rem, 3vw, 2.5rem);
  border: 0;
  background: #070a06;
  backdrop-filter: none;
  box-shadow: inset 0 0 0 1px #46513a;
}
html[data-fat-topic="index"] .guide-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px 5px 5px -1px;
  pointer-events: none;
  border: 1px solid #576448;
  border-top-color: #83916e;
  background: linear-gradient(122deg, #1d2519, #10150e 50%, #111710);
  transform-origin: left bottom;
}
html[data-fat-topic="index"] .guide-card .card-number {
  position: absolute;
  inset: 0 clamp(1.35rem, 3vw, 2.5rem) auto auto;
  padding: .3rem .6rem .45rem;
  color: #b7c5a5;
  background: #25301e;
  border: 1px solid #576448;
  border-top: 0;
  font: 500 .75rem/1.2 "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}
html[data-fat-topic="index"] .guide-card h2 {
  max-width: 17ch;
  margin-top: .5rem;
  color: #eef0e5;
}
html[data-fat-topic="index"] .guide-card > p:not(.eyebrow) {
  max-width: 46ch;
  margin-bottom: 1rem;
  color: #d3d8c8;
}
html[data-fat-topic="index"] .guide-card > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #b4ff63;
}
html[data-fat-topic="index"] .guide-card:focus-within::before {
  border-color: #a8ff3f;
  box-shadow: inset 3px 0 #a8ff3f;
}
@media (hover: hover) and (pointer: fine) {
  html[data-fat-topic="index"] .guide-card:hover::before {
    border-color: #8fa477;
    box-shadow: inset 3px 0 #a8ff3f;
  }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  html[data-fat-topic="index"] .guide-card::before {
    transform: perspective(65rem) rotateY(1.35deg);
    transition: transform 200ms ease-out;
  }
  html[data-fat-topic="index"] .guide-card:is(:hover, :focus-within)::before {
    transform: translate(-2px, -2px);
  }
}
@media (max-width: 700px) {
  html[data-fat-topic="index"] .card-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Le filet et le signe d'ouverture suivent l'état natif du panneau. */
html[data-fat-scene="faq"] .faq-list details {
  padding: 0;
  background: #10150e;
  border-color: #49523e;
}
html[data-fat-scene="faq"] .faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 3.45rem;
  padding: .85rem clamp(1.1rem, 3vw, 1.8rem);
  list-style: none;
  color: #e9ecdd;
}
html[data-fat-scene="faq"] .faq-list summary::-webkit-details-marker { display: none; }
html[data-fat-scene="faq"] .faq-list summary::after {
  content: "";
  flex: 0 0 1.3rem;
  height: 1.3rem;
  color: #c6cfba;
  border: 1px solid #637157;
  background:
    linear-gradient(currentColor, currentColor) center / .62rem 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px .62rem no-repeat;
}
html[data-fat-scene="faq"] .faq-list details[open] {
  border-color: #829c65;
  box-shadow: inset 3px 0 #a8ff3f;
  background: linear-gradient(100deg, #202b18, #10150e 55%);
}
html[data-fat-scene="faq"] .faq-list details[open] summary::after {
  color: #b4ff63;
  border-color: #a8ff3f;
  background-size: .62rem 1px, 0 0;
}
html[data-fat-scene="faq"] .faq-list details > p {
  margin: 0;
  padding: 0 clamp(1.1rem, 3vw, 1.8rem) 1.2rem;
  color: #d7ddcb;
}
html[data-fat-scene="faq"] .faq-list summary:focus-visible,
html[data-fat-topic="index"] .guide-card > a:focus-visible {
  outline: 2px solid #e9ecdd;
  outline-offset: -2px;
}
@media (forced-colors: active) {
  html[data-fat-scene="faq"] .faq-list summary { display: list-item; list-style: revert; }
  html[data-fat-scene="faq"] .faq-list summary::-webkit-details-marker { display: revert; }
  html[data-fat-scene="faq"] .faq-list summary::after { display: none; }
}

.guide-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .85rem;
  margin-top: 1.15rem;
}
.guide-files a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  color: #e9ecdd;
  font: 500 .78rem/1.2 "IBM Plex Mono", monospace;
  text-decoration: none;
  border-bottom: 1px solid #6b735f;
}
.guide-files a::before {
  content: "";
  width: .42rem;
  height: .42rem;
  background: #c5e696;
}
.guide-files a:nth-child(2)::before { background: #9bc5b4; }
.guide-files a:nth-child(3)::before { background: #e5b075; }
.guide-files a:nth-child(4)::before { background: #c6c7a6; }
.guide-files a:is(:hover, :focus-visible) {
  color: #b4ff63;
  border-color: currentColor;
}
