/* ==========================================================================
   1. VARIABLES & BASE
   ========================================================================== */
:root {
    --bg-main: #FFFFFF;
    --text-main: #111827;
    --accent: #1D4ED8;
    --accent-dark: #1E3A8A;
    --border-soft: #E5E7EB;
    --radius-l: 24px;   /* Beau border-radius produits */
    --radius-m: 12px;
    --shadow-soft: 0 8px 20px rgba(15,23,42,0.06);
    --transition-fast: 0.2s ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; font-family: system-ui, sans-serif; background-color: var(--bg-main); color: var(--text-main); }
a { text-decoration: none; color: inherit; }

/* ==========================================================================
   2. HEADER & NAVIGATION (RESPONSIVE CLEAN + PATCH HAMBURGER)
   ========================================================================== */
header{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border-soft);
}

.navbar{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand{
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-dark);
  text-transform: uppercase;
  white-space: nowrap;
}

/* zone pliable en mobile */
.nav-collapse{
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

/* liens */
.nav-links{
  display: flex;
  gap: 16px;
  font-size: 13px;
}
.nav-links a{
  position: relative;
  color: #4B5563;
  transition: color var(--transition-fast);
}
.nav-links a::after{
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-fast);
}
.nav-links a:hover{ color: var(--accent); }
.nav-links a:hover::after{ width: 100%; }

/* search */
.nav-search{
  margin-left: auto;
  position: relative;
  min-width: 160px;
  max-width: 260px;
  flex: 1;
}
.nav-search input{
  width: 100%;
  padding: 7px 35px 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  font-size: 12px;
  outline: none;
}
.nav-search input:focus{
  border-color: rgba(29,78,216,0.45);
  box-shadow: 0 0 0 4px rgba(29,78,216,0.12);
}
.nav-search button{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--accent);
}

/* actions */
.nav-actions{
  display: flex;
  gap: 12px;
  align-items: center;
}

/* buttons */
.btn-small{
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline{
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline:hover{
  background: var(--accent);
  color: #FFF;
  transform: scale(1.02);
}
.btn-solid{
  background: var(--accent);
  color: #FFF;
  border: none;
  box-shadow: var(--shadow-soft);
}
.btn-solid:hover{
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29,78,216,0.30);
}

/* account dropdown */
.nav-account{ position: relative; }

.account-trigger{
  border: 1px solid #D1D5DB;
  background: #F9FAFB;
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
}
.account-trigger:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(29,78,216,0.12);
  border-color: rgba(29,78,216,0.45);
}

.account-menu {
  position: absolute;
  top: 100%; /* 1. On passe de 110% à 100% */
  margin-top: 12px; /* 2. On utilise une marge pour décoller le menu visuellement */
  right: 0;
  background: #FFF;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  border: 1px solid var(--border-soft);
  min-width: 180px;
  padding: 8px 0;

  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: all 0.2s;
}

/* 3. LE CORRECTIF : Le pont invisible entre le bouton et le menu */
.account-menu::before {
  content: '';
  position: absolute;
  top: -15px; /* Remonte dans la zone vide */
  left: 0;
  width: 100%;
  height: 15px; /* Comble exactement l'espace entre le bouton et le menu */
  background: transparent; 
}

/* On ajoute la classe .is-open pour le mobile */
.nav-account:hover .account-menu,
.nav-account.is-open .account-menu {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  z-index: 9999 !important; /* Assure qu'il n'est pas caché derrière un autre bloc */
}



.account-menu a{
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #374151;
}
.account-menu a:hover{
  background: #F3F4F6;
  color: var(--accent);
}

/* ==========================================================================
   PATCH : VRAI HAMBURGER (barres parallèles, pas de rotation)
   ========================================================================== */
.nav-toggle{
  display: none;
  margin-left: auto;
  border: 1px solid var(--border-soft);
  background: #F9FAFB;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  flex-direction: column;  /* FIX: barres verticales */
  align-items: center;
  justify-content: center;
  gap: 4px;  /* espacement entre les barres */
}

.nav-toggle span{
  display: block;
  width: 18px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  margin: 0;  /* FIX: pas de margin, on utilise gap sur le parent */
  transform: none !important;  /* kill rotation */
  opacity: 1 !important;       /* kill disparition */
  transition: none;            /* pas d'anim chelou */
}

/* petit feedback quand ouvert (sans changer les barres) */
.nav-toggle.is-open{
  background: #EEF2FF;
  border-color: rgba(29,78,216,0.25);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px){
  /* Container principal : pas de wrap, tout sur une ligne en haut */
  .navbar{
    gap: 0;
    flex-wrap: nowrap;  /* FIX: empêche le wrap qui pousse le logo */
    align-items: center;
    justify-content: space-between;
    position: relative;  /* Pour positionner le menu en absolu */
  }

  .brand{ 
    order: 1;
    flex: 0 0 auto;
    z-index: 10;  /* Au-dessus du menu */
  }
  
  .nav-toggle{ 
    display: flex;
    order: 2;
    flex: 0 0 auto;
    z-index: 10;  /* Au-dessus du menu */
  }

  /* FIX MAJEUR : Menu en position absolue pour ne pas pousser le logo */
  .nav-collapse{
    position: absolute;  /* Sort du flux normal */
    top: 100%;           /* Juste en dessous de la navbar */
    left: 0;
    right: 0;
    width: 100%;
    
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px 20px;
    
    background: rgba(255,255,255,0.98);  /* Même fond que le header */
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);  /* Petite ombre pour le relief */
    
    /* Animation d'ouverture */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .nav-collapse.is-open{ 
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  /* Navigation links empilés verticalement */
  .nav-links{
    flex-direction: column;
    gap: 4px;  /* Réduit pour plus de compacité */
    font-size: 14px;
    width: 100%;
  }

  .nav-links a{
    padding: 12px 16px;
    border-radius: 10px;
    display: block;
    width: 100%;
  }

  /* plus propre sur mobile */
  .nav-links a::after{ display: none; }
  .nav-links a:hover{
    background: #F3F4F6;
    color: var(--accent);
  }

  /* Barre de recherche pleine largeur */
  .nav-search{
    margin-left: 0;
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .nav-search input{
    font-size: 14px;
    padding: 10px 40px 10px 14px;
  }

  /* Actions en colonne */
  .nav-actions{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .btn-small{
    font-size: 12px;
    padding: 10px 14px;
    width: 100%;
    justify-content: center;
  }

  /* Compte utilisateur en mobile */
  .nav-account {
    width: 100%;
  }

  .account-trigger {
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
    font-size: 12px;
  }

  /* dropdown compte en mobile: sur clic (via JS) */
  .account-menu{
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    margin-top: 8px;
    display: none;
    width: 100%;
  }
  .nav-account:hover .account-menu{ display: none; }
  .account-menu.is-open{ display: block; }
  /* Adaptation de la preview pour mobile */
  .search-preview-dropdown {
    width: 100%;
    left: 0;
    right: 0;
  }
}

@media (max-width: 420px){
  .brand{ font-size: 18px; }
  
  .nav-collapse {
    gap: 14px;
    padding: 14px 16px;
  }
  
  .nav-links a {
    padding: 14px 16px;
    font-size: 15px;
  }
}
/* ==========================================================================
   NAVBAR CSS . SEARCH PREVIEW (LIVE SEARCH) - ADAPTÉ AU THÈME
   ========================================================================== */
   
/* Le conteneur parent .nav-search a déjà "position: relative;" dans ton code, c'est parfait ! */

.search-preview-dropdown {
  position: absolute;
  top: 100%;
  right: 0; /* On l'aligne sur la droite de la barre de recherche */
  left: auto; /* On annule le left: 0 */
  width: 350px; /* On donne une belle largeur fixe sur PC pour le confort de lecture */
  max-width: 90vw; /* Sécurité : ne jamais dépasser la taille de l'écran */
  background: #FFF;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
  z-index: 9999;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden; /* DIT BYE BYE AU SLIDER HORIZONTAL ! */
  margin-top: 8px;
  animation: fadeInDown 0.2s ease forwards;
}

/* Scrollbar personnalisée pour la liste */
.search-preview-dropdown::-webkit-scrollbar {
  width: 6px;
}
.search-preview-dropdown::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 10px;
}

/* Élément de la liste */
.search-preview-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  text-decoration: none;
  color: #374151; /* Couleur de texte du thème */
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.search-preview-item:hover {
  background: #F3F4F6; /* Gris léger au survol (identique au hover account) */
  color: var(--accent);
}

/* On enlève la bordure du dernier élément sauf s'il y a le bouton "Voir tout" */
.search-preview-item:last-child {
  border-bottom: none;
}

/* Image du produit */
.search-preview-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 12px;
  border: 1px solid var(--border-soft);
  background: #F9FAFB;
}

/* Conteneur texte */
.search-preview-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1; /* Prend l'espace restant */
  min-width: 0; /* LE TRUC MAGIQUE FLEXBOX : Autorise la troncature du texte (les ...) */
}

/* Sécurité supplémentaire sur le nom */
.search-preview-name {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.search-preview-price {
  color: var(--accent); /* Utilise ta couleur d'accent au lieu du rouge générique */
  font-size: 12px;
  font-weight: 700;
}

/* Bouton Voir tout en bas */
.search-preview-all {
  display: block;
  text-align: center;
  padding: 12px;
  background: #F9FAFB;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid var(--border-soft);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  transition: all var(--transition-fast);
}

.search-preview-all:hover {
  background: #EEF2FF; /* Le bleu très clair de ton feedback nav-toggle */
  color: var(--accent);
}

/* Message si aucun résultat */
.search-preview-empty {
  padding: 16px;
  text-align: center;
  color: #6B7280;
  font-size: 13px;
  font-style: italic;
}

/* Petite animation d'apparition */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   BADGE LIVRAISON INCLUSE (HEADER)
   ========================================== */
.nav-shipping {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f5f5f5, #ffffff);
    border: 1px solid #d4af37;          /* touche dorée premium */
    border-radius: 999px;
    color: #1a1a1a;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.nav-shipping:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, .25);
}

.nav-shipping-ico {
    font-size: 18px;
    animation: shippingPulse 2.5s ease-in-out infinite;
}

.nav-shipping-text {
    display: flex;
    flex-direction: column;
}

.nav-shipping-text strong {
    font-weight: 700;
    font-size: 13px;
    color: #1a1a1a;
    letter-spacing: .2px;
}

.nav-shipping-text small {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

@keyframes shippingPulse {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(3px); }
}

/* Mobile : pleine largeur, centré */
@media (max-width: 768px) {
    .nav-shipping {
        order: -1;
        align-self: stretch;
        justify-content: center;
        margin: 8px 0;
    }
}



/* ==========================================================================
   3. PRODUITS (STYLE COMPLET & UNIFORME)
   ========================================================================== */

.product-card {
    background: #bfd8f0; /* Ton bleu clair ou gris selon préférence */
    border-radius: var(--radius-l); /* 24px */
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex; 
    flex-direction: column;
    /* Suppression des conflits d'accueil.css */
    width: 100%; 
    max-width: 250px; 
}

.product-card:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.05); 
    border-color: var(--border-soft); 
}

/* Conteneur Image */
.product-image-wrap { 
    width: 100%; 
    aspect-ratio: 1/1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 15px;
    background: #f3f4f6;
    border-radius: 18px;
    overflow: hidden;
}

.product-image-wrap img { 
    width: 98%; 
    height: 98%; 
    object-fit: cover; 
    border-radius: 15px; /* Ton border-radius sur l'image */
    transition: transform 0.4s ease;
}

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

/* Infos Produit (Catégorie, Nom, Prix) */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-category {
    font-size: 0.75rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-name {
    margin: 5px 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.2;
}

/* Footer de la card (Prix + Bouton Voir) */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pousse le prix vers le bas */
    padding-top: 10px;
}

.product-price {
    font-weight: 700;
    color: var(--accent); /* Ton bleu SamLights */
    font-size: 1.15rem;
}

.link-voir {
    font-size: 0.9rem;
    color: #111827;
    font-weight: 500;
    transition: color 0.2s;
}

.link-voir:hover {
    color: var(--accent);
    text-decoration: underline;
}
/* ==========================================================================
   4. FOOTER (LOGOS HORIZONTAUX + SOULIGNEMENT + RESPONSIVE)
   ========================================================================== */
footer { 
    border-top: 1px solid var(--border-soft); 
    background: #FFFFFF; 
    margin-top: auto; 
}

.footer-inner { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 13px;
    color: #6B7280;
}

/* Logos sociaux en ligne */
.footer-socials { 
    display: flex; 
    flex-direction: row; 
    gap: 15px; 
    align-items: center; 
}

.social-icon { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 38px; 
    height: 38px; 
    background: #F3F4F6; 
    border-radius: 50%; 
    color: #374151; 
    transition: all 0.3s ease; 
    border: 1px solid #E5E7EB; 
}

/* Couleurs Hover Logos */
.footer-socials a:hover .fa-facebook-f { 
    background: #1877F2; 
    color: white; 
    border-color: #1877F2; 
    transform: scale(1.1);
}

.footer-socials a:hover .fa-instagram { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); 
    color: white; 
    border-color: transparent; 
    transform: scale(1.1);
}

.footer-socials a:hover .fa-linkedin-in { 
    background: #0A66C2; 
    color: white; 
    border-color: #0A66C2; 
    transform: scale(1.1);
}

/* Liens Légaux */
.footer-links { 
    display: flex; 
    gap: 20px; 
    font-size: 12px;
    flex-wrap: wrap;
}

.footer-links a { 
    position: relative; 
    color: #6B7280; 
    transition: color 0.2s;
    white-space: nowrap;
}

.footer-links a::after { 
    content: ''; 
    position: absolute; 
    bottom: -4px; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background-color: var(--accent); 
    transition: width 0.2s; 
}

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

.footer-links a:hover::after { 
    width: 100%; 
}

/* Footer responsive mobile */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        gap: 16px;
    }

    .footer-copyright {
        order: 3;
        font-size: 11px;
    }

    .footer-socials {
        order: 1;
        gap: 20px;
    }

    .social-icon {
        width: 42px;
        height: 42px;
    }

    .footer-links {
        order: 2;
        justify-content: center;
        gap: 16px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .footer-links a {
        display: block;
        padding: 8px;
    }
}

/* ==========================================================================
   5. PAGES LÉGALES (Mentions / CGV / Confidentialité)
   ========================================================================== */
.legal-wrap{
  max-width: 900px;
  margin: 28px auto;
  padding: 0 20px;
}

.legal-title{
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.legal-muted{
  color: #6B7280;
  font-size: 13px;
  margin: 0 0 18px;
}

.legal-card{
  background: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  margin: 14px 0;
}

.legal-wrap h2{
  font-size: 18px;
  margin: 22px 0 10px;
}

.legal-wrap p,
.legal-wrap li{
  color: #111827;
  line-height: 1.65;
  font-size: 14px;
}

.legal-wrap ul{
  padding-left: 18px;
}

.legal-sep{
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 18px 0;
}
