/* ============================================================
   DISCIPLINE-MODAL — fenêtre modale de détail par pratique
   ============================================================ */
/* Le détail d'une pratique s'ouvre en fenêtre modale, à l'apple :
   carte flottante centrée, fond assombri et flouté, une seule
   pratique ouverte à la fois (comportement natif de <dialog>). */
.detail-modal {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(880px, 92vw);
  max-height: 86vh;
  margin: auto;
  background: var(--paper);
  box-shadow: 0 40px 80px rgba(15, 33, 25, 0.35);
  overscroll-behavior: contain;
}

.detail-modal::backdrop {
  background: rgba(15, 33, 25, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-modal[open] {
  animation: modal-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.detail-modal[open]::backdrop {
  animation: modal-backdrop-in 0.4s ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-scroll {
  position: relative;
  max-height: 86vh;
  overflow-y: auto;
  padding: 0 0 44px;
}

.modal-close {
  position: sticky;
  top: 18px;
  left: 100%;
  transform: translateX(-18px);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(250, 248, 242, 0.9);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 33, 25, 0.2);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--paper);
  transform: translateX(-18px) scale(1.06);
}

.modal-figs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: -36px;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}

.modal-figs img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.03);
  display: block;
}

.modal-copy {
  max-width: 62ch;
  margin: 0 auto;
  padding: 36px 48px 0;
}

.modal-copy h4 {
  font-size: 1.28rem;
  color: var(--green-900);
  margin: 0 0 12px;
}

.modal-copy p {
  color: var(--ink-soft);
}

.modal-copy h4 + p {
  margin-bottom: 30px;
}

.detail-note {
  padding-top: 18px;
  border-top: 1px solid rgba(27, 67, 50, 0.16);
  font-size: 0.92rem;
  color: var(--green-700);
  font-weight: 600;
  margin-bottom: 0;
}

.practice .gain {
  font-size: 0.85rem;
  color: var(--green-700);
  font-weight: 600;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 67, 50, 0.14);
}

.single {
  margin: 0 auto;
  max-width: 72ch;
  text-align: center;
  padding-top: 32px;
  border-top: 2px solid var(--gold);
  color: var(--ink-soft);
}

.single b {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--green-900);
  margin-bottom: 10px;
}
