/* Bootstrap */
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css");

/* ============================================
   SYSTEME DE THEMES : SOMBRE / CLAIR
   ============================================ */

:root {
    --bg: #f5f5f5;
    --text: #222;
    --card-bg: #ffffff;
    --card-border: rgba(0,0,0,0.08);
    --accent: #4c6fff;
    --accent2: #8f9bff;
    --shadow: rgba(0,0,0,0.15);
	--bs-modal-color:#000;
}
.modal
{
	--bs-modal-color:#000;
}
body.dark {
    --bg: radial-gradient(circle at top, #1b2735 0, #090a0f 55%);
    --text: #f5f5f5;
    --card-bg: rgba(15, 20, 35, 0.9);
    --card-border: rgba(255,255,255,0.12);
    --accent: #4c6fff;
    --accent2: #8f9bff;
    --shadow: rgba(0,0,0,0.55);
}

/* Transition douce entre les thèmes */
body {
    background: var(--bg);
    color: var(--text);
    transition: background .4s ease, color .4s ease;
}

/* ============================================
   TITRES
   ============================================ */

h1, h2, h3, h4, h5 {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color .3s ease;
}

/* ============================================
   CARDS AFFICHES
   ============================================ */

.affiche-card {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--card-border);
    box-shadow: 0 18px 40px var(--shadow);
    backdrop-filter: blur(14px);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .4s ease;
    position: relative;
    overflow: hidden;
}

.affiche-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 24px 60px var(--shadow);
    border-color: var(--accent2);
}

.affiche-card img.img-fluid {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    transition: transform .25s ease, box-shadow .25s ease;
}

.affiche-card:hover img.img-fluid {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.85);
}

/* ============================================
   BADGE PANIER
   ============================================ */

.dans-panier {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #28a745, #5ad66f);
    color: #04110a;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(40,167,69,0.45);
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    box-shadow: 0 10px 25px rgba(76,111,255,0.45);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 14px 32px rgba(76,111,255,0.6);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #5ad66f);
    border: none;
    box-shadow: 0 10px 25px rgba(40,167,69,0.45);
}

.btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 14px 32px rgba(40,167,69,0.6);
}

/* Animation ajout panier */
.btn-add.added {
    transform: scale(1.12);
    box-shadow: 0 14px 32px rgba(40,167,69,0.7);
}

/* ============================================
   PANIER
   ============================================ */

.panier-item {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 12px 30px var(--shadow);
    transition: background .4s ease, border-color .4s ease;
}

/* ============================================
   FORMULAIRE
   ============================================ */

form .form-control, form textarea {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    color: var(--text);
    transition: background .4s ease, color .4s ease, border-color .4s ease;
}

form .form-control:focus, form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(76,111,255,0.35);
}

/* ============================================
   RESPONSIVE
   ============================================ */
.filter-bar {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px var(--shadow);
    backdrop-filter: blur(12px);
    transition: background .4s ease, border-color .4s ease;
}

.filter-bar input,
.filter-bar select {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    transition: background .3s ease, border-color .3s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(76,111,255,0.35);
}
.affiche-card {
    position: relative;
    overflow: hidden;
}

/* Image */
.affiche-img {
    border-radius: 12px;
    width: 100%;
    display: block;
}

/* Surimpression haut (prix + état) */
.overlay-top {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
}

/* Icône panier */
.overlay-cart {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

.overlay-cart:hover {
    transform: scale(1.1);
}

.options_menu button.btn
{
	margin:0px 10px;
}
.overlay-cart a.btn-add-panier, .overlay-cart a.btn-add-modal-panier {
  background: linear-gradient(135deg, #28a745, #5ad66f);
  border: none;
  box-shadow: 0 10px 25px rgba(40,167,69,0.45);
}


/* Bandeau bas (titre + détails) */
.overlay-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -60%;
    background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.7));
    color: #fff;
    padding: 10px 12px;
    transition: bottom .25s ease;
    font-size: 0.85rem;
}

.affiche-card:hover .overlay-bottom {
    bottom: 0;
}

.overlay-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.overlay-details {
    max-height: 80px;
    overflow-y: auto;
    font-size: 0.8rem;
}
.overlay-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

body.mode-grille .affiche-item {  }
body.mode-liste .affiche-item { width: 100%; display: flex; }

.overlay-price {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: #fff;
}

/* Mode liste */
body.mode-liste .affiche-item {
    display: flex !important;
    flex-direction: row;
}

body.mode-liste .affiche-card {
    display: flex;
    flex-direction: row;
    width: 100%;
}

body.mode-liste .affiche-img {
    width: 180px;
    margin-right: 15px;
}

body.mode-liste .overlay-bottom {
    position: static;
    background: none;
    color: var(--text);
    padding: 0;
    bottom: auto;
}
.pagination .page-link {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    transition: all .2s ease;
}
.pagination
{
	flex-wrap: wrap;
}
.pagination .page-item.active .page-link {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent2);
}

.pagination .page-link:hover {
    background: var(--accent2);
    color: #fff;
}
#btnSearchFilters {
    padding: 8px 14px;
    font-size: 1.1rem;
    border-radius: 10px;
}

#btnSearchFilters i {
    font-size: 1.3rem;
}
.toast-panier {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9999;
}
.toast-panier.show {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .overlay-bottom {
        font-size: 0.8rem;
    }
    .affiche-card {
        margin-bottom: 1rem;
    }
    .panier-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
