/* RGAA 12.7 — lien d’évitement */
.solcia-skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100000;
  color: #0a0a0a;
  background: #faebd7;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  font-family: system-ui, sans-serif;
}
.solcia-skip-link:focus,
.solcia-skip-link:focus-visible {
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  overflow: visible;
  outline: 3px solid #492e1c;
  outline-offset: 2px;
}
#contenu-juridique:focus,
#contenu-mentions:focus { outline: none; }

/* Charte Solcia — menu latéral gauche (desktop) / compact (mobile)
   Densité calibrée pour FHD 1920×1080 (lecture bureau, pas UI TV). */

.legal-wrapper {
  align-items: stretch;
  padding: 12px 14px 24px !important;
  max-width: 1080px;
  margin: 0 auto;
  box-sizing: border-box;
  font-size: 14px;
}

.charte-ux-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
}

.charte-ux-top {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 8px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(73, 46, 28, 0.14);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 15, 17, 0.12);
  backdrop-filter: blur(10px);
}

.charte-ux-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
  min-width: 0;
}

.charte-ux-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(73, 46, 28, 0.18);
  border-radius: 10px;
  background: #f6f1ea;
  color: #492e1c;
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-sizing: border-box;
}

.charte-ux-nav-toggle:hover {
  background: #ebe4da;
}

.charte-ux-nav-toggle .charte-ux-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: #492e1c;
  font-weight: 750;
  font-size: 0.9rem;
  min-width: 0;
}

.charte-ux-nav-arrow {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

.charte-ux-top.is-nav-collapsed .charte-ux-nav-body {
  display: none !important;
}

.charte-ux-top.is-nav-collapsed .charte-ux-brand-row {
  margin-bottom: 0;
}

.charte-ux-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: #492e1c;
  font-weight: 750;
  font-size: 0.82rem;
  min-width: 0;
}

.charte-ux-theme-btn {
  display: none !important;
}

/* Une seule barre d’onglets visible (Simple OU Complet) — tous viewports */
#charte-ux-tabs-slot .legal-tabs.is-parked,
.legal-tabs.is-parked {
  display: none !important;
}


/* Product picker (niveau 1) */
.charte-product-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  width: 100%;
  margin: 0 0 6px;
  padding: 3px;
  background: #ebe6dc;
  border: 1px solid rgba(73, 46, 28, 0.12);
  border-radius: 10px;
}

.charte-product-bar div {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  color: #492e1c;
  border: none;
  background: transparent;
}

.charte-product-bar div:hover {
  background: rgba(73, 46, 28, 0.06);
}

.charte-product-bar div.active {
  background: #492e1c;
  color: #f2eee6;
}

.charte-product-bar div.active i {
  opacity: 1;
}

/* Masqués par défaut ; switchProduct() force display:flex sur le produit actif */
#simple-legal-tabs [data-product]:not([data-product="solcia"]),
#tech-legal-tabs [data-product]:not([data-product="solcia"]) {
  display: none;
}

.charte-txt-body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #1f1f1f;
  /* Dossiers complets (VigiKid / Age Shield / Solcia) : texte entier, scroll page */
  max-height: none;
  overflow: visible;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(73, 46, 28, 0.1);
  border-radius: 12px;
}

/* Complet VK/AS : articles comme Solcia (pas de boîte Simple) */
#cat-tech-doc .tech-doc-article {
  font-size: inherit;
  line-height: 1.6;
}
#cat-tech-doc .tech-doc-article .charte-txt-gap {
  height: 0.55rem;
}
#cat-tech-doc .tech-doc-article ul.charte-checklist {
  margin: 0.4em 0 0.8em;
  padding-left: 1.2rem;
}
#cat-tech-doc .tech-doc-subhead {
  font-size: 1.05rem;
  margin: 1.1em 0 0.45em;
  color: #492e1c;
}

.charte-txt-body h3 { font-size: 1.05rem; margin: 1em 0 0.4em; color: #492e1c; }
.charte-txt-body h4 { font-size: 0.98rem; margin: 0.85em 0 0.35em; color: #492e1c; }
.charte-txt-body p { margin: 0.35em 0; }
.charte-txt-loading, .charte-txt-error { font-size: 0.9rem; color: #666; }

/* Toggle Simple / Complet — même rendu PC souris & Polypane (rail étroit OK) */
.charte-ux-top .legal-mode-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 6px;
  padding: 3px;
  gap: 3px;
  background: #f2eee6;
  border: 1px solid rgba(73, 46, 28, 0.1);
  border-radius: 10px;
  box-shadow: none;
  box-sizing: border-box;
  overflow: hidden;
}

.charte-ux-top .legal-mode-bar div,
.charte-ux-top .legal-mode-bar [role="tab"] {
  display: flex !important;
  justify-content: center;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 7px 3px !important;
  border-radius: 7px;
  font-size: 0.72rem !important;
  font-weight: 700;
  gap: 1px;
  line-height: 1.15;
  border: none;
  background: transparent;
  color: #492e1c;
  box-shadow: none;
  min-width: 0;
  max-width: 100%;
  min-height: 0 !important;
  overflow: hidden;
  box-sizing: border-box;
  text-align: center;
}
.charte-ux-top .legal-mode-bar .mode-label-main {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.charte-ux-top .legal-mode-bar .mode-label-sub {
  display: block !important;
  font-size: 0.55rem !important;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charte-ux-top .legal-mode-bar div i,
.charte-ux-top .legal-mode-bar [role="tab"] i {
  font-size: 0.7rem !important;
  opacity: 0.75;
  flex: 0 0 auto;
  margin: 0 0 1px;
}

.charte-ux-top .legal-mode-bar div:hover {
  background: rgba(73, 46, 28, 0.06);
}

.charte-ux-top .legal-mode-bar div.active,
.charte-ux-top .legal-mode-bar [role="tab"].active {
  background: #492e1c !important;
  color: #f2eee6 !important;
  box-shadow: none !important;
}

.charte-ux-top .legal-mode-bar div.active i {
  opacity: 1;
}

/* Annule le gonflement TV/FHD sur ce toggle (sinon PC ≠ Polypane) */
@media screen and (min-width: 1280px) {
  .charte-ux-top .legal-mode-bar [role="tab"],
  .charte-ux-top .legal-mode-bar div {
    min-height: 0 !important;
    padding: 7px 3px !important;
    font-size: 0.72rem !important;
  }
}

/* Search */
.charte-ux-search {
  display: block;
  margin: 0 0 6px;
}

.charte-ux-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(73, 46, 28, 0.14);
  background: #fff;
  color: #492e1c;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  box-shadow: none;
  min-height: 0;
}

.charte-ux-search input:focus {
  outline: none;
  border-color: rgba(73, 46, 28, 0.4);
}

.charte-ux-search button {
  display: none;
}

/* Vertical nav */
.charte-ux-top .legal-tabs,
#charte-ux-tabs-slot .legal-tabs {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.charte-ux-top .legal-tabs div,
#charte-ux-tabs-slot .legal-tabs div {
  width: 100%;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  gap: 6px;
  white-space: nowrap;
  border: none;
  box-shadow: none;
  background: transparent;
  color: #492e1c;
  min-height: 0;
}

.charte-ux-top .legal-tabs div i,
#charte-ux-tabs-slot .legal-tabs div i {
  width: 0.95rem;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}

.charte-ux-top .legal-tabs div:hover,
#charte-ux-tabs-slot .legal-tabs div:hover {
  background: rgba(73, 46, 28, 0.06);
}

.charte-ux-top .legal-tabs div.active,
#charte-ux-tabs-slot .legal-tabs div.active {
  background: #492e1c;
  color: #f2eee6;
  box-shadow: none;
  transform: none;
}

.charte-ux-top .legal-tabs div.active i,
#charte-ux-tabs-slot .legal-tabs div.active i {
  opacity: 1;
}

/* Always show full labels in sidebar */
.charte-ux-top .tab-text,
#charte-ux-tabs-slot .tab-text {
  display: inline !important;
}
.charte-ux-top .tab-text-short,
#charte-ux-tabs-slot .tab-text-short {
  display: none !important;
}

.charte-ux-hint {
  display: none;
}

/* Main column */
.charte-ux-main {
  min-width: 0;
}

.charte-mode {
  display: none;
  width: 100%;
  max-width: none;
}
.charte-mode.charte-mode--active {
  display: block;
  width: 100%;
  max-width: none;
}

.legal-container,
.legal-container--simple {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Complet : même bouton que Simple — seul le flux change (pas absolute sur le titre) */
#charte-mode-technique .legal-container {
  position: relative;
  max-width: 720px;
  padding-top: 12px;
}
#charte-mode-technique .legal-container > .btn-retour-inside {
  position: static;
  display: inline-flex;
  width: fit-content;
  margin: 0 0 14px;
  top: auto;
  left: auto;
  align-self: flex-start;
}
#charte-mode-technique .tech-schema-overview,
#charte-mode-technique #charte-complet-cadre {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  clear: both;
}

/* Carte résumé : densité FHD (écrase padding 45×55 de responsive_pc) */
.charte-ux-main .legal-container--simple {
  padding: 12px 16px 16px !important;
  max-width: 640px;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  max-height: calc(100vh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
}

.charte-ux-main .legal-container--simple > header {
  padding-left: 0;
  padding-right: 0;
}

.charte-ux-main .legal-container--simple .charte-simple-body {
  padding: 0 2px 10px !important;
}

.charte-ux-main .legal-container--simple .charte-simple-notice {
  margin: 0 0 8px !important;
  padding: 0.35rem 0 !important;
  border: none;
  background: transparent;
  font-size: 0.78rem;
}

.charte-ux-main .legal-container--simple .charte-simple-section {
  margin-bottom: 1.1rem;
}

.charte-ux-main .legal-container--simple .charte-simple-section h2 {
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  padding-bottom: 0.25rem;
}

.charte-ux-main .legal-container--simple .charte-simple-lead {
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0 0 0.55rem;
}

.charte-ux-main .legal-container--simple .charte-simple-list {
  line-height: 1.45;
  margin: 0 0 0.55rem;
  padding-left: 1.1rem;
}

.charte-ux-main .legal-container--simple .charte-simple-list li {
  margin-bottom: 0.25rem;
  font-size: 0.86rem;
}

.legal-container--simple header h1 {
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 1.2rem !important;
  line-height: 1.25;
  margin: 0 0 4px !important;
}

.legal-container--simple header,
.legal-container header {
  margin-bottom: 10px !important;
  padding-bottom: 10px !important;
  padding-top: 8px;
}

.legal-container--simple header .shield-logo,
.legal-container header .shield-logo,
header .shield-logo {
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  max-width: 100%;
}

.legal-container--simple .intro-pro {
  font-style: normal;
  max-width: 40rem;
  font-size: 0.88rem !important;
  margin: 0 0 8px !important;
  line-height: 1.4;
}

.charte-simple-notice {
  border: none;
  background: transparent;
  padding: 0 0 6px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.charte-ux-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}

.charte-ux-quick article {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(73, 46, 28, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: none;
}

.charte-ux-quick strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.charte-ux-quick span {
  font-size: 0.74rem;
  line-height: 1.35;
}

.charte-simple-body,
.charte-simple-body li,
.charte-simple-lead {
  font-size: 0.88rem;
  line-height: 1.45;
}

.charte-topic-block {
  border: 1px solid rgba(73, 46, 28, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  margin: 0.4rem 0;
  overflow: hidden;
}

.charte-topic-block > summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  background: transparent;
}
.charte-topic-block > summary::-webkit-details-marker { display: none; }
.charte-topic-block > summary::after {
  content: "▾";
  float: right;
  opacity: 0.75;
  color: #5c4030;
}
.charte-topic-block[open] > summary {
  border-bottom: 1px solid rgba(73, 46, 28, 0.08);
}
.charte-topic-block[open] > summary::after { content: "▴"; }
.charte-topic-block .charte-checklist,
.charte-topic-block ul {
  margin: 0;
  padding: 8px 18px 14px 2rem;
}

/* Texte juridique long — pli mobile (summary ouvrir / fermer) */
.charte-legal-fold {
  border: 1px solid rgba(73, 46, 28, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  margin: 0.65rem 0 1rem;
  overflow: hidden;
}
.charte-legal-fold > summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #492e1c;
  user-select: none;
}
.charte-legal-fold > summary::-webkit-details-marker { display: none; }
.charte-legal-fold > summary::after {
  content: "▾";
  float: right;
  opacity: 0.75;
}
.charte-legal-fold[open] > summary {
  border-bottom: 1px solid rgba(73, 46, 28, 0.1);
}
.charte-legal-fold[open] > summary::after { content: "▴"; }
.charte-legal-fold .charte-txt-body {
  margin: 0;
  border: 0;
  border-radius: 0;
  max-height: none;
}

html[data-theme="dark"] .charte-legal-fold,
html.dark .charte-legal-fold {
  background: rgba(30, 28, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.14);
}
html[data-theme="dark"] .charte-legal-fold > summary,
html.dark .charte-legal-fold > summary {
  color: #f2eee6;
}

.charte-ux-toplink {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  border: 1px solid rgba(73, 46, 28, 0.2);
  background: rgba(242, 238, 230, 0.95);
  color: #492e1c;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 650;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
}
.charte-ux-toplink.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.charte-ux-empty {
  display: none;
  margin: 0.75rem 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(73, 46, 28, 0.25);
  background: rgba(255, 255, 255, 0.75);
}
.charte-ux-empty.is-visible { display: block; }

/* Technique mode: hide search in sidebar */
.charte-ux-top.is-tech .charte-ux-search {
  display: none;
}

/* Densité FHD desktop : moins de chrome vertical (CNED : desktop ≥1025) */
@media screen and (min-width: 1025px) and (max-height: 1000px) {
  .charte-ux-quick {
    display: none;
  }

  .legal-wrapper {
    padding-top: 8px !important;
    padding-bottom: 16px !important;
  }

  .legal-container--simple,
  .legal-container {
    border-radius: 12px;
  }

  .charte-ux-main .legal-container--simple {
    max-height: calc(100vh - 16px);
    padding: 10px 14px 12px !important;
  }

  .btn-retour-inside {
    top: 10px !important;
    left: 10px !important;
    padding: 5px 10px !important;
    font-size: 0.75rem !important;
    gap: 5px !important;
  }
}

/* Mobile CNED : ≤1024 = compact (pas de palier tablette) */
@media screen and (max-width: 1024px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .legal-wrapper,
  .charte-ux-shell,
  .charte-ux-nav-slot,
  .charte-ux-top,
  .charte-ux-main,
  .charte-mode,
  .legal-container,
  .legal-container--simple {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .charte-ux-shell {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  header .shield-logo,
  .legal-container--simple header .shield-logo,
  .legal-container header .shield-logo {
    width: 128px !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
    max-width: min(128px, 42vw);
    margin-bottom: 8px !important;
  }

  .charte-ux-top {
    position: relative;
    top: auto;
    padding: 10px;
    border-radius: 14px;
    overflow: hidden;
  }

  .charte-ux-top .legal-mode-bar,
  .charte-ux-top .charte-product-bar,
  .charte-ux-search,
  .charte-ux-search input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Onglets docs : wrap (pas de bande qui élargit la page) */
  .charte-ux-top .legal-tabs,
  #charte-ux-tabs-slot .legal-tabs,
  #simple-legal-tabs.legal-tabs,
  #tech-legal-tabs.legal-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: visible !important;
    padding-bottom: 2px;
    box-sizing: border-box !important;
  }

  .charte-ux-top .legal-tabs div,
  #charte-ux-tabs-slot .legal-tabs div,
  #simple-legal-tabs.legal-tabs div,
  #tech-legal-tabs.legal-tabs div {
    width: auto !important;
    max-width: 100%;
    flex: 0 1 auto !important;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    white-space: nowrap;
    box-sizing: border-box;
  }

  .charte-ux-top .tab-text,
  #charte-ux-tabs-slot .tab-text {
    display: none !important;
  }
  .charte-ux-top .tab-text-short,
  #charte-ux-tabs-slot .tab-text-short {
    display: inline !important;
  }

  /* Une seule barre d’onglets visible (Simple OU Complet) */
  #charte-ux-tabs-slot .legal-tabs.is-parked,
  .legal-tabs.is-parked {
    display: none !important;
  }

  .legal-container--simple header,
  .legal-container--simple header h1,
  .legal-container--simple .intro-pro,
  .charte-simple-notice,
  .charte-ux-quick,
  .charte-ux-quick article,
  .charte-ux-quick span,
  .charte-simple-body {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal !important;
  }

  .legal-container--simple header h1 {
    font-size: clamp(1.1rem, 5.2vw, 1.45rem) !important;
    letter-spacing: 0.4px !important;
    line-height: 1.25;
  }

  .legal-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Mode Complet — titres de chapitre longs (ex. DISPOSITIONS GÉNÉRALES…) */
  .chapter-header {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
  }

  .chapter-header span {
    letter-spacing: 1.5px !important;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .chapter-header h2 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(1.05rem, 4.8vw, 1.45rem) !important;
    letter-spacing: 0.4px !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  .legal-chapter,
  .legal-chapter section,
  .article-body,
  .article-body p,
  .article-body li,
  .article-body a,
  .legal-content a,
  .legal-chapter a,
  .legal-notice,
  .legal-notice p,
  .legal-notice a,
  .legal-container a,
  .legal-container p {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .tech-schema-overview,
  .charte-tech-sommaire,
  .tech-schema-grid,
  .charte-simple-body,
  .charte-simple-notice {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tech-schema-overview h2 {
    font-size: clamp(0.95rem, 4.2vw, 1.1rem) !important;
    padding: 0 4px;
  }

  .charte-ux-quick {
    grid-template-columns: 1fr;
  }

  .btn-retour-inside {
    position: static;
    margin-bottom: 10px;
    width: fit-content;
  }

  /* Accordion juridique — visible au premier regard (CNED ≤1024) */
  details.charte-topic-block {
    border: 2px solid rgba(73, 46, 28, 0.28) !important;
    border-radius: 14px !important;
    background: #fff !important;
    margin: 0.65rem 0 !important;
  }

  details.charte-topic-block > summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #492e1c !important;
    background: #f6f1ea !important;
  }

  details.charte-topic-block > summary::after {
    content: "Ouvrir ▾" !important;
    float: none !important;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 1 !important;
    color: #492e1c !important;
    background: rgba(73, 46, 28, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
  }

  details.charte-topic-block[open] > summary::after {
    content: "Fermer ▴" !important;
  }

  details.charte-topic-block[open] > summary {
    background: #ebe4da !important;
  }

  .charte-legal-fold {
    border: 2px solid #492e1c !important;
    border-radius: 14px !important;
    margin: 0.85rem 0 1.1rem !important;
  }

  .charte-legal-fold > summary {
    min-height: 52px;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    background: #492e1c !important;
    color: #f2eee6 !important;
  }

  .charte-legal-fold > summary::after {
    content: "Ouvrir ▾" !important;
    color: #f2eee6 !important;
    float: none;
  }

  .charte-legal-fold[open] > summary::after {
    content: "Fermer ▴" !important;
  }

  /* Mode Complet : chapitres repliables */
  .legal-chapter:not(.active) {
    display: block !important;
  }

  .legal-chapter {
    border: 2px solid rgba(73, 46, 28, 0.22);
    border-radius: 14px;
    margin: 0.75rem 0;
    overflow: hidden;
    background: #fff;
  }

  .legal-chapter > .chapter-header {
    cursor: pointer;
    min-height: 52px;
    padding: 14px 16px !important;
    background: #f6f1ea;
  }

  .legal-chapter:not(.is-open) > :not(.chapter-header) {
    display: none !important;
  }

  .legal-chapter.is-open > .chapter-header {
    border-bottom: 1px solid rgba(73, 46, 28, 0.12);
    background: #ebe4da;
  }
}

@media screen and (max-width: 480px) {
  .legal-wrapper {
    padding: 14px 8px 28px !important;
  }

  .charte-ux-top {
    padding: 8px !important;
  }

  .charte-ux-top .legal-tabs div,
  #charte-ux-tabs-slot .legal-tabs div,
  #simple-legal-tabs.legal-tabs div,
  #tech-legal-tabs.legal-tabs div {
    padding: 7px 10px;
    font-size: 0.88rem;
  }

  .chapter-header h2 {
    font-size: clamp(0.98rem, 5vw, 1.2rem) !important;
  }
}
