/* ============================================================
   MYCOUNTDOWN — STYLE.CSS  v3
   Header A élargi, filtres avec icônes SVG centrés
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #080b14;
  --bg2:      #0d1220;
  --bg3:      #111827;
  --bg4:      #1a2238;
  --b1:       #1e2d4a;
  --b2:       #2a3f6a;
  --accent:   #4f8ef7;
  --acc2:     #3a6fd8;
  --violet:   #7c5cbf;
  --vio2:     #a07de0;
  --text:     #e2e8f8;
  --text2:    #8a9bbf;
  --text3:    #4a5878;
  --danger:   #e05252;
  --success:  #38c9a0;
  --film:     #4f8ef7;
  --serie:    #a07de0;
  --jeu:      #38c9a0;
  --fnt-d:    'Bebas Neue', Impact, sans-serif;
  --fnt:      'DM Sans', system-ui, sans-serif;
  --radius:   10px;
  --radius-lg: 14px;
  --nav-h1:   64px;
  --nav-h2:   62px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--fnt);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
#navbar      { flex-shrink: 0; }
#site-footer { margin-top: auto; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--fnt); cursor: pointer; }

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,11,20,.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--b1);
}

.nav-top {
  height: var(--nav-h1);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--b1);
}

.nav-logo-row { display: none; }

.logo {
  font-family: var(--fnt-d); font-size: 1.9rem;
  letter-spacing: .06em; color: var(--text2);
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .2s; flex-shrink: 0;
}
.logo em    { color: var(--accent); font-style: normal; }
.logo:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.nav-btn {
  width: 38px; height: 38px; border-radius: 9px;
  background: none; border: 1px solid var(--b1); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.nav-btn:hover            { border-color: var(--b2); color: var(--text); background: var(--bg3); }
.nav-btn.nav-accent       { border-color: rgba(79,142,247,.3);  color: var(--accent); }
.nav-btn.nav-accent:hover { border-color: rgba(79,142,247,.55); background: rgba(79,142,247,.08); }
.nav-btn.nav-violet       { border-color: rgba(124,92,191,.3);  color: var(--vio2); }
.nav-btn.nav-violet:hover { border-color: rgba(124,92,191,.55); background: rgba(124,92,191,.08); }
.nav-btn.nav-active       { border-color: rgba(79,142,247,.3);  color: var(--accent); }
.nav-btn.nav-danger       { border-color: rgba(224,82,82,.3);   color: var(--danger); }
.nav-btn.nav-danger:hover { border-color: rgba(224,82,82,.55);  background: rgba(224,82,82,.08); }
.nav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.nav-btn-add {
  height: 38px; border-radius: 9px; background: var(--accent); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 15px; font-family: var(--fnt); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.nav-btn-add:hover { background: var(--acc2); }
.nav-btn-add svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.nav-filters {
  height: var(--nav-h2);
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 24px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.nav-filters::-webkit-scrollbar { display: none; }

.fc {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 7px 18px; border-radius: 12px;
  border: 1px solid var(--b1); background: none; color: var(--text3);
  cursor: pointer; transition: all .18s; min-width: 76px; flex-shrink: 0; font-family: var(--fnt);
}
.fc:hover         { border-color: var(--b2); color: var(--text2); background: rgba(255,255,255,.03); }
.fc.active-blue   { background: rgba(79,142,247,.1);  border-color: var(--acc2); color: var(--accent); }
.fc.active-violet { background: rgba(124,92,191,.1); border-color: #6a4daa;     color: var(--vio2); }
.fc.active-teal   { background: rgba(56,201,160,.1);  border-color: #28a882;     color: var(--jeu); }

.fc-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.fc-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fc-label { font-size: .62rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.fc-sep { width: 1px; height: 28px; background: var(--b1); flex-shrink: 0; margin: 0 3px; }

.nav-filters-mobile { display: none; }

@media (max-width: 768px) {
  /* Header mobile : seulement le titre centré */
  .nav-top {
    justify-content: center;
    padding: 0 16px;
    border-bottom: none;
  }
  .nav-actions { display: none; }
  .nav-filters  { display: none; }
  .nav-context-bar { display: none; }
}

/* ══════════════════════════════════════
   PLATFORM BAR
══════════════════════════════════════ */
/* ── Barre plateformes (sous filtre Jeux) ── */
.platform-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--b1);
  padding: 0 28px;
  display: flex; gap: 6px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .32s ease, opacity .25s ease, padding .32s ease;
}
.platform-bar.open {
  max-height: 80px;
  opacity: 1;
  padding: 8px 28px;
}

.plat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid var(--b1);
  background: none;
  cursor: pointer;
  font-family: var(--fnt);
  transition: all .18s;
  min-width: 58px;
}
.plat-pill .pp-icon {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.plat-pill .pp-icon svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.plat-pill .pp-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1;
}

.plat-pill.pp-pc    { color: #5bb8ff; border-color: rgba(0,180,255,.2); }
.plat-pill.pp-xbox  { color: #4caf50; border-color: rgba(16,124,16,.2); }
.plat-pill.pp-ps5   { color: #6ea8fe; border-color: rgba(0,70,200,.2); }
.plat-pill.pp-sw    { color: #ff5c6a; border-color: rgba(228,0,15,.2); }

.plat-pill.pp-pc:hover,  .plat-pill.pp-pc.active  { background: rgba(0,180,255,.1);  border-color: #00b4ff;  box-shadow: 0 0 8px rgba(0,180,255,.2); }
.plat-pill.pp-xbox:hover,.plat-pill.pp-xbox.active { background: rgba(16,124,16,.12); border-color: #107c10; box-shadow: 0 0 8px rgba(16,124,16,.2); }
.plat-pill.pp-ps5:hover, .plat-pill.pp-ps5.active  { background: rgba(0,70,200,.14);  border-color: #0047cc; box-shadow: 0 0 8px rgba(0,70,200,.25); }
.plat-pill.pp-sw:hover,  .plat-pill.pp-sw.active   { background: rgba(228,0,15,.1);   border-color: #e4000f; box-shadow: 0 0 8px rgba(228,0,15,.2); }

/* ══════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════ */
.search-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--b1);
  padding: 10px 24px;
}
.search-inner {
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--b1);
  border-radius: 10px; padding: 9px 14px;
  transition: border-color .15s;
}
.search-inner:focus-within { border-color: var(--b2); }
.search-inner svg {
  width: 15px; height: 15px; opacity: .4;
  fill: none; stroke: var(--text2);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.search-inner input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--fnt); font-size: .9rem; width: 100%;
}
.search-clear {
  background: none; border: none; color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 4px; border-radius: 4px;
  flex-shrink: 0; transition: color .15s;
}
.search-clear:hover { color: var(--text); }
.search-inner input::placeholder { color: var(--text3); }

/* ══════════════════════════════════════
   CONTENT GRID
══════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px; padding: 22px;
  max-width: 1440px; margin: 0 auto;
}

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--b1);
  border-radius: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--b2);
  box-shadow: 0 12px 36px rgba(0,0,0,.55);
}

.card-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--bg3);
  flex-shrink: 0;
  border-radius: 16px 16px 0 0;
}

.card-body {
  /* position relative pour ancrer date+countdown en absolu */
  position: relative;
  border-top: 1px solid var(--b1);
  /* hauteur fixe = badge + titre 2L + meta 1L + date + countdown + paddings */
  height: 126px;
  overflow: hidden;
  padding: 9px 11px 0;
}

.card-badge {
  display: inline-block;
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .07em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
  align-self: flex-start;
}
.badge-FILM  { background: rgba(79,142,247,.14);  color: var(--film); }
.badge-SERIE { background: rgba(160,125,224,.14); color: var(--serie); }
.badge-JEU   { background: rgba(56,201,160,.14);  color: var(--jeu); }

/* Titre : 2 lignes max, hauteur fixe ~36px */
.card-title {
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* force exactement 2 lignes même si 1 seule */
  min-height: calc(1.3em * 2);
}

/* Meta : hauteur réservée fixe 1 ligne */
.card-meta {
  font-size: .68rem;
  color: var(--text2);
  margin-top: 3px;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
}

/* Date et countdown ancrés en absolu en bas, toujours au même endroit */
.card-release-date {
  position: absolute;
  bottom: 24px; left: 11px; right: 11px;
  font-size: .67rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-countdown {
  position: absolute;
  bottom: 8px; left: 11px; right: 11px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.card-date-unknown {
  position: absolute;
  bottom: 8px; left: 11px; right: 11px;
  font-size: .68rem;
  color: var(--text3);
  font-style: italic;
}
.card-available {
  position: absolute;
  bottom: 8px; left: 11px; right: 11px;
  font-size: .68rem;
  color: var(--success);
  font-weight: 600;
}

/* Boutons éditer/supprimer */
.card-actions {
  position: absolute;
  top: 8px; right: 8px;
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity .15s;
}
.card:hover .card-actions { opacity: 1; }

.card-action-btn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(8,11,20,.86);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  backdrop-filter: blur(4px);
}
.card-action-btn svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.btn-edit:hover  { background: rgba(79,142,247,.2);  color: var(--accent); border-color: rgba(79,142,247,.3); }
.btn-trash:hover { background: rgba(224,82,82,.2);   color: var(--danger); border-color: rgba(224,82,82,.3); }

/* ══════════════════════════════════════
   STATES
══════════════════════════════════════ */
.loading-state { display: flex; justify-content: center; padding: 70px 0; }
.spinner {
  width: 30px; height: 30px;
  border: 2.5px solid var(--b2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text3);
  /* Centre dans une grille */
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.empty-state i { font-size: 2.8rem; margin-bottom: 14px; display: block; }
.empty-state p { font-size: .95rem; }

/* ══════════════════════════════════════
   MODALS
══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,6,14,.78);
  backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--b1);
  border-radius: var(--radius-lg); padding: 26px;
  width: 100%; max-width: 400px; position: relative;
  animation: modal-in .2s ease;
  max-height: 90vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--b2) transparent;
}
.modal-box.modal-sm { max-width: 290px; }
@keyframes modal-in {
  from { transform: scale(.95) translateY(6px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);   opacity: 1; }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--bg3); border: 1px solid var(--b1);
  color: var(--text2); width: 26px; height: 26px;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; transition: all .15s;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }
.modal-title    { font-size: 1.05rem; font-weight: 600; margin-bottom: 5px; }
.modal-subtitle { font-size: .83rem; color: var(--text2); margin-bottom: 18px; }

.modal-tabs { display: flex; border-bottom: 1px solid var(--b1); margin-bottom: 20px; }
.mtab {
  background: none; border: none; color: var(--text3);
  padding: 9px 16px; font-size: .83rem; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s;
}
.mtab:hover  { color: var(--text2); }
.mtab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ══════════════════════════════════════
   FORM
══════════════════════════════════════ */
.field-group         { margin-bottom: 13px; }
.field-group label   {
  display: block; font-size: .7rem; font-weight: 600;
  color: var(--text2); margin-bottom: 5px;
  letter-spacing: .04em; text-transform: uppercase;
}
.field-group input,
.field-group select  {
  width: 100%; background: var(--bg3); border: 1px solid var(--b1);
  color: var(--text); padding: 9px 12px; border-radius: 8px;
  font-family: var(--fnt); font-size: .88rem; outline: none;
  transition: border-color .15s; appearance: none;
}
.field-group input:focus,
.field-group select:focus  { border-color: var(--b2); }
.field-group input::placeholder { color: var(--text3); }
.field-group select option { background: var(--bg3); }
.optional { color: var(--text3); font-weight: 400; font-size: .7rem; }
.form-msg     { font-size: .8rem; min-height: 16px; margin-bottom: 10px; color: var(--danger); }
.form-msg.ok   { color: var(--success); }
.form-msg.warn  { color: #f0a500; }
.form-msg.error { color: var(--danger); font-weight: 600; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-secondary {
  padding: 10px 18px; border-radius: 9px; border: 1px solid var(--b2);
  background: none; color: var(--text2); font-family: var(--fnt);
  font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; width: 100%;
}
.btn-secondary:hover { background: var(--bg3); color: var(--text); border-color: var(--b2); }

.btn-primary {
  width: 100%; background: var(--accent); color: #fff;
  border: none; padding: 11px; border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  transition: background .15s, transform .1s;
}
.btn-primary:hover  { background: var(--acc2); }
.btn-primary:active { transform: scale(.98); }
.btn-violet         { background: var(--violet) !important; }
.btn-violet:hover   { background: #6a4daa !important; }
.btn-ghost {
  background: none; border: 1px solid var(--b1); color: var(--text2);
  padding: 8px 14px; border-radius: 8px; font-size: .83rem;
  transition: all .15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { border-color: var(--b2); color: var(--text); background: var(--bg3); }
.btn-danger {
  background: var(--danger); color: #fff; border: none;
  padding: 9px 14px; border-radius: 8px; font-size: .83rem; font-weight: 600;
  transition: background .15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-danger:hover { background: #c94444; }
.btn-sm  { padding: 6px 12px !important; font-size: .78rem !important; }
.btn-row { display: flex; gap: 9px; }
.mt-sm   { margin-top: 10px; }

/* ══════════════════════════════════════
   PROFILE PAGE
══════════════════════════════════════ */
.profile-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 28px 28px 18px; max-width: 980px; margin: 0 auto;
}
.profile-avatar {
  width: 54px; height: 54px; border-radius: 13px;
  background: var(--bg3); border: 1px solid var(--b2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fnt-d); font-size: 1.6rem; color: var(--accent); flex-shrink: 0;
}
.profile-hero h1   { font-size: 1.35rem; font-weight: 600; }
.profile-sub       { font-size: .8rem; color: var(--text2); margin-top: 3px; }
.profile-hero .btn-ghost { margin-left: auto; white-space: nowrap; }

.profile-filters-bar {
  max-width: 980px; margin: 0 auto 8px;
  padding: 0 28px 16px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  border-bottom: 1px solid var(--b1);
}
.profile-search-input {
  background: var(--bg3); border: 1px solid var(--b1);
  color: var(--text); padding: 8px 13px; border-radius: 8px;
  font-family: var(--fnt); font-size: .85rem; outline: none;
  transition: border-color .15s; min-width: 210px;
}
.profile-search-input:focus { border-color: var(--b2); }
.profile-search-input::placeholder { color: var(--text3); }

.profile-checkbox-group { display: flex; gap: 12px; flex-wrap: wrap; }
.check-label {
  display: flex; align-items: center; gap: 5px;
  font-size: .8rem; color: var(--text2); cursor: pointer;
}
.check-label input { accent-color: var(--accent); cursor: pointer; }

.settings-section { margin-bottom: 18px; }
.settings-label   {
  display: block; font-size: .72rem; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 11px;
}
.settings-divider { height: 1px; background: var(--b1); margin: 18px 0; }

/* Barre de contexte sur profil/admin */
.nav-context-bar {
  height: var(--nav-h2);
  border-top: 1px solid var(--b1);
  display: flex; align-items: center;
  padding: 0 28px; gap: 8px;
}
.nav-context-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text3);
}
.nav-context-label.violet { color: var(--violet); }

/* ══════════════════════════════════════
   ADMIN PAGE
══════════════════════════════════════ */
.admin-hero { text-align: center; padding: 30px 20px 14px; }
.admin-hero h1 { font-family: var(--fnt-d); font-size: 2.4rem; letter-spacing: .05em; color: var(--accent); }
.admin-hero p  { color: var(--text2); font-size: .88rem; margin-top: 4px; }

.admin-controls {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center; padding: 14px 24px;
  max-width: 680px; margin: 0 auto;
  box-sizing: border-box;
}
.role-select {
  background: var(--bg3); border: 1px solid var(--b1);
  color: var(--text); padding: 8px 13px; border-radius: 8px;
  font-family: var(--fnt); font-size: .85rem; outline: none;
  cursor: pointer; appearance: none; min-width: 150px;
}
.role-select:focus { border-color: var(--b2); }
.role-select option { background: var(--bg3); }

.stats-row {
  display: flex; gap: 12px; justify-content: center;
  padding: 0 24px 18px; max-width: 480px; margin: 0 auto;
}
.stat-card {
  flex: 1; background: var(--bg2); border: 1px solid var(--b1);
  border-radius: var(--radius); padding: 13px; text-align: center;
}
.stat-card span { font-family: var(--fnt-d); font-size: 1.9rem; color: var(--accent); }
.stat-card p    { font-size: .72rem; color: var(--text2); margin-top: 2px; }

.admin-user-list {
  display: flex; flex-direction: column; gap: 9px;
  max-width: 680px; margin: 0 auto; padding: 0 24px 40px;
  box-sizing: border-box;
}
.admin-user-card {
  background: var(--bg2); border: 1px solid var(--b1);
  border-radius: var(--radius); padding: 13px 16px;
  display: flex; align-items: center; gap: 13px;
  transition: border-color .15s;
}
.admin-user-card:hover { border-color: var(--b2); }
.admin-user-avatar {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-family: var(--fnt-d); font-size: 1.15rem; color: var(--accent); flex-shrink: 0;
}
.admin-user-name { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.crown-icon      { color: var(--violet); font-size: .75rem; }
.admin-user-meta { font-size: .74rem; color: var(--text2); margin-top: 2px; }
.admin-user-trash {
  margin-left: auto; background: none; border: none;
  color: var(--text3); cursor: pointer; font-size: .88rem;
  padding: 6px 8px; border-radius: 6px; transition: all .15s;
}
.admin-user-trash:hover { color: var(--danger); background: rgba(224,82,82,.1); }

.delete-options { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
.delete-options .btn-ghost,
.delete-options .btn-danger { justify-content: flex-start; }
.delete-question { color: var(--text); font-size: .93rem; font-weight: 500; margin-bottom: 4px; }

/* ══════════════════════════════════════
   NEWSLETTER / HELP
══════════════════════════════════════ */
.notif-saved      { font-size: .86rem; color: var(--text2); margin-bottom: 13px; }
.notif-saved span { color: var(--accent); font-weight: 600; }

.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.help-item {
  background: var(--bg3); border: 1px solid var(--b1);
  border-radius: var(--radius); padding: 13px;
}
.help-icon        { font-size: 1.3rem; display: block; margin-bottom: 5px; }
.help-item strong { display: block; font-size: .85rem; margin-bottom: 4px; }
.help-item p      { font-size: .76rem; color: var(--text2); line-height: 1.4; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-filters             { display: none; }
  .burger-btn              { display: flex; }
  /* Ligne 1 : logo centré, sans actions */
  .nav-top {
    justify-content: center;
    padding: 0 16px;
    border-bottom: none;
  }
  .nav-top .logo { font-size: 1.6rem; }

  /* Ligne 2 : nav-actions sort du nav-top, prend toute la largeur */
  .nav-top { flex-wrap: wrap; }
  .nav-actions {
    order: 2;
    width: 100%;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    border-top: 1px solid var(--b1);
    border-bottom: 1px solid var(--b1);
    background: var(--bg2);
    flex-wrap: wrap;
  }

  .content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px; padding: 14px 12px;
  }
  .card-actions         { opacity: 1; }
  .profile-hero         { flex-wrap: wrap; padding: 20px 16px 14px; }
  .profile-filters-bar  { padding: 0 16px 14px; }
  .profile-search-input { min-width: 100%; }
  .help-grid            { grid-template-columns: 1fr; }
  .stats-row            { padding: 0 14px 14px; }
  .nav-context-bar      { padding: 0 16px; }
}

@media (max-width: 400px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
}

/* ══════════════════════════════════════
   PROFIL PAGE — REFONTE v3
══════════════════════════════════════ */

/* Hero */
.profil-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 28px 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.profil-avatar {
  width: 62px; height: 62px;
  border-radius: 15px;
  background: linear-gradient(135deg, #1a2a4a, #2a3f6a);
  border: 1px solid var(--b2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fnt-d); font-size: 1.9rem; color: var(--accent);
  flex-shrink: 0;
}
.profil-hero-info h1 { font-size: 1.45rem; font-weight: 600; }
.profil-stats {
  display: flex;
  gap: 14px;
  margin-top: 5px;
  flex-wrap: wrap;
}
.pstat {
  font-size: .78rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.pstat::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}
.pstat-film::before  { background: var(--film); }
.pstat-serie::before { background: var(--serie); }
.pstat-jeu::before   { background: var(--jeu); }
.profil-hero-actions { margin-left: auto; flex-shrink: 0; }

/* Toolbar */
.profil-toolbar {
  max-width: 980px;
  margin: 18px auto 0;
  padding: 0 28px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--b1);
}

.profil-search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--b1);
  border-radius: 9px; padding: 8px 13px;
  flex: 1; min-width: 180px;
  transition: border-color .15s;
}
.profil-search-box:focus-within { border-color: var(--b2); }
.profil-search-box svg {
  width: 14px; height: 14px; opacity: .4; flex-shrink: 0;
  fill: none; stroke: var(--text2); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.profil-search-box input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--fnt); font-size: .85rem; width: 100%;
}
.profil-search-box input::placeholder { color: var(--text3); }

/* Sort group */
.sort-group {
  display: flex; gap: 3px;
  background: var(--bg2); border: 1px solid var(--b1);
  border-radius: 9px; padding: 4px;
  flex-shrink: 0;
}
.sort-btn {
  padding: 5px 12px;
  border-radius: 6px; border: none; background: none;
  font-family: var(--fnt); font-size: .74rem; font-weight: 600;
  letter-spacing: .03em; color: var(--text3);
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  transition: all .15s; white-space: nowrap;
}
.sort-btn:hover { color: var(--text2); background: var(--bg3); }
.sort-btn.active { background: var(--bg4); color: var(--accent); }
.sort-btn svg {
  width: 12px; height: 12px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Type chips */
.type-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.type-chip {
  padding: 5px 12px;
  border-radius: 20px; border: 1px solid var(--b1);
  font-size: .68rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text3);
  background: none; cursor: pointer; font-family: var(--fnt);
  transition: all .15s; white-space: nowrap;
}
.type-chip:hover { border-color: var(--b2); color: var(--text2); }
.type-chip[data-filter="FILM"].on    { background: rgba(79,142,247,.12);  border-color: var(--acc2);  color: var(--film); }
.type-chip[data-filter="SERIE"].on   { background: rgba(160,125,224,.12); border-color: var(--vio2);  color: var(--serie); }
.type-chip[data-filter="JEU"].on     { background: rgba(56,201,160,.12);  border-color: #28a882;      color: var(--jeu); }
.type-chip[data-filter="UNKNOWN"].on { background: rgba(74,88,120,.15);   border-color: var(--text3); color: var(--text2); }
.type-chip[data-filter="PAST"].on    { background: rgba(56,201,160,.1);   border-color: var(--success); color: var(--success); }

/* Profil grid */
.profil-grid {
  max-width: 980px;
  margin: 16px auto 40px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}

/* Profil card actions toujours visibles (SVG inline) */
@media (max-width: 768px) {
  .profil-hero      { padding: 20px 16px 0; gap: 14px; }
  .profil-toolbar   { padding: 0 16px 14px; gap: 8px; }
  .profil-search-box { min-width: 100%; }
  .profil-grid      { padding: 0 12px; gap: 11px;
                      grid-template-columns: repeat(2, 1fr); }
  .profil-hero-actions { display: none; }
}

/* ── Séparateur "Date inconnue" dans la grille ── */
.grid-separator {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 10px;
  color: var(--text2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.grid-separator::before,
.grid-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(79,142,247,.5));
  box-shadow: 0 0 6px rgba(79,142,247,.3);
}
.grid-separator::after {
  background: linear-gradient(to left, transparent, rgba(79,142,247,.5));
}
.grid-separator span {
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid rgba(79,142,247,.4);
  border-radius: 6px;
  padding: 3px 12px;
  color: var(--text2);
  box-shadow: 0 0 10px rgba(79,142,247,.25), inset 0 0 8px rgba(79,142,247,.06);
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
#site-footer {
  border-top: 1px solid var(--b2);
  background: linear-gradient(90deg, rgba(79,142,247,.06) 0%, rgba(124,92,191,.06) 100%);
}

.footer-line {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-copy {
  font-size: .72rem;
  color: var(--text3);
  letter-spacing: .03em;
}

.footer-powered {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-by {
  font-size: .7rem;
  color: var(--text3);
}

.footer-author {
  font-family: var(--fnt-d);
  font-size: 1.1rem;
  letter-spacing: .06em;
  color: var(--accent);
  animation: neon-pulse 2.4s ease-in-out infinite;
  line-height: 1;
}

@keyframes neon-pulse {
  0%, 100% {
    text-shadow:
      0 0 4px rgba(79,142,247,.9),
      0 0 10px rgba(79,142,247,.7),
      0 0 22px rgba(79,142,247,.5),
      0 0 42px rgba(79,142,247,.3);
    color: #7ab3ff;
  }
  40% {
    text-shadow:
      0 0 2px rgba(79,142,247,.4),
      0 0 6px rgba(79,142,247,.2);
    color: var(--accent);
  }
  55% {
    text-shadow:
      0 0 4px rgba(79,142,247,.95),
      0 0 12px rgba(79,142,247,.8),
      0 0 26px rgba(79,142,247,.55),
      0 0 48px rgba(124,92,191,.35);
    color: #90c2ff;
  }
  70% {
    text-shadow:
      0 0 1px rgba(79,142,247,.3);
    color: #4a84e8;
  }
}

@media (max-width: 480px) {
  .footer-line { justify-content: center; gap: 14px; }
}

/* ══════════════════════════════════════
   CARD NOTIFICATION BELL
══════════════════════════════════════ */
.card-notif-wrap {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
}

.card-notif-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(8,11,20,.82);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.card-notif-btn svg { width: 15px; height: 15px; }
.card:hover .card-notif-btn    { opacity: 1; }  /* kept for ref */
.card-notif-btn:hover           { background: var(--bg4); color: var(--text); border-color: rgba(255,255,255,.2); }

/* Actif : vert avec glow */
.card-notif-btn.notif-on {
  opacity: 1;
  color: var(--success);
  border-color: rgba(56,201,160,.5);
  background: rgba(56,201,160,.15);
  box-shadow: 0 0 8px rgba(56,201,160,.35);
}
.card-notif-btn.notif-on:hover  { background: rgba(56,201,160,.25); }

/* Modal no-email */
.no-email-icon {
  display: flex; justify-content: center;
  margin-bottom: 12px;
  opacity: .7;
}
.no-email-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}
.no-email-text {
  font-size: .8rem;
  color: var(--text2);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .card-notif-btn { opacity: 1; }
}

/* ══════════════════════════════════════
   MODAL ADD v2 — LAYOUT DEUX COLONNES
══════════════════════════════════════ */
.modal-add-v2 {
  max-width: 640px;
  padding: 24px;
}

.add-layout {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  margin-top: 4px;
}

/* Colonne gauche : preview + résultats */
.add-poster-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.add-poster-preview {
  width: 140px;
  aspect-ratio: 2/3;
  border-radius: 10px;
  border: 1px solid var(--b1);
  background: var(--bg3);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.add-poster-empty {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text3);
  font-size: .7rem;
}
#add-poster-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: none;
}

/* Résultats en grille sous la preview */
.add-poster-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--b2) transparent;
}
.add-poster-results:empty { display: none; }

.poster-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 7px;
  border: 1px solid var(--b1);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--bg3);
  transition: border-color .15s, transform .15s;
}
.poster-thumb:hover {
  border-color: var(--accent);
  transform: scale(1.03);
}
.poster-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Spinner dans le champ titre */
.add-title-wrap {
  position: relative;
}
.add-title-wrap input { width: 100%; }
.add-title-spinner {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  display: flex; align-items: center;
}
.spinner-sm {
  width: 14px; height: 14px;
  border: 2px solid var(--b2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@media (max-width: 520px) {
  .add-layout { grid-template-columns: 1fr; }
  .add-poster-col { flex-direction: row; align-items: flex-start; gap: 12px; }
  .add-poster-preview { width: 90px; }
  .add-poster-results { grid-template-columns: repeat(3, 1fr); max-height: 120px; }
}

/* ══════════════════════════════════════
   MODAL ADD — PLATFORM BTNS + RESET
══════════════════════════════════════ */
.modal-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-right: 36px;
}
.modal-add-header .modal-title { margin-bottom: 0; }

.btn-reset-form {
  display: flex; align-items: center; gap: 5px;
  background: none; border: 1px solid var(--b1);
  color: var(--text3); border-radius: 7px;
  padding: 5px 10px; font-size: .72rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
  font-family: var(--fnt);
}
.btn-reset-form:hover { border-color: var(--b2); color: var(--text2); background: var(--bg3); }

.field-label-standalone {
  display: block;
  font-size: .7rem; font-weight: 600;
  color: var(--text2); margin-bottom: 8px;
  letter-spacing: .04em; text-transform: uppercase;
}

.platform-btn-group {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 13px;
}

.plat-select-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 7px 12px;
  border-radius: 9px; border: 1px solid var(--b1);
  background: none; color: var(--text3);
  cursor: pointer; font-family: var(--fnt);
  font-size: .65rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  transition: all .15s; flex: 1; min-width: 52px;
}
.plat-select-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.plat-select-btn:hover { border-color: var(--b2); color: var(--text2); background: var(--bg3); }

.plat-select-btn[data-platform="PC"].active    { background: rgba(0,180,255,.12);  border-color: #00b4ff; color: #5bb8ff; }
.plat-select-btn[data-platform="XBOX"].active  { background: rgba(16,124,16,.12);  border-color: #107c10; color: #4caf50; }
.plat-select-btn[data-platform="PS5"].active   { background: rgba(0,70,200,.14);   border-color: #0047cc; color: #6ea8fe; }
.plat-select-btn[data-platform="SWITCH"].active{ background: rgba(228,0,15,.1);    border-color: #e4000f; color: #ff5c6a; }

/* ══════════════════════════════════════
   RESPONSIVE COMPLET — MOBILE FIRST
══════════════════════════════════════ */

/* ── 480px : petits mobiles ── */
@media (max-width: 480px) {

  /* Nav */
  .logo { font-size: 1.5rem; }
  .nav-top { padding: 0 12px; }
  .nav-context-bar { padding: 0 12px; }

  /* Grille principale : 2 col serrées */
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    padding: 12px 10px;
  }

  /* Grille profil */
  .profil-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    padding: 0 10px;
  }

  /* Hero profil — empile tout */
  .profil-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 12px 0;
  }
  .profil-hero-stats { gap: 12px; }
  .profil-stat-val   { font-size: 1.4rem; }

  /* Toolbar profil */
  .profil-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 10px 12px;
  }
  .profil-search-box { min-width: 100%; }
  .type-chips        { justify-content: flex-start; }

  /* Formulaire ajout — 1 colonne */
  .add-layout {
    grid-template-columns: 1fr;
  }
  .add-poster-col {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  .add-poster-preview { width: 90px; flex-shrink: 0; }
  .add-poster-results {
    grid-template-columns: repeat(3, 1fr);
    max-height: 130px;
    flex: 1;
  }

  /* Boutons plateforme — plus compacts */
  .plat-select-btn { padding: 6px 8px; min-width: 44px; font-size: .58rem; }
  .plat-select-btn svg { width: 14px; height: 14px; }

  /* Modals — haut de page sur mobile (clavier virtuel ne gêne pas) */
  .modal-overlay { padding: 0; align-items: flex-start; }
  .modal-box {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 92vh;
    max-width: 100%;
    width: 100%;
    padding: 22px 18px 32px;
  }
  /* Modal auth en haut, collée */
  #modal-auth .modal-box {
    border-radius: 0 0 18px 18px;
    padding-top: 18px;
  }
  .modal-add-v2 { max-width: 100%; }

  /* Footer */
  .footer-line {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
  }
  .footer-sep { display: none; }

  /* Platform bar */
  .platform-bar.open { padding: 8px 12px; gap: 8px; }
  .plat-pill { min-width: 52px; padding: 6px 10px; }

  /* Admin */
  .admin-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-user-card { padding: 10px; }
}

/* ── 360px : très petits écrans ── */
@media (max-width: 360px) {

  .logo { font-size: 1.3rem; }

  /* 1 seule colonne sur 360px */
  .content-grid {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 0 auto;
  }
  .profil-grid {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 0 auto;
  }

  /* Boutons nav plus petits */
  .nav-btn { width: 34px; height: 34px; }

  /* Chips de filtre wrappent */
  .nav-filters-mobile { gap: 6px; }
  .fc { padding: 6px 12px; min-width: 60px; }
  .fc-label { font-size: .58rem; }
}

/* ── Landscape mobile ── */
@media (max-width: 768px) and (orientation: landscape) {
  .modal-overlay { align-items: flex-start; padding: 0; }
  .modal-box {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 88vh;
    max-width: 100%;
  }
  .content-grid { grid-template-columns: repeat(3, 1fr); }
  .profil-grid  { grid-template-columns: repeat(3, 1fr); }
}

/* ── Tablettes 768px → 1024px ── */
@media (min-width: 769px) and (max-width: 1024px) {
  .content-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 20px 18px;
  }
  .profil-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .add-layout { grid-template-columns: 160px 1fr; }
}

/* ══════════════════════════════════════
   BOUTON RETOUR EN HAUT
══════════════════════════════════════ */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--b2);
  background: var(--bg2);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s, border-color .15s, background .15s;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg3);
}
#back-to-top svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

@media (max-width: 768px) {
  #back-to-top { bottom: 16px; right: 14px; width: 36px; height: 36px; }
}
