/* ============================================================================
   legal.css — pages légales (mentions légales, confidentialité, CGU).

   Mobile : une colonne, sommaire repliable en tête.
   Desktop (≥ 900px) : sommaire collant à gauche + texte sur la largeur
   restante, pas de module étroit centré (cf. desktop.css).
   ============================================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #eef4ec; font-family: 'Nunito', Arial, sans-serif; color: #1a3a25; min-height: 100vh; display: flex; flex-direction: column; }

.legal-hero { background: #0f5028; padding: 30px 20px 46px; }
.legal-hero-inner { max-width: 1240px; margin: 0 auto; }
.legal-badge { display: inline-block; background: #a8e6bf; color: #1a3a25; font-size: 0.8rem; font-weight: 800; padding: 5px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.legal-hero h1 { font-family: 'Baloo 2', Arial, sans-serif; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 900; color: #fff; line-height: 1.15; }
.legal-maj { color: #a8e6bf; font-size: 0.9rem; font-weight: 600; margin-top: 6px; }

.legal-layout { width: 100%; max-width: 1240px; margin: -24px auto 40px; padding: 0 16px; display: grid; grid-template-columns: 1fr; gap: 16px; position: relative; }

/* Sommaire */
.legal-toc { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(30,110,62,0.10); padding: 14px 18px; }
.legal-toc summary { font-weight: 800; color: #0f5028; cursor: pointer; list-style: none; }
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc summary::after { content: ' ▾'; }
.legal-toc[open] summary::after { content: ' ▴'; }
.legal-toc ol { list-style: none; margin-top: 10px; }
.legal-toc a { display: block; padding: 6px 0; color: #2c4a34; text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.legal-toc a:hover { color: #1e6e3e; text-decoration: underline; }

/* Texte */
.legal-body { background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(30,110,62,0.10); padding: 24px 20px 32px; line-height: 1.65; }
.legal-body section { scroll-margin-top: 80px; }
.legal-body section + section { margin-top: 30px; padding-top: 24px; border-top: 1px solid #e5ede8; }
.legal-body h2 { font-family: 'Baloo 2', Arial, sans-serif; font-size: 1.35rem; font-weight: 900; color: #0f5028; margin-bottom: 10px; }
.legal-body h3 { font-size: 1.02rem; font-weight: 800; color: #1a3a25; margin: 18px 0 6px; }
.legal-body p, .legal-body li { font-size: 0.97rem; color: #2c4a34; }
.legal-body p + p { margin-top: 10px; }
.legal-body ul { margin: 8px 0 8px 20px; }
.legal-body li + li { margin-top: 4px; }
.legal-body a { color: #1e6e3e; font-weight: 700; }
.legal-body strong { color: #1a3a25; }

/* Encadré « en bref » */
.legal-bref { background: #eef4ec; border-left: 4px solid #1e6e3e; border-radius: 0 12px 12px 0; padding: 16px 18px; }
.legal-bref h2 { margin-bottom: 8px; }

/* Tableaux (traitements, cookies) : défilement horizontal sur mobile */
.legal-table-wrap { overflow-x: auto; margin: 12px 0; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid #e5ede8; color: #2c4a34; }
.legal-body th { background: #eef4ec; color: #0f5028; font-weight: 800; }

/* Champ restant à compléter (identité de l'éditeur) */
.a-completer { background: #fff3cd; color: #7a5a00; padding: 0 4px; border-radius: 4px; font-weight: 700; }

@media (min-width: 900px) {
  .legal-hero { padding: 40px 32px 56px; }
  .legal-layout { grid-template-columns: 260px 1fr; gap: 28px; padding: 0 32px; align-items: start; }
  .legal-toc { position: sticky; top: 84px; }
  .legal-toc summary { pointer-events: none; }
  .legal-toc summary::after { content: ''; }
  .legal-body { padding: 36px 44px 44px; }
  .legal-body p, .legal-body li { max-width: 80ch; }
}

html.dark .legal-hero { background: #0a2413; }
html.dark .legal-toc, html.dark .legal-body { background: #1a2b1e; box-shadow: 0 4px 24px rgba(0,0,0,0.4); }
html.dark .legal-toc summary, html.dark .legal-body h2 { color: #7ab88e; }
html.dark .legal-toc a, html.dark .legal-body p, html.dark .legal-body li, html.dark .legal-body td { color: #c8e6d4; }
html.dark .legal-body h3, html.dark .legal-body strong { color: #e8f5ee; }
html.dark .legal-body a { color: #52b788; }
html.dark .legal-body section + section, html.dark .legal-body th, html.dark .legal-body td { border-color: #2d4030; }
html.dark .legal-body th, html.dark .legal-bref { background: #243328; }
html.dark .legal-body th { color: #7ab88e; }
html.dark .a-completer { background: #4a3d10; color: #ffe08a; }
