/* === DESIGN SYSTEM ELOMSTORE === */
:root {
    --bg-color: #F8F9FA; /* Fond clair et moderne */
    --surface: #FFFFFF;
    --gold: #D4AF37;
    --gold-hover: #b5952f;
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;
    --dark: #1A1A1A;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; scroll-behavior: smooth; }
body { background: var(--bg-color); color: var(--text-main); overflow-x: hidden; }

/* === NAVBAR === */
nav { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 5%; background: rgba(255, 255, 255, 0.95); position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); backdrop-filter: blur(10px);
}
.logo { font-size: 26px; font-weight: 800; color: var(--dark); letter-spacing: 2px; }
.logo::after { content: '.'; color: var(--gold); }

/* Barre de recherche */
.search-bar { display: flex; background: var(--bg-color); border-radius: 30px; padding: 5px 15px; border: 1px solid #E0E0E0; width: 300px; }
.search-bar input { border: none; background: transparent; outline: none; padding: 8px; width: 100%; font-size: 0.9rem; }
.search-bar button { border: none; background: transparent; color: var(--gold); cursor: pointer; font-size: 1.1rem; }

/* Icône Panier */
.cart-trigger { position: relative; cursor: pointer; font-size: 24px; color: var(--dark); transition: 0.3s; }
.cart-trigger:hover { color: var(--gold); transform: scale(1.1); }
.badge { 
    position: absolute; top: -5px; right: -10px; background: var(--gold); color: #FFF; 
    font-size: 11px; font-weight: bold; padding: 3px 7px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* === HERO SECTION === */
.hero { 
    height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(26, 26, 26, 0.7)), url('https://images.unsplash.com/photo-1441984904996-e0b6ba687e04?auto=format&fit=crop&w=1920&q=80') center/cover;
    color: white; padding: 20px;
}
.hero h1 { font-size: 3.5rem; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 2px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; font-weight: 300; letter-spacing: 1px; }
.btn-cta { 
    padding: 15px 40px; background: var(--gold); color: #FFF; border: none; border-radius: 30px;
    text-transform: uppercase; font-weight: bold; letter-spacing: 1px; cursor: pointer; transition: 0.4s;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}
.btn-cta:hover { background: var(--gold-hover); transform: translateY(-3px); }

/* === PRODUITS === */
.container { max-width: 1200px; margin: 60px auto; padding: 0 20px; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 50px; color: var(--dark); text-transform: uppercase; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--gold); margin: 15px auto 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }

.card { 
    background: var(--surface); border-radius: 12px; overflow: hidden; transition: 0.3s; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #EEE; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.img-wrap { width: 100%; height: 280px; overflow: hidden; position: relative; background: #f4f4f4; }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .img-wrap img { transform: scale(1.05); }

.info { padding: 25px 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; }
.info h3 { font-size: 1.2rem; font-weight: 600; color: var(--dark); margin-bottom: 10px; }
.info .desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.price { color: var(--dark); font-size: 1.4rem; font-weight: 800; margin-bottom: 20px; }

.btn-add { 
    width: 100%; padding: 12px; background: var(--surface); color: var(--dark); border: 2px solid var(--dark); 
    border-radius: 30px; text-transform: uppercase; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.btn-add:hover { background: var(--dark); color: #FFF; }

/* === PANIER LATÉRAL === */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 999; display: none; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px); }
.cart-panel { 
    position: fixed; top: 0; right: -400px; width: 380px; max-width: 100%; height: 100%; 
    background: var(--surface); z-index: 1000; transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; flex-direction: column; box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}
.cart-header { padding: 25px; border-bottom: 1px solid #EEE; display: flex; justify-content: space-between; align-items: center; background: #FAFAFA; }
.cart-header h2 { color: var(--dark); font-size: 1.3rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 25px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #EEE; padding-bottom: 15px; }
.item-details h4 { font-size: 1rem; color: var(--dark); margin-bottom: 5px; }
.item-details p { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.btn-remove { color: #E74C3C; background: none; border: none; cursor: pointer; font-size: 1.2rem; transition: 0.2s; }
.btn-remove:hover { color: #C0392B; transform: scale(1.1); }
.cart-footer { padding: 25px; background: #FAFAFA; border-top: 1px solid #EEE; }
.total-row { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: 800; color: var(--dark); margin-bottom: 20px; }
.btn-whatsapp { 
    width: 100%; background: #25D366; color: #fff; padding: 15px; border: none; border-radius: 30px;
    font-weight: bold; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 1rem; transition: 0.3s; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover { background: #1ebe57; transform: translateY(-2px); }

/* === BOUTON ADMIN FLOTTANT (Visible que par toi) === */
.btn-admin-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--dark);
    color: var(--gold);
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--gold);
}
.btn-admin-float:hover { background: var(--gold); color: var(--dark); transform: translateY(-5px); }

/* Notifications */
.toast { 
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); 
    background: var(--dark); color: #FFF; padding: 15px 30px; border-radius: 30px; font-weight: 600;
    opacity: 0; transition: 0.5s; z-index: 2000; box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media(max-width: 768px) {
    nav { flex-wrap: wrap; gap: 15px; }
    .search-bar { order: 3; width: 100%; }
    .hero h1 { font-size: 2.5rem; }
    .grid { grid-template-columns: 1fr; }
    .btn-admin-float { bottom: 15px; left: 15px; padding: 10px 15px; font-size: 0.9rem; }
}
/* === NOUVEAU: CONTROLES DE QUANTITÉ === */
.qty-control { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 15px; 
    background: #F8F9FA;
    padding: 5px;
    border-radius: 30px;
}
.qty-btn { 
    background: #FFF; 
    border: 1px solid #DDD; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 1.2rem; 
    color: var(--dark); 
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.qty-btn:hover { background: var(--gold); color: white; border-color: var(--gold); }
.qty-input { 
    width: 40px; 
    text-align: center; 
    border: none; 
    background: transparent;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--dark);
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* Badge Stock Limité */
.badge-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

/* Bouton Partager */
.btn-share {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    opacity: 0; /* Caché par défaut */
    transform: translateY(-10px);
}
.card:hover .btn-share { opacity: 1; transform: translateY(0); }
.btn-share:hover { background: var(--gold); color: white; }

/* Amélioration de la carte au survol */
.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--gold);
}

/* Animation du bouton ajouter */
.btn-add {
    background: var(--dark);
    color: white;
    border: none;
    transition: background 0.3s;
}
.btn-add:hover {
    background: var(--gold);
    letter-spacing: 1px;
}
/* === BOUTON RETOUR EN HAUT === */
.btn-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px; /* À droite, pour ne pas gêner le bouton admin à gauche */
    background: var(--gold);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1000;
}
.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
}
.btn-scroll-top:hover {
    background: var(--dark);
    transform: translateY(-3px);
}
@media(max-width: 768px) {
    .btn-scroll-top { bottom: 80px; right: 15px; } /* Plus haut sur mobile pour ne pas gêner */
}