/* ============================================================
   Royal Poulet Admin — styles globaux
   Chargé après Tailwind sur toutes les pages du dashboard
   ============================================================ */

/* ── Alpine.js : masque les éléments avant hydratation ────── */
[x-cloak] {
    display: none !important;
}

/* ── Conteneurs Chart.js ───────────────────────────────────── */
.chart-container {
    position: relative;
}

/* ── Scrollbar personnalisée (webkit) ─────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ── Transitions de page douces ───────────────────────────── */
main {
    animation: rp-fadein 0.18s ease-out;
}

@keyframes rp-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ── Badges de statut commandes ───────────────────────────── */
.badge-livree       { background: #dcfce7; color: #15803d; }
.badge-en-livraison { background: #dbeafe; color: #1d4ed8; }
.badge-confirmee    { background: #fef9c3; color: #a16207; }
.badge-en-attente   { background: #f3f4f6; color: #4b5563; }
.badge-annulee      { background: #fee2e2; color: #b91c1c; }

/* ── Cartes KPI ───────────────────────────────────────────── */
.kpi-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    padding: 1.25rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* ── Tableaux du dashboard ────────────────────────────────── */
.rp-table {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: collapse;
}
.rp-table thead tr {
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}
.rp-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}
.rp-table tbody tr {
    border-bottom: 1px solid #f9fafb;
    transition: background 0.1s;
}
.rp-table tbody tr:hover {
    background: #f9fafb;
}
.rp-table tbody td {
    padding: 0.875rem 1rem;
}

/* ── Boutons d'action dans les tableaux ───────────────────── */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem;
    border-radius: 0.5rem;
    transition: background 0.15s, color 0.15s;
    color: #9ca3af;
}
.btn-action:hover {
    background: #f3f4f6;
    color: #374151;
}
.btn-action-view:hover  { background: #eef2ff; color: #4338ca; }
.btn-action-edit:hover  { background: #eff6ff; color: #1d4ed8; }
.btn-action-del:hover   { background: #fef2f2; color: #b91c1c; }

/* ── Inputs formulaire ────────────────────────────────────── */
.rp-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.rp-input:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.rp-input.error {
    border-color: #fca5a5;
    background: #fff5f5;
}
.rp-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ── Labels de formulaire ─────────────────────────────────── */
.rp-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* ── Bouton primaire (rouge Royal Poulet) ─────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #c0392b;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(192, 57, 43, 0.25);
}
.btn-primary:hover {
    background: #a93226;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

/* ── Bouton succès (vert) ─────────────────────────────────── */
.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}
.btn-success:hover {
    background: #15803d;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
}

/* ── Bouton secondaire (contour) ──────────────────────────── */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* ── Barre de progression (wizard) ───────────────────────── */
.rp-progress-bar {
    height: 4px;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}
.rp-progress-bar-fill {
    height: 100%;
    background: #c0392b;
    border-radius: 9999px;
    transition: width 0.4s ease-out;
}

/* ── Flash messages ───────────────────────────────────────── */
.flash-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    color: #166534;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.flash-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    color: #991b1b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* ── Sidebar dark : survol des liens ──────────────────────── */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.sidebar-link.active {
    background: #c0392b;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.35);
}

/* ── Skeleton loader ──────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 0.5rem;
}
@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Responsive : masquer sidebar sur mobile ──────────────── */
.rp-dashboard-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .rp-dashboard-sidebar {
        display: flex;
    }
}

@media (max-width: 1023px) {
    .rp-sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(0, 0, 0, 0.5);
    }
}

/* ── PWA mode standalone (écran d'accueil mobile) ─────────── */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Filtres défilables (catalogue produits mobile) */
.scrollbar-none {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.scrollbar-none::-webkit-scrollbar { display: none; }

@media (max-width: 1023px) {
    /* Catalogue produits — KPIs compacts */
    .kpi-card { padding: 1rem; }
    .kpi-card .text-2xl { font-size: 1.25rem; }

    /* Nouveau produit — layout mobile forcé (fallback si Tailwind non rebuild) */
    .rp-produit-wizard-layout {
        flex-direction: column !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .rp-produit-wizard-layout > .flex-1 {
        width: 100%;
        min-width: 0;
    }
    .rp-produit-wizard h2.text-xl { font-size: 1.125rem; }
}

/* ── Refonte premium ──────────────────────────────────────── */
:root {
    --rp-brand: #a93226;
    --rp-brand-dark: #7b241c;
    --rp-surface: #ffffff;
    --rp-canvas: #f8fafc;
    --rp-border: #e9edf2;
    --rp-text: #172033;
    --rp-muted: #718096;
    --rp-shadow: 0 10px 30px rgba(23, 32, 51, 0.055);
}

body {
    color: var(--rp-text);
    background:
        radial-gradient(circle at 100% 0%, rgba(254, 226, 226, 0.5), transparent 24rem),
        var(--rp-canvas);
}

.rp-panel {
    background: var(--rp-surface);
    border: 1px solid var(--rp-border);
    border-radius: 1rem;
    box-shadow: var(--rp-shadow);
}

.rp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rp-border);
}

.rp-eyebrow {
    color: var(--rp-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rp-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--rp-border);
    border-radius: 0.75rem;
    background: #f8fafc;
}

.rp-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.rp-filter:hover { color: var(--rp-text); background: #fff; }
.rp-filter.is-active {
    color: #fff;
    background: var(--rp-brand);
    box-shadow: 0 4px 10px rgba(169, 50, 38, 0.24);
}

.kpi-card {
    position: relative;
    overflow: hidden;
    border-color: var(--rp-border);
    border-radius: 1rem;
    box-shadow: 0 5px 16px rgba(23, 32, 51, 0.035);
}
.kpi-card::after {
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: rgba(169, 50, 38, 0.045);
    content: '';
}
.kpi-card:hover { box-shadow: var(--rp-shadow); transform: translateY(-2px); }

.rp-table thead tr { background: #f8fafc; border-bottom-color: var(--rp-border); }
.rp-table tbody tr { border-bottom-color: #edf1f5; }
.rp-table tbody tr:hover { background: #fffafa; }
.rp-table thead th { color: #64748b; }

.rp-input {
    min-height: 2.75rem;
    border-color: #dce3ea;
    border-radius: 0.75rem;
}
.rp-input:hover { border-color: #cbd5e1; }

.btn-primary,
.btn-success,
.btn-secondary {
    min-height: 2.75rem;
    border-radius: 0.75rem;
}
.btn-primary {
    background: linear-gradient(135deg, #c0392b, #922b21);
    box-shadow: 0 6px 14px rgba(169, 50, 38, 0.22);
}
.btn-primary:hover { background: linear-gradient(135deg, #a93226, #7b241c); }
.btn-secondary { border-color: #dce3ea; }

.rp-sidebar-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}
.rp-sidebar-nav-link:hover { color: #fff; background: rgba(255,255,255,0.07); }
.rp-sidebar-nav-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, #c0392b, #922b21);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.rp-sidebar-nav-link.is-active::before {
    position: absolute;
    left: -0.75rem;
    width: 0.1875rem;
    height: 1.5rem;
    border-radius: 0 999px 999px 0;
    background: #fca5a5;
    content: '';
}

@media (max-width: 1023px) {
    .rp-panel-header { padding: 0.875rem 1rem; }
    .rp-filter-group {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }
    .rp-filter { flex: 0 0 auto; }
    .rp-filter-group::-webkit-scrollbar { display: none; }
}

/* Cohérence des vues métier (listes, fiches et formulaires) */
main > .bg-white.rounded-xl.border,
main .space-y-5 > .bg-white.rounded-xl.border,
main .space-y-4 > .bg-white.rounded-xl.border,
main .space-y-6 > .bg-white.rounded-xl.border {
    border-color: var(--rp-border);
    box-shadow: 0 4px 14px rgba(23, 32, 51, 0.03);
}

main .bg-white.rounded-2xl.border {
    border-color: var(--rp-border);
    box-shadow: var(--rp-shadow);
}

main .border-b.border-gray-100 { border-color: var(--rp-border); }
main .border-t.border-gray-100 { border-color: var(--rp-border); }

@media (max-width: 639px) {
    main .overflow-x-auto { border-radius: 0.75rem; }
    main .rp-table thead th,
    main .rp-table tbody td { padding: 0.75rem; }
    main .rp-table tbody td { white-space: nowrap; }
}

.rp-mobile-quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
    padding: 0.75rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 5px 12px rgba(169, 50, 38, 0.22);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.rp-mobile-quick-action:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(169, 50, 38, 0.2);
}

/* ── Commandes : bascule mobile / desktop (sans Tailwind) ─── */
.rp-orders-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.rp-panel > .rp-orders-mobile {
    gap: 0;
    margin-bottom: 0;
}
.rp-panel > .rp-orders-mobile .rp-order-line {
    border-bottom: 1px solid #edf1f5;
}
.rp-orders-desktop {
    display: none !important;
}
.rp-order-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rp-order-detail-main,
.rp-order-detail-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.rp-order-status-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.rp-order-line__placeholder {
    display: flex;
}
.rp-order-line__placeholder.is-hidden {
    display: none;
}

@media (min-width: 1024px) {
    .rp-orders-mobile {
        display: none !important;
    }
    .rp-orders-desktop {
        display: block !important;
    }
    .rp-orders-desktop.items-center {
        display: flex !important;
    }
    .rp-order-detail-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 1.25rem;
        align-items: start;
    }
    .rp-order-status-actions {
        display: flex;
        flex-wrap: wrap;
    }
    .rp-order-status-actions form {
        display: contents;
    }
    .rp-order-status-actions .btn-primary,
    .rp-order-status-actions .btn-secondary {
        width: auto;
    }
}

/* ── Commandes mobile ─────────────────────────────────────── */
.rp-order-card {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--rp-border);
    box-shadow: 0 6px 18px rgba(23, 32, 51, 0.045);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rp-order-card:active {
    transform: translateY(1px);
}
.rp-order-card__top,
.rp-order-card__client,
.rp-order-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.rp-order-card__top { margin-bottom: 0.85rem; }
.rp-order-card__client {
    justify-content: flex-start;
    margin-bottom: 0.85rem;
}
.rp-order-card__bottom {
    padding-top: 0.75rem;
    border-top: 1px solid #edf1f5;
}
.rp-order-card__numero {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
}
.rp-order-card__date,
.rp-order-card__meta {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: #94a3b8;
}
.rp-order-card__avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #fde8e6;
    color: #a93226;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}
.rp-order-card__name,
.rp-order-card__product {
    font-size: 0.9rem;
    font-weight: 700;
    color: #172033;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rp-order-card__total {
    font-size: 0.95rem;
    font-weight: 800;
    color: #a93226;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rp-order-hero {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #1e293b, #7b241c);
    color: #fff;
    box-shadow: 0 10px 24px rgba(123, 36, 28, 0.22);
}
.rp-order-hero__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.rp-order-hero__label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}
.rp-order-hero__numero {
    margin-top: 0.2rem;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rp-order-hero__date {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.72);
}
.rp-order-hero__total {
    margin-top: 0.95rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.rp-order-hero__total strong {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.rp-order-line {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
}
.rp-order-line__thumb {
    position: relative;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 0.8rem;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.rp-order-line__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rp-order-line__placeholder {
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
}
.rp-order-line__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #172033;
}
.rp-order-line__cat,
.rp-order-line__meta {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: #94a3b8;
}
.rp-order-line__meta {
    display: flex;
    gap: 0.35rem;
    color: #64748b;
}
.rp-order-line__total {
    font-size: 0.88rem;
    font-weight: 800;
    color: #172033;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.rp-order-line__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    background: #f8fafc;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 700;
}
.rp-order-line__footer strong {
    font-size: 0.95rem;
    color: #172033;
    font-variant-numeric: tabular-nums;
}
.rp-order-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    background: #fde8e6;
    color: #922b21;
    font-size: 0.72rem;
    font-weight: 700;
}

.rp-schedule-toggle {
    display: inline-block;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.rp-schedule-toggle::after {
    content: '';
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}
.peer:checked + .rp-schedule-toggle {
    background: var(--rp-brand);
}
.peer:checked + .rp-schedule-toggle::after {
    transform: translateX(1.25rem);
}

/* ── Notifications dashboard ─────────────────────────── */
.rp-notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rp-notif-btn:hover {
    background: #fde8e6;
    color: #a93226;
    border-color: #f5c6c0;
}
.rp-notif-badge {
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #a93226;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1.15rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.rp-notif-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 40;
    width: min(22rem, calc(100vw - 1.5rem));
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(23, 32, 51, 0.16);
    overflow: hidden;
}
.rp-notif-panel__head,
.rp-notif-panel__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
}
.rp-notif-panel__foot {
    display: block;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #a93226;
    text-decoration: none;
    border-top: 1px solid #edf1f5;
}
.rp-notif-panel__foot:hover { background: #fde8e6; }
.rp-notif-panel__list {
    max-height: 22rem;
    overflow-y: auto;
}
.rp-notif-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem 0.85rem 1.15rem;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s ease;
}
.rp-notif-item:hover { background: #f8fafc; }
.rp-notif-item.is-unread { background: #fff7f6; }
.rp-notif-dot {
    position: absolute;
    left: 0.45rem;
    top: 1.15rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #a93226;
}
.rp-nav-badge {
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.25rem;
    text-align: center;
}
.rp-sidebar-nav-link.is-active .rp-nav-badge {
    background: rgba(255,255,255,0.25);
}

.rp-notif-panel__list { border-top: 1px solid #edf1f5; margin-top: 0.5rem; }

.rp-notif-btn--warn {
    border-color: #f59e0b;
    color: #b45309;
    background: #fffbeb;
}
.rp-notif-btn--warn:hover {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

/* ── Toast alerte nouvelle commande ───────────────────────── */
#rp-alert-toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}
.rp-alert-toast {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: #a93226;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 16px 40px rgba(169, 50, 38, 0.35);
    transform: translateY(120%);
    opacity: 0;
    transition: transform .28s ease, opacity .28s ease;
    pointer-events: auto;
}
.rp-alert-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.rp-alert-toast__icon {
    font-size: 1.25rem;
    line-height: 1;
}
.rp-alert-toast__text {
    min-width: 0;
}
.rp-alert-toast__text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
}
.rp-alert-toast__text span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    opacity: 0.9;
}
