/* ============================================================
   GameZone — community-extra.css
   Auth, Game Tabs, Forum, Sidebar, Live Search, Profile
   ============================================================ */

/* ============================================================
   MODAL AUTH
   ============================================================ */
.gz-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.gz-auth-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.gz-auth-modal {
  background: #13131f;
  border: 1px solid #2a2a45;
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  margin: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  position: relative;
  overflow: hidden;
  transform: translateY(16px) scale(.97);
  transition: transform .25s ease;
}

.gz-auth-overlay.open .gz-auth-modal {
  transform: none;
}

.gz-auth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,.07);
  border: none;
  color: #7777aa;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gz-auth-close:hover { background: rgba(239,68,68,.2); color: #ef4444; }

.gz-auth-tabs {
  display: flex;
  border-bottom: 1px solid #2a2a45;
}

.gz-auth-tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  color: #7777aa;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .15s;
}

.gz-auth-tab.active { color: #fff; border-bottom-color: #7c3aed; }
.gz-auth-tab:hover:not(.active) { color: #e2e2f0; }

.gz-auth-panel { display: none; padding: 26px 28px 28px; }
.gz-auth-panel.active { display: block; }

.gz-auth-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 5px;
}

.gz-auth-subtitle {
  font-size: .83rem;
  color: #7777aa;
  margin: 0 0 20px;
}

.gz-auth-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}
.gz-auth-message--success { background: rgba(34,197,94,.1);  color: #22c55e; border: 1px solid rgba(34,197,94,.25); }
.gz-auth-message--error   { background: rgba(239,68,68,.1);  color: #ef4444; border: 1px solid rgba(239,68,68,.25); }

.gz-auth-field { margin-bottom: 14px; }

.gz-auth-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7777aa;
  margin-bottom: 6px;
}

.gz-auth-field-wrap { position: relative; }

.gz-auth-field input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1.5px solid #2a2a45;
  border-radius: 9px;
  color: #e2e2f0;
  padding: 11px 14px;
  font-size: .93rem;
  outline: none;
  transition: all .15s;
}

.gz-auth-field-wrap input { padding-right: 44px; }

.gz-auth-field input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

.gz-auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #7777aa;
  cursor: pointer;
  padding: 2px;
}
.gz-auth-eye:hover { color: #e2e2f0; }

.gz-auth-hint { font-size: .75rem; color: #555; margin-top: 4px; }

.gz-pass-strength {
  font-size: .75rem;
  font-weight: 700;
  margin-top: 4px;
  min-height: 16px;
}

.gz-auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: #7777aa;
  margin-bottom: 16px;
  cursor: pointer;
}
.gz-auth-remember input { accent-color: #7c3aed; width: 14px; height: 14px; }

.gz-auth-submit {
  width: 100%;
  padding: 12px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 10px;
}
.gz-auth-submit:hover { background: #6d28d9; transform: translateY(-1px); }
.gz-auth-submit:disabled { background: #444; cursor: not-allowed; transform: none; }

.gz-auth-forgot {
  display: block;
  text-align: center;
  font-size: .8rem;
  color: #7777aa;
}
.gz-auth-forgot:hover { color: #a78bfa; }

.gz-auth-terms { font-size: .78rem; color: #555; margin-bottom: 16px; }
.gz-auth-terms a { color: #a78bfa; }

/* Bouton "Connexion requise" inline */
.gz-login-required-btn {
  padding: 10px 20px;
  background: rgba(124,58,237,.15);
  border: 1.5px solid rgba(124,58,237,.4);
  border-radius: 8px;
  color: #a78bfa;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.gz-login-required-btn:hover { background: #7c3aed; color: #fff; border-color: #7c3aed; }

/* ============================================================
   HEADER — User bar
   ============================================================ */
.gz-header-auth-btn {
  padding: 7px 18px;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: .83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.gz-header-auth-btn:hover { background: #6d28d9; }

.gz-header-user { position: relative; flex-shrink: 0; }

.gz-header-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid #2a2a45;
  border-radius: 20px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  transition: all .15s;
  color: #e2e2f0;
}
.gz-header-user-btn:hover { border-color: rgba(124,58,237,.5); background: rgba(124,58,237,.1); }

.gz-header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #2a2a45;
}

.gz-header-user-name { font-size: .83rem; font-weight: 700; }

.gz-user-level-badge {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 7px;
  border-radius: 10px;
  color: #fff;
}

.gz-header-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 12px;
  min-width: 180px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  padding: 8px;
  z-index: 500;
  display: none;
}
.gz-header-user-dropdown.open { display: block; }

.gz-header-user-dropdown a,
.gz-header-user-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: .85rem;
  color: #b8b8d0;
  background: none;
  border: none;
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
}
.gz-header-user-dropdown a:hover,
.gz-header-user-dropdown button:hover { background: rgba(124,58,237,.15); color: #fff; }
.gz-header-user-dropdown hr { border-color: #2a2a45; margin: 4px 0; }

/* ============================================================
   ONGLETS JEU
   ============================================================ */
.gz-game-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #13131f;
  border-bottom: 1px solid #2a2a45;
  padding: 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: var(--gz-header-h);
  z-index: 100;
}
.gz-game-tabs::-webkit-scrollbar { display: none; }

.gz-game-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  color: #7777aa;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all .15s;
}
.gz-game-tab:hover { color: #e2e2f0; }
.gz-game-tab.active { color: #fff; border-bottom-color: #7c3aed; }

.gz-game-tab__count {
  background: rgba(124,58,237,.2);
  color: #a78bfa;
  font-size: .7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
}
.gz-game-tab.active .gz-game-tab__count { background: #7c3aed; color: #fff; }

/* ============================================================
   SECTIONS IMAGES / VIDEOS
   ============================================================ */
.gz-section-header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #2a2a45;
}
.gz-section-header h2 { font-size: 1.2rem; color: #fff; }

.gz-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.gz-image-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #1a1a2e;
  border: 1px solid #2a2a45;
  transition: all .2s;
}
.gz-image-item:hover { border-color: rgba(124,58,237,.5); transform: scale(1.02); }
.gz-image-item img { width: 100%; height: 100%; object-fit: cover; }

.gz-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.gz-video-embed {
  position: relative;
  padding-top: 56.25%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.gz-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.gz-video-title {
  font-size: .85rem;
  color: #b8b8d0;
  margin-top: 8px;
  font-weight: 600;
}

.gz-section-empty {
  text-align: center;
  padding: 48px 20px;
  color: #555;
  font-size: .9rem;
  background: rgba(255,255,255,.02);
  border: 1px dashed #2a2a45;
  border-radius: 12px;
}

/* ============================================================
   FORUM
   ============================================================ */
.gz-forum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.gz-forum-header__title { font-size: 1.2rem; font-weight: 800; color: #fff; margin: 0; }

.gz-forum-stats {
  display: flex;
  gap: 12px;
  font-size: .8rem;
  color: #7777aa;
  margin-top: 3px;
}

.gz-forum-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gz-forum-cats { display: flex; gap: 6px; flex-wrap: wrap; }

.gz-forum-cat-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid #2a2a45;
  color: #7777aa;
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.gz-forum-cat-btn:hover,
.gz-forum-cat-btn.active { background: #7c3aed; border-color: #7c3aed; color: #fff; }

.gz-forum-order { display: flex; gap: 6px; }
.gz-forum-order a {
  font-size: .78rem;
  font-weight: 700;
  color: #7777aa;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all .15s;
}
.gz-forum-order a:hover,
.gz-forum-order a.active { background: rgba(124,58,237,.15); color: #a78bfa; }

.gz-forum-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }

.gz-topic-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 10px;
  transition: all .15s;
}
.gz-topic-card:hover { border-color: rgba(124,58,237,.35); background: rgba(124,58,237,.05); }
.gz-topic-card.pinned { border-left: 3px solid #f59e0b; }
.gz-topic-card.solved { border-left: 3px solid #22c55e; }

.gz-topic-card__status { text-align: center; }

.gz-topic-icon {
  width: 18px;
  height: 18px;
  border: 2px solid #2a2a45;
  border-radius: 50%;
  margin: 0 auto;
}
.gz-topic-icon.has-replies { border-color: #7c3aed; background: rgba(124,58,237,.2); }

.gz-topic-pin {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #f59e0b;
  background: rgba(245,158,11,.12);
  padding: 2px 6px;
  border-radius: 4px;
}
.gz-topic-solved {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #22c55e;
  background: rgba(34,197,94,.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.gz-topic-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
  transition: color .15s;
}
.gz-topic-card__title:hover { color: #a78bfa; }

.gz-topic-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  color: #7777aa;
  flex-wrap: wrap;
}

.gz-topic-author { display: flex; align-items: center; gap: 4px; font-weight: 600; color: #b8b8d0; }
.gz-user-level-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.gz-topic-game-link { color: #7c3aed; font-weight: 600; text-decoration: none; }
.gz-topic-game-link:hover { color: #a78bfa; }

.gz-topic-card__stats {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.gz-topic-stat { text-align: center; }
.gz-topic-stat__num { display: block; font-size: 1.1rem; font-weight: 800; color: #fff; }
.gz-topic-stat__label { font-size: .65rem; color: #555; text-transform: uppercase; letter-spacing: .06em; }

.gz-forum-empty {
  text-align: center;
  padding: 48px 20px;
  color: #555;
  border: 1px dashed #2a2a45;
  border-radius: 12px;
}
.gz-forum-empty svg { margin: 0 auto 12px; opacity: .3; display: block; }
.gz-forum-empty p { color: #7777aa; font-size: .9rem; margin: 0; }

/* Modal nouveau sujet */
.gz-topic-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gz-topic-modal__inner {
  background: #13131f;
  border: 1px solid #2a2a45;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  margin: 20px;
  overflow: hidden;
}
.gz-topic-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #2a2a45;
}
.gz-topic-modal__header h3 { color: #fff; font-size: 1rem; font-weight: 800; margin: 0; }
.gz-topic-modal__header button { background: none; border: none; color: #7777aa; font-size: 20px; cursor: pointer; }
.gz-topic-modal__body { padding: 22px; }

.gz-forum-field { margin-bottom: 14px; }
.gz-forum-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7777aa; margin-bottom: 6px; }
.gz-forum-field input,
.gz-forum-field select,
.gz-forum-field textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1.5px solid #2a2a45;
  border-radius: 8px;
  color: #e2e2f0;
  padding: 10px 14px;
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.gz-forum-field input:focus,
.gz-forum-field select:focus,
.gz-forum-field textarea:focus { border-color: #7c3aed; }
.gz-forum-field textarea { resize: vertical; min-height: 150px; }
.gz-forum-field-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.gz-forum-msg { margin-top: 10px; padding: 8px 12px; border-radius: 6px; font-size: .83rem; font-weight: 600; }

/* ============================================================
   SUJET (page individuelle)
   ============================================================ */
.gz-topic-page { }
.gz-topic-page__header { margin-bottom: 20px; }
.gz-topic-breadcrumb { font-size: .8rem; color: #7777aa; margin-bottom: 8px; }
.gz-topic-breadcrumb a { color: #7777aa; }
.gz-topic-breadcrumb a:hover { color: #a78bfa; }
.gz-topic-breadcrumb span { margin: 0 5px; }
.gz-topic-page__title { font-size: 1.4rem; font-weight: 900; color: #fff; display: flex; align-items: center; gap: 10px; }
.gz-topic-solved-badge { font-size: .7rem; background: rgba(34,197,94,.15); color: #22c55e; padding: 3px 10px; border-radius: 20px; font-weight: 700; }

.gz-replies { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }

.gz-post {
  display: grid;
  grid-template-columns: 120px 1fr;
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 12px;
  overflow: hidden;
}
.gz-post--original { border-left: 3px solid #7c3aed; }

.gz-post__user {
  padding: 16px 12px;
  border-right: 1px solid #2a2a45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.2);
  text-align: center;
}

.gz-post__avatar {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  border: 2px solid #2a2a45 !important;
}

.gz-post__username { font-size: .82rem; font-weight: 800; color: #fff; }
.gz-post__level {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
}
.gz-post__count { font-size: .7rem; color: #555; }

.gz-post__badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}
.gz-post__badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
  text-align: center;
}

.gz-post__body { padding: 16px 20px; }

.gz-post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
  color: #7777aa;
  margin-bottom: 12px;
}
.gz-post__num { color: #a78bfa; font-weight: 700; }
.gz-post__label { background: rgba(124,58,237,.15); color: #a78bfa; padding: 1px 8px; border-radius: 4px; font-weight: 700; }

.gz-post__content { font-size: .9rem; color: #b8b8d0; line-height: 1.7; }
.gz-post__content p { margin-bottom: .75rem; }
.gz-post__content blockquote {
  border-left: 3px solid #2a2a45;
  padding: 8px 14px;
  background: rgba(255,255,255,.03);
  border-radius: 0 6px 6px 0;
  color: #7777aa;
  margin: 10px 0;
  font-style: italic;
}

.gz-post__actions { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.04); display: flex; gap: 10px; }
.gz-reply-quote {
  font-size: .78rem;
  font-weight: 700;
  color: #7777aa;
  background: none;
  border: 1px solid #2a2a45;
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  transition: all .15s;
}
.gz-reply-quote:hover { border-color: #7c3aed; color: #a78bfa; }

.gz-reply-form {
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
.gz-reply-form__title { font-size: .95rem; font-weight: 800; color: #fff; margin-bottom: 12px; }

.gz-reply-form textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1.5px solid #2a2a45;
  border-radius: 8px;
  color: #e2e2f0;
  padding: 12px 14px;
  font-size: .9rem;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color .15s;
}
.gz-reply-form textarea:focus { border-color: #7c3aed; }
.gz-reply-form__actions { margin-top: 10px; display: flex; justify-content: flex-end; }

.gz-reply-login {
  text-align: center;
  padding: 24px;
  background: #16162a;
  border: 1px dashed #2a2a45;
  border-radius: 12px;
  margin-top: 16px;
  color: #7777aa;
  font-size: .9rem;
}

/* ============================================================
   PROFIL UTILISATEUR
   ============================================================ */
.gz-profile { }
.gz-profile__header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.gz-profile__avatar { width: 80px !important; height: 80px !important; border-radius: 50% !important; border: 3px solid #2a2a45 !important; }
.gz-profile__name { font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 8px; }
.gz-profile__level {
  display: inline-flex;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}
.gz-profile__stats { display: flex; gap: 16px; font-size: .82rem; color: #7777aa; }

.gz-profile__progress {
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.gz-profile__progress-label {
  font-size: .8rem;
  color: #7777aa;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gz-profile__progress-bar {
  height: 6px;
  background: rgba(255,255,255,.07);
  border-radius: 3px;
  overflow: hidden;
}
.gz-profile__progress-bar div { height: 100%; border-radius: 3px; transition: width .6s; }

.gz-profile__badges, .gz-profile__topics {
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}
.gz-profile__badges h3,
.gz-profile__topics h3 { font-size: .9rem; font-weight: 800; color: #fff; margin-bottom: 14px; }

.gz-profile__badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

.gz-badge-card {
  background: rgba(255,255,255,.03);
  border: 1px solid;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.gz-badge-card__dot { width: 10px; height: 10px; border-radius: 50%; margin: 0 auto 6px; }
.gz-badge-card__name { font-size: .82rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.gz-badge-card__desc { font-size: .72rem; color: #7777aa; }

.gz-profile__topic-link {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .85rem;
  color: #b8b8d0;
  text-decoration: none;
}
.gz-profile__topic-link:last-child { border-bottom: none; }
.gz-profile__topic-link span:last-child { color: #555; font-size: .78rem; flex-shrink: 0; margin-left: 10px; }
.gz-profile__topic-link:hover { color: #a78bfa; }

/* ============================================================
   LIVE SEARCH DROPDOWN
   ============================================================ */
.gz-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: -8px;
  right: -8px;
  background: #16162a;
  border: 1px solid #2a2a45;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  z-index: 1000;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
}

.gz-search-group { padding: 8px 0 4px; }

.gz-search-group-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #555;
  padding: 4px 14px 6px;
}

.gz-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .12s;
}
.gz-search-item:hover,
.gz-search-item.focused { background: rgba(124,58,237,.12); }

.gz-search-cover {
  width: 36px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a1a2e;
  border: 1px solid #2a2a45;
}
.gz-search-cover--empty { background: rgba(255,255,255,.04); }

.gz-search-item--article .gz-search-cover,
.gz-search-item--forum .gz-search-cover {
  height: 36px;
  border-radius: 6px;
}

.gz-search-item-body { flex: 1; min-width: 0; }
.gz-search-item-title { font-size: .88rem; font-weight: 700; color: #e2e2f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gz-search-item-title mark { background: rgba(124,58,237,.3); color: #a78bfa; border-radius: 2px; padding: 0 2px; }
.gz-search-item-meta { font-size: .72rem; color: #7777aa; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gz-search-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }

.gz-search-score {
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
}

.gz-search-label {
  font-size: .65rem;
  color: #555;
  font-weight: 600;
  white-space: nowrap;
}
.gz-search-item--local .gz-search-label { color: #22c55e; }
.gz-search-item--igdb .gz-search-label { color: #06b6d4; }

.gz-search-loading,
.gz-search-empty {
  padding: 16px;
  text-align: center;
  font-size: .85rem;
  color: #7777aa;
}

.gz-search-see-all {
  padding: 12px 14px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: #7c3aed;
  cursor: pointer;
  border-top: 1px solid #2a2a45;
  transition: background .12s;
}
.gz-search-see-all:hover { background: rgba(124,58,237,.08); }

/* ============================================================
   SIDEBAR — Refonte complète
   ============================================================ */

/* Widget générique */
.gz-widget {
  background: #13131f;
  border: 1px solid #1e1e32;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.gz-widget__title {
  padding: 11px 16px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #7777aa;
  border-bottom: 1px solid #1e1e32;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0,0,0,.15);
}

.gz-widget__title::before {
  content: '';
  display: block;
  width: 3px;
  height: 13px;
  background: linear-gradient(to bottom, #7c3aed, #06b6d4);
  border-radius: 2px;
  flex-shrink: 0;
}

.gz-widget__body { padding: 12px 14px; }

/* Widget: Recherche WP native */
.gz-widget .search-form,
.gz-widget .widget-wrap form {
  display: flex;
  gap: 6px;
}
.gz-widget .search-field,
.gz-widget input[type=search],
.gz-widget input[type=text] {
  flex: 1;
  background: rgba(255,255,255,.04) !important;
  border: 1.5px solid #2a2a45 !important;
  border-radius: 7px !important;
  color: #e2e2f0 !important;
  padding: 8px 12px !important;
  font-size: .85rem !important;
  outline: none !important;
}
.gz-widget .search-field:focus,
.gz-widget input[type=search]:focus { border-color: #7c3aed !important; }
.gz-widget .search-submit,
.gz-widget input[type=submit],
.gz-widget button[type=submit] {
  padding: 8px 14px !important;
  background: #7c3aed !important;
  color: #fff !important;
  border: none !important;
  border-radius: 7px !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}

/* Widget: liste de liens */
.gz-widget ul,
.gz-widget .widget ul { list-style: none !important; }
.gz-widget ul li a,
.gz-widget .widget ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: .85rem;
  color: #b8b8d0 !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: color .12s;
}
.gz-widget ul li:last-child a,
.gz-widget .widget ul li:last-child a { border-bottom: none; }
.gz-widget ul li a:hover,
.gz-widget .widget ul li a:hover { color: #a78bfa !important; }

.gz-widget ul li a .post-count,
.gz-widget .widget ul li a .count {
  font-size: .72rem;
  background: rgba(255,255,255,.06);
  color: #555;
  padding: 1px 7px;
  border-radius: 10px;
}

/* Widget: Tag cloud */
.gz-widget .tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.gz-widget .tagcloud a,
.gz-widget .tag-cloud-link {
  padding: 3px 10px !important;
  background: rgba(255,255,255,.05) !important;
  border: 1px solid #2a2a45 !important;
  border-radius: 20px !important;
  font-size: .78rem !important;
  color: #7777aa !important;
  text-decoration: none !important;
  transition: all .12s !important;
}
.gz-widget .tagcloud a:hover,
.gz-widget .tag-cloud-link:hover {
  border-color: #7c3aed !important;
  color: #a78bfa !important;
  background: rgba(124,58,237,.1) !important;
}

/* Widget: Recent Posts WP */
.gz-widget .widget_recent_entries ul li,
.gz-widget .recentcomments {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.gz-widget .widget_recent_entries ul li:last-child { border-bottom: none; }

/* Widget: Calendrier */
.gz-widget .calendar_wrap table {
  width: 100%;
  font-size: .8rem;
  color: #b8b8d0;
}
.gz-widget .calendar_wrap th { color: #7777aa; padding: 4px; text-align: center; font-weight: 700; }
.gz-widget .calendar_wrap td { text-align: center; padding: 4px; }
.gz-widget .calendar_wrap td a { color: #a78bfa; }

/* ============================================================
   LIVE SEARCH dans le header — agrandir le champ
   ============================================================ */
@media (min-width: 1024px) {
  .gz-header-search input { width: 220px; }
}

/* ============================================================
   AD BLOCKS
   ============================================================ */
.gz-ad-block {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin: 16px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .gz-game-tabs { padding: 0; }
  .gz-game-tab { padding: 11px 12px; font-size: .8rem; }
  .gz-post { grid-template-columns: 1fr; }
  .gz-post__user {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #2a2a45;
    padding: 10px 14px;
    text-align: left;
  }
  .gz-images-grid { grid-template-columns: repeat(2, 1fr); }
  .gz-videos-grid { grid-template-columns: 1fr; }
  .gz-topic-card { grid-template-columns: 1fr; }
  .gz-topic-card__stats { justify-content: flex-start; }
}

/* ============================================================
   FIXES — Corrections ciblées
   ============================================================ */

/* --- 1. Game tabs : layout correct --- */
.gz-game-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  background: #13131f !important;
  border-bottom: 1px solid #2a2a45 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  position: sticky !important;
  top: var(--gz-header-h) !important;
  z-index: 100 !important;
  width: 100% !important;
  margin: 0 !important;
  /* Ne pas appliquer max-width ou wrap interne */
}

/* Le gz-wrap à l'intérieur des onglets ne doit pas avoir de max-width */
.gz-game-tabs.gz-wrap {
  max-width: 100% !important;
  padding: 0 !important;
}

/* --- 2. Header sticky — z-index et scroll correct --- */
#gz-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  /* Éviter que la barre admin WP la décale */
}

/* Compensation pour la barre admin WP si admin */
.admin-bar #gz-header {
  top: 32px !important;
}

.admin-bar .gz-game-tabs {
  top: calc(var(--gz-header-h) + 32px) !important;
}

@media screen and (max-width: 782px) {
  .admin-bar #gz-header { top: 46px !important; }
  .admin-bar .gz-game-tabs { top: calc(var(--gz-header-h) + 46px) !important; }
}

/* --- 3. Sidebar widgets — reset complet du style WP natif --- */

/* Masquer les titres de section vides (genre "Articles récents" sans articles) */
.gz-widget .gz-widget__body:empty { display: none; }

/* Recent comments "Aucun commentaire" — le cacher */
.widget_recent_comments .recentcomments:empty { display: none; }
.widget_recent_comments li.recentcomments { color: #7777aa; font-size: .83rem; padding: 6px 0; }
.widget_recent_comments li.recentcomments a { color: #a78bfa; }

/* Recent posts */
.widget_recent_entries li { padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.widget_recent_entries li:last-child { border-bottom: none; }
.widget_recent_entries li a { color: #b8b8d0; font-size: .85rem; font-weight: 600; display: block; margin-bottom: 2px; }
.widget_recent_entries li a:hover { color: #a78bfa; }
.widget_recent_entries li .post-date { color: #555; font-size: .75rem; }

/* Categories */
.widget_categories li,
.widget_archive li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.widget_categories li:last-child,
.widget_archive li:last-child { border-bottom: none; }
.widget_categories li a,
.widget_archive li a { color: #b8b8d0; font-size: .85rem; display: flex; justify-content: space-between; }
.widget_categories li a:hover,
.widget_archive li a:hover { color: #a78bfa; }

/* Meta */
.widget_meta li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.widget_meta li a { color: #b8b8d0; font-size: .83rem; }
.widget_meta li a:hover { color: #a78bfa; }

/* --- 4. Forum : modal et formulaire --- */
/* Nonce passé via gzAuth.forumNonce */
#gz-forum-nonce { display: none; }

/* --- 5. Dropdown user accessible au clic --- */
.gz-header-user-dropdown {
  pointer-events: auto !important;
}

/* Flèche indicatrice sur le bouton user */
.gz-header-user-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #7777aa;
  margin-left: 2px;
  transition: transform .15s;
}

/* --- 6. Empêcher le body scroll quand modal ouverte --- */
body.gz-modal-open {
  overflow: hidden !important;
}

/* --- 7. Comments sur jeu — forcer affichage --- */
.gz-comments-section { display: block !important; }

/* --- 8. Profil page --- */
.gz-profile-page {
  max-width: 800px;
}


/* ============================================================
   FIX LAYOUT v2 — Corrections définitives
   ============================================================ */

/* --- Game tabs : pleine largeur sans déborder --- */
.gz-game-tabs {
  /* Reset tout conflit précédent */
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  white-space: nowrap !important;
  /* Sticky correct */
  position: sticky !important;
  top: var(--gz-header-h, 64px) !important;
  z-index: 100 !important;
  /* Style */
  background: #09090f !important;
  border-bottom: 1px solid #1e1e32 !important;
  padding: 0 20px !important;
  margin: 0 !important;
  gap: 0 !important;
  scrollbar-width: none !important;
}

/* Compenser la barre admin */
.admin-bar .gz-game-tabs {
  top: calc(var(--gz-header-h, 64px) + 32px) !important;
}
@media (max-width: 782px) {
  .admin-bar .gz-game-tabs { top: calc(var(--gz-header-h, 64px) + 46px) !important; }
}

/* --- Sidebar : forcer dans le grid --- */
.gz-layout {
  display: grid !important;
  grid-template-columns: 1fr 300px !important;
  gap: 28px !important;
  align-items: start !important;
}

@media (max-width: 1024px) {
  .gz-layout { grid-template-columns: 1fr !important; }
}

/* S'assurer que la sidebar est bien positionnée */
.gz-sidebar {
  position: relative !important;
  width: 100% !important;
}

/* --- Widgets WP natifs — style sans re-registration --- */
/* La sidebar utilise les classes gz-widget déjà définies */
/* Widgets sans titre : cacher le div vide */
.gz-widget .gz-widget__title:empty { display: none !important; }

/* Widget "Commentaires récents" vide */
.widget_recent_comments .gz-widget__body p:only-child,
.widget_recent_comments .gz-widget__body ul:empty { color: #555; font-size: .82rem; }

/* "Aucun commentaire à afficher" — rendre propre */
.widget_recent_comments li.recentcomments {
  color: #7777aa !important;
  font-size: .82rem !important;
  padding: 6px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
  list-style: none !important;
}

/* Articles récents */
.widget_recent_entries li {
  padding: 7px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
  list-style: none !important;
}
.widget_recent_entries li:last-child { border-bottom: none !important; }
.widget_recent_entries li a {
  color: #b8b8d0 !important;
  font-size: .85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: block !important;
  margin-bottom: 2px !important;
}
.widget_recent_entries li a:hover { color: #a78bfa !important; }
.widget_recent_entries li .post-date { color: #555 !important; font-size: .75rem !important; }

/* --- Dropdown utilisateur --- */
/* S'assurer que le dropdown est au dessus de tout */
#gz-user-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 9998 !important;
  min-width: 180px !important;
  background: #16162a !important;
  border: 1px solid #2a2a45 !important;
  border-radius: 12px !important;
  padding: 8px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.6) !important;
  /* Caché par défaut */
  display: none;
}

#gz-user-dropdown.open {
  display: block !important;
}

#gz-user-toggle {
  position: relative !important;
  z-index: 9997 !important;
}
