/* /public/css/cgv.css */

/* ==========================================================
   cgv.css — DT-ENERDIAG
   Page CGV — rendu glass public
   Dépend du style mère : /public/css/styles.css
   ========================================================== */

/* -------------------------------------------------------------------------
   Layout général
   ------------------------------------------------------------------------- */

.page-cgv .cgv-main {
  width: min(1240px, calc(100% - 32px));
  max-width: 1240px;
  margin: 26px auto 48px;
}

.page-cgv .cgv-panel {
  max-width: 1240px;
  margin-inline: auto;
}

.page-cgv .cgv-stack {
  display: grid;
  gap: 14px;
}

/* -------------------------------------------------------------------------
   Shell dynamique
   ------------------------------------------------------------------------- */

.page-cgv .cgv-dynamic-shell {
  display: grid;
  gap: 18px;
}

/* -------------------------------------------------------------------------
   Cartes CGV — niveau 2
   ------------------------------------------------------------------------- */

.page-cgv .cgv-card {
  padding: 14px;
}

.page-cgv .cgv-card + .cgv-card {
  scroll-margin-top: 24px;
}

.page-cgv .cgv-card--legacy-hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------
   Headers — alignés avec contact.html
   ------------------------------------------------------------------------- */

.page-cgv .cgv-card .rdv-frame-head {
  margin-bottom: 10px;
}

.page-cgv .cgv-card .rdv-card-kicker {
  margin: 0;
  color: rgba(15, 39, 71, 0.9);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

/* -------------------------------------------------------------------------
   Header informatif de version
   Pas de cadre englobant : seulement un header visuel.
   ------------------------------------------------------------------------- */

.page-cgv .cgv-reference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  min-height: 40px;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;

  background:
    linear-gradient(
      180deg,
      rgba(244, 249, 253, 0.88),
      rgba(181, 205, 226, 0.76)
    ),
    rgba(255, 255, 255, 0.46);

  border: 1px solid rgba(255, 255, 255, 0.56);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(15, 39, 71, 0.1),
    0 10px 22px rgba(0, 12, 28, 0.08);

  color: rgba(15, 39, 71, 0.92);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.25;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
}

.page-cgv .cgv-reference-header[hidden] {
  display: none;
}

.page-cgv .cgv-reference-header span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.page-cgv #cgvReferenceDate {
  justify-content: flex-end;
  text-align: right;
}

/* -------------------------------------------------------------------------
   Grille Archivage / Éditeur — niveau 2
   ------------------------------------------------------------------------- */

.page-cgv .cgv-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 18px;
  align-items: stretch;
}

.page-cgv .cgv-card--archive,
.page-cgv .cgv-card--editor {
  min-width: 0;
}

/* -------------------------------------------------------------------------
   Bloc interne lisible — niveau 3
   Même logique visuelle que contact.html
   ------------------------------------------------------------------------- */

.page-cgv .cgv-readable {
  padding: 11px 13px;
  border-radius: 12px;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.24),
      rgba(214, 230, 244, 0.16)
    ),
    rgba(255, 255, 255, 0.14);

  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(0, 12, 28, 0.06);

  backdrop-filter: blur(8px) saturate(1.12);
  -webkit-backdrop-filter: blur(8px) saturate(1.12);
}

/* -------------------------------------------------------------------------
   Typographie longue lecture
   ------------------------------------------------------------------------- */

.page-cgv .cgv-readable p {
  margin: 0 0 12px;
  color: rgba(15, 23, 42, 0.86);
  font-size: 0.9rem;
  font-weight: 620;
  line-height: 1.58;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.page-cgv .cgv-readable p:last-child {
  margin-bottom: 0;
}

.page-cgv .cgv-readable strong {
  color: rgba(15, 39, 71, 0.96);
  font-weight: 900;
}

.page-cgv .cgv-readable em {
  color: rgba(15, 23, 42, 0.78);
  opacity: 0.94;
}

.page-cgv .cgv-readable a {
  color: rgba(15, 64, 113, 0.98);
  font-weight: 900;
  text-decoration-thickness: 1.4px;
  word-break: break-word;
}

/* -------------------------------------------------------------------------
   Archivage — sélecteur + bouton sur une ligne
   ------------------------------------------------------------------------- */

.page-cgv .cgv-version-panel {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.page-cgv .cgv-version-picker__label {
  color: rgba(15, 39, 71, 0.94);
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

.page-cgv .cgv-version-picker__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-cgv .cgv-version-picker__select {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
  padding: 0.82rem 0.95rem;
  border-radius: 14px;

  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.48),
      rgba(232, 241, 250, 0.34)
    ),
    rgba(255, 255, 255, 0.2);

  color: rgba(15, 39, 71, 0.96);
  font-size: 0.94rem;
  font-weight: 850;
  outline: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 8px 18px rgba(0, 12, 28, 0.06);

  backdrop-filter: blur(8px) saturate(1.08);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
}

.page-cgv .cgv-version-picker__select:focus {
  border-color: rgba(31, 85, 145, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 0 3px rgba(31, 85, 145, 0.12),
    0 10px 20px rgba(0, 12, 28, 0.07);
}

/* -------------------------------------------------------------------------
   Bouton téléchargement — esprit documents portail
   ------------------------------------------------------------------------- */

.page-cgv .cgv-version-picker__button,
.page-cgv .cgv-document-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 190px;
  min-height: 46px;
  padding: 0.82rem 1.1rem;
  border-radius: 14px;

  border: 1px solid rgba(255, 255, 255, 0.46);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92),
      rgba(229, 239, 249, 0.78)
    ),
    rgba(255, 255, 255, 0.72);

  color: rgba(15, 64, 113, 0.98);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 20px rgba(0, 12, 28, 0.08);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.page-cgv .cgv-version-picker__button:hover,
.page-cgv .cgv-document-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 85, 145, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 13px 24px rgba(0, 12, 28, 0.11);
}

.page-cgv .cgv-version-picker__button.is-disabled,
.page-cgv .cgv-version-picker__button[aria-disabled="true"],
.page-cgv .cgv-document-button.is-disabled,
.page-cgv .cgv-document-button[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Statuts dynamiques
   ------------------------------------------------------------------------- */

.page-cgv .cgv-versions-status {
  margin: 0;
}

.page-cgv .cgv-readable .status {
  margin: 12px 0 16px;
}

/* -------------------------------------------------------------------------
   Éditeur
   ------------------------------------------------------------------------- */

.page-cgv .cgv-company-panel[hidden] {
  display: none;
}

.page-cgv .cgv-company-panel {
  display: grid;
  gap: 5px;
  align-content: start;
}

.page-cgv .cgv-company-panel p {
  margin: 0;
  color: rgba(15, 23, 42, 0.82);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.45;
}

.page-cgv .cgv-company-panel__name {
  color: rgba(15, 39, 71, 0.96) !important;
  font-size: 0.98rem !important;
  font-weight: 950 !important;
}

/* -------------------------------------------------------------------------
   Vue dynamique du contenu CGV
   Pas de cadre global autour des sections.
   ------------------------------------------------------------------------- */

.page-cgv .cgv-content-view {
  display: grid;
  gap: 18px;
}

.page-cgv .cgv-content-view[hidden] {
  display: none;
}

/* -------------------------------------------------------------------------
   Sections CGV — niveau 2 + contenu niveau 3
   ------------------------------------------------------------------------- */

.page-cgv .cgv-content-section {
  padding: 18px;
}

.page-cgv .cgv-content-section__body {
  display: grid;
  gap: 0;
}

/* -------------------------------------------------------------------------
   Sous-titres internes
   ------------------------------------------------------------------------- */

.page-cgv .cgv-content-subtitle,
.page-cgv .cgv-readable h3 {
  margin: 16px 0 8px;
  color: rgba(15, 64, 113, 0.96);
  font-size: 0.94rem;
  font-weight: 920;
  line-height: 1.35;
  letter-spacing: -0.006em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.page-cgv .cgv-content-subtitle:first-child,
.page-cgv .cgv-readable h3:first-child {
  margin-top: 0;
}

.page-cgv .cgv-content-lead {
  color: rgba(15, 39, 71, 0.98);
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.45;
}

.page-cgv .cgv-content-meta {
  color: rgba(15, 23, 42, 0.72);
  font-size: 0.9rem;
  font-weight: 760;
}

.page-cgv .cgv-content-notice {
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(219, 234, 254, 0.36);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: rgba(15, 39, 71, 0.9);
}

.page-cgv .cgv-content-warning {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 247, 237, 0.52);
  border: 1px solid rgba(251, 146, 60, 0.22);
  color: rgba(124, 45, 18, 0.94);
}

/* -------------------------------------------------------------------------
   Listes
   ------------------------------------------------------------------------- */

.page-cgv .cgv-readable ul,
.page-cgv .cgv-readable ol,
.page-cgv .cgv-readable .cgv-content-list {
  margin: 8px 0 14px;
  padding-left: 22px;
}

.page-cgv .cgv-readable ul:last-child,
.page-cgv .cgv-readable ol:last-child,
.page-cgv .cgv-readable .cgv-content-list:last-child {
  margin-bottom: 0;
}

.page-cgv .cgv-readable li {
  margin-bottom: 7px;
  color: rgba(15, 23, 42, 0.86);
  font-size: 0.94rem;
  font-weight: 620;
  line-height: 1.62;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.page-cgv .cgv-readable li:last-child {
  margin-bottom: 0;
}

.page-cgv .cgv-readable li::marker {
  color: rgba(15, 39, 71, 0.76);
  font-size: 0.95em;
}

/* -------------------------------------------------------------------------
   Sections annexes / sources legacy
   ------------------------------------------------------------------------- */

.page-cgv .cgv-card--annexe .cgv-readable,
.page-cgv .cgv-card--sources .cgv-readable {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.3),
      rgba(214, 230, 244, 0.18)
    ),
    rgba(255, 255, 255, 0.16);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .page-cgv .cgv-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .page-cgv .cgv-main {
    width: min(100% - 18px, 980px);
    margin-top: 18px;
    margin-bottom: 38px;
  }

  .page-cgv .cgv-stack,
  .page-cgv .cgv-dynamic-shell,
  .page-cgv .cgv-content-view {
    gap: 16px;
  }

  .page-cgv .cgv-card,
  .page-cgv .cgv-content-section {
    padding: 14px;
    border-radius: 18px;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /*
    Lecture mobile :
    - pas de sous-carte lourde ;
    - fond plat ;
    - confort sur texte long.
  */
  .page-cgv .cgv-readable {
    padding: 12px 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .page-cgv .cgv-readable + .cgv-readable,
  .page-cgv .cgv-content-section + .cgv-content-section {
    border-top: 1px solid rgba(148, 163, 184, 0.24) !important;
  }

  .page-cgv .cgv-reference-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin: 0 0 12px;
    padding: 0 0 10px;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(15, 39, 71, 0.86);
    font-size: 0.72rem;
    font-weight: 780;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-align: center;
  }

  .page-cgv #cgvReferenceDate {
    justify-content: center;
    text-align: center;
  }

  .page-cgv .cgv-readable p,
  .page-cgv .cgv-readable li {
    color: rgba(30, 41, 59, 0.88);
    font-size: 0.92rem;
    font-weight: 520;
    line-height: 1.62;
    text-shadow: none !important;
  }

  .page-cgv .cgv-readable p {
    margin-top: 0;
    margin-bottom: 0.82rem;
  }

  .page-cgv .cgv-readable ul,
  .page-cgv .cgv-readable ol,
  .page-cgv .cgv-readable .cgv-content-list {
    margin-top: 0.55rem;
    margin-bottom: 0.95rem;
    padding-left: 18px;
  }

  .page-cgv .cgv-readable li + li {
    margin-top: 0.44rem;
  }

  .page-cgv .cgv-readable h3,
  .page-cgv .cgv-content-subtitle {
    margin: 1rem 0 0.55rem;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    color: rgba(15, 39, 71, 0.9);
    font-size: 0.91rem;
    font-weight: 820;
    letter-spacing: 0.075em;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
    text-shadow: none !important;
  }

  .page-cgv .cgv-readable h4 {
    margin: 0.85rem 0 0.4rem;
    color: rgba(15, 39, 71, 0.86);
    font-size: 0.88rem;
    font-weight: 760;
    line-height: 1.35;
    text-shadow: none !important;
  }

  .page-cgv .cgv-version-picker__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .page-cgv .cgv-version-picker__select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .page-cgv .cgv-version-picker__button,
  .page-cgv .cgv-document-button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
  }

  .page-cgv .cgv-document-actions,
  .page-cgv .cgv-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .page-cgv .cgv-main {
    width: min(100% - 14px, 980px);
  }

  .page-cgv .cgv-card,
  .page-cgv .cgv-content-section {
    padding: 12px;
    border-radius: 16px;
  }

  .page-cgv .cgv-stack,
  .page-cgv .cgv-dynamic-shell,
  .page-cgv .cgv-content-view {
    gap: 14px;
  }

  .page-cgv .cgv-readable p,
  .page-cgv .cgv-readable li {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .page-cgv .cgv-readable ul,
  .page-cgv .cgv-readable ol,
  .page-cgv .cgv-readable .cgv-content-list {
    padding-left: 16px;
  }

  .page-cgv .cgv-reference-header {
    font-size: 0.68rem;
    letter-spacing: 0.085em;
  }

  .page-cgv .cgv-readable h3,
  .page-cgv .cgv-content-subtitle {
    font-size: 0.86rem;
    letter-spacing: 0.065em;
  }
}

/* -------------------------------------------------------------------------
   Séparateurs de parties V2.1 — CGV puis conditions d'intervention
   ------------------------------------------------------------------------- */

.page-cgv .cgv-content-part {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.page-cgv .cgv-content-part h2 {
  margin: 0;
  padding: 0.92rem 1.05rem;
  border-radius: 14px;
  background: rgba(31, 85, 132, 0.96);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
  box-shadow: 0 10px 22px rgba(0, 24, 52, 0.12);
}

.page-cgv .cgv-content-part__intro {
  border-left: 3px solid rgba(31, 85, 132, 0.84);
}

.page-cgv .cgv-content-part__intro .cgv-content-lead {
  margin: 0;
}


/* Coordonnées du médiateur visibles dans le fallback sans JavaScript. */
.cgv-mediator-fallback {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.cgv-mediator-fallback a,
.public-footer a {
  overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------
   18J — CGV source unique + barre de consultation moderne
   ------------------------------------------------------------------------- */

.page-cgv .cgv-panel.public-page-shell {
  max-width: none;
}

.page-cgv .cgv-dynamic-shell {
  display: grid;
  gap: 14px;
}

.page-cgv .cgv-control-bar {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(260px, 1.2fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.13);
}

.page-cgv .cgv-version-panel {
  gap: 7px;
}

.page-cgv .cgv-version-picker__label {
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.page-cgv .cgv-version-picker__select {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 10px;
}

.page-cgv .cgv-version-picker__button,
.page-cgv .cgv-document-button {
  min-width: 126px;
  min-height: 38px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.page-cgv .cgv-company-panel {
  align-self: center;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.page-cgv .cgv-reference-header {
  margin: 0;
  padding: 8px 11px;
  border-radius: 10px;
}

.page-cgv .cgv-content-view {
  gap: 12px;
}

.page-cgv .cgv-content-section {
  padding: 15px 17px;
  border-radius: 16px;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .page-cgv .cgv-control-bar {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px;
  }

  .page-cgv .cgv-company-panel {
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 0;
  }

  .page-cgv .cgv-version-picker__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .page-cgv .cgv-version-picker__select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* -------------------------------------------------------------------------
   18L-bis — Sommaire dynamique des chapitres
   ------------------------------------------------------------------------- */

.page-cgv .cgv-toc {
  display: grid;
  gap: 12px;
  padding: 13px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(59, 130, 246, 0.018)),
    rgba(8, 27, 49, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(0, 8, 20, 0.14);
}

.page-cgv .cgv-toc[hidden] {
  display: none !important;
}

.page-cgv .cgv-toc__head {
  color: rgba(248, 250, 252, 0.98);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.page-cgv .cgv-toc__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.page-cgv .cgv-toc__group {
  min-width: 0;
}

.page-cgv .cgv-toc__part {
  margin: 0 0 8px;
  color: rgba(191, 219, 254, 0.86);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.page-cgv .cgv-toc__links {
  display: grid;
  gap: 5px;
}

.page-cgv .cgv-toc__links a {
  display: block;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.72rem;
  font-weight: 610;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.page-cgv .cgv-toc__links a:hover,
.page-cgv .cgv-toc__links a:focus-visible {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.32);
  background: rgba(59, 130, 246, 0.12);
  outline: none;
}

.page-cgv .cgv-content-part,
.page-cgv .cgv-content-section {
  scroll-margin-top: 20px;
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .page-cgv .cgv-toc {
    padding: 11px;
    border-radius: 14px;
    box-shadow: none;
  }

  .page-cgv .cgv-toc__groups {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .page-cgv .cgv-toc__links a {
    padding: 8px 9px;
  }
}

/* -------------------------------------------------------------------------
   18N-bis — lecture CGV/CGI : sommaire sticky desktop, retour mobile
   ------------------------------------------------------------------------- */

.page-cgv .cgv-reading-layout {
  display: grid;
  grid-template-columns: minmax(230px, 286px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.page-cgv .cgv-toc {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100vh - 32px);
  overflow: auto;
  scrollbar-width: thin;
}

.page-cgv .cgv-toc__groups {
  grid-template-columns: 1fr;
  gap: 11px;
}

.page-cgv .cgv-toc__links a.is-active,
.page-cgv .cgv-toc__links a[aria-current="true"] {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.38);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.2), rgba(30, 64, 175, 0.18));
  box-shadow: inset 3px 0 0 rgba(125, 211, 252, 0.7);
}

.page-cgv .cgv-back-to-toc {
  display: none;
}

@media (max-width: 900px) {
  .page-cgv .cgv-reading-layout {
    grid-template-columns: minmax(200px, 238px) minmax(0, 1fr);
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .page-cgv .cgv-reading-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .page-cgv .cgv-toc {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .page-cgv .cgv-back-to-toc {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 5px;
    margin-top: 12px;
    padding: 6px 8px;
    border: 1px solid rgba(191, 219, 254, 0.2);
    border-radius: 9px;
    color: rgba(219, 234, 254, 0.92);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.69rem;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
  }

  .page-cgv .cgv-back-to-toc:focus-visible,
  .page-cgv .cgv-back-to-toc:hover {
    color: #ffffff;
    border-color: rgba(125, 211, 252, 0.4);
    background: rgba(59, 130, 246, 0.11);
    outline: none;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .page-cgv .cgv-back-to-toc {
    width: fit-content;
    margin-left: auto;
  }
}
