/* legal.css — layout shared by mentions-legales.html and confidentialite.html.

   Loaded AFTER assets/css/site.css (fonts + main site CSS). It is self-contained on
   purpose: it only relies on the font families declared there (Cormorant Garamond, Inter)
   and re-declares every color it needs, so a later palette change in the main CSS cannot
   silently break contrast here.

   Contrast (WCAG 2.x, computed 2026-10-01):
     text   #1a1205 on #fdfaf5 = 17.8:1   | on #f5efe3 = 16.2:1
     muted  #5c4b28 on #fdfaf5 =  8.1:1   | on #f5efe3 =  7.4:1
     accent #7d5d0a on #fdfaf5 =  5.9:1   | on #f5efe3 =  5.3:1
     white  #ffffff on #7d5d0a =  6.1:1
     dark footer: text #d8d0bd 12.9:1, muted #b9b09a 9.2:1, links #eedfa0 14.8:1 on #0d0a04
   The brand gold #b8921e is only 2.8:1 on the cream background, so it is used for
   decorative rules/borders here and NEVER for text. */

.legal-page {
  --lg-bg: #fdfaf5;
  --lg-bg2: #f5efe3;
  --lg-text: #1a1205;
  --lg-muted: #5c4b28;
  --lg-accent: #7d5d0a;
  --lg-gold: #b8921e;
  --lg-rule: rgba(184, 146, 30, .4);
  --lg-dark: #0d0a04;
  --lg-dark-text: #d8d0bd;
  --lg-dark-muted: #b9b09a;
  --lg-dark-link: #eedfa0;
  --lg-focus-dark: #d4aa38;
  --lg-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--lg-bg);
  color: var(--lg-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

/* ---------- Defensive resets ----------
   The main stylesheet (inherited from the original page) styles the BARE `nav`, `header` and
   `footer` elements as the fixed site header / big dark footer (position:fixed, blur, 5rem
   padding...). Anything below that is a <nav>, <header>, <main> or <section> of THIS page must
   not inherit those rules, whatever the main CSS ends up doing. Selectors here are deliberately
   more specific than any element selector. */
.legal-page .legal-header,
.legal-page .legal-main,
.legal-page .legal-doc section,
.legal-page .legal-doc nav,
.legal-page .legal-footer,
.legal-page .legal-footer nav {
  position: static;
  inset: auto;
  z-index: auto;
  transform: none;
  opacity: 1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  transition: none;
}
.legal-page .legal-doc section { padding: 0; margin: 0; background: none; border: 0; }
.legal-page .legal-footer nav {
  display: block;
  padding: 0;
  border: 0;
  background: none;
}

/* ---------- Skip link + focus ---------- */
.legal-skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: .7rem 1.1rem;
  border-radius: 8px;
  background: var(--lg-text);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: top .15s ease;
}
.legal-skip:focus { top: 1rem; }

.legal-page a:focus-visible {
  outline: 3px solid var(--lg-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.legal-footer a:focus-visible { outline-color: var(--lg-focus-dark); }
.legal-main:focus { outline: none; }

/* ---------- Header ---------- */
.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1rem;
  padding: 1rem clamp(1.2rem, 5vw, 5rem);
  background: var(--lg-bg);
  border-bottom: 1px solid var(--lg-rule);
}
.legal-logo {
  font-family: var(--lg-serif);
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--lg-text);
  text-decoration: none;
}
.legal-logo em { color: var(--lg-accent); font-style: italic; }
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem 1.1rem .5rem .9rem;
  border: 1.5px solid var(--lg-accent);
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--lg-text);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.legal-back::before { /* CSS chevron: no dependency on an arrow glyph in the subsetted fonts */
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin-right: .7em;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.legal-back:hover { background: var(--lg-accent); color: #fff; }

/* ---------- Main column ---------- */
.legal-main {
  flex: 1;
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 2rem) clamp(3rem, 8vw, 6rem);
}
.legal-doc { overflow-wrap: break-word; }

.legal-eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--lg-accent);
}
.legal-eyebrow::before {
  content: "";
  flex-shrink: 0;
  width: 1.8rem;
  height: 2px;
  border-radius: 2px;
  background: var(--lg-gold);
}

.legal-doc h1 {
  margin-bottom: .9rem;
  font-family: var(--lg-serif);
  font-size: clamp(2.2rem, 6vw, 3.3rem);
  font-weight: 600;
  line-height: 1.08;
}
.legal-meta { margin-bottom: 1.6rem; font-size: .9rem; color: var(--lg-muted); }
.legal-lead { margin-bottom: 1.8rem; font-size: 1.08rem; }

.legal-doc h2 {
  scroll-margin-top: 1rem;
  margin: 2.8rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--lg-rule);
  font-family: var(--lg-serif);
  font-size: clamp(1.55rem, 3.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}
.legal-doc h3 { margin: 1.6rem 0 .5rem; font-size: 1.02rem; font-weight: 600; }
.legal-doc p { margin-bottom: 1rem; }
.legal-doc ul,
.legal-doc ol { margin: 0 0 1.2rem 1.3rem; }
.legal-doc li { margin-bottom: .45rem; padding-left: .2rem; }
.legal-doc strong { font-weight: 600; }
.legal-doc a {
  color: var(--lg-accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.legal-doc a:hover { color: var(--lg-text); }

/* ---------- Table of contents ---------- */
.legal-toc {
  margin: 0 0 1rem;
  padding: 1.2rem 1.5rem;
  border: 1.5px solid var(--lg-rule);
  border-radius: 14px;
  background: var(--lg-bg2);
}
.legal-toc-title {
  margin-bottom: .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lg-muted);
}
.legal-toc ol { margin: 0 0 0 1.3rem; }
.legal-toc li { margin-bottom: .25rem; }

/* ---------- Summary box ("L'essentiel") ---------- */
.legal-summary {
  margin: 0 0 2rem;
  padding: 1.4rem 1.6rem;
  border: 1.5px solid var(--lg-rule);
  border-left: 4px solid var(--lg-gold);
  border-radius: 14px;
  background: var(--lg-bg2);
}
.legal-doc .legal-summary h2 {
  margin: 0 0 .8rem;
  padding: 0;
  border: 0;
  font-size: 1.5rem;
}
.legal-summary ul { margin-bottom: 0; }

/* ---------- Definition lists (identity blocks) and cards ---------- */
.legal-dl {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr;
  gap: .55rem 1.4rem;
  margin: 0 0 1.4rem;
}
.legal-dl dt {
  padding-top: .15rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lg-muted);
}
.legal-dl dd { margin: 0; overflow-wrap: anywhere; }

.legal-card {
  margin: 0 0 1.2rem;
  padding: 1.4rem 1.6rem 1.1rem;
  border: 1.5px solid var(--lg-rule);
  border-radius: 14px;
  background: var(--lg-bg2);
}
.legal-doc .legal-card h3 { margin-top: 0; font-family: var(--lg-serif); font-size: 1.3rem; font-weight: 600; }
.legal-card .legal-dl { margin-bottom: .4rem; }

@media (max-width: 600px) {
  .legal-dl { grid-template-columns: 1fr; gap: .1rem; }
  .legal-dl dt { margin-top: .8rem; }
  .legal-card, .legal-summary, .legal-toc { padding-left: 1.1rem; padding-right: 1.1rem; }
}

/* ---------- Placeholders generated by the build for missing values ---------- */
.legal-page mark.todo {
  padding: .05em .4em;
  border-radius: 5px;
  outline: 1.5px dashed var(--lg-accent);
  outline-offset: 1px;
  background: #ffe08a;
  color: var(--lg-text);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Footer ---------- */
.legal-footer {
  padding: 2.2rem clamp(1.2rem, 5vw, 5rem);
  background: var(--lg-dark);
  color: var(--lg-dark-text);
  font-size: .9rem;
}
.legal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: 48rem;
  margin: 0 auto;
}
.legal-footer p { margin: 0; color: var(--lg-dark-muted); }
.legal-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-footer a {
  display: inline-block;
  padding: .4rem 0;
  color: var(--lg-dark-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-footer a[aria-current="page"] { font-weight: 600; text-decoration: none; }

/* ---------- Print ---------- */
@media print {
  .legal-skip, .legal-header, .legal-footer ul, .legal-toc { display: none; }
  .legal-page { min-height: 0; background: #fff; color: #000; font-size: 11pt; }
  .legal-main { max-width: none; padding: 0; }
  .legal-doc a { color: #000; }
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .legal-card, .legal-summary { break-inside: avoid; background: #fff; }
  .legal-footer { padding: 1rem 0 0; border-top: 1px solid #000; background: #fff; color: #000; }
  .legal-footer p { color: #000; }
  .legal-page mark.todo { background: #fff; outline: 1px dashed #000; }
}
