/* ══════════════════════════════════════════
       Surcharges — même style qu'index.html
    ══════════════════════════════════════════ */
body {
  font-family: 'DM Mono', monospace;
  padding: 40px 20px 60px;
  align-items: flex-start;
}

:root {
  --accent:    #c9a227;
  --accent2:   #e05555;
  --error:     #de0013;
  --cell-same: #f7f4e8;
  --sidebar-w: 220px;
}

body.dark {
  --accent:  #e8c547;
  --accent2: #ff6b6b;
  --error:   #ff4757;
}

/* ── HEADER ── */
header {
  margin-bottom: 36px; padding: 0 56px; text-align: center; width: 100%; align-self: stretch;
}

.site-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--accent) 0%, #f0a500 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}

.site-sub {
  color: var(--muted); font-size: 0.8rem; letter-spacing: 4px; text-transform: uppercase; margin-top: 8px;
}

.breadcrumb {
  font-size: 0.7rem; color: var(--muted); letter-spacing: 2px; margin-top: 10px;
}

.breadcrumb a {
  color: var(--accent-text); text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ── LAYOUT PRINCIPAL ── */
.page-layout {
  display: flex;
  gap: 32px;
  width: 100%;
  max-width: 1100px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 20px;
}

.sidebar-title {
  font-size: 0.6rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); padding: 0 0 10px 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar nav {
  display: flex; flex-direction: column; gap: 2px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  font-family: 'DM Mono', monospace; font-size: 0.78rem;
  color: var(--muted); text-decoration: none;
  border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; background: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  text-align: left; width: 100%;
}

.sidebar-link:hover {
  color: var(--text); background: var(--cell-hover);
}

.sidebar-link.active {
  color: var(--accent-text); background: var(--cell-selected);
  border-color: var(--border);
  font-weight: 500;
}

.sidebar-sep {
  height: 1px; background: var(--border); margin: 12px 0;
}

.sidebar-footer {
  margin-top: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

.sidebar-footer a {
  color: var(--accent-text); text-decoration: none;
}

/* ── CONTENU ── */
.content-area {
  flex: 1; min-width: 0;
}

.section-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; color: var(--text); line-height: 1.1;
}

.section-title span {
  background: linear-gradient(135deg, var(--accent) 0%, #f0a500 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.content-body {
  font-size: 0.88rem; line-height: 1.85; color: var(--muted);
}

.content-body p {
  margin-bottom: 1.2em;
}

.content-body strong {
  color: var(--text); font-weight: 500;
}

.content-body em {
  color: var(--accent-text); font-style: normal;
}

/* ── FOOTER LÉGAL (discret, bas de page — même style que index.html) ── */
.legal-footer {
  margin: 40px auto 0; padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  max-width: 640px; opacity: 0.55; width: 100%;
}

.legal-footer a, .legal-footer button {
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  color: var(--muted); text-decoration: none;
  background: none; border: none; cursor: pointer; transition: opacity 0.2s;
  display: inline-block; padding: 7px 6px; margin: -7px -6px;
}

.legal-footer a:hover, .legal-footer button:hover {
  opacity: 1; text-decoration: underline;
}

/* Cible tactile (WCAG 2.5.5, audit 12/09), écrans tactiles seuls. */
@media (pointer: coarse) {
  .legal-footer a, .legal-footer button { padding: 14px 8px; margin: -14px -8px; }
}

/* ── MOBILE ── */
.mobile-nav-toggle {
  display: none;
  width: 100%; padding: 10px 14px;
  font-family: 'DM Mono', monospace; font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  color: var(--muted); cursor: pointer; margin-bottom: 12px; text-align: left;
}

@media (max-width: 700px) {
  body {
    padding: 20px 12px 60px;
  }
  
  header {
    padding-left: 52px;
  }
  
  .page-layout {
    flex-direction: column; gap: 0;
  }
  
  .sidebar {
    position: relative; top: 0; width: 100%; margin-bottom: 20px;
  }
  
  .content-area {
    width: 100%;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .sidebar nav {
    display: none;
  }
  
  .sidebar nav.open {
    display: flex;
  }
  
  :root {
    --sidebar-w: 100%;
  }
}
