:root {
    --rh-primary: #6941c6;
    --rh-primary-rgb: 105, 65, 198;
    --rh-primary-hover: #53389e;
    --rh-primary-soft: #f4f3ff;
    --rh-text: #182230;
    --rh-muted: #667085;
    --rh-border: #e8e9ef;
    --rh-surface: #fff;
    --rh-radius: 12px;
    --rh-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; }
.container { max-width: 980px; margin: 0 auto; padding: 16px; }
.topbar { border-bottom: 1px solid #ddd; padding: 8px 0; }
.topbar .container { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.topbar h1 { margin: 0; font-size: 1.5rem; }
.topbar a { text-decoration: none; color: inherit; margin: 0 6px; }

@media (min-width: 600px) {
    .topbar .container { flex-direction: row; justify-content: space-between; }
}

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
/* Ajout d'un conteneur pour le défilement horizontal des tableaux */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }

label { display: block; margin: 10px 0; }

.btn, button.btn, .btn-secondary, .btn-danger { 
    display: inline-block; 
    padding: 8px 12px; 
    text-decoration: none; 
    border-radius: 4px; 
    text-align: center;
    margin-bottom: 4px;
}

.btn-primary { background-color: var(--rh-primary); color: white; border: none; cursor: pointer; }
.btn-primary:hover { background-color: var(--rh-primary-hover); }

.btn-secondary { background-color: #667085; color: white; border: none; cursor: pointer; }
.btn-secondary:hover { background-color: #5a6268; }

.navbar-brand .tracking-tight {
    letter-spacing: -1px;
}

header.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    pointer-events: auto !important;
}

header.navbar .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.transition-all {
    transition: all 0.3s ease;
}

.pulse-info {
    box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.7);
    animation: pulse 2s infinite;
    border-radius: 50%;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(13, 202, 240, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 202, 240, 0); }
}

/* Amélioration globale des cartes et tableaux */
.card {
    border: none;
    border-radius: var(--rh-radius);
    box-shadow: var(--rh-shadow);
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--rh-primary-rgb), 0.02);
}

/* Couleurs subtiles pour les badges de l'agenda */
.bg-primary-subtle { background-color: rgba(var(--rh-primary-rgb), 0.1) !important; }
.text-primary { color: var(--rh-primary) !important; }

.bg-danger-subtle { background-color: rgba(220, 53, 69, 0.1) !important; }
.text-danger { color: #dc3545 !important; }

.bg-info-subtle { background-color: rgba(13, 202, 240, 0.1) !important; }
.text-info { color: #0dcaf0 !important; }

.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.1) !important; }
.text-warning { color: #ffc107 !important; }

.timeline .card {
    transition: transform 0.2s ease;
}

.timeline .card:hover {
    transform: translateX(5px);
}

.profile-link {
    transition: all 0.2s ease;
    border-radius: 20px;
    padding: 5px 12px;
}

.profile-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.profile-link .settings-icon {
    transition: transform 0.3s ease;
}

.profile-link:hover .settings-icon {
    transform: rotate(90deg);
    opacity: 1 !important;
}

.extra-small { font-size: 0.75rem; }

.timeline-compact {
    position: relative;
    padding-left: 10px;
}

.timeline-compact::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.progress {
    background-color: #f0f0f0;
    border-radius: 10px;
}

.card {
    transition: transform 0.2s;
}

.clickable-card:hover {
    transform: translateY(-3px);
    cursor: pointer;
}

/* Tous les menus restent visibles sur ordinateur, même avec un nom de compte long. */
@media (min-width: 992px) {
    header.navbar .navbar-collapse {
        min-width: 0;
    }
    header.navbar .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.25rem !important;
    }
    header.navbar .nav-link { padding-inline: 0.65rem !important; }
    header.navbar .navbar-nav > .nav-item.ms-auto { margin-left: 0 !important; }
}

header.navbar .dropdown-item { white-space: normal; }
header.navbar .nav-link { overflow-wrap: anywhere; }
header.navbar .dropdown-menu { min-width: 16rem; }
@media (max-width: 991px) {
    header.navbar .navbar-collapse {
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
    }
}
