/* 
* Warranty Admin - Luxury Edition
* Version: 3.0.0
*/

:root {
    /* Palette monochrome principale */
    --primary-color: #8A7967;  /* Taupe chaud - couleur principale */
    --primary-dark: #6A5947;   /* Taupe foncé pour hover */
    --primary-light: #A89987;  /* Taupe clair pour accents */
    
    /* Accents chauds pour éléments interactifs */
    --warm-accent: #C2A87F;    /* Or champagne */
    --warm-accent-dark: #A28A5F; /* Or champagne foncé */
    
    /* Tons froids pour éléments secondaires */
    --cool-accent: #7D8991;    /* Bleu-gris */
    --cool-accent-dark: #5D6971; /* Bleu-gris foncé */
    
    /* États fonctionnels */
    --success-color: #63997A;  /* Vert élégant */
    --info-color: #6E91A6;     /* Bleu acier clair */
    --warning-color: #D4B483;  /* Beige doré */
    --danger-color: #A67F78;   /* Rouge terracotta */
    
    /* Tons neutres */
    --light-color: #F7F5F2;    /* Blanc cassé */
    --dark-color: #3C3C3C;     /* Gris foncé presque noir */
    --body-bg: #F0EDE8;        /* Fond écru */
    --border-color: #E0DDD8;   /* Bordure subtile */
    
    /* Dimensions et effets */
    --card-border-radius: 4px;
    --shadow: 0 3px 10px rgba(60, 60, 60, 0.08);
    --transition: all 0.25s ease;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Base Styles ===== */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    font-size: 0.9rem;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.01em;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn,
button {
    cursor: pointer;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.3;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* ===== Layout ===== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content-disconnect {
    flex: 1;
    margin-left: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark-color) 0%, #2A2A2A 100%);
    color: white;
    position: fixed;
    height: 100%;
    z-index: 100;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.brand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-name {
    margin-left: 0.75rem;
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
    letter-spacing: 0.05em;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    color: white;
}

.sidebar-content {
    padding: 1rem 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.admin-info {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.admin-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.admin-status.online {
    background-color: var(--success-color);
}

.version {
    opacity: 0.7;
}

/* Navigation */
.nav-item-border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-list {
    padding: 0.5rem 0;
    margin: 0;
}

.nav-item {
    margin: 2px 0;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    position: relative;
}

.nav-link i {
    margin-right: 0.9rem;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.nav-link span {
    white-space: nowrap;
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--warm-accent);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 10px;
    background-color: var(--warm-accent);
    color: var(--light-color);
    margin-left: auto;
}

.nav-section {
    padding: 1.2rem 1.25rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
}

/* Collapsed sidebar styles */
.sidebar.collapsed .brand-name,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .admin-info span,
.sidebar.collapsed .version {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar.collapsed.expanded {
    width: var(--sidebar-width);
}

.sidebar.collapsed.expanded .brand-name,
.sidebar.collapsed.expanded .nav-link span,
.sidebar.collapsed.expanded .nav-section-title,
.sidebar.collapsed.expanded .admin-info span,
.sidebar.collapsed.expanded .version {
    display: block;
}

.sidebar.collapsed.expanded .nav-link {
    justify-content: flex-start;
    padding: 0.75rem 1.25rem;
}

.sidebar.collapsed.expanded .nav-link i {
    margin-right: 0.9rem;
}

/* ===== Header ===== */
.dashboard-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background-color: white;
    box-shadow: 0 1px 4px rgba(60, 60, 60, 0.05);
    position: sticky;
    top: 0;
    z-index: 99;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    padding-right: 1rem;
}

.logo {
    height: 36px;
    width: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 300px;
    font-size: 0.85rem;
    transition: var(--transition);
    background-color: var(--light-color);
}

.search-box input:focus {
    width: 350px;
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(138, 121, 103, 0.1);
}

.search-box button {
    position: absolute;
    left: 0.75rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--cool-accent);
}

.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--cool-accent);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    height: 18px;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--warm-accent);
    color: white;
}

/* Style du conteneur de profil utilisateur */
.user-profile {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.user-profile:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Style de l'avatar */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

/* Style des informations utilisateur */
.user-info {
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.username {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.user-role {
    font-size: 12px;
    color: #666;
}

/* Style du bouton de toggle */
.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: transform 0.2s ease;
}

.dropdown-toggle:focus {
    outline: none;
}

/* Rotation de l'icône quand le dropdown est ouvert */
.dropdown-toggle.active i {
    transform: rotate(180deg);
}

/* Style du contenu du dropdown */
.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Classe pour afficher le dropdown */
.dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Style des liens du dropdown */
.dropdown-content a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

.dropdown-content a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
    color: #4e73df;
}

/* ===== Dashboard Content ===== */
.dashboard-content {
    padding: 1.5rem;
    flex: 1;
}

.dashboard-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-title h1 {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    font-size: 1.75rem;
}

.date-display {
    font-size: 0.85rem;
    color: var(--cool-accent);
    margin: 0;
}

/* ===== Stats Overview ===== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: white;
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(60, 60, 60, 0.1);
    border-color: var(--border-color);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 8px;
    font-size: 1.5rem;
    margin-right: 1.25rem;
}

.users-card .stat-icon {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.warranties-card .stat-icon {
    background-color: rgba(99, 153, 122, 0.1);
    color: var(--success-color);
}

.expiring-card .stat-icon {
    background-color: rgba(212, 180, 131, 0.1);
    color: var(--warning-color);
}

.expired-card .stat-icon {
    background-color: rgba(166, 127, 120, 0.1);
    color: var(--danger-color);
}

.active-card .stat-icon {
    background-color: rgba(110, 145, 166, 0.1);
    color: var(--info-color);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 0 0.25rem;
    color: var(--cool-accent);
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
}

.status-active {
    background-color: rgba(99, 153, 122, 0.1);
    color: var(--success-color);
}

.status-expiring {
    background-color: rgba(212, 180, 131, 0.1);
    color: var(--warning-color);
}

.status-expired {
    background-color: rgba(166, 127, 120, 0.1);
    color: var(--danger-color);
}

.status-pending {
    background-color: rgba(125, 137, 145, 0.1);
    color: var(--cool-accent);
}

/* Badge styles */
.badge-success {
    background-color: var(--success-color);
}

.badge-secondary {
    background-color: var(--cool-accent);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.btn-primary {
    color: white;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(138, 121, 103, 0.3);
}

.btn-secondary {
    color: white;
    background-color: var(--cool-accent);
    border-color: var(--cool-accent);
}

.btn-secondary:hover {
    background-color: var(--cool-accent-dark);
    border-color: var(--cool-accent-dark);
    box-shadow: 0 2px 5px rgba(125, 137, 145, 0.3);
}

.btn-info {
    color: white;
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.btn-info:hover {
    background-color: #5D809A;
    border-color: #5D809A;
    box-shadow: 0 2px 5px rgba(110, 145, 166, 0.3);
}

.btn-warning {
    color: var(--dark-color);
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: #C4A165;
    border-color: #C4A165;
    box-shadow: 0 2px 5px rgba(212, 180, 131, 0.3);
}

.btn-danger {
    color: white;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #95706A;
    border-color: #95706A;
    box-shadow: 0 2px 5px rgba(166, 127, 120, 0.3);
}

.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 4px;
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    font-size: 0.875rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: rgba(138, 121, 103, 0.03);
}

.data-table .user-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.data-table .user-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.data-table .user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.data-table .user-name {
    font-weight: 500;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .user-email {
    font-size: 0.75rem;
    color: var(--cool-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .no-data {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--cool-accent);
    font-style: italic;
}

/* ===== Forms ===== */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.form-group {
    flex: 1 0 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
    .form-group.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .form-group.col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .form-group.col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 6px);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235a5c69' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 18px 18px;
    padding-right: 2.5rem;
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.form-control:focus {
    color: var(--dark-color);
    background-color: white;
    border-color: var(--primary-light);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(138, 121, 103, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    padding-right: calc(1.5em + 0.75rem);
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(166, 127, 120, 0.1);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: var(--danger-color);
}

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    border-radius: 6px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--dark-color);
    letter-spacing: 0.02em;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--cool-accent);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 4px;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    color: var(--dark-color);
    transition: var(--transition);
    background-color: white;
    border: 1px solid var(--border-color);
}

.pagination-item:hover {
    background-color: var(--light-color);
    border-color: var(--primary-light);
}

.pagination-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ===== Content Header ===== */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.content-title h1 {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    font-size: 1.75rem;
}

.breadcrumbs {
    font-size: 0.8rem;
    color: var(--cool-accent);
    margin: 0.35rem 0 0;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.content-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.content-actions .btn {
    display: flex;
    align-items: center;
}

.content-actions .btn i {
    margin-right: 0.5rem;
}

/* ===== Content Filters ===== */
/* Amélioration du formulaire de filtrage - Desktop */
.content-filters {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 25px;
}

.search-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

.filter-group.primary-search {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.filter-group .form-control {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.filter-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(138, 121, 103, 0.1);
    outline: none;
}

.btn-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
}

.btn-search:hover {
    color: var(--primary-color);
}

/* Boutons d'action */
.filter-group .btn {
    height: 42px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
}

.btn-outline-secondary:hover {
    background-color: #f5f5f5;
}

/* Tags de filtres actifs */
.active-filters {
    margin-top: 15px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--light-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--dark-color);
    border: 1px solid var(--border-color);
}

.filter-tag .remove-filter {
    margin-left: 8px;
    font-weight: bold;
    color: #999;
    text-decoration: none;
    font-size: 16px;
}

.filter-tag .remove-filter:hover {
    color: var(--danger-color);
}

/* ===== Content Card ===== */
.content-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: 1.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background-color: var(--light-color);
}

.card-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.total-count {
    font-size: 0.8rem;
    color: var(--cool-accent);
    font-weight: 500;
    background-color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.card-content {
    padding: 1.5rem;
}

/* ===== Dashboard Widgets ===== */
.dashboard-widgets {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.75rem;
}

.widget {
    background-color: white;
    border-radius: 6px;
    box-shadow: var(--shadow);
    margin-bottom: 1.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.widget-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light-color);
}

.widget-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.view-all,
.period-selector {
    background-color: transparent;
    border: none;
    font-size: 0.8rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 4px;
}

.view-all:hover,
.period-selector:hover {
    background-color: rgba(138, 121, 103, 0.1);
}

.period-selector.active {
    background-color: var(--primary-color);
    color: white;
}

.widget-content {
    padding: 1.5rem;
}

.widget-controls {
    display: flex;
    gap: 0.5rem;
}

/* ===== Chart Container ===== */
.chart-container {
    height: 320px;
    width: 100%;
    position: relative;
}

/* ===== Activity List ===== */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 1rem;
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.35rem;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--cool-accent);
    font-size: 0.75rem;
}

.activity-time {
    display: flex;
    align-items: center;
}

.activity-user {
    color: var(--primary-color);
}

/* ===== Notifications ===== */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 320px;
    max-width: 90%;
}

.notification {
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.notification-success {
    background-color: #F1F8F4;
    color: var(--success-color);
    border-color: rgba(99, 153, 122, 0.3);
}

.notification-error {
    background-color: #F9F2F1;
    color: var(--danger-color);
    border-color: rgba(166, 127, 120, 0.3);
}

.notification-info {
    background-color: #F1F5F9;
    color: var(--info-color);
    border-color: rgba(110, 145, 166, 0.3);
}

.notification-warning {
    background-color: #FAF6ED;
    color: #B59450;
    border-color: rgba(212, 180, 131, 0.3);
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    opacity: 0.7;
    cursor: pointer;
    padding: 0 0 0 1rem;
    transition: opacity 0.2s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* ===== User Details Modal ===== */
.user-info-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.75rem;
    margin-top: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem;
    background-color: var(--light-color);
}

.info-row {
    display: contents;
}

.info-label {
    font-weight: 600;
    color: var(--cool-accent);
    padding: 0.5rem 0;
}

.info-value {
    color: var(--dark-color);
    padding: 0.5rem 0;
}

.warranties-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}


.warranty-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.warranty-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.warranty-info {
    display: flex;
    flex-direction: column;
}

.warranty-ref {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.warranty-product {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.warranty-dates {
    font-size: 0.8rem;
    color: var(--cool-accent);
}

.warranties-loading {
    padding: 2rem;
    text-align: center;
    color: var(--cool-accent);
    font-style: italic;
    background-color: var(--light-color);
    border-radius: 6px;
}


/* Style pour les éléments de garantie cliquables */
.warranty-item {
    transition: background-color 0.2s ease, transform 0.1s ease;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warranty-item:hover {
    background-color: var(--light-color);
    transform: translateX(3px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.warranty-info {
    display: flex;
    flex-direction: column;
}

.warranty-ref {
    font-weight: 600;
    margin-bottom: 3px;
}

.warranty-product, .warranty-dates {
    font-size: 0.85rem;
    color: var(--cool-accent);
}
/* ===== Custom File Input ===== */
.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 6px);
    margin-bottom: 0;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(1.5em + 0.75rem + 6px);
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(1.5em + 0.75rem + 6px);
    padding: 0.5rem 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(1.5em + 0.75rem + 6px);
    padding: 0.5rem 1rem;
    line-height: 1.5;
    color: white;
    content: "Parcourir";
    background-color: var(--primary-color);
    border-left: inherit;
    border-radius: 0 4px 4px 0;
}

/* ===== Footer ===== */
.dashboard-footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-size: 0.8rem;
    color: var(--cool-accent);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--cool-accent);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap; /* Changé de 'wrap' à 'nowrap' pour garder les boutons en ligne */
    justify-content: flex-end; /* Aligner à droite de la cellule */
    min-width: fit-content; /* Assurez-vous que les boutons ne rétrécissent pas trop */
}

/* Dans la section des media queries, cherchez et modifiez ceci */
@media (max-width: 767.98px) {
    /* Autres styles... */
    
    /* Supprimez ou commentez cette ligne */
    /* .action-buttons {
        flex-wrap: wrap;
    } */
}
/* Assurez-vous que cette déclaration est placée après toutes les media queries */
.action-buttons {
    flex-wrap: nowrap !important; /* Force les boutons à rester en ligne */
    overflow-x: auto; /* Permet de faire défiler horizontalement si nécessaire */
    padding-bottom: 5px; /* Espace pour la barre de défilement */
}

/* ===== Media Queries ===== */
@media (max-width: 1199.98px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }

    .sidebar .brand-name,
    .sidebar .nav-link span,
    .sidebar .nav-section-title,
    .sidebar .admin-info span,
    .sidebar .version {
        display: none;
    }

    .sidebar .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .sidebar .nav-link i {
        margin-right: 0;
    }

    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }

    .content-header,
    .content-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-actions,
    .filter-options {
        margin-top: 1rem;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .search-box input:focus {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }

    .header-controls {
        gap: 0.5rem;
    }

    .user-info {
        display: none;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }

    .search-form {
        width: 100%;
    }

    .form-group {
        width: 100%;
        max-width: none;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 575.98px) {
    .dashboard-header {
        padding: 0 1rem;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .search-box {
        display: none;
    }

    .widget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .widget-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }

    .modal-content {
        margin: 0;
        max-height: 100%;
        border-radius: 0;
    }
}

/* ===== Utility Classes ===== */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--cool-accent) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--cool-accent) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.rounded { border-radius: var(--card-border-radius) !important; }
.rounded-circle { border-radius: 50% !important; }

.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }

.border { border: 1px solid var(--border-color) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-right { border-right: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-left { border-left: 1px solid var(--border-color) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.px-3 { padding-right: 1rem !important; padding-left: 1rem !important; }

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Print styles */
@media print {
    .sidebar,
    .dashboard-header,
    .dashboard-footer,
    .action-buttons,
    .content-actions,
    .content-filters {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .content-wrapper {
        padding: 0 !important;
    }

    .dashboard-content {
        padding: 0 !important;
    }

    .widget,
    .content-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #ddd !important;
    }

    .chart-container {
        break-inside: avoid !important;
    }
}

/* Style pour les éléments de menu non implémentés */
.nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-item.disabled .nav-link {
    color: #888;
    text-decoration: line-through;
}

.nav-item.disabled .badge {
    background-color: #ccc;
    color: #666;
}

.nav-item.disabled:hover {
    background-color: transparent;
}


/* Styles pour la page de connexion */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fc;
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-form h2 {
    margin-bottom: 1.5rem;
    color: #4e73df;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #a1b4ff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    color: #fff;
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    color: #fff;
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.mt-3 {
    margin-top: 1rem;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}





/* ===== Tooltips améliorés ===== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    max-width: 250px;
    min-width: 120px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
    line-height: 1.4;
    text-align: center;
}

[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-color) transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1001;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(-10px);
}

/* Positionnement à droite */
[data-tooltip-position="right"]::after {
    bottom: auto;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 10px;
}

[data-tooltip-position="right"]::before {
    bottom: auto;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 5px;
    border-color: transparent var(--dark-color) transparent transparent;
}

[data-tooltip-position="right"]:hover::after {
    transform: translateY(-50%) translateX(5px);
}

/* Positionnement à gauche */
[data-tooltip-position="left"]::after {
    bottom: auto;
    top: 50%;
    right: 100%;
    left: auto;
    transform: translateY(-50%);
    margin-right: 10px;
}

[data-tooltip-position="left"]::before {
    bottom: auto;
    top: 50%;
    right: 100%;
    left: auto;
    transform: translateY(-50%);
    margin-right: 5px;
    border-color: transparent transparent transparent var(--dark-color);
}

[data-tooltip-position="left"]:hover::after {
    transform: translateY(-50%) translateX(-5px);
}

/* Tooltips spécifiques pour les activités */
.activity-title {
    display: flex;
    align-items: center;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--cool-accent);
    color: white;
    font-size: 10px;
    margin-left: 6px;
    cursor: help;
}

.info-icon:hover {
    background-color: var(--primary-color);
}

/* Modification pour aligner correctement l'icône d'information avec le texte multilignes */
.activity-title {
    display: inline-flex;
    align-items: flex-start; /* Alignement en haut plutôt qu'au centre */
    flex-wrap: wrap; /* Permet au contenu de passer à la ligne */
    width: 100%; /* Assure que le conteneur prend toute la largeur disponible */
}

.activity-text {
    flex: 1; /* Prend l'espace disponible */
    margin-right: 8px; /* Espace entre le texte et l'icône */
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--cool-accent);
    color: white;
    font-size: 10px;
    margin-left: 15px; /* Supprime la marge à gauche */
    margin-top: 3px; /* Légère marge en haut pour aligner avec la première ligne */
    cursor: help;
    flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

/* ===== Correction des tooltips dupliqués ===== */
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: normal;
    max-width: 250px;
    min-width: 120px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    word-wrap: break-word;
    line-height: 1.4;
    text-align: center;
    text-shadow: none;
    font-weight: normal;
    /* S'assurer que seul le contenu du data-tooltip est affiché */
    content: attr(data-tooltip);
}

/* S'assurer que l'icône d'info n'affiche que l'icône */
.info-icon {
    font-size: 10px;
    text-indent: 0;
    overflow: hidden;
}

.info-icon i {
    display: block;
    /* S'assurer que seule l'icône est visible */
    text-indent: 0;
}

/* Supprimer tout texte fantôme */
.info-icon::before, 
.info-icon::after {
    text-indent: 0;
}

/* ===== Nouvelle approche pour les tooltips ===== */
.tooltip-container {
    position: relative;
    display: inline-block;
}

.tooltip-trigger {
    cursor: help;
}

.tooltip-content {
    position: absolute;
    z-index: 1000;
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    pointer-events: none;
}

/* Position left */
.tooltip-left .tooltip-content {
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.tooltip-left .tooltip-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--dark-color);
}

.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}


.header-controls .search-box {
    display: none;
}





/* Style pour l'affichage des ID avec info-bulle */
.id-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.id-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.serial-icon {
    color: var(--cool-accent);
    cursor: help;
    position: relative;
}

.serial-icon:hover {
    color: var(--primary-color);
}

/* Tooltip pour l'icône d'info */
.serial-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(0);
    white-space: nowrap;
    background-color: var(--dark-color);
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    z-index: 10;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* Style pour l'avatar avec info-bulle à droite */
.user-avatar {
    position: relative;
    cursor: pointer;
}

.tooltip-user-details {
    position: absolute;
    left: calc(100% + 15px); /* Positionné à droite de l'avatar avec un écart de 15px */
    top: 50%;               /* Centré verticalement par rapport à l'avatar */
    transform: translateY(-50%);
    min-width: 180px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    padding: 10px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    border: 1px solid var(--border-color);
}

.tooltip-user-details:after {
    content: '';
    position: absolute;
    right: 100%;           /* Flèche à gauche du tooltip */
    top: 50%;              /* Flèche centrée verticalement */
    transform: translateY(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent white transparent transparent; /* Flèche pointant vers la gauche */
}

.user-avatar:hover .tooltip-user-details {
    opacity: 1;
    visibility: visible;
}

/* Gestion des cas où le tooltip sortirait de l'écran */
@media (max-width: 992px) {
    .tooltip-user-details {
        left: auto;
        right: 0;
        top: 100%;
        margin-top: 10px;
        transform: none;
    }
    
    .tooltip-user-details:after {
        right: auto;
        left: 10px;
        top: -16px;
        transform: none;
        border-color: transparent transparent white transparent; /* Flèche pointant vers le haut */
    }
}





/* table.css */
    .table-responsive {
        width: 100%;
    }

    .table-responsive table {
        width: 100%;
        border-collapse: collapse;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 12px;
        border: 1px solid #ddd;
        text-align: left;
        white-space: normal; /* permet les retours à la ligne */
        word-break: break-word; /* casse les mots longs si nécessaire */
        text-overflow: ellipsis;
        max-width: 150px; /* important */
    }
    .table-responsive td,
    .table-responsive th {
        font-size: 0.7rem; /* taille par défaut */
        max-width: 150px;
        min-width: 50px;
    }

 