/* ============================================================
   RiLoPOS — Portail client. Réutilise les tokens de app.css
   (papier & encre, accent orange, police système). Motion :
   press states, focus visible, reveal doux, reduced-motion.
   Zéro dégradé, zéro soulignement (cf. refonte vitrine).
   ============================================================ */
.pt-body { margin: 0; background: var(--bg-soft); color: var(--ink); font-family: var(--font); }
.pt-body svg { width: 1.15em; height: 1.15em; }

/* ── Login ── */
.pt-auth { margin: 0; min-height: 100vh; display: grid; place-items: center;
  background: var(--bg-soft); padding: 24px; }
.pt-auth-wrap { width: 100%; max-width: 420px; }
.pt-auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 32px; box-shadow: var(--shadow-lg); }
.pt-auth-brand, .pt-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700;
  font-size: 1.14rem; color: var(--ink); letter-spacing: -.02em; text-decoration: none; }
.pt-logo { width: 30px; height: 30px; display: block; }
.pt-brand .pt-logo { width: 28px; height: 28px; }
.pt-auth-card h1 { font-size: 1.5rem; margin: 18px 0 4px; letter-spacing: -.02em; }
.pt-auth-card .muted { margin: 0 0 20px; }
.pt-auth-card label { display: block; font-size: .84rem; font-weight: 700; color: var(--ink-2); margin: 14px 0 6px; }
.pt-input { width: 100%; font: inherit; font-size: .98rem; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.pt-input:focus { outline: none; border-color: var(--brand-400); background: #fff; box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.pt-err { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; padding: 10px 13px; border-radius: 11px; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.pt-auth-back { display: block; text-align: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.pt-auth-back:hover { color: var(--brand-700); }

/* ── Shell (sidebar + main) ── */
.pt-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.pt-side { background: #fff; border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh; }
.pt-side .pt-brand { padding: 6px 8px 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.pt-nav { display: flex; flex-direction: column; gap: 4px; }
.pt-nav a, .pt-logout { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: .94rem; text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease); }
.pt-nav a:hover, .pt-logout:hover { background: rgba(15,23,42,.05); color: var(--ink); }
.pt-nav a.on { background: rgba(15,23,42,.06); color: var(--ink); font-weight: 700; }
.pt-nav a:active, .pt-logout:active, .pt-tile:active, .pt-dl-card:active, .pt-guide-card:active { transform: scale(.985); }
.pt-side-foot { margin-top: auto; border-top: 1px solid var(--line-2); padding-top: 8px; }
.pt-logout { color: #B91C1C; }
.pt-logout:hover { background: #FEF2F2; color: #991B1B; }

.pt-main { display: flex; flex-direction: column; min-width: 0; }
.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 26px; background: rgba(255,255,255,.78); backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.pt-burger { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; }
.pt-top-r { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.pt-user { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .92rem; color: var(--ink); }
.pt-role { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px;
  background: rgba(15,23,42,.06); color: var(--ink-2); }
.pt-role.role-super_admin { background: #EDE9FE; color: #6D28D9; }
.pt-role.role-technician { background: #DBEAFE; color: #1D4ED8; }
.pt-content { padding: 30px 26px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }

.pt-hello h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.03em; margin: 0 0 6px; }
.pt-hello .muted { font-size: 1.02rem; }
.pt-empty { text-align: center; padding: 50px 20px; }

/* ── Catégories de raccourcis (super-admin) ── */
.pt-cat { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 34px 0 -8px; }
.pt-cat:first-of-type { margin-top: 28px; }

/* ── Tuiles raccourcis ── */
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 26px; }
.pt-tile { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease); }
.pt-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-200); }
.pt-tile-ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); }
.pt-tile-ic svg { width: 24px; height: 24px; }
.pt-tile-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pt-tile-t { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.pt-tile-d { font-size: .86rem; color: var(--muted); line-height: 1.4; }
.pt-tile-go { color: var(--muted-2); flex: 0 0 auto; }
.pt-tile:hover .pt-tile-go { color: var(--brand-600); }

/* ── Downloads ── */
.pt-dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 26px; }
.pt-dl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.pt-dl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pt-dl-top { display: flex; gap: 14px; align-items: flex-start; }
.pt-dl-top h3 { margin: 0 0 4px; font-size: 1.1rem; }
.pt-dl-top p { margin: 0; font-size: .9rem; }
.pt-dl-ver { font-variant-numeric: tabular-nums; font-weight: 700; margin: 14px 0 10px; font-size: .85rem; }
.pt-dl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-dl-btn { font-size: .85rem; padding: 9px 14px; }
.pt-dl-note { display: flex; align-items: center; gap: 8px; margin-top: 26px; font-size: .88rem; }
.pt-dl-note svg { color: var(--brand-600); }

/* ── Guides ── */
.pt-guide-list { display: grid; gap: 12px; margin-top: 26px; }
.pt-guide-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.pt-guide-card:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); border-color: var(--brand-200); }
.pt-guide-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.pt-guide-cat { align-self: flex-start; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--brand-700); background: var(--brand-50); padding: 2px 9px; border-radius: 999px; }
.pt-guide-t { font-weight: 800; font-size: 1.02rem; }
.pt-guide-d { font-size: .88rem; color: var(--muted); }
.pt-back { display: inline-block; color: var(--muted); font-weight: 600; margin-bottom: 16px; }
.pt-back:hover { color: var(--brand-700); }
.pt-article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 44px); max-width: 820px; }
.pt-article h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); letter-spacing: -.03em; margin: 10px 0 8px; }
.pt-article-lead { font-size: 1.1rem; margin-bottom: 18px; }
.pt-article .prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink-2); }
.pt-article .prose h2 { margin: 1.5em 0 .4em; font-size: 1.5rem; }
.pt-article .prose h3 { margin: 1.3em 0 .35em; font-size: 1.2rem; }
.pt-article .prose img { max-width: 100%; border-radius: var(--radius); margin: 1.2em 0; }
.pt-article .prose a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.pt-article .prose code { font-family: var(--mono); background: var(--brand-50); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

/* ── Motion (apple-design) : reveal doux, focus visible ── */
.reveal-up { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal-up.in { opacity: 1; transform: none; }
.reveal-now { animation: pt-in .5s var(--ease) both; }
@keyframes pt-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
a:focus-visible, button:focus-visible, .pt-input:focus-visible {
  outline: 2px solid var(--brand-500); outline-offset: 3px; border-radius: 10px; }
:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-up { opacity: 1 !important; transform: none !important; transition: none; }
  .reveal-now { animation: none; }
  .pt-tile:hover, .pt-dl-card:hover, .pt-guide-card:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) { .pt-top { background: #fff; backdrop-filter: none; } }

/* ── Responsive ── */
@media (max-width: 860px) {
  .pt-shell { grid-template-columns: 1fr; }
  .pt-side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-100%);
    transition: transform .25s var(--ease); box-shadow: var(--shadow-lg); }
  .pt-shell.nav-open .pt-side { transform: none; }
  .pt-burger { display: inline-flex; }
  .pt-content { padding: 22px 16px 50px; }
}
