/* Palette de couleurs RafaArt */
:root {
    --rafa-olive: #6B705C;
    --rafa-gold: #EAD088;
    --rafa-light: #F9F8F6;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --cf-secondary-rgb: 230, 203, 130;
}

/* Typographie et Couleurs générales */
.text-olive {
    color: var(--rafa-olive) !important;
}

.bg-olive {
    background-color: var(--rafa-olive) !important;
}

/* Cartes de Statistiques */
.stat-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.stat-label {
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(107, 112, 92, 0.1);
    display: inline-block;
    padding-bottom: 4px;
}

.stat-value {
    font-size: 2.8rem;
    font-weight: 700;
    color: #333;
}

.stat-underline {
    width: 35px;
    height: 3px;
    background: #eee;
    border-radius: 5px;
}

/* Design des Cartes (Main & Sidebar) */
.custom-card {
    background: #fff;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-soft);
    padding: 0 10px 15px 10px;
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f8f8f8;
}

.card-header-flex h5 {
    font-family: 'Playfair Display', serif;
}

.view-all {
    color: var(--rafa-olive);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Tableau des Commandes */
.table thead th {
    background-color: #fcfcfc;
    color: #bbb;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    border: none;
}

.table td {
    padding: 1rem 0.5rem;
    border-color: #f9f9f9;
}

.order-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
}

/* Badges de Statut */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-confirmee {
    background: #e6f4ea;
    color: #1e7e34;
}

.status-en-attente {
    background: #fff3cd;
    color: #856404;
}

.status-expediee {
    background: #f0f0f0;
    color: #666;
}

.status-annulee {
    background: #fdecea;
    color: #d32f2f;
}

/* Profil & Coups de Coeur */
.avatar-container {
    border: 2px solid var(--rafa-gold);
    border-radius: 50%;
    padding: 3px;
}

.avatar-container.profile-avatar {
    background-color: #6B705C;
    border: 3px solid #EAD088;
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.wish-item {
    transition: background 0.3s;
    cursor: pointer;
}

.wish-item:hover {
    background-color: #f8f8f8;
}

.wish-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

/* Sidebar Menu Design RafaArt */
.dashboard-sidebar-menu {
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
    height: fit-content;
}

.sidebar-item {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-item a {
    color: #6c757d;
    /* Gris par défaut */
    font-weight: 500;
}

/* État Actif (comme sur l'image) */
.sidebar-item.active,
.sidebar-item:hover:not(.active) {
    background-color: #6B705C;
    border-left: 4px solid #EAD088;
}

.sidebar-item.active a {
    color: #ffffff !important;
    /* Texte Blanc */
}

.sidebar-item.active .sidebar-icon svg {
    fill: #ffffff;
    /* Icône Blanche */
}

.sidebar-item:hover a {
    color: #fff !important;
    /* Texte change en olive au survol */
}

/* Déconnexion Hover */
.sidebar-item .text-danger:hover {
    background-color: #fff5f5;
    color: #dc3545 !important;
}

.menu-text {
    font-size: 0.95rem;
}

.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.card-header-flex .btn-icon {
    background-color: #fff;
}

.bg-secondary {
    --cf-bg-opacity: 1;
    background-color: rgba(var(--cf-secondary-rgb), var(--cf-bg-opacity)) !important;
}

.x-small {
    font-size: 0.75rem;
}

.btn-outline-olive {
    color: var(--rafa-olive);
    border-color: var(--rafa-olive);
}

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

.cursor-pointer {
    cursor: pointer;
}

.hover-red:hover {
    color: #dc3545 !important;
}

.pb-50 {
    padding-bottom: 50px !important;
}

.border-transparent {
    border-color: transparent !important;
}

.btn-link:hover {
    color: var(--rafa-olive) !important;
}

/* Effet au survol du bouton voir */
.hover-olive:hover {
    background-color: rgba(107, 112, 92, 0.1);
    color: var(--rafa-olive) !important;
}

/* Style spécifique pour les boutons de pagination */
.btn-white {
    background: #fff;
    color: #666;
}

.filter-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.filter-btn.active {
    border-bottom: 2px solid var(--rafa-olive);
    color: var(--rafa-olive);
    font-weight: bold;
}

/* --- Barre de recherche (Search) plus petite et stylisée --- */
.dataTables_wrapper .dataTables_filter input {
    padding-left: 38px !important;
    padding-right: 12px !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 8px !important;
    height: 34px !important;
    width: 250px !important;
    background-color: #ffffff !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #6B705C !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(107, 112, 92, 0.1) !important;
}

/* --- Sélecteur de nombre de lignes (Length) --- */
.dataTables_wrapper .dataTables_length select {
    height: 32px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    padding: 2px 24px 2px 8px !important;
    border: 1px solid #E5E7EB !important;
}

/* --- Pagination plus petite (Mini boutons) --- */
.dataTables_wrapper .dataTables_paginate {
    padding-top: unset !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    width: fit-content !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 3px 10px !important;
    /* Plus petit */
    font-size: 0.75rem !important;
    /* Texte xs */
    margin-left: 2px !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
    color: #6B7280 !important;
    font-weight: 500 !important;
}

/* Bouton actif (Olive) */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #6B705C !important;
    color: white !important;
    border-color: #6B705C !important;
}

/* Boutons Précédent/Suivant discrets */
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    border: none !important;
    background: transparent !important;
    text-decoration: underline;
    color: #6B705C !important;
}

/* --- Texte info (Affichage de 1 à 5...) --- */
.dataTables_info {
    font-size: 0.75rem !important;
    color: #9CA3AF !important;
    padding-top: 0 !important;
}

/* Alignement global du footer du tableau */
.dataTables_wrapper .flex-row {
    align-items: center;
}

.relative {
    position: relative;
}

.dataTables_filter {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.search-icon-wrapper {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #9CA3AF;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* --- Mise en page Spécifique Détails Commande --- */

/* Conteneurs et cartes */
.rounded-xl {
    border-radius: 12px !important;
}

.bg-form {
    background-color: #e0e0e0 !important;
}

.bg-light-soft {
    background-color: #F9F8F6 !important;
}

/* Barrettes de progression (Timeline) */
.transition-all {
    transition: all 0.5s ease-in-out;
}

/* Cercles d'étapes */
.rounded-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

/* Badge de statut personnalisé */
.badge {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 20px;
    text-transform: capitalize;
}

/* Couleurs de fond pour les alertes discrètes */
.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.border-danger-light {
    border-color: rgba(220, 53, 69, 0.1) !important;
}

/* Hover effects pour les articles */
.hover-zoom {
    transition: transform 0.3s ease;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

.hover-primary:hover {
    color: var(--rafa-olive) !important;
}

/* Séparateur d'articles */
.divide-y>div:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* Typographie display (Playfair) */
.font-display {
    font-family: 'Playfair Display', serif;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.container-width-img {
    width: 120px;
    height: 120px;
}

@media (max-width: 575.5px) {
    .container-width-img {
        width: 100%;
        height: 100%;
    }
}

/* Ajustement pour les petits écrans */
@media (max-width: 768px) {
    .dashboard-content-wrap {
        padding: 10px;
    }

    .position-relative.py-4.px-5 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

.wishlist-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Bouton blanc pour le cœur */
.btn-white {
    background-color: white;
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.aspect-ratio-box {
    overflow: hidden;
    background-color: #f8f9fa;
}

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

.wishlist-toggle {
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.wishlist-toggle:active {
    transform: scale(0.9);
}

.wishlist-toggle.loading {
    opacity: 0.6;
    pointer-events: none;
}