/* Volet partage : feuille de partage, page publique, invitation, QR plein écran.
   Feuille autonome (les pages du partage ne chargent pas app.css). Clair et sombre. */

:root {
  --pt-fond: #f6f8fa;
  --pt-surface: #ffffff;
  --pt-texte: #24313c;
  --pt-doux: #5a6a75;
  --pt-bord: #dfe6ec;
  --pt-accent: #2f6f94;
  --pt-accent-texte: #ffffff;
  --pt-accent-doux: #e3edf3;
  --pt-ok: #2e7d4f;
  --pt-ok-doux: #e5f3eb;
  --pt-alerte: #a8432f;
  --pt-ombre: 0 1px 2px rgba(20, 40, 60, .06), 0 4px 14px rgba(20, 40, 60, .05);
  --pt-rayon: 10px;
  color-scheme: light;
}
/* Sombre seulement sur demande explicite (attribut data-sombre) : par défaut, toujours clair. */
@media (prefers-color-scheme: dark) {
  :root[data-sombre]:not([data-scheme="light"]) {
    --pt-fond: #161c21;
    --pt-surface: #1f272e;
    --pt-texte: #dde5eb;
    --pt-doux: #9aa8b3;
    --pt-bord: #34404a;
    --pt-accent: #6aa5c4;
    --pt-accent-texte: #0f1a21;
    --pt-accent-doux: #263844;
    --pt-ok: #7cc49b;
    --pt-ok-doux: #1f3529;
    --pt-alerte: #e59a86;
    --pt-ombre: none;
    color-scheme: dark;
  }
}
:root[data-scheme="dark"] {
  --pt-fond: #161c21; --pt-surface: #1f272e; --pt-texte: #dde5eb; --pt-doux: #9aa8b3; --pt-bord: #34404a;
  --pt-accent: #6aa5c4; --pt-accent-texte: #0f1a21; --pt-accent-doux: #263844; --pt-ok: #7cc49b; --pt-ok-doux: #1f3529;
  --pt-alerte: #e59a86; --pt-ombre: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pt {
  margin: 0;
  background: var(--pt-fond);
  color: var(--pt-texte);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.pt a { color: var(--pt-accent); }
.pt h1 { font-size: 1.6rem; line-height: 1.25; margin: .2rem 0 .3rem; letter-spacing: -.01em; }
.pt h2 { font-size: 1.08rem; margin: 0 0 .6rem; }
.pt-ico { width: 16px; height: 16px; flex: none; }

/* ---------- boutons */
.pt-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: .45rem .95rem;
  border: 1px solid var(--pt-bord); border-radius: 8px;
  background: var(--pt-surface); color: var(--pt-texte);
  font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer;
}
.pt .pt-btn { color: var(--pt-texte); }
.pt-btn:hover { border-color: var(--pt-accent); }
.pt-btn:focus-visible, .pt-lien-btn:focus-visible, .pt-ajout:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt .pt-btn-accent { background: var(--pt-accent); border-color: var(--pt-accent); color: var(--pt-accent-texte); }
.pt-btn-accent:hover { filter: brightness(1.06); }
.pt-btn-grand { min-height: 48px; padding: .6rem 1.3rem; font-size: 1.02rem; }
.pt-btn[disabled] { opacity: .6; cursor: default; }
.pt-btn.pt-fait { border-color: var(--pt-ok); color: var(--pt-ok); }
.pt-lien-btn {
  background: none; border: 0; padding: .3rem .1rem; font: inherit; font-size: .9rem;
  color: var(--pt-doux); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.pt-lien-btn:hover { color: var(--pt-alerte); }
.pt-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .7rem 0 0; }
.pt-actions-discretes { gap: 1rem; margin-top: .3rem; }

/* ---------- gestion (feuille de partage, mes partages, suivis) */
.pt-feuille { max-width: 760px; margin: 0 auto; padding: 18px 16px 64px; }
.pt-feuille-large { max-width: 1180px; }
.pt-fil { margin: 0 0 1rem; font-size: .92rem; color: var(--pt-doux); }
.pt-fil a { text-decoration: none; }
.pt-fil a:hover { text-decoration: underline; }
.pt-sous { color: var(--pt-doux); margin: 0 0 1.1rem; }
.pt-carte {
  background: var(--pt-surface); border: 1px solid var(--pt-bord); border-radius: var(--pt-rayon);
  box-shadow: var(--pt-ombre); padding: 16px 18px; margin: 0 0 14px;
}
.pt-carte-principale { border-color: color-mix(in srgb, var(--pt-accent) 35%, var(--pt-bord)); }
.pt-carte-douce { background: var(--pt-accent-doux); border-color: transparent; box-shadow: none; }
details.pt-carte > summary {
  cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem;
  margin: -4px 0; padding: 4px 0; min-height: 36px;
}
details.pt-carte > summary::-webkit-details-marker { display: none; }
details.pt-carte > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; flex: none;
  border-right: 1.6px solid var(--pt-doux); border-bottom: 1.6px solid var(--pt-doux);
  transform: rotate(45deg); transition: transform .15s;
}
details.pt-carte[open] > summary { margin-bottom: .7rem; }
details.pt-carte[open] > summary::after { transform: rotate(-135deg); }
.pt-aide { color: var(--pt-doux); margin: 0 0 .7rem; font-size: .95rem; }
.pt-note { font-size: .9rem; color: var(--pt-doux); background: var(--pt-fond); border-radius: 8px; padding: .55rem .75rem; margin: .4rem 0 .6rem; }
.pt-meta { color: var(--pt-doux); font-size: .86rem; }
.pt-stat { color: var(--pt-doux); font-size: .88rem; margin: .8rem 0 0; }
.pt-h3 { font-size: .95rem; margin: 1.2rem 0 .4rem; }
.pt-pastille {
  display: inline-flex; min-width: 1.5rem; height: 1.5rem; padding: 0 .4rem; align-items: center; justify-content: center;
  border-radius: 99px; background: var(--pt-accent); color: var(--pt-accent-texte); font-size: .8rem; font-weight: 600;
}
.pt-pastille-douce { background: var(--pt-accent-doux); color: var(--pt-accent); }
.pt-insigne {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .02em; padding: .05rem .5rem;
  border: 1px solid var(--pt-accent); color: var(--pt-accent); border-radius: 99px; margin-left: .3rem;
}
.pt-grand-chiffre { font-size: 1.15rem; font-weight: 600; margin: 0; }
.pt-role { font-size: .8rem; padding: .1rem .55rem; border-radius: 99px; background: var(--pt-fond); border: 1px solid var(--pt-bord); color: var(--pt-doux); white-space: nowrap; }
.pt-role-editeur, .pt-role-proprio { color: var(--pt-accent); border-color: var(--pt-accent); }
.pt-role-contributeur { color: var(--pt-ok); border-color: var(--pt-ok); }

.pt-url { display: flex; gap: .5rem; margin: .2rem 0 .3rem; }
.pt-url input {
  flex: 1; min-width: 0; min-height: 42px; padding: .45rem .7rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--pt-bord); border-radius: 8px; background: var(--pt-fond); color: var(--pt-texte);
}
.pt-url-petite input { min-height: 36px; font-size: .85rem; }
.pt-url-petite .pt-btn { min-height: 36px; }

.pt-form { margin: .4rem 0 0; }
.pt-form > label:not(.pt-case) { display: block; font-size: .9rem; font-weight: 600; margin: .7rem 0 0; }
.pt-form input[type=text], .pt-form input[type=url], .pt-form input[type=number], .pt-form select, .pt-form textarea,
.pt-ligne-actions select {
  display: block; width: 100%; margin-top: .3rem; padding: .5rem .65rem; min-height: 42px;
  font: inherit; font-weight: 400; color: var(--pt-texte); background: var(--pt-surface);
  border: 1px solid var(--pt-bord); border-radius: 8px;
}
.pt-ligne-actions select { width: auto; margin: 0; min-height: 36px; padding: .3rem .5rem; font-size: .9rem; }
.pt-form textarea { resize: vertical; }
.pt-form-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.pt-form-grille .pt-actions { grid-column: 1 / -1; }
.pt-choix { border: 0; padding: 0; margin: .5rem 0 0; }
.pt-choix legend { font-size: .9rem; font-weight: 600; padding: 0; margin-bottom: .3rem; }
.pt-choix label { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; cursor: pointer; }
.pt-case { display: flex; gap: .55rem; align-items: flex-start; margin: .7rem 0 0; font-size: .93rem; cursor: pointer; }
.pt-case input { margin-top: .3rem; }
.pt-choix input, .pt-case input { width: 18px; height: 18px; accent-color: var(--pt-accent); flex: none; }
.pt-import { margin: .35rem 0 0; font-size: .9rem; }
.pt-resultat { margin: .8rem 0 0; padding: .6rem .8rem; border-radius: 8px; background: var(--pt-ok-doux); color: var(--pt-texte); font-size: .93rem; }

.pt-liste { list-style: none; margin: 0; padding: 0; }
.pt-ligne { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .7rem 0; border-top: 1px solid var(--pt-bord); }
.pt-ligne:first-child { border-top: 0; }
.pt-ligne-col { flex-direction: column; align-items: stretch; gap: .35rem; }
.pt-ligne-txt { min-width: 0; flex: 1; }
.pt-ligne-txt > a, .pt-ligne-txt > strong { font-weight: 600; overflow-wrap: anywhere; }
.pt-ligne-txt .pt-meta { display: block; margin-top: .1rem; overflow-wrap: anywhere; }
.pt-ligne-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pt-epuise { opacity: .6; }
.pt-adresses { list-style: none; margin: 0; padding: 0 0 0 .2rem; font-size: .88rem; }
.pt-adresses li { display: flex; justify-content: space-between; gap: .6rem; padding: .15rem 0; overflow-wrap: anywhere; }
.pt-etat { color: var(--pt-doux); white-space: nowrap; }
.pt-etat-acceptee { color: var(--pt-ok); font-weight: 600; }
.pt-histo { list-style: none; margin: 0; padding: 0; }
.pt-histo li { padding: .35rem 0; border-top: 1px solid var(--pt-bord); }
.pt-histo li:first-child { border-top: 0; }

/* ---------- feuille de partage allégée : trois gros boutons, le reste sous « Plus d'options » */
.pt-feuille-legere { max-width: 600px; }
.pt-feuille-legere h1 { margin-bottom: 1rem; overflow-wrap: anywhere; }
.pt-rappel { margin: -.2rem 0 1rem; }
.pt-rappel a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .4rem; border-radius: 99px;
  background: var(--pt-accent-doux); color: var(--pt-accent); font-weight: 600; text-decoration: none;
}
.pt-rappel a:hover { text-decoration: underline; }
.pt-gros-boutons { display: flex; flex-direction: column; gap: 12px; }
.pt-gros {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 18px;
  border: 1px solid var(--pt-bord); border-radius: 14px; background: var(--pt-surface); box-shadow: var(--pt-ombre);
  color: var(--pt-texte); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.pt .pt-gros { color: var(--pt-texte); }
.pt-gros:hover { border-color: var(--pt-accent); }
.pt-gros:focus-visible { outline: 3px solid var(--pt-accent); outline-offset: 2px; }
.pt-gros[disabled] { opacity: .7; cursor: progress; }
.pt-gros-ico {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pt-accent-doux); color: var(--pt-accent);
}
.pt-gros-ico .pt-ico { width: 22px; height: 22px; }
.pt-gros-txt { display: flex; flex-direction: column; min-width: 0; }
.pt-gros-titre { font-size: 1.15rem; font-weight: 650; line-height: 1.3; }
.pt-gros-aide { color: var(--pt-doux); font-size: .9rem; line-height: 1.35; margin-top: 2px; }
.pt .pt-gros-accent { background: var(--pt-accent); border-color: var(--pt-accent); color: var(--pt-accent-texte); }
.pt-gros-accent .pt-gros-ico { background: color-mix(in srgb, var(--pt-accent-texte) 18%, transparent); color: var(--pt-accent-texte); }
.pt-gros-accent .pt-gros-aide { color: inherit; opacity: .85; }
.pt-gros-accent:hover { filter: brightness(1.06); }
.pt-gros.pt-fait { border-color: var(--pt-ok); }
.pt .pt-gros-accent.pt-fait { background: var(--pt-ok); border-color: var(--pt-ok); color: #fff; }
.pt-secours { margin: -4px 0 0; }
.pt-secours p { margin: 0 0 .3rem; }
.pt-secours input {
  width: 100%; min-height: 44px; padding: .45rem .7rem; font: inherit; font-size: .95rem;
  border: 1px solid var(--pt-accent); border-radius: 8px; background: var(--pt-fond); color: var(--pt-texte);
}
.pt-classe-case {
  display: flex; gap: 12px; align-items: flex-start; margin: -2px 0 6px; padding: 12px 16px;
  border: 1px dashed var(--pt-bord); border-radius: 14px; cursor: pointer;
}
.pt-classe-case:has(input:checked) { border-style: solid; border-color: var(--pt-accent); background: var(--pt-accent-doux); }
.pt-classe-case input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--pt-accent); }
.pt-classe-case strong { display: inline-flex; align-items: center; gap: .4rem; font-size: 1.02rem; }
.pt-classe-aide { display: block; color: var(--pt-doux); font-size: .9rem; line-height: 1.4; margin-top: 2px; }
.pt-plus { margin-top: 26px; }
.pt-plus > summary {
  display: flex; justify-content: center; align-items: center; gap: .45rem; list-style: none; cursor: pointer;
  width: max-content; margin: 0 auto; padding: .5rem .8rem; min-height: 44px; border-radius: 8px;
  color: var(--pt-doux); font-size: .98rem; text-decoration: underline; text-underline-offset: 3px;
}
.pt-plus > summary::-webkit-details-marker { display: none; }
.pt-plus > summary::after {
  content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.pt-plus[open] > summary { margin-bottom: 12px; }
.pt-plus[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.pt-plus > summary:hover { color: var(--pt-accent); }
.pt-plus > summary:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-plus-pied { text-align: center; font-size: .92rem; margin: 18px 0 0; }

/* petit écran « Inviter » */
.pt-dialogue-inviter { width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.pt-roles { border: 0; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pt-roles legend { font-weight: 600; padding: 0; margin-bottom: .6rem; }
.pt-role-choix {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--pt-bord); border-radius: 12px; cursor: pointer;
}
.pt-role-choix:has(input:checked) { border-color: var(--pt-accent); background: var(--pt-accent-doux); box-shadow: 0 0 0 1px var(--pt-accent) inset; }
.pt-role-choix input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--pt-accent); }
.pt-role-choix strong { font-size: 1.05rem; }
.pt-role-aide { display: block; color: var(--pt-doux); font-size: .9rem; line-height: 1.4; margin-top: 2px; }
.pt-role-off { opacity: .55; cursor: not-allowed; }
.pt-role-tag { font-size: .75rem; font-weight: 600; color: var(--pt-doux); border: 1px solid var(--pt-bord); border-radius: 99px; padding: 0 .45rem; margin-left: .3rem; }
.pt-inv-actions { margin-top: 1rem; }
.pt-inv-role { margin: .2rem 0 .4rem; color: var(--pt-accent); }
.pt-inv-boutons { display: flex; flex-direction: column; gap: 8px; margin: .6rem 0 .2rem; }
.pt-inv-boutons .pt-btn { justify-content: center; width: 100%; }
.pt .pt-btn-accent.pt-fait { background: var(--pt-ok); border-color: var(--pt-ok); color: #fff; }
.pt-inv-liens { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: .6rem 0 0; }
.pt-inv-liens .pt-lien-btn { min-height: 36px; }
.pt-inv-liens .pt-lien-btn:hover { color: var(--pt-accent); }
.pt-inv-fin { justify-content: flex-end; margin-top: .4rem; }
.pt-point { width: 10px; height: 10px; border-radius: 50%; background: var(--pt-accent); flex: none; }
.pt-rappel a { padding-left: .8rem; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* page publique : une action principale, les autres en liens discrets */
.pt-barre-principale { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: .4rem 0 .2rem; }
.pt-barre-principale .pt-meta { max-width: 520px; }
.pt-secondaires { display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; align-items: center; margin: .2rem 0 .4rem; }
.pt-secondaires .pt-lien-btn { display: inline-flex; align-items: center; gap: .35rem; text-decoration: underline; color: var(--pt-doux); min-height: 36px; }
.pt-secondaires .pt-lien-btn:hover { color: var(--pt-accent); }

/* ---------- page publique, invitation */
.pt-bandeau {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 1180px; margin: 0 auto; padding: 14px 16px;
}
.pt-marque { font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; color: var(--pt-accent); text-decoration: none; }
.pt-marque a { text-decoration: none; }
.pt-par { color: var(--pt-doux); font-size: .92rem; text-align: right; }
.pt-public { max-width: 1180px; margin: 0 auto; padding: 8px 16px 56px; }
.pt-titre { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2rem 0 .3rem; }
.pt-etiquette {
  display: inline-flex; align-items: center; gap: .4rem; margin: .4rem 0 0; padding: .2rem .7rem;
  border-radius: 99px; background: var(--pt-accent-doux); color: var(--pt-accent); font-size: .88rem; font-weight: 600;
}
.pt-barre { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .4rem; }
.pt-attendu { box-shadow: 0 0 0 3px var(--pt-accent-doux); }
.pt-sans-compte { margin: .2rem 0 1.2rem; }
.pt-classe .pt-titre { font-size: clamp(2rem, 5vw, 3rem); }

.pt-grille { columns: 300px 4; column-gap: 18px; margin-top: 1.2rem; }
.pt-grille-une { columns: auto; max-width: 640px; }
.pt-boite {
  break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 18px;
  background: var(--pt-surface); border: 1px solid var(--pt-bord); border-radius: var(--pt-rayon); box-shadow: var(--pt-ombre);
  padding: 12px 14px 10px;
}
.pt-boite-tete { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding-bottom: .45rem; border-bottom: 1px solid var(--pt-bord); }
.pt-boite-tete h2 { margin: 0; font-size: 1.02rem; color: var(--pt-accent); overflow-wrap: anywhere; }
.pt-compte { color: var(--pt-doux); font-size: .8rem; white-space: nowrap; }
.pt-liens { list-style: none; margin: .35rem 0 0; padding: 0; }
.pt-lien { display: flex; align-items: center; gap: .3rem; border-radius: 8px; }
.pt-lien:hover { background: var(--pt-fond); }
.pt-lien > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; padding: .45rem .35rem; text-decoration: none; color: var(--pt-texte); }
.pt-lettre {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--pt-accent-doux); color: var(--pt-accent); font-weight: 700; font-size: .88rem;
}
.pt-txt { min-width: 0; display: flex; flex-direction: column; }
.pt-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .96rem; }
.pt-dom { color: var(--pt-doux); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-lien-vide, .pt-vide { color: var(--pt-doux); font-size: .92rem; padding: .5rem .3rem; list-style: none; }
.pt-outils { display: flex; gap: 2px; padding-right: 2px; }
.pt-mini {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: none; color: var(--pt-doux); cursor: pointer;
}
.pt-mini:hover { background: var(--pt-accent-doux); color: var(--pt-accent); }
.pt-ajout {
  display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; margin-top: .5rem; min-height: 40px;
  border: 1px dashed var(--pt-bord); border-radius: 8px; background: none; color: var(--pt-accent); font: inherit; font-size: .92rem; cursor: pointer;
}
.pt-ajout:hover { border-color: var(--pt-accent); background: var(--pt-accent-doux); }
.pt-pied { margin-top: 2rem; color: var(--pt-doux); font-size: .9rem; text-align: center; }

.pt-invitation {
  max-width: 620px; margin: 1.2rem auto 1.6rem; text-align: center;
  background: var(--pt-surface); border: 1px solid var(--pt-bord); border-radius: 14px; box-shadow: var(--pt-ombre); padding: 26px 22px;
}
.pt-invitation h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.pt-invitation .pt-actions { justify-content: center; }
.pt-invitation .pt-form { text-align: left; max-width: 380px; margin: 1rem auto 0; }
.pt-invite-de { color: var(--pt-doux); margin: 0; }
.pt-message { text-align: left; margin: 1rem 0; padding: .7rem 1rem; border-left: 3px solid var(--pt-bord); color: var(--pt-texte); background: var(--pt-fond); border-radius: 0 8px 8px 0; }
.pt-refus { margin-top: 1rem; }
.pt-ok { color: var(--pt-ok); font-weight: 600; }
.pt-apercu { text-align: center; color: var(--pt-doux); font-size: .95rem; font-weight: 600; margin: 1.6rem 0 0; }
.pt-etroit { max-width: 560px; margin: 0 auto; padding: 40px 16px; }

/* ---------- suivis */
.pt-suivi { margin-bottom: 2.2rem; }
.pt-suivi-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.pt-suivi-tete .pt-sous { margin-bottom: .2rem; }

/* ---------- dialogues et toast */
.pt-dialogue {
  width: min(460px, calc(100vw - 32px)); border: 1px solid var(--pt-bord); border-radius: 14px;
  background: var(--pt-surface); color: var(--pt-texte); padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.pt-dialogue::backdrop { background: rgba(15, 25, 35, .45); }
.pt-dialogue h2 { margin: 0 0 .2rem; }
.pt-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: .65rem 1rem; border-radius: 10px; background: var(--pt-texte); color: var(--pt-surface);
  font-size: .95rem; transition: opacity .2s, transform .2s; z-index: 50;
}
.pt-toast-vu { opacity: 1; transform: translate(-50%, 0); }
.pt-toast-erreur { background: var(--pt-alerte); color: #fff; }

/* ---------- QR plein écran */
body.pt-qr-corps { background: #ffffff; color: #12161f; }
.pt-qr { min-height: 100vh; display: flex; flex-direction: column; }
.pt-qr-barre { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: 12px 16px; }
.pt-qr-plus { display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 1.2rem; margin: 0; }
.pt-qr-plus .pt-lien-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; color: #5a6a75; }
.pt-qr-plus .pt-lien-btn:hover { color: #2f6f94; }
body.pt-plein .pt-qr-plus { display: none; }
.pt-qr-outils { display: flex; gap: .5rem; flex-wrap: wrap; }
.pt-qr-corps .pt-btn { background: #fff; color: #12161f; border-color: #d5dde3; }
.pt-qr-corps .pt-btn-accent { background: #2f6f94; border-color: #2f6f94; color: #fff; }
.pt-qr-figure { flex: 1; margin: 0; padding: 8px 16px 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.pt-qr-code { width: min(72vh, 88vw, 720px); aspect-ratio: 1; }
.pt-qr-svg { width: 100%; height: 100%; display: block; }
.pt-qr-figure figcaption { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pt-qr-titre { font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pt-qr-url { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1rem, 2.4vw, 1.5rem); color: #2f4a5c; overflow-wrap: anywhere; }
.pt-qr-consigne { color: #5a6a75; font-size: clamp(.95rem, 2vw, 1.15rem); }
body.pt-plein .pt-qr-barre { position: fixed; top: 0; right: 0; opacity: .15; }
body.pt-plein .pt-qr-barre:hover { opacity: 1; }
body.pt-plein .pt-qr-code { width: min(78vh, 92vw); }

@media (max-width: 640px) {
  .pt h1 { font-size: 1.4rem; }
  .pt-gros { min-height: 70px; padding: 12px 14px; }
  .pt-barre-principale .pt-btn { width: 100%; justify-content: center; }
  .pt-form-grille { grid-template-columns: 1fr; }
  .pt-ligne { flex-direction: column; align-items: stretch; }
  .pt-ligne-actions { justify-content: flex-start; }
  .pt-url { flex-direction: column; }
  .pt-url .pt-btn { justify-content: center; }
  .pt-barre .pt-btn { flex: 1 1 auto; justify-content: center; }
  .pt-carte { padding: 14px; }
  .pt-qr-code { width: min(88vw, 60vh); }
}

@media print {
  @page { size: A4 portrait; margin: 16mm; }
  body.pt, body.pt-qr-corps { background: #fff; color: #000; }
  .pt-qr-barre, .pt-qr-plus, .pt-toast { display: none !important; }
  .pt-qr { min-height: auto; }
  .pt-qr-figure { padding: 0; gap: 10mm; }
  .pt-qr-code { width: 140mm; }
  .pt-qr-titre { font-size: 22pt; }
  .pt-qr-url { font-size: 14pt; color: #000; }
  .pt-qr-consigne { font-size: 12pt; color: #333; }
}

/* ---------- vitrine dans la feuille de partage : visibilité, auteur, aperçu des messageries */
.pt-vitrine { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.pt-visibilite { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-visibilite legend { padding: 0; margin: 0 0 .5rem; font-weight: 600; font-size: .98rem; }
.pt-vis-choix {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--pt-bord); border-radius: 12px;
  background: var(--pt-surface); cursor: pointer;
}
.pt-vis-choix:has(input:checked) { border-color: var(--pt-accent); background: var(--pt-accent-doux); }
.pt-vis-choix input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pt-accent); }
.pt-vis-choix strong { display: inline-flex; align-items: center; gap: .35rem; font-size: .98rem; }
.pt-vis-aide { display: block; margin-top: 2px; color: var(--pt-doux); font-size: .85rem; line-height: 1.4; }
.pt-auteur { border: 1px solid var(--pt-bord); border-radius: 12px; background: var(--pt-surface); padding: 0 14px; }
.pt-auteur > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; list-style: none; cursor: pointer;
  font-weight: 600; font-size: .98rem;
}
.pt-auteur > summary::-webkit-details-marker { display: none; }
.pt-auteur > summary > span:first-child { display: inline-flex; align-items: center; gap: .4rem; }
.pt-auteur-resume { color: var(--pt-doux); font-weight: 400; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-auteur[open] { padding-bottom: 12px; }
.pt-auteur .pt-aide { margin: 0 0 .6rem; font-size: .88rem; }
.pt-apercu-msg { margin: 4px 0 0; }
.pt-apercu-msg figcaption { font-weight: 600; font-size: .98rem; margin: 0 0 .5rem; }
.pt-bulle {
  display: block; max-width: 340px; overflow: hidden; border-radius: 16px; background: #e9e9eb; color: #1c1c1e;
}
.pt-bulle img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; background: #f6f6f3; }
.pt-bulle-txt { display: flex; flex-direction: column; padding: 8px 12px 9px; font-size: .86rem; line-height: 1.3; }
.pt-bulle-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-bulle-txt span { color: #6b6b70; font-size: .8rem; }
.pt-apercu-msg .pt-meta { margin: .45rem 0 0; }
@media (max-width: 520px) {
  .pt-visibilite { grid-template-columns: 1fr; }
}
