/* ===== Pages publiques : téléchargements, demande de démonstration, erreur, invitation (refonte validée le 17/11/2026) =====
   Maquette : maquette/panneau/refonte/src/css/ecrans.css, partie « Page publique /telecharger ». La connexion a sa feuille
   (web/3d/connexion.css). Liée par les pages elles-mêmes (lib/ui/public.dart, lib/ui/espace.dart). Le choix de la langue
   (.public-langs) est posé par la coquille en haut à droite. N'anime que transform et opacity. */

/* ---------- Logo du thème affiché ---------- */
.pub-logo { display: inline-flex; align-items: center; }
.pub-logo img { height: 26px; width: auto; }
.pub-logo .lg-light { display: var(--logo-light); } .pub-logo .lg-dark { display: var(--logo-dark); }

/* ---------- Mise en page ---------- */
.pub { position: relative; min-height: 100vh; min-height: 100dvh; width: min(1080px, 100% - 48px); margin: 0 auto; padding: 24px 0 48px;
  display: flex; flex-direction: column; }
.pub.pub-moyen { width: min(860px, 100% - 48px); }
.pub.pub-etroit { width: min(640px, 100% - 48px); }
.pub-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; padding-right: 150px; }
.pub-actes { display: flex; gap: 8px; align-items: center; }
.pub-heros { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 56px 0 36px; }
.pub-heros h1 { font: 700 clamp(34px, 5vw, 60px)/1.02 var(--font-display); letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere;
  view-transition-name: titre; }
.pub-heros .accent { background: linear-gradient(100deg, var(--coral-300), var(--coral-500) 60%, #FFB199);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.pub-heros .phrase { margin: 14px 0 0; font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 540px; }
.pub-emb { width: 260px; height: 260px; margin: 0; }
.pub-moyen .pub-emb { width: 200px; height: 200px; }
.pub-pied { display: flex; align-items: center; justify-content: center; gap: 8px; margin: auto 0 0; padding-top: 40px; color: var(--faint);
  font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Téléchargements : une carte par fichier ---------- */
.pub-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.pub-carte { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.pub-carte b { font: 600 17px/1.3 var(--font-display); margin-top: 8px; }
.pub-carte small { font-size: 12.5px; line-height: 18px; }
.pub-carte .pub-fichier { color: var(--faint); overflow-wrap: anywhere; }
.pub-carte .hash { font: 500 10.5px/15px var(--font-mono); color: var(--faint); overflow-wrap: anywhere; user-select: all; }
.pub-carte > .btn { margin-top: auto; }
.pub-carte > small:last-of-type { margin-bottom: 12px; }
.pub-carte .f-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent-text); flex: none; }
.pub-carte .f-ic.grand { width: 52px; height: 52px; border-radius: 16px; }
.pub-vide { padding: 8px; }
.pub-bas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; align-items: start; }
.pub-bas:not(:has(.pub-notes)) { grid-template-columns: 1fr; }
.pub-bas .alert { margin: 0; }
.pub-notes p { margin: 0; white-space: pre-line; color: var(--muted); line-height: 1.5; }
.pub-notes .tete .ic { color: var(--muted); flex: none; }

/* ---------- Démonstration ---------- */
.pub-form { padding: 24px; }
.pub-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-envoye { padding: 40px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.pub-envoye h2 { font: 700 22px/28px var(--font-display); }
.pub-envoye p { max-width: 460px; margin: 0; }
.pub-ok-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); margin-bottom: 6px; }

/* ---------- Erreur (sans compte) ---------- */
.pub-erreur { margin: 72px auto 0; width: 100%; padding: 32px 28px 26px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.pub-erreur-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--bad-soft); color: var(--bad); margin-bottom: 8px; }
.pub-erreur .sur { margin: 0; }
.pub-erreur h1 { font: 700 28px/1.15 var(--font-display); letter-spacing: -.02em; }
.pub-erreur p.muted { margin: 0; max-width: 460px; overflow-wrap: anywhere; }
.pub-erreur-actes { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }

/* ---------- Carte de verre au centre (invitation) ---------- */
.pub-verre { width: min(460px, 100%); margin: 88px auto 0; padding: 32px 30px 26px; display: grid; gap: 14px; border-radius: 28px;
  background: var(--glass); border-color: var(--border-strong); box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); }
.pub-verre .pub-verre-emb { width: 88px; height: 88px; margin: -78px auto 0; object-fit: contain; filter: drop-shadow(0 18px 24px var(--accent-halo));
  animation: flotte 7s ease-in-out infinite; }
.pub-verre h1 { font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; text-align: center; overflow-wrap: anywhere; }
.pub-verre .sur { justify-content: center; margin: 0; }
.pub-verre > p.muted { margin: -4px 0 4px; text-align: center; }
.pub-verre .form { grid-template-columns: 1fr; }
.pub-verre .form-actions .btn { width: 100%; height: 48px; }
.pub-verre .error-box { margin: 0; }
html.calme .pub-verre-emb, html.leger .pub-verre-emb { animation: none; }
@media (prefers-reduced-motion: reduce) { .pub-verre-emb { animation: none; } }

/* ---------- Écrans plus étroits ---------- */
@media (max-width: 1080px) { .pub-emb { width: 200px; height: 200px; } }
@media (max-width: 760px) {
  .pub, .pub.pub-moyen, .pub.pub-etroit { width: calc(100% - 32px); padding-top: 16px; }
  .pub-barre { padding-right: 132px; }
  .pub-heros { grid-template-columns: 1fr; padding: 20px 0 24px; gap: 8px; }
  .pub-emb, .pub-moyen .pub-emb { width: 150px; height: 150px; grid-row: 1; justify-self: center; }
  .pub-heros .phrase { font-size: 15.5px; }
  .pub-cartes, .pub-bas { grid-template-columns: 1fr; }
  .pub-form { padding: 18px; }
  .pub-erreur { margin-top: 40px; padding: 26px 18px 20px; }
  .pub-verre { margin-top: 72px; padding: 26px 20px 20px; }
}
