/* =========================================================================
   LEGAL — fenêtres des documents légaux (Mentions, CGV, Confidentialité,
   Cookies). Même esprit que le Guide des tailles, mais panneau large et
   défilable car le contenu est long. Ouverture/fermeture gérées par
   info-modals.js (data-open-modal / data-modal / close-modal).
   ========================================================================= */

.legal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 1rem;
  background: rgba(26, 24, 21, 0.55);
  backdrop-filter: blur(2px);
}
.legal-overlay[data-open="true"] {
  display: flex;
}

.legal-doc {
  position: relative;
  width: min(760px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--color-bg, #f4ede0);
  color: var(--color-text-primary, #1a1815);
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: clamp(1.75rem, 4vw, 3rem);
  -webkit-overflow-scrolling: touch;
}

.legal-doc__close {
  position: sticky;
  top: 0;
  float: right;
  margin: -0.5rem -0.5rem 0 1rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 24, 21, 0.08);
  color: var(--color-text-primary, #1a1815);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.legal-doc__close:hover {
  background: rgba(26, 24, 21, 0.16);
}

.legal-doc__eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-warm, #9a7b4f);
  margin: 0 0 0.5rem;
}
.legal-doc__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
  margin: 0 0 0.4rem;
}
.legal-doc__updated {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  opacity: 0.6;
  margin: 0 0 1.75rem;
}
.legal-doc h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 1.8rem 0 0.6rem;
}
.legal-doc h4 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin: 1.2rem 0 0.4rem;
}
.legal-doc p,
.legal-doc li {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(26, 24, 21, 0.85);
}
.legal-doc p { margin: 0 0 0.85rem; }
.legal-doc ul { margin: 0 0 0.85rem; padding-left: 1.2rem; }
.legal-doc li { margin-bottom: 0.35rem; }
.legal-doc strong, .legal-doc b { font-weight: 600; color: var(--color-text-primary, #1a1815); }
.legal-doc a { color: inherit; text-decoration: underline; }
.legal-doc hr {
  border: 0;
  border-top: 1px solid rgba(26, 24, 21, 0.15);
  margin: 1.75rem 0;
}
.legal-doc__note {
  font-size: 0.82rem;
  background: rgba(26, 24, 21, 0.05);
  border-left: 2px solid var(--color-accent-warm, #9a7b4f);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.legal-doc__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.25rem;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
}
.legal-doc__table th,
.legal-doc__table td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(26, 24, 21, 0.12);
  vertical-align: top;
}
.legal-doc__table th {
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Préférences cookies — lignes avec interrupteur */
.cookie-pref {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(26, 24, 21, 0.12);
}
.cookie-pref__txt b {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
}
.cookie-pref__txt span {
  display: block;
  margin-top: 2px;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  opacity: 0.7;
}
.cookie-pref input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: var(--color-accent-warm, #9a7b4f);
  cursor: pointer;
}
.cookie-pref input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.cookie-pref-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
