:root {
    /* Palette inspirée du logo Lucky Wheels */
    --bg-primary: #111111;      /* Noir profond */
    --bg-secondary: #1c1c1c;    /* Noir plus clair */
    --bg-card: #222222;         /* Gris très foncé */
    --gold-primary: #D4AF37;    /* Or principal */
    --gold-light: #FFD700;      /* Or clair */
    --gold-dark: #B8860B;       /* Or foncé */
    --text-primary: #FFFFFF;    /* Blanc */
    --text-secondary: #E5E5E5;  /* Gris clair */
    --success: #00A86B;         /* Vert foncé élégant */
    --danger: #DC143C;          /* Rouge foncé élégant */
    --border: rgba(212, 175, 55, 0.3); /* Or transparent */
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

.navbar {
    background: var(--bg-secondary);
    border-top: 2px solid var(--gold-primary);
    border-bottom: 2px solid var(--gold-primary);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--gold-primary);
}

.nav-link:hover svg {
    transform: translateY(-2px);
    color: var(--gold-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--gold-primary);
}

.nav-link.active::after {
    width: 80%;
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

/* Responsive navbar */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .navbar {
        position: relative;
        padding: 0.5rem 0;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
    }

    .logout-btn {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    color: var(--gold-primary);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--gold-primary), transparent);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.vehicle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
}

.vehicle-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

.vehicle-card:hover .vehicle-image {
    transform: scale(1.05);
}

.vehicle-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.vehicle-info {
    padding: 1.5rem;
    position: relative;
}

.vehicle-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.vehicle-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.vehicle-performance {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
}

.vehicle-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Style spécifique pour le dépôt-vente */
.depot-vente-card .seller-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 8px;
}

.depot-vente-card .seller {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.depot-vente-card .seller span {
    color: var(--gold-primary);
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.85);
    margin-top: 4rem;
    border-top: 3px solid var(--gold-primary);
    color: var(--text-primary);
}

footer a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--gold-light);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Animation du prix lors du survol */
.vehicle-card:hover .price {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .main-logo {
        width: 150px;
        height: 150px;
    }

    .brand-name {
        font-size: 2rem;
    }

    .vehicles-grid {
        grid-template-columns: 1fr;
    }
}

/* Style du header avec background */
.main-header {
    text-align: center;
    padding: 3rem 0 1rem 0; /* Réduit le padding bottom */
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
                      url('/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-bottom: none; /* Enlève la bordure du header */
    margin-bottom: 0; /* Enlève la marge du bas */
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(212, 175, 55, 0.1),
        rgba(212, 175, 55, 0.1) 2px,
        transparent 2px,
        transparent 10px
    );
    pointer-events: none;
}

.logo-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.main-logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.brand-name {
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8),
                 -1px -1px 0 var(--gold-primary),
                 1px -1px 0 var(--gold-primary),
                 -1px 1px 0 var(--gold-primary),
                 1px 1px 0 var(--gold-primary);
    margin: 0;
    padding: 0;
}

/* Style du menu des catégories */
.categories-container {
    margin: 2rem 0 4rem 0;
}

.categories-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    perspective: 1000px;
}

.category-btn {
    background: none;
    color: var(--text-primary);
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(200, 162, 124, 0.3);
}

.category-btn::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.category-btn::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transform: translateX(-50%);
    transition: width 0.3s ease 0.1s;
}

.category-btn:hover {
    color: white;
    transform: translateY(-3px);
}

.category-btn:hover::before {
    width: 100%;
}

.category-btn:hover::after {
    width: 70%;
}

.category-btn.active {
    color: white;
    text-shadow: 
        0 0 10px var(--gold-primary),
        0 0 20px var(--gold-primary);
}

.category-btn.active::before {
    width: 100%;
    height: 3px;
    box-shadow: 0 0 10px var(--gold-primary);
}

.category-btn.active::after {
    width: 70%;
    height: 3px;
    box-shadow: 0 0 10px var(--text-primary);
}

/* Effet de rotation 3D au survol */
.categories-menu:hover .category-btn:not(:hover) {
    opacity: 0.7;
    transform: rotateX(10deg);
}

/* Animation pour le bouton actif */
@keyframes pulseGlow {
    0% { text-shadow: 0 0 10px var(--gold-primary); }
    50% { text-shadow: 0 0 20px var(--gold-primary), 0 0 30px var(--text-primary); }
    100% { text-shadow: 0 0 10px var(--gold-primary); }
}

.category-btn.active {
    animation: pulseGlow 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-menu {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        perspective: none;
    }

    .category-btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .categories-menu:hover .category-btn:not(:hover) {
        opacity: 1;
        transform: none;
    }
}

/* Boutons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--gold-primary);
    color: var(--bg-primary);
}

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

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

/* Grilles */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Status badges */
.status-available {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-primary);
}

.status-sold {
    background-color: var(--danger);
    color: var(--text-primary);
}

/* Formulaires */
.form-row {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

input, select, textarea {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
    outline: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
}

.modal-title {
    color: var(--gold-primary);
    border-bottom: 1px solid var(--border);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--gold-primary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

.vehicle-card .vehicle-image-container {
    position: relative;
}

.vehicle-card.sold .vehicle-image {
    filter: grayscale(50%);
    opacity: 0.8;
}

.status-badge.status-sold {
    background: var(--danger);
    color: var(--text-primary);
}

/* Style amélioré pour le modal d'aperçu d'image */
.image-preview-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.image-preview-modal.active {
    opacity: 1;
}

.image-preview-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
    background: transparent;
    box-shadow: none;
    width: 1200px; /* Taille fixe pour le conteneur */
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    margin: 0 auto;
}

.image-preview-modal.active .image-preview-content {
    transform: scale(1);
    opacity: 1;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 675px; /* Ratio 16:9 pour 1200px de large */
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: -40px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--gold-primary);
    transform: scale(1.1);
}

/* Responsive pour le modal */
@media (max-width: 1400px) {
    .image-preview-content {
        width: 1000px;
    }
    
    .modal-image-container {
        height: 562px; /* Ratio 16:9 pour 1000px de large */
    }
}

@media (max-width: 1024px) {
    .image-preview-content {
        width: 800px;
    }
    
    .modal-image-container {
        height: 450px; /* Ratio 16:9 pour 800px de large */
    }
}

@media (max-width: 768px) {
    .image-preview-content {
        width: 95vw;
    }
    
    .modal-image-container {
        height: calc(95vw * 9/16); /* Maintient le ratio 16:9 */
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
    }
}

.vehicle-image-container {
    cursor: pointer;
}

.image-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.85);
    padding: 0.5rem;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview-modal:hover .image-controls {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.control-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.control-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn svg {
    width: 20px;
    height: 20px;
}

.control-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.control-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.copy-url-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(5px);
    z-index: 2;
}

.vehicle-image-container:hover .copy-url-btn {
    opacity: 1;
    transform: translateY(0);
}

.copy-url-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.copy-url-btn:hover {
    background: rgba(212, 175, 55, 0.3);
}

.copy-url-btn:hover svg {
    color: var(--gold-primary);
}

.copy-url-btn::after {
    content: "Copier l'URL de l'image";
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-url-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

.announcement-bar {
    background: linear-gradient(135deg, #1a1f2e, #242b3d);
    color: #e2e8f0;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--gold-primary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.announcement-bar span {
    color: var(--gold-primary);
    font-weight: 700;
} 