/* =========================================================
   FRIP & JOY — Design System
   Friperie vintage & records · Fontainebleau
   Palette : crème / brun encre / or moutarde / vert bouteille / rouille
   ========================================================= */

:root {
  /* Couleurs de marque */
  --cream:      #F3E7CE;
  --paper:      #FAF3E2;
  --paper-2:    #F1E6CC;
  --ink:        #221912;
  --brown:      #3C2A1A;
  --brown-soft: #6B5238;
  --gold:       #C8902B;
  --gold-dark:  #A6711A;
  --green:      #1F4D3D;
  --green-soft: #2F6B55;
  --rust:       #A8392A;
  --rust-soft:  #C2553F;
  --line:       #E0D2B4;
  --line-dark:  #C9B98F;

  /* Texte */
  --text:       #2A1F16;
  --text-soft:  #6A5840;
  --text-faint: #97866C;
  --on-dark:    #F5ECD7;

  /* Couleurs fonctionnelles */
  --ok:         #2F7A52;
  --warn:       #C2862A;
  --danger:     #B23A28;

  /* UI */
  --radius:     14px;
  --radius-sm:  9px;
  --radius-lg:  22px;
  --shadow-sm:  0 1px 2px rgba(34,25,18,.08), 0 2px 8px rgba(34,25,18,.06);
  --shadow-md:  0 6px 24px rgba(34,25,18,.12);
  --shadow-lg:  0 18px 50px rgba(34,25,18,.20);
  --maxw:       1240px;

  /* Typo */
  --f-display: "Anton", "Arial Narrow", sans-serif;
  --f-script:  "Pacifico", cursive;
  --f-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--text);
  background: var(--paper);
  background-image:
    radial-gradient(circle at 18% -5%, rgba(200,144,43,.10), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(31,77,61,.08), transparent 38%);
  background-attachment: fixed;
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.05; letter-spacing: .5px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* ---------- Typo utilitaires ---------- */
.display { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }
.script  { font-family: var(--f-script);  font-weight: 400; }
.eyebrow {
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: 3px;
  font-size: .8rem; color: var(--gold-dark);
}
.muted { color: var(--text-soft); }

/* =========================================================
   BANDEAU ANNONCES (ticker)
   ========================================================= */
.ticker {
  background: var(--green);
  color: var(--on-dark);
  border-bottom: 2px solid var(--gold);
  font-size: .9rem;
}
.ticker .container { display: flex; justify-content: center; }
.ticker__item {
  display: flex; align-items: center; gap: .5rem; font-weight: 500;
  padding: 9px 0; text-align: center; transition: opacity .25s ease; max-width: 100%;
}
.ticker__item .ico { color: var(--gold); flex: none; }
.ticker__sep { opacity: .55; }

/* ---------- Icônes SVG ---------- */
.ico { display: inline-block; vertical-align: -0.18em; flex: none; }
.ico-gold { color: var(--gold); }
.card__ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--brown-soft); opacity: .5; }
.pd-media .card__ph { opacity: .45; }

/* Bande promotionnelle (accueil) */
.promo-band { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }

/* Choix du mode de retrait (checkout) */
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--line-dark); border-radius: var(--radius-sm); background: var(--paper); color: var(--brown); }
.mode-opt b { display: block; font-size: .92rem; color: var(--ink); }
.mode-opt small { color: var(--text-faint); font-size: .76rem; }
.mode-opt .ico { color: var(--green); flex: none; }
.mode-opt.active { border-color: var(--green); background: rgba(31,77,61,.07); }

/* Section infos pratiques (page À propos) */
.infos-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.infos-panel .map-frame { border-radius: var(--radius-lg); overflow: hidden; border: 6px solid var(--paper); box-shadow: var(--shadow-md); }
.infos-panel .map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }
.infos-list li { gap: 18px; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,243,226,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header__bar {
  display: flex; align-items: center; gap: 18px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { height: 52px; width: auto; border-radius: 8px; }
.brand__txt { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: 1px; color: var(--ink); }
.brand__name b { color: var(--gold-dark); }
.brand__sub { font-size: .62rem; letter-spacing: 3px; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px; border-radius: 999px;
  font-weight: 600; font-size: .94rem; color: var(--brown);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); }
.nav a.active { background: var(--green); color: var(--on-dark); }

.header__actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; border: none; background: transparent;
  color: var(--brown); font-size: 1.25rem; transition: background .15s;
}
.icon-btn:hover { background: var(--paper-2); }
.badge {
  position: absolute; top: 4px; right: 4px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--rust); color: #fff; border-radius: 999px;
  font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--paper);
}
.burger { display: none; }

/* Drawer mobile */
.mobile-nav {
  position: fixed; inset: 0; z-index: 60; display: none;
}
.mobile-nav.open { display: block; }
.mobile-nav__scrim { position: absolute; inset: 0; background: rgba(34,25,18,.5); }
.mobile-nav__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(82%, 340px);
  background: var(--paper); box-shadow: var(--shadow-lg);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%); transition: transform .25s ease;
}
.mobile-nav.open .mobile-nav__panel { transform: translateX(0); }
.mobile-nav__panel a {
  padding: 14px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1.05rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav__panel a:hover { background: var(--paper-2); }

/* =========================================================
   BOUTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; letter-spacing: .2px;
  transition: transform .08s, background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: var(--on-dark); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--green-soft); }
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn--gold:hover { background: var(--gold-dark); color: var(--on-dark); }
.btn--rust { background: var(--rust); color: #fff; }
.btn--rust:hover { background: var(--rust-soft); }
.btn--outline { background: transparent; border-color: var(--line-dark); color: var(--brown); }
.btn--outline:hover { background: var(--paper-2); border-color: var(--brown-soft); }
.btn--ghost { background: transparent; color: var(--brown); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: .85rem; }
.btn--lg { padding: 15px 30px; font-size: 1.05rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: 64px 0 56px;
}
.hero__title { font-family: var(--f-display); font-size: clamp(2.8rem, 6vw, 5rem); color: var(--ink); line-height: .96; }
.hero__title .script { display: block; font-family: var(--f-script); color: var(--rust); font-size: .62em; margin-top: .15em; text-transform: none; }
.hero__lead { font-size: 1.12rem; color: var(--text-soft); max-width: 46ch; margin: 18px 0 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__art {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 6px solid var(--paper);
  aspect-ratio: 4/5; background: var(--paper-2);
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
.hero__stamp {
  position: absolute; bottom: 18px; left: 18px;
  background: var(--gold); color: var(--ink); font-family: var(--f-display);
  padding: 8px 16px; border-radius: 999px; letter-spacing: 1px; box-shadow: var(--shadow-md);
  transform: rotate(-4deg);
}

/* =========================================================
   SECTIONS / TITRES
   ========================================================= */
section { padding: 44px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--f-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--ink); }
.section-head a { font-weight: 700; color: var(--gold-dark); }
.section-head a:hover { text-decoration: underline; }

/* =========================================================
   CATÉGORIES
   ========================================================= */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 150px; padding: 16px; border-radius: var(--radius);
  background: var(--green); color: var(--on-dark); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s;
}
.cat-card:nth-child(3n+2){ background: var(--rust); }
.cat-card:nth-child(3n+3){ background: var(--brown); }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card__emoji { font-size: 2rem; }
.cat-card__name { font-family: var(--f-display); font-size: 1.25rem; letter-spacing: 1px; margin-top: 8px; }
.cat-card__count { font-size: .8rem; opacity: .8; }

/* =========================================================
   GRILLE PRODUITS / CARTE
   ========================================================= */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-dark); }
.card__media {
  position: relative; aspect-ratio: 4/5; background: linear-gradient(135deg, var(--paper-2), var(--cream));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__emoji { font-size: 3.4rem; opacity: .55; }
.card__flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 54px); }
.flag {
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 4px 9px; border-radius: 999px; background: var(--ink); color: var(--on-dark);
}
.flag--new { background: var(--gold); color: var(--ink); }
.flag--low { background: var(--rust); color: #fff; }
.flag--out { background: var(--brown-soft); color: #fff; }
.card__fav {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(250,243,226,.92); border: none; display: grid; place-items: center;
  color: var(--brown-soft); box-shadow: var(--shadow-sm); transition: transform .1s, color .12s;
}
.card__fav:hover { transform: scale(1.08); color: var(--rust); }
.card__fav.is-fav { color: var(--rust); }
.card__fav.is-fav .ico { fill: var(--rust); }
.card__body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-faint); }
.card__title { font-weight: 700; font-size: 1rem; color: var(--ink); line-height: 1.25; }
.card__meta { font-size: .8rem; color: var(--text-soft); }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.price { font-family: var(--f-display); font-size: 1.35rem; color: var(--green); letter-spacing: .5px; }
.price small { font-family: var(--f-body); font-size: .8rem; color: var(--text-faint); text-decoration: line-through; margin-left: 6px; font-weight: 500; }

/* =========================================================
   FILTRES / TOOLBAR BOUTIQUE
   ========================================================= */
.shop-layout { display: grid; grid-template-columns: 248px 1fr; gap: 30px; align-items: start; }
.filters { position: sticky; top: 92px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.filters h3 { font-family: var(--f-display); font-size: 1rem; letter-spacing: 1px; margin-bottom: 10px; color: var(--ink); }
.filter-group { padding: 14px 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: none; padding-top: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line-dark);
  background: transparent; font-size: .85rem; font-weight: 600; color: var(--brown);
  transition: all .12s;
}
.chip:hover { border-color: var(--brown-soft); }
.chip.active { background: var(--green); border-color: var(--green); color: var(--on-dark); }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .count { color: var(--text-soft); font-size: .92rem; margin-right: auto; }
.field {
  display: flex; align-items: center; gap: 8px; background: var(--paper);
  border: 1.5px solid var(--line-dark); border-radius: 999px; padding: 8px 14px;
}
.field input, .field select { border: none; background: transparent; outline: none; min-width: 0; }
select.input, input.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line-dark);
  border-radius: var(--radius-sm); background: var(--paper); color: var(--text); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: var(--green-soft); box-shadow: 0 0 0 3px rgba(47,107,85,.15); }
textarea.input { resize: vertical; min-height: 90px; }
label.lbl { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--brown); }

/* =========================================================
   FICHE PRODUIT
   ========================================================= */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 30px; }
.pd-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--paper-2), var(--cream)); aspect-ratio: 4/5; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.pd-media .card__emoji { font-size: 7rem; }
.pd-info h1 { font-family: var(--f-display); font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--ink); }
.pd-price { font-family: var(--f-display); font-size: 2.2rem; color: var(--green); margin: 6px 0 14px; }
.size-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.size-btn {
  min-width: 52px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-dark); background: var(--paper); font-weight: 700; color: var(--brown);
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all .12s;
}
.size-btn small { font-weight: 500; font-size: .68rem; color: var(--text-faint); }
.size-btn:hover:not(:disabled) { border-color: var(--green-soft); }
.size-btn.active { background: var(--green); border-color: var(--green); color: var(--on-dark); }
.size-btn.active small { color: rgba(245,236,215,.8); }
.size-btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.stock-line { font-size: .9rem; margin: 14px 0; font-weight: 600; }
.stock-line.ok { color: var(--ok); }
.stock-line.low { color: var(--warn); }
.stock-line.out { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-dark); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; height: 42px; border: none; background: transparent; font-size: 1.2rem; color: var(--brown); }
.qty button:hover { background: var(--paper-2); }
.qty span { min-width: 40px; text-align: center; font-weight: 700; }
.pd-detail-list { list-style: none; padding: 0; margin: 18px 0; border-top: 1px solid var(--line); }
.pd-detail-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.pd-detail-list li span:first-child { color: var(--text-soft); }
.pd-detail-list li span:last-child { font-weight: 600; }

/* =========================================================
   PANIER
   ========================================================= */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; padding-top: 26px; }
.cart-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item__media { width: 92px; height: 110px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--paper-2), var(--cream)); display: grid; place-items: center; font-size: 2.2rem; overflow: hidden; }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__title { font-weight: 700; color: var(--ink); }
.cart-item__meta { font-size: .85rem; color: var(--text-soft); }
.cart-item__remove { background: none; border: none; color: var(--danger); font-size: .85rem; font-weight: 600; padding: 0; margin-top: 6px; }
.summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 92px; box-shadow: var(--shadow-sm); }
.summary h3 { font-family: var(--f-display); letter-spacing: 1px; color: var(--ink); }
.summary__row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-soft); }
.summary__row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.summary__row.total .price { font-size: 1.6rem; }

/* =========================================================
   FORMULAIRES / AUTH / PAIEMENT
   ========================================================= */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-sm); }
.panel--narrow { max-width: 520px; margin-inline: auto; }
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tabs { display: flex; gap: 6px; background: var(--paper-2); padding: 5px; border-radius: 999px; margin-bottom: 22px; }
.tabs button { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 999px; font-weight: 700; color: var(--brown); }
.tabs button.active { background: var(--paper); box-shadow: var(--shadow-sm); color: var(--green); }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; padding-top: 26px; }
.card-input-visual {
  background: linear-gradient(135deg, var(--green), var(--green-soft));
  color: var(--on-dark); border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.card-input-visual::after { content: "VISA"; position: absolute; bottom: 16px; right: 20px; font-family: var(--f-display); font-size: 1.4rem; opacity: .85; letter-spacing: 2px; }
.card-input-visual .chip-emv { width: 42px; height: 30px; border-radius: 6px; background: var(--gold); margin-bottom: 26px; }
.card-input-visual .num { font-size: 1.3rem; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.pay-note { font-size: .82rem; color: var(--text-soft); display: flex; gap: 8px; align-items: center; margin-top: 12px; }

/* =========================================================
   MERCI
   ========================================================= */
.thanks { text-align: center; max-width: 600px; margin: 60px auto; }
.thanks__badge { width: 96px; height: 96px; border-radius: 999px; background: var(--green); color: var(--on-dark); display: grid; place-items: center; font-size: 3rem; margin: 0 auto 20px; box-shadow: var(--shadow-md); animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.thanks h1 { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3rem); color: var(--ink); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 14px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: 0; } }

/* =========================================================
   TABLEAUX (admin)
   ========================================================= */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.tbl th { font-family: var(--f-display); letter-spacing: .8px; font-weight: 400; color: var(--brown); background: var(--paper-2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: rgba(241,230,204,.4); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.tag--ok { background: rgba(47,122,82,.15); color: var(--ok); }
.tag--warn { background: rgba(194,134,42,.18); color: var(--warn); }
.tag--danger { background: rgba(178,58,40,.15); color: var(--danger); }
.tag--info { background: rgba(31,77,61,.12); color: var(--green); }

/* =========================================================
   ADMIN LAYOUT
   ========================================================= */
.admin-app { min-height: 100vh; }
.admin-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--cream); padding: 12px 18px; }
.admin-topbar .brand__name { color: var(--cream); font-size: 1.25rem; }
.admin-topbar .brand__name b { color: var(--gold); }
.admin-topbar .brand__sub { color: var(--gold); opacity: .85; }
.admin-burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-sm); border: none; background: rgba(255,255,255,.08); color: var(--cream); }
.admin-burger:hover { background: rgba(255,255,255,.16); }
.admin-drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.admin-drawer.open { display: block; }
.admin-drawer__scrim { position: absolute; inset: 0; background: rgba(34,25,18,.55); }
.admin-drawer__panel { position: absolute; top: 0; left: 0; height: 100%; width: min(82%, 290px); background: var(--ink); color: var(--cream); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-lg); transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto; }
.admin-drawer.open .admin-drawer__panel { transform: translateX(0); }
.admin-drawer__sep { height: 1px; background: rgba(255,255,255,.14); margin: 10px 4px; }
.admin-drawer .display { color: var(--cream); }
.admin-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--cream); font-weight: 600; font-size: .95rem;
  text-align: left; width: 100%; transition: background .12s;
}
.admin-nav-item:hover { background: rgba(255,255,255,.08); }
.admin-nav-item.active { background: var(--green); }
.admin-nav-item .ico { flex: none; }
/* (ancienne sidebar — conservée au cas où) */
.admin-nav button {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--cream); font-weight: 600; font-size: .95rem;
  text-align: left; width: 100%; transition: background .12s;
}
.admin-nav button:hover { background: rgba(255,255,255,.07); }
.admin-nav button.active { background: var(--green); }
.admin-main { padding: 28px 32px; overflow-x: hidden; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-head h1 { font-family: var(--f-display); font-size: 1.9rem; color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stat__label { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); }
.stat__value { font-family: var(--f-display); font-size: 2rem; color: var(--ink); margin-top: 4px; }
.stat__sub { font-size: .82rem; color: var(--text-soft); }
.panel-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.panel-block > h2 { font-family: var(--f-display); font-size: 1.3rem; color: var(--ink); margin-bottom: 16px; letter-spacing: .8px; }

/* =========================================================
   MODALE
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal__scrim { position: absolute; inset: 0; background: rgba(34,25,18,.55); backdrop-filter: blur(2px); }
.modal__box { position: relative; background: var(--paper); border-radius: var(--radius-lg); width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); padding: 26px; }
.modal__box.wide { width: min(720px, 100%); }
.modal__close { position: absolute; top: 14px; right: 14px; }

/* =========================================================
   ANNONCES (cartes admin)
   ========================================================= */
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.ann-card__icon { font-size: 1.6rem; }
.ann-card__body { flex: 1; }
.ann-card__title { font-weight: 700; color: var(--ink); }
.ann-card__text { font-size: .9rem; color: var(--text-soft); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--ink); color: var(--cream); margin-top: 50px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding: 48px 0 30px; }
.footer h4 { font-family: var(--f-display); letter-spacing: 1px; color: var(--gold); margin-bottom: 14px; font-size: 1.05rem; }
.footer a { color: var(--cream); opacity: .82; display: block; padding: 4px 0; }
.footer a:hover { opacity: 1; color: var(--gold); }
.footer p { opacity: .8; font-size: .92rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; opacity: .75; }
.footer .brand__name { color: var(--cream); }

/* =========================================================
   DIVERS
   ========================================================= */
.empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.empty__emoji { font-size: 3.5rem; margin-bottom: 12px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .9rem; }
.notice--info { background: rgba(31,77,61,.1); color: var(--green); }
.notice--gold { background: rgba(200,144,43,.14); color: var(--gold-dark); }
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: var(--on-dark); padding: 13px 20px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem; animation: toast-in .25s ease; display: flex; align-items: center; gap: 8px; }
.toast--ok { background: var(--green); }
.toast--rust { background: var(--rust); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 26px; }
  .hero__art { max-width: 420px; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; display: flex; flex-direction: column; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; margin-top: 14px; }
  .admin-nav button { width: auto; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .container { padding-inline: 26px; }
  .header__bar { height: 66px; }
  .brand img { height: 44px; }
  .brand__name { font-size: 1.25rem; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 22px; padding-top: 34px; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item__media { width: 72px; height: 88px; }
  .cart-item__price { grid-column: 2; }
  section { padding: 32px 0; }
  .admin-main { padding: 18px 16px; }
  .promo-band { grid-template-columns: 1fr; text-align: left; }
  .promo-band .btn { justify-self: start; }
  .infos-panel { grid-template-columns: 1fr; gap: 22px; }
  .infos-panel .map-frame { order: 2; }
  .infos-panel .map-frame iframe { height: 300px; }
  .infos-list li { flex-direction: column; align-items: flex-start; gap: 3px; }
  .infos-list li span:first-child { color: var(--text-faint); font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; }
  .infos-list li span:last-child { text-align: left; max-width: 100%; font-weight: 600; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card__body { padding: 10px; }
  .price { font-size: 1.15rem; }
  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- Curseur de prix élégant ---------- */
input[type="range"].range-elegant {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 12px 0 6px;
  background: linear-gradient(var(--gold), var(--gold)) 0 / var(--fill, 100%) 100% no-repeat, var(--line);
  outline: none; cursor: pointer;
}
input[type="range"].range-elegant::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--paper); box-shadow: 0 1px 4px rgba(34,25,18,.28);
  cursor: pointer; transition: transform .12s ease;
}
input[type="range"].range-elegant::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"].range-elegant:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(200,144,43,.32); }
input[type="range"].range-elegant::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 3px solid var(--paper); cursor: pointer; }
input[type="range"].range-elegant::-moz-range-progress { background: var(--gold); height: 6px; border-radius: 999px; }
input[type="range"].range-elegant::-moz-range-track { background: var(--line); height: 6px; border-radius: 999px; }

/* ---------- Bannière d'accueil (carrousel + vidéo) ---------- */
.home-banner { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); margin-bottom: 6px; }
.home-banner__track { display: flex; transition: transform .6s ease; }
.home-banner__slide { min-width: 100%; aspect-ratio: 16 / 6; background: var(--paper-2); }
.home-banner__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-banner__dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.home-banner__dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; }
.home-banner__dots button.active { background: #fff; }
.home-banner__video { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16 / 8; background: #000; }
.home-banner__video iframe, .home-banner__video video { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 720px) { .home-banner__slide { aspect-ratio: 16 / 9; } }

/* ---------- Écran de chargement ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: var(--cream, #FAF3E2);
  transition: opacity .45s ease;
}
.page-loader.hide { opacity: 0; pointer-events: none; }
/* Loader — d'après Uiverse.io (alexruix), couleurs adaptées à la charte Frip & Joy */
.loader { position: relative; width: 112px; height: 112px; }
.box1, .box2, .box3 {
  border: 16px solid var(--green, #1F4D3D);
  box-sizing: border-box; position: absolute; display: block;
}
.box1 { width: 112px; height: 48px; margin-top: 64px; margin-left: 0; animation: abox1 4s 1s forwards ease-in-out infinite; }
.box2 { width: 48px; height: 48px; margin-top: 0; margin-left: 0; animation: abox2 4s 1s forwards ease-in-out infinite; }
.box3 { width: 48px; height: 48px; margin-top: 0; margin-left: 64px; animation: abox3 4s 1s forwards ease-in-out infinite; }
@keyframes abox1 {
  0%   { width: 112px; height: 48px; margin-top: 64px; margin-left: 0; }
  12.5%{ width: 48px;  height: 48px; margin-top: 64px; margin-left: 0; }
  25%  { width: 48px;  height: 48px; margin-top: 64px; margin-left: 0; }
  37.5%{ width: 48px;  height: 48px; margin-top: 64px; margin-left: 0; }
  50%  { width: 48px;  height: 48px; margin-top: 64px; margin-left: 0; }
  62.5%{ width: 48px;  height: 48px; margin-top: 64px; margin-left: 0; }
  75%  { width: 48px;  height: 112px; margin-top: 0;   margin-left: 0; }
  87.5%{ width: 48px;  height: 48px; margin-top: 0;    margin-left: 0; }
  100% { width: 48px;  height: 48px; margin-top: 0;    margin-left: 0; }
}
@keyframes abox2 {
  0%   { width: 48px;  height: 48px; margin-top: 0; margin-left: 0; }
  12.5%{ width: 48px;  height: 48px; margin-top: 0; margin-left: 0; }
  25%  { width: 48px;  height: 48px; margin-top: 0; margin-left: 0; }
  37.5%{ width: 48px;  height: 48px; margin-top: 0; margin-left: 0; }
  50%  { width: 112px; height: 48px; margin-top: 0; margin-left: 0; }
  62.5%{ width: 48px;  height: 48px; margin-top: 0; margin-left: 64px; }
  75%  { width: 48px;  height: 48px; margin-top: 0; margin-left: 64px; }
  87.5%{ width: 48px;  height: 48px; margin-top: 0; margin-left: 64px; }
  100% { width: 48px;  height: 48px; margin-top: 0; margin-left: 64px; }
}
@keyframes abox3 {
  0%   { width: 48px; height: 48px;  margin-top: 0;  margin-left: 64px; }
  12.5%{ width: 48px; height: 48px;  margin-top: 0;  margin-left: 64px; }
  25%  { width: 48px; height: 112px; margin-top: 0;  margin-left: 64px; }
  37.5%{ width: 48px; height: 48px;  margin-top: 64px; margin-left: 64px; }
  50%  { width: 48px; height: 48px;  margin-top: 64px; margin-left: 64px; }
  62.5%{ width: 48px; height: 48px;  margin-top: 64px; margin-left: 64px; }
  75%  { width: 48px; height: 48px;  margin-top: 64px; margin-left: 64px; }
  87.5%{ width: 48px; height: 48px;  margin-top: 64px; margin-left: 64px; }
  100% { width: 112px; height: 48px; margin-top: 64px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .box1, .box2, .box3 { animation: none; } }
