/* Base styles */
:root {
    --bg-color: #121212;
    --card-bg: #1E1E1E;
    --text-color: #FFFFFF;
    --text-muted: #888888;
    --border-color: #333333;
    --hover-color: #2A2A2A;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    background-color: var(--card-bg);
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    margin: 5px 15px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background-color: var(--hover-color);
    transform: translateX(5px);
    padding: 10px 15px;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-item:hover::after {
    transform: translateX(100%);
}

.nav-item.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.nav-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 30px;
}

/* Cards */
.card {
    background-color: #2d2d2d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #3d3d3d;
    color: #ffffff;
}

.card-body {
    color: #ffffff;
}

/* Data Table */
.data-table-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.data-table th {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.data-row:hover {
    background-color: var(--hover-color);
}

.data-row::after {
    display: none;
}

.data-row:hover::after {
    display: none;
}

/* Animation séquentielle pour les lignes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Appliquer un délai d'animation différent pour chaque ligne */
.data-row:nth-child(1) { animation-delay: 0.1s; }
.data-row:nth-child(2) { animation-delay: 0.2s; }
.data-row:nth-child(3) { animation-delay: 0.3s; }
.data-row:nth-child(4) { animation-delay: 0.4s; }
.data-row:nth-child(5) { animation-delay: 0.5s; }
.data-row:nth-child(6) { animation-delay: 0.6s; }
.data-row:nth-child(7) { animation-delay: 0.7s; }
.data-row:nth-child(8) { animation-delay: 0.8s; }
.data-row:nth-child(9) { animation-delay: 0.9s; }
.data-row:nth-child(10) { animation-delay: 1s; }

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 5px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-2px);
}

.edit-btn:hover {
    color: #FFFFFF;
}

.delete-btn:hover {
    color: #FF4444;
}

/* Forms */
.form-control {
    background-color: #3d3d3d;
    border: 1px solid #4d4d4d;
    color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #4d4d4d;
    border-color: #5d5d5d;
    color: #ffffff;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Search Box */
.search-box {
    position: relative;
    width: auto;
}

.search-box input {
    padding: 8px 15px 8px 35px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #333;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    min-width: 200px;
    font-size: 1rem;
}

.search-box input:focus {
    border-color: var(--text-color);
    outline: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-link {
    padding: 8px 15px;
    border-radius: 8px;
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.page-link.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

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

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

/* Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
    border: none;
}

.alert-success {
    background-color: #28a745;
    color: #ffffff;
}

.alert-danger {
    background-color: #dc3545;
    color: #ffffff;
}

/* Data Table Header */
.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-title {
    color: var(--text-color);
    font-size: 24px;
    margin: 0;
}

.data-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Boutons d'action */
.btn-add {
    background-color: #000000;
    color: #FFFFFF;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #333;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
    text-decoration: none;
}

.btn-add i {
    font-size: 1rem;
}

/* Badges */
.role-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.role-user {
    background-color: var(--text-muted);
    color: var(--text-color);
}

/* Forms */
.custom-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

/* Vue détaillée */
.detail-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.section-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    background-color: var(--hover-color);
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-value {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Category Badge */
.category-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Logo */
.logo {
    color: var(--text-color);
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

/* Search Box spécifique */
.search-box {
    position: relative;
    width: auto;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-box input {
    padding: 8px 15px 8px 35px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #333;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    min-width: 200px;
    font-size: 1rem;
}

/* Pagination Info */
.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Action buttons in tables */
.actions {
    white-space: nowrap;
    text-align: right;
}

.action-btn {
    color: var(--text-color) !important;
}

.action-btn:hover {
    color: var(--text-color) !important;
    opacity: 0.8;
}

.action-btn.edit-btn:hover {
    color: var(--text-color) !important;
}

.action-btn.delete-btn:hover {
    color: #FF4444 !important;
}

.action-btn .fa-eye:hover {
    color: var(--text-color) !important;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #1E1E1E, #2A2A2A);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.stat-card:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    background-color: #000000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: rotate(360deg);
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Charts Container */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.chart-title {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Style du bouton de connexion */
.login-btn {
    background-color: #000000;
    color: #FFFFFF;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Modification du template de connexion */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: linear-gradient(145deg, #1E1E1E, #2A2A2A);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.login-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.8s ease;
}

.login-container:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

/* Style pour le conteneur des boutons de formulaire */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

/* Style commun pour les boutons de formulaire */
.form-btn {
    flex: 1;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 45px;
}

/* Bouton Créer */
.btn-create {
    background-color: #000000;
    color: #FFFFFF;
}

/* Bouton Annuler */
.btn-cancel {
    background-color: transparent;
    color: #FFFFFF;
    border: 1px solid #333;
}

/* Hover effects */
.btn-create:hover, .btn-cancel:hover {
    transform: translateY(-2px);
    color: #FFFFFF;
    text-decoration: none;
}

.btn-create:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Styles pour les galeries photos et vidéos */
.current-photos,
.current-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.photo-item,
.video-item {
    position: relative;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.photo-item label,
.video-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 5px;
}

video {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 5px;
}

/* Styles pour la galerie dans la vue détaillée */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--card-bg);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style pour l'agrandissement des images au clic */
.gallery-item.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.gallery-item.expanded img {
    object-fit: contain;
}

/* Navbar */
.navbar {
    background-color: #000000;
}

.navbar-dark .navbar-nav .nav-link {
    color: #ffffff;
}

/* Tables */
.table {
    color: #ffffff;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #2d2d2d;
}

.table th {
    background-color: #1a1a1a;
    border-bottom: 2px solid #3d3d3d;
}

.table td {
    border-top: 1px solid #3d3d3d;
}

/* Badges */
.badge {
    font-size: 0.9em;
    padding: 0.4em 0.8em;
}

/* Buttons */
.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000000;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
}

/* Modals */
.modal-content {
    background-color: #2d2d2d;
    color: #ffffff;
}

.modal-header {
    border-bottom: 1px solid #3d3d3d;
}

.modal-footer {
    border-top: 1px solid #3d3d3d;
}

/* Links */
a {
    color: #007bff;
}

a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* Status badges */
.badge.bg-success {
    background-color: #28a745 !important;
    color: #ffffff;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff;
} 