/* CoreUI Custom CSS */

:root {
    --p151-background: #1c1c1c;
    --p151-primary-color: #ffffff;
    --p151-secondary-color: #f747f2;
    --p151-tertiary-color: #a12c9d;
    --p151-gradient-primary: linear-gradient(135deg, #f747f2 0%, #a855f7 100%);
    --p151-gradient-secondary: linear-gradient(135deg, #a12c9d 0%, #7a1f75 100%);
    --p151-gradient-info: linear-gradient(135deg, #f747f2 0%, #a855f7 100%);
    --p151-gradient-warning: linear-gradient(135deg, #f75600 0%, #e04400 100%);
    --p151-gradient-success: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    --default-text-color: #ededed;
    --menu-border-color: transparent;
    --header-border-color: transparent;
    --default-border: #2a2a2a;
    --primary-color: var(--p151-secondary-color);
    --primary-border: var(--p151-tertiary-color);
}

/* ========================================
   BADGE V1 (DORÉ)
   ======================================== */
.badge-v1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    color: #000;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* ========================================
   FOND VIDÉO CATALOGUE
   ======================================== */
.catalog-body-with-video {
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.catalog-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.catalog-bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

/* Tout le contenu du card-body doit être au-dessus de la vidéo */
.catalog-body-with-video > *:not(.catalog-bg-video) {
    position: relative;
    z-index: 2;
}

/* Animation de pulsation pour les notifications */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.notification-pulse {
    animation: pulse 1.5s infinite;
}

/* Styles pour le forum */
.forum_categories td {
    max-width: 300px;
}

.forum_categories td.align-middle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Permettre à la colonne de description de s'étendre */
.forum_categories td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

/* Styles pour les guides */
.guide-category-img {
    height: 325px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.guide-links .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
    transition: all 0.2s ease;
}

.guide-links .list-group-item:first-child {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.guide-links .list-group-item:last-child {
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.guide-links .list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.card:hover .guide-category-img {
    transform: scale(1.05);
}

.guide-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
}

.guide-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.guide-content table, .guide-content th, .guide-content td {
    border: 1px solid #ddd;
}

.guide-content th, .guide-content td {
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.guide-content th {
    background-color: #f2f2f2;
}

.sortable-categories tr, .sortable-guides tr {
    cursor: move;
}

.ui-sortable-helper {
    display: table;
    background-color: #f8f9fa;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ui-state-highlight {
    height: 3em;
    line-height: 3em;
    background-color: #fffde7;
    border: 1px dashed #ffd54f;
}

/* Styles pour la wishlist */
.wishlist-card {
    transition: all 0.3s ease;
}

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

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

.wishlist-card .card-body {
    display: flex;
    flex-direction: column;
}

.wishlist-card .btn-danger.position-absolute {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.wishlist-card .btn-danger.position-absolute:hover {
    opacity: 1;
}

/* Styles pour les cases à cocher */
.wishlist-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-check {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    padding: 2px;
}

/* Style pour le bouton de suppression multiple */
#delete-selected-btn, #delete-selected-bottom-btn {
    transition: all 0.3s ease;
}

/* Styles pour le formulaire de filtrage */
.filter-form {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-form label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
}

.filter-form .form-control,
.filter-form .form-select {
    border-color: #ced4da;
}

.filter-form .form-control:focus,
.filter-form .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-form .input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

@media (max-width: 767.98px) {
    .filter-form .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .filter-form .d-flex {
        flex-direction: column;
    }
    
    .filter-form .me-2 {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
}

/* Styles pour les tableaux - contenu verticalement centré */
table.table tbody.align-middle td,
table.table tbody td,
table.table th {
    vertical-align: middle;
}

/* Styles pour les fonctionnalités */
.row-equal-height {
    display: flex;
    flex-wrap: wrap;
}

.row-equal-height > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.row-equal-height .card {
    height: 100%;
}

.feature-image-container {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
}

.feature-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.feature-image-background {
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    transition: transform 0.3s ease;
}

.feature-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-image-overlay-text {
    color: white;
    font-size: 1.2rem;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
}

.feature-image-link:hover .feature-image-background {
    transform: scale(1.05);
}

.feature-image-link:hover .feature-image-overlay {
    opacity: 1;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    font-size: 3rem;
    color: #ced4da;
}

.feature-description-preview {
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-detail-image {
    max-height: 400px;
    object-fit: contain;
}

.admin-feature-thumbnail {
    max-width: 100px;
    max-height: 60px;
    object-fit: cover;
}

.admin-feature-image-preview {
    max-width: 300px;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem;
}

/* Styles de pagination */
svg.w-5.h-5 {
    width: 16px;
}

.pagination span[aria-current="page"] {
    background-color: #321fdb !important;
    color: white !important;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--p151-background);
}

.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.py-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Compatibilité Bootstrap */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1140px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.justify-content-center {
    justify-content: center !important;
}

.col-md-8, .col-md-6, .col-md-4 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .text-md-end {
        text-align: right !important;
    }
    .offset-md-4 {
        margin-left: 33.333333%;
    }
}

.card {
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header:first-child {
    border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn {
    display: inline-block;
    font-weight: 400;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background: var(--p151-gradient-primary);
    border: none;
    box-shadow: 0 4px 12px rgba(247, 71, 242, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 71, 242, 0.4);
}

.text-white {
    color: #fff !important;
}

.bg-primary {
    background-color: #c1c1c1 !important;
}

.bg-info {
    background-color: #3399ff !important;
}

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

.bg-opacity-25 {
    --bs-bg-opacity: 0.25;
    background-color: rgba(var(--bs-bg-rgb), var(--bs-bg-opacity)) !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.ps-3 {
    padding-left: 1rem !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.h-100 {
    height: 100% !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

/* Form styles */
.form-check {
    position: relative;
    display: block;
    padding-left: 1.25rem;
}

.form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-left: -1.25rem;
}

.form-check-label {
    margin-bottom: 0;
}

.col-form-label {
    padding-top: calc(0.375rem + 1px);
    padding-bottom: calc(0.375rem + 1px);
    margin-bottom: 0;
    font-size: inherit;
    line-height: 1.5;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 80%;
    color: #e55353;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

.is-invalid {
    border-color: #e55353;
}

/* Alert styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #1c6e37;
    background-color: #d7f3e3;
    border-color: #c7eed8;
}

/* Dropdown styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    text-decoration: none;
}

.dropdown-item:hover, .dropdown-item:focus {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}

.d-none {
    display: none !important;
}

/* Utility classes */
.ms-auto {
    margin-left: auto !important;
}

.me-auto {
    margin-right: auto !important;
}
button.sidebar-toggler.d-flex.align-items-center.justify-content-center {
    color: white;
}
.sidebar-toggler::before {
    display: none;
}
a.sidebar-toggler.d-flex.align-items-center.justify-content-center {
    color: white;
    text-decoration: none;
}

/* Augmenter la hauteur du textarea de description dans les pages de transactions */
#description {
    min-height: 150px;
    height: auto;
}

@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        margin-left: 13%;
        margin-right: 0;
        width: 87%;
        max-width: unset;
    }
}
@media (min-width: 1200px) and (max-width: 1399px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        margin-left: 20%;
        margin-right: 0;
        width: 82%;
        max-width: unset;
    }
}

.badge.mb-2 {
    text-decoration: none;
}
.btn-danger {
    background-color: #ec1313;
    color: white;
}

.btn-info,
a.btn.btn-info.btn-sm {
    background: var(--p151-gradient-info) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(247, 71, 242, 0.3);
    transition: all 0.3s ease;
}

.btn-info:hover,
a.btn.btn-info.btn-sm:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 71, 242, 0.4);
    color: white !important;
}

.btn-warning,
a.btn.btn-warning.btn-sm.me-2,
a.btn.btn-warning.btn-sm {
    background: var(--p151-gradient-warning) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(247, 86, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-warning:hover,
a.btn.btn-warning.btn-sm.me-2:hover,
a.btn.btn-warning.btn-sm:hover {
    background: linear-gradient(135deg, #ff6a00 0%, #f54d00 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 86, 0, 0.4);
    color: white !important;
}

.btn-success,
a.btn.btn-success.btn-sm {
    background: var(--p151-gradient-success) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.btn-success:hover,
a.btn.btn-success.btn-sm:hover {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
    color: white !important;
}

.feature-detail-image {
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
    max-width: 100%;
}
img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.header.header-sticky {
    z-index: 9999;
}
ul.sidebar-nav {
    padding-top: 67px;
}

.titre_site_appname {
    text-decoration: none;
    color: #c171f7;
}
.modal.show {
    z-index: 999999;
}
.feature-image-background {
    height: 190px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
a.nav-link.text-danger {
    background: rgba(229, 83, 83, 1);
    color: white !important;
}


ul.header-nav.ms-auto {
    margin-bottom: unset;
    vertical-align: middle;
    list-style: none;
    position: relative;
    top: 17px;
}

a.nav-link.text-danger {
    padding: 4px;
}

textarea.form-control {
    min-height: 110px;
}

.simplebar-content {
    background: var(--p151-background);
}
.app-sidebar .side-menu__item {
    color: var(--p151-primary-color);
}
.app-sidebar .side-menu__icon {
    color: var(--p151-secondary-color);
}
.app-sidebar .slide__category {
    color: #fff; 
}
.app-header, .app-sidebar .main-sidebar-header, .card, .card-header, .card-body, .card-footer, .bg-white {
    background: var(--p151-background)!important;
}
.app-sidebar {
    border-inline-end: var(--menu-border-color);
}
.table {
    --bs-table-accent-bg: #262626;
    --bs-table-striped-bg: #353535;
    --bs-table-hover-bg: rgb(159, 46, 135);
}
.border-primary {
    border-color: var(--p151-secondary-color) !important;
}
.form-control, .form-select {
    background-color: #303030;
    border: 1px solid #424242;
    color: white;
}
.form-control:focus {
    background-color: #3b3b3b;
    border: 1px solid #4f4f4f;
}
.btn-secondary {
    background: var(--p151-gradient-secondary) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(161, 44, 157, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #b935b5 0%, #8e2686 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(161, 44, 157, 0.4);
}
.btn-outline-secondary {
    background-color: transparent;
    border-color: #6c757d;
    color: #b8b8b8;
}
.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}
.btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
}
.btn-outline-primary {
    background-color: transparent;
    border-color: var(--p151-secondary-color);
    color: var(--p151-secondary-color);
}
.btn-outline-primary:hover {
    background-color: var(--p151-secondary-color);
    border-color: var(--p151-secondary-color);
    color: #fff;
}
.btn-outline-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(247, 71, 242, 0.5);
}
.btn-outline-info {
    background-color: transparent;
    border-color: #17a2b8;
    color: #17a2b8;
}
.btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}
.btn-outline-info:focus {
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
}
.filter-form.mb-4 {
    background: var(--p151-background);
}
option {
    background: #303030 !important;
    color: white !important;
}
.form-check {
    background-color: transparent;
}

i.fe.fe-user.text-black {
    color: white !important;
}
.d-flex.justify-content-between.align-items-center.list-group-item.list-group-item-action.py-2 {
    background: #1c1c1c;
    color: white;
}
.guide-unread {
    background-color: var(--p151-secondary-color) !important;
}
.bg-light {
    background-color: #2e2e2e !important;
}
.card-header.py-3.bg-light {
    background: #2e2e2e !important;
}
.card-body.d-flex.flex-column {
    background: #2e2e2e !important;
}
.input-group-text {
    border-color: #3b3a3b;
    background-color: #3b3a3b;
    color: #fff;
}
.alert-info {
    background-color: rgb(228 17 212 / 10%);
    color: var(--p151-secondary-color);
}
.btn-light,
a.btn.btn-sm.btn-light {
    background: var(--p151-gradient-primary) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(247, 71, 242, 0.3);
    transition: all 0.3s ease;
}

.btn-light:hover,
a.btn.btn-sm.btn-light:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 71, 242, 0.4);
    color: white !important;
}
.alert-success {
    color: white;
    background-color: var(--p151-secondary-color);
    border-color: var(--p151-tertiary-color);
}
.modal-content {
    background-color: var(--p151-background);
    color: white;
}
.modal-header {
    background-color: var(--p151-background);
    color: white;
}
.modal-body {
    background-color: var(--p151-background);
    color: white;
}
.app-sidebar {
    background-color: var(--p151-background);
}
.news-content > p > a, .news-content > a {
    text-decoration: underline;
}

/* Rendre le tableau des transactions complètement visible */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile : encore plus petit */
@media (max-width: 767px) {
    .table-responsive table {
        zoom: 0.5;
        font-size: 0.75rem;
    }
}

/* Tablettes et petits écrans */
@media (min-width: 768px) and (max-width: 1399px) {
    .table-responsive table {
        zoom: 0.65;
    }
}

/* Écrans moyens */
@media (min-width: 1400px) and (max-width: 1599px) {
    .table-responsive table {
        zoom: 0.9;
    }
}

/* Grands écrans */
@media (min-width: 1600px) {
    .table-responsive table {
        zoom: 1;
    }
}

/* Styles pour les inputs de type file (thème P151) */
input[type="file"].form-control {
    background-color: #303030;
    border: 1px solid #424242;
    color: #ffffff;
    padding: 0.5rem;
}

input[type="file"].form-control:hover {
    background-color: #3b3b3b;
    border-color: var(--p151-secondary-color);
}

input[type="file"].form-control:focus {
    background-color: #3b3b3b;
    border-color: var(--p151-secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(247, 71, 242, 0.25);
}

/* Styliser le bouton "Choisir un fichier" */
input[type="file"].form-control::file-selector-button {
    background: var(--p151-gradient-primary);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    margin-right: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

input[type="file"].form-control::file-selector-button:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(247, 71, 242, 0.3);
}

/* Pour les navigateurs WebKit (Chrome, Safari, Edge) */
input[type="file"].form-control::-webkit-file-upload-button {
    background: var(--p151-gradient-primary);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    margin-right: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

input[type="file"].form-control::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(247, 71, 242, 0.3);
}

button.btn.btn-outline-danger.align-middle {
    background-color: red !important;
    color: white;
}

/* ========================================
   CATALOGUE DES CARTES CARDMARKET
   ======================================== */

/* Filtres - Colonne de gauche */
.catalog-filters {
    background: #2c2c2c;
    border: 1px solid #444;
}

.catalog-filters .card-header {
    background: #1e1e1e;
    border-bottom: 1px solid #444;
}

.catalog-filters .card-header h5 {
    color: #fff;
}

.catalog-filters .card-body {
    background: #2c2c2c;
}

.catalog-filters .search-section {
    border-bottom: 1px solid #444;
}

.catalog-filters .search-label {
    color: #fff;
    font-size: 0.85rem;
}

.catalog-filters #search {
    background: #1e1e1e;
    border-color: #444;
    color: #fff;
    font-size: 0.8rem;
}

.catalog-filters #search:focus {
    background: #1e1e1e !important;
    border-color: #667eea !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Accordéon des expansions */
.catalog-accordion-item {
    background: #2c2c2c;
    border-color: #444;
}

.catalog-accordion-button {
    background: #1e1e1e !important;
    color: #fff;
    border-color: #444;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.catalog-accordion-button:not(.collapsed) {
    background: #1e1e1e !important;
}

.catalog-accordion-button:hover:not(.collapsed) {
    background: #1e1e1e !important;
}

.catalog-accordion-button.collapsed:hover {
    background: #333 !important;
}

.catalog-accordion-button.collapsed::after {
    filter: invert(1);
}

.catalog-accordion-badge {
    font-size: 0.7rem;
}

/* Liste des expansions */
.catalog-expansion-list .list-group-item {
    background: #2c2c2c;
    color: #fff;
    border-color: #444;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    word-wrap: break-word;
    white-space: normal;
}

.catalog-expansion-list .list-group-item.active {
    background: #667eea;
}

.catalog-expansion-list .list-group-item:hover:not(.active) {
    background: #333 !important;
}

.catalog-expansion-badge {
    font-size: 0.65rem;
}

/* Colonne de droite - Cartes */
.catalog-main {
    background: #2c2c2c;
    border: 1px solid #444;
}

.catalog-main .card-header {
    background: #1e1e1e;
    border-bottom: 1px solid #444;
}

.catalog-main .card-header h4 {
    color: #fff;
}

.catalog-main .card-header small {
    color: #aaa;
}

/* Formulaire de filtres de recherche et prix */
#cardSearchForm {
    background: #2c2c2c;
}

#cardSearchForm .form-label {
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

#cardSearchForm .form-control {
    background: #1e1e1e;
    border-color: #444;
    color: #fff;
    font-size: 0.9rem;
}

#cardSearchForm .form-control:focus {
    background: #1e1e1e;
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

#cardSearchForm .btn-primary {
    background: var(--p151-gradient-primary) !important;
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(247, 71, 242, 0.3);
    transition: all 0.3s ease;
}

#cardSearchForm .btn-primary:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 71, 242, 0.4);
}

#cardSearchForm .btn-secondary {
    background: #444;
    border: none;
    color: white;
}

#cardSearchForm .btn-secondary:hover {
    background: #555;
}

/* Cartes individuelles */
.catalog-card {
    background: #1e1e1e;
    border: 1px solid #444;
}

.catalog-card-img {
    height: 320px;
    object-fit: contain;
    padding: 10px;
}

.catalog-card-img-placeholder {
    height: 320px;
    background: #000;
}

.catalog-card-img-placeholder i {
    font-size: 3rem;
    color: #555;
}

.catalog-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.catalog-card-title-truncate {
    /* Force le texte sur une seule ligne avec ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Photos d'expansion Pokecardex */
.pokecardex-expansion-photo {
    height: 120px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    background: transparent;
}

.pokecardex-expansion-photo-header {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-right: 15px;
    border-radius: 6px;
    background: transparent;
}

.pokecardex-photo-container {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    text-align: center;
}

.catalog-card-expansion {
    font-size: 0.7rem;
    color: #888;
}

.catalog-card-price {
    font-size: 0.8rem;
}

.catalog-card-price-na {
    font-size: 0.7rem;
}

/* Tableau des prix par marketplace */
.catalog-price-table {
    margin-bottom: 0;
    background: transparent;
}

.catalog-price-table td {
    border: none;
    padding: 0.25rem 0.3rem;
    color: #fff;
    font-size: 0.75rem;
}

.catalog-price-table tr {
    background: rgba(255, 255, 255, 0.05);
}

.catalog-price-table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.catalog-price-icon {
    width: 30px;
    text-align: left;
}

.catalog-price-value {
    font-weight: 600;
    color: #4caf50;
    text-align: center;
}

.catalog-price-link {
    color: #4caf50;
    text-decoration: none;
}

.catalog-price-link:hover {
    color: #66bb6a;
    text-decoration: underline;
}

.catalog-price-trend {
    width: 60px;
    text-align: right;
}

.catalog-price-trend-content {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.catalog-price-trend-icon {
    font-size: 1.2rem;
}

.catalog-price-trend-percentage {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Icône des plateformes pour les cartes */
.icon-platform-for-card {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: transform 0.2s;
}

.icon-platform-for-card:hover {
    transform: scale(1.2);
}
span.badge.bg-secondary.float-end.catalog-expansion-badge, span.badge.bg-primary.ms-2.catalog-accordion-badge {
    background: #000000 !important;
}
span.badge.bg-secondary.catalog-expansion-badge {
    background: black !important;
}
.accordion-button:after {
    background-color: #000000 !important;
}
/* ========================================
   BOUTONS DE TRI DES EXPANSIONS
   ======================================== */
.sort-btn {
    font-size: 12px;
    padding: 2px 6px;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transition: all 0.2s;
}

.sort-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

.sort-btn.btn-light {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
}

.sort-btn i {
    font-size: 14px;
}

/* ========================================
   BOUTON REFRESH IMAGE (ADMIN UNIQUEMENT)
   ======================================== */
.btn-refresh-image {
    background: var(--p151-gradient-primary) !important;
    border: none;
    color: white;
    padding: 2px 6px;
    font-size: 0.75rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(247, 71, 242, 0.3);
    flex-shrink: 0;
}

.btn-refresh-image:hover {
    background: linear-gradient(135deg, #ff52ff 0%, #b965ff 100%) !important;
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(247, 71, 242, 0.4);
    color: white;
}

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

/* ========================================
   MODAL RÉGÉNÉRATION EN MASSE
   ======================================== */
#bulkRefreshModal .modal-content {
    background-color: #2c2c2c;
    color: #fff;
    border: 1px solid #444;
}

#bulkRefreshModal .modal-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #444;
}

#bulkRefreshModal .modal-body {
    background-color: #2c2c2c;
}

#bulkRefreshModal .modal-footer {
    background-color: #1e1e1e;
    border-top: 1px solid #444;
}

#bulkRefreshModal .list-group-item {
    background-color: #1e1e1e;
    color: #fff;
    border-color: #444;
}

#bulkRefreshModal .list-group-item:hover {
    background-color: #252525;
}

#bulkRefreshModal .badge {
    background-color: #667eea !important;
}

#bulkRefreshModal .text-muted {
    color: #aaa !important;
}

#bulkRefreshModal .alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* ========================================
   RESPONSIVE DESIGN - CATALOGUE
   ======================================== */
/* Pour les écrans jusqu'à 1366px : afficher 4 cartes par ligne au lieu de 6 */
@media (min-width: 992px) and (max-width: 2000px) {
    #cards-container .col-lg-2 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Pour les très petits écrans (mobile) : afficher 2 cartes par ligne */
@media (max-width: 576px) {
    #cards-container .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Pour les tablettes (768px - 991px) : garder 4 cartes par ligne */
@media (min-width: 768px) and (max-width: 991px) {
    #cards-container .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}
input.form-check-input.expansion-toggle {
    position: relative;
}
.form-control, .form-select {
    background-color: #1e1e1e;
}
select#expansionSelect, select#sortBy {
    height: 36px;
}
button.btn.btn-sm.btn-outline-danger.ms-2 {
    background: red;
    color: white;
}
span.badge.bg-primary.d-inline-flex.align-items-center {
    background: #000000 !important;
}
input.form-check-input.expansion-checkbox {
    position: relative;
}
button#tab-months, button#tab-years, button#tab-days {
    background: #212122;
}
.nav-link.active {
    background: var(--p151-gradient-primary)!important;
}

/* ========================================
   EFFET 3D HOLOGRAPHIQUE SUR LES CARTES
   ======================================== */
.card-3d-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.card-3d-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.card-3d-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0.375rem;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transform-style: preserve-3d;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 15%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0) 50%);
    transition: 0.3s ease-out;
}

img.card-3d-image.img-fluid.rounded {
    max-height: 380px;
}
.catalog-card-img {
    background: #1c1c1c;
}
select#platformChoice, select#expansionSelect	 {
    height: 36px !important;
}

.app-sidebar, .card {
    box-shadow: unset;
}

/* ========================================
   BOUTON YOUTUBE TUTO
   ======================================== */
.btn-youtube-tuto {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

.accordion-body.p-3 {
    background: #262626;
}
.bg-secondary {
    background-color: rgb(89 26 87) !important;
}
