/* =============================================================
   proteger-mes-donnees.fr : Layout transverse
   Header, footer, fil d'Ariane, TOC, bandeau de consentement.
   ============================================================= */

/* ---- Header ----------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-white) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  height: var(--header-h); display: flex; align-items: center;
  justify-content: space-between; gap: var(--sp-5);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-weight: var(--ff-bold); letter-spacing: -0.02em; flex: none; }
.brand__name { white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, var(--c-primary-500), var(--c-primary-700));
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__name { font-size: var(--fs-base); line-height: 1.05; }
.brand__name small { display: block; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.02em; color: var(--text-muted); text-transform: none; }

.site-nav { display: flex; align-items: center; gap: var(--sp-2); }
.site-nav a {
  text-decoration: none; color: var(--text-secondary); font-weight: var(--ff-semibold);
  font-size: var(--fs-sm); padding: 0.5rem 0.75rem; border-radius: var(--r-sm);
}
.site-nav a:hover { color: var(--c-primary-800); background: var(--c-primary-50); }
.site-nav a[aria-current="page"] { color: var(--c-primary-800); background: var(--c-primary-50); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 0.5rem; cursor: pointer; color: var(--text); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1040px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--sp-3); box-shadow: var(--shadow-lg);
    transform: translateY(-130%); transition: transform var(--transition);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav[data-open="true"] { transform: translateY(0); }
  .site-nav a { padding: 0.85rem; font-size: var(--fs-base); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn:not(.nav-toggle) { display: none; }
}

/* ---- Fil d'Ariane ----------------------------------------- */
.breadcrumb { padding-block: var(--sp-4); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-primary-700); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--text); font-weight: var(--ff-semibold); }
.breadcrumb .sep { color: var(--border-strong); }

/* ---- TOC (sommaire ancré collant) ------------------------- */
.toc { align-self: start; }
.toc__label { font-size: var(--fs-xs); font-weight: var(--ff-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-3); }
.toc ul { list-style: none; padding: 0; border-left: 2px solid var(--border); }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.4rem 0 0.4rem var(--sp-4); margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.4; }
.toc a:hover { color: var(--c-primary-800); }
.toc a[aria-current="true"] { color: var(--c-primary-800); border-left-color: var(--c-primary-600); font-weight: var(--ff-semibold); }

/* ---- Footer ----------------------------------------------- */
.site-footer { background: var(--c-neutral-900); color: var(--c-neutral-300); margin-top: var(--sp-9); padding-block: var(--sp-8) var(--sp-6); }
.site-footer a { color: var(--c-neutral-300); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--sp-6); }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand { color: #fff; }
.footer-brand p { font-size: var(--fs-sm); color: var(--c-neutral-400); margin-top: var(--sp-3); max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: var(--fs-sm); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; font-size: var(--fs-sm); }
.footer-bottom { border-top: 1px solid var(--c-neutral-800); margin-top: var(--sp-7); padding-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; font-size: var(--fs-xs); color: var(--c-neutral-500); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---- Bandeau de consentement ------------------------------ */
.consent {
  position: fixed; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4);
  z-index: 60; max-width: 44rem; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--sp-5);
}
.consent[hidden] { display: none; }
.consent__head { display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-3); }
.consent__head .icon { width: 1.5rem; height: 1.5rem; color: var(--c-primary-600); flex: none; }
.consent h2 { font-size: var(--fs-md); }
.consent p { font-size: var(--fs-sm); color: var(--text-secondary); }
.consent__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }
.consent__actions .btn { flex: 1 1 auto; justify-content: center; }
/* Refuser aussi simple qu'Accepter : même poids visuel */
.consent__actions .btn-refuse { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.consent__actions .btn-refuse:hover { background: var(--bg-muted); }
.consent__link { margin-top: var(--sp-3); font-size: var(--fs-xs); text-align: center; }

/* =============================================================
   Layout article : prose + sidebar TOC
   ============================================================= */
.article-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-7); align-items: start; }
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, var(--measure)) 16rem; justify-content: center; gap: var(--sp-8); }
  .article-layout.toc-left { grid-template-columns: 16rem minmax(0, var(--measure)); }
  .article-layout.toc-left .toc { order: -1; }
  .toc { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

/* ---- Prose ------------------------------------------------ */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--sp-7); padding-top: var(--sp-2); scroll-margin-top: calc(var(--header-h) + 1rem); }
.prose h3 { font-size: var(--fs-lg); margin-top: var(--sp-6); }
.prose p, .prose li { color: var(--text-secondary); }
.prose strong { color: var(--text); font-weight: var(--ff-semibold); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.5em; }
.prose a { font-weight: var(--ff-semibold); }
