/* ============================================================
   ARSENAL TOOLS — Design System « Catalogue sobre »
   Thème sombre #0a0a0a · accents rouge/vert · sans effets gratuits
   Mobile-first · ultra-responsive
   ============================================================ */

/* ---------- Reset & variables ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-deep: #060606;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #f0f0f0;
  --text-2: #a0a0a0;
  --text-3: #666666;

  --violet: #e63946;
  --violet-soft: #f0808a;
  --cyan: #2a9d8f;
  --cyan-soft: #4fb3a1;
  --grad: linear-gradient(135deg, #e63946 0%, #d62839 100%);
  --grad-soft: rgba(230, 57, 70, 0.14);

  --success: #2a9d8f;
  --warning: #f4a261;
  --danger: #e63946;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.45);
  --header-h: 64px;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: rgba(230, 57, 70, 0.45); color: #fff; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: #444444;
  border-radius: 8px;
  border: 2px solid var(--bg-deep);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.icon { flex-shrink: 0; width: 18px; height: 18px; }
svg[viewBox]:not([width]) { width: 1em; height: 1em; flex-shrink: 0; }

/* ---------- Glass générique ---------- */
.glass {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--border);
  padding-block: 0.6rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.brand-accent {
  color: var(--violet);
}

/* Recherche globale instantanée */
.search-box {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-3);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.search-box:focus-within {
  border-color: rgba(230, 57, 70, 0.6);
 
  background: var(--surface-2);
}
.search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.92rem;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12rem 0.38rem;
  white-space: nowrap;
}
.search-clear {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--text-2);
  background: var(--surface-3);
}
.search-clear:hover { color: var(--danger); background: rgba(230, 57, 70, 0.12); }

.admin-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--text-3);
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
}
.admin-link:hover {
  color: var(--violet-soft);
  border-color: rgba(230, 57, 70, 0.45);
  background: rgba(230, 57, 70, 0.1);
 
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 3.2rem 0 2rem; position: relative; overflow: hidden; }
.hero-inner { position: relative; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 15ch;
}
.hero-sub {
  margin-top: 0.9rem;
  color: var(--text-2);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  max-width: 56ch;
}
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.6rem 1rem;
  min-width: 118px;
}
.stat-chip strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--violet);
}
.stat-chip span { font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--font-mono); }

/* ============================================================
   CONTRÔLES : PILLS CATÉGORIES / CHIPS BADGES / TRI
   ============================================================ */
.controls { margin-top: 0.4rem; padding-block: 1rem; position: relative; z-index: 5; }
.controls .container { display: flex; flex-direction: column; gap: 0.8rem; }

.filter-row { display: flex; align-items: center; gap: 0.5rem; }

.filter-row-cats {
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.filter-row-cats::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.pill:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.pill.active {
  color: #fff;
  border-color: rgba(230, 57, 70, 0.65);
  background: rgba(230, 57, 70, 0.28);
 
 
}

.filter-row-meta {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}
.badge-filters { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.filter-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-right: 0.2rem;
}

.chip {
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--surface);
  transition: all 0.22s var(--ease);
}
.chip:hover { transform: translateY(-1px); }

.chip-gratuit:hover, .chip-gratuit[aria-pressed="true"] {
  color: var(--success);
  border-color: rgba(42, 157, 143, 0.55);
  background: rgba(42, 157, 143, 0.1);
 
}
.chip-premium:hover, .chip-premium[aria-pressed="true"] {
  color: var(--violet-soft);
  border-color: rgba(240, 128, 138, 0.55);
  background: rgba(230, 57, 70, 0.12);
 
}
.chip-beta:hover, .chip-beta[aria-pressed="true"] {
  color: var(--warning);
  border-color: rgba(244, 162, 97, 0.55);
  background: rgba(244, 162, 97, 0.1);
 
}
.chip-nouveau:hover, .chip-nouveau[aria-pressed="true"] {
  color: var(--cyan-soft);
  border-color: rgba(42, 157, 143, 0.55);
  background: rgba(42, 157, 143, 0.1);
 
}
.chip[aria-pressed="true"]::before { content: "✕ "; font-size: 0.68rem; }

.sort-box { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.45rem 2.1rem 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.select-wrap select:hover { border-color: var(--border-strong); }
.select-wrap select:focus { outline: none; border-color: rgba(42, 157, 143, 0.6); }
.select-wrap svg {
  position: absolute;
  right: 0.8rem;
  pointer-events: none;
  color: var(--text-3);
}

.results-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 26px;
}
.results-count { font-size: 0.8rem; color: var(--text-3); font-family: var(--font-mono); }
.results-count b { color: var(--cyan-soft); font-weight: 600; }
.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--danger);
  border: 1px solid rgba(230, 57, 70, 0.4);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(230, 57, 70, 0.07);
  transition: all 0.2s;
}
.reset-btn:hover { background: rgba(230, 57, 70, 0.16); box-shadow: 0 0 12px rgba(230, 57, 70, 0.25); }

/* ============================================================
   GRILLE DE PRODUITS
   ============================================================ */
.main-content { flex: 1; padding-block: 1.2rem 3.5rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr));
  gap: 1.15rem;
}

/* Carte produit */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;

}
.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(230, 57, 70, 0.55);
  box-shadow: var(--shadow-card);
}

.pc-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141414;
}
.pc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.5s;
}
.product-card:hover .pc-media img { transform: scale(1.06); filter: saturate(1.15) brightness(1.02); }
.pc-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.05) 30%, rgba(10, 10, 10, 0.88) 100%);
  pointer-events: none;
}

.pc-badges {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 2;
}
.pc-cat {
  position: absolute;
  bottom: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  background: rgba(8, 8, 8, 0.72);
  border: 1px solid rgba(42, 157, 143, 0.3);
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}
.pc-play {
  position: absolute;
  right: 0.8rem;
  bottom: 0.75rem;
  z-index: 2;
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.9);
 
}
.product-card.has-video .pc-play { display: grid; }

.pc-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.95rem 1rem 1rem; flex: 1; }
.pc-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pc-heat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--warning);
  background: rgba(244, 162, 97, 0.08);
  border: 1px solid rgba(244, 162, 97, 0.25);
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.pc-heat svg { width: 10px; height: 10px; }
.pc-desc {
  font-size: 0.84rem;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-footer {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.pc-price { font-family: var(--font-mono); font-size: 0.78rem; color: var(--violet-soft); font-weight: 600; }
.pc-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan-soft);
  transition: gap 0.25s var(--ease), color 0.25s;
}
.product-card:hover .pc-cta { gap: 0.6rem; color: var(--cyan); }

/* Badges génériques */
.b {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.24rem 0.6rem;
  border-radius: 6px;
  border: 1px solid;
}
.b-gratuit { color: #56b8a8; border-color: rgba(42, 157, 143, 0.45); background: rgba(42, 157, 143, 0.1); }
.b-premium { color: #b79aec; border-color: rgba(230, 57, 70, 0.5); background: rgba(230, 57, 70, 0.14); }
.b-beta { color: #f4c886; border-color: rgba(244, 162, 97, 0.45); background: rgba(244, 162, 97, 0.1); }
.b-nouveau { color: #4fb3a1; border-color: rgba(42, 157, 143, 0.45); background: rgba(42, 157, 143, 0.1); }

/* Squelettes de chargement */
.card-skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.sk-img { aspect-ratio: 16/10; background: #151515; }
.sk-line { height: 12px; margin: 0.9rem 1rem 0; border-radius: 6px; background: #151515; }
.sk-line:last-child { margin-bottom: 1.1rem; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }

/* État vide */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-3);
}
.empty-state[hidden] { display: none; }
.empty-state:not([hidden]) { display: flex; }
.empty-state svg { opacity: 0.6; margin-bottom: 0.4rem; }
.empty-state h3 { font-family: var(--font-display); color: var(--text-2); font-size: 1.15rem; }
.empty-state p { font-size: 0.88rem; max-width: 40ch; }
.empty-state .btn { margin-top: 0.8rem; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  border: none;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  filter: brightness(1.08);
}

.btn-cyan {
  border: 1px solid rgba(42, 157, 143, 0.5);
  background: rgba(42, 157, 143, 0.1);
  color: var(--cyan-soft);
}
.btn-cyan:hover { background: rgba(42, 157, 143, 0.18); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }

.btn-danger {
  border: 1px solid rgba(230, 57, 70, 0.45);
  background: rgba(230, 57, 70, 0.1);
  color: #fda4af;
}
.btn-danger:hover { background: rgba(230, 57, 70, 0.2); }

.btn-sm { padding: 0.42rem 0.85rem; min-height: 34px; font-size: 0.8rem; border-radius: 9px; }
.btn-block { width: 100%; }

.btn .spin {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOOTER (sticky)
   ============================================================ */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.6);
  padding-block: 1.1rem;
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.footer-copy { font-size: 0.78rem; color: var(--text-3); }
.footer-copy strong { color: var(--text-2); }
.footer-nav { display: flex; gap: 1rem; }
.footer-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.25s;
}
.footer-admin:hover {
  color: var(--violet-soft);
  border-color: rgba(230, 57, 70, 0.4);
  background: rgba(230, 57, 70, 0.07);
}

/* ============================================================
   SYSTEME DE MODALES
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 5, 5, 0.68);
  animation: overlay-in 0.28s var(--ease);
  padding: 0;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border-strong);
  border-bottom: none;
  background: #141414;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
  animation: sheet-in 0.34s var(--ease);
}
@keyframes sheet-in {
  from { transform: translateY(60px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: sticky;
  top: 0.7rem;
  margin-left: auto;
  margin-right: 0.7rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  transition: all 0.22s;
  float: right;
}
.modal-close:hover { color: #fff; border-color: rgba(230, 57, 70, 0.6); background: rgba(230, 57, 70, 0.18); }

.modal-body { padding: 0 1.3rem 1.6rem; clear: both; }

/* --- Modale produit : entête --- */
.pm-head { display: flex; flex-direction: column; gap: 1rem; }
.pm-cover { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/9; }
.pm-cover img { width: 100%; height: 100%; object-fit: cover; }
.pm-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 10, 0.55)); }
.pm-titles { display: flex; flex-direction: column; gap: 0.55rem; }
.pm-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pm-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.pm-meta { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; font-size: 0.78rem; color: var(--text-2); font-family: var(--font-mono); }
.pm-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.pm-meta svg { width: 13px; height: 13px; color: var(--text-3); }
.pm-meta .heat { color: var(--warning); }

.pm-section { margin-top: 1.4rem; }
.pm-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.8rem;
}
.pm-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pm-section-title svg { width: 14px; height: 14px; color: var(--violet-soft); }
.pm-description { font-size: 0.92rem; color: var(--text-2); white-space: pre-line; }

/* --- Mécanique média vidéo : auto-détection du format --- */
.media-frame { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-strong); background: #0a0a0a; box-shadow: var(--shadow-card); }
.media-frame iframe { width: 100%; height: 100%; border: 0; }

.media-16-9 { position: relative; aspect-ratio: 16 / 9; }
.media-16-9 iframe { position: absolute; inset: 0; }

/* Vidéo verticale (TikTok / YouTube Shorts) : conteneur 9:16 centré */
.media-9-16-wrap {
  display: flex;
  justify-content: center;
  padding: 0.9rem 0;
  background:
    #0a0a0a;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
}
.media-9-16 {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(66dvh, 560px);
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);

}

.media-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 0.55rem;
}
.media-tag b { color: var(--cyan-soft); font-weight: 600; }

/* --- Mécanique Terminal (Desktop App / Tool CLI) --- */
.terminal {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(42, 157, 143, 0.28);
  background: #0d0d0d;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots i { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dots i:nth-child(1) { background: #ff5f57; }
.terminal-dots i:nth-child(2) { background: #febc2e; }
.terminal-dots i:nth-child(3) { background: #28c840; }
.terminal-title { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); letter-spacing: 0.06em; }
.terminal-body { padding: 1rem 1rem 1.1rem; }
.terminal-cmd {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: #7fd4c4;
  word-break: break-all;
  display: flex;
  gap: 0.6rem;
}
.terminal-cmd .prompt { color: var(--success); font-weight: 600; flex-shrink: 0; }
.terminal-cmd .cmd { color: #7fd4c4; }
.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--cyan);

 
}
.terminal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.022);
}
.terminal-note {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.66rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.025);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--cyan-soft);
  border: 1px solid rgba(42, 157, 143, 0.45);
  background: rgba(42, 157, 143, 0.09);
  transition: all 0.25s var(--ease);
  min-height: 38px;
}
.copy-btn:hover { background: rgba(42, 157, 143, 0.18); transform: translateY(-1px); }
.copy-btn.copied {
  color: #56b8a8;
  border-color: rgba(42, 157, 143, 0.6);
  background: rgba(42, 157, 143, 0.14);
 

}

/* --- Bloc action mobile (APK + PWA) --- */
.action-stack { display: flex; flex-direction: column; gap: 0.7rem; }
.action-stack .btn { width: 100%; }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-root {
  position: fixed;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  right: 1.1rem;
  left: 1.1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: rgba(18, 18, 18, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.34s var(--ease);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.toast.out { animation: toast-out 0.3s var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast-success svg { color: var(--success); }
.toast-error svg { color: var(--danger); }
.toast-info svg { color: var(--cyan-soft); }
.toast-success { border-color: rgba(42, 157, 143, 0.4); }
.toast-error { border-color: rgba(230, 57, 70, 0.4); }
.toast-info { border-color: rgba(42, 157, 143, 0.4); }

/* ============================================================
   VUE ADMIN (#admin)
   ============================================================ */
.view-admin { min-height: 100dvh; display: flex; flex-direction: column; }

/* --- Porte de connexion --- */
.admin-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.admin-login {
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;

}
.admin-login .brand-logo { margin-inline: auto; width: 46px; height: 46px; }
.al-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.al-sub { font-size: 0.84rem; color: var(--text-2); }
.al-error {
  display: none;
  font-size: 0.8rem;
  color: #fda4af;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.4);
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
}
.al-error.show { display: block; animation: shake 0.4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}
.al-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  border-top: 1px dashed var(--border);
  padding-top: 0.9rem;
  line-height: 1.7;
}
.al-hint code {
  font-family: var(--font-mono);
  color: var(--cyan-soft);
  background: rgba(42, 157, 143, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  border: 1px solid rgba(42, 157, 143, 0.2);
}

/* --- Entête dashboard --- */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
}
.admin-header .brand-name { font-size: 0.95rem; }
.admin-title-chip {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-soft);
  border: 1px solid rgba(230, 57, 70, 0.45);
  background: rgba(230, 57, 70, 0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.admin-header-actions { margin-left: auto; display: flex; gap: 0.55rem; flex-wrap: wrap; }

/* --- Onglets --- */
.admin-tabs {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.45);
  padding-inline: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.22s;
}
.admin-tab svg { width: 15px; height: 15px; }
.admin-tab:hover { color: var(--text-2); }
.admin-tab.active { color: var(--cyan-soft); }
.admin-tab.active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: -1px;
  height: 2px;
  background: var(--grad);
 
  border-radius: 2px;
}
.admin-body { flex: 1; padding: 1.4rem 1rem 3rem; }
.admin-body > .container { display: flex; flex-direction: column; gap: 1.1rem; }

/* --- Outils communs --- */
.admin-toolbar { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.admin-toolbar h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.admin-toolbar .spacer { flex: 1; }
.admin-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-3);
  min-width: 180px;
  flex: 1;
  max-width: 320px;
}
.admin-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 0.84rem; min-width: 0; }

.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  border: 1px solid;
}
.mode-pill.api { color: #56b8a8; border-color: rgba(42, 157, 143, 0.4); background: rgba(42, 157, 143, 0.07); }
.mode-pill.local { color: var(--warning); border-color: rgba(244, 162, 97, 0.4); background: rgba(244, 162, 97, 0.07); }

/* --- Liste produits (admin) --- */
.product-rows { display: flex; flex-direction: column; gap: 0.7rem; }
.p-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.22s, background 0.22s;

}
.p-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.p-row-thumb {
  width: 74px;
  height: 50px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #141414;
}
.p-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.p-row-title { font-weight: 600; font-size: 0.92rem; font-family: var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-row-sub { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.7rem; color: var(--text-3); font-family: var(--font-mono); }
.p-row-sub .b { font-size: 0.54rem; padding: 0.14rem 0.42rem; }
.p-row-stats { text-align: right; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-2); flex-shrink: 0; }
.p-row-stats b { color: var(--cyan-soft); display: block; font-size: 0.95rem; }
.p-row-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--cyan-soft); border-color: rgba(42, 157, 143, 0.5); background: rgba(42, 157, 143, 0.1); }
.icon-btn.danger:hover { color: #fda4af; border-color: rgba(230, 57, 70, 0.55); background: rgba(230, 57, 70, 0.12); }

/* --- Panneau formulaire produit (slide-over) --- */
.form-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 5, 5, 0.6);
  animation: overlay-in 0.25s var(--ease);
}
.form-panel {
  position: fixed;
  z-index: 111;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #121212;
  border-left: 1px solid var(--border-strong);
  animation: panel-in 0.32s var(--ease);
  overflow: hidden;
}
@keyframes panel-in {
  from { transform: translateX(6%); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}
.form-panel-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
.form-panel-head h3 { font-family: var(--font-display); font-size: 1.05rem; }
.form-panel-head .icon-btn { margin-left: auto; }
.form-panel-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; }
.form-panel-foot {
  display: flex;
  gap: 0.7rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.7);
  flex-shrink: 0;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}
.form-panel-foot .btn { flex: 1; }

/* --- Champs de formulaire --- */
.form-grid { display: flex; flex-direction: column; gap: 1.05rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}
.field-label svg { width: 13px; height: 13px; color: var(--text-3); }
.field-label .req { color: var(--danger); }
.field-hint { font-size: 0.68rem; color: var(--text-3); line-height: 1.5; }
.field-hint code {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--cyan-soft);
  background: rgba(42, 157, 143, 0.07);
  padding: 0.06rem 0.32rem;
  border-radius: 4px;
}
.input, .textarea, .select {
  width: 100%;
  padding: 0.62rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.55);
  color: var(--text);
  font-size: 0.88rem;
  transition: border-color 0.22s, box-shadow 0.22s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; font-family: var(--font-body); }
.select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.2rem; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: rgba(230, 57, 70, 0.6); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input.mono { font-family: var(--font-mono); font-size: 0.8rem; }
.textarea.mono { font-family: var(--font-mono); font-size: 0.8rem; }

.checks { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.check-pill input { display: none; }
.check-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); transition: all 0.2s; }
.check-pill.on { color: var(--text); border-color: rgba(230, 57, 70, 0.55); background: rgba(230, 57, 70, 0.12); }
.check-pill.on .dot { background: var(--violet-soft); }

/* --- Aperçu image + Dropzone --- */
.img-preview {
  display: none;
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #141414;
}
.img-preview.show { display: block; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .img-preview-tag {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--cyan-soft);
  background: rgba(8, 8, 8, 0.85);
  border: 1px solid rgba(42, 157, 143, 0.3);
  border-radius: 5px;
  padding: 0.16rem 0.45rem;
  max-width: 85%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
  padding: 1.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.6px dashed rgba(230, 57, 70, 0.4);
  background: rgba(230, 57, 70, 0.045);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.24s var(--ease);
  min-height: 110px;
}
.dropzone:hover { border-color: rgba(230, 57, 70, 0.7); background: rgba(230, 57, 70, 0.09); color: var(--text-2); }
.dropzone.dragover {
  border-color: var(--cyan);
  background: rgba(42, 157, 143, 0.1);
 
  transform: scale(1.015);
  color: var(--cyan-soft);
}
.dropzone svg { width: 26px; height: 26px; color: var(--violet-soft); }
.dropzone .dz-title { font-weight: 600; font-size: 0.84rem; color: var(--text-2); }
.dropzone .dz-sub { font-size: 0.68rem; font-family: var(--font-mono); }
.dropzone .dz-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan-soft); display: none; }
.dropzone.uploading .dz-status { display: block; }
.dropzone.uploading { pointer-events: none; opacity: 0.85; }

.upload-note { font-size: 0.7rem; color: var(--text-3); display: flex; gap: 0.4rem; align-items: flex-start; line-height: 1.55; }
.upload-note svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 2px; color: var(--violet-soft); }

/* ============================================================
   MÉDIATHÈQUE ADMIN
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.9rem;
}
.media-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;

  transition: border-color 0.22s;
}
.media-card:hover { border-color: var(--border-strong); }
.mc-preview {
  position: relative;
  aspect-ratio: 16/10;
  background: #0d0d0d;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.mc-preview img { width: 100%; height: 100%; object-fit: cover; }
.mc-video-ph {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  color: var(--text-3);
  background:
    #101010;
}
.mc-video-ph svg { width: 34px; height: 34px; color: rgba(255, 255, 255, 0.82); }
.mc-video-ph span { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; }
.mc-preview iframe { width: 100%; height: 100%; border: 0; }
.mc-play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 10, 0.35);
  cursor: pointer;
  transition: background 0.2s;
}
.mc-play-overlay:hover { background: rgba(10, 10, 10, 0.15); }
.mc-play-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.92);
 
  color: #fff;
  transition: transform 0.2s var(--ease);
}
.mc-play-overlay:hover .mc-play-btn { transform: scale(1.12); }
.mc-body { padding: 0.75rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.55rem; }
.mc-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  border: 1px solid;
}
.mc-type.image { color: #56b8a8; border-color: rgba(42, 157, 143, 0.4); background: rgba(42, 157, 143, 0.08); }
.mc-type.video { color: #fda4af; border-color: rgba(230, 57, 70, 0.4); background: rgba(230, 57, 70, 0.08); }
.mc-type.github { color: #b79aec; border-color: rgba(230, 57, 70, 0.4); background: rgba(230, 57, 70, 0.08); }
.mc-url {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-3);
  background: rgba(8, 8, 8, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  word-break: break-all;
  line-height: 1.45;
  max-height: 3.2em;
  overflow: hidden;
}
.mc-actions { display: flex; gap: 0.45rem; align-items: center; }
.mc-actions .copy-btn { flex: 1; justify-content: center; min-height: 34px; padding: 0.35rem 0.6rem; font-size: 0.72rem; }
.mc-source { font-size: 0.62rem; color: var(--text-3); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   ANALYTICS ADMIN
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(158px, 100%), 1fr));
  gap: 0.9rem;
}
.stat-card {
  padding: 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  position: relative;
  overflow: hidden;

}
.stat-card .sc-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.stat-card .sc-label svg { width: 13px; height: 13px; }
.stat-card .sc-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--violet);
}
.stat-card.pulse .sc-value::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--success);
 

}

.live-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
}
.live-refresh svg { width: 13px; height: 13px; }
.live-refresh.on { color: #56b8a8; }

/* Graphique barres (7 jours) */
.chart-card { padding: 1.15rem 1.2rem; }
.chart-card h3 { font-family: var(--font-display); font-size: 0.98rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.chart-card h3 svg { width: 15px; height: 15px; color: var(--cyan-soft); }
.bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.55rem; height: 130px; padding-top: 0.5rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; height: 100%; }
.bar {
  width: 100%;
  max-width: 46px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(230, 57, 70, 0.75) 100%);
 
  min-height: 4px;
  margin-top: auto;
  position: relative;
  transition: height 0.7s var(--ease);
  animation: bar-grow 0.7s var(--ease) backwards;
}
@keyframes bar-grow { from { height: 0 !important; opacity: 0.2; } }
.bar:hover { filter: brightness(1.25); }
.bar-val { position: absolute; top: -1.45rem; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.58rem; color: var(--text-2); white-space: nowrap; }
.bar-day { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-3); text-transform: uppercase; }

/* Classement popularité */
.rank-list { display: flex; flex-direction: column; gap: 0.65rem; }
.rank-item { display: flex; align-items: center; gap: 0.7rem; }
.rank-pos {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-3);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-pos { color: var(--warning); }
.rank-item:nth-child(2) .rank-pos { color: #cccccc; }
.rank-item:nth-child(3) .rank-pos { color: #c96f2f; }
.rank-main { flex: 1; min-width: 0; }
.rank-title { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-track { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.rank-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.85), var(--cyan));
 
  transition: width 0.7s var(--ease);
}
.rank-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan-soft); flex-shrink: 0; }

/* Table clics */
.clicks-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.clicks-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border-strong);
}
.clicks-table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); color: var(--text-2); }
.clicks-table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.clicks-table .t-title { color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 0.6rem; }
.clicks-table .t-title img { width: 34px; height: 24px; border-radius: 4px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.clicks-table .num { font-family: var(--font-mono); color: var(--cyan-soft); }

/* ============================================================
   PARAMÈTRES
   ============================================================ */
.settings-grid { display: flex; flex-direction: column; gap: 1rem; }
.settings-card { padding: 1.25rem 1.3rem; }
.settings-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
}
.settings-card h3 svg { width: 16px; height: 16px; color: var(--violet-soft); }
.settings-card > p { font-size: 0.78rem; color: var(--text-3); margin-bottom: 1rem; line-height: 1.6; }
.settings-row { display: grid; gap: 0.9rem; }
.confirm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.05);
}
.confirm-bar p { font-size: 0.76rem; color: #fda4af; }

/* ============================================================
   CONFIRMATION SUPPRESSION (modale)
   ============================================================ */
.confirm-modal { max-width: 420px; text-align: center; }
.confirm-modal .modal-body { padding: 1.6rem 1.4rem 1.4rem; }
.confirm-modal h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.5rem; }
.confirm-modal p { color: var(--text-2); font-size: 0.86rem; margin-bottom: 1.2rem; }
.confirm-actions { display: flex; gap: 0.7rem; }
.confirm-actions .btn { flex: 1; }

/* ============================================================
   RESPONSIVE — tablette & desktop
   ============================================================ */
@media (min-width: 640px) {
  .toast-root { left: auto; width: min(380px, calc(100vw - 2.2rem)); }
  .modal-overlay { align-items: center; padding: 1.2rem; }
  .modal-panel {
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border-strong);
    animation: modal-pop 0.32s var(--ease);
  }
  @keyframes modal-pop {
    from { transform: translateY(22px) scale(0.965); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
  .form-panel { inset: 0 0 0 auto; width: min(520px, 100%); }
  .settings-row.two { grid-template-columns: 1fr 1fr; }
  .p-row-stats { min-width: 74px; }
  .hero { padding: 4rem 0 2.4rem; }
}

@media (min-width: 960px) {
  .container { padding-inline: 1.5rem; }
  .pm-head { flex-direction: row; align-items: flex-start; }
  .pm-cover { width: 315px; flex-shrink: 0; aspect-ratio: 16/10; }
  .pm-titles { padding-top: 0.25rem; }
  .modal-panel { max-width: 780px; }
  .admin-body { padding: 1.8rem 1.5rem 3.5rem; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-title { max-width: 20ch; }
}

/* Grandes cartes : animation décalée harmonieuse */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

/* Impression : propre et sobre */
@media print {
  .site-header, .controls, .site-footer, .toast-root, .admin-header, .admin-tabs { display: none !important; }
  body { background: #fff; color: #111; }
}


