/* ============================================================
   PAGES NUES des sites (opuslib.com/aide, puis /mentions-legales, /confidentialite, /cgv) — s.174.
   Reprise TELLE QUELLE de page-legale.css des prototypes validés (authorlib-web/design/site/pages-legales/,
   PAGES_LEGALES_NUES.md §5-§6 : cotes au pixel près) ; seuls changements : chemins des polices hébergées
   (commun/fonts), carte de contact de l'aide (PAGE_AIDE_NUE.md §2, maquette O3) et en-tête « Opus.Lib »
   (anneau + mot, point à l'accent — fiche SITES_OPUSLIB_AUTHORLIB_CREATORLIB.md §SO3, §SO8.2).
   Règles : aucun menu, aucun lien vers l'accueil ni les tarifs, logo non cliquable, aucun appel à un tiers.
   ============================================================ */

@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/spectral-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 500; font-display: swap; src: url(../fonts/spectral-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/spectral-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); }

/* ---------- Jetons · papier (clair) — repris de css/styles.css du site ---------- */
:root {
  --bleu-nuit: #0F1E33;
  --fond: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F6F9;
  --encre: #0F172A;
  --encre-2: #4B5563;      /* texte courant (contraste 7,5:1 sur --fond) */
  --encre-3: #6B7280;
  --encre-4: #8B95A5;
  --vert: #047857;         /* point du logotype */
  --accent-it: #1E3A5F;    /* italique des titres, numéros d'articles, liens */
  --bordure: #E5E7EB;
  --bordure-douce: #EEF0F3;
  --encadre-fond: #F7F8FA;
  --police-titre: "Spectral", Georgia, "Times New Roman", serif;
  --police-corps: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --police-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --colonne: 42rem;        /* 672 px de texte */
  --sommaire: 15.5rem;     /* 248 px */
  color-scheme: light;
}
/* ---------- Jetons · nuit d'encre (sombre) ---------- */
html[data-theme="sombre"] {
  --fond: #0A1322;
  --surface: #111D31;
  --surface-2: #14223A;
  --encre: #E8EDF5;
  --encre-2: #B4C0D2;
  --encre-3: #8D9BB1;
  --encre-4: #6F7E95;
  --vert: #34D399;
  --accent-it: #9DB8DC;
  --bordure: #22304A;
  --bordure-douce: #1A2740;
  --encadre-fond: #111D31;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.25rem; }
body {
  font-family: var(--police-corps);
  font-size: 1rem;              /* 16 px : jamais de zoom forcé sur iPhone */
  line-height: 1.7;
  color: var(--encre-2);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: var(--accent-it); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--accent-it); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- En-tête : emblème + logotype, NON cliquable, aucun menu ---------- */
.pl-tete { border-bottom: 1px solid var(--bordure); background: var(--fond); }
.pl-tete-in {
  width: min(100% - 2.5rem, 72rem); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem;
}
.pl-logo {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--police-titre); font-style: italic; font-weight: 600;
  font-size: 1.35rem; letter-spacing: -.01em; color: var(--encre); line-height: 1;
}
.pl-logo .point { color: var(--vert); }
.pl-logo .point-accent { color: var(--accent-it); }
.pl-anneau { width: 34px; height: 34px; border-radius: 8px; flex: none; box-shadow: 0 1px 2px rgba(15,23,42,.18); }
.pl-embleme { height: 34px; width: auto; }
.pl-embleme-sombre { display: none; }
html[data-theme="sombre"] .pl-embleme-clair { display: none; }
html[data-theme="sombre"] .pl-embleme-sombre { display: block; }
.pl-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3);
}

/* ---------- Grille : sommaire à gauche (ordinateur) + texte ---------- */
.pl-grille {
  width: min(100% - 2.5rem, 72rem); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, var(--colonne)); justify-content: center;
  padding-block: 2.75rem 4rem;
}
@media (min-width: 1080px) {
  .pl-grille { grid-template-columns: var(--sommaire) minmax(0, var(--colonne)); column-gap: 4rem; justify-content: center; padding-top: 3.5rem; }
}

/* Sommaire latéral (ordinateur ≥ 1080 px) */
.pl-sommaire { display: none; }
@media (min-width: 1080px) {
  .pl-sommaire {
    display: block; position: sticky; top: 1.5rem; align-self: start;
    max-height: calc(100vh - 3rem); overflow-y: auto; padding-right: .5rem;
    scrollbar-width: thin;
  }
}
.pl-sommaire-titre {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3);
  margin-bottom: .75rem;
}
.pl-sommaire ol, .pl-sommaire-mobile ol { list-style: none; padding: 0; }
.pl-sommaire li a, .pl-sommaire-mobile li a {
  display: grid; grid-template-columns: 2.1rem 1fr; gap: .25rem;
  text-decoration: none; color: var(--encre-2); font-size: .84rem; line-height: 1.35;
  padding: .32rem .5rem .32rem 0; border-radius: 6px;
}
.pl-sommaire li a:hover, .pl-sommaire-mobile li a:hover { color: var(--encre); background: var(--surface-2); }
.pl-sommaire .num, .pl-sommaire-mobile .num { color: var(--accent-it); font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-sommaire li.annexe a, .pl-sommaire-mobile li.annexe a { grid-template-columns: 1fr; }

/* ---------- Tête du texte ---------- */
.pl-sur {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3);
  margin-bottom: .6rem;
}
.pl-titre {
  font-family: var(--police-titre); font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 2.75rem); line-height: 1.12; letter-spacing: -.012em; color: var(--encre);
  text-wrap: balance;
}
.pl-titre em { font-style: italic; color: var(--accent-it); padding-bottom: .06em; }
.pl-sous { margin-top: .75rem; font-size: 1.02rem; line-height: 1.55; color: var(--encre-3); max-width: 38rem; }

/* Bloc d'identification (même logique que la page 1 du PDF) */
.pl-id {
  margin-top: 1.75rem; border: 1px solid var(--bordure); border-radius: 14px; background: var(--surface);
  padding: .35rem 1.1rem;
}
.pl-id-ligne {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: .25rem 1rem; align-items: baseline;
  padding-block: .7rem; border-bottom: 1px solid var(--bordure-douce); font-size: .9rem; line-height: 1.45;
}
.pl-id-ligne:last-child { border-bottom: 0; }
.pl-id dt { color: var(--encre-3); font-weight: 500; }
.pl-id dd { color: var(--encre); font-weight: 500; }
.pl-id sup { font-size: .68em; line-height: 0; }
.pl-empreinte { font-family: var(--police-mono); font-size: .8rem; color: var(--encre-2); font-weight: 400; letter-spacing: .01em; }
.pl-pdf {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none;
  color: var(--accent-it);
}
.pl-pdf:hover { text-decoration: underline; }
.pl-pdf svg { width: 18px; height: 18px; flex: none; }
.pl-pdf small { font-weight: 500; color: var(--encre-3); font-size: .82rem; }
@media (max-width: 560px) {
  .pl-id { padding: .25rem .95rem; }
  .pl-id-ligne { grid-template-columns: 1fr; gap: .1rem; padding-block: .6rem; }
  .pl-id dt { font-size: .78rem; }
}

/* Sommaire replié (téléphone et tablette < 1080 px) */
.pl-sommaire-mobile {
  margin-top: 1.25rem; border: 1px solid var(--bordure); border-radius: 14px; background: var(--surface);
}
@media (min-width: 1080px) { .pl-sommaire-mobile { display: none; } }
.pl-sommaire-mobile summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3rem; padding: .7rem 1.1rem; font-weight: 600; color: var(--encre); font-size: .95rem;
}
.pl-sommaire-mobile summary::-webkit-details-marker { display: none; }
.pl-sommaire-mobile summary .compte { font-weight: 500; color: var(--encre-3); font-size: .85rem; margin-left: .35rem; }
.pl-sommaire-mobile summary svg { width: 18px; height: 18px; flex: none; color: var(--encre-3); transition: transform .2s ease; }
.pl-sommaire-mobile[open] summary svg { transform: rotate(180deg); }
.pl-sommaire-mobile[open] summary { border-bottom: 1px solid var(--bordure-douce); }
.pl-sommaire-mobile ol { padding: .5rem .6rem .7rem 1.1rem; }
.pl-sommaire-mobile li a { font-size: .92rem; padding-block: .5rem; } /* cible ≥ 44 px avec l'interligne */

/* ---------- Corps : rendu du texte publié (syntaxe CGV_PREUVES §3.2) ---------- */
.pl-corps { margin-top: 2.5rem; }
.pl-intro { font-size: 1.04rem; color: var(--encre-2); }
.pl-corps h2 {
  font-family: var(--police-titre); font-weight: 600;
  font-size: clamp(1.3rem, 3.2vw, 1.55rem); line-height: 1.3; letter-spacing: -.008em; color: var(--encre);
  margin-top: 2.6rem; margin-bottom: .8rem; padding-top: 1.6rem; border-top: 1px solid var(--bordure);
  scroll-margin-top: 1rem;
}
.pl-corps h2 .num { color: var(--accent-it); margin-right: .4rem; font-variant-numeric: tabular-nums; }
.pl-corps h3 {
  font-family: var(--police-corps); font-weight: 600; font-size: 1.02rem; line-height: 1.45; color: var(--encre);
  margin-top: 1.6rem; margin-bottom: .45rem; scroll-margin-top: 1rem;
}
.pl-corps h3 .num { color: var(--accent-it); margin-right: .35rem; font-variant-numeric: tabular-nums; }
.pl-corps p { margin-bottom: .95rem; }
.pl-corps strong { color: var(--encre); font-weight: 600; }
.pl-corps ul { list-style: none; padding: 0 0 0 1.25rem; margin: 0 0 1rem; }
.pl-corps li { position: relative; margin-bottom: .4rem; }
.pl-corps li::before { content: "–"; position: absolute; left: -1.25rem; color: var(--encre-4); }
.pl-encadre {
  background: var(--encadre-fond); border: 1px solid var(--bordure); border-left: 3px solid var(--accent-it);
  border-radius: 10px; padding: 1rem 1.2rem .25rem; margin: .4rem 0 1.25rem; font-size: .95rem; line-height: 1.65;
}
.pl-encadre p { margin-bottom: .75rem; }

/* Lien d'ancre discret à la fin de chaque titre (copier le lien d'un article) */
.pl-ancre { margin-left: .4rem; color: var(--encre-4); text-decoration: none; font-family: var(--police-corps); font-weight: 500; font-size: .8em; opacity: 0; transition: opacity .15s; }
.pl-corps h2:hover .pl-ancre, .pl-corps h3:hover .pl-ancre, .pl-ancre:focus-visible { opacity: 1; }
@media (hover: none) { .pl-ancre { display: none; } }

/* ---------- Versions précédentes (CGV seulement) ---------- */
.pl-versions { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--bordure); }
.pl-versions h2 { font-family: var(--police-corps); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-3); margin-bottom: .6rem; }
.pl-versions p { font-size: .9rem; color: var(--encre-3); margin-bottom: .6rem; }
.pl-versions ul { list-style: none; padding: 0; font-size: .9rem; }
.pl-versions li { display: flex; flex-wrap: wrap; gap: .25rem .9rem; padding-block: .45rem; border-bottom: 1px solid var(--bordure-douce); }
.pl-versions li span { color: var(--encre-3); }

/* ---------- Pied : autres textes, éditeur, haut de page ---------- */
.pl-pied { border-top: 1px solid var(--bordure); background: var(--surface); }
.pl-pied-in {
  width: min(100% - 2.5rem, 72rem); margin-inline: auto; padding-block: 1.6rem 2rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 2rem;
  font-size: .86rem; color: var(--encre-3);
}
.pl-autres { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.2rem; }
.pl-autres .lib { font-weight: 600; color: var(--encre-2); }
.pl-autres a { color: var(--encre-2); text-decoration: none; }
.pl-autres a:hover { color: var(--encre); text-decoration: underline; }
.pl-autres a[aria-current="page"] { color: var(--encre); font-weight: 600; text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pl-editeur { flex-basis: 100%; line-height: 1.55; }
.pl-haut { color: var(--encre-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.pl-haut:hover { color: var(--encre); text-decoration: underline; }
@media (max-width: 560px) {
  .pl-autres { flex-direction: column; align-items: flex-start; gap: .1rem; }
  .pl-autres a { display: inline-block; padding-block: .45rem; }
  .pl-editeur { order: 3; }
  .pl-haut { order: 4; }
}

/* ---------- Carte de contact de l'aide (PAGE_AIDE_NUE.md §2 ; une ligne par univers, maquette O3) ---------- */
.pl-contact { margin: 1.75rem 0 2.25rem; padding: .4rem 1.5rem 1.3rem; background: var(--surface); border: 1px solid var(--bordure); border-radius: 1rem; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 22px rgba(15,23,42,.05); }
.pl-ligne { padding-block: 1rem 1.05rem; border-bottom: 1px solid var(--bordure-douce); }
.pl-ligne-k { font-size: .9rem; color: var(--encre-2); margin: 0 0 .3rem; }
.pl-contact-mail { display: inline-block; font-family: var(--police-titre); font-weight: 600; font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); color: var(--encre); text-decoration: none; letter-spacing: -.01em; border-bottom: 2px solid var(--vert); padding-bottom: 1px; word-break: break-all; user-select: all; }
.pl-contact-mail:hover { color: var(--encre); }
.pl-contact-delai { display: flex; gap: .55rem; align-items: center; margin: 1rem 0 0; font-size: .92rem; font-weight: 500; color: var(--encre-2); }
.pl-contact-delai svg { width: 1.05rem; height: 1.05rem; color: var(--vert); flex-shrink: 0; }
.pl-contact-note { margin: .55rem 0 0; font-size: .86rem; color: var(--encre-3); line-height: 1.55; }
.pl-contact-note strong { color: var(--encre); font-weight: 600; }

/* ---------- Gabarit sans texte (page non publiée tant que son texte n'existe pas) ---------- */
.pl-a-ecrire { margin-top: 2.5rem; padding: 1.2rem 1.4rem; border: 1.5px dashed var(--bordure); border-radius: 12px; color: var(--encre-3); font-size: .95rem; }

/* ---------- Impression : texte seul, noir sur blanc ---------- */
@media print {
  html[data-theme] { --fond: #fff; --surface: #fff; --encre: #000; --encre-2: #1F2937; --encre-3: #4B5563; --accent-it: #1E3A5F; --bordure: #D1D5DB; color-scheme: light; }
  .pl-sommaire, .pl-sommaire-mobile, .pl-pied .pl-haut, .pl-ancre { display: none !important; }
  .pl-embleme-sombre { display: none !important; } .pl-embleme-clair { display: block !important; }
  .pl-grille { display: block; padding: 0; width: auto; }
  body { font-size: 10.5pt; }
  .pl-corps h2 { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
