/* --- 1. CONFIGURATION GÉNÉRALE --- */
:root {
    --color-dark: #0a0a0a;
    --color-light: #f4f4f5;
    --color-fashion: #e11d48; /* Rouge Vibrant */
    --color-tech: #06b6d4;    /* Cyan Cyber */
    --font-main: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: var(--font-main);
    background-color: var(--color-dark);
    color: var(--color-light);
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- 2. HEADER & NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference; /* Permet au texte d'être lisible sur n'importe quel fond */
    color: white;
    
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: -1px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05); /* Le logo grossit légèrement au survol */
    opacity: 0.8;
}

.nav-links { 
    display: flex; 
    gap: 2rem; 
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.7;
}

.cart-icon { 
    cursor: pointer; 
    position: relative; 
    font-size: 1.2rem;
}

.cart-count {
    position: absolute;
    top: -8px; 
    right: -10px;
    background: var(--color-fashion);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-family: var(--font-main);
}

/* --- 3. HERO SECTION (SPLIT SCREEN) --- */
.hero {
    display: flex;
    height: 100vh;
    width: 100%;
}

.split {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    overflow: hidden;
    cursor: pointer;
}

/* Côté Mode */
.split.fashion {
    background-color: var(--color-light);
    color: var(--color-dark);
}

.split.fashion::before {
    content: ''; 
    position: absolute; 
    inset: 0;
    background: url('https://images.unsplash.com/photo-1523396870717-81661554fa86?auto=format&fit=crop&w=1350&q=80') center/cover;
    opacity: 0.1; 
    transition: 0.8s;
}

/* Côté Tech */
.split.tech {
    background-color: var(--color-dark);
    color: var(--color-light);
    border-left: 1px solid #222;
}

.split.tech::before {
    content: ''; 
    position: absolute; 
    inset: 0;
    background: url('https://images.unsplash.com/photo-1552831388-6a0b3575b32a?auto=format&fit=crop&w=1350&q=80') center/cover;
    opacity: 0.2; 
    transition: 0.8s;
}

/* Interaction au survol */
.split:hover { 
    flex: 2; 
}

.split:hover::before { 
    opacity: 0.3; 
    transform: scale(1.1); 
}

.content { 
    z-index: 10; 
    text-align: center; 
}

.content h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    line-height: 0.9;
    margin-bottom: 1rem;
}

.btn {
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font-family: var(--font-main);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 20;
}

/* Survol spécifique pour le côté MODE (Fond clair -> Bouton devient noir) */
.split.fashion .btn:hover {
    background: var(--color-dark);
    color: var(--color-light);
    border-color: var(--color-dark);
}

/* Survol spécifique pour le côté TECH (Fond sombre -> Bouton devient cyan) */
.split.tech .btn:hover {
    background: var(--color-tech);
    color: var(--color-dark);
    border-color: var(--color-tech);
}

/* --- 4. SECTION PRODUITS & FILTRES --- */
.products-section {
    padding: 8rem 5%;
    background: var(--color-dark);
}

.universe-selector {
    text-align: center;
    margin-bottom: 5rem;
}

#current-universe-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--color-fashion), var(--color-tech));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.7rem 1.8rem;
    border: 1px solid #333;
    border-radius: 50px;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-main);
    font-weight: 500;
}

.filter-chip:hover, .filter-chip.active {
    border-color: white;
    color: white;
}

.filter-chip.active {
    background: white;
    color: var(--color-dark);
}

/* --- 5. GRILLE DE PRODUITS --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    transition: opacity 0.4s ease;
}

.card {
    background: #121212;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #1f1f1f;
}

.card:hover {
    transform: translateY(-12px);
    border-color: #333;
}

.card-img-box { 
    height: 320px; 
    overflow: hidden; 
}

.card img { 
    height: 100%; 
    width: 100%;
    object-fit: cover;
    transition: 0.6s; 
}

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

.card-info { 
    padding: 1.5rem; 
}

.category-tag { 
    font-size: 0.75rem; 
    color: var(--color-tech); 
    text-transform: uppercase; 
    font-weight: 700;
    letter-spacing: 1px;
}

.card h3 { 
    margin: 0.5rem 0; 
    font-size: 1.3rem;
    font-family: var(--font-display);
}

.price { 
    font-size: 1.2rem; 
    font-weight: 300; 
    color: #eee; 
}

.add-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: white;
    color: black;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

.add-btn:hover { 
    background: var(--color-fashion); 
    color: white; 
}

/* --- 6. FOOTER --- */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #1f1f1f;
    color: #555;
    font-size: 0.9rem;
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 768px) {
    header { padding: 1rem 1.5rem; }
    .nav-links { display: none; } /* Cache les liens sur mobile pour la clarté */
    
    .hero { flex-direction: column; }
    .split:hover { flex: 1; }
    
    .content h2 { font-size: 3.5rem; }
    
    .products-section { padding: 4rem 5%; }
}

/* --- PANIER LATÉRAL (SIDEBAR) --- */
.cart-sidebar {
    position: fixed; /* Indispensable pour le sortir du flux normal */
    top: 0;
    right: -450px; /* On le cache à droite de l'écran */
    width: 400px;
    height: 100vh; /* Prend toute la hauteur */
    background: #0f0f0f;
    z-index: 1000; /* Le met au-dessus de tout le reste */
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid #222;
}

.cart-sidebar.open {
    right: 0; /* Quand on l'ouvre, il glisse vers la position 0 */
}

/* Header du panier */
.cart-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    background: #0a0a0a;
}

.cart-header h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0; }

.close-cart {
    background: none; border: none; color: white;
    font-size: 1.5rem; cursor: pointer; transition: 0.3s;
}
.close-cart:hover { color: var(--color-fashion); transform: rotate(90deg); }

/* Corps du panier */
.cart-items-body {
    flex: 1; 
    padding: 1.5rem;
    overflow-y: auto;
}

.empty-msg { text-align: center; color: #555; margin-top: 2rem; }

/* Design d'un article dans le panier */
.cart-item {
    display: flex; gap: 1rem; margin-bottom: 1rem;
    background: #151515; padding: 10px; border-radius: 8px;
    border: 1px solid #222;
    align-items: center;
}

.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.9rem; margin: 0 0 0.2rem 0; }
.cart-item-info p { color: var(--color-tech); font-weight: bold; font-size: 0.9rem; margin: 0; }

/* Footer du panier */
.cart-footer {
    padding: 1.5rem; border-top: 1px solid #222;
    background: #0a0a0a;
}

.total-box {
    display: flex; justify-content: space-between;
    font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem;
    color: white;
}

.checkout-btn {
    width: 100%; padding: 1rem;
    background: white; color: black; border: none;
    font-weight: bold; text-transform: uppercase; cursor: pointer;
    transition: 0.3s;
}
/* ✅ FIX MOBILE: bouton "Passer à la caisse" toujours visible */
.cart-items-body{
  padding-bottom: 140px; /* laisse de la place pour le footer */
  -webkit-overflow-scrolling: touch;
}

/* footer collé en bas même quand la liste est longue */
.cart-footer{
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: rgba(10,10,10,.92);       /* même ambiance que ton footer */
  backdrop-filter: blur(10px);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); /* iPhone */
}
.checkout-btn:hover { background: var(--color-fashion); color: white; }

/* Fond gris (overlay) */
.cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: none; z-index: 999; backdrop-filter: blur(4px);
}
.cart-overlay.show { display: block; }

/* --- PAGE PRODUIT DÉTAILLÉ --- */

header a.logo {
    text-decoration: none;
    color: white;
    display: inline-block;
}

.product-details-section {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    background: var(--color-dark);
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.back-link:hover { color: white; transform: translateX(-5px); }

/* Layout 2 colonnes */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Colonne Image */
.detail-img-box {
    background: #151515;
    border-radius: 20px;
    overflow: hidden;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #222;
}

.detail-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Change à 'contain' si tu veux voir le produit en entier sans coupe */
    transition: transform 0.5s;
}
.detail-img-box:hover img { transform: scale(1.05); }

/* Colonne Infos */
.detail-info h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.detail-category {
    color: var(--color-tech);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

.detail-price {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #eee;
}

.detail-description {
    color: #aaa;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 90%;
}

/* SÉLECTEUR DE TAILLE / OPTIONS */
.options-wrapper { margin-bottom: 2.5rem; }
.options-title { font-size: 0.9rem; margin-bottom: 1rem; color: white; font-weight: 600; }

.options-grid { display: flex; gap: 10px; flex-wrap: wrap; }

.option-btn {
    padding: 10px 20px;
    border: 1px solid #333;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    font-family: var(--font-main);
}

.option-btn:hover { border-color: white; color: white; }

.option-btn.selected {
    background: white;
    color: black;
    border-color: white;
    font-weight: bold;
}

.option-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

/* Bouton Ajouter au panier large */
.add-btn-large {
    width: 100%;
    padding: 1.2rem;
    background: var(--color-fashion);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    transition: 0.3s;
}
.add-btn-large:hover { filter: brightness(1.2); }

/* Responsive Mobile */
@media (max-width: 768px) {
    .product-container { grid-template-columns: 1fr; gap: 2rem; }
    .detail-img-box { height: 350px; }
    .detail-info h1 { font-size: 2rem; }
}

/* --- 8. SLOT PUBLICITAIRE --- */
.ad-slot.ad-hero{
  border:1px solid #1f1f1f;
  background:rgba(255,255,255,.03);
  border-radius:18px;
  padding:16px;
  margin:16px 0;
  display:flex;
  align-items:center;
  gap:16px;
}

.ad-slot.ad-hero .ad-media{
  width:200px;            /* ✅ plus grand */
  height:110px;           /* ✅ format bannière */
  border-radius:16px;
  overflow:hidden;
  border:1px solid #2a2a2a;
  flex:0 0 auto;
}

.ad-slot.ad-hero .ad-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ad-slot.ad-hero .meta{flex:1; min-width:0}
.ad-slot.ad-hero .meta .title{font-weight:900; font-size:16px}
.ad-slot.ad-hero .meta .desc{color:#9a9a9a; font-size:13px; margin-top:4px; line-height:1.35}

.ad-slot.ad-hero a{
  flex:0 0 auto;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(0,245,255,.28);
  background:rgba(0,245,255,.10);
  color:#fff;
  text-decoration:none;
  font-weight:900;
  white-space:nowrap;
}
@media (max-width: 680px){
  .ad-slot.ad-hero{
    flex-direction: column;
    align-items: stretch;
  }

  .ad-slot.ad-hero .ad-media{
    width: 100%;
    height: 160px; /* ajuste si tu veux */
  }

  .ad-slot.ad-hero a{
    width: 100%;
    justify-content: center;
  }
}