/* Pages légales du site vitrine (CGU, confidentialité, mentions légales).
   Chargée APRÈS site.css : reprend ses jetons (--navy, --green, --ink…), ses
   polices (Lexend / Inter) et son pied de page. Ne vaut que pour site/ ; les
   copies de hosting-legal/ (Firebase) gardent leur style embarqué. */

/* ---------- En-tête : bandeau marine du hero de l'accueil ---------- */
.legal-hero {
  position: relative;
  background:
    radial-gradient(900px 420px at 88% 0%, rgba(31, 176, 91, 0.22), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 18px 0 40px;
  overflow: hidden;
}
@media (min-width: 900px) { .legal-hero { padding: 22px 0 56px; } }
.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}
.legal-logo { display: block; flex: 0 1 240px; min-width: 120px; }
.legal-logo img { display: block; width: 100%; max-width: 240px; height: auto; }
.legal-nav { display: flex; gap: 22px; flex-shrink: 0; }
.legal-nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.legal-nav a:hover,
.legal-nav a[aria-current="page"] { color: #fff; }
.legal-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #5fd896; padding-bottom: 4px; }
/* Mobile : seul « Accueil » reste, en pastille ; les autres pages sont dans le pied. */
.legal-nav a:not(.legal-nav-home) { display: none; }
.legal-nav .legal-nav-home {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 14px;
}
@media (min-width: 860px) {
  .legal-nav a:not(.legal-nav-home) { display: inline; }
  .legal-nav .legal-nav-home { border: 0; padding: 0; font-size: 15px; border-radius: 0; }
}
.legal-hero .eyebrow { color: #7fe0a6; }
.legal-hero h1 { font-size: clamp(30px, 5vw, 44px); max-width: 18em; }
.legal-meta { margin-top: 12px; color: rgba(255, 255, 255, 0.68); font-size: 14px; }

/* ---------- Corps : sommaire + document ---------- */
.layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 16px 72px;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .layout { padding-left: 32px; padding-right: 32px; } }
@media (min-width: 900px) {
  .layout {
    max-width: var(--maxw);
    grid-template-columns: 220px minmax(0, 760px);
    gap: 56px;
    align-items: start;
  }
}
.layout p { margin: 0 0 12px; }
.layout ul, .layout ol.plain { margin: 0 0 12px; padding-left: 20px; }
.layout li { margin-bottom: 6px; }
.layout h3 { font-size: 16.5px; margin: 22px 0 8px; }
.lede { color: var(--ink-soft); }

.toc { display: none; }
@media (min-width: 900px) {
  .toc {
    display: block;
    position: sticky;
    top: 24px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px 18px 16px;
  }
  .toc-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-ink);
    font-weight: 600;
    margin-bottom: 12px;
  }
  .toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .toc li { margin: 0; }
  .toc a { display: block; font-size: 13.5px; color: var(--ink-soft); text-decoration: none; line-height: 1.4; }
  .toc a:hover { color: var(--green-ink); }
}

/* Résumé en tête de document */
.tldr {
  background: var(--green-soft);
  border: 1px solid rgba(31, 176, 91, 0.25);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 12px;
}
.tldr-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green-ink);
  margin-bottom: 10px;
}
.tldr ul { margin: 0; padding-left: 18px; }
.tldr li { font-size: 15px; }
.tldr li:last-child { margin-bottom: 0; }

/* Sections numérotées */
section.doc-section { padding: 34px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
section.doc-section:last-of-type { border-bottom: none; }
.section-num {
  display: inline-grid;
  place-items: center;
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border-radius: 99px;
  background: var(--navy);
  color: #fff;
  font-family: 'Lexend', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
h2.section-title { font-size: clamp(22px, 3vw, 26px); margin: 0 0 14px; }

.callout { background: var(--green-soft); border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-size: 15px; }
.callout-warn { background: #fdf3df; border: 1px solid #ecd9a8; color: #7a5400; }
.callout p:last-child { margin-bottom: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.86em;
}

/* Tableaux */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
thead th {
  text-align: left;
  background: var(--navy);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 11px 14px;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
tbody tr:last-child td { border-bottom: none; }
tbody td:first-child { font-weight: 600; }
/* Sur mobile, 1re colonne de largeur fixe modeste (sinon le texte le plus
   long du tableau dicte la largeur des deux colonnes). */
table th:first-child, table td:first-child { width: 38%; }
@media (min-width: 480px) { table th:first-child, table td:first-child { width: 30%; } }

/* Cartes : droits, contact, prestataires */
.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 16px 0; }
.right-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  border-top: 3px solid var(--green);
}
.right-card-title { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.right-card-body { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

.contact-block {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 18px;
  margin-top: 8px;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  flex-wrap: wrap;
}
.contact-row:last-child { border-bottom: none; }
.contact-label { color: var(--ink-faint); font-size: 14px; }

.provider-list { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.provider-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.provider-name { font-family: 'Lexend', 'Inter', sans-serif; font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.provider-row { margin-bottom: 10px; }
.provider-row:last-child { margin-bottom: 0; }
.provider-label {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-ink);
  font-weight: 600;
  margin-bottom: 3px;
}
.provider-value { font-size: 14.5px; line-height: 1.55; }

/* Mentions légales (page courte, sans sommaire) */
.legal-page { max-width: 760px; margin: 0 auto; padding: 36px 16px 72px; }
@media (min-width: 720px) { .legal-page { padding-left: 32px; padding-right: 32px; } }
.legal-page h2 { font-size: 22px; margin: 34px 0 12px; }
.legal-page p { margin-bottom: 12px; }

/* Note sous le document, au-dessus du pied du site */
.doc-note { margin-top: 18px; font-size: 13px; }
