:root {
    --pd-red: #d32f2f;
    --pd-red-dark: #b71c1c;
    --pd-ink: #14181f;
    --pd-muted: #5c6570;
    --pd-line: #e6e9ee;
    --pd-bg: #f3f5f8;
    --pd-card: #ffffff;
    --pd-ok: #1b7a4a;
    --pd-warn: #9a6b00;
    --pd-info: #0b5cab;
    --pd-radius: 16px;
    --pd-sidebar: 260px;
    --pd-gutter: 10px;
    --pd-font: "DM Sans", system-ui, sans-serif;
    --pd-display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.pd-body {
    font-family: var(--pd-font);
    color: var(--pd-ink);
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(211, 47, 47, .08), transparent 55%),
        radial-gradient(900px 400px at 100% 0%, rgba(20, 24, 31, .05), transparent 50%),
        var(--pd-bg);
    min-height: 100vh;
}
.hidden { display: none !important; }

/* Verrouillage conformité fiscal / KYC */
.pd-compliance-lock {
    margin: 0 0 12px; padding: 14px 16px; border-radius: 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #f0b4b4; color: #7a1f1f;
}
.pd-compliance-lock-inner {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.pd-compliance-lock-inner strong { font-size: 1rem; }
.pd-compliance-lock-inner p {
    margin: 0; flex: 1 1 220px; font-size: .92rem; line-height: 1.4;
}
body.pd-compliance-locked .pd-nav-item.pd-nav-locked,
body.pd-compliance-locked .pd-footer-item.pd-nav-locked {
    opacity: .38; pointer-events: none; cursor: not-allowed;
}
body.pd-compliance-locked #view-overview .pd-dash-cta,
body.pd-compliance-locked #view-overview .pd-quick,
body.pd-compliance-locked #view-overview button:not(#btn-compliance-goto),
body.pd-compliance-locked #view-activity button,
body.pd-compliance-locked #view-portefeuille button,
body.pd-compliance-locked #view-catalog button,
body.pd-compliance-locked #view-categories button,
body.pd-compliance-locked #view-boutique-catalog button,
body.pd-compliance-locked #view-boutique-categories button,
body.pd-compliance-locked #btn-refresh {
    opacity: .45; pointer-events: none;
}
body.pd-compliance-locked #view-resto-settings .pd-panel:not([data-compliance]),
body.pd-compliance-locked #view-boutique-settings .pd-panel:not([data-compliance]),
body.pd-compliance-locked #view-resto-settings .pd-hours-link,
body.pd-compliance-locked #view-boutique-settings .pd-hours-link,
body.pd-compliance-locked #view-resto-settings #resto-team-panel,
body.pd-compliance-locked #view-boutique-settings #boutique-team-panel,
body.pd-compliance-locked #view-resto-settings #rs-open-panel,
body.pd-compliance-locked #view-boutique-settings #bs-open-panel {
    opacity: .5; pointer-events: none;
}

.pd-skip {
    position: absolute; left: -9999px; top: auto;
}
.pd-skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }

/* Sidebar */
.pd-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--pd-sidebar);
    background: linear-gradient(180deg, #171b22 0%, #10141a 100%);
    color: #fff; display: flex; flex-direction: column; z-index: 40;
    padding: 22px 16px;
}
.pd-brand { padding: 4px 10px 22px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.pd-logo { color: #ff6b6b; text-decoration: none; font-family: var(--pd-display); font-weight: 700; font-size: 1.35rem; letter-spacing: .04em; }
.pd-brand-sub { display: block; margin-top: 4px; font-size: .78rem; color: rgba(255,255,255,.55); }
.pd-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pd-nav-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    border: 0; background: transparent; color: rgba(255,255,255,.78);
    padding: 12px 14px; border-radius: 12px; font: inherit; font-weight: 500;
    cursor: pointer; text-align: left; transition: background .15s, color .15s;
}
.pd-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.pd-nav-item.active { background: rgba(211, 47, 47, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,107,107,.25); }
.pd-nav-ico {
    opacity: .85; width: 1.35em; text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
}
.pd-nav-ico i { font-size: .95rem; }
.pd-sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.pd-user-chip { font-size: .82rem; color: rgba(255,255,255,.7); padding: 0 8px 10px; line-height: 1.35; word-break: break-word; }
.pd-support-link {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 10px; padding: 10px 12px; border-radius: 12px;
    color: #f0d0d0; text-decoration: none;
    background: rgba(229, 57, 53, .18); border: 1px solid rgba(229, 57, 53, .28);
    font-size: .82rem; line-height: 1.25; font-weight: 600;
}
.pd-support-link i { margin-top: 2px; color: #ff8a80; }
.pd-support-link small { font-weight: 500; color: rgba(255,255,255,.72); word-break: break-all; }
.pd-support-link:hover { background: rgba(229, 57, 53, .28); color: #fff; }
.pd-logout {
    width: 100%; border: 1px solid rgba(255,255,255,.14); background: transparent;
    color: rgba(255,255,255,.85); border-radius: 10px; padding: 10px; font: inherit; cursor: pointer;
}
.pd-logout:hover { background: rgba(255,255,255,.06); }

/* Shell */
.pd-shell { margin-left: var(--pd-sidebar); min-height: 100vh; }
.pd-topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 28px; position: sticky; top: 0; z-index: 20;
    background: rgba(243,245,248,.88); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(230,233,238,.9);
}
.pd-menu-btn, .pd-refresh {
    border: 1px solid var(--pd-line); background: #fff; border-radius: 10px;
    width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem;
}
.pd-menu-btn { display: none; }
.pd-page-title { margin: 0; font-family: var(--pd-display); font-size: 1.35rem; font-weight: 700; }
.pd-page-sub { margin: 2px 0 0; color: var(--pd-muted); font-size: .9rem; }
.pd-refresh { margin-left: auto; }
.pd-main { padding: 22px 28px 48px; max-width: 1100px; }

/* Gate */
.pd-gate { display: flex; justify-content: center; padding: 60px 16px; }
.pd-gate-card {
    background: var(--pd-card); border-radius: var(--pd-radius); padding: 32px;
    max-width: 420px; text-align: center; box-shadow: 0 12px 40px rgba(20,24,31,.08);
}
.pd-gate-card h1 { margin: 0 0 10px; font-family: var(--pd-display); }

body.pd-signed-out .pd-sidebar,
body.pd-signed-out .pd-topbar,
body.pd-signed-out .pd-footer-nav { display: none !important; }
body.pd-signed-out .pd-shell { margin-left: 0; }
body.pd-signed-out .pd-main { max-width: none; padding: 0; min-height: 100vh; }
body.pd-signed-out #gate-login {
    min-height: 100vh; margin: 0; padding: 0;
    display: flex; align-items: stretch; justify-content: center;
}
body.pd-signed-out #gate-login > .pd-gate-card { margin: auto; }

.pd-auth-screen {
    flex: 1; min-height: 100vh; width: 100%;
    display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(340px, .95fr);
}
.pd-auth-aside {
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 48px 44px; color: #fff;
    background:
        radial-gradient(520px 240px at 100% 0%, rgba(211, 47, 47, .45), transparent 60%),
        linear-gradient(165deg, #171b22 0%, #10141a 70%);
}
.pd-auth-brand {
    margin: 0 0 auto; font-family: var(--pd-display); font-weight: 700;
    letter-spacing: .08em; color: #ff6b6b; font-size: 1.2rem;
}
.pd-auth-kicker {
    margin: 0 0 8px; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: rgba(255,255,255,.62);
}
.pd-auth-aside h1 {
    margin: 0 0 22px; max-width: 16ch; font-family: var(--pd-display);
    font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.15; font-weight: 700;
}
.pd-auth-aside ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pd-auth-aside li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.86); font-size: .95rem; }
.pd-auth-aside li i { width: 18px; text-align: center; color: #ff8a80; }
.pd-auth-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 32px 24px; background: var(--pd-bg);
}
.pd-auth-card {
    width: min(420px, 100%); background: #fff; border: 1px solid var(--pd-line);
    border-radius: 20px; padding: 28px 26px 22px;
    box-shadow: 0 18px 50px rgba(20, 24, 31, .08);
}
.pd-auth-pips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.pd-auth-pip { height: 4px; border-radius: 999px; background: #e6e9ee; }
.pd-auth-pip.is-on, .pd-auth-pip.is-done { background: var(--pd-red); }
.pd-auth-step { display: none; }
.pd-auth-step.is-active { display: block; }
.pd-auth-card h2 { margin: 0 0 6px; font-family: var(--pd-display); font-size: 1.55rem; }
.pd-auth-lead { margin: 0 0 18px; color: var(--pd-muted); font-size: .95rem; line-height: 1.45; }
.pd-auth-card .pd-field { margin-bottom: 16px; }
.pd-auth-card .pd-btn-block { width: 100%; }
.pd-auth-account {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; margin: 0 0 16px; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--pd-line); background: #fafbfc; cursor: pointer;
    font: inherit; text-align: left; color: var(--pd-ink);
}
.pd-auth-account span:first-child {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600;
}
.pd-auth-account span:last-child { flex-shrink: 0; color: var(--pd-red); font-size: .82rem; font-weight: 700; }
.pd-auth-pass { position: relative; }
.pd-auth-pass input { padding-right: 46px; }
.pd-auth-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent;
    color: #7a8490; cursor: pointer;
}
.pd-auth-eye:hover { background: #f4f5f7; color: var(--pd-ink); }
.pd-auth-error {
    margin: 14px 0 0; padding: 10px 12px; border-radius: 12px;
    background: #fff5f5; border: 1px solid #f0b4b4; color: #8e1d1d;
    font-size: .88rem; line-height: 1.4;
}
.pd-auth-error a { color: inherit; font-weight: 700; }
.pd-auth-foot { margin: 16px 0 0; text-align: center; color: var(--pd-muted); font-size: .88rem; }
.pd-auth-foot a { color: var(--pd-red); font-weight: 700; text-decoration: none; }
.pd-auth-foot a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .pd-auth-screen { grid-template-columns: 1fr; min-height: 100vh; }
    .pd-auth-aside { justify-content: flex-start; padding: 28px 22px 8px; }
    .pd-auth-brand { margin: 0 0 18px; }
    .pd-auth-aside h1 { max-width: none; font-size: 1.45rem; margin-bottom: 0; }
    .pd-auth-aside ul, .pd-auth-kicker { display: none; }
    .pd-auth-panel { align-items: flex-start; padding: 18px 16px 28px; background: transparent; }
    .pd-auth-card { box-shadow: 0 10px 30px rgba(20, 24, 31, .06); }
}

/* Views */
.pd-view { display: none; animation: pd-fade .25s ease; }
.pd-view.active { display: block; }
@keyframes pd-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Dashboard hero */
.pd-dash-hero {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.pd-dash-kicker {
    margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--pd-muted);
}
.pd-dash-hello {
    margin: 0; font-family: var(--pd-display); font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 700;
}
.pd-dash-hint { margin: 4px 0 0; color: var(--pd-muted); font-size: .9rem; }
.pd-dash-cta { flex-shrink: 0; white-space: nowrap; }

/* KPI */
.pd-kpi-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px;
}
.pd-kpi {
    background: var(--pd-card); border: 1px solid var(--pd-line); border-radius: 14px;
    padding: 14px 12px; box-shadow: 0 4px 18px rgba(20,24,31,.03);
    text-align: left;
}
.pd-kpi-btn {
    font: inherit; cursor: pointer; width: 100%;
    transition: border-color .15s, transform .12s;
}
.pd-kpi-btn:hover { border-color: #f1b0b0; }
.pd-kpi-btn:active { transform: scale(.98); }
.pd-kpi-accent {
    background: linear-gradient(145deg, #1a1f27, #2a3140); color: #fff; border-color: transparent;
}
.pd-kpi-accent .pd-kpi-label { color: rgba(255,255,255,.65); }
.pd-kpi-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pd-muted); margin-bottom: 6px; }
.pd-kpi-value { font-family: var(--pd-display); font-size: 1.25rem; font-weight: 700; }

.pd-quick-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.pd-quick {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    text-align: left; text-decoration: none; color: inherit;
    border: 1px solid var(--pd-line); background: var(--pd-card); border-radius: 14px;
    padding: 12px 12px 11px; cursor: pointer; font: inherit;
    box-shadow: 0 2px 10px rgba(20,24,31,.03);
}
.pd-quick:hover { border-color: #f1b0b0; background: #fffafa; }
.pd-quick-ico {
    width: 34px; height: 34px; border-radius: 10px; margin-bottom: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff5f5; color: var(--pd-red); font-size: .95rem;
}
.pd-quick strong { font-size: .86rem; }
.pd-quick span:last-child { color: var(--pd-muted); font-size: .72rem; }

.pd-meta-inline {
    display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px 16px !important;
}
.pd-meta-inline > div {
    display: flex !important; flex-direction: column; gap: 2px !important;
    grid-template-columns: none !important; border-bottom: 0 !important; padding-bottom: 0 !important;
}
.pd-panel-account { margin-bottom: 14px; }

.pd-grid-2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-bottom: 16px; }

/* Footer menu */
.pd-footer-nav {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--pd-line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: repeat(4, 1fr); gap: 2px;
    box-shadow: 0 -8px 28px rgba(20,24,31,.06);
}
.pd-footer-item {
    position: relative; border: 0; background: transparent; cursor: pointer;
    font: inherit; color: #7a8490; padding: 8px 4px 6px;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    border-radius: 12px;
}
.pd-footer-label {
    font-size: .68rem; font-weight: 700; line-height: 1.15;
    white-space: nowrap; letter-spacing: 0;
}
.pd-footer-ico {
    font-size: 1.05rem; line-height: 1; opacity: .9;
    width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
}
.pd-footer-item.active { color: var(--pd-red); background: #fff5f5; }
.pd-footer-badge {
    position: absolute; top: 2px; right: calc(50% - 22px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--pd-red); color: #fff; font-size: .62rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
body.pd-has-footer .pd-shell { padding-bottom: 0; }

/* Portefeuille */
.pd-wallet-hero {
    text-align: left;
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(255,255,255,.14), transparent 55%),
        linear-gradient(145deg, #141820 0%, #2a1214 58%, #8e1d1d 140%);
    color: #fff; border: 0; padding: 22px 22px 16px;
    border-radius: var(--pd-radius); margin-bottom: 16px;
    box-shadow: 0 18px 40px rgba(20, 24, 32, .18);
}
.pd-wallet-hero .pd-wallet-label,
.pd-wallet-hero .pd-wallet-solde,
.pd-wallet-hero .pd-wallet-hint,
.pd-wallet-hero .pd-wallet-kicker,
.pd-wallet-hero .pd-wallet-stats span,
.pd-wallet-hero .pd-wallet-stats strong { color: #fff; }
.pd-wallet-hero-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pd-wallet-kicker {
    margin: 0 0 14px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
    color: rgba(255,255,255,.72); font-weight: 700;
}
.pd-wallet-kicker i { margin-right: 6px; }
.pd-wallet-label { margin: 0 0 4px; font-size: .82rem; opacity: .75; }
.pd-wallet-solde {
    display: block; font-family: var(--pd-display); font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 8px;
}
.pd-wallet-hint { margin: 0; font-size: .86rem; opacity: .72; max-width: 36rem; }
.pd-wallet-mark {
    width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
    font-size: 1.2rem;
}
.pd-wallet-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12);
}
.pd-wallet-stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-wallet-stats span { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
.pd-wallet-stats strong { font-size: .95rem; font-weight: 700; }
.pd-wallet-note {
    margin: 0; padding: 12px 14px; border-radius: 12px;
    background: #e8f6ee; color: #146c3a; font-size: .88rem; font-weight: 600;
}
.pd-wallet-layout {
    display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 16px; align-items: start;
}
.pd-wallet-side { display: flex; flex-direction: column; gap: 16px; }
.pd-wallet-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-wallet-presets button {
    border: 1px solid var(--pd-line); background: #fff; color: var(--pd-ink);
    border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .8rem; font-weight: 700;
    cursor: pointer;
}
.pd-wallet-presets button:hover { border-color: #e7b4b4; background: #fff6f6; }
.pd-wallet-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
.pd-wallet-ico.is-in { background: #e7f6ee; color: #1b7a4a; }
.pd-wallet-ico.is-out { background: #fdecea; color: var(--pd-red); }
@media (max-width: 980px) {
    .pd-wallet-layout { grid-template-columns: 1fr; }
}
.pd-wallet-form { display: flex; flex-direction: column; gap: 12px; }
.pd-wallet-form .pd-btn { width: 100%; margin-top: 4px; }
.pd-wallet-form label.pd-field {
    display: flex; flex-direction: column; gap: 6px;
    font-size: .85rem; font-weight: 600; color: var(--pd-ink);
}
.pd-wallet-form label.pd-field span { font-weight: 600; color: var(--pd-ink); }
.pd-wallet-form label.pd-field input {
    width: 100%; border: 1px solid var(--pd-line); border-radius: 12px;
    padding: 12px 14px; font: inherit; font-weight: 500; background: #fff; color: var(--pd-ink);
}
.pd-wallet-min { margin: 0; font-size: .8rem; color: var(--pd-muted); }
.pd-wallet-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--pd-line);
    color: var(--pd-ink);
}
.pd-wallet-row:last-child { border-bottom: 0; }
.pd-wallet-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pd-wallet-row > strong { margin-left: auto; }
.pd-wallet-row strong { color: var(--pd-ink); }
.pd-wallet-row .pd-muted { font-size: .78rem; color: var(--pd-muted); }
.pd-wallet-credit { color: #1b7a4a !important; white-space: nowrap; }
.pd-wallet-debit { color: var(--pd-red) !important; white-space: nowrap; }
.pd-muted { color: var(--pd-muted); }

/* Panneaux clairs : texte toujours sombre (évite blanc sur blanc) */
.pd-panel:not(.rs-open-panel):not(.pd-wallet-hero) {
    color: var(--pd-ink);
}
.pd-panel:not(.rs-open-panel):not(.pd-wallet-hero) h2,
.pd-panel:not(.rs-open-panel):not(.pd-wallet-hero) strong,
.pd-panel:not(.rs-open-panel):not(.pd-wallet-hero) label,
.pd-panel:not(.rs-open-panel):not(.pd-wallet-hero) .pd-label {
    color: var(--pd-ink);
}

/* Horaires par jour */
.rs-hours-grid { display: flex; flex-direction: column; gap: 8px; }
.rs-hours-row {
    display: grid; grid-template-columns: minmax(110px, 1.2fr) 1fr auto 1fr;
    gap: 8px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--pd-line); border-radius: 12px;
    background: #fafbfc; opacity: .72;
}
.rs-hours-row.is-on { opacity: 1; background: #fff; border-color: #f1b0b0; }
.rs-hours-day {
    display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; cursor: pointer;
}
.rs-hours-day input { width: 16px; height: 16px; accent-color: var(--pd-red); }
.rs-hours-row input[type="time"] {
    width: 100%; border: 1px solid var(--pd-line); border-radius: 10px;
    padding: 8px 10px; font: inherit; background: #fff;
}
.rs-hours-row input[type="time"]:disabled { background: #f0f2f5; color: #9aa3ad; }
.rs-hours-sep { color: var(--pd-muted); font-size: .85rem; text-align: center; }
@media (max-width: 520px) {
    .rs-hours-row { grid-template-columns: 1fr 1fr; }
    .rs-hours-day { grid-column: 1 / -1; }
    .rs-hours-sep { display: none; }
}

.rs-geo-actions {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.rs-geo-actions .pd-btn i { margin-right: 4px; }

.pd-order-line-detail {
    display: inline-block; margin-top: 2px; font-size: .78rem; font-style: normal;
    color: var(--pd-muted); font-weight: 500; line-height: 1.35;
}

.pd-panel {
    background: var(--pd-card); border: 1px solid var(--pd-line); border-radius: var(--pd-radius);
    padding: 20px; margin-bottom: 16px; box-shadow: 0 4px 18px rgba(20,24,31,.03);
}
.pd-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pd-panel-head h2 { margin: 0; font-family: var(--pd-display); font-size: 1.05rem; }
.pd-link-btn { border: 0; background: none; color: var(--pd-red); font: inherit; font-weight: 600; cursor: pointer; }

.pd-actions { display: flex; flex-direction: column; gap: 10px; }
.pd-action {
    display: block; text-align: left; text-decoration: none; color: inherit;
    border: 1px solid var(--pd-line); background: #fafbfc; border-radius: 12px;
    padding: 14px 16px; cursor: pointer; font: inherit; transition: border-color .15s, background .15s;
}
.pd-action:hover { border-color: #f1b0b0; background: #fff7f7; }
.pd-action strong { display: block; margin-bottom: 2px; }
.pd-action span { color: var(--pd-muted); font-size: .88rem; }

.pd-meta { margin: 0; display: grid; gap: 12px; }
.pd-meta > div { display: grid; grid-template-columns: 100px 1fr; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--pd-line); }
.pd-meta > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pd-meta dt { color: var(--pd-muted); font-size: .85rem; margin: 0; }
.pd-meta dd { margin: 0; font-weight: 600; word-break: break-word; }

.pd-list { display: flex; flex-direction: column; gap: 8px; }
.pd-list-item {
    display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
    padding: 12px 14px; border-radius: 12px; background: #f8f9fb; border: 1px solid var(--pd-line);
}
.pd-list-item strong { display: block; font-size: .95rem; }
.pd-list-item span { display: block; color: var(--pd-muted); font-size: .82rem; }
.pd-maps-link {
    display: inline-block; margin-top: 6px; font-size: .82rem; font-weight: 700;
    color: #c62828; text-decoration: none;
}
.pd-maps-link:hover { text-decoration: underline; }

/* Commandes — pages par statut + cartes compactes */
.pd-orders-page-sub {
    margin: 2px 0 0; font-size: .78rem; color: var(--pd-muted); font-weight: 500;
}
.pd-orders-toolbar {
    margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px;
    position: sticky; top: 0; z-index: 4; background: #fff; padding-bottom: 4px;
}
.pd-orders-nav {
    display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--pd-line); scrollbar-width: none;
}
.pd-orders-nav::-webkit-scrollbar { display: none; }
.pd-orders-nav-btn {
    flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
    padding: 10px 12px 9px; font: inherit; display: flex; flex-direction: column;
    align-items: center; gap: 2px; min-width: 72px; color: #777;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.pd-orders-nav-lab { font-size: .72rem; font-weight: 700; white-space: nowrap; }
.pd-orders-nav-n {
    font-size: .68rem; font-weight: 800; min-width: 1.2em;
    color: #999;
}
.pd-orders-nav-btn.active {
    color: #c62828; border-bottom-color: #c62828;
}
.pd-orders-nav-btn.active .pd-orders-nav-n { color: #c62828; }
.pd-orders-search input {
    width: 100%; border: 1px solid var(--pd-line); border-radius: 10px;
    padding: 9px 12px; font: inherit; font-size: .86rem; background: #f8f9fb;
}
.pd-orders-list { gap: 8px; }
.pd-orders-page-enter {
    animation: pdOrdersPageIn .18s ease;
}
@keyframes pdOrdersPageIn {
    from { opacity: .35; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.pd-order-card {
    background: #fff; border: 1px solid var(--pd-line); border-radius: 12px;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 6px;
}
.pd-order-card.is-compact { padding: 8px 10px; gap: 4px; }
.pd-order-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pd-order-id strong { display: block; font-size: .86rem; letter-spacing: -.01em; }
.pd-order-date { display: block; margin-top: 1px; font-size: .7rem; color: var(--pd-muted); }
.pd-badge { font-size: .65rem; padding: 3px 7px; }
.pd-order-client {
    display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
}
.pd-order-client strong { font-size: .88rem; }
.pd-order-pay { font-size: .7rem; font-weight: 700; color: #8a6d00; white-space: nowrap; }
.pd-order-pay.is-paid { color: #2e7d32; }
.pd-order-lines { list-style: none; margin: 0; padding: 6px 0 0; border-top: 1px dashed var(--pd-line); }
.pd-order-lines li {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 2px 0; font-size: .78rem; color: #444;
}
.pd-order-more { color: var(--pd-muted) !important; font-style: italic; }
.pd-order-addr { margin: 0; font-size: .74rem; color: var(--pd-muted); line-height: 1.35; }
.pd-order-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding-top: 6px; border-top: 1px solid var(--pd-line);
}
.pd-order-total { font-size: .9rem; color: #c62828; font-weight: 800; }
.pd-order-icons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.pd-order-ico-wa { background: #e8f5e9 !important; color: #1b7a4a !important; }
.pd-order-ico-msg { background: #fdecea !important; color: var(--pd-red) !important; }
.pd-order-ico {
    width: 32px; height: 32px; border-radius: 8px; display: inline-flex;
    align-items: center; justify-content: center; text-decoration: none;
    background: #f1f3f5; font-size: .78rem; line-height: 1; border: 0; cursor: pointer;
    color: #455a64; padding: 0;
}
.pd-order-ico-btn { background: #e3f2fd; color: #1565c0; }
.pd-menu-btn i, .pd-refresh i { font-size: .95rem; color: var(--pd-ink); }
.pd-order-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pd-order-btn {
    border: 0; border-radius: 8px; padding: 6px 10px; font: inherit; font-weight: 700;
    font-size: .74rem; cursor: pointer; background: #eef2f7; color: #333;
}
.pd-order-btn.ok { background: #e7f6ee; color: #1b5e20; }
.pd-order-btn.bad { background: #fdecea; color: #b71c1c; }

.pd-maps-overlay {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(15,17,21,.55);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0;
}
.pd-maps-overlay.hidden { display: none !important; }
.pd-maps-panel {
    width: 100%; max-width: 720px; height: min(78vh, 640px);
    background: #fff; border-radius: 18px 18px 0 0;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.pd-maps-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--pd-line);
}
.pd-maps-head h3 { margin: 0; font-size: 1rem; }
.pd-maps-close {
    border: 0; background: #f1f3f5; width: 36px; height: 36px; border-radius: 50%;
    font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.pd-maps-frame {
    flex: 1; width: 100%; border: 0; background: #e8eaed; min-height: 280px;
}
.pd-maps-open {
    display: block; text-align: center; padding: 12px 14px;
    font-weight: 800; color: #1565c0; text-decoration: none;
    border-top: 1px solid var(--pd-line);
}
.pd-badge {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
    padding: 4px 8px; border-radius: 999px; background: #eee; color: #444; white-space: nowrap;
}
.pd-badge-ok { background: #e7f6ee; color: var(--pd-ok); }
.pd-badge-warn { background: #fff4d6; color: var(--pd-warn); }
.pd-badge-info { background: #e8f1fb; color: var(--pd-info); }
.pd-badge-bad { background: #fdecea; color: #b71c1c; }
.pd-empty { color: var(--pd-muted); text-align: center; padding: 28px 12px; margin: 0; }

/* Banners */
.pd-banner {
    border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid;
}
.pd-banner strong { display: block; margin-bottom: 4px; }
.pd-banner p { margin: 0; font-size: .92rem; }
.pd-banner-warn { background: #fff8e8; border-color: #f0d58a; color: #6d5200 !important; }
.pd-banner-info { background: #eef5fc; border-color: #b7d4f0; color: #0b5cab !important; }
.pd-banner-ok { background: #eef8f1; border-color: #b7e0c6; color: #1b7a4a !important; }
.pd-banner-warn strong, .pd-banner-info strong, .pd-banner-ok strong,
.pd-banner-warn p, .pd-banner-info p, .pd-banner-ok p { color: inherit !important; }

/* Buttons */
.pd-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: opacity .15s, transform .15s;
}
.pd-btn:active { transform: scale(.98); }
.pd-btn:disabled, .pd-btn.is-loading { opacity: .7; cursor: wait; pointer-events: none; }
.pd-btn-primary { background: var(--pd-red); color: #fff; }
.pd-btn-primary:hover { background: var(--pd-red-dark); }
.pd-btn-secondary { background: #fff; border-color: var(--pd-line); color: var(--pd-ink); }
.pd-btn-ghost { background: transparent; color: var(--pd-muted); border-color: transparent; }
.pd-btn-block { width: 100%; }
.pd-btn-spinner {
    width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: pd-spin .7s linear infinite;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }

/* Wizard */
.pd-wizard { max-width: 720px; }
.pd-wizard-progress {
    display: flex; gap: 8px; margin-bottom: 22px;
}
.pd-wiz-dot {
    flex: 1; height: 4px; border-radius: 99px; background: var(--pd-line); position: relative;
}
.pd-wiz-dot.active { background: var(--pd-red); }
.pd-wiz-dot.done { background: #f3a6a6; }
.pd-step { display: none; }
.pd-step.active { display: block; animation: pd-fade .25s ease; }
.pd-step-head { margin-bottom: 20px; }
.pd-step-kicker {
    margin: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--pd-red);
}
.pd-step-head h2 { margin: 0 0 6px; font-family: var(--pd-display); font-size: 1.35rem; }
.pd-step-head p { margin: 0; color: var(--pd-muted); }

.pd-fields { display: flex; flex-direction: column; gap: 14px; }
.pd-fields-nested {
    display: flex; flex-direction: column; gap: 14px;
    padding: 14px; border-radius: 12px; background: #f8f9fb; border: 1px solid var(--pd-line);
}
.pd-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-field label, .pd-label {
    display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: #2c3340;
}
.pd-field input, .pd-field select, .pd-field textarea {
    width: 100%; border: 1px solid var(--pd-line); border-radius: 12px;
    padding: 12px 14px; font: inherit; background: #fff; color: var(--pd-ink);
    transition: border-color .15s, box-shadow .15s;
}
.pd-field input:focus, .pd-field select:focus, .pd-field textarea:focus {
    outline: none; border-color: #ef9a9a; box-shadow: 0 0 0 3px rgba(211,47,47,.12);
}
.pd-field-hint {
    display: block; margin-top: 6px; color: var(--pd-muted); font-size: .78rem;
}
.tafuta-phone-row { display: flex; gap: 8px; align-items: stretch; }
.tafuta-phone-dial {
    flex: 0 0 auto; max-width: 48%; min-width: 140px; padding: 12px 10px;
    border: 1px solid var(--pd-line); border-radius: 12px; font: inherit; background: #fff;
}
.tafuta-phone-national {
    flex: 1; min-width: 0; padding: 12px 14px;
    border: 1px solid var(--pd-line); border-radius: 12px; font: inherit; background: #fff;
}
.tafuta-phone-dial:focus, .tafuta-phone-national:focus {
    outline: none; border-color: #ef9a9a; box-shadow: 0 0 0 3px rgba(211,47,47,.12);
}
.pd-gps-status { margin: 0; color: var(--pd-muted); font-size: .9rem; }
.pd-form-error {
    background: #fdecea; color: #b71c1c; border: 1px solid #f5c6c2;
    border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; font-size: .92rem;
}
.pd-review {
    background: #f8f9fb; border: 1px solid var(--pd-line); border-radius: 12px; padding: 16px;
}
.pd-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pd-line); font-size: .92rem; }
.pd-review-row:last-child { border-bottom: 0; }
.pd-review-row span { color: var(--pd-muted); }
.pd-review-row strong { text-align: right; }

.pd-wizard-nav {
    display: flex; justify-content: space-between; gap: 10px; margin-top: 24px;
    padding-top: 18px; border-top: 1px solid var(--pd-line);
}

/* Upload zones (compat with upload-zones.js) */
.upload-zone {
    border: 1.5px dashed #cfd5de; border-radius: 14px; padding: 18px; text-align: center;
    cursor: pointer; background: #fafbfc; position: relative; transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.is-drag { border-color: #ef9a9a; background: #fff7f7; }
.upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.upload-zone-empty strong { font-size: .95rem; }
.upload-hint { color: var(--pd-muted); font-size: .82rem; }
.upload-btn {
    display: inline-block; margin-top: 4px; background: var(--pd-red); color: #fff;
    padding: 6px 14px; border-radius: 8px; font-size: .85rem; font-weight: 600;
}
.upload-zone-preview img { max-width: 100%; max-height: 180px; border-radius: 10px; display: block; margin: 0 auto 8px; }
.upload-remove {
    border: 1px solid var(--pd-line); background: #fff; border-radius: 8px; padding: 6px 12px;
    cursor: pointer; font: inherit; font-size: .85rem;
}
.upload-status { margin: 8px 0 0; font-size: .82rem; color: var(--pd-muted); min-height: 1.2em; }

.pd-overlay {
    position: fixed; inset: 0; background: rgba(10,12,16,.45); z-index: 35;
}
.pd-toast {
    position: fixed; right: 24px; bottom: 24px; z-index: 80;
    width: min(420px, calc(100vw - 32px)); padding: 16px 18px;
    border: 1px solid #a8d8ba; border-radius: 14px;
    background: #effaf3; color: #155e38;
    box-shadow: 0 16px 44px rgba(20,24,31,.18);
    animation: pd-fade .25s ease;
}
.pd-toast strong, .pd-toast span { display: block; }
.pd-toast span { margin-top: 4px; font-size: .9rem; line-height: 1.45; }

.pd-btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 8px; }
.pd-btn-ghost {
    background: #fff; color: var(--pd-ink); border: 1px solid var(--pd-line);
}
.pd-btn-ghost:hover { background: #f5f6f8; }
.pd-list-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 12px; background: #f8f9fb; border: 1px solid var(--pd-line);
}
.pd-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pd-muted { color: var(--pd-muted); font-size: .82rem; margin-top: 2px; }
.pd-fields-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.pd-field-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.pd-thumb {
    display: block; margin-top: 10px; max-width: 120px; max-height: 120px;
    border-radius: 12px; object-fit: cover; border: 1px solid var(--pd-line);
}
.pd-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pd-form-error { color: #b71c1c; font-size: .9rem; margin: 8px 0 0; }
.pd-hr { border: 0; border-top: 1px solid var(--pd-line); margin: 22px 0; }
.pd-inline-form {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
}
.pd-inline-form input {
    flex: 1; min-width: 140px; border: 1px solid var(--pd-line); border-radius: 10px;
    padding: 8px 10px; font: inherit;
}
.pd-check-inline { font-size: .85rem; color: var(--pd-muted); display: flex; align-items: center; gap: 4px; }
.pd-opt-card {
    border: 1px solid var(--pd-line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff;
}
.pd-opt-list { margin: 8px 0; padding-left: 18px; color: var(--pd-muted); font-size: .9rem; }
.pd-opt-list li { margin-bottom: 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;
}
.pd-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.pd-field-hint { display: block; margin-top: 6px; color: var(--pd-muted); font-size: .8rem; }

/* Open / close hero */
.rs-open-panel {
    background: linear-gradient(135deg, #1a1f28 0%, #2a3140 100%);
    color: #fff; border: 0; margin-bottom: 18px;
}
.rs-open-panel.is-open {
    background: linear-gradient(135deg, #1b5e3a 0%, #2e7d4f 100%);
}
.rs-open-row {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.rs-open-copy { flex: 1; min-width: 200px; }
.rs-open-kicker {
    margin: 0 0 4px; font-size: .75rem; text-transform: uppercase;
    letter-spacing: .06em; opacity: .7;
}
.rs-open-copy h2 { margin: 0 0 4px; font-family: var(--pd-display); font-size: 1.35rem; }
.rs-open-copy p { margin: 0; opacity: .85; font-size: .92rem; }
.rs-open-toggle {
    display: inline-flex; align-items: center; gap: 12px;
    border: 0; cursor: pointer; background: rgba(255,255,255,.12);
    color: #fff; border-radius: 999px; padding: 10px 16px 10px 12px;
    font: inherit; font-weight: 700; transition: background .2s, transform .15s;
}
.rs-open-toggle:hover { background: rgba(255,255,255,.2); }
.rs-open-toggle-track {
    width: 52px; height: 30px; border-radius: 999px; background: rgba(0,0,0,.25);
    position: relative; display: inline-block; flex-shrink: 0;
}
.rs-open-toggle-knob {
    position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
    border-radius: 50%; background: #fff; transition: transform .2s;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.rs-open-toggle[aria-pressed="true"] .rs-open-toggle-track { background: rgba(255,255,255,.35); }
.rs-open-toggle[aria-pressed="true"] .rs-open-toggle-knob { transform: translateX(22px); }
/* Bannière sous le panneau sombre : garder le contraste (jamais blanc sur blanc) */
.rs-open-panel .pd-banner { color: initial; }

/* Accès horaires (bouton → page dédiée) */
.pd-hours-link {
    display: flex; align-items: center; gap: 14px; width: 100%;
    text-align: left; margin-bottom: 16px; padding: 14px 16px;
    border: 1px solid var(--pd-line); border-radius: var(--pd-radius);
    background: var(--pd-card); color: var(--pd-ink); cursor: pointer;
    font: inherit; box-shadow: 0 2px 10px rgba(20,24,31,.03);
}
.pd-hours-link:hover { border-color: #f1b0b0; background: #fffafa; }
.pd-hours-link-ico {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff5f5; color: var(--pd-red); font-size: 1rem;
}
.pd-hours-link-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-hours-link-copy strong { font-size: .95rem; color: var(--pd-ink); }
.pd-hours-link-copy span { font-size: .8rem; color: var(--pd-muted); }
.pd-hours-link-chev { color: #9aa3ad; font-size: .85rem; }

/* File cards */
.rs-file-card {
    display: block; cursor: pointer; border: 1.5px dashed #cfd5de;
    border-radius: 14px; background: #fafbfc; overflow: hidden;
    transition: border-color .15s, background .15s;
}
.rs-file-card:hover { border-color: #ef9a9a; background: #fff7f7; }
.rs-file-preview {
    display: flex; align-items: center; justify-content: center;
    min-height: 120px; position: relative; background: #f0f2f5;
}
.rs-file-preview--wide { min-height: 140px; }
.rs-file-preview img {
    width: 100%; height: 120px; object-fit: cover; display: block;
}
.rs-file-preview--wide img { height: 140px; }
.rs-file-placeholder {
    color: var(--pd-muted); font-weight: 600; font-size: .92rem; padding: 20px;
}
.rs-file-meta {
    display: block; padding: 8px 12px; font-size: .78rem; color: var(--pd-muted);
    border-top: 1px solid var(--pd-line); background: #fff;
}
.rs-file-card--pdf .rs-pdf-preview { min-height: 72px; flex-direction: column; gap: 6px; }
.rs-pdf-link {
    color: var(--pd-red); font-weight: 700; font-size: .9rem; text-decoration: none;
}
.rs-pdf-link:hover { text-decoration: underline; }
.rs-file-card--pdf.has-pdf {
    border-color: #b7e0c6; background: #f4fbf6;
}

/* Radios / switches */
.rs-radio-row, .rs-radio-col { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-radio-col { flex-direction: column; }
.rs-radio {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    border: 1px solid var(--pd-line); background: #fff; border-radius: 12px;
    padding: 12px 14px; font-weight: 500; transition: border-color .15s, background .15s, box-shadow .15s;
}
.rs-radio:has(input:checked) {
    border-color: #ef9a9a; background: #fff7f7;
    box-shadow: inset 0 0 0 1px rgba(211,47,47,.2);
}
.rs-radio input { accent-color: var(--pd-red); width: 18px; height: 18px; flex-shrink: 0; }
.rs-radio span em { font-style: normal; font-weight: 700; color: var(--pd-red); }
.rs-switch-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.rs-switch {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    border: 1px solid var(--pd-line); border-radius: 999px; padding: 8px 14px;
    background: #fff; font-weight: 500; font-size: .9rem;
}
.rs-switch:has(input:checked) { background: #eef8f1; border-color: #b7e0c6; color: var(--pd-ok); }
.rs-switch input { accent-color: var(--pd-ok); width: 16px; height: 16px; }

.rs-save-bar {
    position: sticky; bottom: 12px; z-index: 15;
    display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
    margin-top: 8px; padding: 14px 16px; border-radius: 14px;
    background: rgba(255,255,255,.92); border: 1px solid var(--pd-line);
    box-shadow: 0 10px 30px rgba(20,24,31,.1); backdrop-filter: blur(8px);
}
.rs-save-bar .pd-form-error { margin: 0; flex: 1; }

.rs-file-card--compact {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 10px 14px; margin-top: 8px;
}
.rs-photos-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px; margin-bottom: 8px;
}
.rs-photo-tile {
    position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--pd-line); background: #f0f2f5;
}
.rs-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-photo-tile button {
    position: absolute; top: 4px; right: 4px; width: 26px; height: 26px;
    border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff;
    cursor: pointer; font-size: 14px; line-height: 1;
}

/* Modal */
.pd-modal {
    position: fixed; inset: 0; z-index: 90; display: flex;
    align-items: center; justify-content: center; padding: 16px;
}
.pd-modal.hidden { display: none !important; }
.pd-modal-backdrop {
    position: absolute; inset: 0; background: rgba(10,12,16,.5);
}
.pd-modal-panel {
    position: relative; z-index: 1; width: min(440px, 100%);
    background: #fff; border-radius: 16px; padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(20,24,31,.28);
    animation: pd-fade .2s ease;
}
.pd-modal-panel h2 {
    margin: 0 0 8px; font-family: var(--pd-display); font-size: 1.15rem;
}
.pd-modal-msg { margin: 0 0 14px; color: var(--pd-muted); line-height: 1.45; font-size: .95rem; }
.pd-modal-actions {
    display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap;
}
.pd-modal-panel .pd-fields { margin-top: 8px; }
.pd-modal-panel input, .pd-modal-panel textarea {
    width: 100%; border: 1px solid var(--pd-line); border-radius: 10px;
    padding: 10px 12px; font: inherit;
}

/* Selfie KYC — caméra uniquement */
.pd-selfie-modal .pd-selfie-panel { width: min(420px, 100%); }
.pd-selfie-stage {
    position: relative; width: 100%; aspect-ratio: 1;
    border-radius: 14px; overflow: hidden; background: #0f1218;
    margin-bottom: 10px;
}
.pd-selfie-stage video {
    width: 100%; height: 100%; object-fit: cover;
    transform: scaleX(-1);
}
.pd-selfie-stage canvas { display: none; }
#pd-selfie-err { margin: 0 0 8px; }

/* Item editor — grille professionnelle */
.ie-panel { padding-bottom: 8px; }
.ie-panel .pd-panel-head { flex-wrap: wrap; }
.ie-panel .pd-panel-head .pd-link-btn { display: inline-block; margin-bottom: 6px; }
.ie-sub {
    margin: 4px 0 0; color: var(--pd-muted); font-size: .85rem; font-weight: 500;
}
.ie-plan-row { cursor: default; }
.ie-plan-main { flex: 1; min-width: 0; cursor: pointer; }
.ie-plan-main:hover strong { color: var(--pd-red); }
.ie-card--cta {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    background: linear-gradient(180deg, #fff8f8 0%, #fff 100%);
    border-color: #f0c4c4;
}
.ie-price-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px;
    margin: 0 0 18px; padding: 14px 16px; border-radius: 14px;
    background: linear-gradient(135deg, #1a1f28 0%, #2c3340 100%);
    color: #fff;
}
.ie-price-bar > div { min-width: 120px; }
.ie-price-label {
    display: block; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .05em; opacity: .7; margin-bottom: 2px;
}
.ie-price-bar strong { font-size: 1.15rem; font-family: var(--pd-display); }
.ie-price-badge {
    display: inline-flex; align-items: center; padding: 5px 12px;
    border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: rgba(255,255,255,.12);
}
.ie-price-badge.is-ok { background: rgba(76,175,80,.35); color: #c8e6c9; }
.ie-price-badge.is-warn { background: rgba(255,152,0,.4); color: #ffe0b2; }
.ie-price-bar .pd-btn { margin-left: auto; }
.ie-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.ie-card {
    background: #fff; border: 1px solid var(--pd-line); border-radius: 14px;
    padding: 16px 16px 14px;
}
.ie-card h3 {
    margin: 0 0 12px; font-size: .95rem; font-family: var(--pd-display);
    color: var(--pd-ink); letter-spacing: -.01em;
}
.ie-card .pd-fields { gap: 10px; }
.ie-card .rs-radio { padding: 10px 12px; flex: 1; min-width: 120px; }
.ie-tarif-row { grid-template-columns: 1.4fr 1fr 0.8fr; }
.ie-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.ie-row { margin: 0; }
.ie-add-row {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
}
.ie-add-row input[type="text"],
.ie-add-row input:not([type]),
.ie-add-row input[type="number"] {
    flex: 1; min-width: 100px; border: 1px solid var(--pd-line); border-radius: 10px;
    padding: 8px 10px; font: inherit; background: #fafbfc;
}
.ie-add-row input[placeholder="Prix"],
.ie-add-row #ing-prix,
.ie-add-row #comp-prix { flex: 0 0 100px; min-width: 90px; }
.ie-subblock {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pd-line);
}
.ie-subblock h3 { margin-top: 0; }
.ie-actions {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pd-line);
}
.ie-actions .pd-form-error { margin: 0; flex: 1; text-align: left; }
#item-extra-panels.ie-card { grid-column: 1 / -1; }

@media (max-width: 960px) {
    .pd-kpi-grid { grid-template-columns: 1fr 1fr; }
    .pd-quick-grid { grid-template-columns: repeat(3, 1fr); }
    .pd-grid-2 { grid-template-columns: 1fr; }
    .pd-fields-row { grid-template-columns: 1fr; }
    .ie-grid { grid-template-columns: 1fr; }
    .ie-tarif-row { grid-template-columns: 1fr; }
    .ie-price-bar .pd-btn { margin-left: 0; width: 100%; }
}

@media (max-width: 820px) {
    .pd-sidebar {
        transform: translateX(-105%); transition: transform .2s ease;
        padding: 14px 10px;
        width: min(var(--pd-sidebar), 88vw);
    }
    .pd-sidebar.open { transform: translateX(0); }
    .pd-brand { padding: 2px 6px 14px; margin-bottom: 12px; }
    .pd-shell { margin-left: 0; }
    .pd-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .pd-main { padding: 8px var(--pd-gutter) calc(76px + env(safe-area-inset-bottom, 0px)); max-width: none; }
    .pd-topbar { padding: 8px var(--pd-gutter); gap: 8px; }
    .pd-page-title { font-size: 1.15rem; }
    .pd-page-sub { font-size: .8rem; }
    .pd-panel { padding: 12px; margin-bottom: 10px; border-radius: 12px; }
    .pd-panel-head { margin-bottom: 10px; }
    .pd-kpi-grid { gap: 8px; margin-bottom: 10px; }
    .pd-kpi { padding: 10px 8px; border-radius: 12px; }
    .pd-quick-grid { gap: 8px; margin-bottom: 10px; }
    .pd-dash-hero { margin-bottom: 10px; gap: 10px; }
    .pd-wallet-hero { padding: 16px 14px 12px; margin-bottom: 10px; }
    .pd-list-item { padding: 10px; }
    .pd-order-card { padding: 8px 10px; }
    .pd-gate { padding: 24px var(--pd-gutter); }
    .pd-gate-card { padding: 22px 16px; width: 100%; }
    .pd-hours-link { padding: 12px; margin-bottom: 10px; gap: 10px; }
    .pd-banner { padding: 10px 12px; margin-bottom: 10px; }
    .pd-empty { padding: 18px 8px; }
    .pd-modal { padding: 10px; }
    .pd-modal-panel { padding: 16px 14px 14px; border-radius: 14px; }
    .ie-card { padding: 12px; }
    .ie-price-bar { padding: 12px; margin-bottom: 12px; gap: 12px; }
    .rs-save-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; border-radius: 12px; }
    .pd-field-row { grid-template-columns: 1fr; }
    .pd-toast { right: var(--pd-gutter); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
    .pd-footer-nav { display: grid; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); }
    .pd-dash-cta { width: 100%; }
    .pd-dash-hero { align-items: stretch; }
    .pd-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .pd-maps-overlay { z-index: 90; }
    .pd-context-item { padding: 12px; }
}

/* Compte invité */
.pd-guest-panel .pd-dash-kicker { margin: 0 0 4px; }
.pd-is-guest .pd-wizard { display: none !important; }
.pd-guest-panel .pd-team-tags { margin-top: 4px; }

/* Identité partagée entre espaces */
#shared-profile-hint { margin-bottom: 12px; }
#shared-profile-hint p { margin: 0; }
.pd-step.is-shared-done .pd-step-head h2::after {
    content: ' · déjà renseigné';
    font-size: .72em; font-weight: 600; color: var(--pd-ok); text-transform: none; letter-spacing: 0;
}

/* Choix d’espace (multi-profils) */
.pd-context-card { max-width: 440px; text-align: left; }
.pd-context-card h1 { margin: 4px 0 8px; font-size: 1.35rem; }
.pd-context-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pd-context-item {
    display: flex; align-items: flex-start; gap: 12px; width: 100%;
    text-align: left; border: 1px solid var(--pd-line); background: #fff;
    border-radius: 14px; padding: 14px 16px; cursor: pointer;
    font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.pd-context-item:hover {
    border-color: #e7b4b4; box-shadow: 0 6px 20px rgba(40,16,16,.06);
}
.pd-context-ico {
    width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #fdecea; color: var(--pd-red); font-size: 1.05rem;
}
.pd-context-item.is-guest .pd-context-ico { background: #eef2ff; color: #3949ab; }
.pd-context-copy { flex: 1; min-width: 0; }
.pd-context-copy strong { display: block; font-size: .98rem; color: var(--pd-ink); }
.pd-context-copy span { display: block; font-size: .82rem; color: var(--pd-muted); margin-top: 2px; line-height: 1.35; }
.pd-context-badge {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    padding: 3px 8px; border-radius: 999px; background: #fdecea; color: #b71c1c; flex-shrink: 0;
}
.pd-context-item.is-guest .pd-context-badge { background: #e8eaf6; color: #283593; }
.pd-ctx-switch {
    margin-bottom: 8px !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
}

/* Accès équipe */
.pd-team-panel { margin-top: 20px; }
.pd-team-sub { margin: 4px 0 0; font-size: .88rem; color: var(--pd-muted); max-width: 36rem; line-height: 1.4; }
.pd-team-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.pd-team-perms { border: 1px solid var(--pd-line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; }
.pd-team-perms legend { font-size: .82rem; font-weight: 700; padding: 0 6px; color: var(--pd-ink); }
.pd-team-perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 8px; }
.pd-team-perm {
    display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; color: var(--pd-ink);
    cursor: pointer; line-height: 1.35;
}
.pd-team-perm input { margin-top: 3px; accent-color: var(--pd-red); }
.pd-team-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pd-team-list-title { margin: 0 0 10px; font-size: .92rem; font-weight: 700; }
.pd-team-list { display: flex; flex-direction: column; gap: 10px; }
.pd-team-row {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 12px 14px; background: #faf7f5; border-radius: 12px; border: 1px solid var(--pd-line);
}
.pd-team-row > div { min-width: 0; flex: 1; }
.pd-team-row strong { display: block; font-size: .92rem; color: var(--pd-ink); }
.pd-team-row .pd-muted { font-size: .78rem; margin-top: 2px; }
.pd-team-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pd-team-tag {
    font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 999px;
    background: #fdecea; color: #b71c1c;
}
.pd-team-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.pd-team-actions .pd-btn { padding: 6px 10px; font-size: .78rem; }
.pd-nav-item.is-denied, .pd-quick.is-denied { display: none !important; }

@media (max-width: 720px) {
    .pd-team-perm-grid { grid-template-columns: 1fr; }
    .pd-team-lists { grid-template-columns: 1fr; }
}

@media (min-width: 821px) {
    .pd-footer-nav { display: none !important; }
}
