/* EventielManager - Design System CSS */

/* Suivi Chargement - Bon de Préparation */
.loading-item {
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}
.loading-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
}
.loading-item.loaded {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}
.loading-item.loaded .item-checkbox {
    background-color: #28a745;
    color: white;
}
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}
.touch-feedback {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}
@media (max-width: 768px) {
    .loading-item {
        padding: 15px;
        margin-bottom: 8px;
        border-radius: 8px;
        border: 1px solid #dee2e6;
    }
    .item-checkbox {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid #6c757d;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #f7fafc;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* App Layout - Pleine largeur */
.app-container {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Bootstrap Grid Fix - Force correct layout */
.container-fluid {
    width: 100%;
    padding-right: 0;
    padding-left: 0;
    margin-right: auto;
    margin-left: auto;
    max-width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: 0;
    margin-left: 0;
    width: 100%;
}

.col-md-2, .col-md-10 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    
    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .ml-sm-auto {
        margin-left: auto !important;
    }
}

/* Variables CSS */
:root {
    --primary: #3182ce;
    --primary-dark: #2c5282;
    --primary-light: #ebf8ff;
    --secondary: #718096;
    --success: #38a169;
    --danger: #e53e3e;
    --warning: #d69e2e;
    --white: #ffffff;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    
    /* Couleurs thématiques par module */
    --client-primary: #6366f1;       /* Indigo moderne pour les clients */
    --client-light: #e0e7ff;         /* Indigo clair pour les fonds */
    --client-dark: #3730a3;          /* Indigo foncé pour les textes */
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-700: #4a5568;
    --gray-900: #1a202c;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    padding: 0.5rem 0; /* header plus compact */
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-content {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 1rem 0; /* plus compact */
    overflow-y: auto;
    min-height: 100vh;
}

/* Variable pour la hauteur du header (utilisée pour le sidebar fixe admin) */
:root {
    --header-height: 60px; /* Hauteur approximative du main-header (padding + contenu) */
}

/* Sidebar fixe pour admin */
.sidebar-fixed-admin {
    position: fixed !important;
    top: var(--header-height); /* Positionné sous le header */
    height: calc(100vh - var(--header-height)); /* Hauteur totale moins la hauteur du header */
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999; /* Sous le header (z-index: 100) mais au-dessus du contenu */
    left: 0;
    width: 16.666667%; /* Largeur équivalente à col-md-2 */
    transition: all 0.3s ease; /* Transition douce */
    scrollbar-width: thin; /* Scrollbar fine pour Firefox */
    scrollbar-color: rgba(102, 126, 234, 0.5) transparent; /* Couleur scrollbar Firefox */
}

/* Style de la scrollbar pour Webkit (Chrome, Safari, Edge) */
.sidebar-fixed-admin::-webkit-scrollbar {
    width: 6px;
}

.sidebar-fixed-admin::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-fixed-admin::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 3px;
}

.sidebar-fixed-admin::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* Sur mobile, le sidebar reste normal (d-none d-md-block le masque déjà) */
@media (max-width: 767.98px) {
    .sidebar-fixed-admin {
        position: relative !important;
        width: 100% !important;
    }
    
    /* CORRECTION CRITIQUE - Tous les sélecteurs avec sidebar-fixed-admin doivent avoir margin-left: 0 sur mobile */
    .row .sidebar-fixed-admin ~ .col-md-10,
    .row .sidebar-fixed-admin ~ [class*="col-md-10"],
    .row:has(.sidebar-fixed-admin) .col-md-10.ml-sm-auto,
    .container-fluid .row:has(.sidebar-fixed-admin) .col-md-10.ml-sm-auto,
    .row .sidebar-fixed-admin ~ .col-md-10.ml-sm-auto {
        margin-left: 0 !important;
    }
    
    /* Toutes les colonnes col-md-10 doivent avoir margin-left: 0 sur mobile */
    .col-md-10.ml-sm-auto,
    .col-md-10 {
        margin-left: 0 !important;
    }
}

/* Ajuster le contenu principal quand le sidebar est fixe */
.row .sidebar-fixed-admin ~ .col-md-10,
.row .sidebar-fixed-admin ~ [class*="col-md-10"],
.row:has(.sidebar-fixed-admin) .col-md-10.ml-sm-auto {
    margin-left: 16.666667% !important;
    padding-top: 0; /* Pas de padding-top supplémentaire, le header sticky gère déjà */
}

/* Alternative pour les navigateurs qui ne supportent pas le sélecteur sibling ou :has() */
.container-fluid .row:has(.sidebar-fixed-admin) .col-md-10.ml-sm-auto {
    margin-left: 16.666667% !important;
}

/* Section récapitulatif projet dans sidebar admin */
.sidebar-project-recap {
    margin: 1rem 0.75rem;
    padding: 0;
}

.sidebar-project-recap-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.sidebar-project-recap-header {
    padding: 1.25rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.sidebar-project-recap-icon {
    font-size: 4rem; /* Encore plus grande pour bien mettre en évidence */
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.sidebar-project-recap-icon i {
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sidebar-project-recap-name {
    font-size: 1.3rem; /* Plus gros pour bien mettre en évidence */
    font-weight: 800; /* Plus bold */
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.02em;
}

.sidebar-project-recap-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

.sidebar-project-recap-items {
    padding: 0.75rem 0;
}

.sidebar-recap-item {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-recap-item:hover {
    background: #f8fafc;
    color: #667eea;
    border-left-color: #667eea;
    transform: translateX(2px);
}

.sidebar-recap-item .recap-icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-recap-item .recap-icon i {
    color: #8b5cf6; /* Violet monochrome pour les icônes du sidebar */
}

.sidebar-recap-item .recap-label {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Compteur avec texte (violet par défaut) */
.sidebar-recap-item .recap-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #8b5cf6;
    color: #fff;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

/* Compteur rouge spécifique pour alertes */
.sidebar-recap-item .recap-counter-red {
    background: #dc2626;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem; /* espacement réduit */
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.55rem 1rem; /* plus petit */
    color: var(--gray-700);
    text-decoration: none;
    transition: transform .18s ease, color .18s ease, background-color .18s ease, border-color .18s ease;
    border-left: 2px solid transparent; /* plus fin */
    position: relative;
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--primary);
    transform: translateX(2px); /* animation subtile */
}

/* soulignement animé */
.nav-link::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
    border-radius: 2px;
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    margin-right: 0.6rem;
    font-size: 1.05rem; /* plus discret */
    transition: transform .18s ease;
}

/* Sidebar icons - apply mono-circle-soft style globally for validation */
.sidebar .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.22) !important; /* plus visible sur fond violet */
}

/* Monochrome Icon Style - Circle Soft */
.mono-circle-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #ffffff; /* Icône blanche */
    background: rgba(255, 255, 255, 0.22); /* Halo doux */
}

/* Header icons: visible on white header background */
.main-header .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #6C05B3 !important; /* violet foncé pour contraste */
    background: rgba(108, 5, 179, 0.12) !important; /* halo violet doux */
}

/* Icones d'actions utilitaires */
.icon-edit { color:#2563EB !important; background: rgba(37,99,235,.12) !important; }
.icon-delete { color:#DC2626 !important; background: rgba(220,38,38,.12) !important; }
/* Planning (calendrier) */
.icon-planning { color:#0EA5E9 !important; background: rgba(14,165,233,.12) !important; }

/* === Boutons d'actions par défaut (utilisables partout) === */
.action-btn { display:inline-flex; align-items:center; justify-content:center; padding:0; border:none; background:transparent; }
.action-icon { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; transition: background-color .22s ease-out, transform .22s ease-out, box-shadow .22s ease-out; }
.action-icon-sm { width:24px; height:24px; font-size:12px; }
.action-icon-xs { width:20px; height:20px; font-size:11px; }
.action-icon-lg { width:32px; height:32px; font-size:14px; }

/* Variantes chromatiques */
.action-edit { color:#2563EB !important; background: rgba(37,99,235,.12) !important; }
.action-delete { color:#DC2626 !important; background: rgba(220,38,38,.12) !important; }
.action-view { color:#374151 !important; background: rgba(55,65,81,.12) !important; }
.action-planning { color:#0EA5E9 !important; background: rgba(14,165,233,.12) !important; }
.action-approve { color:#10B981 !important; background: rgba(16,185,129,.12) !important; }
.action-cancel { color:#F59E0B !important; background: rgba(245,158,11,.12) !important; }
.action-export { color:#6B7280 !important; background: rgba(107,114,128,.12) !important; }
.action-import { color:#6B7280 !important; background: rgba(107,114,128,.12) !important; }

/* Hover/active génériques */
.btn:hover .action-edit { background: rgba(37,99,235,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn:hover .action-delete { background: rgba(220,38,38,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(220,38,38,.35); }
.btn:hover .action-view { background: rgba(55,65,81,.25) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(55,65,81,.30); }
.btn:hover .action-planning { background: rgba(14,165,233,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(14,165,233,.35); }
.btn:hover .action-approve { background: rgba(16,185,129,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(16,185,129,.35); }
.btn:hover .action-cancel { background: rgba(245,158,11,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(245,158,11,.35); }
.btn:hover .action-export, .btn:hover .action-import { background: rgba(107,114,128,.26) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(107,114,128,.30); }
.btn:active .action-icon { transform: scale(.96); box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* Transitions et survol pour icônes d'action */
.nav-icon { transition: background-color .22s ease-out, transform .22s ease-out, box-shadow .22s ease-out; }
.btn:hover .icon-edit { background: rgba(37,99,235,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn:hover .icon-delete { background: rgba(220,38,38,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(220,38,38,.35); }
.btn:hover .icon-planning { background: rgba(14,165,233,.30) !important; transform: translateY(-1px) scale(1.08); box-shadow: 0 4px 12px rgba(14,165,233,.35); }
.btn:active .icon-edit, .btn:active .icon-delete, .btn:active .icon-planning { transform: scale(.96); box-shadow: 0 2px 6px rgba(0,0,0,.15); }

.nav-link:hover .nav-icon { transform: scale(1.05); }

/* accessibilité au clavier */
.nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49,130,206,.18) inset;
    border-left-color: var(--primary);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--gray-700);
    font-size: 1rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Page actions dans banner */
.page-header.banner .page-actions {
    margin-top: 1rem;
}

.page-header.banner .page-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.page-header.banner .page-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Banner page-header with icon */
.page-header.banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
    box-shadow: var(--shadow);
}
.page-header.banner .page-title,
.page-header.banner .page-subtitle { color: #fff; margin: 0; }
.page-header.banner .page-title { font-size: 1.6rem; }
.page-header.banner .page-subtitle { opacity: .95; font-size: .95rem; }
.page-header.banner .ph-icon { flex: 0 0 auto; display:flex; align-items:center; }
.page-header.banner .ph-icon .icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 12px;
    background: rgba(255,255,255,.18); color: #fff; font-size: 28px;
}
.page-header.banner .ph-text { display:flex; flex-direction: column; justify-content:center; min-height: 64px; }

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-input.error {
    border-color: var(--danger);
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 0.35rem 0.75rem; /* plus compact */
    font-size: 0.85rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.table tr:hover {
    background: var(--gray-50);
}

/* Stats Cards - Version simplifiée selon règles critiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Correction largeur dashboard - alignement parfait selon mémoire */
.col-md-10 .row {
    margin-right: -15px;
    margin-left: -15px;
    width: calc(100% + 30px);
}

/* Règles dashboard stats supprimées - utilise .stats-grid par défaut */

.stat-card {
    background: var(--white);
    padding: 0.4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 0.15rem;
}

.stat-label {
    color: var(--gray-700);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Icônes des stat-cards (mêmes codes visuels que le header) */
.stat-card .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #6C05B3 !important;
    background: rgba(108, 5, 179, 0.12) !important;
}

/* Alerts / Notifications - Design 1 Moderne avec Gradients */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    animation: slideIn 0.3s ease;
}

/* Design 1 - Gradients colorés par type */
.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.alert-danger,
.alert-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Icônes des notifications */
.alert .notification-icon {
    font-size: 1.5rem;
    min-width: 32px;
    flex-shrink: 0;
}

/* Contenu des notifications */
.alert .notification-content {
    flex: 1;
    line-height: 1.5;
}

/* Bouton de fermeture Design 1 */
.alert button.notification-close,
.alert .notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: auto;
    padding: 0;
    line-height: 1;
}

.alert button.notification-close:hover,
.alert .notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge-warning {
    background: #faf089;
    color: #744210;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Spécialités (tableau) : texte sombre */
.badge.badge-secondary {
    background: #e5e7eb;
    color: #000000;
}

/* Module Clients - Couleur Indigo */
.btn-client {
    background: var(--client-primary);
    color: var(--white);
    border: none;
}

.btn-client:hover {
    background: var(--client-dark);
    color: var(--white);
}

.btn-outline-client {
    background: transparent;
    color: var(--client-primary);
    border: 1px solid var(--client-primary);
}

.btn-outline-client:hover {
    background: var(--client-primary);
    color: var(--white);
}

.badge-client {
    background: var(--client-light);
    color: var(--client-dark);
}

.bg-client-light {
    background-color: var(--client-light) !important;
}

.text-client {
    color: var(--client-primary) !important;
}

.border-client {
    border-color: var(--client-primary) !important;
}

/* Nettoyage: styles mobiles superflus supprimés (sidebar fixe Bootstrap) */

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 26, 0.35);
    backdrop-filter: blur(8px) saturate(1.05);
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal.show { display: flex; }
.modal { align-items: center; justify-content: center; }


.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

/* Style Violet Slide‑Up appliqué globalement */
.modal .modal-header { background: linear-gradient(135deg, #6C67C2, #8a84ff); color:#fff; border-bottom:none; }
.modal .modal-header h3 { color:#fff; }
.modal .modal-close, .modal .btn-close { color:#fff; }

@keyframes emSlideUp600 {
    from { opacity: 0; transform: translateY(24px) scale(.98); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.modal.show .modal-content,
.modal[style*="display: flex"] .modal-content,
.modal[style*="display:flex"] .modal-content,
.modal[style*="display: block"] .modal-content,
.modal.show .modal-dialog,
.modal[style*="display: flex"] .modal-dialog,
.modal[style*="display:flex"] .modal-dialog,
.modal[style*="display: block"] .modal-dialog { animation: emSlideUp600 .6s ease-out both; }
@media (prefers-reduced-motion: reduce) {
    .modal.show .modal-content,
    .modal[style*="display: flex"] .modal-content,
    .modal[style*="display:flex"] .modal-content,
    .modal[style*="display: block"] .modal-content,
    .modal.show .modal-dialog,
    .modal[style*="display: flex"] .modal-dialog,
    .modal[style*="display:flex"] .modal-dialog,
    .modal[style*="display: block"] .modal-dialog { animation: none !important; }
}

/* Login Page Specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.875rem;
    font-weight: bold;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--gray-700);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

/* Global Loader Overlay */
#globalLoader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: none;
}

#globalLoader .loader-ring {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(108, 5, 179, 0.2);
    border-top-color: #6C05B3;
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast animations */
@keyframes slideIn {
  from { transform: translateX(12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(12px); opacity: 0; }
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* === Page transition (désactivée) === */
.page-enter { opacity: 1 !important; transform: none !important; filter: none !important; }
.page-enter-active { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
/* Pré-charge: empêcher le flash avant l'animation */
/* Preload safety: réduire la portée pour éviter d'éventuels masquages inattendus */
html.em-preload body > .app-container .container-fluid .row > .col-md-10.ml-sm-auto {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .page-enter, .page-enter-active { transition: none !important; transform: none !important; }
}

/* === Staggered list reveal === */
.stagger > * { opacity: 1 !important; transform: none !important; }
.stagger.stagger-ready > * { opacity: 1 !important; transform: none !important; transition: none !important; }
.stagger.stagger-ready > *:nth-child(1){ transition-delay: 0 !important; }
.stagger.stagger-ready > *:nth-child(2){ transition-delay: 0 !important; }
.stagger.stagger-ready > *:nth-child(3){ transition-delay: 0 !important; }
.stagger.stagger-ready > *:nth-child(4){ transition-delay: 0 !important; }

/* Sidebar animations désactivées */

/* ========================================
 * PLANNING & CALENDRIER STYLES
 * ======================================== */

/* CSS Planning & Calendrier - EventielManager
 * Styles pour les fonctionnalités de planification, calendriers et affectations
 * Compatible Bootstrap 5 + spécifications EventielManager
 */

/* S'assurer que le modal est caché par défaut */
#assignmentModal {
    display: none !important;
}

#assignmentModal.show {
    display: flex !important;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.week-display {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    min-width: 180px;
    text-align: center;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s;
}

.tab-button.active {
    background: #4f46e5;
    color: white;
}

.tab-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

/* Calendar styles */
.calendar-grid {
    display: grid;
    grid-template-columns: 150px repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.calendar-header-cell {
    background: #f8fafc;
    padding: 15px 10px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e2e8f0;
    color: #374151;
}

.employee-cell {
    background: #f8fafc;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: 500;
    color: #374151;
}

.calendar-cell {
    background: white;
    padding: 8px;
    min-height: 100px;
    position: relative;
}

.assignment-block {
    background: #3b82f6;
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
}

.assignment-block:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.assignment-block.confirmed {
    background: #10b981;
}

.assignment-block.completed {
    background: #6b7280;
}

.assignment-block.cancelled {
    background: #dc2626;
}

.assignment-project {
    font-weight: 600;
    margin-bottom: 2px;
}

.assignment-time {
    font-size: 0.65rem;
    opacity: 0.9;
}

/* Légende */
.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.planned { background: #3b82f6; }
.legend-color.confirmed { background: #10b981; }
.legend-color.completed { background: #6b7280; }
.legend-color.cancelled { background: #dc2626; }

/* Planning Responsive */
@media (max-width: 768px) {
    .planning-container {
        padding: 1rem;
    }
    
    .controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .week-nav {
        flex-direction: column;
        text-align: center;
    }
    
    .calendar-grid {
        grid-template-columns: 120px repeat(7, 1fr);
        font-size: 0.8rem;
    }
    
    .calendar-header-cell, .employee-cell {
        padding: 8px 4px;
    }
    
    .calendar-cell {
        min-height: 60px;
        padding: 4px;
    }
    
    .assignment-block {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
    
    .calendar-legend {
        gap: 10px;
        font-size: 0.75rem;
    }
}

/* ========================================
 * TIMELINE ÉVÉNEMENTS STYLES
 * ======================================== */

/* Timeline Controls */
.timeline-controls {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Timeline Container */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #3b82f6, #1e40af);
}

/* Timeline Items */
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 0;
}

.timeline-marker {
    position: absolute;
    left: -50px;
    top: 20px;
    z-index: 2;
}

.timeline-date {
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.timeline-date .day {
    font-size: 1.1rem;
    color: #1e40af;
    line-height: 1;
}

.timeline-date .month {
    font-size: 0.7rem;
    color: #3b82f6;
    line-height: 1;
}

.timeline-content {
    margin-left: 20px;
}

/* Event Cards */
.event-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.event-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.event-card .card-body {
    padding: 1.5rem;
}

/* Phases */
.event-phases {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #3b82f6;
}

.phases-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.phase-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Status badges */
.badge.bg-confirmed { background-color: #10b981 !important; }
.badge.bg-pending { background-color: #f59e0b !important; }
.badge.bg-cancelled { background-color: #ef4444 !important; }

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline {
        padding-left: 60px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-marker {
        left: -30px;
    }
    
    .timeline-date {
        width: 50px;
        height: 50px;
    }
    
    .timeline-date .day {
        font-size: 0.9rem;
    }
    
    .timeline-date .month {
        font-size: 0.6rem;
    }
    
    .timeline-content {
        margin-left: 10px;
    }
    
    .event-card .card-header,
    .event-card .card-body {
        padding: 1rem;
    }
    
    .timeline-controls .row > div {
        margin-bottom: 10px;
    }
}

/* Styles pour la page de détails client */
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.contact-info i {
    width: 20px;
    text-align: center;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #495057;
    background-color: transparent;
    border-bottom: 2px solid #007bff;
}

.tab-content {
    padding-top: 1rem;
}

/* ========================================
   SYSTÈME DE PHASES DE PROJET
   ======================================== */

/* Container principal des phases */
.timeline-container {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f1f3f4;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 20px;
    border-radius: 12px;
    margin: -25px -25px 25px -25px;
}

.timeline-date-range {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.timeline-date-range .mx-2 {
    color: #007bff;
    font-weight: 800;
    font-size: 1.3rem;
}

.timeline-actions .btn {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.timeline-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Phases individuelles */
.timeline-phase {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.timeline-phase:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-3px);
    border-color: #007bff;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f3f4;
}

.phase-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.phase-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    flex-grow: 1;
    letter-spacing: -0.02em;
}

.phase-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-actions {
    display: flex;
    gap: 8px;
}

.phase-actions .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.phase-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Barre de progression de la phase */
.phase-bar {
    position: relative;
    background: #e9ecef;
    border-radius: 22px;
    height: 40px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.15);
}

.phase-progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8);
    border-radius: 20px;
    transition: width 0.4s ease;
    position: relative;
    min-width: 40px; /* Toujours visible même à 0% */
    box-shadow: 0 2px 4px rgba(40,167,69,0.3);
}

.phase-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s infinite;
}

/* Animation pour les phases planifiées (0% de progression) */
.phase-progress[style*="width: 0%"] {
    background: linear-gradient(90deg, #6c757d, #495057);
    min-width: 50px;
}

/* Animation pour les phases en cours */
.phase-progress[style*="width: 50%"] {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
    box-shadow: 0 2px 4px rgba(255,193,7,0.4);
}

/* Animation pour les phases terminées */
.phase-progress[style*="width: 100%"] {
    background: linear-gradient(90deg, #28a745, #20c997);
    box-shadow: 0 2px 4px rgba(40,167,69,0.4);
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.phase-dates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.start-date, .end-date {
    font-weight: 600;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.duration {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* Assignations de la phase */
.phase-assignments {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #495057;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 10px;
}

.assignment-count {
    font-weight: 600;
    color: #007bff;
}

.phase-assignments .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Vue Assignations - Glisser-déposer */
.assignments-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.phase-assignments-zone {
    margin-top: 15px;
}

.employee-drop-zone {
    min-height: 120px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 20px;
}

.employee-drop-zone:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.employee-drop-zone.drag-over {
    border-color: #28a745;
    background: #d4edda;
    transform: scale(1.02);
}

.drop-zone-content {
    text-align: center;
    color: #6c757d;
    margin-bottom: 15px;
}

.drop-zone-content i {
    font-size: 2rem;
    margin-bottom: 8px;
}

.assigned-employees {
    width: 100%;
}

.assigned-employee {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.assigned-employee:hover {
    background: #d4edda;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.assigned-employee .employee-info {
    flex: 1;
}

.assigned-employee .employee-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
}

.assigned-employee .employee-role {
    font-size: 0.8rem;
    color: #6c757d;
}

.assigned-employee .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Vue Gantt */
.gantt-chart {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.gantt-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.gantt-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.gantt-period {
    font-size: 0.9rem;
    color: #6c757d;
}

.gantt-timeline {
    position: relative;
    height: 30px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.gantt-timeline-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    padding: 2px 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 3px;
    white-space: nowrap;
}

.gantt-grid {
    min-width: 800px;
}

.gantt-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    min-height: 50px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e9ecef;
}

.gantt-label {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 15px;
    border-right: 2px solid #dee2e6;
}

.gantt-label .phase-icon {
    font-size: 1.2rem;
}

.gantt-label .phase-name {
    font-weight: 500;
    color: #495057;
    flex: 1;
}

.gantt-label .phase-status {
    font-size: 0.7rem;
    padding: 2px 6px;
}

.gantt-label .phase-employees {
    font-size: 0.8rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
}

.gantt-bar-container {
    flex: 1;
    position: relative;
    height: 35px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.gantt-bar {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    min-width: 20px; /* Largeur minimale pour être visible */
}

.gantt-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.gantt-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.gantt-bar-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2px 4px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    overflow: hidden;
}

.gantt-bar-text {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.gantt-bar-dates {
    font-size: 0.6rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-top: 1px;
}

/* Responsive Gantt */
@media (max-width: 768px) {
    .gantt-chart {
        padding: 15px;
    }
    
    .gantt-label {
        min-width: 200px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .gantt-label .phase-name {
        font-size: 0.9rem;
    }
    
    .gantt-bar-content {
        padding: 2px 4px;
    }
    
    .gantt-bar-text {
        font-size: 0.7rem;
    }
    
    .gantt-bar-dates {
        font-size: 0.6rem;
    }
}

.available-employees {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

.available-employees h5 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1rem;
}

.employee-list {
    max-height: 400px;
    overflow-y: auto;
}

.employee-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all 0.3s ease;
}

.employee-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.employee-card:active {
    cursor: grabbing;
}

.employee-info {
    text-align: left;
}

.employee-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.employee-role {
    font-size: 0.8rem;
    color: #007bff;
    margin-top: 2px;
}

.employee-specialties {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

/* Grille des phases pour assignations */
.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.phase-column {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    min-height: 300px;
}

.phase-column .phase-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.role-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.role-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.role-header h6 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #495057;
}

.role-header .required {
    color: #dc3545;
    font-weight: bold;
}

.employee-drop-zone {
    min-height: 60px;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    color: #6c757d;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    background: #fff;
}

.employee-drop-zone:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.employee-drop-zone.drag-over {
    border-color: #28a745;
    background: #f0fff4;
    color: #28a745;
}

.employee-drop-zone:empty::before {
    content: "Glisser un employé ici";
    display: block;
    padding: 20px;
    color: #adb5bd;
}

/* Vue Gantt */
.gantt-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gantt-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.gantt-header h5 {
    color: #495057;
    margin-bottom: 5px;
}

.gantt-chart {
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

/* Responsive pour la page de détails client */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Responsive pour les phases */
    .timeline-container {
        padding: 15px;
        margin: 10px;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
        margin: -15px -15px 20px -15px;
    }
    
    .timeline-date-range {
        font-size: 1rem;
    }
    
    .timeline-date-range .mx-2 {
        font-size: 1.1rem;
    }
    
    .phase-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .phase-icon {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .phase-name {
        font-size: 1.1rem;
    }
    
    .phase-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }
    
    .phase-bar {
        height: 32px;
        margin-bottom: 12px;
    }
    
    .phase-dates {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .start-date, .end-date {
        display: inline-block;
        margin: 2px;
    }
    
    .phase-assignments {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .phases-grid {
        grid-template-columns: 1fr;
    }
    
    .assignments-container .row {
        flex-direction: column;
    }
    
    .available-employees {
        margin-bottom: 20px;
    }
}

/* Gantt Image Styles */
.gantt-image-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.gantt-image-wrapper {
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.gantt-image-wrapper:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.gantt-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.gantt-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .gantt-image-container {
        padding: 0.5rem;
    }
    
    .gantt-image-wrapper {
        padding: 0.5rem;
    }
}

/* ========================================
   🎯 SYSTÈME D'AIDE CONTEXTUEL
   ======================================== */

/* Bouton d'aide flottant */
.help-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse-help 2s infinite;
}

.help-floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.help-floating-button:active {
    transform: scale(0.95);
}

/* Animation de pulsation */
@keyframes pulse-help {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.7);
    }
}

/* Animation de rebond (première visite) */
@keyframes bounce-animation {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.help-floating-button.bounce-animation {
    animation: bounce-animation 1s ease;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .help-floating-button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}

/* Modal d'aide personnalisée */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

#helpModal .modal-header {
    color: white;
    border-bottom: none;
}

#helpModal .modal-body {
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1.5rem;
}

#helpModal .accordion-button {
    font-weight: 500;
    font-size: 0.95rem;
}

#helpModal .accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #212529;
}

#helpModal .accordion-body {
    padding: 1.25rem;
}

#helpModal code,
#helpModal kbd {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #dc2626;
    font-family: 'Courier New', monospace;
}

#helpModal kbd {
    background: #374151;
    color: white;
    border: 1px solid #6b7280;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 3px 8px;
}

#helpModal .alert {
    border-left-width: 4px;
    border-left-style: solid;
    background: #f9fafb;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

#helpModal .alert-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

#helpModal .alert-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

#helpModal .alert-success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

#helpModal .alert-danger {
    border-left-color: #ef4444;
    background: #fef2f2;
}

#helpModal .alert h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Cartes de raccourcis dans le guide par défaut */
#helpModal .card {
    transition: all 0.3s ease;
}

#helpModal .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Amélioration des listes dans les guides */
#helpModal ul,
#helpModal ol {
    margin-bottom: 1rem;
}

#helpModal li {
    margin-bottom: 0.5rem;
}

#helpModal ul ul,
#helpModal ol ul,
#helpModal ul ol,
#helpModal ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Style pour les icônes colorées */
.text-purple { color: #8b5cf6; }
.text-orange { color: #f59e0b; }

/* Badge de compteur d'aide (optionnel) */
.help-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Amélioration des tooltips Bootstrap */
.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

/* Style pour les badges d'info contextuelle */
.help-info-badge {
    cursor: help;
    transition: all 0.2s ease;
}

.help-info-badge:hover {
    transform: scale(1.2);
    color: #667eea !important;
}
