/* =====================================================================
   PIRATE PARFUM — css/style.css
   Design de référence : esthétique "baie des pirates" années 2000
   (fond blanc, Verdana, liens violets soulignés, tableaux denses,
   bannières kitsch). C'est un choix de marque assumé — ne pas "moderniser"
   l'identité visuelle.

   Seuls écarts au design d'origine (justifiés, quasi invisibles) :
   - gris de texte #888 / #999 / #aaa / #bbb  →  var(--gris-texte) (contraste AA 4.5:1)
   - bordures des champs/boutons #999        →  var(--gris-texte) (contraste UI 3:1)
   - texte du badge "rupture" #b35900        →  #9a4c00 (AA sur fond #fdeada)
   - fond du bouton désactivé #999           →  var(--gris-texte) (texte blanc lisible)
   - la section "Modernisation" en fin de fichier : focus visible,
     transitions ≤150 ms, responsive <600 px, prefers-reduced-motion.

   Ajustements visuels (2026) :
   - couleurs du thème centralisées en variables :root (mêmes valeurs)
   - espacements verticaux entre sections normalisés sur une grille de 8 px
   - topbar sticky hors accueil ; mini-logo 36×36 contain ; nom du site
     en "Pirata One" (blackletter du logo — seule exception à Verdana)
   ===================================================================== */

/* ---- Thème : définition unique des couleurs ---- */
:root {
  --violet: #551a8b;        /* liens, accents */
  --violet-hover: #7b2fbe;  /* survol de TOUS les liens texte */
  --violet-pale: #f3ecff;   /* fond de survol (suggestions, cartes) */
  --vert: #067d06;          /* achat, stock ok */
  --vert-hover: #0a9c0a;
  --or: #f0c000;            /* bordures des bannières pub */
  --gris-texte: #767676;    /* gris AA : textes secondaires, bordures de champs */
  --bordure-foncee: #ccc;   /* bordures tableaux / chrome */
  --bordure: #ddd;          /* bordures cellules / cadres */
  --bordure-claire: #eee;   /* séparateurs légers */
}

* { box-sizing: border-box; }
body { font-family: Verdana, Geneva, sans-serif; background: #fff; color: #000; margin: 0; font-size: 12px; }
a { color: var(--violet); text-decoration: underline; cursor: pointer; }
a:hover { color: var(--violet-hover); }
.wrap { max-width: 940px; margin: 0 auto; padding: 10px 15px; }

/* ---- Accueil ---- */
#home { text-align: center; padding-top: 40px; }
.searchbox { display: inline-flex; gap: 6px; align-items: center; position: relative; }
.suggest {
  position: absolute; top: 100%; left: 0; width: 380px; max-width: 70vw; background: #fff;
  border: 1px solid var(--gris-texte); border-top: none; text-align: left; z-index: 10; display: none;
}
.suggest a { display: flex; gap: 8px; align-items: center; padding: 6px 9px; text-decoration: none; font-size: 11px; border-bottom: 1px solid var(--bordure-claire); }
.suggest a:hover { background: var(--violet-pale); }
.suggest img { width: 28px; height: 28px; object-fit: cover; border: 1px solid var(--bordure); }
.suggest .sname { font-weight: bold; color: var(--violet); }
.suggest .smeta { color: var(--gris-texte); font-size: 10px; }
.suggest .snote b { background: #ffe89e; color: #333; font-weight: normal; }
.simgrid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.simcard { width: 130px; border: 1px solid var(--bordure); padding: 8px; text-align: center; cursor: pointer; background: #fcfcfc; }
.simcard:hover { background: var(--violet-pale); }
.simcard img { width: 100%; height: 90px; object-fit: contain; background: #fff; }
.simcard .scname { font-size: 11px; font-weight: bold; color: var(--violet); margin: 5px 0 2px; }
.simcard .scwhy { font-size: 9px; color: var(--gris-texte); }
.searchbox input[type="text"] { width: 380px; max-width: 70vw; padding: 7px 9px; font-size: 14px; border: 1px solid var(--gris-texte); font-family: Verdana, sans-serif; }
.searchbox button { padding: 7px 16px; font-size: 13px; font-family: Verdana, sans-serif; background: #efefef; border: 1px solid var(--gris-texte); cursor: pointer; }
.searchbox button:hover { background: #e0e0e0; }
.searchhint { font-size: 10px; color: var(--gris-texte); margin-top: 6px; }
.cats { margin: 14px auto 4px; font-size: 11px; color: #333; }
.cats label { margin: 0 7px; white-space: nowrap; cursor: pointer; }
.homelinks { margin-top: 24px; font-size: 12px; }
.homelinks a { margin: 0 8px; }
.tagline { margin-top: 48px; color: #666; font-size: 11px; }
.tagline b { color: #333; }

/* ---- Barre de nav ---- */
/* Sticky : reste collée en haut au scroll sur toutes les vues sauf l'accueil
   (où le JS la masque entièrement — le grand logo centré suffit). */
.topbar { position: sticky; top: 0; z-index: 30; background: #f2f2f2; border-bottom: 1px solid var(--bordure-foncee); padding: 8px 0; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; padding-top: 0; padding-bottom: 0; }
.topbar .minilogo { cursor: pointer; display: flex; align-items: center; gap: 8px; text-decoration: none; }
/* Mini-logo : 36×36 en contain (plus de recadrage cover), bloc sans marge résiduelle */
.topbar .minilogo img { width: 36px; height: 36px; object-fit: contain; display: block; margin: 0; padding: 0; }
/* Nom du site : Pirata One, la blackletter du logo — SEULE exception à Verdana */
.topbar .minilogo span { font-family: 'Pirata One', 'Times New Roman', serif; font-weight: normal; font-size: 20px; line-height: 1; color: #000; }
.topbar nav a { margin-right: 10px; font-size: 11px; }
.topbar .minisearch { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .minisearch input { padding: 4px 6px; border: 1px solid var(--gris-texte); font-family: Verdana; font-size: 11px; width: 180px; }
.cartlink { font-size: 11px; white-space: nowrap; }

/* ---- Résultats ---- */
#results, #product { display: none; }
.rescount { color: #666; font-size: 11px; margin: 16px 0 8px; }
table.torrents { width: 100%; border-collapse: collapse; font-size: 11px; }
table.torrents th { background: #f2f2f2; border: 1px solid var(--bordure-foncee); padding: 5px 8px; text-align: left; font-size: 11px; }
table.torrents th.num, table.torrents td.num { text-align: right; width: 60px; }
table.torrents td { border: 1px solid var(--bordure); padding: 6px 8px; vertical-align: middle; }
table.torrents tr:nth-child(even) td { background: #f7f7f7; }
.thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--bordure); background:#fafafa; }
.tname a { font-size: 12px; font-weight: bold; }
.detdesc { color: #666; font-size: 10px; margin-top: 3px; }
.cat a { font-size: 10px; }
.stock-ok { color: var(--vert); font-weight: bold; }
.stock-low { color: #b35900; font-weight: bold; }
.stock-no { color: var(--gris-texte); }
.badge { display: inline-block; font-size: 9px; padding: 1px 5px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.badge.top { background: #f3e8ff; color: var(--violet); border: 1px solid #d5b8f5; }
.badge.rare { background: #fdeada; color: #9a4c00; border: 1px solid #f5c48f; }
.buy { display: inline-block; background: var(--vert); color: #fff !important; text-decoration: none; font-size: 10px; padding: 3px 9px; border-radius: 3px; white-space: nowrap; }
.buy:hover { background: var(--vert-hover); }
.buy.disabled { background: var(--gris-texte); }

/* ---- Fiche produit ---- */
.crumbs { font-size: 10px; color: var(--gris-texte); margin: 16px 0; }
.prod-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.prod-img { flex: 0 0 300px; }
.prod-img img { width: 300px; height: 300px; object-fit: contain; border: 1px solid var(--bordure); background: #fafafa; }
.prod-img .imgnote { font-size: 9px; color: var(--gris-texte); margin-top: 4px; text-align: center; }
.prod-info { flex: 1; min-width: 280px; }
.prod-info h2 { font-size: 20px; margin: 0 0 2px; }
.prod-sub { color: #666; font-size: 11px; margin-bottom: 12px; }
.infotable { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 14px; }
.infotable td { padding: 4px 8px; border: 1px solid var(--bordure-claire); }
.infotable td:first-child { background: #f7f7f7; width: 110px; color: #555; }
.variants { margin: 10px 0; }
.variants button { font-family: Verdana; font-size: 11px; padding: 6px 12px; margin-right: 6px; border: 1px solid var(--gris-texte); background: #fff; cursor: pointer; }
.variants button.sel { background: var(--vert); color: #fff; border-color: var(--vert); font-weight: bold; }
.price { font-size: 22px; font-weight: bold; margin: 10px 0 2px; }
.stockline { font-size: 11px; margin-bottom: 12px; }
.bigbuy { display: inline-block; background: var(--vert); color: #fff !important; text-decoration: none; font-size: 14px; font-weight: bold; padding: 10px 26px; border-radius: 4px; }
.bigbuy:hover { background: var(--vert-hover); }
.bigbuy.disabled { background: var(--gris-texte); }
.sample { font-size: 11px; margin-left: 12px; }
.shipnote { font-size: 10px; color: var(--gris-texte); margin-top: 10px; }

.notesbox { margin-top: 24px; }
.notesbox h3, .descbox h3, .reviews h3 { font-size: 13px; border-bottom: 1px solid var(--bordure); padding-bottom: 4px; }
.pyramid { display: flex; gap: 12px; flex-wrap: wrap; }
.pyr { flex: 1; min-width: 180px; background: #f7f7f7; border: 1px solid var(--bordure); padding: 10px 12px; }
.pyr b { display: block; font-size: 11px; margin-bottom: 6px; color: #333; }
.pyr span { display: inline-block; background: #fff; border: 1px solid var(--bordure-foncee); border-radius: 10px; padding: 2px 9px; font-size: 10px; margin: 2px 3px 2px 0; }
.descbox { margin-top: 24px; font-size: 12px; line-height: 1.6; color: #333; }
.reviews { margin-top: 24px; }
.review { border: 1px solid var(--bordure-claire); padding: 8px 12px; margin-bottom: 8px; font-size: 11px; background: #fcfcfc; }
.review .rhead { color: var(--violet); font-weight: bold; margin-bottom: 3px; }
.review .stars { color: #b35900; }

/* ---- Pubs auto-promo façon bannières 2000s ---- */
.adlabel { font-size: 8px; color: var(--gris-texte); text-transform: uppercase; letter-spacing: 1px; text-align: right; margin-bottom: 1px; }
.adbanner {
  display: block; border: 2px solid var(--or); background: linear-gradient(90deg,#1a1a2e,#3d1a5b,#1a1a2e);
  color: #fff !important; text-decoration: none; text-align: center; padding: 14px 10px; margin: 8px 0 8px;
  font-size: 15px; font-weight: bold; letter-spacing: .5px;
}
.adbanner small { display: block; font-weight: normal; font-size: 10px; color: var(--or); margin-top: 3px; }
.adbanner:hover { filter: brightness(1.2); color:#fff; }
.blink { animation: blink 1s steps(2,start) infinite; color: #ffe14d; }
@keyframes blink { to { visibility: hidden; } }
.layout { display: flex; gap: 16px; align-items: flex-start; }
.maincol { flex: 1; min-width: 0; }
.adcol { flex: 0 0 150px; }
.adsky {
  display: block; border: 2px dashed var(--vert); background: #eaffea; color: var(--vert) !important;
  text-decoration: none; text-align: center; padding: 18px 8px; font-size: 12px; font-weight: bold; margin-bottom: 16px;
}
.adsky img { width: 110px; height: 110px; object-fit: contain; display: block; margin: 8px auto; background:#fff; border:1px solid var(--bordure-foncee); }
.adsky .price-tag { display:inline-block; background:#c00; color:#fff; padding:2px 8px; border-radius:3px; font-size:13px; margin-top:6px; transform: rotate(-3deg); }
.adsky:hover { background: #d6f5d6; }
.pagination { text-align: center; margin: 18px 0 6px; font-size: 12px; }
.pagination a, .pagination b { margin: 0 4px; }
@media (max-width: 700px) { .adcol { display: none; } }

/* ---- Page Parcourir (browse.php) ---- */
#browse { display: none; }
table.browsecats { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 16px; }
table.browsecats th { background: #f2f2f2; border: 1px solid var(--bordure-foncee); padding: 6px 10px; text-align: left; font-size: 12px; }
table.browsecats td { border: 1px solid var(--bordure); padding: 8px 10px; vertical-align: top; width: 33%; }
table.browsecats td b { display:block; margin-bottom: 6px; font-size: 12px; }
table.browsecats td a { display: block; font-size: 11px; margin: 3px 0; }
table.browsecats .cnt { color: var(--gris-texte); font-size: 10px; }

footer { margin-top: 48px; padding: 16px 0 32px; border-top: 1px solid var(--bordure); text-align: center; font-size: 10px; color: var(--gris-texte); }
footer a { font-size: 10px; margin: 0 5px; }
.disclaimer { margin-top: 8px; font-style: italic; }

/* =====================================================================
   MODERNISATION (2026) — zéro changement d'identité visuelle.
   Uniquement : accessibilité, transitions subtiles, responsive.
   ===================================================================== */

/* ---- Accessibilité : focus clavier visible (violet du site) ---- */
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.adbanner:focus-visible { outline-color: var(--or); }
#home:focus, #results:focus, #browse:focus, #product:focus { outline: none; } /* focus programmatique des vues */

/* ---- Accessibilité : lien d'évitement + texte pour lecteurs d'écran ---- */
.skiplink {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: #fff; color: var(--violet); border: 1px solid var(--violet); padding: 6px 10px; font-size: 12px;
}
.skiplink:focus { top: 8px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Autocomplétion : état actif au clavier (= survol) ---- */
.suggest a.active { background: var(--violet-pale); }

/* ---- Transitions douces, ≤150 ms ---- */
a { transition: color .12s ease; }
.searchbox button, .variants button { transition: background-color .12s ease, border-color .12s ease; }
.buy, .bigbuy { transition: background-color .12s ease; }
.simcard, .suggest a { transition: background-color .12s ease; }
.adbanner { transition: filter .15s ease; }
.adsky { transition: background-color .15s ease; }
@media (prefers-reduced-motion: no-preference) {
  .suggest { animation: sugIn .15s ease-out; }
  @keyframes sugIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
}

/* ---- Responsive <600 px (desktop : strictement inchangé) ---- */
@media (max-width: 600px) {
  .wrap { padding: 10px 12px; }

  /* Recherche accueil : pleine largeur, 16px = pas de zoom auto iOS */
  .searchbox { display: flex; width: 100%; flex-wrap: wrap; justify-content: center; }
  .searchbox input[type="text"] { width: 100%; max-width: none; font-size: 16px; }
  .suggest { width: 100%; max-width: none; }

  /* Barre de nav : empilable */
  .topbar .wrap { flex-wrap: wrap; row-gap: 6px; }
  .topbar .minisearch { margin-left: 0; width: 100%; }
  .topbar .minisearch input { flex: 1; width: auto; font-size: 16px; }

  /* Tableau des résultats → lignes empilées (reste un tableau ≥600 px) */
  table.torrents { display: block; }
  table.torrents thead { display: none; }
  table.torrents tbody { display: block; }
  table.torrents tr {
    display: grid; grid-template-columns: 54px 1fr auto; gap: 3px 10px;
    align-items: start; border: 1px solid var(--bordure); padding: 8px; margin-bottom: 8px;
  }
  table.torrents tr:nth-child(even) { background: #f7f7f7; } /* zébrage conservé */
  table.torrents td { display: block; border: 0; padding: 0; }
  table.torrents td:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; }
  table.torrents td:nth-child(3) { grid-column: 2 / 4; grid-row: 1; }
  table.torrents td:nth-child(2) { grid-column: 2 / 4; grid-row: 2; }
  table.torrents td:nth-child(4) { grid-column: 2; grid-row: 3; }
  table.torrents td:nth-child(4)::before { content: "Stock : "; color: var(--gris-texte); font-weight: normal; }
  table.torrents td:nth-child(5) { grid-column: 3; grid-row: 3; text-align: right; }
  table.torrents td:nth-child(5)::before { content: "♥ "; }
  table.torrents td:nth-child(6) { grid-column: 2 / 4; grid-row: 4; margin-top: 3px; }
  table.torrents tr.emptyrow { display: block; }
  table.torrents tr.emptyrow td { display: block; }

  /* Page Parcourir : colonnes empilées */
  table.browsecats { display: block; }
  table.browsecats thead { display: none; }
  table.browsecats tbody, table.browsecats tr, table.browsecats td { display: block; width: 100%; }
  table.browsecats td { border-top: 0; }
  table.browsecats tr:first-child td:first-child { border-top: 1px solid var(--bordure); }

  /* Fiche produit : image centrée, colonne unique */
  .prod-img { flex: 1 1 100%; }
  .prod-img img { display: block; margin: 0 auto; width: 100%; max-width: 300px; height: auto; aspect-ratio: 1/1; }
}

/* =====================================================================
   CONSEILLER DE BORD — widget de chat (spec docs/conseiller-de-bord.md)
   Design strictement au thème : Verdana, couleurs :root, aucun style
   moderne (pas d'ombres, pas d'arrondis >4px — le bouton rond est
   explicitement demandé par la spec). Bordure #999 de la spec rendue
   par var(--gris-texte), le gris qui remplace #999 partout sur le site.
   ===================================================================== */
.chat-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--vert); color: #fff; border: 1px solid var(--vert);
  font-size: 20px; line-height: 1; cursor: pointer;
  transition: background-color .12s ease;
}
.chat-toggle:hover { background: var(--vert-hover); }

.chat-panel {
  position: fixed; right: 16px; bottom: 72px; z-index: 40;
  width: 320px; max-width: calc(100vw - 32px);
  background: #fff; border: 1px solid var(--gris-texte);
  display: flex; flex-direction: column;
  font-family: Verdana, Geneva, sans-serif;
}
.chat-panel[hidden] { display: none; }
.chat-head {
  background: #f2f2f2; border-bottom: 1px solid var(--bordure-foncee);
  padding: 6px 9px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.chat-close { background: none; border: none; font-family: Verdana, sans-serif; font-size: 13px; cursor: pointer; padding: 1px 5px; color: #000; }
.chat-close:hover { color: var(--violet-hover); }
.chat-log { height: 300px; overflow-y: auto; padding: 8px; font-size: 11px; line-height: 1.5; }
.chat-msg { display: flex; margin: 4px 0; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble { max-width: 85%; padding: 5px 8px; border-radius: 4px; }
.chat-msg.user .chat-bubble { background: var(--violet-pale); }
.chat-msg.bot .chat-bubble { background: #f7f7f7; }
.chat-inputrow { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--bordure-claire); }
/* Input + bouton : mêmes styles que .searchbox (spec) */
.chat-inputrow input { flex: 1; min-width: 0; padding: 7px 9px; font-size: 14px; border: 1px solid var(--gris-texte); font-family: Verdana, sans-serif; }
.chat-inputrow button { padding: 7px 16px; font-size: 13px; font-family: Verdana, sans-serif; background: #efefef; border: 1px solid var(--gris-texte); cursor: pointer; transition: background-color .12s ease; }
.chat-inputrow button:hover { background: #e0e0e0; }

/* Mobile <600px : panneau plein écran (spec) */
@media (max-width: 600px) {
  .chat-panel { top: 0; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; }
  .chat-log { flex: 1; height: auto; }
  .chat-inputrow input { font-size: 16px; } /* pas de zoom auto iOS */
}

/* =====================================================================
   BUTIN — tiroir panier, jauge « cale au trésor », barre sous la nav
   Thème conservé (Verdana, couleurs :root) ; la jauge s'autorise or,
   bois et parchemin — c'est le seul endroit « décoré » du site.
   ===================================================================== */
:root { --bois: #5b3a1a; --bois-fonce: #3a2410; --or-fonce: #b8860b; --parchemin: #fbf3dc; --parchemin-bord: #d9c28f; }

/* Barre fine persistante sous la navigation */
.shipbar { display: block; text-decoration: none; color: #333; font-size: 10px; background: var(--parchemin); border-top: 1px solid var(--parchemin-bord); padding: 3px 15px 4px; }
.shipbar:hover { color: #000; filter: brightness(.98); }
.shipbar-track { display: block; height: 5px; background: #e4d7b4; border-radius: 3px; overflow: hidden; margin: 0 auto 2px; max-width: 910px; }
.shipbar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--or-fonce), var(--or)); transition: width .5s ease; }
.shipbar.full .shipbar-fill { background: linear-gradient(90deg, var(--vert), #3cc23c); }
.shipbar-msg { display: block; max-width: 910px; margin: 0 auto; }
.shipbar.full .shipbar-msg { color: var(--vert); }

/* Tiroir */
.cart-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 45; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 46;
  width: 420px; max-width: 100vw; background: #fff; border-left: 1px solid var(--gris-texte);
  display: flex; flex-direction: column; font-family: Verdana, Geneva, sans-serif;
}
@media (prefers-reduced-motion: no-preference) {
  .cart-drawer { animation: drawerIn .22s ease-out; }
  @keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .cart-backdrop { animation: fadeIn .2s ease-out; }
  @keyframes fadeIn { from { opacity: 0; } }
}
.cart-drawer[hidden], .cart-backdrop[hidden] { display: none; }
body.cart-open { overflow: hidden; }
.cart-head { background: var(--bois-fonce); color: #fff; border-bottom: 2px solid var(--or); padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.cart-headcount { font-weight: normal; font-size: 11px; color: var(--or); margin-left: 4px; }
.cart-close { background: none; border: 1px solid transparent; font-family: Verdana, sans-serif; font-size: 14px; cursor: pointer; padding: 2px 7px; color: #fff; border-radius: 3px; }
.cart-close:hover { border-color: var(--or); color: var(--or); }
.cart-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.cart-drawer.busy .cart-body, .cart-drawer.busy .cart-foot { opacity: .55; pointer-events: none; }

/* ---- Jauge « cale au trésor » ---- */
.gauge { border: 1px solid var(--parchemin-bord); background: var(--parchemin) repeating-linear-gradient(0deg, transparent 0 22px, rgba(0,0,0,.025) 22px 23px); padding: 12px 14px 10px; border-radius: 4px; margin-bottom: 14px; }
.gauge-head { margin-bottom: 20px; line-height: 1.3; }
.gauge-big { display: block; font-size: 17px; font-weight: bold; color: var(--bois-fonce); }
.gauge-big.full { color: var(--vert); }
.gauge-rest { color: #9a1b1b; font-size: 22px; font-variant-numeric: tabular-nums; }
.gauge-sub { display: block; font-size: 11px; color: #5a4a30; margin-top: 2px; }
.gauge-track { position: relative; height: 22px; border: 2px solid var(--bois); border-radius: 12px; background: var(--bois-fonce) repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.06) 14px 15px); }
.gauge-fill { position: relative; height: 100%; border-radius: 9px; width: 0; min-width: 0;
  background: linear-gradient(90deg, var(--or-fonce), #ffd54a 45%, var(--or-fonce) 70%, #ffe680); background-size: 220% 100%;
  transition: width .65s cubic-bezier(.2,.8,.25,1); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.35); }
.gauge-pct { position: absolute; right: 20px; top: 0; line-height: 18px; font-size: 9px; font-weight: bold; color: var(--bois-fonce); }
.gauge-fill[style*="width: 0%"] .gauge-pct, .gauge-fill[style*="width:0%"] .gauge-pct { display: none; }
.gauge-ship { position: absolute; top: -17px; margin-left: -11px; font-size: 22px; line-height: 1; transition: left .65s cubic-bezier(.2,.8,.25,1); filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }
.gauge-goal { position: absolute; right: -8px; top: -20px; font-size: 20px; line-height: 1; }
.gauge-scale { display: flex; justify-content: space-between; font-size: 9px; color: #6b5a3a; margin-top: 6px; }
.gauge-level { font-style: italic; }
.gauge.full .gauge-track { border-color: #1f5e1f; }
.gauge.full .gauge-fill { background: linear-gradient(90deg, var(--vert), #3cc23c 60%, #7be07b); background-size: 100% 100%; }
.gauge.full .gauge-pct { color: #fff; right: 30px; }
.gauge.full .gauge-ship { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gauge-fill { animation: goldShimmer 2.4s linear infinite; }
  @keyframes goldShimmer { from { background-position: 0 0; } to { background-position: 220% 0; } }
  .gauge.full .gauge-fill { animation: none; }
  .gauge.full .gauge-goal { animation: hoist .6s ease-out; }
  @keyframes hoist { 0% { transform: translateY(8px) scale(.6); } 60% { transform: translateY(-4px) scale(1.15); } 100% { transform: none; } }
  .gauge-ship { animation: bob 2.2s ease-in-out infinite; }
  @keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }
}

/* ---- Lignes du butin ---- */
.cline { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 10px 26px 10px 0; border-bottom: 1px solid var(--bordure-claire); font-size: 11px; }
.cline-img { flex: 0 0 60px; }
.cline-img img, .cline img { display: block; width: 60px; height: 60px; max-width: 60px; max-height: 60px; object-fit: contain; border: 1px solid var(--bordure); background: #fafafa; border-radius: 3px; }
.cline-info { flex: 1; min-width: 0; }
.cline-name { font-weight: bold; line-height: 1.3; }
.cline-name a { color: var(--violet); text-decoration: none; }
.cline-name a:hover { text-decoration: underline; }
.cline-meta { color: var(--gris-texte); font-size: 10px; margin: 3px 0 7px; }
.cline-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cline-qty { display: inline-flex; align-items: center; border: 1px solid var(--gris-texte); border-radius: 3px; overflow: hidden; }
.cline-qty button { font-family: Verdana; font-size: 13px; width: 26px; height: 24px; line-height: 1; border: 0; background: #f2f2f2; cursor: pointer; padding: 0; color: #000; }
.cline-qty button:hover { background: var(--violet-pale); color: var(--violet); }
.cline-qty span { min-width: 26px; text-align: center; font-weight: bold; font-size: 12px; }
.cline-total { font-weight: bold; font-size: 13px; white-space: nowrap; }
.cline-rm { position: absolute; right: 0; top: 10px; width: 20px; height: 20px; border: 0; background: none; color: var(--gris-texte); font-family: Verdana; font-size: 12px; cursor: pointer; padding: 0; border-radius: 3px; }
.cline-rm:hover { color: #9a1b1b; background: #fdeaea; }
.cart-empty { text-align: center; font-size: 12px; color: #444; padding: 18px 0 8px; line-height: 1.7; }
.cart-empty-ico { font-size: 34px; line-height: 1; margin-bottom: 6px; }

/* ---- Suggestions pour compléter le butin ---- */
.cart-upsell h4 { font-size: 11px; margin: 16px 0 8px; color: var(--bois-fonce); border-bottom: 1px solid var(--parchemin-bord); padding-bottom: 5px; }
.upsell-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.upsell-card { display: flex; flex-direction: column; align-items: center; min-width: 0; border: 1px solid var(--bordure); padding: 8px 6px; text-align: center; background: #fcfcfc; border-radius: 3px; }
.upsell-card:hover { border-color: var(--or-fonce); background: #fffdf5; }
.upsell-img img, .upsell-card img { display: block; width: 72px; height: 72px; max-width: 72px; max-height: 72px; object-fit: contain; background: #fff; }
.upsell-name { font-size: 9px; color: var(--violet); font-weight: bold; margin: 6px 0 2px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; }
.upsell-fam { font-size: 9px; color: var(--gris-texte); margin-bottom: 6px; }
.upsell-buy { font-size: 10px; padding: 4px 8px; margin-top: auto; }

/* ---- Pied : total + caisse ---- */
.cart-foot { border-top: 2px solid var(--or); background: #f7f7f7; padding: 10px 14px 8px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 3px; }
.cart-total b { font-size: 16px; }
.cart-ship { display: flex; justify-content: space-between; font-size: 11px; color: #333; margin-bottom: 9px; min-height: 14px; }
.cart-checkout { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 15px; padding: 11px 16px; }
.co-amt { font-weight: normal; font-size: 12px; opacity: .9; }
.cart-continue { text-align: center; font-size: 10px; margin-top: 7px; }
.cart-foot .shipnote { text-align: center; margin-top: 5px; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 10px); z-index: 50; background: var(--bois-fonce); color: #fff; border: 2px solid var(--or); padding: 8px 14px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; max-width: calc(100vw - 32px); text-align: center; border-radius: 3px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .cart-drawer { width: 100%; }
  .shipbar { padding-left: 12px; padding-right: 12px; }
}

/* ---- Respect de prefers-reduced-motion (le clignotant reste par défaut) ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
