/* Vue détaillée d'une demande d'accès : badge de statut, en-têtes de carte avec icône, champs mis en avant */

.fiche-back-btn {
    border-radius: 7px;
}

.fiche-title-icon {
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fiche-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 9px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.fiche-status-pill .fiche-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fiche-status-pill.status-warning { background: #FFFBEB; border: 1.5px solid #FDE68A; color: #92400E; }
.fiche-status-pill.status-warning .fiche-status-dot { background: #D97706; }

.fiche-status-pill.status-success { background: #F0FDF4; border: 1.5px solid #BBF7D0; color: #166534; }
.fiche-status-pill.status-success .fiche-status-dot { background: #16A34A; }

.fiche-status-pill.status-danger { background: #FEF2F2; border: 1.5px solid #FECACA; color: #991B1B; }
.fiche-status-pill.status-danger .fiche-status-dot { background: #DC2626; }

.fiche-status-pill.status-secondary { background: #F8FAFC; border: 1.5px solid #E2E8F0; color: #475569; }
.fiche-status-pill.status-secondary .fiche-status-dot { background: #94A3B8; }

.fiche-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    gap: 9px;
}

.fiche-card-header.fiche-card-header-between {
    justify-content: space-between;
}

.fiche-card-header-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fiche-card-header-icon.icon-blue { background: #EFF6FF; }
.fiche-card-header-icon.icon-green { background: #F0FDF4; }
.fiche-card-header-icon.icon-slate { background: #F8FAFC; }
.fiche-card-header-icon.icon-red { background: #FEF2F2; }
.fiche-card-header-icon.icon-yellow { background: #FEFCE8; }

.fiche-card-accent {
    height: 3px;
}

.fiche-card-accent.accent-blue { background: linear-gradient(to right, #2563EB, #3B82F6); }
.fiche-card-accent.accent-green { background: linear-gradient(to right, #16A34A, #22C55E); }
.fiche-card-accent.accent-yellow { background: linear-gradient(to right, #CA8A04, #EAB308); }

.fiche-field-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #94A3B8;
    display: block;
}

.fiche-field-highlight {
    padding: 14px 16px;
    background: #F8FAFC;
    border-radius: 9px;
    border: 1px solid #F1F5F9;
}

.fiche-org-avatar {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: contain;
    background: #F1F5F9;
}

.fiche-btn-accept:hover {
    opacity: 0.9;
}

.fiche-btn-refuse:hover {
    background: #FEF2F2 !important;
}

/* Timeline de progression (étapes passées / en cours / à venir) */
.fiche-timeline-item {
    display: flex;
    gap: 14px;
    position: relative;
}

.fiche-timeline-item:not(:last-child) {
    padding-bottom: 22px;
}

.fiche-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: #E2E8F0;
}

.fiche-timeline-item.connector-done:not(:last-child)::before {
    background: #16A34A;
}

.fiche-timeline-dot {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.fiche-timeline-dot.dot-done {
    background: #16A34A;
    color: #fff;
}

.fiche-timeline-dot.dot-current {
    background: #FFFBEB;
    border: 2px solid #D97706;
    color: #D97706;
}

.fiche-timeline-dot.dot-pending {
    background: #F8FAFC;
    border: 1.5px dashed #CBD5E1;
    color: #CBD5E1;
}

.fiche-timeline-dot.dot-rejected {
    background: #DC2626;
    color: #fff;
}

.fiche-timeline-dot.dot-abandoned {
    background: #DC2626;
    color: #fff;
}

.fiche-timeline-content {
    padding-top: 5px;
}

.fiche-timeline-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
}

a.fiche-timeline-label:hover {
    color: #2563EB;
}

.fiche-timeline-dot.dot-pending ~ .fiche-timeline-content .fiche-timeline-label {
    color: #94A3B8;
    font-weight: 500;
}

.fiche-timeline-date {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 2px;
}

/* ===== Barre de délai verticale (timeline avec demandeAcces) ===== */

.fiche-timeline-steps {
    min-width: 0;
}

.fiche-delay-bar {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fiche-delay-bar-date {
    font-size: 9px;
    color: #94A3B8;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
}

.fiche-delay-bar-date--start {
    margin-bottom: 6px;
}

.fiche-delay-bar-date--end {
    margin-top: 0;
}

.fiche-delay-bar-track {
    flex: 1;
    width: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    position: relative;
    min-height: 60px;
}

.fiche-delay-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-radius: 2px;
    background: #2563EB;
}

.fiche-delay-bar-fill--overdue {
    background: #DC2626;
}

.fiche-delay-bar-marker {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid #2563EB;
    border-radius: 50%;
    z-index: 1;
}

.fiche-delay-bar-marker--overdue {
    border-color: #DC2626;
}

.fiche-delay-bar-pct {
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    margin: 5px 0 2px;
    white-space: nowrap;
    color: #2563EB;
}

.fiche-delay-bar-pct--overdue {
    color: #DC2626;
}

/* ===== Dark Mode ===== */
[data-bs-theme="dark"] .fiche-title-icon {
    background: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .fiche-status-pill.status-warning { background: #664d03; border-color: #ffc107; color: #fff3cd; }
[data-bs-theme="dark"] .fiche-status-pill.status-warning .fiche-status-dot { background: #ffc107; }

[data-bs-theme="dark"] .fiche-status-pill.status-success { background: #0f5132; border-color: #198754; color: #d1e7dd; }
[data-bs-theme="dark"] .fiche-status-pill.status-success .fiche-status-dot { background: #198754; }

[data-bs-theme="dark"] .fiche-status-pill.status-danger { background: #842029; border-color: #dc3545; color: #f8d7da; }
[data-bs-theme="dark"] .fiche-status-pill.status-danger .fiche-status-dot { background: #dc3545; }

[data-bs-theme="dark"] .fiche-status-pill.status-secondary { background: #495057; border-color: #6c757d; color: #dee2e6; }
[data-bs-theme="dark"] .fiche-status-pill.status-secondary .fiche-status-dot { background: #adb5bd; }

[data-bs-theme="dark"] .fiche-card-header {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .fiche-card-header-icon.icon-blue { background: #1a4d8f; }
[data-bs-theme="dark"] .fiche-card-header-icon.icon-green { background: #0f5132; }
[data-bs-theme="dark"] .fiche-card-header-icon.icon-slate { background: #2b3035; }
[data-bs-theme="dark"] .fiche-card-header-icon.icon-red { background: #842029; }
[data-bs-theme="dark"] .fiche-card-header-icon.icon-yellow { background: #713f12; }

[data-bs-theme="dark"] .fiche-field-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .fiche-field-highlight {
    background: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .fiche-org-avatar {
    background: #2b3035;
}

[data-bs-theme="dark"] .fiche-btn-refuse:hover {
    background: #842029 !important;
}

[data-bs-theme="dark"] .fiche-timeline-item:not(:last-child)::before {
    background: #495057;
}

[data-bs-theme="dark"] .fiche-timeline-item.connector-done:not(:last-child)::before {
    background: #198754;
}

[data-bs-theme="dark"] .fiche-timeline-dot.dot-current {
    background: #664d03;
    border-color: #ffc107;
    color: #fff3cd;
}

[data-bs-theme="dark"] .fiche-timeline-dot.dot-pending {
    background: #2b3035;
    border-color: #6c757d;
    color: #6c757d;
}

[data-bs-theme="dark"] .fiche-timeline-label {
    color: #dee2e6;
}

[data-bs-theme="dark"] a.fiche-timeline-label:hover {
    color: #6ea8fe;
}

[data-bs-theme="dark"] .fiche-timeline-dot.dot-pending ~ .fiche-timeline-content .fiche-timeline-label {
    color: #6c757d;
}

[data-bs-theme="dark"] .fiche-timeline-date {
    color: #adb5bd;
}
