:root {
  --primary-color: #990303;
  --secondary-color: #050505;
  /*--secondary-color: #07d800;*/
  --dark-bg: #333333;
  --light-bg: #f4f4f4;
  --light-grey: #ffffff33;
  --text-color: #020507;
  --white: #ffffff;
  --bg-color: #ffffff;  
  --card-bg: #f4f4f4;   
  --accent-color-yellow: #fbff00;
  --accent-color: #f9f7ff;
  --green-fluo: rgb(21, 255, 0);
  --red-fluo: #FF3131;
  --red-rgb-fluo: rgb(255, 49, 49);
  --transition-speed: 0.3s;
  --speed: 20s; /* vitesse de la banière */
}

*{box-sizing:border-box;margin:0;padding:0;font-family:Arial,sans-serif;}
/*body{background:#f5f5f5;color:#111}*/
body{background:var(--secondary-color);color:#f5f5f5}
.page-heading { margin-top: 160px; margin-bottom: 30px; background-color: #3b3b3b; background-position: center center; background-size: cover;  background-repeat: no-repeat; }
.header{background:var(--secondary-color);border-bottom:1px solid #ddd;padding:15px;display:flex;align-items:center;gap:20px; color: var(--primary-color);}
.logo {font-size:36px;font-weight:700; text-align: center; font-style: italic; }
.logo a {color: var(--primary-color); text-decoration: none;}
.logo img{height:70px}
.search{flex:1;display:flex;}
.search input{flex:1;padding:5px;border:1px solid #ccc;  width: 1200px;}
.search button{padding:12px 18px;background:var(--primary-color);color:#fff;border:none; cursor:pointer}
.nav{background:var(--secondary-color);color:var(--secondary-color);padding:12px 20px;display:flex;gap:25px;font-size:14px; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border: solid 1px var(--light-grey);}
.hero{background-image:url('../images/bg/Hardcore-SARMS-Banner-8-1.webp');background-size:cover;background-position:center;height:700px;color:#fff; display:flex; align-items:center;justify-content:center;font-size:64px;font-weight:700; font-style: italic;}
.hero h1 { font-size: 48px; font-weight: bold; }
.hero h2 { margin-top:25px; }
.hero h3 { margin-top:25px; text-align: justify; }
.hero p { font-size: 24px; }
.products{display:grid;grid-template-columns:repeat(6,1fr);gap:20px;padding:40px 40px 40px 40px; margin: 50px 0; max-width: 1200px; margin: auto; }
.card {background:var(--secondary-color); padding:20px;border:1px solid #ffffff33;text-align:center;}
.card img{width:100%;height:180px;object-fit:contain; cursor: zoom-in;}
.card h3{font-size:16px;margin:10px 0; color: var(--white);}
.card p{font-size:22px;font-weight:700; color: var(--white);}
.about{padding:50px;text-align:center;background:var(--secondary-color);margin:40px}
.footer{background:var(--primary-color);/*color:var(--light-bg);padding:40px;display:grid;grid-template-columns:repeat(4,1fr);gap:20px*/}
.footer-menu{background:var(--primary-color);color:var(--light-bg);padding:40px;display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.footer-copyright{background:var(--primary-color);color:var(--light-bg);padding:40px;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.menu-toggle{display:none;font-size:28px;cursor:pointer}

/* Secxtion Category */
.products-category{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;padding:0px 80px;}
.card-category{background:var(--secondary-color);padding:20px;border:1px solid var(--light-grey);text-align:center; }
.card-category img{width:100%;height:180px;object-fit:contain;}
.card-category h3{font-size:16px;margin:10px 0; color: var(--accent-color); }
.card-category p{font-size:22px;font-weight:700; color: var(--green-fluo); }

/* Secxtion Search */
.products-search{display:grid;grid-template-columns:repeat(6,1fr);gap:20px;padding:40px 40px 40px 40px; margin: 50px 0; max-width: 1200px; margin: auto; }
.card-search{background:#fff;padding:20px;border:1px solid #ddd;text-align:center;}
.card-search img{width:100%;height:180px;object-fit:contain; cursor: zoom-in;}
.card-search h3{font-size:16px;margin:10px 0}
.card-search p{font-size:22px;font-weight:700}

/* MOBILE MENU */
.mobile-menu{position:fixed;top:0;left:-100%;width:100%;height:100%;background:var(--secondary-color);box-shadow:2px 0 10px rgba(0,0,0,.2);padding:20px;transition:.3s;z-index:1000;overflow-y:auto}
.mobile-menu.open{left:0}
.mobile-menu .close-btn{font-size:22px;cursor:pointer;text-align:right;margin-bottom:10px; color: white;}
.mobile-menu ul{list-style:none; color: white;;}
.mobile-menu li{padding:12px 0;border-bottom:1px solid #eee;cursor:pointer;}
.submenu{display:none;padding-left:15px}
.submenu li{font-size:14px;color:var(--white);border:none}
.submenu li a{color:var(--white); text-decoration: none;}
.submenu.open{display:block}

.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);display:none;z-index:999}
.overlay.show{display:block}

/* Desktop menu */
.desktop-menu { list-style: none; display: flex; gap: 25px; align-items: center; margin: 0; padding: 0; }
.desktop-menu li { position: relative; cursor: pointer; color: var(--white); font-size: 16px; }
.desktop-menu li a { color: var(--white); text-decoration: none; }
.desktop-menu .submenu { display: none; position: absolute; top: 100%; left: 0; background: var(--secondary-color); padding: 10px 0; list-style: none; min-width: 150px; z-index: 10; }
.desktop-menu .submenu li { padding: 8px 20px; white-space: nowrap; }
.desktop-menu li:hover > .submenu { display: block; }
.desktop-menu li:hover { opacity: 0.8; }

.continue-shopping-static { width: 25%; padding: 18px; background: var(--primary-color); color: #fff; border: solid 1px var(--p-grey); font-weight: bold; cursor: pointer; transition: 0.3s; margin-bottom: 25px; }

.continue-shopping-cycle { width: 100%; padding: 18px; background: var(--primary-color); color: #fff; border: solid 1px var(--p-grey); font-weight: bold; cursor: pointer; transition: 0.3s; margin-bottom: 25px; }

.responsive-title-cycle { font-size: 48px;}
/* Styles pour le bouton "Back to top" */
.top-responsive {position: fixed;bottom: 15px;right: 15px;display: block;z-index: 999!important;}
.back-to-top-button {border: solid 1px var(--primary-color);background-color: var(--light-bg); color: rgb(255, 255, 255);padding: 2px 15px 0px 15px ;text-decoration: none;display: inline-block; font-size: 24px;font-weight: bold;margin: 2px 1px;cursor: pointer;border-radius: 7px;}
.arrow {border: solid var(--primary-color); border-width: 0 4px 4px 0;display: inline-block;padding: 5px;}
.up {transform: rotate(-135deg);-webkit-transform: rotate(-135deg);}

/* Style par défaut : L'objet est masqué */
#monObjetCache {
  /* Rend l'objet complètement transparent */
  opacity: 0; 
  /* Le retire du flux, mais le garde visible pour la transition */
  visibility: hidden; 
  /* Ajoute une transition douce (facultatif, mais recommandé) */
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; 
}

/* Style de l'objet lorsqu'il doit être visible */
#monObjetCache.visible {
  opacity: 1; /* Le rend opaque */
  visibility: visible; /* Le rend visible */
}

/* The Modal (background) */
.modal-item {display: none;position: fixed;z-index: 1000;left: 0;top: 0;width: 100%;height: 100%;background-color: rgba(0, 0, 0, 0.9);align-items: center;justify-content: center;transition: opacity 0.5s ease;}

/* Modal content (image) */
.modal-content-item {position: relative;width: auto;height: auto;max-width: 90%;max-height: 90%;border-radius: 5px;overflow: hidden;animation: zoomIn 0.5s;}

@keyframes zoomIn {
  from {transform: scale(0.6);}
  to {transform: scale(1);}
}

.modal.show {display: flex;opacity: 1;}

/* Close button */
.close {position: absolute;top: 10px;right: 20px;color: #ffffff;font-size: 35px;font-weight: bold;cursor: pointer;transition: transform 0.3s;}

/* Caption of modal image */
.caption {position: absolute;bottom: 15px;width: 100%;text-align: center;color: #ffffff;font-size: 24px;}

/** Lateral cart styles */
.cart-sidebar { position: fixed; right: 0; top: 0; width: 400px; height: 100%; background: var(--secondary-color); border: solid 1px var(--light-grey); box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 1000; display: flex; flex-direction: column; transition: 0.3s; }
.cart-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.close-cart { font-size: 22px; cursor: pointer; }
.cart-items { flex-grow: 1; padding: 20px; overflow-y: auto; }
.cart-item { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; position: relative; }
.cart-item img { width: 60px; height: 60px; border-radius: 5px; object-fit: cover; }
.item-details h4 { font-size: 18px; margin-bottom: 5px; }
.item-details p { color: #888; font-size: 16px; }
.quantity-controls { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.quantity-controls button { width: 25px; height: 25px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.remove-item { background: none; border: none; color: #ff0000; font-size: 36px; cursor: pointer; position: absolute; right: 0; top: 5; text-decoration: none;}
.cart-footer { padding: 20px; background: var(--secondary-color); border-top: 1px solid #eee; }
.total-line { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.total-line.bold { font-weight: bold; font-size: 16px; margin-top: 10px; }
.checkout-btn { width: 100%; padding: 15px; background: var(--primary-color); color: #fff; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.checkout-btn:hover { background: #333; }
.cart-sidebar { transform: translateX(100%); transition: transform 0.3s ease-in-out; }
.cart-sidebar.active { transform: translateX(0); }

/* Preloader */
#preloader { overflow: hidden; background-color: #2a2a2a; left: 0; right: 0; top: 0; bottom: 0; position: fixed; z-index: 99999; color: #fff; }
#preloader .jumper { left: 0; top: 0; right: 0; bottom: 0; display: block; position: absolute; margin: auto; width: 50px; height: 50px; }
#preloader .jumper > div { background-color: #fff; width: 10px; height: 10px; border-radius: 100%; -webkit-animation-fill-mode: both; animation-fill-mode: both; position: absolute; opacity: 0; width: 50px; height: 50px; -webkit-animation: jumper 1s 0s linear infinite; animation: jumper 1s 0s linear infinite; }
#preloader .jumper > div:nth-child(2) { -webkit-animation-delay: 0.33333s; animation-delay: 0.33333s; }
#preloader .jumper > div:nth-child(3) { -webkit-animation-delay: 0.66666s; animation-delay: 0.66666s; }

/* BANNER */ 
.banner-container { overflow: hidden; width: 100%; background: var(--primary-color);/* Couleur de fond */ border-top: var(--white) solid 2px; border-bottom: var(--white) solid 2px; padding: 8px 0; margin-bottom: 10px; display: flex; }
.banner-scroll { display: flex; width: max-content; /* S'adapte à la taille du contenu */ animation: scroll var(--speed) linear infinite; }
.banner-content { display: flex; gap: 100px; /* Espace entre les éléments */ padding-right: 100px; /* Doit être égal au gap pour éviter les saccades */ }
.banner-content span { color: var(--white); font-family: sans-serif; /*  font-size: 1.5rem;*/ font-size: 16px; font-weight: bold; white-space: nowrap; text-transform: uppercase; }
.banner-container:hover .banner-scroll { animation-play-state: paused; } /* Optionnel : Pause au survol */

/* CATEGORY */
.main-header { background: #000; color: #fff; padding: 20px; text-align: center; position: sticky; top: 0; z-index: 100; margin: 10px 0; } /* Styles du Header (Mobile par défaut) */
.mobile-categories-nav .mobile-category-select { width: 100%; padding: 10px; background: #fff; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1.3rem; color: var(--text-color); font-weight: bold;} /* Styles du Menu Mobile */
.mobile-category-select option { font-weight: bold;}
.page-container { padding: 20px; } /* Conteneur Principal (Mobile) */
.desktop-sidebar { display: none; } /* Masquage des éléments desktop sur mobile */

@media (min-width: 1024px) {
  .main-header { background: none; color: var(--accent-color); padding: 40px 60px 20px; text-align: left; position: static; } /* Styles du Header Desktop */
  .mobile-categories-nav { display: none; } /* Masquage du menu mobile sur desktop */
  .page-container { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 0 60px 60px; max-width: 1400px; margin: 0 auto; } /* Structure en Grille Desktop */
  .desktop-sidebar { display: block; border-right: 1px solid var(--border-color); padding-right: 20px; } /* Styles de la Barre Latérale */
  .sidebar-title { font-size: 1.8rem; color: var(--accent-color); margin-bottom: 25px; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; font-weight: bold;} /* Titre de la barre latérale */
  .category-list { list-style: none; } /* Liste des catégories */
  .category-list li { margin-bottom: 15px; } /* Éléments de la liste */
  .category-link { text-decoration: none; font-size: 1.1rem; color: var(--accent-color); transition: var(--transition); display: block; padding: 8px 15px; border-radius: 5px; } /* Liens des catégories */
  .category-link:hover { background-color: var(--primary-color); color: var(--accent-color); } /* Style au survol d'un lien */
  .category-link.active { background-color: var(--accent-color); color: var(--primary-color); font-weight: bold; } /* Style du lien actif */
}

/* CHECKOUT */
.payment-option { display: flex; align-items: center; padding: 15px; border: 2px solid #ddd; border-radius: 8px; margin-bottom: 10px; transition: 0.3s; }
.payment-option:hover { border-color: #f31212; }
input[type="radio"]:checked + .option-details { color: #f31212; }
.payment-option input[type="radio"] { margin-right: 15px; transform: scale(1.5); }
.modal { display: none;  position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); /* Ajout important pour le scroll */ overflow-y: auto;  -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */ }
.modal-content { background-color: var(--secondary-color); margin: 40px auto; /* Réduit un peu la marge haute */ padding: 20px; border-radius: 8px; width: 90%; max-width: 800px; border: solid 1px var(--accent-color-yellow); box-shadow: 0 5px 15px rgba(0,0,0,0.3); position: relative; }
/* Correction spécifique pour mobile */
@media (max-width: 600px) {  
    .modal-content {
        margin: 10px auto; /* Marge minimale pour maximiser l'espace */
        padding: 15px;     /* Padding réduit sur mobile */
        font-size: 14px;    /* 8px était beaucoup trop petit pour être lisible */
        width: 95%;        /* Prend plus de largeur sur petit écran */
    }   
    
    /* Optionnel : rendre les boutons de paiement plus compacts sur mobile */
    .payment-option {
        padding: 10px;
    }
}

/* CYCLE-DETAIL*/
#success-alert { transition: opacity 0.5s ease-in-out; }
.cycle-container { max-width: 1200px; margin: 20px auto; padding: 20px; }
/* Galerie d'images */
.product-gallery { display: grid;  grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 30px; }
.product-item { background: #fff; padding: 10px; position: relative; border: 1px solid #333; }
.product-item img { height: 200px; display: block; }
/* Titres et Prix */
.cycle-title { font-size: 3.5rem; text-align: center; text-transform: uppercase; margin: 40px 0 10px; }
.price-tag { font-size: 2.5rem;  font-weight: bold; text-align: left; margin-bottom: 30px; }
/* Panneau de contenu */
.glass-panel { background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); padding: 0px; line-height: 1.6; }
h3 { text-decoration: underline; margin-top: 30px; }
.protocol-header { background: #fff; color: #000; font-size: 1.4rem; margin: 50px 0 20px; text-transform: uppercase; }
.step { margin-bottom: 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 20px; }
.step h4 { font-size: 1.2rem; margin-bottom: 10px; }
.step.pct { border-bottom: none; background: rgba(255, 0, 0, 0.05); padding: 20px; }

/* Bouton d'action */
.btn-buy { display: inline-block; margin-top: 40px; padding: 15px 30px; border: 2px solid #000000; color: #000000; text-decoration: none; font-weight: bold; text-transform: uppercase; transition: 0.3s; }
.btn-buy:hover { background: #000000; color: #ffffff; }

@media (max-width: 768px) {
    .product-gallery { grid-template-columns: repeat(3, 1fr); }
    .cycle-title { font-size: 2rem; }
    .btn-buy { padding: 10px 20px; font-size: 0.9rem; } 
    .price-tag {font-size: 1.5rem; }  
}

/* ITEM-DETAIL */
.product-container { background-color: var(--secondary-color); max-width: 1200px; margin: 40px auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; padding: 0 20px;}
.product-gallery { display: flex; flex-direction: column;  text-align: center; gap: 20px; }
.prod-img { width:48%; border: #dcdce4 1px solid; border-radius: 3px; object-fit: cover; background: var(--p-light-grey); cursor: zoom-in;}
.breadcrumb { font-size: 16px; font-weight: bold; background-color: var(--secondary-color); margin-bottom: 15px; text-transform: uppercase;padding: 16px 0px;}
.product-title { font-size: 32px; margin-bottom: 10px; font-weight: 700; color: var(--p-grey); }
.product-price { font-size: 28px; color: var(--p-success); font-weight: bold; margin-bottom: 25px; }
.product-description { font-size: 16px; color: var(--p-grey); line-height: 1.6; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 30px; }
.product-options label { display: block; font-weight: bold; margin-bottom: 10px; font-size: 24px; }
.qty-selector { display: flex; align-items: center; gap: 5px; margin-bottom: 30px; }
.qty-selector input { width: 50px; text-align: center; padding: 8px; border: 1px solid #ddd; font-size: 28px;}
.qty-selector button { padding: 8px 15px; border: 1px solid #ddd; background: #fff; cursor: pointer; font-size: 28px;}
.add-to-cart { width: 100%; padding: 18px; background: var(--primary-color); color: #fff; border: solid 1px var(--p-grey); font-weight: bold; cursor: pointer; transition: 0.3s; margin-bottom: 25px; }
.add-to-cart:hover { opacity: 0.8; transform: translateY(-2px); }
.extra-info p { font-size: 14px; margin-bottom: 8px; color: var(--p-grey); }
.responsive-show { display: none }

/* --- Styles des flèches (Cachées par défaut sur Desktop) --- */
.nav-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; font-size: 18px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.nav-arrow.left { left: 10px; } .nav-arrow.right { right: 10px; }

/* --- RESPONSIVE (Tablettes et Mobiles) --- */
@media (max-width: 992px) {
  .product-container { grid-template-columns: 1fr; gap: 20px; padding: 0px 20px;}
  .product-gallery { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; position: relative; } /* Pour positionner les flèches */
  .images-wrapper { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
  /*.images-wrapper::-webkit-scrollbar { display: none; } /* On cache la barre moche */
  .prod-img { flex: 0 0 100%; scroll-snap-align: start; }
  .nav-arrow { display: flex; align-items: center; justify-content: center; } /* On affiche les flèches */
  .responsive-hidden { display: none }
  .responsive-show { display: block }
/* Ajustement de la lisibilité (Caractères plus grands) */
  body { font-size: 18px; } /* Augmentation générale */
  .breadcrumb { font-size: 13px; }
  .product-title { font-size: 32px; line-height: 1.2; }
  .product-price { font-size: 28px; }
  .product-description { font-size: 18px; }
  .product-options label { font-size: 36px; }
  .qty-selector input, .qty-selector button { font-size: 36px; }
  .add-to-cart { font-size: 18px; padding: 22px; }
}

/* Animation de défilement */
@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Media Query */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav { display: none; }
  .logo { font-size: 22px; display: flex; justify-content: center; width: 80%; }
  .header { flex-wrap: wrap; }
  .search { height: 35px; width: 75vw; }
  .search input { padding: 5px; font-size: 16px; }
  .search button { font-size: 14px; padding: 0px 10px;}
  .hero { height: 400px; font-size: 40px; text-align: center; padding: 20px; }
  .hero h1 { font-size: 28px; font-weight: bold; }
  .hero h2 { font-size: 28px; }
  .hero h3 { font-size: 18px; }
  .products { grid-template-columns: repeat(2, 1fr); padding: 20px; gap: 15px; }
  .products-category { grid-template-columns: repeat(2, 1fr); padding: 20px 5px; gap: 15px; } 
  .products-search { grid-template-columns: repeat(2, 1fr); padding: 0px; gap: 15px; }
  /*.footer { grid-template-columns: 1fr; padding: 25px; }*/
  .footer-menu { grid-template-columns: 1fr; padding: 25px; }
  .footer-copyright { grid-template-columns: 1fr; padding: 25px; }
  .page-container { gap: 30px; padding: 10px 10px; }
  .modal-mobile {display: none !important;}
  .modal-responsive { display:none !important } 
  .continue-shopping-static { font-size: 18px; padding: 22px; width: 100%; }
  .responsive-title-cycle { font-size: 36px;}
}

/* Format Mobile */
@media (max-width: 480px) {
  .cart-sidebar { width: 100%; }
  .cart-item img { width: 80px; height: 80px; }
  .total-line span { font-size: 20px; }
}