/* Elite UI - Module Jugement */
:root {
    --primary-deep: #1a2a6c;
    --primary-mid: #2a4858;
    --accent-gold: #c9a66b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Standard text sizing and line height for better readability */
body {
    line-height: 1.6;
}

.jugement-page-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.jugement-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.jugement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-blue { background: #e0f2fe; color: #0369a1; }
.stat-gold { background: #fef3c7; color: #b45309; }
.stat-emerald { background: #d1fae5; color: #047857; }

.btn-premium,
a.btn-premium,
button.btn-premium,
.btn.btn-premium {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary-mid)) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.15s;
    text-decoration: none !important;
}

.btn-premium:hover,
.btn-premium:focus,
.btn-premium:active,
a.btn-premium:hover,
a.btn-premium:focus,
.btn.btn-premium:hover {
    opacity: 0.92;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-premium i,
.btn-premium span,
.btn-premium .fas,
.btn-premium .bi {
    color: #ffffff !important;
}

/* Boutons d'action marron — texte toujours lisible (tableaux, listes) */
.btn-action-justice,
a.btn-action-justice,
.btn-detail-op,
a.btn-detail-op {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 6.5rem;
    padding: 0.45rem 1rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #5D4037 0%, #8D6E63 100%) !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(93, 64, 55, 0.35);
    text-decoration: none !important;
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
}

.btn-action-justice:hover,
.btn-action-justice:focus,
.btn-action-justice:active,
a.btn-action-justice:hover,
.btn-detail-op:hover,
a.btn-detail-op:hover {
    color: #ffffff !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn-action-justice i,
.btn-action-justice span,
.btn-detail-op i,
.btn-detail-op span {
    color: #ffffff !important;
}

.table .btn-action-justice,
.table-hover .btn-action-justice,
.table .btn-premium,
.table-hover .btn-premium,
.table .btn-detail-op,
.justice-table .btn-action-justice {
    color: #ffffff !important;
}

.btn-action-outline-justice,
a.btn-action-outline-justice {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.95rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #5D4037 !important;
    background: #ffffff !important;
    border: 2px solid #5D4037 !important;
    border-radius: 999px !important;
    text-decoration: none !important;
}

.btn-action-outline-justice:hover,
a.btn-action-outline-justice:hover {
    color: #ffffff !important;
    background: #5D4037 !important;
    border-color: #5D4037 !important;
}

.btn-action-outline-justice:hover i,
.btn-action-outline-justice:hover span {
    color: #ffffff !important;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-modern tr {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border-radius: 10px;
}

.table-modern td, .table-modern th {
    padding: 16px;
    border: none;
    font-size: 0.95rem;
    line-height: 1.5;
}

.table-modern th {
    font-weight: 600;
    color: #333;
    background-color: #f8f9fa;
    font-size: 0.96rem;
}

.table-modern td {
    vertical-align: middle;
}

.table-modern tr td:first-child { border-radius: 10px 0 0 10px; }
.table-modern tr td:last-child { border-radius: 0 10px 10px 0; }

/* Bootstrap table improvements */
.table {
    font-size: 0.95rem;
    line-height: 1.5;
}

.table thead th {
    font-size: 0.96rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    line-height: 1.4;
}

.table tbody td {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    line-height: 1.5;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(201, 166, 107, 0.05);
}

/* Matrix table specific improvements */
.matrix-table {
    font-size: 0.95rem;
}

.matrix-table thead th {
    font-size: 0.96rem;
    font-weight: 600;
    padding: 1rem;
    line-height: 1.4;
    background-color: #f8f9fa;
}

.matrix-table tbody td {
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    line-height: 1.5;
    vertical-align: middle;
}

.matrix-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}

/* CSP Utility Classes */
.order-badge {
    width: 32px;
    height: 32px;
    line-height: 32px;
    display: inline-block;
    text-align: center;
}

.text-truncate-md {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncate-lg {
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cursor-move {
    cursor: move;
}

.bg-soft-primary { background-color: rgba(78, 115, 223, 0.1); }
.bg-soft-success { background-color: rgba(28, 200, 138, 0.1); }
.bg-soft-warning { background-color: rgba(246, 194, 62, 0.1); }
.bg-soft-info { background-color: rgba(54, 185, 204, 0.1); }
.bg-soft-danger { background-color: rgba(231, 74, 59, 0.1); }

.x-small { font-size: 0.8rem; line-height: 1.4; }
.small { font-size: 0.85rem; line-height: 1.5; }
.large { font-size: 1.1rem; line-height: 1.6; }
.progress-sm { height: 8px; }
.rounded-4 { border-radius: 1.25rem !important; }
.date-box { min-width: 60px; }
.btn-soft-success {
    background-color: rgba(28, 200, 138, 0.15);
    color: #1cc88a;
    border: none;
}
.btn-soft-success:hover {
    background-color: rgba(28, 200, 138, 0.25);
    color: #17a673;
}
.btn-soft-secondary {
    background-color: rgba(133, 135, 150, 0.15);
    color: #858796;
    border: none;
}
.btn-soft-secondary:hover {
    background-color: rgba(133, 135, 150, 0.25);
    color: #717384;
}
.w-fit { width: fit-content; }

/* Formation Members Styles */
.formation-members-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-pill {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
    transition: all 0.2s;
}

.member-pill:hover {
    border-color: var(--primary-mid);
    background: #f1f5f9;
}

.member-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-deep);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin-right: 12px;
}

.member-info {
    flex-grow: 1;
}

.member-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0;
}

.member-role {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Sortable JS States */
.sortable-ghost {
    opacity: 0.3 !important;
    background-color: #e0f2fe !important;
    border: 2px dashed #0369a1 !important;
}

.sortable-chosen {
    background-color: #f1f5f9 !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05) !important;
}

.sortable-drag {
    opacity: 0.9;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    cursor: grabbing !important;
}

.draggable-dossier {
    cursor: grab;
}

.draggable-dossier:active {
    cursor: grabbing;
}

/* ——— Navigation parcours (workflow) ——— */
.jugement-workflow-nav {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-premium);
    padding: 0.75rem 1rem;
    overflow-x: auto;
}

.jugement-workflow-track {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    min-width: max-content;
}

.jugement-workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.jugement-workflow-step:hover {
    background: #f1f5f9;
    color: var(--primary-deep);
}

.jugement-workflow-step.is-active {
    background: linear-gradient(135deg, var(--primary-deep), var(--primary-mid));
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 42, 108, 0.25);
}

.jugement-workflow-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.jugement-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

.jugement-page-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(26, 42, 108, 0.08);
    color: var(--primary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.jugement-hub-card {
    border: none;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.jugement-hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.jugement-hub-card .hub-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.jugement-page-content {
    animation: jugementFadeIn 0.25s ease;
}

/* Le translateY a été retiré : une animation dont les images-clés portent un
   transform établit un bloc conteneur sur l'élément animé, et tout descendant
   en position fixed ou sticky cesse alors de se référer à la fenêtre. Comme
   .jugement-page-content enveloppe toutes les pages du module, aucun bandeau
   adhérent ne pouvait y tenir. Le fondu seul produit le même effet perçu. */
@keyframes jugementFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ——— Responsive Design ——— */
@media (max-width: 991.98px) {
    .jugement-workflow-nav {
        padding: 0.5rem 0.75rem;
    }
    
    .jugement-workflow-step {
        padding: 0.4rem 0.75rem;
        font-size: 0.72rem;
    }
    
    .jugement-workflow-icon {
        font-size: 1rem;
    }
    
    .jugement-hub-card .hub-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .jugement-hub-card h6 {
        font-size: 0.95rem;
    }
    
    .jugement-hub-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .jugement-card {
        border-radius: 12px;
    }
    
    .jugement-hub-card {
        margin-bottom: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .btn-premium,
    .btn-action-justice {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-action-outline-justice {
        padding: 0.35rem 0.85rem;
        font-size: 0.75rem;
    }
    
    .table-modern td, .table-modern th {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .text-truncate-lg {
        max-width: 200px;
    }
    
    .text-truncate-md {
        max-width: 150px;
    }
}

@media (max-width: 575.98px) {
    .jugement-workflow-nav {
        border-radius: 10px;
        padding: 0.4rem 0.6rem;
    }
    
    .jugement-workflow-step {
        padding: 0.35rem 0.6rem;
        font-size: 0.68rem;
        gap: 0.25rem;
    }
    
    .jugement-workflow-icon {
        font-size: 0.9rem;
    }
    
    .jugement-hub-card {
        padding: 1rem;
    }
    
    .jugement-hub-card .hub-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .jugement-hub-card h6 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .jugement-hub-card p {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .btn-premium,
    .btn-action-justice {
        padding: 0.4rem 0.85rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    .btn-action-outline-justice {
        padding: 0.3rem 0.75rem;
        font-size: 0.7rem;
    }
    
    .table-modern {
        font-size: 0.8rem;
    }
    
    .table-modern td, .table-modern th {
        padding: 10px 8px;
    }
    
    .text-truncate-lg {
        max-width: 150px;
    }
    
    .text-truncate-md {
        max-width: 120px;
    }
    
    .member-pill {
        padding: 6px 10px;
    }
    
    .member-avatar {
        width: 28px;
        height: 28px;
        font-size: 10px;
        margin-right: 10px;
    }
    
    .member-name {
        font-size: 0.85rem;
    }
    
    .member-role {
        font-size: 0.7rem;
    }
}

/* ——— Dashboard Specific Responsive ——— */
@media (max-width: 991.98px) {
    .jugement-page-content {
        padding: 1rem;
    }
    
    .row.g-3 > [class*="col-"] {
        padding: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .jugement-page-content {
        padding: 0.75rem;
    }
    
    .row.g-3 > [class*="col-"] {
        padding: 0.4rem;
    }
    
    .h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .jugement-page-content {
        padding: 0.5rem;
    }
    
    .row.g-3 > [class*="col-"] {
        padding: 0.3rem;
    }
    
    .h2 {
        font-size: 1.25rem;
    }
    
    .h4, .h5, .h6 {
        font-size: 1rem;
    }
}

/* ——— Chart Responsive ——— */
@media (max-width: 767.98px) {
    #evolutionChart {
        min-height: 250px !important;
        height: 250px !important;
    }
}

@media (max-width: 575.98px) {
    #evolutionChart {
        min-height: 200px !important;
        height: 200px !important;
    }
    
    #evolutionChart canvas {
        font-size: 10px;
    }
}

