/* =============== SLIDER MARQUES POPULAIRES =============== */
.brand-slider-container {
    width: 100%;
    background: #222;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border-bottom: 2px solid #ff6600;
}

.brand-slider {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    overflow: hidden;
    animation: brandSliderScroll 22s linear infinite;
}

.brand-slider:hover {
    animation-play-state: paused;
}

.brand-slider::-webkit-scrollbar {
    display: none;
}

@keyframes brandSliderScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.brand-slide {
    min-width: 160px;
    padding: 16px 32px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    background: transparent;
    border-right: 1px solid #444;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 0.3s;
}

.brand-slide:last-child {
    border-right: none;
}

.brand-slide:hover {
    background: #ff6600;
    color: #fff;
}

@media (max-width: 768px) {
    .brand-slide {
        min-width: 110px;
        font-size: 0.95rem;
        padding: 10px 12px;
    }
}

/* ===========================
   STYLE GLOBAL
=========================== */
body {
    font-family: 'PT Sans', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* ===========================
   HEADER
=========================== */
.header {
    background-color: #fff;
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    flex-wrap: wrap;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #222;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 10px;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ff6600;
}

/* BARRE DE RECHERCHE */
.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 10px;
}

.search-form {
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 25px;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 25px 0 0 25px;
    outline: none;
    font-size: 1rem;
    transition: border 0.3s ease;
    background: transparent;
}

.search-input:focus {
    border-color: rgba(255, 107, 53, 0.3);
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 1.1rem;
}

.search-btn:hover {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.search-btn:active {
    transform: scale(0.98);
}

.reset-btn {
    background: transparent;
    border: none;
    color: #555;
    margin-left: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

/* NAVIGATION */
.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #ff6600;
    background: rgba(255, 102, 0, 0.08);
    transform: translateY(-2px);
}

.nav-links a:hover::before {
    width: 80%;
}

.nav-links a:active {
    transform: translateY(0);
}

/* Style spécial pour le panier */
#cart-link {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 8px 18px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

#cart-link:hover {
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

#cart-link span {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 900;
    margin-left: 5px;
}


/* 🚪 Déconnexion */
.admin-header {
    text-align: center;
    margin: 20px 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.btn-logout {
    background-color: #e63946;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-logout:hover {
    background-color: #b91d2f;
}

/* 📈 Dashboard */
.dashboard-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 250px;
}

.card h3 {
    margin-bottom: 10px;
    color: #555;
}

.card p {
    font-size: 22px;
}

.revenue {
    color: green;
}

/* 🧾 Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.data-table th {
    background-color: #f5f5f5;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tr:hover {
    background-color: #eef;
}

/* 🟦 Actions */
.btn-action {
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.btn-action.blue {
    background-color: #007bff;
}

.btn-action.green {
    background-color: #28a745;
}

.btn-action.blue:hover {
    background-color: #0056b3;
}

.btn-action.green:hover {
    background-color: #1c7c31;
}

/* 🧩 Produits */
.product-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 20px auto;
}

.product-form input,
.product-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none;

}

.btn-submit {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: #0056b3;
}

.home-products,
.trending-products {
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.products-grid {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 5px;
    margin-top: 20px; */
}

.product-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
}

.product-actions {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.btn-edit {
    color: #007bff;
    text-decoration: none;
}

.btn-delete {
    color: #e63946;
    text-decoration: none;
}

/* Bouton Ajouter au panier */
.add-to-cart {
    background: #ff6600;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.3);
    background: #ff7417;
}

.add-to-cart:hover::before {
    width: 200px;
    height: 200px;
}

.add-to-cart:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 102, 0, 0.2);
}

/* Animation lors de l'ajout au panier */
.add-to-cart.adding {
    animation: addingToCart 0.5s ease;
}

@keyframes addingToCart {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

/* 📱 Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        flex-direction: column;
        align-items: center;
    }

    .product-form {
        width: 90%;
    }

    .products-grid {
        width: 70px;
        /* grid-template-columns: 1fr; */
    }

    .btn-action {
        display: inline-block;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 30px;
        padding: 2px;
        font-size: 10px;
    }
}

/* ===============================
   🏠 Page d'accueil (index.php)
================================= */
.all-product {
    display: flex;
    justify-content: center;
}

.all-product a {
    background-color: rgba(0, 0, 0, 0.15);

}

/* 🎯 Section Hero */
.hero {
    background: url("../images/bg.png") no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 80px 20px;
    width: 100%;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin: 10px 0 25px;
}

.btn-primary {
    background-color: white;
    color: #007bff;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: #f1f1f1;
    color: #0056b3;
}

/* 🛍 Produits tendance */
.section-products {
    padding: 50px 20px;
    text-align: center;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
}

/* 🧩 Grille produits */
.products-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
    gap: 25px;
    padding: 0 20px;
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.product-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 10px 0;
}

.product-desc {
    color: #555;
    font-size: 0.9rem;
    min-height: 40px;
}

.product-price {
    color: #007bff;
    font-weight: bold;
    margin-top: 5px;
}

.product-date {
    display: block;
    color: #777;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.btn-cart {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn-cart:hover {
    background-color: #0056b3;
}

/* 📱 Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .products-grid {
        /* width: 100px !important; */
        grid-template-columns: 1fr;
    }
}

/* ===============================
   🛒 Page panier (cart.php)
================================= */

.cart-section {
    padding: 40px 20px;
    width: 100%;
    margin: 0 auto;
    background-color: #fafafa;
    border-radius: 8px;
}

.cart-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
}

.cart-empty {
    text-align: center;
    font-size: 1.2rem;
    color: gray;
    margin-top: 50px;
}

/* === Tableau du panier === */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.cart-table th {
    background-color: #f5f5f5;
    padding: 12px;
    color: #444;
}

.cart-table td {
    border-top: 1px solid #eee;
    padding: 10px;
    text-align: center;
}

.cart-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

/* === Contrôle de quantité === */
.qty-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    text-decoration: none;
    background-color: #0078ff;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.qty-btn:hover {
    background-color: #005fcc;
}

.btn-delete {
    color: red;
    text-decoration: none;
    font-size: 1.1rem;
}

/* === Total facture === */
.cart-total {
    text-align: right;
    font-size: 1.4rem;
    margin: 20px 0;
    color: #222;
}

.cart-total span {
    color: green;
    font-weight: bold;
}

/* === Formulaire de livraison === */
.cart-validate {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-validate h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.delivery-form input,
.delivery-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.delivery-form textarea {
    min-height: 80px;
    resize: none;
}

.btn-confirm {
    background-color: #28a745;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-confirm:hover {
    background-color: #218838;
}

/* === Responsive === */
@media (max-width: 768px) {

    .cart-table th,
    .cart-table td {
        font-size: 0.85rem;
        padding: 6px;
    }

    .cart-img {
        width: 50px;
        height: 50px;
    }

    .cart-total {
        text-align: center;
    }
}

/* ====================================
   🧾 Page d'inscription administrateur
==================================== */

.register-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #f8fafc;
    padding: 20px;
}

.register-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.register-title {
    text-align: center;
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.register-error {
    background-color: #ffe6e6;
    border: 1px solid #ff4d4d;
    color: #b30000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* === Formulaire === */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.register-form label {
    font-weight: 600;
    color: #444;
}

.register-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.register-form input:focus {
    border-color: #0078ff;
    outline: none;
}

/* === Bouton inscription === */
.btn-register {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
}

.btn-register:hover {
    background-color: #1e7e34;
}

/* === Responsive === */
@media (max-width: 600px) {
    .register-container {
        padding: 30px 20px;
    }

    .register-title {
        font-size: 1.4rem;
    }
}

/* ====================================
   🛍️ Page "Tous les articles"
==================================== */

.products-section {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 40px 20px;
    background-color: #f8fafc;
}

.products-header {
    text-align: center;
    margin-bottom: 30px;
}

.products-title {
    font-size: 2rem;
    color: #333;
}

.products-subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-top: 10px;
}

.products-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 80%;
    max-width: 1200px;
}

/* === Carte produit === */
.product-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}

.product-info {
    padding: 10px 0;
}

.product-name {
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 5px;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    min-height: 40px;
}

.product-price {
    color: #0078ff;
    font-weight: bold;
    margin: 10px 0;
}

.product-date {
    font-size: 0.8rem;
    color: #999;
}

/* === Bouton Ajouter au panier === */
.btn-add-cart {
    display: inline-block;
    background-color: #0078ff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-add-cart:hover {
    background-color: #005fcc;
}

/* === Responsive === */
@media (max-width: 600px) {
    .product-card {
        width: 80%;
        padding: 10px;
    }

    .product-image {
        height: 180px;
    }

    .products-title {
        font-size: 1.6rem;
    }
}

/* ====================================
   🔐 Page de connexion administrateur
==================================== */

.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #f9fafc;
    padding: 20px;
}

.login-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.login-title {
    text-align: center;
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.login-error {
    background-color: #ffe6e6;
    border: 1px solid #ff4d4d;
    color: #b30000;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* === Formulaire === */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form label {
    font-weight: 600;
    color: #444;
}

.login-form input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    border-color: #0078ff;
    outline: none;
}

/* === Bouton de connexion === */
.btn-login {
    background-color: #0078ff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 600;
}

.btn-login:hover {
    background-color: #005fcc;
}

/* === Responsive === */
@media (max-width: 600px) {
    .login-container {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 1.4rem;
    }
}

/* ===============================
   ✏️ Page de mise à jour produit (update.php)
================================= */

.update-section {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

.update-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 600px;
}

.update-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #333;
}

.update-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-form label {
    font-weight: bold;
    color: #444;
}

.update-form input[type="text"],
.update-form input[type="number"],
.update-form input[type="file"],
.update-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.update-form textarea {
    resize: none;
    min-height: 80px;
}

.image-preview {
    text-align: center;
    margin: 10px 0;
}

.image-preview img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    border: 2px solid #eee;
}

/* ✅ Boutons */
.btn-update {
    background-color: #007bff;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-update:hover {
    background-color: #0056b3;
}

.btn-back {
    display: inline-block;
    text-align: center;
    background-color: #6c757d;
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-back:hover {
    background-color: #5a6268;
}

/* ⚠️ Messages d'erreur */
.error-msg {
    color: red;
    text-align: center;
    font-weight: bold;
    margin-top: 40px;
}

/* 📱 Responsive */
@media (max-width: 600px) {
    .update-container {
        padding: 20px;
    }

    .update-title {
        font-size: 1.4rem;
    }
}

/* ===========================
   FOOTER
=========================== */
.footer {
    background-color: #111;
    color: #ddd;
    padding: 20px 10px;
    margin-top: 40px;
    border-top: 3px solid #ff6600;
    width: 100%;
}

.orders-section {
    font-size: 10px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer .brand-name {
    color: #ff6600;
    font-weight: bold;
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .footer {
        padding: 15px;
        font-size: 0.85rem;
    }
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-bar {
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* ====================================
   📌 Barre de navigation admin - Dock macOS Style
==================================== */

.admin-nav {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
    z-index: 999 !important;
    min-width: fit-content !important;
    max-width: 90% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.admin-nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.admin-nav a {
    color: #333 !important;
    text-decoration: none !important;
    padding: 10px 14px !important;
    margin: 0 !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: 12px !important;
    border-left: none !important;
    border-bottom: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    white-space: nowrap !important;
    min-width: 60px !important;
    background: transparent !important;
    transform-origin: center bottom !important;
}

/* Icône/emoji dans le dock */
.admin-nav a .nav-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Texte sous l'icône */
.admin-nav a .nav-text {
    font-size: 0.7rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

/* Effet de zoom au survol (dock macOS) */
.admin-nav a:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-8px) scale(1.15) !important;
    border-left: none !important;
    border-bottom: none !important;
}

.admin-nav a:hover .nav-icon {
    transform: scale(1.2);
}

.admin-nav a:hover .nav-text {
    opacity: 1;
}

/* État actif */
.admin-nav a.active {
    background: rgba(0, 120, 255, 0.15) !important;
    color: #0078ff !important;
    border-left: none !important;
    border-bottom: none !important;
}

.admin-nav a.active .nav-icon {
    transform: scale(1.1);
}

/* Ombres portées pour l'effet 3D */
.admin-nav a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    filter: blur(2px);
}

/* Pour que le contenu principal ne soit pas caché par le menu */
.admin-section,
section.admin-section {
    margin-left: 0;
    padding: 20px;
    padding-bottom: 100px;
    /* Espace pour le dock */
}

/* === Responsive (mobile) === */
@media (max-width: 1024px) {
    .admin-nav {
        bottom: 15px;
        padding: 10px 15px;
        gap: 6px;
        border-radius: 18px;
    }

    .admin-nav a {
        padding: 8px 10px;
        min-width: 50px;
        font-size: 0.75rem;
    }

    .admin-nav a .nav-icon {
        font-size: 1.3rem;
    }

    .admin-nav a .nav-text {
        font-size: 0.65rem;
    }

    .admin-nav a:hover {
        transform: translateY(-6px) scale(1.1);
    }
}

@media (max-width: 768px) {
    .admin-nav {
        bottom: 10px !important;
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
        height: auto !important;
        padding: 8px 12px !important;
        gap: 4px !important;
        border-radius: 16px !important;
        max-width: calc(100% - 20px) !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        scroll-behavior: smooth !important;
    }

    .admin-nav a {
        padding: 8px 8px;
        min-width: 45px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }

    .admin-nav a .nav-icon {
        font-size: 1.2rem;
    }

    .admin-nav a .nav-text {
        font-size: 0.6rem;
        display: none;
        /* Cacher le texte sur très petit écran */
    }

    .admin-nav a:hover {
        transform: translateY(-4px) scale(1.08);
    }

    .admin-section,
    section.admin-section {
        padding-bottom: 90px;
    }
}

@media (max-width: 480px) {
    .admin-nav {
        bottom: 8px;
        left: 8px;
        right: 8px;
        padding: 6px 10px;
        max-width: calc(100% - 16px);
    }

    .admin-nav a {
        min-width: 40px;
        padding: 6px 6px;
    }

    .admin-nav a .nav-icon {
        font-size: 1.1rem;
    }

    .admin-nav a .nav-text {
        display: none;
    }
}

.notif-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff7a00;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-family: 'PT Sans', sans-serif;
    font-size: 16px;
    z-index: 9999;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.product-card {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-card img {
    display: block;
    margin-top: 10px;
    border-radius: 5px;
}

.delete-product-btn {
    background: crimson;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
    transition: background 0.2s;
}

.delete-product-btn:hover {
    background: darkred;
}

/* ✅ Petit toast stylé pour feedback visuel */
.toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #222;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0.9;
    font-size: 15px;
    z-index: 9999;
    animation: fadeInOut 3s ease;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

.toast-msg {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    color: white;
    animation: fadeInOut 4s ease;
    z-index: 9999;
}

/* Footer Styles */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 50px;
}

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

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

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #9e9e9e;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #9e9e9e;
}

.brand-name {
    color: #ff6600;
    font-weight: 600;
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }

    .footer-sections {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h3 {
        font-size: 1.1rem;
    }

    .footer-section ul li {
        margin-bottom: 10px;
    }
    
    /* Header responsive pour mobile */
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        position: relative;
        padding: 10px 15px;
        gap: 10px;
    }
    
    /* Logo et barre de recherche sur la même ligne sur mobile */
    .logo-soldivoire {
        position: relative !important;
        order: 0;
        margin: 0;
        flex-shrink: 0;
    }
    
    .logo-soldivoire .brand-name {
        font-size: 1em !important;
    }
    
    .logo-soldivoire .badge {
        padding: 6px 12px !important;
    }
    
    .search-bar {
        flex: 1;
        min-width: 200px;
        margin: 0;
        order: 1;
    }
    
    .search-form {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }
    
    .search-input {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .search-btn {
        padding: 10px 18px;
        font-size: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
        gap: 8px;
        order: 2;
        margin-top: 5px;
        flex-wrap: wrap;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    #cart-link {
        padding: 6px 12px;
    }
}

.toast-msg.success {
    background-color: #28a745;
    /* vert */
}

.toast-msg.error {
    background-color: #dc3545;
    /* rouge */
}

.toast-msg.info {
    background-color: #007bff;
    /* bleu */
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

.search-section {
    margin: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.search_form {
    width: 100%;
    margin: auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}