/* ============================================================
   Eclipse+ — Extension kit CSS
   Règle : ce fichier ne remplace PAS eclipse-ui-v2.1.css.
   Il ajoute uniquement des composants supplémentaires (ads,
   badges premium, widgets collections, notifications, etc.)

   CONTRAINTE : --ad-label vaut var(--faint) — jamais de hex.
   ============================================================ */

/* ── Variables Eclipse+ ──────────────────────────────────── */
:root {
  /* Identifiant publicité / contenu sponsorisé */
  --ad-label: var(--faint);           /* 4,47:1 sur bg-600 — conformité DA */
  --ad-bg: var(--accent-soft);
  --ad-border: var(--line-strong);

  /* Collections */
  --collection-hue: 238;
  --collection-accent: var(--accent);

  /* Notifications */
  --notif-dot: var(--ok);
  --notif-unread-bg: rgba(70,209,127,.12);
  --notif-unread-border: rgba(70,209,127,.22);

  /* Ratings */
  /* --star-on / --star-hover / --star-off : définis dans eclipse-tokens.css */

  /* Protocol button (eclipse://) */
  --proto-bg: var(--accent-solid);
  --proto-border: var(--accent-solid-border);
  --proto-on: var(--accent-on);
  --proto-glow: var(--glow);

  /* Version comparison */
  --diff-add: rgba(70,209,127,.14);
  --diff-add-border: rgba(70,209,127,.32);
  --diff-add-text: var(--ok);
  --diff-remove: rgba(245,147,147,.12);
  --diff-remove-border: rgba(245,147,147,.28);
  --diff-remove-text: var(--danger);
  --diff-update: rgba(224,165,74,.12);
  --diff-update-border: rgba(224,165,74,.26);
  --diff-update-text: var(--warn);

  /* Autocomplete search */
  --ac-bg: var(--bg-800);
  --ac-border: var(--line);
  --ac-hover: var(--bg-700);
  --ac-active: var(--bg-600);
  --ac-shadow: var(--sh-3);

  /* Follow badge */
  --follow-following-bg: rgba(70,209,127,.14);
  --follow-following-border: rgba(70,209,127,.28);
  --follow-following-text: var(--ok);
}

/* ============================================================
   COMPOSANT : Label annonce / contenu sponsorisé
   ============================================================ */
.ad-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--ad-bg);
  border: 1px solid var(--ad-border);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  color: var(--ad-label);      /* == var(--faint) -- jamais de hex ici */
  text-transform: uppercase;
}

/* ============================================================
   COMPOSANT : Bouton protocole Eclipse eclipse://
   ============================================================ */
.btn-eclipse-proto {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 var(--sp-5);
  background: var(--proto-bg);
  border: 1px solid var(--proto-border);
  border-radius: var(--r-sm);
  color: var(--proto-on);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--sh-btn), var(--bevel), var(--proto-glow);
  transition:
    background var(--d-fast) var(--e-out),
    box-shadow var(--d-fast) var(--e-out),
    transform var(--d-fast) var(--e-out);
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn-eclipse-proto::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.07) 0%, transparent 60%);
  pointer-events: none;
}
.btn-eclipse-proto:hover {
  background: var(--accent-solid-hover);
  box-shadow: var(--sh-btn), var(--bevel), var(--glow);
  transform: translateY(-1px);
}
.btn-eclipse-proto:active {
  background: var(--accent-solid-press);
  transform: translateY(0);
}
.btn-eclipse-proto:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.btn-eclipse-proto .proto-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* ============================================================
   BOUTONS PRIMAIRES — passe finale 1.0
   Texte sombre (--on-grad-accent) sur --grad-accent, bordure --btn-border.
   Surcharge posée APRÈS eclipse-ui-v2.1.css, sans le modifier.
   Contraste texte/dégradé >= 8,8:1.
   ============================================================ */
/* Spécificité (0,1,2) : gagne sur css/style.css et les <style> de page,
   quel que soit l'ordre de chargement. */
html body .btn-primary,
html body .btn-accent,
html body .btn-install,
html body .btn-eclipse-proto,
html body .btn-cta,
html body .btn-hero-primary,
html body .btn-download-primary,
html body .plan-cta-primary,
html body .upload-submit-btn,
html body .item-dl-btn,
html body .search-bar-btn,
html body .btn-export:not(.cream),
html body .page-btn.active,
html body .billing-opt.active,
html body .plan-featured-label {
  background: var(--grad-accent);
  color: var(--on-grad-accent);
  border: 1px solid var(--btn-border);
}
html body .btn-primary:hover,
html body .btn-accent:hover,
html body .btn-install:hover,
html body .btn-eclipse-proto:hover,
html body .btn-cta:hover,
html body .btn-hero-primary:hover,
html body .btn-download-primary:hover,
html body .plan-cta-primary:hover,
html body .upload-submit-btn:hover,
html body .item-dl-btn:hover,
html body .search-bar-btn:hover,
html body .btn-export:not(.cream):hover {
  background: var(--grad-accent);
  color: var(--on-grad-accent);
  border-color: var(--btn-border);
  filter: brightness(1.07);
}
html body .btn-primary:active,
html body .btn-accent:active,
html body .btn-install:active,
html body .btn-cta:active,
html body .btn-hero-primary:active {
  filter: brightness(.94);
}
html body .btn-primary svg,
html body .btn-accent svg,
html body .btn-install svg,
html body .btn-eclipse-proto svg,
html body .btn-hero-primary svg,
html body .btn-download-primary svg { color: inherit; }

/* ============================================================
   EMPLACEMENTS PUBLICITAIRES — espace réservé (zéro CLS)
   --leaderboard 728x90 (>= 768px) · --mobile 320x100 (< 768px)
   --rect 300x250 (colonne de filtres, > 1024px)
   Masqués si <html data-plan="plus">.
   ============================================================ */
.ad-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  margin: 0 0 var(--sp-5);
  background: var(--bg-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  contain: layout size;
}
.ad-slot__label {
  position: absolute;
  top: 4px; left: 8px;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
  pointer-events: none;
}
.ad-slot__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  width: 100%;
  height: 100%;
  padding: var(--sp-5) var(--sp-4) var(--sp-2);
  box-sizing: border-box;
  color: var(--text);
  text-align: center;
  font-size: var(--fs-sm, 14px);
  font-weight: 600;
  text-decoration: none;
}
.ad-slot__body small { color: var(--muted); font-weight: 400; font-size: var(--fs-xs, 12px); }
.ad-slot[hidden] { display: none !important; }
.ad-slot__headline { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-slot__copy { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-slot__cta { margin-top: var(--sp-1); font-size: var(--fs-xs, 12px); font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ad-slot--leaderboard .ad-slot__copy, .ad-slot--mobile .ad-slot__copy, .ad-slot--mobile .ad-slot__cta { display: none; }
.ad-slot__body--img { padding: 0; }
.ad-slot__body--img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-slot--leaderboard { width: 728px; height: 90px; }
.ad-slot--mobile      { width: 320px; height: 100px; display: none; }
.ad-slot--rect        { width: 300px; height: 250px; margin: var(--sp-4) 0 0; }
.ad-slot--rect .ad-slot__body { gap: var(--sp-2); }
/* Format réactif : 728x90 en desktop, 320x100 en mobile (un seul élément, in-feed) */
.ad-slot--responsive { width: 728px; height: 90px; }
.ad-slot--responsive .ad-slot__copy { display: none; }
@media (max-width: 767px) {
  .ad-slot--responsive { width: 320px; height: 100px; }
  .ad-slot--responsive .ad-slot__cta { display: none; }
}
/* Chargement : squelette aux dimensions exactes du format (la boîte est déjà posée par le CSS) */
.ad-slot:not([data-ad-state="ready"]):not([data-ad-state="empty"])::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--gold-dim) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.6s ease-in-out infinite;
}
/* Aucune campagne / erreur : repli propre, la grille se referme (hauteur et marges -> 0) */
.ad-slot.ad-slot--closing {
  height: 0; min-height: 0; margin-top: 0; margin-bottom: 0;
  border-width: 0; opacity: 0;
  transition: height 220ms var(--e-out), margin 220ms var(--e-out), opacity 160ms var(--e-out);
}
/* Bascule de plan en démonstration (créée par plan.js, jamais en production) */
.demo-plan-toggle {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 40;
  padding: var(--sp-1) var(--sp-3);
  font: inherit; font-size: var(--fs-label); letter-spacing: var(--ls-label);
  color: var(--muted); background: var(--bg-800);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  cursor: pointer; user-select: none;
}
.demo-plan-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.catalog-layout--ads { grid-template-columns: 300px 1fr; }
html[data-plan="plus"] .ad-slot { display: none !important; }
@media (max-width: 1024px) {
  .catalog-layout--ads { grid-template-columns: 1fr; }
  .ad-slot--rect { display: none; }
}
@media (max-width: 767px) {
  .ad-slot--leaderboard { display: none; }
  .ad-slot--mobile { display: flex; }
}

/* ============================================================
   MISE EN PAGE DES CARTES À VIGNETTE
   La vignette (.cat-thumb) et les couleurs de catégorie viennent du kit :
   assets/vignettes.css + assets/eclipse-categories.css (non modifiés ici).
   ============================================================ */
.cards-grid:has(> .content-card--cat) {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.content-card.content-card--cat {
  position: relative;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: var(--sp-3);
  overflow: hidden;
}
.content-card.content-card--cat > .card-body { padding: var(--sp-3) var(--sp-1) 0; width: 100%; }
.content-card.content-card--cat > .cat-thumb { width: 100%; }
.content-card.content-card--cat .card-action {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
}
.item-card.item-card--cat { padding: var(--sp-3); overflow: hidden; position: relative; }
.item-card.item-card--cat > .cat-thumb { width: 100%; }
.item-card.item-card--cat > .item-body { padding: var(--sp-3) var(--sp-1) 0; }
.item-card.item-card--cat .cat-thumb .shader-badge-row { top: var(--sp-2); left: var(--sp-2); }
.item-card.item-card--cat .cat-thumb .item-res-badge,
.item-card.item-card--cat .cat-thumb .item-kind-badge { top: var(--sp-2); right: var(--sp-2); }
.item-card.item-card--cat .cat-thumb .badge-perf { bottom: var(--sp-2); right: var(--sp-2); }

/* Libellé de pagination « Page X sur Y » */
.page-label { color: var(--muted); white-space: nowrap; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   BANDEAU D'ANNONCES — sous la barre de navigation fixe
   --banner-h est posée par announcements.js (0 quand fermé).
   ============================================================ */
:root { --banner-h: 0px; }
.eclipse-banner {
  position: fixed;
  top: var(--nav-h, 60px); left: 0; right: 0;
  z-index: 999;
  min-height: 40px;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-6);
  background: var(--bg-700);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-meta);
}
.eclipse-banner[data-level="info"]    { border-left: 3px solid var(--accent); }
.eclipse-banner[data-level="warning"] { border-left: 3px solid var(--warn); }
.eclipse-banner[data-level="success"] { border-left: 3px solid var(--ok); }
.eclipse-banner[data-level="error"]   { border-left: 3px solid var(--danger); }
.eclipse-banner__text { flex: 1; min-width: 0; }
.eclipse-banner__link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.eclipse-banner__close {
  width: 28px; height: 28px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: var(--r-sm);
  transition: color var(--d-fast) var(--e-out), background var(--d-fast) var(--e-out);
}
.eclipse-banner__close:hover { color: var(--text); background: var(--bg-hover); }
.eclipse-banner__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
body.has-banner .content-wrap { padding-top: calc(var(--nav-h, 60px) + var(--banner-h)); }

/* ============================================================
   COMPOSANT : Ratings étoiles 1-5
   ============================================================ */
.star-rating {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.star-rating .star {
  width: 20px; height: 20px;
  cursor: pointer;
  color: var(--star-off);
  transition: color var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-spring);
  flex-shrink: 0;
}
.star-rating .star.on,
.star-rating .star[data-on] {
  color: var(--star-on);
}
.star-rating .star:hover,
.star-rating .star.hover {
  color: var(--star-hover);
  transform: scale(1.15);
}
.star-rating-label {
  font-size: var(--fs-meta);
  font-weight: var(--fw-meta);
  color: var(--muted);
  margin-left: var(--sp-2);
}
/* Affichage lecture seule */
.star-display {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.star-display .star {
  width: 14px; height: 14px;
  color: var(--star-off);
  flex-shrink: 0;
}
.star-display .star.on { color: var(--star-on); }

/* ============================================================
   COMPOSANT : Blocs commentaires / reviews
   ============================================================ */
.reviews-section {
  margin-top: var(--sp-7);
}
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.reviews-title {
  font-size: var(--fs-title);
  font-weight: var(--fw-title);
  color: var(--text);
}
.reviews-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.reviews-avg {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.reviews-count {
  font-size: var(--fs-meta);
  color: var(--muted);
}
.review-card {
  background: var(--bg-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-3);
  transition: border-color var(--d-base) var(--e-out);
}
.review-card:hover { border-color: var(--line-strong); }
.review-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}
.review-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--eclipse-cream);
  flex-shrink: 0;
}
.review-author {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text);
}
.review-date {
  font-size: var(--fs-meta);
  color: var(--faint);
  margin-left: auto;
}
.review-text {
  font-size: var(--fs-body);
  color: var(--muted);
  line-height: 1.6;
}
/* Formulaire d'ajout de review */
.review-form {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-top: var(--sp-5);
}
.review-form-title {
  font-size: var(--fs-sub);
  font-weight: var(--fw-sub);
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.review-form textarea {
  width: 100%;
  background: var(--bg-600);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--sp-3) var(--sp-4);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  resize: vertical;
  min-height: 90px;
  outline: none;
  transition: border-color var(--d-fast) var(--e-out);
  box-sizing: border-box;
}
.review-form textarea:focus {
  border-color: var(--accent);
}
.review-form textarea::placeholder { color: var(--faint); }
.review-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-3);
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ============================================================
   COMPOSANT : Comparaison de versions (diff mods)
   ============================================================ */
.version-compare {
  background: var(--bg-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: var(--sp-5);
}
.version-compare-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-700);
  border-bottom: 1px solid var(--line);
}
.version-compare-select {
  background: var(--bg-600);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 7px 32px 7px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-meta);
  font-weight: 500;
  outline: none;
  appearance: none;
  /* chevron en dégradés : aucune couleur codée en dur */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  cursor: pointer;
  transition: border-color var(--d-fast) var(--e-out);
}
.version-compare-select:focus { border-color: var(--accent); }
.version-compare-arrow {
  color: var(--faint);
  font-size: 18px;
  flex-shrink: 0;
}
.version-compare-body {
  padding: var(--sp-4) var(--sp-5);
}
.diff-stats {
  display: flex;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.diff-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-meta);
  font-weight: 600;
}
.diff-stat.add { color: var(--diff-add-text); }
.diff-stat.remove { color: var(--diff-remove-text); }
.diff-stat.update { color: var(--diff-update-text); }
.diff-stat .diff-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.diff-stat.add .diff-dot { background: var(--diff-add-text); }
.diff-stat.remove .diff-dot { background: var(--diff-remove-text); }
.diff-stat.update .diff-dot { background: var(--diff-update-text); }

.diff-list { display: flex; flex-direction: column; gap: 4px; }
.diff-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 6px 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-meta);
  border: 1px solid transparent;
}
.diff-row.add {
  background: var(--diff-add);
  border-color: var(--diff-add-border);
  color: var(--diff-add-text);
}
.diff-row.remove {
  background: var(--diff-remove);
  border-color: var(--diff-remove-border);
  color: var(--diff-remove-text);
}
.diff-row.update {
  background: var(--diff-update);
  border-color: var(--diff-update-border);
  color: var(--diff-update-text);
}
.diff-row-icon { width: 14px; height: 14px; flex-shrink: 0; }
.diff-row-name { font-weight: 500; flex: 1; min-width: 0; }
.diff-row-ver { font-size: 11px; opacity: .7; font-family: var(--mono); }

/* ============================================================
   COMPOSANT : Collections publiques
   ============================================================ */
.collection-card {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition:
    background var(--d-base) var(--e-out),
    border-color var(--d-base) var(--e-out),
    box-shadow var(--d-base) var(--e-out),
    transform var(--d-base) var(--e-out);
  box-shadow: var(--sh-1), var(--bevel);
  display: flex;
  flex-direction: column;
}
.collection-card:hover {
  background: var(--bg-600);
  border-color: var(--line-strong);
  box-shadow: var(--sh-2), var(--bevel);
  transform: translateY(-3px);
}
.collection-cover {
  height: 120px;
  background: var(--brand-grad);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.collection-cover-thumb {
  background: var(--bg-600);
  display: flex; align-items: center; justify-content: center;
}
.collection-cover-thumb svg { width: 28px; height: 28px; opacity: .5; }
.collection-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--scrim) 100%);
}
.collection-body {
  padding: var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.collection-title {
  font-size: var(--fs-sub);
  font-weight: var(--fw-sub);
  color: var(--text);
}
.collection-desc {
  font-size: var(--fs-meta);
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.collection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
}
.collection-stats {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-meta);
  color: var(--faint);
}
.collection-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--d-fast) var(--e-out);
}
.collection-follow-btn:hover,
.collection-follow-btn.following {
  background: var(--follow-following-bg);
  border-color: var(--follow-following-border);
  color: var(--follow-following-text);
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

/* ============================================================
   COMPOSANT : Bouton Suivre créateur
   ============================================================ */
.btn-follow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 34px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  font-size: var(--fs-meta);
  font-weight: 600;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--d-fast) var(--e-out);
}
.btn-follow:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-follow.following {
  background: var(--follow-following-bg);
  border-color: var(--follow-following-border);
  color: var(--follow-following-text);
}
.btn-follow .follow-icon { width: 15px; height: 15px; }

/* ============================================================
   COMPOSANT : Centre de notifications
   ============================================================ */
.notif-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: all var(--d-fast) var(--e-out);
}
.notif-trigger:hover {
  background: var(--bg-700);
  border-color: var(--line-strong);
  color: var(--text);
}
.notif-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--notif-dot);
  border: 2px solid var(--bg-900);
  display: none;
}
.notif-trigger.has-unread .notif-dot { display: block; }

.notif-panel {
  position: fixed;
  top: calc(var(--navbar-h, 60px) + 8px);
  right: var(--sp-4);
  width: 360px;
  max-height: calc(100vh - var(--navbar-h, 60px) - 24px);
  background: var(--bg-800);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
  z-index: 9000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel.open { display: flex; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: var(--fs-sub);
  font-weight: var(--fw-sub);
  color: var(--text);
}
.notif-mark-all {
  font-size: var(--fs-meta);
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:hover { color: var(--accent-hover); text-decoration: underline; }
.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: var(--sp-2) 0;
}
.notif-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  transition: background var(--d-fast) var(--e-out);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.notif-item:hover { background: var(--bg-700); }
.notif-item.unread {
  background: var(--notif-unread-bg);
  border-bottom-color: var(--notif-unread-border);
}
.notif-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--eclipse-cream);
  flex-shrink: 0;
}
.notif-content { flex: 1; min-width: 0; }
.notif-text {
  font-size: var(--fs-meta);
  color: var(--muted);
  line-height: 1.4;
}
.notif-text strong { color: var(--text); font-weight: 600; }
.notif-time {
  font-size: 11px;
  color: var(--faint);
  margin-top: 3px;
}
.notif-unread-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--notif-dot);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-empty {
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  color: var(--faint);
  font-size: var(--fs-body);
}
@media (max-width: 480px) {
  .notif-panel { width: calc(100vw - 2 * var(--sp-4)); right: var(--sp-4); }
}

/* ============================================================
   COMPOSANT : Autocomplete de recherche
   ============================================================ */
.search-autocomplete-wrap {
  position: relative;
}
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--ac-bg);
  border: 1px solid var(--ac-border);
  border-radius: var(--r-md);
  box-shadow: var(--ac-shadow);
  z-index: 8000;
  overflow: hidden;
  display: none;
  max-height: 360px;
  overflow-y: auto;
}
.autocomplete-dropdown.open { display: block; }
.ac-section-label {
  padding: var(--sp-2) var(--sp-4) var(--sp-1);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  color: var(--faint);
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}
.ac-section-label:first-child { border-top: none; }
.ac-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: background var(--d-fast) var(--e-out);
  text-decoration: none;
  color: inherit;
}
.ac-item:hover,
.ac-item.ac-active {
  background: var(--ac-active);
}
.ac-item-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ac-item-icon svg { width: 16px; height: 16px; color: var(--accent); }
.ac-item-body { flex: 1; min-width: 0; }
.ac-item-name {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item-name mark {
  background: var(--accent-2-dim);
  color: var(--accent-2);
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}
.ac-item-meta {
  font-size: var(--fs-meta);
  color: var(--faint);
}
.ac-item-cat {
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--faint);
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--bg-600);
  flex-shrink: 0;
}
.ac-footer {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-meta);
  color: var(--faint);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ac-footer kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-600);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ============================================================
   COMPOSANT : Sélecteur de langue
   ============================================================ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px 4px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 24px;
  border-radius: var(--r-pill);
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--faint);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--d-fast) var(--e-out);
}
.lang-btn:hover { color: var(--muted); }
.lang-btn.active {
  background: var(--grad-accent);
  color: var(--on-grad-accent);
}

/* ============================================================
   COMPOSANT : Liste de mods inclus dans un modpack
   ============================================================ */
.modpack-mod-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--sp-3);
}
.modpack-mod-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 7px var(--sp-3);
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: background var(--d-fast) var(--e-out), border-color var(--d-fast) var(--e-out);
}
.modpack-mod-row:hover { background: var(--bg-600); border-color: var(--line-strong); }
.modpack-mod-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--brand-grad);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modpack-mod-icon svg { width: 14px; height: 14px; color: var(--eclipse-cream); }
.modpack-mod-name {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.modpack-mod-ver {
  font-size: var(--fs-meta);
  color: var(--faint);
  font-family: var(--mono);
  flex-shrink: 0;
}
.modpack-mod-loader {
  font-size: var(--fs-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--brand-wash);
  color: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE ECLIPSE+
   ============================================================ */
@media (max-width: 768px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }
  .version-compare-header {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
  .version-compare-arrow { display: none; }
  .diff-stats { gap: var(--sp-3); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-eclipse-proto:hover { transform: none; }
  .star-rating .star:hover { transform: none; }
  .collection-card:hover { transform: none; }
}
