/* =====================================================================
   Vibes — design system
   Minimalisme, fond vierge, le contenu généré au premier plan.
   ===================================================================== */

/* Vibes est sombre, uniquement : fond quasi noir, encre ivoire, accent orange. */
/* Space Grotesk (licence OFL), hébergée ici : la police du logo. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg:          #08080a;
  --bg-soft:     #0e0e12;
  --surface:     #101015;
  --ink:         #f4f4f6;
  --ink-2:       #c4c4cc;
  --muted:       #8a8a95;
  --line:        rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --accent:      #ff7a45;
  --accent-soft: rgba(255, 122, 69, 0.15);
  --accent-ink:  #d6400f;
  --gold:        #ffc44d;
  --danger:      #ff6b5e;
  --success:     #37d3a0;
  --shadow-sm:   0 1px 2px rgba(11, 11, 15, 0.05);
  --shadow-md:   0 6px 24px -8px rgba(0, 0, 0, 0.7);
  --shadow-lg:   0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --radius:      14px;
  --radius-sm:   9px;
  --radius-lg:   22px;
  --maxw:        1180px;
  --header-h:    62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}


* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.022em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.06rem; }
p  { margin: 0 0 1em; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.muted { color: var(--muted); }
.small { font-size: 0.83rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
/* L'attribut hidden doit toujours gagner, même sur un élément stylé en flex ou grid
   (sinon la case « Retirer le logo » s'affichait à la création, par exemple). */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- header */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header .wrap { display: flex; align-items: center; gap: 22px; }

.brand { display: flex; align-items: center; gap: 9px; font-weight: 620; letter-spacing: -0.03em; font-size: 1.05rem; }
/* La marque : le mot dans une capsule ivoire à ombre dure orange (logo B).
   Elle s'enfonce au clic, comme toutes les capsules du site. */
.brand-pill {
  display: inline-flex; align-items: center; padding: 3px 13px 5px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-family: "Space Grotesk", var(--font); font-weight: 700;
  font-size: 1.06rem; letter-spacing: -0.06em; line-height: 1.1; box-shadow: 3px 3px 0 var(--accent);
  transition: transform .12s, box-shadow .12s;
}
.brand:hover .brand-pill { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent); }
.brand:active .brand-pill { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--accent); }
.brand-pill-xl { font-size: clamp(3rem, 12vw, 6rem); padding: .06em .42em .12em; box-shadow: .08em .08em 0 var(--accent); }

.nav { display: flex; align-items: center; gap: 3px; margin-left: 6px; }
.nav a {
  padding: 7px 11px; border-radius: 9px; font-size: 0.9rem; color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a.is-active { color: var(--ink); font-weight: 560; background: var(--accent-soft); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-picker select {
  appearance: none; -webkit-appearance: none;
  padding: 7px 26px 7px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent;
  font-size: .84rem; color: var(--ink-2); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  transition: border-color .15s, color .15s;
}
.lang-picker select:hover { border-color: var(--line-strong); color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 10px; cursor: pointer;
}
@media (max-width: 860px) {
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav:not(.is-open) { display: none; }
  .nav a { padding: 11px 12px; font-size: 0.98rem; }
  .nav-toggle { display: block; order: 3; }
  .header .wrap { gap: 12px; }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 540; cursor: pointer;
  background: var(--bg-soft); color: var(--ink);
  transition: transform 0.12s, background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
.btn-outline { background: transparent; border-color: var(--line-strong); }
.btn-outline:hover { background: var(--bg-soft); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: transparent; border-color: var(--line-strong); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; border-radius: 13px; font-weight: 580; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ hero */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 24px 56px; position: relative; text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 45% at 50% 38%, var(--accent-soft), transparent 70%);
}
/* Le logo de l'accueil : la capsule de la planche, en grand. C'est un bouton :
   elle se soulève au survol et s'enfonce dans son ombre au clic. */
.hero-logo {
  display: inline-flex; margin: 4vh 0 34px; border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  /* Flottement lent, comme l'ancienne version 3D ; le survol et le clic
     agissent sur la capsule elle-même, sans se mêler à cette animation. */
  animation: hero-float 5.5s ease-in-out infinite;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(-1.2deg); }
  50%      { transform: translateY(-12px) rotate(1deg); }
}
.hero-logo:hover { animation-play-state: paused; }
.hero-pill {
  position: relative; display: inline-flex; align-items: center; overflow: hidden;
  padding: .2em .52em .27em; border-radius: 999px;
  font-family: "Space Grotesk", var(--font); font-weight: 700;
  font-size: clamp(3.4rem, 12vw, 6.4rem); letter-spacing: -0.06em; line-height: .9;
  background: var(--ink); color: var(--bg);
  box-shadow: .1em .1em 0 var(--accent);
  transition: transform .14s cubic-bezier(.2,.8,.3,1), box-shadow .14s cubic-bezier(.2,.8,.3,1);
}
/* La moitié basse un peu plus sombre : le volume d'une gélule. */
.hero-pill::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
  background: rgba(8, 8, 10, 0.07); pointer-events: none;
}
.hero-pill-word { position: relative; }
.hero-logo:hover .hero-pill { transform: translate(-3px, -3px); box-shadow: calc(.1em + 3px) calc(.1em + 3px) 0 var(--accent); }
.hero-logo:active .hero-pill, .hero-logo.is-pressed .hero-pill { transform: translate(.1em, .1em); box-shadow: 0 0 0 var(--accent); }
.hero-logo:focus-visible { outline: none; }
.hero-logo:focus-visible .hero-pill { outline: 3px solid var(--accent); outline-offset: 6px; }


.hero-slogan {
  margin: 6px 0 0; font-size: clamp(1.9rem, 4.6vw, 3rem);
  letter-spacing: -0.035em; line-height: 1.05;
}
.hero-tagline {
  max-width: 42ch; margin: 4px auto 0; color: var(--muted); font-size: 1.03rem;
}
.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px;
}
.hero-cta .btn { min-width: 232px; }
@media (max-width: 520px) { .hero-cta .btn { min-width: 100%; } }

.hero-stats {
  display: flex; gap: 34px; justify-content: center; flex-wrap: wrap;
  margin-top: 46px; color: var(--muted); font-size: 0.85rem;
}
.hero-stats b { display: block; font-size: 1.45rem; color: var(--ink); font-weight: 620; letter-spacing: -0.02em; }

/* ------------------------------------------------------------- page head */
.page-head { padding: 46px 0 26px; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.page-head .lede { color: var(--muted); max-width: 62ch; margin-top: 10px; }
.section { padding-bottom: 72px; }

/* ---------------------------------------------------------------- filters */
.filterbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 14px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px;
}
/* Bulles de filtre : capsules à ombre dure. Survol = elle se soulève,
   clic = elle s'enfonce, active = pleine ivoire avec témoin orange. */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 17px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: var(--surface); color: var(--ink-2);
  font-size: 0.86rem; font-weight: 600; letter-spacing: -0.005em; cursor: pointer;
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .12s, box-shadow .12s, background .15s, color .15s, border-color .15s;
}
.chip:hover {
  border-color: var(--ink); color: var(--ink); transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 22%, transparent);
}
.chip:active { transform: translate(3px, 3px); box-shadow: 0 0 0 transparent; }
.chip.is-active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--accent);
}
.chip.is-active::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}
.chip.is-active .muted { color: color-mix(in srgb, var(--bg) 62%, transparent); }

.filter-sep { flex: 1 1 auto; }

.search-field { position: relative; display: flex; gap: 10px; }
.search-field input {
  flex: 1; padding: 15px 18px; font-size: 1.02rem;
  border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ----------------------------------------------------------------- cards */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-top { display: flex; gap: 13px; align-items: flex-start; }
.card-logo {
  width: 46px; height: 46px; border-radius: 12px; flex: none; object-fit: cover;
  border: 1px solid var(--line); background: var(--bg-soft);
  display: grid; place-content: center; font-size: 1.15rem; font-weight: 650;
  color: var(--muted); overflow: hidden;
}
.card h3 { font-size: 1.02rem; letter-spacing: -0.015em; }
.card-author { font-size: 0.79rem; color: var(--muted); margin-top: 2px; }
.card-desc {
  /* Écrêtage strict à 3 lignes : la carte peut s'étirer sans révéler de ligne coupée. */
  color: var(--ink-2); font-size: 0.89rem; margin: 0; flex: 0 0 auto;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 0.79rem; color: var(--muted);
}
/* Rang : une cellule de vumètre plutôt qu'une médaille. */
.card-rank {
  position: absolute; top: -11px; left: 16px;
  height: 24px; padding: 0 10px 0 8px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 0.72rem; font-weight: 640; font-variant-numeric: tabular-nums;
}
.card-rank::before {
  content: ""; width: 3px; height: 9px; border-radius: 2px; background: var(--line-strong);
}
.card-rank.top1, .card-rank.top2, .card-rank.top3 { color: var(--ink); }
.card-rank.top1 {
  border-color: color-mix(in srgb, var(--gold) 48%, transparent);
}
.card-rank.top1::before {
  height: 14px; background: var(--gold);
  box-shadow: 0 0 9px color-mix(in srgb, var(--gold) 70%, transparent);
}
.card-rank.top2::before { height: 12px; background: #9aa0ab; }
.card-rank.top3::before { height: 10px; background: #c8815a; }
.card > a.card-link { position: absolute; inset: 0; border-radius: var(--radius); }
/* Le calque de lien couvre la carte : seuls les badges porteurs d'infobulle
   passent au-dessus, le reste laisse le clic filer vers la fiche. */
.stars { pointer-events: none; }
span.tag { pointer-events: none; }
.card-rank { z-index: 2; }

/* ------------------------------------------------------------------ tags */
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
/* Tags : tranches de console — arête gauche marquée, angle droit à gauche. */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.73rem; padding: 4px 9px 4px 8px;
  border-radius: 3px 8px 8px 3px;
  background: var(--bg-soft);
  border: 1px solid var(--line); border-left: 2px solid var(--line-strong);
  color: var(--ink-2); position: relative; z-index: 1;
  transition: border-color .16s, color .16s, background .16s;
}
a.tag:hover { border-left-color: var(--ink); color: var(--ink); background: var(--surface); }

/* L'IA génératrice est l'information reine : témoin allumé + arête accent. */
.tag-ai {
  background: var(--accent-soft); border-color: transparent;
  border-left: 2px solid var(--accent);
  color: var(--accent); font-weight: 570;
}
.tag-ai::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}
a.tag-ai:hover {
  border-left-color: var(--accent); color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.tag-cat { background: transparent; }

/* ----------------------------------------------------------------- stars */
.stars {
  position: relative; display: inline-block; vertical-align: -1px;
  font-size: 0.9rem; letter-spacing: 1px; line-height: 1; white-space: nowrap;
}
.stars-base { color: var(--line-strong); }
.stars-fill {
  position: absolute; inset: 0 auto 0 0; overflow: hidden;
  color: var(--gold); white-space: nowrap;
}
.rating-value { font-weight: 620; color: var(--ink); }

/* Badges : témoins lumineux de baie de brassage. */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.72rem; padding: 4px 11px 4px 9px; border-radius: 999px; font-weight: 545;
  border: 1px solid var(--line); background: var(--bg-soft); cursor: help;
  position: relative; z-index: 2;
}
.badge::before {
  content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--led, currentColor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--led, currentColor) 16%, transparent);
}
.badge-pending { --led: var(--gold); color: var(--muted); }
.badge-pending::before { animation: vibes-led 2.4s ease-in-out infinite; }
.badge-dead {
  --led: var(--danger); color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, transparent);
}
.badge-suspect {
  --led: var(--gold); color: color-mix(in srgb, var(--gold) 78%, var(--ink));
  border-color: color-mix(in srgb, var(--gold) 38%, transparent);
  background: color-mix(in srgb, var(--gold) 9%, transparent);
}
.badge-suspect::before { animation: vibes-led 1.6s ease-in-out infinite; }
.badge-ok {
  --led: var(--success); color: var(--success);
  border-color: color-mix(in srgb, var(--success) 28%, transparent);
  background: color-mix(in srgb, var(--success) 7%, transparent);
}
@keyframes vibes-led { 50% { opacity: .28; } }

/* ------------------------------------------------------------ categories */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.cat-card {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.cat-card .icon { line-height: 1; }
.cat-card h3 { margin-top: 12px; font-size: 1rem; }
.cat-card p { margin: 4px 0 0; font-size: 0.83rem; color: var(--muted); }
.cat-card .count { margin-top: 12px; font-size: 0.76rem; color: var(--muted); }

/* ------------------------------------------------------------------ form */
.form { max-width: 760px; }
.field { margin-bottom: 22px; }
.field > label, .field-label {
  display: block; font-size: 0.87rem; font-weight: 560; margin-bottom: 7px;
}
.field .hint { font-size: 0.79rem; color: var(--muted); margin: 6px 0 0; }
.field input[type="text"], .field input[type="url"], .field input[type="password"],
.field input[type="email"], .field input[type="search"],
.field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 11px 14px; background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
.field textarea.mono { font-family: var(--mono); font-size: 0.86rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.error { color: var(--danger); }
.field .error { color: var(--danger); font-size: 0.79rem; margin-top: 6px; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 26px; background: var(--surface);
}
.fieldset > legend {
  padding: 0 9px; font-size: 0.78rem; font-weight: 620; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted);
}
.checkline { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.9rem; }
.checkline input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }

.counter { float: right; font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.counter.over { color: var(--danger); font-weight: 600; }

.dropzone {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone img, .dropzone .ph {
  width: 56px; height: 56px; border-radius: 13px; flex: none;
  object-fit: cover; background: var(--bg-soft);
  display: grid; place-content: center; color: var(--muted); font-size: 1.3rem;
}

/* ---------------------------------------------------------------- detail */
.detail-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.detail-logo {
  width: 84px; height: 84px; border-radius: 20px; flex: none; object-fit: cover;
  border: 1px solid var(--line); background: var(--bg-soft);
  display: grid; place-content: center; font-size: 2rem; font-weight: 650; color: var(--muted);
}
.detail-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
/* Les boutons auteur / modération s'alignent avec les autres, même espacement. */
.detail-actions [data-owner-actions] { display: contents; }

.layout-2col { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 940px) { .layout-2col { grid-template-columns: 1fr; } }

.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--surface); margin-bottom: 20px;
}
.panel > h2, .panel > h3 { margin-bottom: 14px; font-size: 1.02rem; }
.panel-sticky { position: sticky; top: calc(var(--header-h) + 20px); }

.meta-list { display: grid; gap: 0; font-size: 0.88rem; }
.meta-row {
  display: flex; gap: 14px; justify-content: space-between; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.meta-row:last-child { border-bottom: 0; }
.meta-row dt { color: var(--muted); flex: none; }
.meta-row dd {
  margin: 0; font-weight: 500; word-break: break-word;
  display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end;
}
.meta-row dd .tag { white-space: nowrap; }

.prompt-block { position: relative; }
.prompt-block pre {
  /* Réserve de place à droite : le bouton « Copier » ne recouvre jamais le texte. */
  margin: 0; padding: 18px 104px 18px 18px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 0.84rem;
  line-height: 1.65; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto;
}
.prompt-block .copy {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface); font-size: .78rem; padding: 6px 12px;
}

.score-hero { text-align: center; padding: 6px 0 14px; }
.score-hero .big { font-size: 3.1rem; font-weight: 660; letter-spacing: -0.04em; line-height: 1; }
.score-hero .stars { font-size: 1.15rem; margin-top: 8px; }
.dist-row { display: flex; align-items: center; gap: 9px; font-size: 0.78rem; color: var(--muted); }
.dist-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.dist-bar > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }

/* --------------------------------------------------------------- reviews */
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-content: center; font-size: 0.76rem; font-weight: 620;
  background: var(--accent-soft); color: var(--accent);
}
.review-body { margin: 0; color: var(--ink-2); white-space: pre-wrap; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: 3px; }
.star-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-input label {
  font-size: 1.7rem; line-height: 1; color: var(--line-strong); cursor: pointer;
  transition: color 0.12s, transform 0.12s;
}
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--gold); }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.locked {
  padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  text-align: center; color: var(--muted); font-size: 0.9rem;
}

/* ----------------------------------------------------------------- misc */
.empty { padding: 64px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 2.2rem; margin-bottom: 12px; opacity: 0.5; }

.skeleton { border-radius: var(--radius); background: var(--bg-soft); position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 5%, transparent), transparent);
  animation: sweep 1.3s infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }
.skeleton-card { height: 186px; }

.toast-host {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: center;
  pointer-events: none; width: min(440px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto; width: 100%;
  padding: 12px 16px; border-radius: 12px; font-size: 0.88rem;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  animation: rise 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok  { background: var(--success); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.auth-card {
  max-width: 400px; margin: 8vh auto 60px; padding: 32px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 11px; margin-bottom: 26px; }
.tabs button {
  flex: 1; padding: 9px; border: 0; border-radius: 8px; background: transparent;
  cursor: pointer; font-size: 0.9rem; color: var(--muted); transition: all 0.15s;
}
.tabs button.is-active { background: var(--surface); color: var(--ink); font-weight: 560; box-shadow: var(--shadow-sm); }

.footer {
  border-top: 1px solid var(--line); padding: 34px 0; margin-top: 40px;
  color: var(--muted); font-size: 0.83rem;
}
.footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.footer a:hover { color: var(--ink); }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 34px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ------------------------------------------------------------ tagfield */
.tagfield {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px; background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.tagfield:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tagfield-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tagfield-chips:not(:empty) { margin-bottom: 8px; }
.tagfield-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 6px 4px 9px; border-radius: 3px 8px 8px 3px; font-size: .82rem;
  background: var(--accent-soft); color: var(--accent); font-weight: 545;
  border-left: 2px solid var(--accent);
}
.tagfield-chip button {
  border: 0; background: none; cursor: pointer; color: inherit;
  font-size: 1rem; line-height: 1; padding: 0 2px; opacity: .65;
}
.tagfield-chip button:hover { opacity: 1; }
.tagfield input { width: 100%; border: 0 !important; background: none; padding: 4px 6px !important; box-shadow: none !important; }
.tagfield input:focus { outline: none; }
.suggests { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
/* Suggestions : trait discontinu = pas encore branché sur la tranche. */
.suggests button {
  border: 1px dashed var(--line-strong); background: transparent; color: var(--muted);
  border-radius: 3px 8px 8px 3px; padding: 3px 9px 3px 7px; font-size: .76rem;
  cursor: pointer; transition: all .15s;
}
.suggests button:hover {
  border-style: solid; border-color: var(--accent);
  color: var(--accent); background: var(--accent-soft);
}

/* ------------------------------------------------------- rating control */
.rating-control { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-readout { font-size: .84rem; color: var(--muted); }

.crumbs { font-size: .82rem; color: var(--muted); padding: 26px 0 18px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.detail-desc { font-size: 1.06rem; color: var(--ink-2); max-width: 68ch; }
.alert {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--radius-sm); font-size: .87rem; margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, transparent); color: var(--danger);
}
.alert.warn {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
  background: color-mix(in srgb, var(--gold) 9%, transparent);
  color: color-mix(in srgb, var(--gold) 75%, var(--ink));
}


/* ------------------------------------------------------- infobulle ------ */
/* Infobulle : panneau ivoire, flèche vers l'élément survolé. */
.tip {
  position: fixed; z-index: 300; pointer-events: none;
  max-width: 268px; padding: 10px 13px 11px;
  background: var(--ink); color: var(--bg);
  border-radius: 11px; font-size: 0.78rem; line-height: 1.5; font-weight: 450;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(5px);
  transition: opacity .14s ease, transform .14s cubic-bezier(.2,.8,.3,1);
}
.tip.is-open { opacity: 1; transform: translateY(0); }
.tip::after {
  content: ""; position: absolute; left: var(--tip-arrow, 50%);
  width: 10px; height: 10px; margin-left: -5px; border-radius: 2px;
  background: var(--ink); transform: rotate(45deg);
}
.tip[data-side="top"]::after    { bottom: -3px; }
.tip[data-side="bottom"]::after { top: -3px; }

/* --------------------------------------------------------- compléments -- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 0; }
.section-head .lede { margin-top: 6px; }
.req { color: var(--danger); font-weight: 600; }
.soft-select {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; font-size: .85rem; color: var(--ink-2); cursor: pointer;
}
.panel-kicker {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
}

/* --------------------------------------------------- connexion externe -- */
.provider-buttons { display: grid; gap: 9px; margin-bottom: 18px; }
.btn-provider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: .92rem; font-weight: 540; cursor: pointer; color: var(--ink);
  transition: border-color .15s, background .15s, transform .12s;
}
.btn-provider:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-provider svg { width: 18px; height: 18px; flex: none; }

/* Filet « ou » : deux traits et un mot au milieu. */
.or-rule {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; color: var(--muted); font-size: .78rem; text-transform: lowercase;
}
.or-rule::before, .or-rule::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}


/* =====================================================================
   Communauté : comptes, profils, notifications, modération, légal
   ===================================================================== */

/* --------------------------------------------------------- en-tête ---- */
/* Cloche et modération : capsules d'interface, même famille que les catégories. */
.icon-link { position: relative; display: inline-flex; padding: 4px 2px; border-radius: 999px; }
.cap-nav { font-size: 1rem; height: 1.75em; padding: 0 .62em; box-shadow: 2px 2px 0 var(--line-strong); transition: box-shadow .15s, transform .15s; }
.icon-link:hover .cap-nav { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.icon-link.has-unread .cap-nav { box-shadow: 2px 2px 0 var(--accent); }
.bell-count {
  position: absolute; top: -3px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: .66rem; font-weight: 700;
  display: grid; place-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}
.user-chip { gap: 8px; padding-left: 8px; }
.user-chip span:last-child { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .user-chip span:last-child, .header-end [data-logout] { display: none; }
  .header-end { gap: 4px; }
}

/* --------------------------------------------------------- avatars ---- */
img.avatar { object-fit: cover; padding: 0; }
.avatar-xs { width: 22px; height: 22px; font-size: .62rem; }
.avatar-xl { width: 92px; height: 92px; font-size: 1.9rem; flex: none; }
.author-link { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.author-link:hover b { text-decoration: underline; }
.byline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }

/* ----------------------------------------------------------- cartes ---- */
.card-cover {
  width: calc(100% + 40px); max-width: none; margin: -20px -20px 2px; aspect-ratio: 16 / 9;
  object-fit: cover; border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--line); background: var(--bg-soft);
}

/* -------------------------------------------------- boutons-liens ----- */
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--ink); }
.link-btn[disabled] { cursor: default; text-decoration: none; opacity: .7; }
.link-btn.danger { color: var(--danger); }
.btn.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--danger) 86%, #000); }
.detail-secondary { margin-top: 12px; font-size: .8rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.ok-text { color: var(--success); }

/* --------------------------------------------------- démo & galerie --- */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; margin: 0 0 20px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery {
  display: grid; gap: 10px; margin: 0 0 20px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.gallery-item {
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; background: var(--bg-soft);
  transition: transform .15s, box-shadow .15s;
}
.gallery-item:first-child:nth-last-child(1) { grid-column: 1 / -1; }
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; display: grid; place-items: center;
}
.lightbox::backdrop { background: rgba(5, 5, 8, .88); }
.lightbox img { max-width: min(1400px, 92vw); max-height: 86vh; border-radius: 10px; object-fit: contain; }
.lightbox-close, .lightbox-nav {
  position: fixed; border: 0; cursor: pointer; color: #fff; background: rgba(255,255,255,.12);
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; display: grid; place-content: center;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-nav.prev { left: 18px; top: 50%; }
.lightbox-nav.next { right: 18px; top: 50%; }
.lightbox-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; }

/* ------------------------------------------------------------- avis ---- */
.review-compact { padding: 11px 0; }
.review-compact .review-head { margin-bottom: 0; }
.review-tools { margin-left: auto; display: inline-flex; gap: 10px; }

/* ------------------------------------------------- formulaire (shots) -- */
.shots { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.shots:not(:empty) { margin-bottom: 10px; }
.shot { position: relative; margin: 0; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.shot.is-new { border-color: var(--accent); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.shot button {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(0,0,0,.65); color: #fff; font-size: 1rem; line-height: 1;
}
.forgot { margin: -10px 0 16px; text-align: right; }
.forgot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.forgot a:hover { color: var(--ink); }
.captcha { margin: 4px 0 16px; min-height: 65px; }
.checkline a { text-decoration: underline; }

/* -------------------------------------------------------- dialogue ---- */
.dialog {
  width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(5, 5, 8, .45); backdrop-filter: blur(3px); }
.dialog-form { padding: 26px; }
.dialog-form h2 { font-size: 1.15rem; margin-bottom: 14px; }
.dialog-body .field:last-child { margin-bottom: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* -------------------------------------------------------- réglages ---- */
.fieldset .btn + .btn { margin-left: 6px; }
.fieldset-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.fieldset-danger > legend { color: var(--danger); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------- profil ---- */
.profile-head {
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
  padding: 46px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 30px;
}
.profile-id { flex: 1; min-width: 240px; }
.profile-id h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.profile-bio { margin: 10px 0 6px; color: var(--ink-2); max-width: 60ch; white-space: pre-wrap; }
.profile-site { color: var(--accent); }
.profile-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: .87rem; color: var(--muted); }
.profile-stats b { color: var(--ink); font-weight: 640; }
.profile-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
@media (max-width: 640px) { .profile-actions { flex-direction: row; align-items: center; width: 100%; } }
.section-title { font-size: 1.05rem; margin: 0 0 18px; }

/* --------------------------------------------------- notifications ---- */
.notif-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notif { display: flex; gap: 14px; align-items: flex-start; padding: 15px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.notif:last-child { border-bottom: 0; }
.notif.is-unread { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.notif.is-unread .notif-body > a::after, .notif.is-unread .notif-body > span::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%;
  background: var(--accent); vertical-align: 2px;
}
.notif-icon {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-content: center;
  background: var(--bg-soft); color: var(--muted); font-size: .95rem;
}
.notif-review { color: var(--gold); }
.notif-follow, .notif-new_project { color: var(--accent); background: var(--accent-soft); }
.notif-link_reported, .notif-moderation, .notif-storage { color: var(--danger); }
.notif-body { flex: 1; font-size: .92rem; }
.notif-body a:hover { text-decoration: underline; }

/* ------------------------------------------------------ modération ---- */
.stat-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 8px; }
.stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.stat b { display: block; font-size: 1.35rem; font-weight: 640; letter-spacing: -.02em; }
.stat span { font-size: .76rem; color: var(--muted); }
.report-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.report-what { flex: 1; min-width: 200px; font-weight: 560; word-break: break-word; }
.report-what a:hover { text-decoration: underline; }
.report-items { margin: 12px 0; padding-left: 18px; font-size: .87rem; color: var(--ink-2); }
.report-items li + li { margin-top: 4px; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-banned td { opacity: .55; }
.table a:hover { text-decoration: underline; }
.filter-dot { width: 1px; height: 22px; background: var(--line-strong); margin: 0 4px; }

/* ----------------------------------------------------------- légal ---- */
.prose { max-width: 780px; padding-top: 40px; }
.prose h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 22px; }
.prose h2 { font-size: 1.1rem; margin: 30px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.legal-missing {
  background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--ink);
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.footer-legal { flex-basis: 100%; font-size: .78rem; }

/* ------------------------------------------------ capsules catégories -- */
/* Pilule pleine, ombre portée dure : l'esthétique des boutons des années 90,
   en noir et blanc. L'encre et le fond s'inversent avec le thème. */
.cap-icon {
  display: inline-flex; align-items: center; justify-content: center;
  height: 1.55em; padding: 0 .62em; border-radius: 999px; vertical-align: -.38em;
  background: var(--ink); color: var(--bg);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--line-strong);
  position: relative; overflow: hidden;
}
/* Reflet de la moitié haute, comme une gélule. */
.cap-icon::before {
  content: ""; position: absolute; inset: 0 0 50% 0;
  background: color-mix(in srgb, var(--bg) 14%, transparent);
}
.cap-icon svg { width: 1em; height: 1em; position: relative; }
.cap-lg { font-size: 1.5rem; height: 1.7em; padding: 0 .7em; box-shadow: 3px 3px 0 var(--line-strong); }
.cat-card:hover .cap-icon { box-shadow: 3px 3px 0 var(--accent); }

/* ---------------------------------------------------- sous-catégories -- */
.subs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.sub-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 13px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink-2); background: transparent;
  cursor: pointer; transition: transform .12s, box-shadow .12s, background .15s, color .15s, border-color .15s;
}
.sub-chip:has(.muted) { padding-right: 5px; }
.sub-chip .muted {
  padding: 1px 7px; border-radius: 999px; font-size: .68rem;
  background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink-2);
}
.sub-chip:hover { border-color: var(--ink); color: var(--ink); transform: translate(-1px, -1px); }
.sub-chip:active { transform: translate(2px, 2px); }
.sub-chip.is-active, .sub-chip[aria-pressed="true"] {
  background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: 2px 2px 0 var(--accent);
}
.sub-chip.is-active .muted, .sub-chip[aria-pressed="true"] .muted { background: var(--bg); color: var(--ink); }
.sub-chip[disabled] { opacity: .4; cursor: not-allowed; transform: none; }
.subbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -12px 0 24px; }
.cat-card { display: flex; flex-direction: column; }
.cat-card .cat-link { display: block; }
.cat-card .cat-link:hover h3 { text-decoration: underline; }

/* En-tête de page avec actions à droite (compte). */
.page-head.head-split { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ------------------------------------------------- menu mobile ------- */
/* Sur téléphone, la déconnexion quitte l'en-tête : on la retrouve en bas du menu ☰. */
.nav-extra { display: none; }
@media (max-width: 860px) {
  .nav-extra {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-top: 8px; padding: 12px 12px 2px; border-top: 1px solid var(--line);
  }
}

/* Vibes similaires, sous la fiche. */
.similar { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }

/* ----------------------------------------------- accueil : comment ça marche */
.how { padding-top: 24px; }
.how > h2 { margin-bottom: 22px; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.how-step { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.how-step h3 { margin: 16px 0 6px; font-size: 1.05rem; }
.how-step p { margin: 0; color: var(--ink-2); font-size: .92rem; }
/* Le numéro d'étape est une capsule, comme le logo. */
.how-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--ink); color: var(--bg); font-family: "Space Grotesk", var(--font);
  font-weight: 700; font-size: 1rem; box-shadow: 3px 3px 0 var(--accent);
}
.how-more { margin: 18px 0 0; font-size: .9rem; }
.how-more a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------- accueil : catégories ----- */
.cat-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink-2); font-weight: 600; font-size: .88rem;
  transition: transform .12s, border-color .15s, color .15s;
}
.cat-chip:hover { border-color: var(--ink); color: var(--ink); transform: translate(-1px, -1px); }
.cat-chip .muted { font-size: .75rem; }

/* Comment ça marche : la formule du classement. */
.prose .formula {
  margin: 4px 0 12px; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--bg-soft); border: 1px solid var(--line);
  font-family: var(--mono); font-size: .95rem; color: var(--ink); white-space: pre-wrap;
}

.stat-row .seen-ip { grid-column: 1 / -1; margin: 2px 0 0; }
.stat-storage { grid-column: 1 / -1; }
.invite-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.stat-storage b small { font-size: .82rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-storage .progress { height: 6px; margin: 8px 0 6px; }
.stat-storage.is-high .progress > i { background: var(--danger); }
.stat-storage .small { display: block; }
.stat-storage .r2-health { margin-top: 6px; font-size: .8rem; }
.r2-health.is-ok { color: var(--success); }
.r2-health.is-down { color: var(--danger); }

/* ------------------------------------------------ fichiers à télécharger -- */
.file-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.file-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft);
}
.file-row.is-new { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.file-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.file-main b { word-break: break-all; }
.file-actions { display: inline-flex; align-items: center; gap: 12px; }
/* Plateforme : petite capsule, même famille que le logo. */
.platform-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; flex: none;
  background: var(--ink); color: var(--bg); font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  box-shadow: 2px 2px 0 var(--accent);
}
.file-warning { margin: -6px 0 14px; }
.file-check summary { cursor: pointer; font-size: .8rem; color: var(--muted); width: max-content; }
.file-check summary:hover { color: var(--ink); }
.file-check[open] { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.file-check .sha { font-family: var(--mono); font-size: .72rem; word-break: break-all; color: var(--ink-2); }
.file-check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.progress { display: block; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.badge-dl { --led: var(--accent); color: var(--ink-2); }
