/**
 * RacinesInvest — Design system (interface professionnelle)
 * Compatible Bootstrap 5.3 — animations légères, respect prefers-reduced-motion
 */

:root {
    --ri-blanc: #ffffff;
    --ri-page: #f5f5f5;
    --ri-vert: #0d6e4a;
    --ri-vert-mute: rgba(13, 110, 74, 0.14);
    --ri-vert-clair: #0b5c3f;
    --ri-rouge: #c50f1f;
    --ri-rouge-clair: #a4262c;
    --ri-bleu: #0078d4;
    --ri-bleu-fonce: #106ebe;
    --ri-gris: #605e5c;
    --ri-gris-clair: #f3f2f1;
    --ri-bordure: #edebe9;
    --ri-texte: #323130;
    --ri-surface: #ffffff;
    --ri-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --ri-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    --ri-shadow-nav: 0 2px 8px rgba(0, 0, 0, 0.06);
    --ri-radius: 6px;
    --ri-radius-lg: 8px;
    --ri-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ri-duration: 0.28s;
    --ri-font: "Roboto", "Inter", "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
    --ri-focus: #0f6cbd;
    --ri-muted: #605e5c;
    --ri-muted-2: #8a8886;
    --ri-surface-2: #faf9f8;
}

/* ——— Typo dashboards (plus pro, plus compact) ——— */
.lws-page {
    font-family: "Roboto", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 0.94rem;
    line-height: 1.55;
}
.lws-page :is(h1,h2,h3,h4,h5,h6, p, span, a, button, input, textarea, select, label, small, strong, em, li, td, th) {
    font-family: inherit;
}
.lws-page .text-muted {
    color: #6b6a69 !important;
}
.lws-topbar-title {
    font-size: 1.08rem;
    line-height: 1.25;
}
.lws-topbar-sub {
    font-size: 0.86rem;
}
.lws-card .lws-card-head {
    font-size: 0.90rem;
}
.lws-kpi .lws-kpi-value {
    font-size: 1.22rem;
    font-weight: 850;
}
.lws-kpi .lws-kpi-label {
    font-size: 0.76rem;
}

/* Uniformiser les tailles Bootstrap dans les dashboards */
.lws-page :is(.h1,.h2,.h3,.h4,.h5,.h6) {
    margin-bottom: 0.35rem;
}
.lws-page .h1 { font-size: 1.15rem; }
.lws-page .h2 { font-size: 1.10rem; }
.lws-page .h3 { font-size: 1.05rem; }
.lws-page .h4 { font-size: 1.00rem; }
.lws-page .h5 { font-size: 0.98rem; }
.lws-page .h6 { font-size: 0.92rem; }

.lws-page .small,
.lws-page small {
    font-size: 0.82rem !important;
}

.lws-page .form-label,
.lws-page .form-check-label {
    font-size: 0.88rem;
}
.lws-page .form-control,
.lws-page .form-select,
.lws-page .input-group-text {
    font-size: 0.92rem;
}
.lws-page .btn {
    font-size: 0.90rem;
}
.lws-page .badge {
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--ri-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ri-texte);
    background-color: var(--ri-page);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ——— Accessibilité : focus visible ——— */
:is(a, button, input, textarea, select, .btn):focus {
    outline: none;
}
:is(a, button, input, textarea, select, .btn):focus-visible {
    outline: 2px solid var(--ri-focus);
    outline-offset: 2px;
}

/* ——— Typographie “Office-like” ——— */
.ri-title {
    letter-spacing: -0.01em;
}
.ri-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ri-muted-2);
}

/* ——— Navigation ——— */
.navbar-ri {
    background: var(--ri-surface) !important;
    box-shadow: 0 1px 0 var(--ri-bordure);
    border-bottom: 1px solid var(--ri-bordure);
    transition: box-shadow var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out);
}
.navbar-ri.is-scrolled {
    box-shadow: var(--ri-shadow-nav);
}
.navbar-ri .navbar-brand {
    color: var(--ri-texte) !important;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: color var(--ri-duration) var(--ri-ease-out);
}
.navbar-ri .navbar-brand:hover {
    color: var(--ri-vert) !important;
}
.navbar-ri .nav-link {
    color: var(--ri-texte) !important;
    font-weight: 500;
    border-radius: 4px;
    padding: 0.4rem 0.65rem !important;
    transition: background-color var(--ri-duration) var(--ri-ease-out),
        color var(--ri-duration) var(--ri-ease-out);
}
.navbar-ri .nav-link:hover {
    background: var(--ri-gris-clair);
    color: var(--ri-texte) !important;
}
.navbar-ri .nav-link.active {
    font-weight: 600;
    color: var(--ri-vert) !important;
    box-shadow: inset 0 -2px 0 var(--ri-vert);
}
.navbar-ri .navbar-toggler {
    border-color: var(--ri-bordure);
}
.navbar-ri .navbar-toggler-icon {
    filter: invert(0.35);
}

/* ——— Boutons ——— */
.btn {
    transition: background-color var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out),
        color var(--ri-duration) var(--ri-ease-out),
        box-shadow var(--ri-duration) var(--ri-ease-out),
        transform 0.12s ease;
}
.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-ri-vert {
    background: var(--ri-texte);
    color: var(--ri-blanc);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: var(--ri-shadow-sm);
}
.btn-ri-vert:hover {
    background: #3b3a39;
    color: var(--ri-blanc);
}
.btn-ri-accent {
    background: var(--ri-vert);
    color: var(--ri-blanc);
    border: none;
    border-radius: 4px;
    font-weight: 600;
}
.btn-ri-accent:hover {
    background: var(--ri-vert-clair);
    color: var(--ri-blanc);
}
.btn-ri-rouge {
    background: transparent;
    color: var(--ri-rouge);
    border: 1px solid var(--ri-rouge);
    border-radius: 4px;
    font-weight: 600;
}
.btn-ri-rouge:hover {
    background: rgba(197, 15, 31, 0.08);
    color: var(--ri-rouge-clair);
}
.btn-ri-bleu {
    background: var(--ri-bleu);
    color: var(--ri-blanc);
    border: none;
    border-radius: 4px;
    font-weight: 600;
}
.btn-ri-bleu:hover {
    background: var(--ri-bleu-fonce);
    color: var(--ri-blanc);
}

.text-ri-vert {
    color: var(--ri-vert) !important;
}
.badge.bg-ri-vert,
.bg-ri-vert {
    background-color: var(--ri-vert) !important;
}
.text-ri-rouge {
    color: var(--ri-rouge);
}
.text-ri-bleu {
    color: var(--ri-bleu);
}

/* ——— Cartes ——— */
.card {
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius);
    box-shadow: var(--ri-shadow-sm);
    background: var(--ri-surface);
    transition: box-shadow var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out);
}
.card.ri-card-interactive:hover {
    box-shadow: var(--ri-shadow);
    border-color: #c8c6c4;
}

/* ——— Dashboards (sobres, fluides, style Office) ——— */
.ri-dashboard {
    --ri-dash-accent: var(--ri-vert);
}

/* ——— Paramètres (membre / admin) : mise en page pro ——— */
.ri-settings {
    max-width: 1100px;
}
.ri-settings__hero {
    background: var(--ri-surface);
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    box-shadow: var(--ri-shadow-sm);
    padding: 1rem 1.25rem;
}
.ri-settings__kicker {
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}
.ri-settings__title {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-weight: 750;
    letter-spacing: -0.02em;
}
.ri-settings__sub {
    color: var(--ri-gris);
    max-width: 52rem;
}
.ri-settings-nav {
    position: sticky;
    top: 1rem;
}
.ri-settings-nav .list-group-item {
    border-radius: 10px;
    border-color: rgba(17, 24, 39, 0.08);
    color: #323130;
    font-weight: 600;
}
.ri-settings-nav .list-group-item:hover {
    background: #f3f2f1;
}
.ri-settings-nav .list-group-item.active {
    background: #e8f4ff;
    border-color: rgba(15, 108, 189, 0.25);
    color: #0b5c9e;
}
.ri-settings-card .card-header {
    background: #f8fafc !important;
}
.ri-settings-card .form-label {
    font-weight: 600;
}
.ri-settings-card .form-text {
    color: var(--ri-muted-2);
}
.ri-settings-card .form-control,
.ri-settings-card .form-select,
.ri-settings-card .form-control-sm,
.ri-settings-card .form-select-sm {
    border-color: rgba(17, 24, 39, 0.14);
}
.ri-settings-card .input-group-text {
    border-color: rgba(17, 24, 39, 0.14);
}
.ri-settings-card .card-footer {
    background: transparent;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
}

@media (max-width: 991.98px) {
    .ri-settings {
        max-width: 100%;
    }
    .ri-settings-nav {
        position: static;
    }
}

body.ri-theme-sombre .ri-settings__hero {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.15);
}
body.ri-theme-sombre .ri-settings-nav .list-group-item {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
}
body.ri-theme-sombre .ri-settings-nav .list-group-item:hover {
    background: #111b2f;
}
body.ri-theme-sombre .ri-settings-nav .list-group-item.active {
    background: rgba(15, 108, 189, 0.25);
    border-color: rgba(15, 108, 189, 0.35);
    color: #e2f2ff;
}
body.ri-theme-sombre .ri-settings-card .card-header {
    background: #111b2f !important;
}
body.ri-theme-sombre .ri-settings-card .card-footer {
    border-top-color: rgba(148, 163, 184, 0.12);
}
.ri-hero {
    background: var(--ri-surface);
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    box-shadow: var(--ri-shadow-sm);
    padding: 1rem 1.25rem;
}
.ri-hero .ri-hero-title {
    font-size: 1.1rem;
    font-weight: 650;
    margin: 0;
}
.ri-hero .ri-hero-subtitle {
    margin: 0.35rem 0 0 0;
    font-size: 0.92rem;
    color: var(--ri-gris);
}

.ri-stat {
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    background: var(--ri-surface);
    box-shadow: var(--ri-shadow-sm);
}
.ri-stat .ri-stat-body {
    padding: 0.9rem 1rem;
}
.ri-stat .ri-stat-label {
    font-size: 0.82rem;
    color: var(--ri-muted-2);
}
.ri-stat .ri-stat-value {
    margin-top: 0.15rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}
.ri-stat.ri-stat-accent {
    border-left: 3px solid var(--ri-dash-accent);
}

.ri-surface {
    background: var(--ri-surface);
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    box-shadow: var(--ri-shadow-sm);
}

.ri-searchbar .input-group {
    border: 1px solid var(--ri-bordure);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--ri-shadow-sm);
    background: var(--ri-surface);
}
.ri-searchbar .input-group-text {
    border: none;
    background: transparent;
    color: var(--ri-muted-2);
}
.ri-searchbar .form-control {
    border: none;
    background: transparent;
}
.ri-searchbar .btn {
    border-radius: 999px;
}

.ri-maxw-sm { max-width: 520px; }
.ri-maxw-footer { max-width: 280px; }

.ri-sticky {
    position: sticky;
    top: 1rem;
}

.ri-progress-sm { height: 8px; }
.ri-progress-md { height: 10px; }
.ri-progress-lg { height: 12px; }

.ri-select-compact { max-width: 90px; }

.ri-item-card {
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    background: var(--ri-surface);
    box-shadow: var(--ri-shadow-sm);
    transition: box-shadow var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out),
        transform 0.12s ease;
}
.ri-item-card:hover {
    border-color: #c8c6c4;
    box-shadow: var(--ri-shadow);
    transform: translateY(-1px);
}
.ri-item-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--ri-bordure);
}

.ri-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
    font-weight: 600;
}

/* Notifications : cartes compactes */
.ri-notif-card.unread {
    border-left: 3px solid var(--ri-dash-accent);
}

/* Thread / conversation */
.ri-thread {
    display: grid;
    gap: 0.75rem;
}
.ri-msg {
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    background: var(--ri-surface);
    padding: 0.9rem 1rem;
    box-shadow: var(--ri-shadow-sm);
}
.ri-msg .ri-msg-meta {
    font-size: 0.82rem;
    color: var(--ri-muted-2);
    margin-bottom: 0.35rem;
}
.ri-msg.ri-msg-team {
    border-left: 3px solid var(--ri-focus);
    background: #f5f9ff;
}
.ri-msg.ri-msg-user {
    border-left: 3px solid var(--ri-dash-accent);
    background: var(--ri-surface-2);
}

/* ——— Formulaires ——— */
.form-control,
.form-select {
    border-radius: var(--ri-radius);
    border-color: var(--ri-bordure);
    transition: border-color var(--ri-duration) var(--ri-ease-out),
        box-shadow var(--ri-duration) var(--ri-ease-out);
}
.form-control:hover:not(:focus):not(:disabled) {
    border-color: #c8c6c4;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--ri-vert);
    box-shadow: 0 0 0 3px var(--ri-vert-mute);
}

/* ——— Fil d’Ariane ——— */
.ri-breadcrumb {
    font-size: 0.875rem;
}
.ri-breadcrumb .breadcrumb-item a {
    color: var(--ri-gris);
    text-decoration: none;
    transition: color 0.2s ease;
}
.ri-breadcrumb .breadcrumb-item a:hover {
    color: var(--ri-vert);
}

/* ——— Zone principale ——— */
.ri-main {
    animation: riMainIn 0.45s var(--ri-ease-out) both;
}
@keyframes riMainIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ——— Alertes / flash (toast-style) ——— */
.ri-flash-stack {
    position: relative;
    z-index: 1030;
}
.ri-flash-stack .alert {
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.85rem 3rem 0.85rem 1.25rem;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    animation: riFlashIn 0.4s var(--ri-ease-out) both;
}
.ri-flash-stack .alert-success {
    background: linear-gradient(90deg, #dff6dd 0%, #e8f5e9 100%);
    color: #0e700e;
    border-left: 4px solid #107c10;
}
.ri-flash-stack .alert-danger {
    background: linear-gradient(90deg, #fde7e9 0%, #fff5f5 100%);
    color: #8a2626;
    border-left: 4px solid var(--ri-rouge);
}
.ri-flash-stack .alert .btn-close {
    padding: 1rem;
}
.ri-flash-stack.ri-flash-compact .alert {
    border-radius: var(--ri-radius-lg);
    margin: 0.75rem auto;
    max-width: min(640px, calc(100% - 2rem));
    box-shadow: var(--ri-shadow);
    padding: 0.6rem 2.5rem 0.6rem 0.9rem;
    font-size: 0.92rem;
    line-height: 1.35;
}
.ri-flash-stack.ri-flash-compact .alert + .alert {
    margin-top: 0.5rem;
}
/* Réduire encore la hauteur perçue sur mobile */
@media (max-width: 576px) {
    .ri-flash-stack.ri-flash-compact .alert {
        margin: 0.6rem auto;
        padding: 0.55rem 2.25rem 0.55rem 0.85rem;
        font-size: 0.9rem;
    }
}
@keyframes riFlashIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ——— Révélation au scroll ——— */
.ri-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s var(--ri-ease-out), transform 0.55s var(--ri-ease-out);
}
.ri-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* Enfant direct = bloc à révéler (ex. .col.ri-reveal) */
.ri-reveal-stagger > .ri-reveal:nth-child(1) {
    transition-delay: 0.04s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(2) {
    transition-delay: 0.08s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(3) {
    transition-delay: 0.12s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(4) {
    transition-delay: 0.16s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(5) {
    transition-delay: 0.2s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(6) {
    transition-delay: 0.24s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(7) {
    transition-delay: 0.28s;
}
.ri-reveal-stagger > .ri-reveal:nth-child(8) {
    transition-delay: 0.32s;
}

.progress-bar {
    transition: width 0.65s var(--ri-ease-out);
}

/* ——— Tableaux ——— */
.table.ri-table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ri-gris);
    border-bottom-width: 1px;
}
.table.ri-table tbody tr {
    transition: background-color 0.15s ease;
}

.table.ri-table td,
.table.ri-table th {
    vertical-align: middle;
}
.table.ri-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* ——— Pied de page ——— */
footer.ri-footer {
    background: #252423;
    color: #d2d0ce;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
footer.ri-footer a {
    color: #c8c6c4;
    transition: color 0.2s ease;
}
footer.ri-footer a:hover {
    color: var(--ri-blanc);
}

/* Footer plus compact (style “Office”) */
.ri-footer {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
}
.ri-footer .ri-footer-title {
    color: #a19f9d;
    letter-spacing: 0.06em;
}
.ri-footer .ri-footer-copy {
    color: #a19f9d;
}

/* ——— Modales ——— */
.modal-content {
    border: 1px solid var(--ri-bordure);
    border-radius: var(--ri-radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ——— Utilitaires hérités ——— */
.animate-fade-in {
    animation: riFadeIn 0.5s var(--ri-ease-out) forwards;
}
@keyframes riFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-slide-up {
    animation: riSlideUp 0.55s var(--ri-ease-out) forwards;
}
@keyframes riSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ri-nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ri-bordure);
    flex-shrink: 0;
    transition: box-shadow 0.2s ease;
}
a:focus-visible .ri-nav-avatar,
a:hover .ri-nav-avatar {
    box-shadow: 0 0 0 2px var(--ri-vert-mute);
}
.ri-nav-avatar-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ri-gris-clair);
    color: var(--ri-gris);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    border: 2px solid var(--ri-bordure);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

/* ——— Thème sombre ——— */
body.ri-theme-sombre {
    background: #1c1c1c;
    color: #f3f2f1;
}
body.ri-theme-sombre .navbar-ri {
    background: #252423 !important;
    border-color: #3b3a39;
}
body.ri-theme-sombre .navbar-ri .navbar-brand,
body.ri-theme-sombre .navbar-ri .nav-link {
    color: #f3f2f1 !important;
}
body.ri-theme-sombre .navbar-ri .nav-link:hover {
    background: #3b3a39;
}
body.ri-theme-sombre .card {
    background: #323130;
    border-color: #484644;
    color: #f3f2f1;
}
body.ri-theme-sombre .card-header,
body.ri-theme-sombre .table-light {
    background: #2d2c2c !important;
    color: #f3f2f1;
    border-color: #484644;
}
body.ri-theme-sombre .table {
    color: #f3f2f1;
}
body.ri-theme-sombre .table-hover tbody tr:hover {
    background: #3b3a39;
}
body.ri-theme-sombre .breadcrumb-item a {
    color: #6cb8ff;
}
body.ri-theme-sombre .text-muted {
    color: #a19f9d !important;
}
body.ri-theme-sombre .form-control,
body.ri-theme-sombre .form-select {
    background: #252423;
    border-color: #484644;
    color: #f3f2f1;
}
body.ri-theme-sombre .form-control:focus,
body.ri-theme-sombre .form-select:focus {
    border-color: var(--ri-vert);
    box-shadow: 0 0 0 2px var(--ri-vert-mute);
}
body.ri-theme-sombre .ri-footer {
    background: #201f1e;
    color: #c8c6c4;
    border-top-color: var(--ri-vert);
}
body.ri-theme-sombre .ri-footer a {
    color: #6cb8ff;
}
body.ri-theme-sombre .alert-success {
    background: #107c10;
    color: #fff;
    border-color: #107c10;
}
body.ri-theme-sombre .alert-danger {
    background: #a4262c;
    color: #fff;
    border-color: #a4262c;
}
body.ri-theme-sombre .ri-flash-stack .alert-success {
    background: #1e3d1e;
    color: #c8e6c9;
    border-left-color: #107c10;
}
body.ri-theme-sombre .ri-flash-stack .alert-danger {
    background: #3d1e1e;
    color: #ffcdd2;
    border-left-color: #da3633;
}
body.ri-theme-sombre .ri-nav-avatar {
    border-color: #605e5c;
}
body.ri-theme-sombre .ri-nav-avatar-icon {
    background: #3b3a39;
    color: #edebe9;
    border-color: #605e5c;
}

/* ——— Admin ——— */
.ri-admin-account .ri-nav-avatar,
.ri-admin-account .ri-nav-avatar-icon {
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
}
.ri-admin-account:focus-visible .ri-nav-avatar,
.ri-admin-account:hover .ri-nav-avatar {
    box-shadow: 0 0 0 2px var(--ri-vert-mute);
}

.ri-admin {
    --ri-admin-topbar: #0f6cbd; /* Office blue */
    --ri-admin-topbar-2: #106ebe;
    --ri-admin-bg: #f5f7fb;
    --ri-admin-surface: #ffffff;
    --ri-admin-tint: rgba(15, 108, 189, 0.10);
    --ri-admin-tint-2: rgba(13, 110, 74, 0.09);
    background: var(--ri-admin-bg);
}

/* ——— LWS-like panels (Admin/Investisseur/Entrepreneur) ——— */
.lws-page {
    --lws-bg: #f4f6fb;
    --lws-surface: #ffffff;
    --lws-border: rgba(17, 24, 39, 0.08);
    --lws-shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 14px 40px rgba(17, 24, 39, 0.08);
    --lws-blue: #0f6cbd;
    --lws-blue-2: #2b88d8;
    --lws-green: #107c10;
    --lws-amber: #d83b01;
    --lws-violet: #6f42c1;
    --lws-cyan: #0aa2c0;
    --lws-radius: 12px;
    background: var(--lws-bg);
}
.lws-shell {
    display: flex;
    gap: 1rem;
}
.lws-sidebar {
    width: 272px;
    flex: 0 0 272px;
    background: linear-gradient(180deg, #0f6cbd 0%, #0b5c9e 55%, #084a7f 100%);
    border-radius: var(--lws-radius);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: var(--lws-shadow);
    overflow: hidden;
}
/* Tableaux de bord : menu latéral fixe dans la fenêtre, défilement uniquement dans la liste des liens */
@media (min-width: 992px) {
    .lws-page .lws-shell {
        align-items: flex-start;
    }
    .lws-page .lws-sidebar {
        position: sticky;
        top: 1rem;
        align-self: flex-start;
        height: calc(100vh - 2rem);
        max-height: calc(100vh - 2rem);
        display: flex;
        flex-direction: column;
    }
    .lws-page .lws-sidebar-head {
        flex-shrink: 0;
    }
    .lws-page .lws-nav {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        max-height: none;
    }
    .lws-page .lws-sidebar-foot {
        flex-shrink: 0;
    }
}
.lws-sidebar-head {
    padding: 1rem 1rem 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.12);
}
.lws-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}
.lws-brand:hover { color: #fff; }
.lws-brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.lws-brand-title { font-weight: 750; letter-spacing: -0.01em; }
.lws-brand-sub { font-size: 0.82rem; color: rgba(255, 255, 255, 0.78); }

.lws-nav {
    padding: 0.65rem;
    display: grid;
    gap: 0.25rem;
    max-height: calc(100vh - 260px);
    overflow: auto;
}
.lws-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid transparent;
    transition: background-color var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out),
        transform 0.12s ease;
}
.lws-nav a i { width: 1.25rem; text-align: center; opacity: 0.95; }
.lws-nav a:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
    color: #fff;
}
.lws-nav a.active {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.lws-sidebar-foot {
    padding: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.12);
}
.lws-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.lws-account .btn {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
}
.lws-account .btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.lws-main {
    flex: 1 1 auto;
    min-width: 0;
}
.lws-topbar {
    background:
        radial-gradient(900px 240px at 22% 0%, rgba(15, 108, 189, 0.22), transparent 60%),
        radial-gradient(740px 220px at 92% 10%, rgba(16, 124, 16, 0.14), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border: 1px solid var(--lws-border);
    border-radius: var(--lws-radius);
    box-shadow: var(--lws-shadow);
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
}
.lws-topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--lws-blue) 0%, var(--lws-cyan) 40%, var(--lws-green) 80%, var(--lws-amber) 100%);
    opacity: 0.95;
}
.lws-topbar-title { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.lws-topbar-sub { margin: 0.25rem 0 0 0; color: #605e5c; font-size: 0.92rem; }
.lws-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.lws-card {
    background: var(--lws-surface);
    border: 1px solid var(--lws-border);
    border-radius: var(--lws-radius);
    box-shadow: var(--lws-shadow);
    position: relative;
    overflow: hidden;
}
.lws-card .lws-card-head {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    background:
        radial-gradient(520px 120px at 10% 0%, rgba(15, 108, 189, 0.14), transparent 60%),
        linear-gradient(180deg, #fbfbfb 0%, #f6f7f9 100%);
    border-top-left-radius: var(--lws-radius);
    border-top-right-radius: var(--lws-radius);
    font-weight: 750;
}
.lws-card .lws-card-body { padding: 1rem; }

/* Accents de section (subtils, “LWS panel”) */
.lws-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: rgba(15, 108, 189, 0.35);
}
.lws-card.accent-green::before { background: rgba(16, 124, 16, 0.35); }
.lws-card.accent-amber::before { background: rgba(216, 59, 1, 0.35); }
.lws-card.accent-violet::before { background: rgba(111, 66, 193, 0.35); }

.lws-kpi {
    position: relative;
    overflow: hidden;
}
.lws-kpi::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(15,108,189,0.10);
}
.lws-kpi.green::after { background: rgba(16,124,16,0.10); }
.lws-kpi.amber::after { background: rgba(216,59,1,0.10); }
.lws-kpi .lws-kpi-label { font-size: 0.82rem; color: #8a8886; }
.lws-kpi .lws-kpi-value { font-size: 1.45rem; font-weight: 850; letter-spacing: -0.02em; line-height: 1.15; }
.lws-kpi .lws-kpi-icon {
    width: 40px; height: 40px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 10px 18px rgba(0,0,0,0.12);
    background: linear-gradient(180deg, var(--lws-blue-2), var(--lws-blue));
}
.lws-kpi .lws-kpi-icon.green { background: linear-gradient(180deg, #23a55a, var(--lws-green)); }
.lws-kpi .lws-kpi-icon.amber { background: linear-gradient(180deg, #ffb020, var(--lws-amber)); }

/* Hover premium sur cards interactives */
.lws-page .ri-item-card.card,
.lws-page .lws-card {
    transition: transform 0.12s ease, box-shadow var(--ri-duration) var(--ri-ease-out), border-color var(--ri-duration) var(--ri-ease-out);
}
.lws-page .ri-item-card.card:hover,
.lws-page .lws-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.08), 0 18px 46px rgba(17, 24, 39, 0.10);
    border-color: rgba(15, 108, 189, 0.18);
}

.lws-table.table {
    margin: 0;
}
.lws-table thead th {
    background: #f6f7f9;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

@media (max-width: 991px) {
    .lws-shell { display: block; }
    .lws-sidebar { width: 100%; margin-bottom: 1rem; }
    .lws-nav { max-height: none; }
}
.ri-admin .ri-main {
    padding-top: 1.25rem !important;
}

.ri-admin-shell {
    display: flex;
    min-height: 100vh;
}
.ri-admin-sidebar {
    width: 264px;
    flex: 0 0 264px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        #0f6cbd 0%,
        #0b5c9e 55%,
        #084a7f 100%
    );
    color: rgba(255, 255, 255, 0.92);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1030;
    padding: 1rem 0.85rem;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.ri-admin-brand {
    flex-shrink: 0;
    padding: 0.25rem 0.25rem 0.75rem 0.25rem;
}
.ri-admin-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.ri-admin-brand-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}
.ri-admin-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.ri-admin-brand-text {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ri-admin-nav {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.25rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.08);
}
.ri-admin-nav::-webkit-scrollbar {
    width: 8px;
}
.ri-admin-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}
.ri-admin-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 99px;
}
.ri-admin-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid transparent;
    transition: background-color var(--ri-duration) var(--ri-ease-out),
        border-color var(--ri-duration) var(--ri-ease-out),
        transform 0.12s ease;
}
.ri-admin-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.95;
}
.ri-admin-link span {
    font-size: 0.92rem;
    font-weight: 600;
}
.ri-admin-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}
.ri-admin-link.active {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.16);
}

.ri-admin-sidebar-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.ri-admin-account {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.ri-admin-account:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}
.ri-admin-account-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.ri-admin-sidebar-footer .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
}
.ri-admin-sidebar-footer .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.ri-admin-content {
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 992px) {
    .ri-admin-shell .ri-admin-content {
        margin-left: 264px;
        width: calc(100% - 264px);
    }
}

@media (max-width: 991.98px) {
    .ri-admin-shell .ri-admin-content {
        margin-left: 0;
        width: 100%;
    }
}

.ri-admin-offcanvas .offcanvas-header {
    background: linear-gradient(90deg, var(--ri-admin-topbar), #2b88d8);
    color: #fff;
}
.ri-admin-offcanvas .offcanvas-title {
    font-weight: 700;
}

/* “Imprévisible” mais propre : un léger motif discret derrière les pages */
.ri-admin .ri-main {
    background-image: radial-gradient(
            900px 240px at 20% 0%,
            rgba(15, 108, 189, 0.10),
            transparent 55%
        ),
        radial-gradient(
            760px 220px at 90% 10%,
            rgba(13, 110, 74, 0.08),
            transparent 55%
        );
    background-repeat: no-repeat;
    background-position: top left, top right;
}

.navbar-admin {
    background: linear-gradient(
        90deg,
        var(--ri-admin-topbar) 0%,
        var(--ri-admin-topbar-2) 55%,
        #2b88d8 100%
    ) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
    transition: box-shadow var(--ri-duration) var(--ri-ease-out),
        background-color var(--ri-duration) var(--ri-ease-out);
    position: relative;
    z-index: 1030;
}
.navbar-admin::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    opacity: 0.35;
}
.navbar-admin.is-scrolled {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.navbar-admin .navbar-brand {
    color: #f3f2f1 !important;
    font-weight: 600;
    transition: color var(--ri-duration) var(--ri-ease-out);
    letter-spacing: -0.01em;
}
.navbar-admin .navbar-brand:hover {
    color: #ffffff !important;
}
.navbar-admin .nav-link {
    color: rgba(243, 242, 241, 0.86) !important;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.6rem !important;
    transition: background-color var(--ri-duration) var(--ri-ease-out),
        box-shadow var(--ri-duration) var(--ri-ease-out),
        color var(--ri-duration) var(--ri-ease-out);
}
.navbar-admin .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}
.navbar-admin .nav-link.active {
    font-weight: 600;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.navbar-admin .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.14);
}
.navbar-admin .navbar-toggler-icon {
    filter: invert(1);
    opacity: 0.9;
}

.navbar-admin .ri-admin-sep {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.14);
    opacity: 1;
    margin: 0 0.25rem;
}

.ri-admin .ri-hero,
.ri-admin .ri-stat,
.ri-admin .ri-surface,
.ri-admin .card {
    background: var(--ri-admin-surface);
    border-color: rgba(17, 24, 39, 0.08);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05),
        0 10px 30px rgba(17, 24, 39, 0.06);
}
.ri-admin .ri-hero {
    background: radial-gradient(
            1200px 220px at 20% 0%,
            rgba(15, 108, 189, 0.14),
            transparent 60%
        ),
        var(--ri-admin-surface);
    border-left: 3px solid rgba(15, 108, 189, 0.72);
}
.ri-admin .ri-kicker {
    color: #6b6a69;
}
.ri-admin .ri-hero .ri-hero-subtitle {
    color: #605e5c;
}

.ri-admin .ri-surface-header {
    background: linear-gradient(180deg, #fbfbfb 0%, #f6f7f9 100%);
}

.ri-admin .table.ri-table thead th {
    background: #f6f7f9;
}
.ri-admin .table.ri-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* KPI cards plus “visuelles” */
.ri-admin .ri-stat {
    position: relative;
    overflow: hidden;
}
.ri-admin .ri-stat::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--ri-admin-tint);
}
.ri-admin .ri-stat.ri-stat-accent::after {
    background: var(--ri-admin-tint-2);
}
.ri-admin .ri-stat .ri-stat-value {
    letter-spacing: -0.02em;
}

.ri-admin .ri-admin-kpi {
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 10px;
    background: var(--ri-admin-surface);
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05),
        0 12px 34px rgba(17, 24, 39, 0.08);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-icon.blue {
    background: linear-gradient(180deg, #2b88d8, #0f6cbd);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-icon.green {
    background: linear-gradient(180deg, #23a55a, #107c10);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-icon.amber {
    background: linear-gradient(180deg, #ffb020, #d83b01);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-icon.gray {
    background: linear-gradient(180deg, #8a8886, #605e5c);
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-value {
    font-size: 1.35rem;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.ri-admin .ri-admin-kpi .ri-admin-kpi-label {
    font-size: 0.82rem;
    color: var(--ri-muted-2);
}

.ri-surface-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--ri-bordure);
    background: var(--ri-surface-2);
    border-top-left-radius: var(--ri-radius-lg);
    border-top-right-radius: var(--ri-radius-lg);
}
.ri-surface-body {
    padding: 0.9rem;
}

.btn-ri {
    background: var(--ri-texte);
    color: var(--ri-blanc);
    border: none;
    border-radius: 4px;
    font-weight: 600;
}
.btn-ri:hover {
    background: #3b3a39;
    color: var(--ri-blanc);
}
.stat-card {
    border-left: 3px solid var(--ri-vert);
}

body.ri-theme-sombre.ri-admin {
    background: #1b1a19;
}
body.ri-theme-sombre .navbar-admin {
    background: #1f1e1d !important;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
body.ri-theme-sombre .navbar-admin .navbar-brand,
body.ri-theme-sombre .navbar-admin .nav-link {
    color: #f3f2f1 !important;
}
body.ri-theme-sombre .navbar-admin .nav-link:hover {
    background: #3b3a39;
}

body.ri-theme-sombre .ri-hero,
body.ri-theme-sombre .ri-stat,
body.ri-theme-sombre .ri-surface,
body.ri-theme-sombre .ri-item-card {
    background: #252423;
    border-color: #484644;
}
body.ri-theme-sombre .ri-hero .ri-hero-subtitle,
body.ri-theme-sombre .ri-stat .ri-stat-label {
    color: #a19f9d;
}
body.ri-theme-sombre .ri-searchbar .input-group {
    background: #252423;
    border-color: #484644;
}
body.ri-theme-sombre .table.ri-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}
body.ri-theme-sombre .ri-msg {
    background: #252423;
    border-color: #484644;
}
body.ri-theme-sombre .ri-msg.ri-msg-team {
    background: rgba(15, 108, 189, 0.14);
}
body.ri-theme-sombre .ri-msg.ri-msg-user {
    background: rgba(255, 255, 255, 0.04);
}

/* ——— LWS dashboards : menu mobile (offcanvas), grilles, pagination ——— */
.lws-offcanvas-nav {
    background: linear-gradient(180deg, #0f6cbd 0%, #0b5c9e 55%, #084a7f 100%);
    color: rgba(255, 255, 255, 0.92);
    width: min(320px, 92vw) !important;
}
.lws-offcanvas-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.lws-offcanvas-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.lws-offcanvas-link.active {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 650;
}
.lws-offcanvas-nav-inner {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}
.lws-mobile-topbar {
    padding-bottom: 0.5rem;
}
.ri-pagination-compact .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0;
    row-gap: 0.35rem;
}
.ri-pagination-compact .page-link {
    padding: 0.35rem 0.55rem;
    font-size: 0.875rem;
    min-width: 2.25rem;
    text-align: center;
}
@media (max-width: 767px) {
    .lws-page .lws-grid {
        grid-template-columns: 1fr !important;
    }
    .lws-page .lws-grid > div[style*="grid-column"] {
        grid-column: 1 / -1 !important;
    }
}

/* ——— Contenu membre : pleine largeur de la fenêtre (responsive) ——— */
main.ri-main--fullwidth {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}
main.ri-main--fullwidth .container {
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
    padding-left: max(var(--bs-gutter-x, 0.75rem), env(safe-area-inset-left, 0px));
    padding-right: max(var(--bs-gutter-x, 0.75rem), env(safe-area-inset-right, 0px));
}

/* ——— Tableaux de bord membre (single page, ton administratif) ——— */
.ri-dash-spa {
    max-width: 100%;
}
.ri-dash-spa__kicker {
    letter-spacing: 0.08em;
    font-size: 0.7rem;
}
.ri-dash-spa__lede {
    max-width: 42rem;
}
.ri-dash-spa__sheet {
    border-color: rgba(17, 24, 39, 0.1) !important;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.06) !important;
}
.ri-dash-nav {
    gap: 0.25rem;
    row-gap: 0.35rem;
    padding: 0.25rem 0 0.75rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    flex-wrap: wrap;
}
.ri-dash-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #323130;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ri-dash-nav__link:hover {
    background: #f3f2f1;
    color: #201f1e;
    border-color: rgba(17, 24, 39, 0.06);
}
.ri-dash-nav__link.is-active {
    background: #e8f4ff;
    border-color: rgba(15, 108, 189, 0.25);
    color: #0b5c9e;
}
.ri-dash-nav__link--muted {
    font-weight: 500;
    color: #605e5c;
}
.ri-dash-nav__sep {
    opacity: 0.35;
    align-self: center;
}
.ri-dash-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #605e5c;
    white-space: nowrap;
}
.ri-dash-table tbody td {
    font-size: 0.9rem;
    vertical-align: middle;
}
.ri-dash-details__summary {
    cursor: pointer;
    list-style: none;
}
.ri-dash-details__summary::-webkit-details-marker {
    display: none;
}

/* ——— Tableaux de bord membre (raffinement corporate) ——— */
.ri-dash-spa__hero-bar {
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
}
.ri-dash-spa--investisseur .ri-dash-spa__hero-bar {
    border-left: 4px solid #0d6e4a;
}
.ri-dash-spa--entrepreneur .ri-dash-spa__hero-bar {
    border-left: 4px solid #0f6cbd;
}
.ri-dash-spa__hero-meta {
    font-size: 0.8125rem;
    color: #64748b;
}
.ri-dash-spa__maintitle {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.25;
}
.ri-dash-spa__subtitle {
    font-size: 0.9375rem;
    color: #475569;
    max-width: min(42rem, 100%);
    line-height: 1.5;
}
.ri-dash-metric {
    position: relative;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 1.1rem 1.2rem 1.1rem 1.15rem;
    height: 100%;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
}
.ri-dash-metric::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 12px 0 0 12px;
    background: #94a3b8;
}
.ri-dash-metric--vert::before {
    background: #0d6e4a;
}
.ri-dash-metric--bleu::before {
    background: #0f6cbd;
}
.ri-dash-metric--ambre::before {
    background: #b45309;
}
.ri-dash-metric--rose::before {
    background: #be123c;
}
.ri-dash-metric--slate::before {
    background: #475569;
}
.ri-dash-metric:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.12);
}
.ri-dash-metric__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.ri-dash-metric__label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
}
.ri-dash-metric__icon {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1;
    opacity: 0.9;
}
.ri-dash-metric__value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.ri-dash-metric__hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.35rem;
    line-height: 1.4;
}
.ri-dash-section-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.ri-dash-section-head::before {
    content: "";
    width: 4px;
    height: 1.15rem;
    border-radius: 2px;
    background: #0d6e4a;
    flex-shrink: 0;
}
.ri-dash-spa--entrepreneur .ri-dash-section-head::before {
    background: #0f6cbd;
}
.ri-dash-section-head h2 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    color: #475569;
    margin: 0;
}
.ri-dash-panel {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}
.ri-dash-table-wrap {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.ri-dash-table-wrap > .table-responsive {
    -webkit-overflow-scrolling: touch;
}
.ri-dash-table-wrap .table {
    margin-bottom: 0;
    min-width: 560px;
}
.ri-dash-table-wrap thead th {
    border-bottom-width: 1px;
}
.ri-dash-table-wrap .ri-dash-table td {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ri-dash-empty {
    border: 1px dashed rgba(15, 23, 42, 0.15);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fafafa;
}
.ri-dash-actions .btn {
    font-weight: 600;
}
.ri-dash-details {
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.65rem 1rem;
    background: #fafafa;
}
body.ri-theme-sombre .ri-dash-spa__sheet {
    background: #1e293b !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
}
body.ri-theme-sombre .ri-dash-spa__hero-bar {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(148, 163, 184, 0.2);
}
body.ri-theme-sombre .ri-dash-spa__maintitle {
    color: #f1f5f9;
}
body.ri-theme-sombre .ri-dash-spa__subtitle,
body.ri-theme-sombre .ri-dash-spa__hero-meta {
    color: #94a3b8;
}
body.ri-theme-sombre .ri-dash-metric {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.15);
}
body.ri-theme-sombre .ri-dash-metric__value {
    color: #f8fafc;
}
body.ri-theme-sombre .ri-dash-metric__label,
body.ri-theme-sombre .ri-dash-metric__hint {
    color: #94a3b8;
}
body.ri-theme-sombre .ri-dash-metric__icon {
    color: #64748b;
}
body.ri-theme-sombre .ri-dash-section-head {
    border-bottom-color: rgba(148, 163, 184, 0.15);
}
body.ri-theme-sombre .ri-dash-section-head h2 {
    color: #cbd5e1;
}
body.ri-theme-sombre .ri-dash-panel {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.12);
}
body.ri-theme-sombre .ri-dash-table-wrap {
    border-color: rgba(148, 163, 184, 0.15);
    background: #0f172a;
}
body.ri-theme-sombre .ri-dash-empty {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.2);
}
body.ri-theme-sombre .ri-dash-details {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.12);
}

/* ——— Tableaux de bord : ajustements responsive ——— */
@media (max-width: 575.98px) {
    main.ri-main--fullwidth .container {
        --bs-gutter-x: 0.75rem;
    }
    .ri-dash-spa__hero-bar {
        padding: 1rem 0.9rem;
        border-radius: 10px;
    }
    .ri-dash-spa__hero-meta {
        font-size: 0.75rem;
        overflow-wrap: anywhere;
    }
    .ri-dash-spa__maintitle {
        font-size: 1.125rem;
    }
    .ri-dash-spa__subtitle {
        font-size: 0.875rem;
    }
    .ri-dash-spa__sheet-inner {
        padding: 0.75rem !important;
    }
    .ri-dash-metric {
        padding: 0.9rem 1rem 0.9rem 0.95rem;
    }
    .ri-dash-metric__value {
        font-size: 1.5rem;
    }
    .ri-dash-metric__label {
        font-size: 0.625rem;
    }
    .ri-dash-panel {
        padding: 0.85rem 0.9rem;
    }
    .ri-dash-nav__link {
        font-size: 0.8125rem;
        padding: 0.4rem 0.65rem;
    }
    .ri-dash-section-head h2 {
        font-size: 0.75rem;
    }
    .ri-dash-table-wrap .table {
        min-width: 480px;
    }
    .ri-dash-empty {
        padding: 1.75rem 1rem;
    }
}

@media (max-width: 767.98px) {
    .ri-dash-spa__hero-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .ri-dash-spa__hero-actions {
        width: 100%;
        max-width: 100%;
    }
}

/* ——— Reduced motion (sans casser les transitions Bootstrap) ——— */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .ri-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .ri-main {
        animation: none !important;
    }
    .ri-flash-stack .alert {
        animation: none !important;
    }
    .progress-bar {
        transition: none;
    }
}
