/* ==========================================================================
   Comptoir de la Guilde — Arkhantis
   Maison de négoce de la Guilde : papier chaud, encre, vert de la Guilde,
   filets de bronze. Titres Marcellus · Texte Lato.
   ========================================================================== */

:root {
  --paper: #efe6d2;
  --paper-2: #e5d8bb;
  --vellum: #fbf7ec;
  --vellum-2: #f4ecda;
  --ink: #26221c;
  --ink-soft: #564d41;
  --ink-faint: #8a7f6c;
  --rule: #d9cbab;
  --rule-dark: #bba77d;

  --green: #577557;
  --green-dark: #415a42;
  --green-deep: #2c3f2d;
  --green-light: #82a07f;
  --green-wash: #e4eadb;

  --bronze: #9c7536;
  --bronze-light: #cdab6a;
  --bronze-wash: #f2e6c9;
  --oxblood: #7d2f28;
  --amber: #a8741a;

  --r-common: #7a705f;
  --r-uncommon: #3f7d3a;
  --r-rare: #2e5f9e;
  --r-very-rare: #6c3d96;
  --r-legendary: #b4641b;
  --r-artifact: #9a2f22;

  --font-title: "Marcellus", Georgia, serif;
  --font-caps: "Marcellus SC", "Marcellus", Georgia, serif;
  --font-body: "Lato", "Helvetica Neue", Arial, sans-serif;

  --radius: 2px;
  --frame: 0 0 0 1px var(--rule), inset 0 0 0 5px var(--vellum), inset 0 0 0 6px var(--rule);
  --lift: 0 10px 24px -16px rgba(50, 35, 10, .55);
  --lift-hover: 0 22px 38px -20px rgba(50, 35, 10, .6);
  --maxw: 1240px;
  --mast-h: 92px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .25  0 0 0 0 .1  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  -webkit-font-smoothing: antialiased;
}
body.drawer-open { overflow: hidden; }

a { color: var(--green-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green); }
img { max-width: 100%; display: block; }
::selection { background: var(--green-wash); }

h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 400; line-height: 1.18; margin: 0 0 .45em; color: var(--ink); letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
small, .small { font-size: .88rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.page { flex: 1; padding: 36px 0 90px; }
.page-home .page { padding-top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-faint); }
.soft { color: var(--ink-soft); }
.center { text-align: center; }
.num { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.center-flex { justify-content: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.stack > * + * { margin-top: 16px; }

.icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; fill: currentColor; }

/* Chevron dessiné */
.chev { display: inline-block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; opacity: .8; }

/* ---------- Pages encadrées (double filet) ---------- */
.card { position: relative; background: var(--vellum); border-radius: var(--radius); box-shadow: var(--frame), var(--lift); }
.card.ornate::before, .card.ornate::after {
  content: ""; position: absolute; width: 24px; height: 24px; pointer-events: none; z-index: 1;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M1 23V8c0-3.9 3.1-7 7-7h15' fill='none' stroke='%239c7536' stroke-width='1.2'/><path d='M5 23V10c0-2.8 2.2-5 5-5h13' fill='none' stroke='%239c7536' stroke-width='.7'/><path d='M5 2l3 3-3 3-3-3z' fill='%23577557'/></svg>") no-repeat;
}
.card.ornate::before { top: 9px; left: 9px; }
.card.ornate::after { bottom: 9px; right: 9px; transform: rotate(180deg); }
.pad { padding: clamp(20px, 3vw, 32px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 8px;
  font-family: var(--font-caps); font-size: .9rem; letter-spacing: .14em;
  color: var(--bronze);
}
.eyebrow::before, .eyebrow-center::after { content: ""; width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); flex-shrink: 0; }
.eyebrow-center { justify-content: center; }
a.eyebrow:hover { color: var(--green); }
.on-dark { color: var(--bronze-light); }

.fleuron {
  border: 0; height: 18px; margin: 26px auto; max-width: 260px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='18' viewBox='0 0 260 18'><path d='M0 9h106M154 9h106' stroke='%23bba77d'/><path d='M130 1l8 8-8 8-8-8z' fill='none' stroke='%239c7536'/><path d='M130 5l4 4-4 4-4-4z' fill='%23577557'/><circle cx='113' cy='9' r='1.6' fill='%239c7536'/><circle cx='147' cy='9' r='1.6' fill='%239c7536'/></svg>") center / 260px 18px no-repeat;
}

/* ---------- Boutons ---------- */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: var(--ink);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 46px; padding: .55em 1.5em;
  font-family: var(--font-caps); font-size: .98rem; letter-spacing: .1em; line-height: 1.1;
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--bd); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --bg: var(--ink); --fg: var(--vellum); color: var(--vellum); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 1.2em; height: 1.2em; }
.btn-primary { --bg: var(--green); --fg: #fbf6e8; --bd: var(--green); }
.btn-primary:hover { --bg: var(--green-dark); --bd: var(--green-dark); color: #fff; }
/* Bouton d'achat : double filet de bronze */
.btn-ember, .btn-wax { --bg: var(--green-deep); --fg: #fbf3dc; --bd: var(--green-deep); box-shadow: inset 0 0 0 3px var(--green-deep), inset 0 0 0 4px var(--bronze-light); }
.btn-ember:hover, .btn-wax:hover { --bg: var(--green-dark); --bd: var(--green-dark); color: #fff; box-shadow: inset 0 0 0 3px var(--green-dark), inset 0 0 0 4px var(--bronze-light); }
.btn-brass, .btn-gold { --bg: var(--bronze-wash); --fg: var(--ink); --bd: var(--bronze); }
.btn-brass:hover, .btn-gold:hover { --bg: var(--bronze); color: #fff; }
.btn-arcane { --bg: var(--green); --fg: #fbf6e8; --bd: var(--green); }
.btn-ghost { --bd: var(--rule-dark); }
.btn-quiet { --bd: transparent; color: var(--ink-soft); }
.btn-quiet:hover { --bg: var(--green-wash); --fg: var(--ink); color: var(--ink); }
.btn-danger { --fg: var(--oxblood); --bd: rgba(125, 47, 40, .45); }
.btn-danger:hover { --bg: var(--oxblood); --bd: var(--oxblood); }
.btn-sm { min-height: 36px; padding: .4em 1em; font-size: .88rem; }
.btn-lg { min-height: 54px; padding: .7em 2em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--ink-faint); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--oxblood); }
.plain-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.plain-btn .icon { width: 22px; height: 22px; }

/* ---------- Formulaires ---------- */
label { display: block; margin-bottom: 6px; font-family: var(--font-caps); font-size: .92rem; letter-spacing: .06em; color: var(--ink-soft); }
input[type=text], input[type=password], input[type=search], input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%; min-height: 46px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fffdf7;
  border: 1px solid var(--rule-dark); border-radius: var(--radius);
  padding: .6em .85em;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(87, 117, 87, .18); }
select { appearance: none; padding-right: 2.4em; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23577557' stroke-width='1.6'/></svg>"); background-repeat: no-repeat; background-position: right .9em center; background-size: 11px; cursor: pointer; }
textarea { min-height: 110px; resize: vertical; }
input[type=color] { width: 64px; height: 46px; padding: 3px; border: 1px solid var(--rule-dark); border-radius: var(--radius); background: #fffdf7; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); width: 1.1em; height: 1.1em; margin: 0; flex-shrink: 0; }
.field { margin-bottom: 18px; }
.field-help, .help { font-size: .86rem; color: var(--ink-faint); margin-top: 5px; }
.check { display: flex; gap: .6em; align-items: center; font-family: var(--font-body); font-size: .98rem; letter-spacing: 0; color: var(--ink); margin: 0; cursor: pointer; }
.form-error, ul.form-errors { color: var(--oxblood); font-size: .9rem; margin: 6px 0 0; padding: 0; list-style: none; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.input-icon input { padding-left: 2.5em; }

/* ==========================================================================
   En-tête
   ========================================================================== */
.utility { background: var(--green-deep); color: #e3dcc6; font-size: .86rem; position: relative; z-index: 52; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.utility a { color: #e3dcc6; }
.utility a:hover { color: #fff; }
.utility-right { display: flex; align-items: center; gap: 22px; }
.ring-status { display: inline-flex; align-items: center; gap: 9px; letter-spacing: .02em; cursor: help; }
.gem { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); flex-shrink: 0; background: #a39c8c; }
.gem.waking { background: #e2b04a; animation: blink 1.2s infinite; }
.gem.server, .gem.world { background: #dd8f42; }
.gem.bridge { background: #a9dc95; box-shadow: 0 0 8px rgba(169, 220, 149, .9); }
@keyframes blink { 50% { opacity: .3; } }

.persona-switch > summary { display: flex; align-items: center; gap: 8px; color: #f3ecd8; }
.persona-switch .sep { opacity: .5; }
.persona-switch .coins { color: #fbf3dc; font-size: .86rem; }
.persona-switch .coin i { color: #cfc5a8; }
/* Portraits : toujours un médaillon de taille fixe, quelle que soit l'image source */
.avatar {
  width: 40px; height: 40px; min-width: 0; max-width: none;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 2px solid var(--bronze-light);
  background: var(--paper-2);
}
.avatar-xs { width: 24px; height: 24px; border-width: 1px; }
.avatar-md { width: 60px; height: 60px; }
.avatar-lg { width: 92px; height: 92px; border-width: 3px; }
.avatar-xl { width: 136px; height: 136px; border: 3px solid var(--vellum); box-shadow: 0 0 0 1px var(--bronze), 0 8px 18px -8px rgba(40, 30, 10, .5); }
.menu-item .avatar { width: 34px; height: 34px; }
/* Toute image Foundry sans cadre dédié reste contenue */
.product-media img, .pdp-frame img, .bag-pic img, .thumb-sm { max-width: 100%; max-height: 100%; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70;
  width: min(320px, calc(100vw - 24px)); padding: 12px;
  color: var(--ink); background: var(--vellum);
  border-radius: var(--radius); box-shadow: var(--frame), 0 20px 40px -14px rgba(30, 20, 5, .5);
  font-size: .95rem;
}
.menu-title { font-family: var(--font-caps); font-size: .85rem; letter-spacing: .1em; color: var(--bronze); padding: 4px 10px 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--radius); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--green-wash); color: var(--ink); }
.menu-item.current { background: var(--green-wash); }
.menu-item .icon { color: var(--green); }
.menu-item .grow { flex: 1; min-width: 0; }
.menu-item small { display: block; color: var(--ink-faint); }
.menu-empty { padding: 6px 10px; margin: 0; }

/* En-tête principal */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--vellum);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--vellum), 0 2px 0 var(--rule-dark);
  transition: box-shadow .2s;
}
.masthead.is-stuck { box-shadow: 0 1px 0 var(--vellum), 0 2px 0 var(--rule-dark), 0 10px 24px -14px rgba(40, 30, 10, .5); }
.masthead-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; height: var(--mast-h); transition: height .25s var(--ease); }
.masthead.is-stuck .masthead-inner { height: 68px; }

.menu-btn { display: none; }
.mast-nav { display: flex; gap: 30px; }
.mast-nav a { position: relative; font-family: var(--font-caps); font-size: 1.02rem; letter-spacing: .12em; color: var(--ink); padding: 6px 0; }
.mast-nav a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 1px; background: var(--green); transition: left .25s var(--ease), right .25s var(--ease); }
.mast-nav a:hover::after, .mast-nav a.active::after { left: 0; right: 0; }
.mast-nav a.active { color: var(--green-dark); }

.crest { display: grid; justify-items: center; color: var(--ink); text-align: center; line-height: 1; }
.crest svg { width: 34px; height: 34px; margin-bottom: 4px; transition: all .25s var(--ease); }
.crest .wordmark { font-family: var(--font-title); font-size: 1.65rem; letter-spacing: .04em; white-space: nowrap; transition: font-size .25s var(--ease); }
.crest .motto { font-family: var(--font-caps); font-size: .74rem; letter-spacing: .24em; color: var(--bronze); margin-top: 5px; white-space: nowrap; transition: opacity .2s, margin .25s; }
.masthead.is-stuck .crest svg { width: 0; height: 0; margin: 0; opacity: 0; }
.masthead.is-stuck .crest .wordmark { font-size: 1.4rem; }
.masthead.is-stuck .crest .motto { opacity: 0; height: 0; margin: 0; overflow: hidden; }
.crest:hover { color: var(--green-dark); }

.mast-actions { display: flex; justify-content: flex-end; gap: 8px; }
.mast-actions .plain-btn { font-family: var(--font-caps); letter-spacing: .1em; font-size: .95rem; color: var(--ink); }
.mast-actions .plain-btn:hover { color: var(--green); }
.mast-actions .bag { position: relative; }
.badge-count {
  position: absolute; top: 0; left: 26px; min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 10px;
  font-family: var(--font-body); font-size: .7rem; font-weight: 900; letter-spacing: 0; line-height: 1;
  color: #fff; background: var(--oxblood);
}
.badge-count:empty, .badge-count[data-count="0"] { display: none; }
.badge-count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.4); } }

.search-panel { border-top: 1px solid var(--rule); background: var(--vellum-2); }
.search-panel form { display: flex; align-items: center; gap: 14px; padding-top: 18px; padding-bottom: 18px; }
.search-panel .icon { width: 24px; height: 24px; color: var(--green); }
.search-panel input { border: 0; border-bottom: 1px solid var(--rule-dark); background: transparent; border-radius: 0; font-family: var(--font-title); font-size: 1.4rem; box-shadow: none !important; }
.search-panel input:focus { border-bottom-color: var(--green); }

/* Tiroir mobile */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(30, 24, 15, .45); }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 90;
  width: min(360px, 88vw); overflow-y: auto;
  padding: 18px 20px 30px;
  background: var(--vellum);
  box-shadow: 12px 0 30px rgba(30, 20, 5, .3);
  border-right: 3px double var(--rule-dark);
  animation: slideIn .25s var(--ease);
}
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer-head .wordmark { font-family: var(--font-title); font-size: 1.35rem; }
.drawer-search { margin-bottom: 14px; }
.drawer-nav { display: grid; border-top: 1px solid var(--rule); margin-bottom: 18px; }
.drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--rule); font-family: var(--font-caps); letter-spacing: .08em; color: var(--ink); }
.drawer-nav a .icon { color: var(--green); width: 22px; height: 22px; }
.drawer-section { margin-bottom: 18px; }
.drawer-logout { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); }

/* ---------- Avis du Nexus ---------- */
.nexus-notice { background: var(--bronze-wash); border-bottom: 1px solid var(--rule-dark); }
.nexus-notice.sync { background: var(--green-wash); }
.nexus-inner { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.nexus-seal { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; color: var(--vellum); background: var(--green-dark); box-shadow: 0 0 0 3px var(--bronze-wash), 0 0 0 4px var(--bronze); }
.nexus-notice.sync .nexus-seal { box-shadow: 0 0 0 3px var(--green-wash), 0 0 0 4px var(--green); }
.nexus-seal .icon { width: 22px; height: 22px; }
.nexus-text { flex: 1; min-width: 0; }
.nexus-text strong { font-family: var(--font-title); font-weight: 400; font-size: 1.12rem; }
.nexus-text p { margin: 2px 0 0; color: var(--ink-soft); font-size: .93rem; max-width: 90ch; }
.nexus-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.rune-progress { margin-top: 10px; max-width: 520px; }
.rune-progress .track { position: relative; height: 6px; background: rgba(255, 255, 255, .7); border: 1px solid var(--rule-dark); overflow: hidden; }
.rune-progress .fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: repeating-linear-gradient(-45deg, var(--green) 0 6px, var(--green-light) 6px 12px); background-size: 17px 17px; transition: width .8s ease; animation: march 1s linear infinite; }
.rune-progress .fill.done { background: var(--green); animation: none; }
@keyframes march { to { background-position: 17px 0; } }
.rune-progress .label { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Avis (flash) & toasts ---------- */
.flashes { display: grid; gap: 10px; margin: 22px 0 0; }
.note {
  position: relative; margin: 0 0 14px; padding: 13px 16px 13px 48px;
  background: var(--vellum); border: 1px solid var(--rule); border-left: 3px solid var(--ink-faint);
  border-radius: var(--radius); color: var(--ink); font-size: .95rem;
}
.flashes .note { margin: 0; }
.note::before { content: ""; position: absolute; left: 16px; top: 15px; width: 18px; height: 18px; background: var(--ink-faint); -webkit-mask: var(--note-icon, url("/icons/info.svg")) center / contain no-repeat; mask: var(--note-icon, url("/icons/info.svg")) center / contain no-repeat; }
.note-success { border-left-color: var(--green); background: #f2f5ea; --note-icon: url("/icons/check-mark.svg"); } .note-success::before { background: var(--green); }
.note-danger { border-left-color: var(--oxblood); background: #f9eee8; --note-icon: url("/icons/cancel.svg"); } .note-danger::before { background: var(--oxblood); }
.note-warning { border-left-color: var(--amber); background: #faf2df; --note-icon: url("/icons/hazard-sign.svg"); } .note-warning::before { background: var(--amber); }
.note-info { border-left-color: var(--bronze); --note-icon: url("/icons/info.svg"); } .note-info::before { background: var(--bronze); }

.toast-zone { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 44px)); }
.toast { margin: 0; box-shadow: 0 16px 30px -12px rgba(30, 20, 5, .55); animation: toastIn .3s var(--ease); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Étiquettes, pièces, quantités ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; font-family: var(--font-caps); font-size: .8rem; letter-spacing: .06em; line-height: 1.7; color: var(--ink-soft); background: var(--vellum-2); border: 1px solid var(--rule); border-radius: var(--radius); white-space: nowrap; }
.tag .icon { width: 1em; height: 1em; }
.tag-success, .tag-verdigris, .tag-arcane { color: var(--green-dark); background: var(--green-wash); border-color: rgba(87, 117, 87, .4); }
.tag-wine, .tag-wax, .tag-ember { color: #fff; background: var(--oxblood); border-color: var(--oxblood); }
.tag-brass, .tag-gold { color: #5d4214; background: var(--bronze-wash); border-color: var(--bronze-light); }
.tag-muted, .tag-outline { color: var(--ink-faint); background: transparent; }

.coins { display: inline-flex; gap: 9px; flex-wrap: wrap; align-items: baseline; font-weight: 700; color: var(--ink); }
.coin { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.coin i { font-style: normal; font-weight: 400; font-size: .82em; color: var(--ink-soft); }
.coin::before { content: ""; width: .74em; height: .74em; border-radius: 50%; align-self: center; margin-right: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22), inset 0 -2px 2px rgba(0, 0, 0, .18); }
.coin-pp::before { background: radial-gradient(circle at 35% 30%, #fff, #b4bcc4); }
.coin-gp::before { background: radial-gradient(circle at 35% 30%, #ffeaa0, #d1a442 55%, #8c661f); }
.coin-ep::before { background: radial-gradient(circle at 35% 30%, #f6f1cf, #a9a26a); }
.coin-sp::before { background: radial-gradient(circle at 35% 30%, #fff, #b8bcc4 60%, #7a7f88); }
.coin-cp::before { background: radial-gradient(circle at 35% 30%, #f6c09a, #b4642d 60%, #6d3512); }
.coins-free { color: var(--green); }
.price-old { text-decoration: line-through; color: var(--ink-faint); font-size: .85em; font-weight: 400; margin-right: 6px; }

.qty { display: inline-flex; align-items: stretch; height: 54px; background: #fffdf7; border: 1px solid var(--ink); border-radius: var(--radius); }
.qty button { width: 42px; border: 0; background: transparent; color: var(--ink); font-size: 1.15rem; cursor: pointer; }
.qty button:hover { background: var(--green-wash); }
.qty input { width: 44px; min-height: 0; height: 100%; text-align: center; border: 0; border-radius: 0; box-shadow: none !important; padding: 0; background: transparent; -moz-appearance: textfield; font-weight: 700; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.qty-sm { height: 36px; border-color: var(--rule-dark); }
.qty.qty-sm button { width: 30px; }
.qty.qty-sm input { width: 34px; }

.rarity { font-family: var(--font-caps); letter-spacing: .08em; }
.rarity-common { color: var(--r-common); }
.rarity-uncommon { color: var(--r-uncommon); }
.rarity-rare { color: var(--r-rare); }
.rarity-very-rare { color: var(--r-very-rare); }
.rarity-legendary { color: var(--r-legendary); }
.rarity-artifact { color: var(--r-artifact); }

.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--green); }
.status-dot.off::before { background: var(--oxblood); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; font-family: var(--font-caps); font-size: .82rem; letter-spacing: .06em; white-space: nowrap; border: 1px solid; border-radius: var(--radius); background: var(--vellum); }
.status-pending { color: var(--amber); border-color: rgba(168, 116, 26, .5); }
.status-processing { color: var(--r-rare); border-color: rgba(46, 95, 158, .45); }
.status-completed { color: #fff; background: var(--green); border-color: var(--green); }
.status-failed { color: var(--oxblood); border-color: rgba(125, 47, 40, .5); }
.status-cancelled, .status-expired { color: var(--ink-faint); border-color: var(--rule); }

/* ---------- Titres de section ---------- */
.section-title { text-align: center; margin: 84px auto 36px; max-width: 720px; }
.section-title h2 { margin: 0 0 6px; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-title p { margin: 0; color: var(--ink-faint); }
.page-title { text-align: center; margin: 4px auto 36px; max-width: 760px; }
.page-title h1 { margin-bottom: 4px; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; font-size: .88rem; color: var(--ink-faint); }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs .sep { color: var(--rule-dark); }
.breadcrumbs.on-dark, .breadcrumbs.on-dark a { color: rgba(251, 246, 232, .8); }
.breadcrumbs.on-dark .sep { color: rgba(251, 246, 232, .45); }

/* ==========================================================================
   Accueil
   ========================================================================== */
.frontispiece {
  position: relative; text-align: center;
  padding: clamp(56px, 9vw, 110px) 0 clamp(80px, 10vw, 130px);
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><g fill='none' stroke='%239c7536' stroke-opacity='.13'><path d='M32 4l28 28-28 28L4 32z'/><path d='M32 18l14 14-14 14-14-14z'/></g><circle cx='32' cy='32' r='2' fill='%23577557' fill-opacity='.18'/></svg>"),
    radial-gradient(ellipse at 50% 40%, #faf4e4 0%, transparent 70%);
  border-bottom: 1px solid var(--rule);
}
.frontispiece::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; border-bottom: 1px solid var(--rule); }
.frontispiece-inner { max-width: 860px; }
.frontispiece h1 { font-size: clamp(2.6rem, 6.5vw, 4.8rem); line-height: 1.05; color: var(--green-deep); margin-bottom: 18px; }
.frontispiece-lead { font-family: var(--font-title); font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--ink-soft); margin: 0 auto; max-width: 640px; }
.frontispiece-lore { max-width: 640px; margin: 0 auto 34px; color: var(--ink-soft); }
.frontispiece-lore::first-letter { font-family: var(--font-title); font-size: 2.4em; float: left; line-height: .9; margin: 4px 8px 0 0; color: var(--green); }
.frontispiece-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.persona-bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 26px; align-items: center;
  margin-top: -54px; padding: 22px 30px;
}
.persona-bar .eyebrow { margin-bottom: 0; }
.persona-bar h2 { margin: 0; font-size: 1.75rem; }
.persona-bar-purse { padding: 0 26px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.persona-bar-purse .label, .label { display: block; font-family: var(--font-caps); font-size: .82rem; letter-spacing: .12em; color: var(--ink-faint); }
.persona-bar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Maisons marchandes */
.houses { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.house { display: flex; flex-direction: column; color: var(--ink); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.house:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--frame), var(--lift-hover); }
.house-banner {
  position: relative; height: 170px; margin: 6px 6px 0; overflow: hidden;
  display: grid; place-items: center;
  background-color: var(--accent);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><path d='M24 0L48 24L24 48L0 24Z' fill='none' stroke='white' stroke-opacity='.10'/></svg>"),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .16), rgba(0, 0, 0, .22) 75%);
  background-size: 48px 48px, cover;
}
.house-banner.has-image { background-size: cover; background-position: center; }
.house-banner.has-image::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .25); }
.house-emblem { position: relative; z-index: 1; display: grid; place-items: center; width: 86px; height: 86px; color: #fbf6e8; border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 0 0 5px rgba(255, 255, 255, .08); transform: rotate(45deg); transition: transform .4s var(--ease); }
.house-emblem .icon { width: 46px; height: 46px; transform: rotate(-45deg); }
.house:hover .house-emblem { transform: rotate(45deg) scale(1.06); }
.house-closed { position: absolute; z-index: 2; top: 14px; right: -34px; transform: rotate(35deg); padding: 3px 40px; font-family: var(--font-caps); letter-spacing: .14em; font-size: .8rem; color: #fff; background: var(--oxblood); }
.house.is-closed .house-banner { filter: grayscale(.6); }
.house-body { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 26px 24px; }
.house-keeper { margin-top: -58px; margin-bottom: 12px; border: 3px solid var(--vellum) !important; box-shadow: 0 0 0 1px var(--bronze); }
.house-body h3 { font-size: 1.55rem; margin: 0 0 2px; }
.house-keeper-name { font-size: .9rem; font-style: italic; color: var(--ink-faint); }
.house-tagline { color: var(--ink-soft); margin: 12px 0 0; max-width: 34ch; }
.house-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 12px; width: 100%; justify-content: center; font-size: .88rem; color: var(--ink-faint); }
.house-enter { font-family: var(--font-caps); letter-spacing: .14em; color: var(--green-dark); border-bottom: 1px solid currentColor; }

/* Trouvailles */
.rail-wrap { position: relative; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 8px 8px 18px; margin: 0 -8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail-nav { position: absolute; top: 38%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule-dark); background: var(--vellum); color: var(--ink); cursor: pointer; box-shadow: var(--lift); }
.rail-nav:hover { background: var(--ink); color: var(--vellum); }
.rail-nav.prev { left: -20px; }
.rail-nav.next { right: -20px; }
.rail-nav.prev .chev { transform: rotate(135deg) translate(-1px, -1px); margin: 0; }
.rail-nav.next .chev { transform: rotate(-45deg) translate(-1px, -1px); margin: 0; }

/* Passage secret */
.secret { max-width: 720px; margin: 96px auto 0; padding: 48px 40px 40px; text-align: center; }
.secret h3 { font-size: 1.7rem; margin-bottom: 6px; }
.secret p { color: var(--ink-soft); }
.secret form { display: flex; gap: 10px; max-width: 480px; margin: 22px auto 0; }
.wax-seal { display: inline-grid; place-items: center; width: 62px; height: 62px; margin-bottom: 12px; border-radius: 50%; color: #f6dccd; background: radial-gradient(circle at 38% 32%, #a24b40, var(--oxblood) 60%, #561d18); box-shadow: 0 3px 6px rgba(0, 0, 0, .3), inset 0 -3px 6px rgba(0, 0, 0, .3), inset 0 2px 3px rgba(255, 255, 255, .2); }
.wax-seal .icon { width: 28px; height: 28px; }

/* ==========================================================================
   Articles (cartes produit)
   ========================================================================== */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 24px; }
.product { --rc: var(--r-common); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.product:hover { transform: translateY(-4px); box-shadow: var(--frame), var(--lift-hover); }
.product-media { position: relative; aspect-ratio: 1 / 1; margin: 6px 6px 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 46%, #fffdf7 0%, var(--vellum-2) 58%, var(--paper-2) 100%); }
.product-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); opacity: .85; }
.product-media img { width: 60%; height: 60%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(60, 40, 15, .3)); transition: transform .4s var(--ease); }
.product:hover .product-media img { transform: scale(1.07); }
.product-flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; z-index: 2; }
.flag { padding: 2px 9px; font-family: var(--font-caps); font-size: .76rem; letter-spacing: .1em; color: var(--ink-soft); background: var(--vellum); border: 1px solid var(--rule); }
.flag-brass { color: #fff; background: var(--bronze); border-color: var(--bronze); }
.flag-red { color: #fff; background: var(--oxblood); border-color: var(--oxblood); }
.product-quick { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; transform: translateY(101%); transition: transform .3s var(--ease); }
.product:hover .product-quick, .product-quick:focus-within { transform: translateY(0); }
.product-quick button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; border: 0; cursor: pointer; font-family: var(--font-caps); letter-spacing: .1em; font-size: .9rem; color: #fbf6e8; background: rgba(44, 63, 45, .94); }
.product-quick button:hover { background: var(--green-deep); }
.product-quick .icon { width: 18px; height: 18px; }
.product-body { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 16px 16px 20px; }
.product-rarity { font-size: .76rem; color: var(--rc); }
.product-name { font-family: var(--font-title); font-size: 1.18rem; line-height: 1.25; color: var(--ink); }
.product-name::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-name:hover { color: var(--green-dark); }
.product-meta { font-size: .84rem; color: var(--ink-faint); }
.product-price { margin-top: 8px; }
.product-stock { font-size: .8rem; color: var(--amber); }
.product.is-out { opacity: .6; }
.product.is-hidden { box-shadow: 0 0 0 2px var(--r-very-rare), inset 0 0 0 5px var(--vellum), inset 0 0 0 6px var(--rule); }
[data-rarity="uncommon"] { --rc: var(--r-uncommon); }
[data-rarity="rare"] { --rc: var(--r-rare); }
[data-rarity="very-rare"] { --rc: var(--r-very-rare); }
[data-rarity="legendary"] { --rc: var(--r-legendary); }
[data-rarity="artifact"] { --rc: var(--r-artifact); }

/* ==========================================================================
   Échoppe
   ========================================================================== */
.house-hero {
  position: relative; text-align: center; color: #fbf6e8; margin-top: -36px;
  background-color: var(--accent);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56'><path d='M28 0L56 28L28 56L0 28Z' fill='none' stroke='white' stroke-opacity='.09'/><circle cx='28' cy='28' r='1.5' fill='white' fill-opacity='.12'/></svg>"),
    linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .3));
  background-size: 56px 56px, cover;
  background-position: center;
  border-bottom: 4px double var(--bronze-light);
}
.house-hero.has-image { background-size: cover; }
.house-hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 15, 8, .35), rgba(20, 15, 8, .7)); }
.house-hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 26px; padding-bottom: 56px; }
.house-hero .breadcrumbs { align-self: flex-start; margin-bottom: 30px; }
.house-hero .avatar-xl { margin-bottom: 18px; border-color: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px var(--bronze-light), 0 0 0 7px rgba(255, 255, 255, .08); }
.house-hero-emblem { display: grid; place-items: center; width: 96px; height: 96px; margin: 8px 0 30px; color: #fbf6e8; border: 1px solid rgba(255, 255, 255, .5); transform: rotate(45deg); }
.house-hero-emblem .icon { width: 50px; height: 50px; transform: rotate(-45deg); }
.house-hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.8rem); margin: 0 0 10px; text-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.house-hero-tagline { font-family: var(--font-title); font-size: 1.2rem; opacity: .9; max-width: 640px; margin: 0; }
.house-hero-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.badge-dark { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; font-family: var(--font-caps); font-size: .84rem; letter-spacing: .1em; color: #fbf6e8; border: 1px solid rgba(255, 255, 255, .45); }
a.badge-dark:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.welcome { max-width: 820px; margin: -34px auto 0; padding: 34px 44px; text-align: center; z-index: 2; }
.welcome-quote { margin: 0; font-family: var(--font-title); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--ink); }
.welcome cite { display: block; margin-top: 10px; font-style: normal; font-family: var(--font-caps); letter-spacing: .14em; color: var(--bronze); }
.welcome-desc { margin: 18px auto 0; max-width: 62ch; color: var(--ink-soft); }

.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; margin-top: 60px; align-items: start; }
.catalog-index { position: sticky; top: 92px; }
.catalog-index-toggle { display: none; }
.catalog-index-body { display: grid; gap: 4px; }
.index-block { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.index-block:first-child { padding-top: 0; }
.index-block h4 { font-family: var(--font-caps); font-size: .9rem; letter-spacing: .16em; color: var(--bronze); margin-bottom: 10px; }
.index-link { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--ink-soft); font-size: .95rem; }
.index-link .icon { color: var(--green-light); width: 1em; height: 1em; }
.index-link:hover { color: var(--green-dark); }
.index-link.on { color: var(--ink); font-weight: 700; }
.index-link.on::before { content: ""; width: 5px; height: 5px; transform: rotate(45deg); background: var(--green); margin-left: -13px; margin-right: 3px; }
.index-actions { display: flex; gap: 8px; padding-top: 16px; }

.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--rule); }
.sort-form select { width: auto; min-width: 230px; min-height: 40px; background-color: transparent; border-color: var(--rule); }
.aisle-title { display: flex; align-items: center; gap: 18px; margin: 46px 0 22px; font-size: 1.5rem; color: var(--green-dark); }
.aisle-title::before, .aisle-title::after { content: ""; flex: 1; height: 1px; background: var(--rule-dark); }
.aisle-title:first-child { margin-top: 0; }

/* ==========================================================================
   Fiche article
   ========================================================================== */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.pdp-media { position: sticky; top: 92px; }
.pdp-frame { aspect-ratio: 1 / 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, #fffdf7 0%, var(--vellum-2) 60%, var(--paper-2) 100%); }
.pdp-frame::marker { display: none; }
.pdp-frame img { width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 16px 16px rgba(60, 40, 15, .35)); }
.pdp-frame .product-flags { top: 20px; left: 20px; }
.pdp-info h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin: 4px 0 8px; }
.pdp-sub { color: var(--ink-faint); font-size: .95rem; }
.pdp-sub .sep { margin: 0 8px; color: var(--rule-dark); }
.pdp-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 20px 0; margin: 10px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 1.55rem; }
.pdp-price .muted { font-size: .95rem; }
.pdp-stock { margin: 16px 0 22px; font-size: .95rem; }
.pdp-buy { display: flex; gap: 12px; margin-bottom: 18px; }
.pdp-buy .btn { flex: 1; }
.pdp-purse { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 18px; background: var(--vellum); border: 1px solid var(--rule); font-size: .95rem; }
.accordion { margin-top: 30px; border-top: 1px solid var(--rule-dark); }
.accordion details { border-bottom: 1px solid var(--rule); }
.accordion summary { display: flex; justify-content: space-between; align-items: center; padding: 18px 2px; cursor: pointer; list-style: none; font-family: var(--font-caps); font-size: 1.02rem; letter-spacing: .12em; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--font-body); font-size: 1.4rem; font-weight: 300; color: var(--green); }
.accordion details[open] summary::after { content: "−"; }
.accordion details > :not(summary) { padding: 0 2px 22px; }
.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 30px; margin: 0; }
.specs dt { font-family: var(--font-caps); letter-spacing: .06em; color: var(--ink-faint); }
.specs dd { margin: 0; }
.description { color: var(--ink-soft); }
.description p:last-child { margin-bottom: 0; }
.description em { color: var(--green-dark); font-style: normal; font-weight: 700; }
.description table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .92rem; background: var(--vellum); }
.description th, .description td { border: 1px solid var(--rule); padding: 6px 10px; }
.description .dice { color: var(--oxblood); }
.buy-dock { display: none; }

/* ==========================================================================
   Recherche
   ========================================================================== */
.search-hero { text-align: center; max-width: 760px; margin: 10px auto 46px; }
.search-hero-form { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; padding: 8px 8px 8px 18px; background: var(--vellum); box-shadow: var(--frame); }
.search-hero-form > .icon { width: 22px; height: 22px; color: var(--green); }
.search-hero-form input { border: 0; background: transparent; box-shadow: none !important; font-size: 1.1rem; }

/* ==========================================================================
   Sacoche
   ========================================================================== */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 34px; align-items: start; }
.bag-list { padding: 10px 28px 18px; }
.bag-head, .bag-line { display: grid; grid-template-columns: 92px minmax(0, 1fr) 150px 130px; gap: 20px; align-items: center; }
.bag-head { grid-template-columns: minmax(0, 1fr) 150px 130px; padding: 16px 0 12px; border-bottom: 1px solid var(--rule-dark); font-family: var(--font-caps); font-size: .85rem; letter-spacing: .14em; color: var(--ink-faint); }
.bag-head span:first-child { padding-left: 0; }
.bag-line { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.bag-pic { width: 92px; height: 92px; display: grid; place-items: center; background: radial-gradient(circle, #fffdf7, var(--vellum-2) 70%); border: 1px solid var(--rule); }
.bag-pic img { width: 70%; height: 70%; object-fit: contain; }
.bag-info { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.bag-name { font-family: var(--font-title); font-size: 1.2rem; color: var(--ink); }
.bag-info .muted { font-size: .88rem; }
.bag-qty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bag-total { font-size: 1.02rem; }
.bag-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }

.ledger { position: sticky; top: 92px; padding: 34px 30px 28px; }
.ledger h2 { text-align: center; font-size: 1.6rem; margin-bottom: 20px; }
.ledger-who { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.ledger-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 0; border-bottom: 1px dotted var(--rule-dark); color: var(--ink-soft); }
.ledger-row.total { border-bottom: 0; border-top: 3px double var(--rule-dark); margin-top: 6px; padding-top: 14px; color: var(--ink); font-weight: 700; }
.ledger .note { margin-top: 14px; }
.ledger form { margin-top: 20px; }
.ledger-note { margin: 16px 0 0; font-size: .84rem; color: var(--ink-faint); text-align: center; }
.neg { color: var(--oxblood); }

/* ==========================================================================
   Compte
   ========================================================================== */
.account { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; }
.account-nav { position: sticky; top: 92px; padding: 28px 22px; }
.account-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding-bottom: 20px; margin-bottom: 10px; border-bottom: 1px solid var(--rule); }
.account-id strong { font-family: var(--font-title); font-weight: 400; font-size: 1.3rem; margin-top: 8px; }
.account-id .muted { font-size: .88rem; }
.account-nav nav { display: grid; }
.account-nav nav a { display: flex; align-items: center; gap: 12px; padding: 11px 8px; color: var(--ink-soft); border-bottom: 1px solid transparent; font-family: var(--font-caps); letter-spacing: .06em; }
.account-nav nav a .icon { color: var(--green-light); }
.account-nav nav a:hover { color: var(--ink); background: var(--vellum-2); }
.account-nav nav a.on { color: var(--ink); background: var(--green-wash); box-shadow: inset 3px 0 0 var(--green); }
.account-nav nav a.on .icon { color: var(--green); }
.account-main > * + * { margin-top: 30px; }
.account-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--rule-dark); }
.account-head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 4px; }
.account-head .eyebrow { margin-bottom: 4px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px; }
.account-grid h3 { margin-bottom: 14px; }

.segmented { display: inline-flex; border: 1px solid var(--rule-dark); border-radius: var(--radius); overflow: hidden; }
.segmented a { padding: 8px 16px; font-family: var(--font-caps); font-size: .9rem; letter-spacing: .06em; color: var(--ink-soft); }
.segmented a + a { border-left: 1px solid var(--rule-dark); }
.segmented a.on { background: var(--green); color: #fbf6e8; }

.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px; }
.persona { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 30px 20px 26px; }
.persona h3 { margin: 10px 0 0; font-size: 1.5rem; }
.persona-purse { margin: 4px 0 10px; }
.persona.is-active { box-shadow: 0 0 0 2px var(--green), inset 0 0 0 5px var(--vellum), inset 0 0 0 6px var(--green-light), var(--lift); }
.persona-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-caps); letter-spacing: .1em; font-size: .85rem; color: var(--green-dark); }
.persona form, .persona > .btn { margin-top: auto; }

.mini-orders { list-style: none; padding: 0; margin: 0; }
.mini-orders li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px dotted var(--rule-dark); }
.mini-orders li:last-child { border-bottom: 0; }
.mini-orders .muted { font-size: .88rem; }

.orders-table .ref { font-family: var(--font-title); font-size: 1.05rem; }

/* Suivi de commande */
.tracking { padding: 40px 34px 30px; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 0 auto 26px; max-width: 700px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 25px; left: 16.6%; right: 16.6%; height: 2px; background: var(--rule); }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; color: var(--ink-faint); }
.timeline .dot { position: relative; z-index: 1; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--vellum); border: 1px solid var(--rule-dark); color: var(--rule-dark); margin-bottom: 8px; }
.timeline .dot .icon { width: 24px; height: 24px; }
.timeline li strong { font-family: var(--font-caps); font-weight: 400; letter-spacing: .1em; }
.timeline li small { font-size: .82rem; }
.timeline li.done { color: var(--ink); }
.timeline li.done .dot { background: var(--green); border-color: var(--green); color: #fbf6e8; box-shadow: 0 0 0 4px var(--vellum), 0 0 0 5px var(--green-light); }
.timeline li.current .dot { border-color: var(--green); color: var(--green); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(87, 117, 87, .15); } }
.tracking-msg { text-align: center; color: var(--ink-soft); max-width: 60ch; margin: 0 auto 12px; }
.tracking-failed { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.tracking-failed .wax-seal { margin: 0; }
.tracking-failed h2 { font-size: 1.5rem; margin-bottom: 4px; }
.order-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.thumb-sm { width: 46px; height: 46px; object-fit: contain; background: radial-gradient(circle, #fffdf7, var(--vellum-2)); border: 1px solid var(--rule); padding: 4px; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { font-family: var(--font-caps); font-weight: 400; font-size: .86rem; letter-spacing: .12em; color: var(--ink-faint); text-align: left; padding: 14px 14px 12px; border-bottom: 1px solid var(--rule-dark); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(87, 117, 87, .04); }
.table tfoot td { border-top: 3px double var(--rule-dark); border-bottom: 0; padding-top: 14px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { padding: 8px 18px; }

/* ---------- États vides ---------- */
.empty-state { text-align: center; padding: 64px 24px; color: var(--ink-soft); }
.empty-state .big { display: grid; place-items: center; margin-bottom: 14px; }
.empty-state .big .icon { width: 64px; height: 64px; color: var(--rule-dark); }
.empty-state h3 { font-size: 1.6rem; }
.lost { max-width: 640px; margin: 40px auto; padding: 56px 40px; text-align: center; }
.lost .big .icon { width: 70px; height: 70px; color: var(--bronze); margin-bottom: 12px; }
.lost h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.lost p { color: var(--ink-soft); }

/* ==========================================================================
   Pied de page
   ========================================================================== */
.footer { margin-top: auto; color: #d6cdb3; background: var(--green-deep); font-size: .92rem; }
.promises { background: var(--vellum); color: var(--ink); border-top: 1px solid var(--rule); border-bottom: 4px double var(--rule-dark); }
.promises-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-top: 34px; padding-bottom: 34px; }
.promise { display: flex; gap: 16px; align-items: flex-start; }
.promise > .icon { width: 34px; height: 34px; color: var(--green); flex-shrink: 0; }
.promise strong { display: block; font-family: var(--font-caps); font-weight: 400; letter-spacing: .1em; font-size: 1rem; margin-bottom: 2px; }
.promise span { font-size: .9rem; color: var(--ink-soft); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-top: 50px; padding-bottom: 50px; }
.footer-brand svg { width: 36px; height: 36px; margin-bottom: 8px; }
.footer-brand .wordmark { display: block; font-family: var(--font-title); font-size: 1.45rem; color: #fbf6e8; margin-bottom: 10px; }
.footer-brand p { max-width: 38ch; }
.footer h4 { font-family: var(--font-caps); font-size: .9rem; letter-spacing: .18em; color: var(--bronze-light); margin-bottom: 14px; }
.footer-inner > div > a { display: block; padding: 3px 0; color: #e7dfc9; }
.footer-inner > div > a:hover { color: #fff; }
.footer p { margin: 0 0 8px; }
.footer .credit { font-size: .8rem; opacity: .75; }
.footer .credit a { color: inherit; text-decoration: underline; }

/* ==========================================================================
   Seuil (connexion)
   ========================================================================== */
.page-auth .page { padding: 0; display: flex; }
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  position: relative; display: grid; place-items: center; padding: 60px 50px; color: #f1e9d3; text-align: center;
  background-color: var(--green-deep);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='72'><g fill='none' stroke='%23cdab6a' stroke-opacity='.14'><path d='M36 2l34 34-34 34L2 36z'/><path d='M36 18l18 18-18 18-18-18z'/></g></svg>"),
    radial-gradient(circle at 50% 45%, var(--green) 0%, var(--green-deep) 70%);
}
.auth-art::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(205, 171, 106, .35); outline: 1px solid rgba(205, 171, 106, .2); outline-offset: 5px; pointer-events: none; }
.auth-art-inner { position: relative; max-width: 440px; }
.auth-art svg { width: 92px; height: 92px; margin: 0 auto 18px; }
.auth-brand { font-family: var(--font-title); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.1; color: #fbf6e8; margin: 6px 0 0; }
.auth-art blockquote { margin: 0; font-family: var(--font-title); font-size: 1.15rem; line-height: 1.6; color: #e9e1c9; }
.auth-art cite { display: block; margin-top: 14px; font-style: normal; font-family: var(--font-caps); letter-spacing: .14em; font-size: .85rem; color: var(--bronze-light); }
.auth-panel { display: grid; place-items: center; padding: 60px 40px; background: var(--vellum); }
.auth-form { width: 100%; max-width: 410px; }
.auth-form h1 { font-size: clamp(2rem, 3vw, 2.5rem); margin-bottom: 8px; }
.auth-form > .muted { margin-bottom: 28px; }
.auth-form .fleuron { margin: 30px auto 18px; }

/* ==========================================================================
   Cabinet de la Guilde (administration)
   ========================================================================== */
.admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.admin-nav { position: sticky; top: 92px; padding: 24px 18px; }
.admin-nav .eyebrow { display: flex; padding: 0 8px 10px; margin: 0 0 8px; border-bottom: 1px solid var(--rule); }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; color: var(--ink-soft); font-family: var(--font-caps); letter-spacing: .06em; }
.admin-nav a .icon { width: 1.25em; height: 1.25em; color: var(--green-light); }
.admin-nav a:hover { color: var(--ink); background: var(--vellum-2); }
.admin-nav a.active { color: var(--ink); background: var(--green-wash); box-shadow: inset 3px 0 0 var(--green); }
.admin-nav a.active .icon { color: var(--green); }
.admin-nav hr { border: 0; border-top: 1px solid var(--rule); margin: 10px 0; }
.admin-main > * + * { margin-top: 28px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--rule-dark); }
.admin-head h1 { margin: 0; display: flex; gap: 14px; align-items: center; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.admin-head h1 .icon { color: var(--bronze); width: .85em; height: .85em; }
.admin-head p { margin: 4px 0 0; color: var(--ink-faint); }
.panel { padding: 28px 30px; }
.panel h2, .panel h3 { display: flex; align-items: center; gap: 12px; }
.panel h2 { font-size: 1.45rem; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.panel h2 .icon, .panel h3 .icon { color: var(--bronze); width: .95em; height: .95em; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.stat { padding: 22px 18px; display: grid; gap: 2px; text-align: center; justify-items: center; }
.stat .icon { width: 26px; height: 26px; color: var(--green); }
.stat strong { font-family: var(--font-title); font-weight: 400; font-size: 2.1rem; line-height: 1.1; margin-top: 6px; }
.stat span { font-size: .86rem; color: var(--ink-faint); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin: 0; }
.kv dt { font-family: var(--font-caps); letter-spacing: .06em; color: var(--ink-faint); }
.kv dd { margin: 0; }
.steps-list { counter-reset: step; list-style: none; padding: 0; margin: 0 0 16px; }
.steps-list li { counter-increment: step; position: relative; padding: 4px 0 14px 46px; }
.steps-list li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--font-title); color: #fbf6e8; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px var(--vellum), 0 0 0 4px var(--bronze-light); }
.key-box { display: flex; gap: 8px; align-items: center; }
.key-box code { flex: 1; min-width: 0; overflow-x: auto; padding: 10px 12px; background: #fffdf7; color: var(--green-deep); border: 1px dashed var(--rule-dark); font-size: .85rem; white-space: nowrap; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; padding: 12px 14px; background: #fffdf7; border: 1px solid var(--rule-dark); max-height: 260px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.table img.thumb-sm { width: 44px; height: 44px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--rule-dark); border-radius: var(--radius); background: var(--vellum); color: var(--ink-soft); cursor: pointer; }
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--vellum); background: var(--ink); border-color: var(--ink); }
.icon-btn.on { color: #fbf6e8; background: var(--green); border-color: var(--green); }
.icon-btn.gold.on { color: #fff; background: var(--bronze); border-color: var(--bronze); }
.icon-btn.danger:hover { color: #fff; background: var(--oxblood); border-color: var(--oxblood); }
.inline-input { width: 96px !important; min-height: 34px !important; padding: .25em .5em !important; font-size: .92rem !important; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.toolbar .field { margin: 0; min-width: 160px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: 6px 10px; border: 1px solid var(--rule-dark); color: var(--ink-soft); background: var(--vellum); }
.pagination .current { background: var(--green); border-color: var(--green); color: #fbf6e8; }
.invite-link { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.invite-link input { min-height: 34px; font-size: .82rem; padding: .3em .6em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .mast-nav { gap: 20px; }
  .mast-actions .lbl { display: none; }
  .rail { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
  .checkout { grid-template-columns: 1fr; }
  .ledger { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .persona-bar { grid-template-columns: auto minmax(0, 1fr); }
  .persona-bar-purse { grid-column: 1 / -1; padding: 14px 0 0; border: 0; border-top: 1px solid var(--rule); }
  .persona-bar-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 960px) {
  :root { --mast-h: 68px; }
  .utility-right > a { display: none; }
  .mast-nav { display: none; }
  .menu-btn { display: inline-flex; justify-self: start; }
  .crest svg { display: none; }
  .crest .motto { display: none; }
  .crest .wordmark { font-size: 1.35rem; }
  .masthead.is-stuck .masthead-inner { height: 60px; }

  .catalog { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .catalog-index { position: static; }
  .catalog-index-toggle { display: inline-flex; width: 100%; }
  .catalog-index[open] .catalog-index-body { margin-top: 14px; padding: 20px; background: var(--vellum); box-shadow: var(--frame); }

  .pdp { grid-template-columns: 1fr; }
  .pdp-media { position: static; max-width: 520px; width: 100%; margin: 0 auto; }

  .account, .admin-layout { grid-template-columns: 1fr; gap: 24px; }
  .account-nav, .admin-nav { position: static; }
  .account-id { flex-direction: row; text-align: left; gap: 14px; }
  .account-id .avatar-lg { width: 56px; height: 56px; }
  .account-id strong { margin: 0; }
  .account-nav nav, .admin-nav { display: flex; overflow-x: auto; gap: 4px; }
  .account-nav nav a, .admin-nav a { flex-shrink: 0; }
  .admin-nav .eyebrow, .admin-nav hr { display: none; }
  .account-grid, .order-detail, .grid-2, .form-grid { grid-template-columns: 1fr; }

  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 46px 24px 40px; }
  .auth-art blockquote, .auth-art cite { display: none; }
  .auth-panel { padding: 40px 22px 60px; }
}

@media (max-width: 680px) {
  body { font-size: 15.5px; }
  .container { padding: 0 16px; }
  .page { padding: 26px 0 70px; }
  .utility .ring-status span:last-child { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .persona-switch .coins, .persona-switch .sep { display: none; }

  .frontispiece { padding: 46px 0 86px; }
  .frontispiece-cta .btn { width: 100%; }
  .persona-bar { margin-top: -50px; padding: 20px; gap: 16px; }
  .persona-bar .avatar-lg { width: 64px; height: 64px; }
  .persona-bar h2 { font-size: 1.4rem; }
  .persona-bar-actions .btn { flex: 1; }
  .section-title { margin: 60px auto 26px; }
  .houses { grid-template-columns: 1fr; gap: 22px; }
  .rail { grid-auto-columns: 62%; gap: 14px; }
  .rail-nav { display: none; }
  .secret { padding: 40px 22px 30px; margin-top: 70px; }
  .secret form { flex-direction: column; }

  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .product-body { padding: 12px 10px 14px; }
  .product-name { font-size: 1.02rem; }
  .product-quick { transform: none; position: static; }
  .product-quick button { min-height: 38px; font-size: .78rem; background: var(--green-dark); }
  .product-quick button span { display: none; }
  .product-media { overflow: visible; }

  .house-hero-inner { padding-bottom: 46px; }
  .welcome { padding: 28px 22px; margin-top: -26px; }
  .catalog-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .sort-form select { width: 100%; }

  .pdp-buy .qty { height: 50px; }
  .pdp-buy { display: none; }
  .buy-dock { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 54; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--vellum); border-top: 3px double var(--rule-dark); box-shadow: 0 -8px 20px -10px rgba(40, 30, 10, .4); }
  .buy-dock .price { flex: 1; min-width: 0; }
  .has-dock .page { padding-bottom: 120px; }
  .has-dock .toast-zone { bottom: 90px; }

  .bag-list { padding: 4px 16px 14px; }
  .bag-head { display: none; }
  .bag-line { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .bag-pic { width: 72px; height: 72px; }
  .bag-qty { grid-column: 2; flex-direction: row; align-items: center; }
  .bag-total { grid-column: 2; text-align: left; }
  .bag-foot { flex-direction: column; gap: 12px; align-items: flex-start; }

  .timeline .dot { width: 44px; height: 44px; }
  .timeline::before { top: 21px; }
  .timeline li small { display: none; }
  .tracking { padding: 30px 18px 22px; }
  .tracking-failed { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .mini-orders li { grid-template-columns: 1fr auto; }
  .mini-orders .muted { grid-column: 1 / -1; grid-row: 2; }

  .nexus-inner { flex-wrap: wrap; gap: 12px; }
  .nexus-seal { width: 34px; height: 34px; }
  .nexus-text p { display: none; }
  .nexus-actions { width: 100%; }
  .nexus-actions .btn { flex: 1; }

  .promises-inner { grid-template-columns: 1fr; gap: 18px; padding-top: 26px; padding-bottom: 26px; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; padding-top: 36px; padding-bottom: 36px; }
  .toast-zone { left: 16px; right: 16px; bottom: 16px; width: auto; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .panel { padding: 22px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Explorer les lieux (jets de compétence)
   ========================================================================== */
.explore { max-width: 980px; margin: 40px auto 0; padding: 30px 34px; }
.explore-head { display: flex; gap: 20px; align-items: flex-start; }
.explore-head h2 { font-size: 1.5rem; margin: 0 0 4px; }
.explore-die { display: grid; place-items: center; flex-shrink: 0; width: 58px; height: 58px; color: var(--vellum); background: var(--green-dark); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.explore-die .icon { width: 30px; height: 30px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 22px; }
.explore-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: #fffdf7; border: 1px solid var(--rule); }
.explore-option strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.05rem; }
.explore-option .muted { font-size: .86rem; }
.explore-option.is-done { opacity: .75; background: var(--vellum-2); }
.explore-score { display: grid; place-items: center; min-width: 44px; height: 44px; font-family: var(--font-title); font-size: 1.25rem; color: var(--green-dark); border: 1px solid var(--green-light); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--green-wash); }

.roll-result { display: flex; gap: 22px; align-items: center; margin-top: 22px; padding: 18px 22px; background: var(--bronze-wash); border: 1px solid var(--rule-dark); }
.roll-result.is-success { background: var(--green-wash); border-color: var(--green-light); }
.roll-d20 { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 76px; height: 76px; color: #fbf6e8; background: var(--green-dark); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); font-family: var(--font-title); font-size: 2rem; }
.roll-result.is-fail .roll-d20 { background: var(--bronze); }
.roll-result.is-crit .roll-d20 { background: var(--r-legendary); }
.roll-result.is-fumble .roll-d20 { background: var(--oxblood); }
.roll-d20.rolling { animation: tumble .9s cubic-bezier(.3, .7, .3, 1); }
@keyframes tumble { 0% { transform: rotate(-200deg) scale(.4); opacity: 0; } 60% { transform: rotate(20deg) scale(1.1); opacity: 1; } 100% { transform: rotate(0) scale(1); } }
.roll-text strong { font-family: var(--font-title); font-weight: 400; font-size: 1.3rem; margin-right: 8px; }
.roll-text p { margin-top: 6px; }
@media (max-width: 680px) {
  .explore { padding: 24px 18px; margin-top: 30px; }
  .explore-head { flex-direction: column; gap: 12px; }
  .roll-result { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   Animations au défilement
   ========================================================================== */
/* Les éléments ne sont masqués que si le JS est actif (classe ajoutée par app.js). */
.js-reveal .reveal {
  opacity: 0;
  translate: 0 34px;
  scale: .985;
  filter: blur(2px);
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 80ms),
    translate .9s var(--ease) calc(var(--i, 0) * 80ms),
    scale .9s var(--ease) calc(var(--i, 0) * 80ms),
    filter .8s var(--ease) calc(var(--i, 0) * 80ms),
    transform .3s var(--ease), box-shadow .3s var(--ease);
}
.js-reveal .reveal.in-view { opacity: 1; translate: none; scale: none; filter: none; }
/* Variante : glisse depuis le côté (index du catalogue, menu du compte…) */
.js-reveal .reveal.from-left { translate: -40px 0; }
.js-reveal .reveal.from-left.in-view { translate: none; }
/* Titres : les lettres « respirent » en apparaissant */
.js-reveal .section-title.reveal h2 { letter-spacing: .18em; transition: letter-spacing 1.2s var(--ease); }
.js-reveal .section-title.reveal.in-view h2 { letter-spacing: .01em; }
.js-reveal .section-title.reveal .fleuron, .js-reveal .section-title.reveal .eyebrow { transition: opacity 1s var(--ease) .3s; }

/* Frontispice : entrée orchestrée au chargement */
.frontispiece-inner > * { animation: rise 1s var(--ease) both; }
.frontispiece-inner > :nth-child(1) { animation-delay: .05s; }
.frontispiece-inner > :nth-child(2) { animation-delay: .18s; }
.frontispiece-inner > :nth-child(3) { animation-delay: .32s; }
.frontispiece-inner > :nth-child(4) { animation-delay: .44s; animation-name: unfurl; }
.frontispiece-inner > :nth-child(5) { animation-delay: .56s; }
.frontispiece-inner > :nth-child(6) { animation-delay: .7s; }
.house-hero-inner > * { animation: rise .9s var(--ease) both; }
.house-hero-inner > :nth-child(2) { animation-delay: .1s; }
.house-hero-inner > :nth-child(3) { animation-delay: .2s; }
.house-hero-inner > :nth-child(4) { animation-delay: .3s; }
.house-hero-inner > :nth-child(5) { animation-delay: .4s; }
.house-hero-inner > :nth-child(6) { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(3px); } }
@keyframes unfurl { from { opacity: 0; transform: scaleX(.2); } }

/* Parallaxe douce des motifs */
.frontispiece, .house-hero { background-attachment: scroll; }
.frontispiece { background-position: center calc(var(--scroll, 0) * -0.25px), center; }
.house-hero:not(.has-image) { background-position: center calc(var(--scroll, 0) * -0.3px), center; }

/* Emblèmes qui tournent lentement à l'apparition */
.js-reveal .house.reveal .house-emblem { transform: rotate(0deg) scale(.7); transition: transform 1.1s var(--ease) .25s; }
.js-reveal .house.reveal.in-view .house-emblem { transform: rotate(45deg); }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
}

/* Étapes du Nexus (serveur éveillé, en attente d'un Archiviste) */
.nexus-steps { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; }
.nexus-steps li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-faint); }
.nexus-steps li::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid currentColor; }
.nexus-steps li.done { color: var(--green-dark); }
.nexus-steps li.done::before { background: var(--green); border-color: var(--green); }
.nexus-steps li.wait:last-child::before { animation: blink 1.4s infinite; }

/* Interrupteur Vue MJ / Vue joueur */
.view-toggle button { display: inline-flex; padding: 0; border: 1px solid rgba(205, 171, 106, .5); background: none; cursor: pointer; font: inherit; font-size: .8rem; }
.view-toggle span { padding: 2px 10px; color: #cfc5a8; }
.view-toggle span.on { background: var(--bronze-light); color: var(--green-deep); font-weight: 700; }

/* ==========================================================================
   Plateau de dés 3D
   ========================================================================== */
body.dice-open { overflow: hidden; }
.dice-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; gap: 18px; padding: 20px; align-content: center; background: rgba(30, 24, 15, .72); backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.dice-tray { position: relative; width: min(720px, 94vw); height: min(440px, 56vh); border-radius: 4px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #3e573f, #22301f 80%); box-shadow: 0 0 0 6px #6b4a22, 0 0 0 8px var(--bronze-light), 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 0 60px rgba(0, 0, 0, .5); }
.dice-stage { position: absolute; inset: 0; }
.dice-stage canvas { width: 100% !important; height: 100% !important; }
.dice-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.dice-fallback .roll-d20 { width: 110px; height: 110px; font-size: 2.8rem; }
.dice-caption { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-family: var(--font-caps); letter-spacing: .14em; color: rgba(246, 236, 210, .8); }
.dice-result { width: min(460px, 94vw); padding: 26px 30px; text-align: center; animation: rise .5s var(--ease); }
.dice-total { margin: 0; font-family: var(--font-title); font-size: 3.4rem; line-height: 1; color: var(--bronze); }
.dice-result.is-success .dice-total { color: var(--green-dark); }
