/* Styles personnalisés pour BeeCRM Événementiel by Clicavis */

/* Variables CSS pour couleurs custom - Palette sobre inspirée du logo BeeCRM */
:root {
    --color-primary: #2C2C2C;      /* Gris anthracite (sobre, professionnel) */
    --color-secondary: #F5F5F5;    /* Gris très clair (fond) */
    --color-dark: #1A1A1A;         /* Noir profond */
    --color-accent: #F7B500;       /* Jaune or du logo (touches) */
    --color-accent-light: #FFC933; /* Jaune clair (hover) */
    --color-neutral: #6B7280;      /* Gris neutre (textes secondaires) */
}

/* Classes utilitaires Tailwind custom */
.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-dark { background-color: var(--color-dark) !important; }
.bg-accent { background-color: var(--color-accent) !important; }

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-dark { color: var(--color-dark) !important; }
.text-accent { color: var(--color-accent) !important; }

.border-primary { border-color: var(--color-primary) !important; }
.border-secondary { border-color: var(--color-secondary) !important; }
.border-dark { border-color: var(--color-dark) !important; }
.border-accent { border-color: var(--color-accent) !important; }

.hover\:bg-primary:hover { background-color: var(--color-primary) !important; }
.hover\:text-primary:hover { color: var(--color-primary) !important; }

.from-primary { --tw-gradient-from: var(--color-primary) !important; }
.to-blue-700 { --tw-gradient-to: #1d4ed8 !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 🔧 FIX v6.2.10.1 - Force le scroll */
html, body {
    overflow-y: auto !important;
    overflow-x: auto !important; /* 🆕 v6.2.10.14 - Permettre scroll horizontal pour Planning */
    height: auto !important;
    min-height: 100vh;
}

body {
    font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Navigation active */
.nav-item.active {
    background-color: var(--color-primary);
    border-left: 4px solid var(--color-accent);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Cards */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Boutons personnalisés */
.btn-primary {
    background-color: #007BFF;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #F7B500;
    color: #343A40;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-warning:hover {
    background-color: #d99d00;
}

/* Badges de statut */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: #F8F9FA;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #343A40;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Formulaires */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #343A40;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Planning Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #dee2e6;
    border: 1px solid #dee2e6;
}

.calendar-cell {
    background: white;
    padding: 0.5rem;
    min-height: 100px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calendar-cell:hover {
    background-color: #f8f9fa;
}

.calendar-event {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-event:hover {
    transform: scale(1.02);
}

.event-confirme {
    background-color: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.event-option {
    background-color: #fff3cd;
    color: #856404;
    border-left: 3px solid #F7B500;
}

.event-attente {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.event-maintenance {
    background-color: #e2e3e5;
    color: #383d41;
    border-left: 3px solid #6c757d;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: #343A40;
    color: white;
    text-align: center;
    border-radius: 0.375rem;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 0.875rem;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007BFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications Toast */
.toast {
    position: fixed;
    top: 5rem;
    right: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 60;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #F7B500;
}

.toast-info {
    border-left: 4px solid #007BFF;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .calendar-cell {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .modal-content {
        max-width: 95%;
    }
}

/* Print Styles */
@media print {
    #sidebar, nav, footer, .no-print {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
    }
}
