:root {
  --bg: #f7f0e7;
  --panel: #fffaf3;
  --line: #dfcdbb;
  --text: #271910;
  --muted: #695345;
  --ink: #24160f;
  --on-ink: #fff2e3;
  --accent: #ff914c;
  --accent-ink: #9b431c;
  --control-line: #9c7e68;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
summary, button, select { cursor: pointer; }
::selection { background: #ffc79d; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }
.site-header :focus-visible, .vestiaire :focus-visible, footer :focus-visible { outline-color: var(--accent); }
.menu-panel :focus-visible { outline-color: var(--accent-ink); }
[hidden] { display: none !important; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 5; padding: 12px; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }
.site-header {
  position: sticky; top: 0; z-index: 2; background: var(--ink); color: var(--on-ink);
  border-bottom: 1px solid #8d4d2b;
}
.site-header, footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px max(5.5vw, calc((100% - 1320px) / 2)); min-height: 89px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0;
  font-size: 1.02rem; font-weight: 850; text-transform: uppercase; letter-spacing: .12em;
  line-height: 1; white-space: nowrap;
}
.brand img { display: block; flex: none; }
#shop-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 2px clamp(10px, 1.7vw, 24px);
}
#shop-nav > a, #shop-nav > details > summary {
  font-size: .77rem; text-transform: uppercase; font-weight: 750; letter-spacing: .055em; padding: 10px 0;
}
#shop-nav > details > summary { list-style: none; }
#shop-nav > details > summary::-webkit-details-marker { display: none; }
#shop-nav > details > summary::after { content: '⌄'; margin-left: 5px; }
#shop-nav [aria-current], #shop-nav > a:hover, #shop-nav > details > summary:hover {
  color: var(--accent); text-decoration: underline; text-underline-offset: 7px;
}
.menu-panel {
  position: absolute; top: 100%; right: max(5.5vw, calc((100% - 1320px) / 2));
  min-width: 190px; padding: 6px 14px; background: var(--panel); color: var(--text);
  max-height: 65vh; overflow: auto;
  border-top: 2px solid var(--accent); box-shadow: 0 12px 30px #24160f32;
}
.menu-panel a { display: block; padding: 9px 5px; font-size: .9rem; }
.menu-panel a + a { border-top: 1px solid var(--line); }
.menu-panel a:hover { color: var(--accent-ink); text-decoration: underline; }
.shop {
  width: min(1320px, 89%); margin: 20px auto 70px; display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start; gap: 18px; min-height: 65vh;
}
.shop, .catalogue { scroll-margin-top: 120px; }
.vestiaire {
  display: grid; grid-column: 1 / -1; grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  min-height: 236px; background: var(--ink); color: var(--on-ink); border-bottom: 2px solid #a75b32;
}
.vestiaire-copy {
  position: relative; z-index: 1; padding: 28px clamp(24px, 4.2vw, 62px);
  display: grid; align-content: center; justify-items: start; gap: 20px;
  background: linear-gradient(105deg, var(--ink), #392419);
}
.vestiaire-copy h2 {
  font-family: "Barlow Condensed", "Arial Narrow", "Inter", "Segoe UI", sans-serif;
  font-size: clamp(1.9rem, 3.05vw, 3.35rem); font-weight: 850;
  letter-spacing: -.035em; line-height: 1.02; margin: 0;
}
.vestiaire-link {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 15px;
  background: var(--accent); color: var(--ink); font-size: .87rem; font-weight: 750;
}
.vestiaire-link:hover { background: #ffb17f; }
.vestiaire-championnats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #4c2a17 url("images/vestiaire-championnats.webp") center / 100% 100%;
}
.casier {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12% 3px 0; min-width: 0;
  color: var(--on-ink); text-align: center; font-size: clamp(.66rem, 1vw, .91rem); font-weight: 750;
}
.casier img {
  display: block; width: min(68%, 88px); aspect-ratio: 1; object-fit: contain;
  padding: 9%; background: #fff; border-radius: 4px; box-shadow: 0 4px 12px #160a06a6;
}
.casier span { padding: 2px; line-height: 1.15; text-shadow: 0 1px 3px #150904; }
.casier:hover, .casier:focus-visible {
  color: #ffd2b6; text-decoration: underline; text-underline-offset: 3px;
  background: #ff914c16; outline-offset: -4px;
}
.casier:hover img, .casier:focus-visible img { box-shadow: 0 4px 14px #160a06c9, 0 0 0 2px var(--accent); }
.team-banner {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px; width: 100%; min-width: 0; padding: 0;
  background: var(--ink); border: 8px solid var(--ink);
}
.team-banner a {
  display: grid; place-items: center; min-width: 0; min-height: 84px;
  background: var(--panel); border: 2px solid var(--ink);
}
.team-banner a:hover, .team-banner a:focus-visible {
  border-color: var(--accent-ink); background: #faebda; outline-offset: -3px;
}
.team-banner a[aria-current="page"] { border-color: var(--accent); background: #ffe5cf; }
.team-banner img { display: block; width: 64px; max-width: 90%; height: 64px; object-fit: contain; }
.catalogue { min-width: 0; padding-top: 16px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: .85rem; }
.breadcrumbs:empty { display: none; }
.breadcrumbs a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -.04em; margin: 14px 0 16px; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
#result-count { color: var(--muted); text-transform: uppercase; font-size: .78rem; font-weight: 650; margin: 0; }
.toolbar-options, .density { display: flex; align-items: center; gap: 10px; }
.density { font-size: .77rem; text-transform: uppercase; font-weight: 650; border-right: 1px solid var(--line); padding-right: 12px; }
.density button { background: transparent; color: inherit; border: 0; padding: 4px; }
.density button[aria-pressed="true"] { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 5px; }
#sort { border: 0; background: transparent; font-size: .79rem; font-weight: 650; width: auto; text-transform: uppercase; }
select, .subtle { min-height: 40px; width: 100%; min-width: 0; border: 1px solid var(--control-line); background: var(--panel); color: var(--text); padding: 7px 9px; font-size: .85rem; font-weight: 450; }
.subtle:hover { border-color: var(--accent-ink); background: #faebda; }
.grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 32px clamp(13px, 2.35vw, 30px); }
.grid[data-columns="3"] { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid[data-columns="4"] { grid-template-columns: repeat(4,minmax(0,1fr)); }
.card { display: block; min-width: 0; }
.card:hover h3 { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.card img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #382418;
}
.card-body { padding-top: 14px; display: flex; flex-direction: column; }
.card-body p { margin: 0; color: var(--muted); font-size: .84rem; }
.card-body h3 { order: -1; margin: 0 0 8px; font-size: clamp(.95rem, 1.5vw, 1.17rem); line-height: 1.35; font-weight: 580; }
.card-body p + p { margin-top: 4px; }
.more { display: block; width: auto; margin: 24px auto 0; }
footer { border-top: 1px solid #8d4d2b; background: var(--ink); color: var(--on-ink); flex-wrap: wrap; }
footer a:hover { color: var(--accent); }
dialog { width: min(900px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--line); color: var(--text); background: var(--bg); }
dialog::backdrop { background: #24160fcb; }
#close-detail { position: absolute; z-index: 1; top: 10px; right: 10px; font-size: 1.6rem; width: 40px; height: 40px; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; }
.gallery > img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--panel); }
#thumbnails { display: flex; gap: 8px; padding: 10px; }
#thumbnails:empty { display: none; }
#thumbnails button { padding: 0; border: 2px solid transparent; background: transparent; }
#thumbnails button[aria-pressed="true"] { border-color: var(--accent-ink); }
#thumbnails img { display: block; width: 62px; height: 62px; object-fit: cover; }
.detail-copy { padding: 48px 22px 20px; }
.detail-copy h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.detail-copy .subtle { width: auto; }
dl div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
#copy-status { margin-top: 12px; }
@media (max-width: 1000px) {
  .team-banner { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid:not([data-columns="3"]) { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .grid:not([data-columns="3"]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .site-header .brand img { width: 46px; height: 46px; }
  #shop-nav { justify-content: flex-start; gap: 2px 14px; }
  .shop, .catalogue { scroll-margin-top: 196px; }
}
@media (max-width: 720px) {
  .shop { gap: 12px; margin-top: 14px; }
  .team-banner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vestiaire { grid-template-columns: minmax(0, 1fr); }
  .vestiaire-copy { padding: 20px; gap: 13px; }
  .vestiaire-copy h2 { font-size: clamp(1.55rem, 6.6vw, 2.3rem); }
  .vestiaire-copy h2 br { display: none; }
  .vestiaire-championnats { width: 100%; min-height: 120px; aspect-ratio: 3 / 1; }
  .casier { font-size: clamp(.59rem, 2.45vw, .85rem); gap: 5px; }
  .vestiaire-link { min-height: 38px; font-size: .82rem; }
  .density { display: none; }
  #products.grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-layout { display: block; }
  .detail-copy { padding: 20px; }
}
@media (max-width: 400px) {
  .team-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
