/* ============================================
   📦 FICHIER PRINCIPAL - STYLE.CSS
   Structure organisée et nettoyée
   ============================================ */

/* ==========================================
   1. RÉINITIALISATION & VARIABLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #1a365d;
    --primary-light: #1e293b;
    --accent: #f59e0b;
    --accent-hover: #e58e0b;
    --blue: #0ea5e9;
    --blue-dark: #0284c7;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #475569;
    --bg-light: #f8f8f8;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
.site-header {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 10px 24px;
}

.site-header .container {
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Logo --- */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 10px;
}

.logo:hover h2 {
    transform: scale(1.05);
}

.logo h2 {
    font-size: 44px;
    font-weight: bold;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
}

.logo .dex {
    color: var(--blue);
}

.logo .shop {
    color: var(--white);
}

.logo .icon {
    max-width: 300px;
    height: 80px;
    border-radius: 50%;
}

/* --- Navigation --- */
.site-nav {
    position: relative;
}

.site-nav:hover .menu span:nth-child(2) {
    width: 100%;
}

.menu {
    width: 60px;
    height: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    line-height: 5px;
}

.menu span {
    height: 5px;
    margin-bottom: 5px;
    background-color: var(--accent);
    transition: 0.4s;
}

.menu span:first-child,
.menu span:last-child {
    width: 100%;
}

.menu span:nth-child(2) {
    width: 60%;
}

.site-nav ul {
    list-style: none;
    padding: 15px;
    margin: 0;
    position: absolute;
    top: calc(100% + 20px);
    right: 0;
    min-width: 240px;
    display: none;
    background-color: var(--primary-light);
    box-shadow: 1px 1px 4px #111;
    border: 1px solid var(--accent);
    border-radius: 0 0 8px 8px;
    z-index: 100;
}

.site-nav:hover ul {
    display: block;
}

.site-nav ul::before {
    content: '';
    border-width: 25px;
    border-style: solid;
    border-color: transparent transparent var(--primary-light) transparent;
    position: absolute;
    top: -49px;
    right: 1px;
}

.site-nav ul li a {
    display: block;
    padding: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #e2e8f0;
    transition: 0.4s;
}

.site-nav ul li a:hover {
    padding-left: 30px;
    font-weight: 700;
    font-size: 23px;
    color: #fbbf24;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.site-nav ul li:not(:last-child) a {
    border-bottom: 1px solid var(--accent);
}

/* --- User Profile Badge --- */
.user-profile-li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background-color: rgba(14, 165, 233, 0.15);
    border-radius: 30px;
    width: fit-content;
}

.profile-icon {
    font-size: 1.5rem;
    color: var(--blue);
}

.username-text {
    color: #e2e8f0;
    font-weight: bold;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.logout-link {
    color: #ef4444 !important;
    font-size: 0.9rem;
}

.logout-link:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* ==========================================
   3. BOUTONS & ÉLÉMENTS COMMUNS
   ========================================== */
.btn-store {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: 0.4s;
    border: none;
    cursor: pointer;
}

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

.btn-store-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

.btn-store-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-store-outline:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-6px);
}

.btn-store-secondary {
    background-color: #e2e8f0;
    color: var(--primary-light);
}

.btn-store-secondary:hover {
    background-color: var(--primary-light);
    color: #e2e8f0;
}

/* --- Bouton animé (Promo) --- */
.btn-animated {
    position: relative;
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.3rem;
    color: var(--white);
    background-color: #0f172a;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.3s;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350%;
    height: 350%;
    background: conic-gradient(transparent, transparent, transparent, var(--accent));
    transform: translate(-50%, -50%);
    animation: rotate-border 3s linear infinite;
    z-index: -2;
}

.btn-animated::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--primary-light);
    border-radius: 6px;
    z-index: -1;
}

.btn-animated:hover {
    color: var(--accent);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
}

.btn-animated:hover::before {
    animation-duration: 1.5s;
}

@keyframes rotate-border {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ==========================================
   4. PAGE PRINCIPALE (INDEX)
   ========================================== */
.big-title {
    text-align: center;
    padding-top: 30px;
    margin-bottom: 30px;
    font-size: 80px;
    font-weight: 700;
    letter-spacing: normal;
    color: var(--primary-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title {
    text-align: center;
    margin: 30px auto;
    font-size: 32px;
    font-weight: 700;
}

/* --- Hero --- */
.hero {
    text-align: center;
}

.hero-content h1{
    padding-top:30px;
    margin-bottom: 30px;
    font-size: 120px;
    font-weight: 400;
    letter-spacing: -10px;
    color: #1a365d;
}
.hero-content p {
    font-size: 24px;
    margin: 20px auto;
    text-align: center;
    width: 60%;
    color: #334155;
}

/* --- Grille des produits --- */
.container-pc {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding: 20px;
    margin: 10px 10px 50px 10px;
    gap: 20px;
}

/* ==========================================
   CARTES PRODUITS - UNIFORMISÉES
   ========================================== */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 420px; /* Hauteur minimale fixe */
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-hover);
    z-index: 2;
}

.product-card img {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 5px;
    padding: 5px;
    transition: transform 0.3s ease;
}

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

.product-card h3 {
    font-size: 1.1rem;
    margin: 10px 0 5px 0;
    color: var(--text-main);
    text-align: center;
    min-height: 50px; /* Hauteur fixe pour le titre */
    display: flex;
    align-items: center;
}

.product-card .description {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin: 5px 0 10px 0;
    min-height: 60px; /* Hauteur fixe pour la description */
    display: flex;
    align-items: center;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 3; /* Limiter à 3 lignes */
    -webkit-box-orient: vertical;
}

.product-card .price {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    margin-top: auto; /* Pousse le prix vers le bas */
    margin-bottom: 5px;
}

.product-card .condition-badge {
    margin: 5px 0;
}

/* --- Boutons uniformisés --- */
.product-card .btn-store-outline,
.product-card .btn-add-cart {
    width: 80%;
    text-align: center;
    margin-top: 5px;
    padding: 10px 16px;
}

.product-card .btn-store-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.4s;
}

.product-card .btn-store-outline:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-6px);
}

.product-card .btn-add-cart {
    background-color: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.product-card .btn-add-cart:hover {
    background-color: var(--blue-dark);
    transform: translateY(-3px);
}

/* --- Badges de condition --- */
.condition-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
    width: 120px;
    margin: 5px auto;
}

.condition-badge.new {
    color: #d97706;
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.condition-badge.refurbished {
    color: var(--accent);
    background-color: rgba(245, 158, 11, 0.25);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.condition-badge.used {
    color: #92400e;
    background-color: rgba(245, 185, 11, 0.05);
    border: 1px solid rgba(245, 185, 11, 0.1);
}

/* --- Bouton "Ajouter au panier" --- */
.btn-add-cart {
    background-color: var(--blue);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 8px;
    width: 55%;
}

.btn-add-cart:hover {
    background-color: var(--blue-dark);
    transform: translateY(-3px);
}

/* --- Pagination --- */
.lien-other-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 30px auto;
    gap: 10px;
}

.page-number,
.naviger {
    color: var(--text-main);
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    transition: 0.4s;
    min-width: 60px;
    text-align: center;
}

.page-number:hover,
.naviger:hover {
    background-color: var(--primary-dark);
    color: #e2e8f0;
    transform: scale(1.15);
}

.current-page {
    background-color: var(--primary-dark);
    color: #e2e8f0;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    min-width: 60px;
    text-align: center;
    font-weight: bold;
    pointer-events: none;
}

/* ==========================================
   5. SECTION À PROPOS
   ========================================== */
.about-us {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.about-us p {
    text-align: center;
    margin: 10px auto;
    font-size: 20px;
    width: 60%;
}

.about {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 20px;
    gap: 20px;
}

.about .card {
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about .card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: var(--shadow-hover);
}

.about .card img {
    width: 60px;
    height: 60px;
    margin: 10px;
}

/* ==========================================
   6. SECTION CONTACT
   ========================================== */
.contact-head {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 30px auto;
}

.contact-head p {
    text-align: center;
    margin: 0px auto;
    font-size: 24px;
    width: 60%;
}

.contact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    padding: 20px;
    background-color: var(--primary-dark);
    margin: 30px auto 0 auto;
    gap: 20px;
}

.contact .col {
    padding-left: 10px;
    color: #DDDDDD;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.7;
}

.contact h2 {
    color: var(--white);
    text-align: left;
    margin: 10px 0px;
    font-size: 20px;
}

.contact ul {
    list-style: none;
    padding: 0;
}

.contact li {
    margin-bottom: 5px;
}

.contact a {
    text-decoration: none;
    color: #DDDDDD;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact a:hover {
    color: var(--accent);
}

/* ==========================================
   7. PAGE PRODUITS (PRODUCTS)
   ========================================== */
main .big-title {
    font-size: 120px;
    font-weight: 400;
    letter-spacing: -10px;
}

main h2 {
    text-align: left;
    margin: 10px auto;
    font-size: 20px;
    color: var(--primary-dark);
}

/* ==========================================
   8. FORMULAIRES (Connexion, Inscription)
   ========================================== */
.form-container,
.form-container-login {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 70px auto 60px auto;
    width: 40%;
    min-height: 500px;
}

.form-container form,
.form-container-login form {
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-container form:hover,
.form-container-login form:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: var(--shadow-hover);
}

.form-container form h3,
.form-container-login form h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-main);
}

.form-container form input,
.form-container-login form input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    height: 48px;
    border-radius: 8px;
    color: var(--text-main);
    width: 100%;
    margin: 8px 0;
    transition: all 0.3s;
}

.form-container form input:focus,
.form-container-login form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.form-container form .btn,
.form-container-login form .btn {
    padding: 14px 24px;
    margin-top: 24px;
    height: 52px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    color: var(--white);
    width: 100%;
    background-color: var(--accent);
    cursor: pointer;
    transition: background-color 0.3s;
}

.form-container form .btn:hover,
.form-container-login form .btn:hover {
    background-color: var(--accent-hover);
}

.form-container p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 15px;
}

.form-container p a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.form-container p a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================
   9. PAGE CONTACT (Formulaire)
   ========================================== */
.contact-page-wrapper {
    padding: 60px 0;
    min-height: 80vh;
}

.contact-header h1 {
    font-size: 3rem;
    color: var(--text-main);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: start;
}

.contact-info-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #334155;
    color: white;
    height: 100%;
}

.contact-info-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.info-text {
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    background: rgba(14, 165, 233, 0.1);
    padding: 12px;
    border-radius: 50%;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 50px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.contact-form-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #334155;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-form-card .input-group {
    margin-bottom: 20px;
    width: 100%;
}

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

.contact-form-card .box {
    width: 100%;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #334155;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.contact-form-card .box:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.contact-form-card textarea.box {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    padding: 0;
    height: 60px;
    width: 100%;
    background-color: var(--accent);
    color: white !important;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
    border-radius: 10px;
    border: none;
    transition: background-color 0.3s, transform 0.3s;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

/* ==========================================
   10. DASHBOARD (Administration)
   ========================================== */
.admin-dashboard-wrapper {
    padding: 30px 0;
    background-color: var(--bg-light);
    min-height: 80vh;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-top-bar h1 {
    font-size: 2rem;
    color: var(--text-main);
}

.admin-top-bar h1 i {
    color: var(--blue);
}

.btn-admin-logout {
    padding: 10px 25px;
    background-color: #ef4444;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-admin-logout:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

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

.stat-box {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-blue {
    background: rgba(14, 165, 233, 0.15);
    color: var(--blue);
}

.icon-orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.stat-info .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

/* --- Onglets de navigation --- */
.admin-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: var(--blue);
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

/* --- Contenu des onglets --- */
.admin-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Tableau des produits --- */
.admin-card-table {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.admin-card-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-card-table th {
    text-align: left;
    padding: 12px 10px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.admin-card-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.table-product-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.table-product-item .p-title {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
}

.table-product-item .p-title:hover {
    color: var(--blue);
}

.table-product-item .p-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.p-price {
    font-weight: 700;
    color: var(--text-main);
}

.p-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.p-badge.new {
    background: #e0f2fe;
    color: #0284c7;
}

.p-badge.refurbished {
    background: #fef3c7;
    color: #d97706;
}

.p-badge.used {
    background: #f1f5f9;
    color: #475569;
}

.stock-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: #dcfce7;
    color: #16a34a;
}

.stock-badge.out-stock {
    background: #fee2e2;
    color: #dc2626;
}

/* --- Actions (Boutons) --- */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-action.edit {
    background: rgba(14, 165, 233, 0.1);
    color: var(--blue);
}

.btn-action.edit:hover {
    background: var(--blue);
    color: white;
}

.btn-action.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.btn-action.delete:hover {
    background: #ef4444;
    color: white;
}

/* --- Formulaire d'ajout --- */
.admin-form-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 15px;
    flex: 1;
}

.form-group.flex-1 {
    flex: 1;
}

.form-group.flex-2 {
    flex: 2;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
    background: var(--bg-card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.specs-section-title {
    margin: 20px 0 15px 0;
    color: var(--text-main);
}

.specs-input-grid .form-row {
    margin-bottom: 10px;
}

.btn-admin-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.btn-admin-submit:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

/* --- Gestion des utilisateurs --- */
.table-header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-create-user {
    padding: 8px 20px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-create-user:hover {
    background: var(--blue-dark);
}

.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-badge.admin-role {
    background: #fef3c7;
    color: #d97706;
}

.role-badge.user-role {
    background: #e0f2fe;
    color: #0284c7;
}

/* --- Modal --- */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.admin-modal-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-head h3 {
    color: var(--text-main);
}

.modal-close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-footer-btns {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    padding: 10px 25px;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save {
    padding: 10px 25px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-save:hover {
    background: var(--blue-dark);
}

/* ==========================================
   11. PANIER (SHOPPING CART)
   ========================================== */
.floating-cart {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.floating-cart:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.6);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--primary-dark);
    transition: transform 0.3s;
}

/* --- Sidebar du panier --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(3px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

#sidebar {
    position: fixed;
    top: 0;
    right: -550px;
    width: 100%;
    max-width: 550px;
    height: 100vh;
    background: #f1f5f9;
    z-index: 2000;
    padding: 0;
    color: var(--text-main);
    overflow-y: auto;
    transition: right 0.3s ease;
}

#sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 15px;
    background: white;
    border-bottom: 2px solid var(--accent);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    padding: 0;
}

.close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.cart-title {
    padding: 20px;
    margin: 0 5px 10px 5px;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 600;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f1f5f9;
}

/* --- Éléments du panier --- */
.cart-product {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.product-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.product-row img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #f1f5f9;
}

.product-info {
    flex: 1;
}

.product-name {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.product-price {
    color: var(--text-light);
    font-weight: bold;
    font-size: 1rem;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    position: static;
}

.qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.qty-value {
    color: var(--text-main);
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 40px;
    text-align: center;
}

.price-delete {
    display: flex;
    align-items: center;
    gap: 20px;
}

.item-total-price {
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
}

.delete-icon {
    color: #ef4444;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.delete-icon:hover {
    background: #fee2e2;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.empty-cart i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
    color: #94a3b8;
}

/* --- Total et formulaire --- */
.summary-totals {
    background: white;
    padding: 5px;
    margin: 20px 0;
    border-radius: 10px;
    border: 2px solid var(--accent);
}

.total-line {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    width: 90%;
    padding: 15px 10px;
    margin: 0 auto;
}

#finalTotal {
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 800;
}

.sidebar-footer-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
    border: 2px solid var(--border-color);
}

.form-title {
    color: var(--text-main);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.form-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-input::placeholder {
    color: #94a3b8;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    position: static;
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* --- Notification d'ajout --- */
.add-notification {
    position: fixed;
    bottom: 120px;
    left: 40px;
    background: #22c55e;
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    z-index: 1002;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   12. FOOTER
   ========================================== */
footer {
    background-color: #0f172a;
    color: #DDDDDD;
    text-align: center;
    padding: 15px;
    width: 100%;
}

/* ==========================================
   13. BOUTON SCROLL TO TOP
   ========================================== */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-dark);
    opacity: 0.5;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: transform 0.3s, background-color 0.3s;
}

#scrollTopBtn:hover {
    opacity: 0.8;
    transform: translateY(-5px);
}

/* ==========================================
   14. FEATURES & TESTIMONIALS
   ========================================== */
.features-section {
    padding: 60px 20px;
    border-top: 1px solid #334155;
    margin-top: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item {
    padding: 20px;
    transition: transform 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    display: inline-block;
}

.testimonials-section {
    padding: 80px 0;
    background-color: #fefefe;
    margin-top: 60px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stars {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.testimonial-card p {
    color: var(--text-main);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}

.testimonial-card h4 {
    color: #0f172a;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* --- Promo Banner --- */
.promo-banner {
    margin: 80px auto 100px auto;  /* ←增加了 المسافة السفلية */
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 60px;
    text-align: center;
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.15);
    max-width: 1320px;  /* ← لجعله متمركزاً بشكل أفضل */
}

.promo-content h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 10px;
}

.promo-content p {
    font-size: 1.2rem;
    color: #d1d5db;
    margin-bottom: 30px;
}

/* ==========================================
   15. FLASH MESSAGES
   ========================================== */
.flash-message {
    text-align: center;
    margin: 20px auto;
    padding: 12px 20px;
    border-radius: 8px;
    max-width: 600px;
}

.flash-message.success {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--blue);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.flash-message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================
   16. RESPONSIVE - TOUS LES ÉCRANS
   ========================================== */
/* ==========================================
   RESPONSIVE - UNIQUEMENT LES CORRECTIONS
   ========================================== */

/* --- 1. Écrans très larges (>= 1400px) --- */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
        margin: 80 auto;
        padding: 60px;
    }

    /* --- Centrage du contenu --- */
    .hero-content p,
    .about-us p,
    .contact-head p {
        width: 50% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* --- Grille ABOUT en 4 colonnes bien réparties --- */
    .about {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        justify-items: center;
    }

    .about .card {
        width: 100%;
        max-width: 300px;
    }

    /* --- Grille CONTACT en 5 colonnes --- */
    .contact {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        justify-items: center;
    }

    .contact .col {
        width: 100%;
        align-items: flex-start;
    }

    /* --- Produits en 4 colonnes --- */
    .container-pc {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    /* --- Uniformisation des cartes produits --- */
    .product-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        min-height: 420px;
    }

    .product-card .price {
        margin-top: auto;
    }

    .product-card .btn-add-cart,
    .product-card .btn-store-outline {
        width: 80%;
        margin-top: 8px;
        text-align: center;
    }

    /* --- Centrage de "View All Products" --- */
    .btn-view-all {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 30px auto;
    }
}

/* --- 2. Écrans moyens (992px - 1399px) --- */
@media (min-width: 992px) and (max-width: 1399px) {
    .container {
        max-width: 1140px;
        margin: 0 auto;
        padding: 0 15px;
    }

    .hero-content p,
    .about-us p,
    .contact-head p {
        width: 60% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .about {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        justify-items: center;
    }

    .about .card {
        width: 100%;
        max-width: 280px;
    }

    .contact {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        justify-items: center;
    }

    .contact .col {
        width: 100%;
        align-items: flex-start;
    }

    .container-pc {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* --- Uniformisation des cartes --- */
    .product-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        min-height: 400px;
    }

    .product-card .price {
        margin-top: auto;
    }

    .product-card .btn-add-cart,
    .product-card .btn-store-outline {
        width: 80%;
        margin-top: 8px;
        text-align: center;
    }

    .btn-view-all {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 30px auto;
    }
}

/* --- 3. Tablettes (768px - 991px) --- */
@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* --- Ajustement des titres (garder la taille d'origine) --- */
    .big-title {
        font-size: 60px !important;
    }

    main .big-title {
        font-size: 80px !important;
        letter-spacing: -5px !important;
    }

    .hero-content p,
    .about-us p,
    .contact-head p {
        width: 80% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .about {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        justify-items: center;
    }

    .about .card {
        width: 100%;
        max-width: 320px;
    }

    .contact {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        justify-items: center;
    }

    .contact .col {
        width: 100%;
        align-items: flex-start;
    }

    .container-pc {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        min-height: 380px;
    }

    .product-card .price {
        margin-top: auto;
    }

    .product-card .btn-add-cart,
    .product-card .btn-store-outline {
        width: 80%;
        margin-top: 8px;
        text-align: center;
    }

    .btn-view-all {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 30px auto;
    }

    .form-container,
    .form-container-login {
        width: 60%;
    }
}

/* --- 4. Mobiles (max-width: 767px) --- */
@media (max-width: 767px) {
    /* Header */
    .site-header .container {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .logo h2 {
        font-size: 28px !important;
    }

    .logo .icon {
        max-width: 200px;
        height: 50px;
    }

    .menu {
        width: 40px;
        height: 35px;
    }

    .menu span {
        height: 4px;
        margin-bottom: 4px;
    }

    .site-nav ul {
        right: -15px;
        min-width: 200px;
    }

    .site-nav ul::before {
        right: 15px;
    }

    /* --- Garder la taille originale des titres --- */
    .big-title {
        font-size: 40px !important;
        letter-spacing: 0px !important;
        line-height: 1.2;
        padding-top: 20px !important;
    }

    main .big-title {
        font-size: 50px !important;
        letter-spacing: 0 !important;
    }

    .section-title {
        font-size: 26px !important;
    }

    /* Hero */
    .hero-content p {
        width: 90% !important;
        font-size: 18px;
    }

    .hero-content a {
        font-size: 16px;
        padding: 8px 16px;
    }

    /* --- Grille produits --- */
    .container-pc {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding: 10px;
        margin: 0 5px 20px 5px;
        gap: 15px;
    }

    .product-card {
        padding: 15px;
        min-height: 340px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    .product-card img {
        height: 150px;
        max-width: 150px;
    }

    .product-card h3 {
        font-size: 0.95rem;
        text-align: center;
    }

    .product-card .price {
        font-size: 1.3rem;
        margin-top: auto;
    }

    .product-card .btn-add-cart,
    .product-card .btn-store-outline {
        width: 85%;
        font-size: 13px;
        padding: 8px 12px;
        margin-top: 6px;
        text-align: center;
    }

    /* --- Centrage de "View All Products" --- */
    .btn-view-all {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 25px auto !important;
        width: 100%;
    }

    .btn-view-all a {
        font-size: 16px;
        padding: 10px 20px;
        text-align: center;
    }

    /* About */
    .about-us p {
        width: 90% !important;
        font-size: 16px;
    }

    .about {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
        justify-items: center;
    }

    .about .card {
        padding: 15px;
        width: 100%;
        max-width: 250px;
        min-height: 200px;
    }

    .about .card img {
        width: 45px;
        height: 45px;
    }

    .about .card h3 {
        font-size: 16px;
    }

    .about .card p {
        font-size: 13px;
        text-align: center;
    }

    /* Contact */
    .contact-head p {
        width: 90% !important;
        font-size: 18px;
    }

    .contact {
        grid-template-columns: repeat(2, 1fr);
        padding: 15px;
        gap: 15px;
        justify-items: center;
    }

    .contact .col {
        width: 100%;
        padding-left: 5px;
        align-items: flex-start;
        text-align: left;
    }

    .contact h2 {
        font-size: 17px;
    }

    .contact p,
    .contact a {
        font-size: 14px;
    }

    /* --- Formulaires --- */
    .form-container,
    .form-container-login {
        width: 90%;
        margin: 40px auto;
        min-height: auto;
    }

    .form-container form,
    .form-container-login form {
        padding: 20px;
    }

    .form-container form h3,
    .form-container-login form h3 {
        font-size: 24px !important;
    }

    .form-container form input,
    .form-container-login form input {
        height: 42px;
        font-size: 14px;
    }

    /* --- Pagination --- */
    .page-number,
    .naviger,
    .current-page {
        min-width: 45px;
        padding: 8px 10px;
        font-size: 0.9rem;
        margin: 0 5px;
    }

    /* --- Dashboard --- */
    .admin-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-top-bar h1 {
        font-size: 1.5rem !important;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-box {
        padding: 15px;
    }

    .stat-info .stat-value {
        font-size: 1.4rem;
    }

    .admin-nav-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    .admin-card-table {
        padding: 10px;
        font-size: 0.8rem;
        overflow-x: auto;
    }

    .admin-card-table th,
    .admin-card-table td {
        padding: 8px 6px;
    }

    .table-product-item img {
        width: 40px;
        height: 40px;
    }

    .table-product-item .p-title {
        font-size: 0.85rem;
    }

    .btn-action {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .admin-form-card {
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        flex: 1 1 100%;
    }

    .btn-admin-submit {
        font-size: 1rem;
        padding: 12px;
    }

    /* --- Cart --- */
    #sidebar {
        max-width: 100%;
        right: -100%;
    }

    .floating-cart {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        bottom: 20px;
        left: 20px;
    }

    #cart-count {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .cart-title {
        font-size: 1.2rem;
        padding: 12px;
    }

    .product-row {
        flex-direction: column;
        text-align: center;
    }

    .product-row img {
        width: 100%;
        height: 150px;
    }

    .control-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .price-delete {
        justify-content: space-between;
    }

    .form-input {
        padding: 12px;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 14px;
        font-size: 1rem;
    }

    /* --- Promo Banner --- */
    .promo-banner {
        padding: 30px 20px;
        border-radius: 10px;
        margin: 40px 15px 60px 15px;  /* ←增加了 المسافة السفلية */
    }

    .promo-content h2 {
        font-size: 1.8rem !important;
    }

    .promo-content p {
        font-size: 1rem;
    }

    .btn-animated {
        padding: 14px 30px;
        font-size: 1rem;
    }

    /* --- Features & Testimonials --- */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .feature-item {
        padding: 15px;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    /* --- Scroll to top --- */
    #scrollTopBtn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 20px;
        right: 20px;
    }

    .add-notification {
        bottom: 80px;
        left: 15px;
        padding: 10px 16px;
        font-size: 0.9rem;
        max-width: 90%;
    }
}

/* --- 5. Très petits mobiles (max-width: 480px) --- */
@media (max-width: 480px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    .site-header {
        padding: 0;
    }

    .site-header .container {
        padding: 8px 10px;
    }

    .logo h2 {
        font-size: 20px !important;
    }

    .logo .icon {
        max-width: 100px;
        height: 40px;
    }

    .menu {
        width: 30px;
        height: 28px;
    }

    .menu span {
        height: 3px !important;
        margin-bottom: 3px !important;
    }

    .site-nav ul {
        width: 180px;
        top: 45px;
        right: 0;
        background-color: var(--primary-dark);
    }

    .site-nav ul li a {
        font-size: 14px;
        padding: 10px 12px;
    }

    .site-nav ul li a:hover {
        padding-left: 15px;
        font-size: 15px;
    }

    /* --- Titres (garder la taille originale) --- */
    .big-title {
        font-size: 30px !important;
        padding-top: 15px !important;
        margin-bottom: 15px !important;
    }

    main .big-title {
        font-size: 36px !important;
        letter-spacing: 0 !important;
    }

    .section-title {
        font-size: 22px !important;
        margin: 20px auto !important;
    }

    .hero-content p {
        font-size: 15px;
        width: 95% !important;
    }

    .hero-content a {
        font-size: 14px;
        padding: 8px 14px;
    }

    /* --- Grille produits --- */
    .container-pc {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 5px;
        margin: 0 0 20px 0;
    }

    .product-card {
        padding: 10px;
        min-height: 280px;
        margin: 0;
    }

    .product-card img {
        height: 100px;
        max-width: 100px;
    }

    .product-card h3 {
        font-size: 0.75rem;
        margin: 5px 0;
    }

    .product-card .price {
        font-size: 1rem;
    }

    .product-card .condition-badge {
        font-size: 0.6rem;
        width: 70px;
        padding: 2px 8px;
    }

    .product-card .btn-add-cart,
    .product-card .btn-store-outline {
        font-size: 11px;
        padding: 6px 10px;
        width: 90%;
        margin-top: 4px;
    }

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

    .btn-view-all {
        margin: 15px auto !important;
    }

    .btn-view-all a {
        font-size: 13px;
        padding: 8px 16px;
    }

    /* --- About --- */
    .about-us p {
        font-size: 14px;
        width: 95% !important;
    }

    .about {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 5px;
    }

    .about .card {
        padding: 12px;
        min-height: 160px;
        max-width: 100%;
    }

    .about .card img {
        width: 35px;
        height: 35px;
        margin: 5px;
    }

    .about .card h3 {
        font-size: 13px;
    }

    .about .card p {
        font-size: 11px;
    }

    /* --- Contact --- */
    .contact-head p {
        font-size: 15px;
        width: 95% !important;
    }

    .contact {
        grid-template-columns: 1fr 1fr;
        padding: 10px;
        gap: 10px;
    }

    .contact .col {
        padding-left: 0;
        align-items: center;
        text-align: center;
    }

    .contact h2 {
        font-size: 15px;
        text-align: center;
        width: 100%;
    }

    .contact p,
    .contact a {
        font-size: 12px;
        justify-content: center;
    }

    .contact ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* --- Formulaires --- */
    .form-container,
    .form-container-login {
        width: 95%;
        margin: 25px auto;
        min-height: auto;
    }

    .form-container form,
    .form-container-login form {
        padding: 15px;
    }

    .form-container form h3,
    .form-container-login form h3 {
        font-size: 20px !important;
        margin-bottom: 20px;
    }

    .form-container form input,
    .form-container-login form input {
        height: 38px;
        font-size: 13px;
        padding: 8px 12px;
    }

    .form-container form .btn,
    .form-container-login form .btn {
        font-size: 15px;
        height: 44px;
        padding: 10px;
    }

    .form-container p {
        font-size: 13px;
    }

    /* --- Pagination --- */
    .page-number,
    .naviger,
    .current-page {
        min-width: 35px;
        padding: 5px 6px;
        font-size: 0.75rem;
        margin: 0 3px;
    }

    /* --- Dashboard --- */
    .admin-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-info .stat-value {
        font-size: 1.2rem;
    }

    .admin-card-table {
        font-size: 0.7rem;
        padding: 5px;
    }

    .admin-card-table th,
    .admin-card-table td {
        padding: 5px 3px;
    }

    .table-product-item img {
        width: 30px;
        height: 30px;
    }

    .table-product-item .p-title {
        font-size: 0.75rem;
    }

    .btn-action {
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    .modal-head h3 {
        font-size: 1rem;
    }

    .admin-modal-box {
        padding: 15px;
    }

    .btn-cancel,
    .btn-save {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    /* --- Cart --- */
    .floating-cart {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        bottom: 12px;
        left: 12px;
    }

    #cart-count {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
        border-width: 2px;
    }

    .cart-title {
        font-size: 1rem;
        padding: 10px;
    }

    .sidebar-header {
        padding: 8px;
    }

    .close-btn {
        font-size: 1.4rem;
        width: 28px;
        height: 28px;
    }

    .cart-product {
        padding: 10px;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.8rem;
    }

    .qty-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .qty-value {
        font-size: 0.85rem;
        min-width: 25px;
    }

    .item-total-price {
        font-size: 0.9rem;
    }

    .delete-icon {
        font-size: 1rem;
        padding: 4px;
    }

    .total-line {
        font-size: 0.95rem;
        padding: 8px;
    }

    #finalTotal {
        font-size: 1.1rem;
    }

    .form-input {
        padding: 10px;
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 0.9rem;
    }

    .sidebar-footer-form {
        padding: 15px;
    }

    .form-title {
        font-size: 1rem;
    }

    /* --- Promo Banner --- */
    .promo-banner {
        padding: 20px 15px;
        margin: 30px 10px 50px 10px;  /* ←增加了 المسافة السفلية */
        border-radius: 8px;
    }

    .promo-content h2 {
        font-size: 1.3rem !important;
    }

    .promo-content p {
        font-size: 0.8rem;
    }

    .btn-animated {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    /* --- Features & Testimonials --- */
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .feature-item {
        padding: 10px;
    }

    .feature-icon {
        font-size: 1.5rem;
    }

    .feature-item h3 {
        font-size: 0.8rem;
    }

    .feature-item p {
        font-size: 0.65rem;
    }

    .testimonial-card {
        padding: 15px;
    }

    .testimonial-card p {
        font-size: 0.85rem;
    }

    .stars {
        font-size: 1rem;
    }

    /* --- Scroll to top --- */
    #scrollTopBtn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        bottom: 12px;
        right: 12px;
    }

    .add-notification {
        bottom: 70px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.8rem;
        max-width: 95%;
        gap: 8px;
    }

    footer p {
        font-size: 11px;
    }
}

/* ==========================================
   GRILLE PRODUITS - PAGE INDEX UNIQUEMENT
   AJOUTÉ EN FIN DE FICHIER
   ========================================== */

/* --- صفحة المنتجات فقط: 5 أعمدة في الشاشات الكبيرة --- */
.container-pc.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ==========================================
   RESPONSIVE - فقط لصفحة المنتجات
   ========================================== */

/* --- شاشات كبيرة جداً (>= 1400px) --- */
@media (min-width: 1400px) {
    /* ✅ صفحة المنتجات فقط: 5 أعمدة */
    .container-pc.products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 25px;
    }
    
    /* ❌ باقي الصفحات (الصفحة الرئيسية، التفاصيل) تبقى 4 أعمدة */
    .container-pc:not(.products-grid) {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
}

/* --- شاشات متوسطة (992px - 1399px) --- */
@media (min-width: 992px) and (max-width: 1399px) {
    .container-pc.products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .container-pc:not(.products-grid) {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* --- شاشات صغيرة (768px - 991px) --- */
@media (max-width: 991px) {
    .container-pc.products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .container-pc:not(.products-grid) {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* --- موبايل (max-width: 767px) --- */
@media (max-width: 767px) {
    .container-pc.products-grid,
    .container-pc:not(.products-grid) {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 10px;
        margin: 0 5px 20px 5px;
    }
}

/* --- موبايل صغير جداً (max-width: 480px) --- */
@media (max-width: 480px) {
    .container-pc.products-grid,
    .container-pc:not(.products-grid) {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
        margin: 0 0 15px 0;
    }
}