/* ============================================================
   Adi Expert — custom.css
   Design system « pierre » (palette Monolith, ad.minimalism)
   ============================================================ */

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Baskervville", Georgia, "Times New Roman", serif;
  background-color: #f1f1f1;
  color: #101010;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Epilogue", "Segoe UI", sans-serif;
}

::selection {
  background: #101010;
  color: #f1f1f1;
}

/* Focus visible accessible */
:focus-visible {
  outline: 2px solid #101010;
  outline-offset: 3px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-family: "Epilogue", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: #101010;
  color: #f1f1f1;
}
.btn-primary:hover {
  background-color: #2b2e2a;
}

.btn-outline {
  border: 1px solid #bababa;
  color: #101010;
  background: transparent;
}
.btn-outline:hover {
  border-color: #101010;
}

/* ---------- Filets & repères éditoriaux ---------- */
.hairline {
  border-top: 1px solid #bababa;
}

.eyebrow {
  font-family: "Epilogue", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5a5e5a;
}

.section-num {
  font-family: "Epilogue", sans-serif;
  font-weight: 600;
  color: #bababa;
}

/* Lien nav : underline grow */
.nav-link {
  position: relative;
  padding: 0.4rem 0.2rem;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: #101010;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Dropdown desktop */
.dropdown-panel {
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.dropdown-trigger:hover .dropdown-panel,
.dropdown-trigger:focus-within .dropdown-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
}

/* ---------- Motion plan ---------- */

/* Cascade d'entrée du hero (CSS seul) */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-anim > * {
  opacity: 0;
  animation: rise 0.7s ease forwards;
}
.hero-anim > *:nth-child(1) { animation-delay: 0.08s; }
.hero-anim > *:nth-child(2) { animation-delay: 0.2s; }
.hero-anim > *:nth-child(3) { animation-delay: 0.32s; }
.hero-anim > *:nth-child(4) { animation-delay: 0.44s; }
.hero-anim > *:nth-child(5) { animation-delay: 0.56s; }

/* Apparition au scroll (pilotée par main.js) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Accordéons (details) */
details.accordion {
  border-top: 1px solid #bababa;
}
details.accordion:last-of-type {
  border-bottom: 1px solid #bababa;
}
details.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-family: "Epilogue", sans-serif;
  font-weight: 600;
}
details.accordion summary::-webkit-details-marker {
  display: none;
}
details.accordion summary::after {
  content: "+";
  font-family: "Epilogue", sans-serif;
  font-size: 1.3rem;
  color: #5a5e5a;
  transition: transform 0.2s ease;
}
details.accordion[open] summary::after {
  transform: rotate(45deg);
}
details.accordion .accordion-body {
  padding-bottom: 1.1rem;
}

/* Ligne pointillée sous les images — registre « data » */
.figure-caption {
  font-size: 0.85rem;
  color: #5a5e5a;
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-anim > * {
    opacity: 1;
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}