:root {
    --hyundai-blue: #002C5F;
    --hyundai-light-blue: #0074C8;
    --hyundai-cyan: #00AEEF;
    --hyundai-gray: #F5F5F5;
    --hyundai-dark: #1A1A1A;
    --hyundai-text: #333333;
    --hyundai-warning: #f0ad4e;
    --gradient-primary: linear-gradient(135deg, #002C5F 0%, #0074C8 100%);
    --gradient-secondary: linear-gradient(135deg, #0074C8 0%, #00AEEF 100%);
   
    --shadow-sm: 0 2px 8px rgba(0,44,95,0.08);
    --shadow-md: 0 4px 20px rgba(0,44,95,0.12);
    --shadow-lg: 0 8px 30px rgba(0,44,95,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: var(--hyundai-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation Hyundai Style */
.navbar-hyundai {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-hyundai.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hyundai-blue) !important;
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: var(--hyundai-light-blue);
}

.nav-link {
    color: var(--hyundai-text) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--hyundai-light-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    margin-top: 70px;
    background: var(--gradient-primary);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn-hyundai {
    background: white;
    color: var(--hyundai-blue);
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-hyundai:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    color: var(--hyundai-light-blue);
}

.btn-hyundai-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    margin-left: 1rem;
}

.btn-hyundai-outline:hover {
    background: white;
    color: var(--hyundai-blue);
}

/* Cards */
.card-hyundai {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    box-shadow: 0 10px 18px  darkblue;
}

.card-hyundai:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-hyundai .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.card-hyundai:hover .card-img-top {
    transform: scale(1.05);
}

.card-hyundai .card-body {
    padding: 1.5rem;
}

.card-hyundai .card-title {
    font-weight: 700;
    color: var(--hyundai-blue);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.card-hyundai .badge-type {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
    
}
.card-hyundai .badge-type.badge-location {
    background: var(--hyundai-warning);
    color: #fff; /* ajustez si besoin */
}

.price-tag {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--hyundai-light-blue);
    margin: 1rem 0;
}

/* Sections */
.section-hyundai {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hyundai-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Features */
.feature-box {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
}

.feature-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-icon{
    color: white !important;
}

.feature-box h3 {
    color: var(--hyundai-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Services Page */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
    border: 2px solid transparent;
    
}

.service-card:hover {
    border-color: var(--hyundai-light-blue);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 100px;
    height: 100px;
    background: var(--gray-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--hyundai-light-blue);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-control-hyundai {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control-hyundai:focus {
    border-color: var(--hyundai-light-blue);
    box-shadow: 0 0 0 4px rgba(0,116,200,0.1);
    outline: none;
}

/* Footer */
.footer-hyundai {
    background: var(--hyundai-dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 100px;
}

.footer-hyundai h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-hyundai a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-hyundai a:hover {
    color: var(--hyundai-cyan);
}

.footer-bottom {
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #666;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .btn-hyundai-outline {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Loading */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-hyundai {
    background: white;
    border-left: 4px solid var(--hyundai-light-blue);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Filter Sidebar */
.filter-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.filter-title {
    font-weight: 700;
    color: var(--hyundai-blue);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Admin Dashboard */
.admin-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--hyundai-light-blue);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hyundai-blue);
}

/* Conteneur de prévisualisation des images */
.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    width: 90px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    background: #f8f9fa;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.preview-item:hover {
    transform: scale(1.03);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-item .btn-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
}

.preview-item .btn-remove:hover {
    background: #bb2d3b;
    transform: scale(1.1);
}



/* ============================================================================
   🌓 Toggle Button - Fixed Bottom Right
   ============================================================================ */

#theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 44, 95, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    backdrop-filter: blur(10px);
   
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 30px rgba(0, 116, 200, 0.5);
}

#theme-toggle:active {
    transform: scale(0.95);
}

#theme-toggle i {
    transition: transform 0.3s ease;
}

#theme-toggle.sun-mode i {
    animation: spin-sun 0.5s ease;
}

#theme-toggle.moon-mode i {
    animation: spin-moon 0.5s ease;
}

@keyframes spin-sun {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes spin-moon {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-180deg) scale(1.2); }
    100% { transform: rotate(-360deg) scale(1); }
}

/* Responsive mobile */
@media (max-width: 768px) {
    #theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1rem;
        background-color: black;
    }
}

/* Transition douce pour tous les éléments */
*, *::before, *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* 🌓 DARK MODE TOGGLE */
#theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0074C8 0%, #00AEEF 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: gray;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 44, 95, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    outline: none;
}

#theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 116, 200, 0.6);
}

#theme-toggle:active {
    transform: scale(0.95);
}

#theme-toggle i {
    transition: transform 0.3s ease;
}

#theme-toggle.sun-mode i {
    animation: rotateSun 0.5s ease;
}

#theme-toggle.moon-mode i {
    animation: rotateMoon 0.5s ease;
}

@keyframes rotateSun {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotateMoon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

/* Variables Dark Mode */
[data-theme="dark"] {
    --hyundai-blue: #64b5f6;
    --hyundai-light-blue: #90caf9;
    --hyundai-cyan: #b3e5fc;
    --gradient-primary: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

[data-theme="dark"] body {
    background: #0f0f1a;
    color: #e0e0e0;
}

[data-theme="dark"] .navbar-hyundai {
    background: rgba(26, 26, 46, 0.98) !important;
}

[data-theme="dark"] .card-hyundai,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .stat-card {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .text-muted {
    color: #aaa !important;
}

@media (max-width: 768px) {
    #theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* 📱 Mobile : Déplacer le toggle pour ne pas gêner le hamburger */
@media (max-width: 991px) {
    #theme-toggle {
        bottom: 1rem;      /* Plus bas */       
        top: 70px;
        width: 43px;       /* Légèrement plus petit */
        height: 43px;
        color: yellow;
        position: absolute;
        right: 16px;
        
    }
   .navbar-toggler{
    background-color: gold;
   }
}

/* Référence annonce - Style monospace */
.reference-badge {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.reference-badge i { color: #6c757d; }

/* Mode sombre */
[data-theme="dark"] .reference-badge {
    background: #2d2d44;
    border-color: #444;
    color: #e0e0e0;
}
[data-theme="dark"] .reference-badge i { color: #aaa; }
