/* CC-PACTE-01 (#819) — popin Pacte Confidentialité : taille moyenne, sidebar
   gauche + contenu. Le cadenas est un SYMBOLE d'engagement, sobre — jamais un
   badge officiel. Thème : clair par défaut + suit la page sombre (app vo-dark). */
/* retour 19 : LE vert des engagements (le vert du logo) — token LOCAL (#592 :
   les couleurs d'état/local ne vont pas dans colors.css, voie Cursor) ;
   candidat à une promotion en --colo-* de marque le jour venu. */
:root { --pacte-green: #00cec9; }
#pp-overlay {
  position: fixed;
  inset: 0;
  /* #847 point 3 : le Pacte s'ouvre AU-DESSUS de tout — y compris la popin
     Pricing plein écran (.pr-overlay, z-index 10000, #843) depuis laquelle
     l'icône du pied (#846) l'appelle. À 1200 il passait DERRIÈRE le verre.
     REVERT #847 = z-index 1200. */
  z-index: 10050;
  display: grid;
  place-items: center;
  background: rgba(20, 24, 38, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
#pp-overlay .pp-box {
  position: relative; /* le × absolu s'y accroche */
  /* retour Damien 2 : la popin est SOMBRE par défaut (quelle que soit la
     page — il la voyait blanche depuis /login) et PLUS LARGE. */
  /* retour 5 : encore plus large */
  width: min(1060px, calc(100vw - 32px));
  height: min(660px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-14, 14px);
  background: #171a26;
  color: #e8eaf2;
  font-family: var(--font, system-ui, sans-serif);
  box-shadow: 0 18px 60px rgba(10, 12, 24, 0.55);
  overflow: hidden;
}
/* retour Damien 3 : l'icône et le titre vivent DANS la sidebar, plus gros —
   le × reste seul, en haut à droite de la popin. */
/* retour 13 : le HEADER revient — icône + titre sur UNE ligne, plus gros,
   padding confortable. Le cadenas reste le vert du logo (retour 6). */
.pp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pp-lock { display: inline-grid; place-items: center; color: var(--pacte-green); }
.pp-head h2 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--text-rem-2, 1.9rem);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* #845 : la croix vient du composant partagé `.ui-x` (close-button.css) — ici
   la POSITION + la variante SOMBRE (la popin Pacte est sur fond #171a26 : la
   pastille blanche du gabarit clair y serait une tache). REVERT #845 =
   restaurer le bouton texte transparent d'origine. */
.pp-x { position: absolute; top: 12px; right: 14px; z-index: 2; }
.pp-box .pp-x {
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
  color: #9aa3b5;
}
.pp-box .pp-x:hover { background: rgba(255, 255, 255, .16); color: #e8eaf2; }

.pp-cols { flex: 1; display: flex; min-height: 0; }
.pp-nav {
  width: 236px;
  flex: none;
  padding: 24px 16px 18px; /* retour 11 : la colonne respire */
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.pp-item {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: var(--text-sm, 12.5px);
  color: #e8eaf2;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--radius-8, 8px);
}
.pp-item:hover { background: rgba(255, 255, 255, 0.07); }
.pp-item.on {
  background: color-mix(in srgb, var(--colo-fresh, #5A2EFF) 26%, transparent);
  color: #cfc4ff;
  font-weight: 600;
}

.pp-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm, 13px);
  line-height: 1.7;
}
/* retour 10 : le contenu scrolle, la barre de date reste FIXE en dessous */
.pp-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 36px 48px 40px; /* retours 5 + 11 : la zone respire encore */
}
.pp-body p { margin: 12px 0 0; color: color-mix(in srgb, #e8eaf2 84%, #171a26); }
/* retour Damien 8 : les liens de la popin en BLANC souligné blanc */
.pp-body a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #fff;
  text-underline-offset: 2px;
}
.pp-body a:hover { opacity: 0.85; }
.pp-body h1, .pp-body h2 { font-family: var(--font-title); font-weight: 400; line-height: 1.2; }
/* retour Damien 3 : le TITRE du document — gros, sans caps, typo classe */
.pp-body .lg-h1 {
  margin: 4px 0 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: var(--text-rem-2, 1.9rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #f2f3f8;
  text-wrap: balance;
}
/* retour 6 : ligne VERTE (le vert du logo) sous chaque h1 */
.pp-body .lg-h1::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--pacte-green);
}
/* retour Damien 2 : titres de sections en SATOSHI BOLD */
.pp-body .lg-h2 {
  margin: 30px 0 0;
  font-family: 'Satoshi', var(--font, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--text-rem-1, 1rem);
  letter-spacing: 0.01em;
  color: #f2f3f8;
}
/* retour Damien : la date de dernière mise à jour vit EN BAS du contenu */
.pp-updated {
  flex: none;
  margin: 0;
  padding: 10px 48px 20px; /* retour 11 : bottom ×2, aligné sur le contenu */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-2xs, 11.5px);
  color: #9aa3b5;
}
/* retour 10 : le Pacte en liste d'engagements — ticks verts, texte grossi */
.pp-pacte-intro {
  margin: 16px 0 0;
  font-size: var(--text-rem-1, 1.02rem);
  line-height: 1.6;
  color: #eef0f6;
}
.pp-pacte-lede {
  margin: 14px 0 0;
  font-size: var(--text-rem-1, 1.05rem);
  color: #cfd4e4;
}
.pp-pacte-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pp-pacte-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--text-rem-1, 1.02rem);
  line-height: 1.55;
  color: #eef0f6;
}
.pp-tick {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pacte-green) 18%, transparent);
  color: var(--pacte-green);
}
.pp-pacte-fin {
  margin: 26px 0 0;
  font-size: var(--text-sm, 13px);
  color: #9aa3b5;
}
/* retour Damien : « Télécharger le pacte de confidentialité » au pied de la sidebar */
/* retour 5 : « Télécharger le pacte » = petit bouton pilule contour */
.pp-num { opacity: 0.55; margin-right: 2px; } /* retour 9 : numérotation */
.pp-dl-pacte {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: auto 10px 4px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full, 999px);
  padding: 5px 12px;
  font: inherit;
  font-size: var(--text-2xs, 11px);
  font-weight: 400;
  color: #e8eaf2;
  text-align: center;
}
.pp-dl-pacte:hover { background: rgba(255, 255, 255, 0.08); }
.pp-btn-sm {
  appearance: none;
  background: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full, 999px);
  padding: 5px 12px;
  font: inherit;
  font-size: var(--text-2xs, 11px);
  color: #e8eaf2;
}
.pp-btn-sm:hover { background: rgba(255, 255, 255, 0.08); }
/* retour 7 : le choix cookies DANS la popin — symétrie stricte du bandeau */
.pp-cb-actions {
  display: flex;
  gap: 10px;
  margin: 16px 0 0;
  max-width: 420px;
}
.pp-cb-btn {
  flex: 1;
  appearance: none;
  background: transparent;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full, 999px);
  padding: 8px 0;
  font: inherit;
  font-size: var(--text-sm, 12.5px);
  font-weight: 600;
  color: #e8eaf2;
}
.pp-cb-btn:hover { background: rgba(255, 255, 255, 0.08); }
.pp-body ul { margin: 12px 0 0; padding-left: 20px; }
.pp-wait { color: #9aa3b5; }

/* #780 — onglet Médiation */
.pp-mediator {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--pacte-green);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius-8, 8px) var(--radius-8, 8px) 0;
  line-height: 1.65;
  color: #eef0f6;
}
.pp-ext { font-size: 0.85em; opacity: 0.7; }
.pp-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.pp-details {
  margin: 28px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-8, 8px);
  padding: 0 14px 4px;
}
.pp-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 4px;
  font-family: 'Satoshi', var(--font, system-ui, sans-serif);
  font-weight: 700;
  font-size: var(--text-rem-1, 1rem);
  color: #f2f3f8;
}
.pp-details summary::-webkit-details-marker { display: none; }
.pp-details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  color: var(--pacte-green);
  transition: transform 0.15s ease;
}
.pp-details[open] summary::before { transform: rotate(90deg); }
.pp-details summary:focus-visible {
  outline: 2px solid var(--pacte-green);
  outline-offset: 2px;
  border-radius: 4px;
}
.pp-details-lead {
  margin: 0 0 8px;
  font-size: var(--text-2xs, 11.5px);
  color: #9aa3b5;
}
.pp-legal-refs {
  margin: 0 0 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pp-legal-refs li {
  color: color-mix(in srgb, #e8eaf2 84%, #171a26);
  line-height: 1.55;
}

@media (max-width: 620px) {
  #pp-overlay .pp-box { height: min(640px, calc(100vh - 24px)); }
  .pp-cols { flex-direction: column; }
  .pp-nav {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text-fg, #1d2330) 8%, transparent);
    padding: 8px;
  }
}
