/* =====================================================================
   site_header.css — en-tête commun boutique / configurateur
   (includes/site_header.php) : polices, couleurs, boutons, bandeau
   haut et barre de navigation. Chargé avant shop.css côté boutique et
   après styles.css côté configurateur.
   Polices IBM Plex auto-hébergées (OFL), aucun appel à un service tiers.
   ===================================================================== */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-500.woff2") format("woff2"); }

:root {
  --site-font:      "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --site-font-mono: "IBM Plex Mono", Consolas, "SF Mono", monospace;
  --site-red:       rgb(192, 0, 0);
  --site-red-dark:  rgb(150, 0, 0);
  --shop-ink:    #16181B;
  --shop-ink-2:  #24272B;
  --shop-text-2: #4A4D52;
  --shop-muted:  #55585D;
  --shop-line:   #E2E2DE;
  --shop-line-2: #ECECE8;
  --shop-bg:     #F3F3F1;
}

.shop-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  width: 100%;
}

/* ---------- Boutons ---------- */
.shop-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-family: var(--site-font); font-size: 14px; font-weight: 600; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.shop-btn:disabled { opacity: .5; cursor: not-allowed; }
.shop-btn.shop-btn--primary             { background: var(--site-red); color: #fff; }
.shop-btn.shop-btn--primary:hover:not(:disabled) { background: var(--site-red-dark); }
.shop-btn.shop-btn--dark                   { background: var(--shop-ink); color: #fff; }
.shop-btn.shop-btn--dark:hover       { background: #000; }
.shop-btn.shop-btn--outline             { background: #fff; border-color: #D6D6D2; color: var(--shop-ink); }
.shop-btn.shop-btn--outline:hover { border-color: var(--shop-ink); }
.shop-btn.shop-btn--ghost                 { background: transparent; color: var(--shop-ink); }
.shop-btn.shop-btn--ghost:hover     { background: var(--shop-bg); }
.shop-btn.shop-btn--outline-light { border-color: #4A4D52; color: #fff; }
.shop-btn.shop-btn--outline-light:hover                     { border-color: #fff; }
.shop-btn.shop-btn--white                 { background: #fff; color: var(--site-red); }
.shop-btn.shop-btn--white:hover                             { background: #FFE9E9; }
.shop-btn--lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* ---------- Bandeau haut ---------- */
.shop-topbar { background: var(--shop-ink); color: #C9CBCF; font-family: var(--site-font); font-size: 12px; line-height: 1.5; }
.shop-topbar__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  padding-top: 8px; padding-bottom: 8px;
}
.shop-topbar__links { display: flex; gap: 20px; }
.shop-topbar .shop-topbar__links a { color: #C9CBCF; text-decoration: none; }
.shop-topbar .shop-topbar__links a:hover { color: #fff; }

/* ---------- En-tête ---------- */
.shop-header {
  background: #fff;
  border-bottom: 1px solid var(--shop-line);
  position: sticky; top: 0; z-index: 100;
  font-family: var(--site-font); line-height: 1.5;
}
.shop-header__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  padding-top: 14px; padding-bottom: 14px;
}
.shop-header__logo img { height: 38px; width: auto; display: block; }
.shop-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; flex: 1; }
.shop-header .shop-nav a,
.shop-header .shop-nav button {
  color: var(--shop-text-2); text-decoration: none;
  font-family: var(--site-font); font-size: 14px; font-weight: 500;
  padding: 10px 0; border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
}
.shop-header .shop-nav a:hover,
.shop-header .shop-nav button:hover { color: var(--shop-ink); }
.shop-header .shop-nav a.is-active { color: var(--shop-ink); border-bottom-color: var(--site-red); }
.shop-header__user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--shop-muted); }
.shop-header__hello { margin-right: 8px; }
.shop-header__hello strong { color: var(--shop-ink); }
.shop-header__sep { width: 1px; height: 28px; background: var(--shop-line); margin: 0 8px; }

/* Menu compte (utilisateur connecté) */
.shop-account { position: relative; }
.shop-account summary { list-style: none; }
.shop-account summary::-webkit-details-marker { display: none; }
.shop-account summary::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.shop-account summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.shop-account.is-active summary { border-color: var(--shop-ink); }
.shop-account__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 200;
  min-width: 240px; background: #fff;
  border: 1px solid var(--shop-line); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  padding: 6px; display: flex; flex-direction: column;
}
.shop-account__head {
  padding: 10px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--shop-line-2);
  display: flex; flex-direction: column; gap: 2px;
}
.shop-account__head strong { color: var(--shop-ink); font-size: 14px; }
.shop-account__head span { font-size: 12px; color: var(--shop-muted); overflow-wrap: anywhere; }
.shop-account .shop-account__menu a {
  padding: 10px 12px; border-radius: 6px;
  color: var(--shop-ink); text-decoration: none; font-size: 14px;
}
.shop-account .shop-account__menu a:hover { background: var(--shop-bg); }
.shop-account .shop-account__menu a[aria-current="page"] { font-weight: 600; }
.shop-account .shop-account__menu a.shop-account__logout { color: var(--site-red); border-top: 1px solid var(--shop-line-2); margin-top: 4px; border-radius: 0 0 6px 6px; }

@media (max-width: 640px) {
  .shop-topbar__inner > span:first-child { display: none; }
  .shop-header { position: static; }
  .shop-header__user { width: 100%; }
}
