/* ==================== En-tete ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 19, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.site-header.is-scrolled {
  background: rgba(10, 13, 19, 0.96);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.site-header.is-scrolled .navbar { height: calc(var(--header-height) - 10px); }

/* Barre de progression de lecture (haut de page) */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary-gradient);
  z-index: 300;
  transition: width 0.1s linear;
}

/* L'en-tete a besoin de plus de largeur que le contenu du site : on lui donne un
   conteneur plus large qu'ailleurs plutot que de laisser la recherche/les icones
   se faire comprimer dans les 1280px habituels. */
.site-header .container { max-width: 1480px; }

.navbar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--header-height);
  transition: height var(--dur-fast) ease;
}

/* ---- Bandeau de navigation par categories (sous la ligne logo/recherche/compte) ---- */
.site-nav {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.nav-secondary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.nav-trust-row { display: flex; align-items: center; gap: var(--space-5); flex-shrink: 0; }
.nav-trust-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) 0; }
.nav-trust-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary-2); }
.nav-trust-item span { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.nav-trust-item strong { font-size: 0.8rem; font-weight: 700; color: var(--text); }
.nav-trust-item small { font-size: 0.72rem; font-weight: 500; color: var(--text-faint); }

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  object-fit: contain;
  display: block;
  transition: transform var(--dur-med) var(--ease-bounce);
}
.brand:hover .brand-mark { transform: rotate(-10deg) scale(1.08); }
.brand-accent { background: var(--primary-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.brand-logo-full { display: block; height: 40px; width: auto; transition: transform var(--dur-med) var(--ease-bounce); }
.brand:hover .brand-logo-full { transform: scale(1.03); }
.site-header .brand .brand-logo-full { height: 34px; }

.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}
.nav-main a {
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: var(--space-3) 0;
  transition: color var(--transition);
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -1px;
  height: 2px;
  background: var(--primary-gradient);
  transition: right var(--dur-fast) var(--ease-snap);
}
.nav-main a:hover, .nav-main a.active { color: var(--text); }
.nav-main a:hover::after, .nav-main a.active::after { right: 0; }

/* ---- Menu deroulant de la nav ("Peripheriques" regroupe plusieurs categories) ---- */
.nav-dropdown { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.nav-dropdown-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  margin-left: 2px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-faint);
  transition: transform var(--dur-fast) var(--ease-snap), color var(--transition);
}
.nav-dropdown-toggle svg { width: 13px; height: 13px; }
.nav-dropdown:hover .nav-dropdown-toggle, .nav-dropdown.open .nav-dropdown-toggle { color: var(--text); }
.nav-dropdown.open .nav-dropdown-toggle { transform: rotate(180deg); }
@media (hover: hover) { .nav-dropdown:hover .nav-dropdown-toggle { transform: rotate(180deg); } }

.nav-dropdown-menu {
  position: absolute;
  top: 100%; left: 50%;
  padding-top: var(--space-3);
  margin-top: 0;
  transform: translateX(-50%);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) ease;
}
/* La carte visible vit dans un enfant : le padding-top du parent ci-dessus
   comble le "trou" entre le lien et le menu sans casser le survol continu
   (sinon le curseur perd le :hover en traversant l'espace et le menu se
   referme avant qu'on ait pu cliquer sur "Claviers" etc.) */
.nav-dropdown-menu-inner {
  min-width: 230px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
}
.nav-dropdown.open .nav-dropdown-menu { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .nav-dropdown:hover .nav-dropdown-menu { opacity: 1; pointer-events: auto; }
}

/* Specificite superieure a ".nav-main a" (0,1,1) volontaire : sinon ce
   selecteur generique (qui matche aussi ces liens, imbriques dans .nav-main)
   ecrase silencieusement le padding/couleur voulus ici. */
.nav-dropdown-menu .nav-dropdown-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu .nav-dropdown-item img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.nav-dropdown-menu .nav-dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.nav-dropdown-menu .nav-dropdown-item-all { border-top: 1px solid var(--border); margin-top: var(--space-1); padding-top: var(--space-2); justify-content: space-between; color: var(--primary-2); }
.nav-dropdown-menu .nav-dropdown-item-all svg { width: 14px; height: 14px; }

.nav-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }

/* ---- Boutons "Favoris" / "Panier" en icone + texte deux lignes (identiques a la maquette) ---- */
.nav-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 42px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform var(--dur-fast) var(--ease-bounce);
}
.nav-action-link:hover { border-color: var(--primary); background: var(--surface-hover); transform: translateY(-2px); }
.nav-action-link:active { transform: translateY(0) scale(0.97); }
.nav-action-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-action-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; white-space: nowrap; }
.nav-action-text strong { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.nav-action-text small { font-size: 0.74rem; font-weight: 500; color: var(--text-faint); }

.nav-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform var(--dur-fast) var(--ease-bounce);
}
.nav-icon-btn:hover { border-color: var(--primary); background: var(--surface-hover); transform: translateY(-2px); }
.nav-icon-btn:active { transform: translateY(0) scale(0.94); }
.nav-icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 19px; height: 19px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.cart-count.bump { animation: cart-bump 0.45s var(--ease-bounce); }
@keyframes cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.6) rotate(10deg); }
  70% { transform: scale(0.9) rotate(-6deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ---- Menu deroulant "Mon compte" (connexion, commandes, favoris, comparateur) ---- */
.account-menu { position: relative; flex-shrink: 0; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 42px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color var(--transition), background var(--transition), transform var(--dur-fast) var(--ease-bounce);
}
.account-trigger:hover { border-color: var(--primary); background: var(--surface-hover); transform: translateY(-2px); }
.account-trigger svg { width: 20px; height: 20px; flex-shrink: 0; }
.account-trigger-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; white-space: nowrap; }
.account-trigger-text strong { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.account-trigger-text small { font-size: 0.74rem; font-weight: 500; color: var(--text-faint); }
.account-menu.open .account-trigger { background: var(--surface-2); }

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-2);
  z-index: 120;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-snap);
}
.account-menu.open .account-dropdown { opacity: 1; transform: translateY(0); pointer-events: auto; }
.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.account-dropdown-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-faint); }
.account-dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.account-dropdown-item:hover svg { color: var(--primary-2); }
.account-dropdown-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
}
.account-dropdown-sep { border: none; border-top: 1px solid var(--border); margin: var(--space-2) var(--space-1); }
.account-dropdown-danger { color: var(--danger); }
.account-dropdown-danger svg { color: var(--danger); }
.account-dropdown-danger:hover { background: rgba(255, 84, 112, 0.1); color: var(--danger); }
.account-dropdown-danger:hover svg { color: var(--danger); }

/* ==================== Bouton retour en haut ==================== */
.back-to-top {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: var(--shadow-3d);
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  pointer-events: none;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-bounce);
  z-index: 150;
}
.back-to-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px) scale(1.05); }
.back-to-top svg { width: 20px; height: 20px; }

.search-form {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 640px;
  height: 46px;
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.search-form:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16), var(--shadow-glow);
}
.search-form input {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0 1.3rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
}
.search-form input::placeholder { color: var(--text-faint); font-weight: 400; }
.search-form input:focus { outline: none; }
.search-form-submit {
  order: 2;
  position: static;
  flex-shrink: 0;
  width: 50px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-gradient);
  color: #fff;
  transition: filter var(--dur-fast) ease, width var(--dur-fast) ease;
}
.search-form-submit:hover { filter: brightness(1.12); }
.search-form-submit:active { filter: brightness(0.94); }
.search-form-submit svg { width: 18px; height: 18px; }
.search-form input[readonly] { cursor: pointer; }

/* ==================== Plein ecran de recherche ==================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-snap);
  overflow-y: auto;
}
.search-overlay.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.search-overlay-top { border-bottom: 1px solid var(--border); background: var(--surface); }
.search-overlay-top-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); }
.search-overlay-top-actions { display: flex; align-items: center; gap: var(--space-3); }
.search-overlay-close {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-bounce), background var(--transition), color var(--transition);
}
.search-overlay-close:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }
.search-overlay-close svg { width: 18px; height: 18px; }

.search-overlay-body { padding: var(--space-8) 0 var(--space-10); }
.search-overlay-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-8);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-overlay-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 4px 20px -8px rgba(124, 92, 255, 0.5); }
.search-overlay-input-wrap svg { width: 24px; height: 24px; color: var(--text-faint); flex-shrink: 0; transition: color var(--transition); }
.search-overlay-input-wrap:focus-within svg { color: var(--primary-2); }
.search-overlay-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.8rem);
  font-weight: 600;
  color: var(--text);
}
.search-overlay-input-wrap input::placeholder { color: var(--text-faint); }

.search-overlay-heading { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-4); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.search-overlay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-5); }
.search-overlay-card { display: flex; flex-direction: column; gap: var(--space-2); }
.search-overlay-card-img {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: block;
  transition: transform var(--dur-fast) var(--ease-bounce), border-color var(--transition);
}
.search-overlay-card:hover .search-overlay-card-img { transform: translateY(-4px); border-color: var(--border-light); }
.search-overlay-card-img img { width: 100%; height: 100%; object-fit: cover; }
.search-overlay-card-name { font-size: 0.88rem; font-weight: 600; color: var(--text); line-height: 1.3; transition: color var(--transition); }
.search-overlay-card:hover .search-overlay-card-name { color: var(--primary-2); }
.search-overlay-card-price { font-size: 0.9rem; font-weight: 700; color: var(--primary-2); }
.search-overlay-empty { color: var(--text-faint); padding: var(--space-2) 0; }

@media (max-width: 640px) {
  .search-overlay-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
  .search-overlay-body { padding: var(--space-5) 0 var(--space-8); }
  .search-overlay-input-wrap { margin-bottom: var(--space-6); }
}

/* ---- Suggestions de recherche instantanee ---- */
.search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 120;
  max-height: 70vh;
  overflow-y: auto;
}
.search-suggestions.open { display: block; animation: mobile-panel-in 0.18s var(--ease-snap); }
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.search-suggestion-item:hover, .search-suggestion-item.active { background: var(--surface-2); }
.search-suggestion-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-alt); flex-shrink: 0; }
.search-suggestion-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.search-suggestion-name { font-size: 0.86rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggestion-brand { font-size: 0.72rem; color: var(--text-faint); }
.search-suggestion-price { font-size: 0.86rem; font-weight: 700; color: var(--primary-2); white-space: nowrap; }
.search-suggestion-empty { padding: var(--space-4); text-align: center; color: var(--text-faint); font-size: 0.85rem; }
.search-suggestion-footer {
  display: block;
  text-align: center;
  padding: var(--space-3);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-2);
  background: var(--bg-alt);
}
.search-suggestion-footer:hover { background: var(--surface-2); }

.mobile-toggle { display: none; }

.burger-btn { flex-direction: column; gap: 5px; }
.burger-line {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: var(--radius-full);
  transition: transform var(--dur-fast) var(--ease-snap), opacity var(--dur-fast) ease;
}
.burger-btn.active .burger-line-1 { transform: translateY(7px) rotate(45deg); }
.burger-btn.active .burger-line-2 { opacity: 0; transform: scaleX(0); }
.burger-btn.active .burger-line-3 { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .site-nav { border-top: 0; }
  .nav-main { display: none; }
  .mobile-toggle { display: inline-flex; }

  .nav-main.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-4) var(--space-5);
    gap: var(--space-1);
    z-index: 99;
    box-shadow: var(--shadow-md);
    animation: mobile-panel-in 0.28s var(--ease-snap);
  }
  .nav-main a { padding: var(--space-3) var(--space-2); border-radius: var(--radius-sm); }
  .nav-main a:hover { background: var(--surface-2); }

  .nav-dropdown { flex-wrap: wrap; width: 100%; justify-content: center; }
  .nav-dropdown-menu {
    position: static;
    left: auto;
    transform: none;
    flex-basis: 100%;
    width: 100%;
    padding-top: 0;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu-inner {
    border: none;
    box-shadow: none;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    margin-top: var(--space-1);
  }
}

@keyframes mobile-panel-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .nav-trust-row { display: none; }
}

@media (max-width: 640px) {
  .account-trigger-text, .nav-action-text { display: none; }
  .account-trigger, .nav-action-link {
    width: 42px;
    padding: 0;
    justify-content: center;
  }
  .account-dropdown { right: -12px; }
  .search-form { flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--radius-md); }
  .search-form input {
    -webkit-appearance: none;
    appearance: none;
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    outline: none;
    box-shadow: none;
    opacity: 0;
    cursor: pointer;
  }
  .search-form-submit {
    width: 100%; height: 100%;
    background: var(--surface);
    color: var(--text);
    pointer-events: none;
  }
}

@media (max-width: 560px) {
  .navbar { gap: var(--space-3); }
  .nav-actions { gap: var(--space-2); }
  .site-header .brand .brand-logo-full { height: 28px; }
}

@media (max-width: 420px) {
  .navbar { gap: var(--space-2); }
  .site-header .brand .brand-logo-full { height: 24px; }
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-faint);
  padding: var(--space-4) 0;
}
.breadcrumb a:hover { color: var(--primary-2); }
.breadcrumb span::before { content: "/"; margin-right: var(--space-2); color: var(--text-faint); }
.breadcrumb span:first-child::before { content: none; }

/* ==================== Pied de page ==================== */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: var(--space-10);
  padding: var(--space-8) 0 var(--space-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-6);
}
.footer-grid-4 { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
.footer-grid h4 { color: var(--text); font-size: 0.95rem; margin-bottom: var(--space-4); }
.footer-brand-accent { color: var(--primary-2); }
.footer-grid ul { max-height: 340px; overflow-y: auto; padding-right: var(--space-2); }
.footer-grid ul li { margin-bottom: var(--space-2); }
.footer-grid a { color: var(--text-muted); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--primary-2); }
.footer-col-info .payment-icons { margin-top: var(--space-4); }

.footer-newsletter-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}
.footer-newsletter-band h4 { margin-bottom: var(--space-1); }
.footer-newsletter-band p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.footer-newsletter-band .footer-newsletter-form { margin-top: 0; flex-shrink: 0; width: min(360px, 100%); }

.footer-bottom {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--text-faint);
  font-size: 0.82rem;
}
.footer-bottom-mentions { color: var(--text-faint); }
.footer-socials { display: flex; align-items: center; gap: var(--space-3); }
.footer-socials a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition), transform var(--dur-fast) var(--ease-snap);
}
.footer-socials a svg { width: 16px; height: 16px; }
.footer-socials a:hover { background: var(--primary-gradient); color: #fff; transform: translateY(-2px); }
@media (max-width: 520px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-newsletter-band { flex-direction: column; align-items: stretch; }
}
.footer-contact-list { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.footer-contact-list li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: 0.86rem; color: var(--text-muted); }
.footer-contact-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--primary-2); }

.footer-categories-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-4); }

.footer-newsletter-form { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.footer-newsletter-form .form-control { flex: 1; min-width: 0; }
.footer-newsletter-form .btn { flex-shrink: 0; }
@media (max-width: 420px) {
  .footer-newsletter-form { flex-direction: column; }
}

.payment-icons { display: flex; gap: var(--space-2); }
.payment-icons .pi {
  width: 40px; height: 26px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 800; color: var(--text-muted);
}
.payment-icons .pi.pi-logo { background: #fff; border-color: transparent; padding: 3px; }
.payment-icons .pi.pi-logo img { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); text-align: left; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}

/* ==================== Grille produits ==================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

.section {
  padding: var(--space-8) 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}
.section-head p { margin: 0; }

/* ==================== Cookie banner ==================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -8px 30px rgba(0,0,0,0.4);
  padding: var(--space-4) 0;
}
.cookie-banner .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 0.88rem; max-width: 640px; }
.cookie-actions { display: flex; gap: var(--space-3); flex-shrink: 0; }

/* Evite que le bouton "retour en haut" chevauche le bandeau cookies */
body:has(.cookie-banner) .back-to-top { bottom: 110px; }
@media (max-width: 640px) {
  body:has(.cookie-banner) .back-to-top { bottom: 150px; }
}

/* =====================================================================
   EN-TETE "PRO" (v2) - surcouche des regles d'origine ci-dessus
   - fond opaque : l'ancien backdrop-filter etait recalcule a chaque image
     de scroll sur toutes les pages (couteux, surtout sur mobile) ;
   - recherche facon "barre de commande" (raccourci Ctrl+K, voir search.js) ;
   - lien de navigation actif surligne (classe .active posee dans header.php).
   ===================================================================== */
.site-header {
  background: #090c13;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 0;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.7) 20%, rgba(0, 212, 255, 0.7) 80%, transparent);
  pointer-events: none;
}
.site-header.is-scrolled { background: #090c13; box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.85); }

/* ---- Recherche ---- */
.search-kbd { display: none; }
@media (min-width: 641px) {
  .navbar { gap: var(--space-6); }
  .search-form {
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  .search-form:hover { border-color: rgba(255, 255, 255, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
  .search-form:focus-within { border-color: rgba(0, 212, 255, 0.6); box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12); }
  .search-form-submit { order: 0; width: 46px; background: transparent; color: var(--text-muted); }
  .search-form-submit:hover { color: #fff; filter: none; }
  .search-form input { order: 1; padding: 0 0.4rem 0 0; }
  .search-kbd {
    order: 2;
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-right: 12px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    white-space: nowrap;
    pointer-events: none;
  }

  /* ---- Boutons compte / favoris / panier ---- */
  .account-trigger,
  .nav-action-link {
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.09);
  }
  .account-trigger:hover,
  .nav-action-link:hover { border-color: rgba(0, 212, 255, 0.5); background: rgba(0, 212, 255, 0.06); transform: translateY(-1px); }
  .nav-action-cart {
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.24), rgba(0, 212, 255, 0.14));
    border-color: rgba(124, 92, 255, 0.5);
  }
  .nav-action-cart:hover { background: linear-gradient(135deg, rgba(124, 92, 255, 0.34), rgba(0, 212, 255, 0.22)); }
}
.cart-count { box-shadow: 0 0 0 2px #090c13, 0 4px 12px -2px rgba(124, 92, 255, 0.7); }
.account-dropdown,
.nav-dropdown-menu-inner {
  border-radius: 16px;
  background: #111623;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(124, 92, 255, 0.12);
}
.account-dropdown-item,
.nav-dropdown-menu .nav-dropdown-item { border-radius: 10px; }

/* ---- Ligne de navigation ---- */
.site-nav { background: #0b0e17; border-top: 1px solid rgba(255, 255, 255, 0.05); }
@media (min-width: 861px) {
  .nav-secondary-row { min-height: 54px; }
  .nav-main { gap: 4px; }
  .nav-main > a,
  .nav-dropdown > .nav-dropdown-link {
    padding: 8px 14px;
    border-radius: 10px;
    transition: color var(--transition), background var(--transition), box-shadow var(--transition);
  }
  .nav-main > a::after,
  .nav-dropdown > .nav-dropdown-link::after { display: none; }
  .nav-main > a:hover,
  .nav-dropdown > .nav-dropdown-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
  .nav-main > a.active,
  .nav-dropdown > .nav-dropdown-link.active {
    color: #fff;
    background: rgba(124, 92, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.4);
  }
  .nav-trust-row { gap: var(--space-3); }
  .nav-trust-item {
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-trust-item svg {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 9px;
    background: rgba(0, 212, 255, 0.1);
  }
}
/* Menu mobile : panneau aux couleurs du nouvel en-tete */
@media (max-width: 860px) {
  .nav-main.open { background: #0b0e17; border-bottom-color: rgba(255, 255, 255, 0.08); }
  .nav-main.open > a.active { color: #fff; background: rgba(124, 92, 255, 0.14); }
}.search-form-submit { border: 0; }
/* Petits ecrans : 5 boutons + logo ne tiennent pas -> "Favoris" est masque
   (toujours accessible dans le menu "Mon compte" > Liste de souhaits). */
@media (max-width: 420px) {
  .nav-actions .nav-action-link:not(.nav-action-cart) { display: none; }
}
/* =====================================================================
   BOUTONS DU HEADER "PRO" (compte / favoris / panier)
   Tout s'anime uniquement au survol / a l'ouverture (rien en continu au repos) :
   faisceau lumineux qui fait le tour de la bordure, icones animees, appui.
   ===================================================================== */
@property --beam {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes header-beam { to { --beam: 360deg; } }
@keyframes header-heart {
  0%, 100% { transform: scale(1); }
  22% { transform: scale(1.24); }
  42% { transform: scale(0.94); }
  62% { transform: scale(1.12); }
}
@keyframes header-cart {
  0% { transform: none; }
  35% { transform: translateX(4px) rotate(-7deg); }
  70% { transform: translateX(-2px) rotate(2deg); }
  100% { transform: none; }
}
@keyframes header-dd-item {
  from { opacity: 0; transform: translate3d(0, 6px, 0); }
  to { opacity: 1; transform: none; }
}

/* Avatar (initiale) du client connecte, avec point vert "en ligne" */
.account-avatar-mini {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #00d4ff);
  box-shadow: 0 0 0 2px #090c13, 0 0 0 3px rgba(124, 92, 255, 0.55), 0 6px 16px -6px rgba(0, 212, 255, 0.7);
  color: #fff;
  font-family: "Unbounded", var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease-bounce);
}
.account-avatar-mini::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px #090c13;
}
.account-trigger:hover .account-avatar-mini,
.account-menu.open .account-avatar-mini { transform: scale(1.08) rotate(-6deg); }

.account-chevron {
  width: 14px !important;
  height: 14px !important;
  color: var(--text-faint);
  transition: transform 0.3s var(--ease-snap), color 0.3s ease;
}
.account-menu.open .account-chevron { transform: rotate(180deg); color: var(--primary-2); }

.account-trigger svg,
.nav-action-link svg { transition: transform 0.35s var(--ease-bounce); }
.account-trigger:active,
.nav-action-link:active { transform: scale(0.96) !important; }

@media (min-width: 641px) {
  .account-trigger,
  .nav-action-link { position: relative; isolation: isolate; }
  /* Faisceau lumineux sur la bordure (anneau masque, angle anime au survol) */
  .account-trigger::before,
  .nav-action-link::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    padding: 1.5px;
    border-radius: inherit;
    background: conic-gradient(from var(--beam), transparent 0 52%, rgba(124, 92, 255, 0.95) 68%, #00d4ff 84%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .account-trigger:hover::before,
  .nav-action-link:hover::before,
  .account-menu.open .account-trigger::before {
    opacity: 1;
    animation: header-beam 2.4s linear infinite;
  }
  /* Ecran tactile (menu compte ouvert) : faisceau fixe. Une animation sans fin sur
     un pseudo-element ferait repasser toute la page par le thread principal. */
  @media (hover: none) {
    .account-menu.open .account-trigger::before { animation: none; }
  }
  .account-trigger:hover,
  .nav-action-link:hover,
  .account-menu.open .account-trigger {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 30px -12px rgba(0, 212, 255, 0.55), 0 0 0 1px rgba(124, 92, 255, 0.18);
  }

  /* Favoris : le coeur bat ; Panier : le chariot roule */
  .nav-action-link:not(.nav-action-cart):hover svg { animation: header-heart 0.9s ease-in-out; color: #ff6b8b; }
  .nav-action-cart:hover svg { animation: header-cart 0.7s var(--ease-snap); }
  .nav-action-cart .nav-action-text small {
    font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    color: #b9c6ff;
  }
}
@media (max-width: 640px) {
  .account-chevron { display: none; }
  .account-avatar-mini { width: 28px; height: 28px; font-size: 0.72rem; }
}

/* Menu "Mon compte" : ouverture avec les liens en cascade */
.account-dropdown { transform-origin: top right; }
.account-menu.open .account-dropdown-item { animation: header-dd-item 0.35s var(--ease-snap) backwards; }
.account-menu.open .account-dropdown-item:nth-child(2) { animation-delay: 0.03s; }
.account-menu.open .account-dropdown-item:nth-child(3) { animation-delay: 0.06s; }
.account-menu.open .account-dropdown-item:nth-child(4) { animation-delay: 0.09s; }
.account-menu.open .account-dropdown-item:nth-child(5) { animation-delay: 0.12s; }
.account-menu.open .account-dropdown-item:nth-child(n+6) { animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .account-trigger:hover::before,
  .nav-action-link:hover::before,
  .account-menu.open .account-trigger::before { animation: none; }
}
/* ".container.section" : la regle .section (padding: X 0) annulait les marges
   laterales du conteneur -> contenu colle aux bords de l'ecran sur mobile,
   sur toutes les pages. On retablit les marges du conteneur. */
.container.section { padding-left: var(--space-5); padding-right: var(--space-5); }
@media (max-width: 420px) {
  .container.section { padding-left: var(--space-4); padding-right: var(--space-4); }
}
/* =====================================================================
   PIED DE PAGE "PRO" (v2) - surcouche des regles d'origine
   ===================================================================== */
/* ---- Bande de reassurance : 4 tuiles en verre ---- */
.trust-band { background: #090c13; padding: var(--space-8) 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.trust-icons-row { gap: var(--space-4); }
.trust-icons-row .trust-icon-item {
  padding: var(--space-5) var(--space-4);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 55%), #10141f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.35s var(--ease-snap), border-color 0.3s ease, box-shadow 0.3s ease;
}
.trust-icons-row .trust-icon-item:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 24px 50px -28px rgba(62, 166, 255, 0.55);
}
.trust-icon-tile {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.22), rgba(0, 212, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 26px -12px rgba(124, 92, 255, 0.7);
}
.trust-icons-row h4 { font-family: "Unbounded", var(--font-display); font-size: 0.8rem; letter-spacing: -0.01em; text-transform: none; }

/* ---- Pied de page ---- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: var(--space-10) 0 var(--space-5);
  background:
    radial-gradient(ellipse 50% 60% at 0% 0%, rgba(124, 92, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 100%, rgba(0, 212, 255, 0.08), transparent 70%),
    #07090f;
  border-top: 0;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.7) 20%, rgba(0, 212, 255, 0.7) 80%, transparent);
}
.site-footer .container { position: relative; z-index: 1; }
.footer-grid h4 {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-2);
}
.footer-col-info h4 { font-family: "Unbounded", var(--font-display); font-size: 1rem; letter-spacing: -0.02em; text-transform: none; color: #fff; }
.footer-col-info p { color: var(--text-muted); line-height: 1.65; font-size: 0.9rem; }
/* Liens avec fleche qui glisse au survol */
.footer-grid ul li a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  transition: color var(--transition), transform 0.3s var(--ease-snap);
}
.footer-grid ul li a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.45;
  transition: opacity 0.3s ease;
}
.footer-grid ul li a:hover { color: #fff; transform: translateX(4px); }
.footer-grid ul li a:hover::before { opacity: 1; color: var(--primary-2); }
.footer-grid .footer-contact-list li a::before { content: none; }
.footer-grid .footer-contact-list li a:hover { transform: none; }

/* Newsletter : carte mise en avant */
.footer-newsletter-band {
  position: relative;
  margin-top: var(--space-8);
  padding: var(--space-6);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 60% 120% at 0% 50%, rgba(124, 92, 255, 0.25), transparent 70%),
    radial-gradient(ellipse 50% 120% at 100% 50%, rgba(0, 212, 255, 0.14), transparent 70%),
    #10141f;
  border: 1px solid rgba(124, 92, 255, 0.3);
  box-shadow: 0 30px 60px -36px rgba(124, 92, 255, 0.6);
}
.footer-eyebrow {
  display: block;
  margin-bottom: 6px;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-2);
}
.footer-newsletter-band h4 { font-family: "Unbounded", var(--font-display); font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.45rem); letter-spacing: -0.03em; color: #fff; }
.footer-newsletter-band .footer-newsletter-form {
  width: min(420px, 100%);
  padding: 5px;
  gap: 5px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.footer-newsletter-band .footer-newsletter-form:focus-within { border-color: rgba(0, 212, 255, 0.6); box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12); }
.footer-newsletter-band .footer-newsletter-form .form-control { height: 44px; background: transparent; border: 0; box-shadow: none; }
.footer-newsletter-band .footer-newsletter-form .btn { height: 44px; border-radius: 10px; padding: 0 1.2rem; }

/* Grand "ELECSTORE" en filigrane */
.footer-watermark {
  margin: var(--space-8) 0 calc(var(--space-6) * -1);
  font-family: "Unbounded", var(--font-display);
  font-size: clamp(2.2rem, 0.4rem + 10.5vw, 11rem);
  font-weight: 800;
  line-height: 0.9;
  overflow: hidden;
  letter-spacing: -0.05em;
  text-align: center;
  color: transparent;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.28), rgba(0, 212, 255, 0.06) 60%, transparent 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.footer-bottom { position: relative; border-top-color: rgba(255, 255, 255, 0.07); }
.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-socials a:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 10px 22px -10px rgba(124, 92, 255, 0.8); }
.payment-icons .pi.pi-logo { border-radius: 6px; }

@media (max-width: 520px) {
  .footer-watermark { margin-bottom: calc(var(--space-4) * -1); }
  .footer-newsletter-band { padding: var(--space-5); }
}