/* =========================================================
   Partitions — feuille de style
   Papier réglé froid, encre marine, accent cuivre.
   ========================================================= */
:root {
  --paper: #f3f4f7; --sheet: #ffffff; --ink: #1b2340; --ink-2: #2a3560; --muted: #5b6380;
  --rule: #c9cfdb; --rule-soft: #e3e7ee; --brass: #b8892b; --on-brass: #1b2340;
  --ok: #2f7d5b; --bad: #b3403a; --warn: #8f6410; --focus: #b8892b;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 5px; --r-md: 8px; --shadow: 0 1px 2px rgba(27, 35, 64, .06), 0 6px 20px rgba(27, 35, 64, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12172a; --sheet: #1b2238; --ink: #e8eaf2; --ink-2: #ffffff; --muted: #9aa1b9; --rule: #3a4361; --rule-soft: #262e48;
    --on-brass: #12172a; --ok: #5fbf93; --bad: #e07b74; --warn: #d9a84a; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark;
  }
  :root:not([data-theme="light"]) .sheet img { filter: brightness(.94); }
}
:root[data-theme="dark"] { --paper: #12172a; --sheet: #1b2238; --ink: #e8eaf2; --ink-2: #fff; --muted: #9aa1b9; --rule: #3a4361; --rule-soft: #262e48; --on-brass: #12172a; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; outline: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-2); text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font: 400 clamp(2.1rem, 4.2vw, 3.2rem)/1.05 var(--serif); letter-spacing: -.005em; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 .8em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.num { font-family: var(--sans); font-weight: 500; font-size: .62em; font-variant-numeric: tabular-nums; letter-spacing: 0; vertical-align: .12em; }
.bad { color: var(--bad); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 760px; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.filled { fill: var(--bad); stroke: var(--bad); }

/* La portée : l'élément signature */
.staff { height: 21px; background: repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 5px); background-size: 100% 21px; background-repeat: no-repeat; margin: 18px 0 26px; }
.boot { padding: 30vh 16px; max-width: 320px; margin: 0 auto; }
.boot .staff { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- En-tête et pied ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule-soft); position: sticky; top: 0; z-index: 20; }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { font: 400 1.6rem/1 var(--serif); text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand.small { font-size: 1.25rem; }
.main-nav { display: flex; gap: 22px; }
.main-nav a { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-bottom-color: var(--brass); }
.header-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.icon-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.icon-link:hover { background: var(--rule-soft); }
.icon-link .count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--brass); color: var(--on-brass); font: 600 .72rem/18px var(--sans); text-align: center; padding: 0 4px; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--paper); flex-direction: column; gap: 0; padding: 6px 16px 14px; border-bottom: 1px solid var(--rule); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
}
.announce { font-size: .92rem; padding: 9px 0; background: var(--rule-soft); }
.announce-warning { background: #f6ecd6; color: #5a430d; } .announce-danger { background: #f6dcda; color: #6b1f1a; } .announce-success { background: #dceee5; color: #1d4d38; }
.site-footer { margin-top: 72px; padding: 0 0 40px; }
.footer-staff { margin: 0 0 20px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; }
.footer-in nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-in a { color: var(--muted); font-size: .92rem; }
.install-btn { margin-left: auto; }

/* ---------- Boutons, champs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem/1 var(--sans); padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--rule-soft); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--ink-2); color: var(--paper); }
:root .btn.primary { color: var(--paper); }
.btn.ghost { border-color: var(--rule); background: transparent; }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.small { padding: 7px 12px; font-size: .86rem; }
.btn.big { padding: 15px 22px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--brass); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; display: inline-flex; gap: 6px; align-items: center; }
.link-btn.danger { color: var(--bad); }
.icon-btn { background: none; border: 1px solid transparent; border-radius: var(--r-sm); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--rule); }
.icon-btn .ico { width: 18px; height: 18px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 9px 11px; width: 100%; min-width: 0; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--ink); margin: 0; }
input[type=color] { padding: 2px; height: 40px; width: 64px; }
input[type=file] { border-style: dashed; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
[aria-invalid=true] { border-color: var(--bad) !important; outline-color: var(--bad); }
.field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.field > span { font-weight: 500; font-size: .92rem; }
.field small { color: var(--muted); }
.field.compact { margin-bottom: 12px; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; padding: 3px 0; }
.check input { margin-top: 4px; }
.check.block { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 12px 14px; background: var(--sheet); }
.check.block span { display: flex; flex-direction: column; } .check.block small { color: var(--muted); }
.check.small { font-size: .88rem; }
fieldset { border: 0; border-top: 1px solid var(--rule); margin: 8px 0 0; padding: 14px 0 4px; display: flex; flex-direction: column; gap: 12px; }
legend { font-weight: 600; padding: 0 8px 0 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .btn, fieldset > .btn, .stack > button.btn { align-self: flex-start; }
.stack > .btn.big { align-self: stretch; }
.two, .grid-3, .grid-4 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input { width: auto; flex: 1; }
.xs { width: 70px !important; flex: none !important; } .sm { width: 150px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.actions.wrap-actions { margin: 14px 0; }
.form-errors { border-left: 3px solid var(--bad); background: var(--sheet); padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.form-errors p { margin: 0; color: var(--bad); font-weight: 500; } .form-errors ul { margin: 6px 0 0; padding-left: 20px; }
.notice { border-left: 3px solid var(--brass); background: var(--sheet); padding: 12px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.notice.ok { border-color: var(--ok); } .notice.bad { border-color: var(--bad); }
.narrow-form { max-width: 640px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 18px 0 14px; margin-top: 8px; z-index: 2; }

/* ---------- Accueil ---------- */
.hero { padding: 54px 16px 30px; display: grid; gap: 30px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 1fr; align-items: end; padding-top: 80px; padding-bottom: 40px; } .formation-picks { grid-column: 1 / -1; } }
.hero h1 { font-size: clamp(2.6rem, 6.3vw, 5rem); line-height: .98; max-width: 11ch; margin-bottom: .35em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 46ch; }
.hero-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; position: relative; }
.hero-search input { font-size: 1.15rem; padding: 14px 4px 10px; background: transparent; border: 0; border-radius: 0; }
.hero-search input:focus { outline: none; }
.hero-search .hero-staff { grid-column: 1 / -1; margin: -6px 0 0; transition: background .2s; }
.hero-search:focus-within .hero-staff { background-image: repeating-linear-gradient(to bottom, var(--brass) 0 1px, transparent 1px 5px); }
.formation-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.formation-picks p { margin: 0; color: var(--muted); }
.formation-picks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.formation-picks a, .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: .93rem; background: var(--sheet); }
.formation-picks a:hover, .chip:hover { border-color: var(--ink); }
.chip .ico { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-clear { font-size: .9rem; }
.band { margin-top: 56px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 22px; }
.band-head h2, .band > h2 { margin: 0; }
.band > h2 { border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin-bottom: 22px; }
.level-scale { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.level-scale a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); font-weight: 500; }
.level-scale a:hover { border-color: var(--ink); }
.lvl-bar { height: 21px; width: calc(var(--n) * 20%); background: repeating-linear-gradient(to bottom, var(--brass) 0 1px, transparent 1px 5px); }
.collection-list, .shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.collection-list a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 14px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); height: 100%; }
.collection-list img { aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 8px; }
.collection-list span { color: var(--muted); font-size: .92rem; }
.shop-list a { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 10px 12px; border: 1px solid var(--rule-soft); border-radius: var(--r-md); background: var(--sheet); }
.shop-list a:hover { border-color: var(--rule); }
.shop-list img, .shop-list .mono { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.shop-list .mono { display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 400 1.4rem var(--serif); }
.shop-list span:last-child { display: flex; flex-direction: column; } .shop-list small { color: var(--muted); }

/* ---------- Cartes de partitions (feuilles empilées) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 34px 22px; }
@media (min-width: 720px) { .work-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); } }
.work-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sheet { aspect-ratio: 1 / 1.414; background: var(--sheet); position: relative; overflow: hidden; border-radius: 2px;
  box-shadow: 0 0 0 1px var(--rule-soft), 5px 5px 0 -1px var(--sheet), 5px 5px 0 0 var(--rule), 10px 10px 0 -1px var(--sheet), 10px 10px 0 0 var(--rule-soft); }
.sheet img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sheet-link { display: block; margin-right: 10px; margin-bottom: 10px; transition: transform .18s ease; }
@media (hover: hover) { .sheet-link:hover { transform: translateY(-3px); } }
.sheet-blank { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16% 12%; text-align: center;
  background: repeating-linear-gradient(to bottom, transparent 0 24px, var(--rule-soft) 24px 25px, transparent 25px 29px, var(--rule-soft) 29px 30px, transparent 30px 34px, var(--rule-soft) 34px 35px, transparent 35px 39px, var(--rule-soft) 39px 40px, transparent 40px 44px, var(--rule-soft) 44px 45px, transparent 45px 70px); }
.sheet-blank span { font: 400 1.35rem/1.15 var(--serif); background: var(--sheet); padding: 4px 6px; }
.sheet-blank.big span { font-size: 2rem; }
.work-meta h3 { font: 400 1.32rem/1.12 var(--serif); margin: 0 0 4px; }
.work-meta h3 a { text-decoration: none; } .work-meta h3 a:hover { text-decoration: underline; }
.work-meta .persons { color: var(--muted); font-size: .92rem; margin: 0 0 6px; }
.work-meta .tags { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; color: var(--muted); margin: 0 0 6px; }
.price-line { display: flex; align-items: center; gap: 6px; margin: 0; }
.price-line .from { color: var(--muted); font-size: .85rem; }
.demo-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.demo-btn .ico { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.demo-btn.playing { background: var(--brass); border-color: var(--brass); color: var(--on-brass); }

/* ---------- Catalogue ---------- */
.page-head { padding: 36px 0 8px; }
.page-head .subtitle, .subtitle { color: var(--muted); font-size: 1.05rem; }
.search-bar { display: flex; gap: 8px; margin: 10px 0 24px; }
.search-bar input { font-size: 1.05rem; }
.filters-toggle { display: none; }
.cat-layout { display: grid; gap: 34px; }
@media (min-width: 960px) { .cat-layout { grid-template-columns: 250px 1fr; } }
.filters-head { display: none; }
.filter-group { border-top: 1px solid var(--rule); padding: 10px 0; }
.filter-group summary { cursor: pointer; font-weight: 600; padding: 4px 0; list-style-position: outside; }
.filter-list { list-style: none; margin: 8px 0 4px; padding: 0; }
.filter-list ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.filter-list a { display: block; text-decoration: none; padding: 4px 0 4px 22px; position: relative; font-size: .94rem; }
.filter-list a::before { content: ""; position: absolute; left: 0; top: 8px; width: 13px; height: 13px; border: 1px solid var(--rule); border-radius: 3px; background: var(--sheet); }
.filter-list a.on { font-weight: 600; }
.filter-list a.on::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--sheet); }
@media (max-width: 959px) {
  .filters-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0 0 0 auto; width: min(360px, 92vw); background: var(--paper); z-index: 40; padding: 16px; overflow: auto; transform: translateX(100%); transition: transform .2s ease; box-shadow: var(--shadow); visibility: hidden; }
  .filters.open { transform: none; visibility: visible; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; }
}
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.results-head p { margin: 0; }
.sort { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.sort select { width: auto; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 40px 0 0; }
.pager a, .pager span { padding: 7px 12px; border: 1px solid var(--rule); border-radius: var(--r-sm); text-decoration: none; min-width: 38px; text-align: center; }
.pager [aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.empty-state { text-align: center; padding: 60px 16px; }
.empty-state.small { padding: 30px 0; text-align: left; }

/* ---------- Fiche partition ---------- */
.preview-banner { display: flex; gap: 8px; align-items: center; background: var(--rule-soft); padding: 10px 16px; margin-top: 16px; border-radius: var(--r-sm); }
.work-page { display: grid; gap: 40px; padding-top: 34px; }
@media (min-width: 900px) { .work-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 60px; } .work-visual { position: sticky; top: 88px; align-self: start; } }
.viewer-main { cursor: zoom-in; max-width: 520px; margin: 0 14px 14px 0; }
.viewer-thumbs { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 8px; overflow-x: auto; }
.viewer-thumbs button { width: 58px; padding: 0; border: 2px solid transparent; background: var(--sheet); cursor: pointer; aspect-ratio: 1/1.414; overflow: hidden; }
.viewer-thumbs button.on { border-color: var(--brass); }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.viewer-note { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.audio-demo { margin-top: 18px; } .audio-demo .label { font-weight: 600; margin-bottom: 6px; }
audio { width: 100%; max-width: 520px; height: 40px; }
.part-demos { margin-top: 12px; } .part-demos p { display: grid; gap: 4px; margin: 10px 0; }
.shop-link { text-transform: none; font-weight: 500; margin: 0 0 6px; }
.work-info h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); margin-bottom: .15em; }
.credits { display: grid; gap: 4px; margin: 14px 0; }
.credits div { display: flex; gap: 10px; } .credits dt { color: var(--muted); min-width: 108px; } .credits dd { margin: 0; }
.rating { display: flex; gap: 8px; align-items: center; }
.stars { color: var(--rule); letter-spacing: 1px; } .stars .on { color: var(--brass); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; }
.work-info .tags a { color: var(--muted); }
.offers { margin-top: 26px; border-top: 1px solid var(--rule); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.offers h2 { margin-bottom: 4px; }
.offer { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--sheet); cursor: pointer; position: relative; }
.offer input { position: absolute; opacity: 0; pointer-events: none; }
.offer.on { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--brass); }
.offer:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.offer-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.offer-price { font-weight: 600; font-size: 1.12rem; white-space: nowrap; } .offer-price s { color: var(--muted); font-weight: 400; font-size: .92rem; }
.offer-license { font-size: .9rem; color: var(--muted); }
.offer-files { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; }
.offer-files > span { display: inline-flex; gap: 4px; align-items: center; } .offer-files .ico { width: 15px; height: 15px; color: var(--muted); }
.offer-files small { color: var(--muted); margin-left: 4px; }
.offer-rights summary { cursor: pointer; font-size: .88rem; color: var(--muted); } .offer-rights ul { margin: 6px 0; padding-left: 18px; font-size: .9rem; }
.buy-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 8px; }
.qty { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.qty input { width: 90px; }
.qty.small input { width: 64px; padding: 6px 8px; }
.buy-row .btn { flex: 1; }
.secondary-actions { display: flex; gap: 20px; margin-top: 4px; font-size: .92rem; color: var(--muted); }
.work-more { margin-top: 70px; }
.more-grid { display: grid; gap: 40px; } @media (min-width: 900px) { .more-grid { grid-template-columns: 1.4fr 1fr; gap: 60px; } }
.prose { max-width: 68ch; } .prose blockquote { margin: 0; padding-left: 16px; border-left: 2px solid var(--brass); font-style: italic; }
.instrumentation { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--rule-soft); }
.instrumentation li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); }
.instrumentation small { color: var(--muted); }
.details { display: grid; gap: 0; margin: 0 0 20px; }
.details div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); }
.details dt { color: var(--muted); } .details dd { margin: 0; text-align: right; }
.reviews { margin-top: 50px; } .reviews ul { list-style: none; padding: 0; margin: 0 0 16px; }
.reviews li { padding: 14px 0; border-bottom: 1px solid var(--rule-soft); } .reviews .reply { padding-left: 14px; border-left: 2px solid var(--rule); font-size: .94rem; }
.lightbox img { max-height: 76vh; margin: 0 auto; background: #fff; }
.rating-input { flex-direction: row; flex-wrap: wrap; gap: 14px; }

/* ---------- Boutique ---------- */
.shop-head { padding-top: 30px; }
.shop-banner { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-md); margin-bottom: 20px; }
.shop-id { display: flex; gap: 20px; align-items: center; }
.shop-logo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--shop, var(--brass)); }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .92rem; }
.shop-bio { margin: 10px 0; max-width: 70ch; } .shop-bio summary { cursor: pointer; font-weight: 500; }

/* ---------- Panier ---------- */
.cart-group { margin-top: 30px; border-top: 2px solid var(--ink); padding-top: 18px; }
.cart-group > h2 { font: 400 1.7rem var(--serif); }
.cart-grid { display: grid; gap: 30px; } @media (min-width: 900px) { .cart-grid { grid-template-columns: 1.3fr 1fr; gap: 50px; } }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.cart-line p { margin: 0; } .line-price { font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .cart-line { grid-template-columns: 48px 1fr auto; } .cart-line .qty { grid-column: 2; } .cart-line .line-price { grid-column: 3; grid-row: 1; } .cart-line [data-remove] { grid-column: 3; } }
.mini-sheet { display: block; width: 56px; aspect-ratio: 1/1.414; background: var(--sheet); box-shadow: 0 0 0 1px var(--rule-soft), 3px 3px 0 -1px var(--sheet), 3px 3px 0 0 var(--rule); overflow: hidden; flex: none; }
.mini-sheet img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.checkout { display: flex; flex-direction: column; gap: 14px; background: var(--sheet); padding: 20px; border-radius: var(--r-md); border: 1px solid var(--rule-soft); align-self: start; }
.totals dl { margin: 0; } .totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dt { color: var(--muted); } .totals dd { margin: 0; }
.totals .total { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 10px; font-size: 1.25rem; font-weight: 600; } .totals .total dt { color: var(--ink); }
.totals .vat, .totals .discount { font-size: .9rem; }
.coupon label { font-size: .9rem; font-weight: 500; }
.terms { font-size: .9rem; }
.pay-zone { min-height: 50px; }

/* ---------- Bibliothèque ---------- */
.lib-item { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.lib-item h2 { font: 400 1.6rem var(--serif); }
.downloads { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.downloads li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: var(--r-sm); }
.downloads li > span { display: flex; flex-direction: column; flex: 1; min-width: 0; } .downloads small { color: var(--muted); }
.downloads li.off { opacity: .6; }

/* ---------- Compte, auth ---------- */
.auth { max-width: 460px; padding-top: 50px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin: 18px 0 22px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { padding: 10px 14px; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; color: var(--muted); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { border-bottom-color: var(--brass); color: var(--ink); font-weight: 600; }
.tabs.small { margin: 0; border-bottom: 0; } .tabs.small a { padding: 6px 10px; font-size: .9rem; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--rule-soft); font-size: .75rem; text-align: center; font-weight: 600; color: var(--ink); }
.order-list, .notif-list { list-style: none; padding: 0; margin: 0; }
.order-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.order-list a { display: flex; flex-direction: column; text-decoration: none; }
.notif-list a { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); text-decoration: none; }
.notif-list .unread a { font-weight: 600; } .notif-list small { color: var(--muted); font-weight: 400; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.plan { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.plan h2 { font: 400 1.8rem var(--serif); } .plan-price b { font-size: 1.4rem; } .plan ul { padding-left: 18px; flex: 1; }

/* ---------- Pastilles de statut ---------- */
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--rule-soft); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.pill-published, .pill-paid, .pill-active, .pill-sent, .pill-resolved_kept { background: #dceee5; color: #1d4d38; }
.pill-pending, .pill-investigating, .pill-trial, .pill-past_due, .pill-open { background: #f6ecd6; color: #5a430d; }
.pill-rejected, .pill-suspended, .pill-failed, .pill-refunded, .pill-disputed, .pill-expired, .pill-resolved_removed, .pill-closed { background: #f6dcda; color: #6b1f1a; }
.pill-draft, .pill-archived, .pill-cancelled { background: var(--rule-soft); color: var(--muted); }

/* ---------- Espaces de gestion ---------- */
body[data-area=manage] .site-footer { margin-top: 30px; }
.manage { display: grid; gap: 0; max-width: 1400px; margin: 0 auto; width: 100%; }
@media (min-width: 900px) { .manage { grid-template-columns: 220px minmax(0, 1fr); } }
.side-nav { padding: 18px 16px; border-right: 1px solid var(--rule-soft); }
@media (min-width: 900px) { .side-nav { position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow: auto; } .side-nav summary { pointer-events: none; list-style: none; } .side-nav summary::-webkit-details-marker { display: none; } }
.side-nav summary { font: 400 1.35rem var(--serif); cursor: pointer; padding: 4px 0 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 7px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); }
.side-nav a:hover { color: var(--ink); background: var(--rule-soft); }
.side-nav a[aria-current] { color: var(--ink); background: var(--sheet); font-weight: 600; box-shadow: inset 3px 0 0 var(--brass); }
.manage-main { padding: 22px 16px 40px; min-width: 0; }
@media (min-width: 720px) { .manage-main { padding: 26px 34px 50px; } }
.manage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 18px; }
.manage-head h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0; flex: 1 1 280px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); width: 100%; font-size: .92rem; }
.back .ico { width: 16px; height: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.toolbar form input[type=search] { min-width: 220px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.tile span { color: var(--muted); font-size: .88rem; } .tile b { font: 600 1.65rem/1.2 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; } .tile small { color: var(--muted); }
.card { background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: var(--r-md); padding: 18px 20px; min-width: 0; }
.card h2 { font-size: 1.02rem; margin-top: 4px; }
.card h2:not(:first-child) { margin-top: 20px; }
.cols { display: grid; gap: 16px; } @media (min-width: 1000px) { .cols { grid-template-columns: 1fr 1fr; } }
.todo { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.todo li { border-left: 3px solid var(--brass); background: var(--sheet); padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: .93rem; }
.mini-list li > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-list li.off { opacity: .55; }
.chart { margin: 0 0 18px; } .chart svg { width: 100%; height: 120px; display: block; } .chart rect { fill: var(--ink); } .chart rect:hover { fill: var(--brass); }
.chart figcaption { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 4px; }
.quota { margin-top: 18px; font-size: .9rem; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--sheet); border-radius: var(--r-md); overflow: hidden; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td a { text-decoration: none; } .table td a:hover { text-decoration: underline; }
.table .clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table select, .table input { padding: 6px 8px; font-size: .9rem; }
.table tr.inactive td { opacity: .55; }
.row-actions { white-space: nowrap; text-align: right; }
@media (max-width: 760px) {
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; } .table thead { display: none; }
  .table tr { border-bottom: 1px solid var(--rule); padding: 8px 0; } .table td { border: 0; padding: 4px 12px; } .row-actions { text-align: left; }
}
.work-status { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; align-items: flex-start; }
.tab-body { padding-top: 6px; }
.menu { position: relative; } .menu summary { list-style: none; cursor: pointer; } .menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 220px; z-index: 10; padding: 6px; }
.menu-list button { background: none; border: 0; text-align: left; padding: 9px 12px; font: inherit; color: var(--ink); cursor: pointer; border-radius: var(--r-sm); }
.menu-list button:hover { background: var(--rule-soft); } .menu-list .danger { color: var(--bad); }
.row-edit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.row-edit > input:first-child, .row-edit > select:first-child { flex: 1 1 220px; width: auto; }
.row-edit select[name=prole] { width: 170px; }
.facet-box { gap: 4px; }
.facet-values { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.facet-values.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.facet-values .check { padding-left: calc(var(--d, 0) * 18px); }
.facet-values { flex-direction: column; } @media (min-width: 700px) { .facet-values:not(.cols) { flex-direction: row; } }
.suggest { max-width: 420px; margin-top: 6px; }
.dropzone { border: 2px dashed var(--rule); border-radius: var(--r-md); padding: 26px; text-align: center; background: var(--sheet); cursor: pointer; }
.dropzone .ico { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--brass); }
.dropzone.over, .dropzone:hover { border-color: var(--brass); }
.uploads { list-style: none; padding: 0; margin: 12px 0; font-size: .92rem; }
.uploads li { padding: 4px 0 4px 14px; border-left: 3px solid var(--rule); margin-bottom: 4px; }
.uploads li.ok { border-color: var(--ok); } .uploads li.bad { border-color: var(--bad); color: var(--bad); } .uploads li.warn { border-color: var(--warn); }
.table.files input[name=label] { margin-bottom: 4px; }
.media-grid { display: grid; gap: 14px; } @media (min-width: 900px) { .media-grid { grid-template-columns: 1fr 1fr; } .media-grid .wide { grid-column: 1 / -1; } }
.media-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; }
.file-btn { cursor: pointer; }
.thumb { max-width: 220px; border-radius: var(--r-sm); margin: 8px 0; } .thumb.small { max-width: 80px; }
.preview-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.preview-strip figure { margin: 0; position: relative; flex: none; width: 150px; }
.preview-strip img { box-shadow: 0 0 0 1px var(--rule); }
.preview-strip .icon-btn { position: absolute; top: 4px; right: 4px; background: var(--sheet); }
.offer-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 16px; }
.offer-card header { display: flex; justify-content: space-between; gap: 10px; } .offer-card h3 { margin: 0; } .offer-card.inactive { opacity: .6; }
.quick-offers { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .quick-offers p { margin: 0; }
.file-pick { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--rule-soft); padding: 4px 0; }
.mod-list, .app-list, .review-admin { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.mod-list li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; }
.mod-list .mini-sheet { width: 64px; }
.mod-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1000px) { .mod-list li { grid-template-columns: 64px 1fr auto; } .mod-actions { grid-column: auto; flex-direction: column; align-items: stretch; } }
.mod-info h3 { margin-bottom: 4px; }
.settings .setting-group { background: var(--sheet); border: 1px solid var(--rule-soft); border-radius: var(--r-md); padding: 16px 20px; margin-bottom: 16px; }
.settings legend { font: 400 1.4rem var(--serif); float: left; width: 100%; margin-bottom: 8px; }
.setting { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--rule-soft); clear: both; }
@media (min-width: 900px) { .setting { grid-template-columns: 1fr 1fr; gap: 24px; } }
.setting-label { display: flex; flex-direction: column; } .setting-label label { font-weight: 500; }
.setting-input { display: flex; flex-direction: column; gap: 6px; }
.setting-flags { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: .92rem; }
.ref-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ref-grid a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; height: 100%; } .ref-grid a:hover { border-color: var(--ink); } .ref-grid small { color: var(--muted); }
.grant { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--rule); }
.grant select { width: auto; }
.pick-list { max-height: 50vh; overflow: auto; border: 1px solid var(--rule-soft); border-radius: var(--r-sm); padding: 8px 12px; }
.test-box code { word-break: break-all; }

/* ---------- Fenêtres et notifications ---------- */
.modal { border: 0; border-radius: var(--r-md); padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.modal-wide { width: min(880px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(18, 23, 42, .55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.modal-head h2 { margin: 0; font: 400 1.5rem var(--serif); }
.modal-body { padding: 18px 20px 22px; }
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; width: min(460px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow); border-left: 4px solid var(--ok); animation: up .2s ease; }
.toast-bad { border-left-color: var(--bad); } .toast-warn { border-left-color: var(--brass); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }
.rich img { height: auto; } .rich a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .side-nav, .head-actions { display: none; } }
