/* Pages légales DECSI – autonome, clair + sombre */
:root, html[data-theme="dark"] {
  --bg: #0c0818; --bg-alt: #150f27; --text: #ece7f7; --muted: #a79cc0;
  --accent: #22f5e8; --link: #e06bff; --border: rgba(255,255,255,.12);
  --brand: #d9b3ec; --grad: linear-gradient(90deg,#c010c8,#22f5e8);
  --warn-bg: rgba(255,200,0,.08); --warn-border: rgba(255,200,0,.4);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #ffffff; --bg-alt: #f7f2fc; --text: #1c1130; --muted: #5f5478;
  --accent: #0a9f96; --link: #a00da7; --border: rgba(122,8,166,.16);
  --brand: #7a08a6; --grad: linear-gradient(90deg,#c010c8,#7a08a6);
  --warn-bg: #fff8e1; --warn-border: #e6b800;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.7; font-size: 1rem;
}

.legal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 5%; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 10;
}
.legal-header img { display: block; height: 56px; width: auto; }
.legal-actions { display: flex; align-items: center; gap: 1.2rem; }
.legal-actions a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.legal-actions a:hover { color: var(--link); }

.theme-toggle { display: flex; align-items: center; gap: .5rem; color: var(--brand); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.switch { position: relative; width: 42px; height: 22px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; border-radius: 22px; background: var(--border); transition: background .2s; }
.slider::before {
  content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px;
  border-radius: 50%; background: var(--brand); transition: transform .2s;
}
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--link); outline-offset: 2px; }

main { max-width: 820px; margin: 0 auto; padding: 3.5rem 5% 4rem; }
h1 {
  font-family: 'Syne', system-ui, sans-serif; font-weight: 800; line-height: 1.15;
  font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .4rem;
}
h1::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 1rem; border-radius: 2px; background: var(--grad); }
.updated { color: var(--muted); font-size: .9rem; margin: 1rem 0 2.5rem; }
h2 {
  font-family: 'Syne', system-ui, sans-serif; font-weight: 700; font-size: 1.35rem;
  margin: 2.5rem 0 .6rem; color: var(--brand);
}
p, li { max-width: 68ch; }
ul { padding-left: 1.2rem; }
li { margin-bottom: .35rem; }
a { color: var(--link); }
strong { font-weight: 600; }

dl.identity { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; margin: 0; }
dl.identity dt { color: var(--muted); }
dl.identity dd { margin: 0; }
@media (max-width: 560px) { dl.identity { grid-template-columns: 1fr; gap: 0; } dl.identity dd { margin-bottom: .7rem; } }

.todo { background: var(--warn-bg); border-left: 3px solid var(--warn-border); padding: .05rem .4rem; border-radius: 2px; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }

.legal-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 1.5rem 5%; display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between; color: var(--muted); font-size: .9rem;
}
.legal-footer ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.legal-footer a { color: var(--muted); text-decoration: none; }
.legal-footer a:hover { color: var(--link); }
