/* ===================================
   LaBonneOccasion CLONE - STYLES GLOBAUX
   =================================== */

:root {
    --primary-color: #f8c901;
    --primary-hover: #ffff00;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* ===================================
   CONTENEUR PRINCIPAL
   =================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ===================================
   CARDS & PANELS
   =================================== */

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: var(--light-gray);
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: var(--light-gray);
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
}

/* ===================================
   BOUTONS
   =================================== */

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-success:hover:not(:disabled) {
    background: #229954;
}

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

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

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

.btn-warning:hover:not(:disabled) {
    background: #d68910;
}

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

.btn-info:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: var(--dark-gray);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===================================
   FORMULAIRES
   =================================== */

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-label.required::after {
    content: " *";
    color: var(--danger-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-control:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-select {
    display: block;
    width: 100%;
    padding: 10px 40px 10px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: var(--transition);
    appearance: none;
}

.form-select:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.invalid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--danger-color);
}

.valid-feedback {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--success-color);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--dark-gray);
}

/* ===================================
   UPLOAD D'IMAGES
   =================================== */

.image-upload-area {
    border: 2px dashed var(--medium-gray);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    background: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.image-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.05);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 2px solid var(--medium-gray);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item.primary {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.image-preview-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-preview-actions .btn {
    padding: 5px 10px;
    font-size: 12px;
}

.primary-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* ===================================
   ALERTES
   =================================== */

.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-dismissible {
    position: relative;
    padding-right: 45px;
}

.alert-dismissible .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* ===================================
   BADGES & LABELS
   =================================== */

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    border-radius: 12px;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

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

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-secondary {
    background-color: var(--dark-gray);
    color: white;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

/* ===================================
   TABLEAUX
   =================================== */

.table {
    width: 100%;
    margin-bottom: 20px;
    background-color: white;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.table thead th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--medium-gray);
}

.table tbody tr:hover {
    background-color: var(--light-gray);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 5px;
    justify-content: center;
    margin: 30px 0;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--secondary-color);
    background-color: white;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===================================
   MODALES
   =================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background-color: white;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-gray);
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger-color);
}

/* ===================================
   FILTRES & RECHERCHE
   =================================== */

.filter-bar {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 40px;
}

.search-box::before {
    content: "🔍";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

/* ===================================
   LISTINGS / ANNONCES
   =================================== */

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.listing-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
}

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

.listing-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.listing-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.listing-favorite {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.listing-favorite:hover {
    transform: scale(1.1);
}

.listing-favorite.active {
    color: var(--danger-color);
}

.listing-content {
    padding: 15px;
}

.listing-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    /*color: var(--secondary-color);*/
}

.listing-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--dark-gray);
}

.listing-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0 0 0;
}

.listing-location {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 5px;
}


.listing-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #facc15, transparent);
    margin: 15px 0;
}


/* ===================================
   STATISTIQUES / DASHBOARD
   =================================== */

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.primary {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.stat-icon.info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.stat-icon.warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.stat-content h3 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary-color);
}

.stat-content p {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: var(--dark-gray);
}

/* ===================================
   TABS
   =================================== */

.nav-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 2px solid var(--medium-gray);
}

.nav-tabs .nav-item {
    margin-bottom: -2px;
}

.nav-tabs .nav-link {
    display: block;
    padding: 12px 25px;
    text-decoration: none;
    color: var(--dark-gray);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

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

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    padding: 20px 0;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .listing-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 20px auto;
    }
}

/* ===================================
   UTILITIES
   =================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-muted { color: var(--dark-gray); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.bg-light { background-color: var(--light-gray); }
.bg-white { background-color: white; }

.rounded { border-radius: var(--border-radius); }
.shadow { box-shadow: var(--box-shadow); }


.logo_header{
    width: 90px;
    max-width: 100%;
}



/* Navbar Modern */
.navbar-modern {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* Logo */
.navbar-logo .logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f8c901;
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-logo .logo-link i {
    font-size: 2rem;
}

.navbar-logo .logo-link span {
    color: #1f2937;
}

/* Menu */
.navbar-menu {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-item:hover {
    background: #232323;
    color: #f8c901;
}

.nav-item.active {
    background: #000;
    color: #f8c901;
}

.nav-item i {
    font-size: 1.1rem;
}

/* Actions */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1f2937;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-account:hover {
    border-color: #f8c901;
    color: #f8c901;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #232323;
    color: #f8c901;
}

.btn-cta-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #f8c901;
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    /*box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);*/
}

.btn-cta-header:hover {
    transform: translateY(-2px);
    /*box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);*/
    color: #f8c901;
    background-color: #000;
}

/* Mobile toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1f2937;
    cursor: pointer;
}

/* Mobile nav */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav-item:hover {
    background: #f3f4f6;
    color: #f8c901;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-menu,
    .navbar-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar-logo .logo-link span {
        display: none;
    }
}

footer.text-white.py-4{
    background-color: #000;
}

.modal-backdrop.fade.show {
    z-index: 0;
}