/* ============================================================
   Mods Forge Page — mods.css
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */
.mods-hero {
    background: #1D1D1D;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(255,255,255,0.03) 31px, rgba(255,255,255,0.03) 32px),
        repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(255,255,255,0.03) 31px, rgba(255,255,255,0.03) 32px);
    padding: 60px 0 40px;
    border-bottom: 4px solid #5D9E31;
    box-shadow: 0 4px 0 #3D6B21, 0 8px 24px rgba(0,0,0,0.7);
}

.mods-hero-content {
    text-align: center;
}

.mods-hero-title {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: #fff;
    text-shadow: 3px 3px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000;
    margin-bottom: 14px;
}

.mods-hero-accent {
    color: #5D9E31;
}

.mods-hero-sub {
    color: #aaa;
    font-size: 1rem;
    margin-bottom: 28px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Filtres (ancien, non utilisé) ─────────────────────────── */
.mods-filter-btn {
    background: #2a2a2a;
    color: #aaa;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.18s;
}

.mods-filter-btn:hover {
    border-color: #5D9E31;
    color: #5D9E31;
}

.mods-filter-btn.active {
    background: #5D9E31;
    border-color: #3D6B21;
    color: #fff;
    font-weight: bold;
}

/* ── Lien nav mods ──────────────────────────────────────────── */
.mods-nav-link {
    background: linear-gradient(135deg, #3a7a10, #275208);
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 6px;
    border: 2px solid #5D9E31;
    box-shadow: 0 3px 0 rgba(0,0,0,0.4);
    transition: all 0.2s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.mods-nav-link:hover,
.mods-nav-link.active {
    background: linear-gradient(135deg, #5D9E31, #3a7a10);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0,0,0,0.4);
}

/* ── (remplacé par mods-layout) ─────────────────────────────── */

/* ── Carte de mod ───────────────────────────────────────────── */
.mod-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.mod-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px var(--card-shadow);
    border-color: #5D9E31;
}

.mod-card-banner {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-card-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.mod-card-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mod-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mod-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.mod-tag-tech    { background: #0d2b4e; color: #5ab4f0; border: 1px solid #1a5080; }
.mod-tag-magic   { background: #2a0050; color: #c080ff; border: 1px solid #6030a0; }
.mod-tag-nature  { background: #0d2e0d; color: #7ad95c; border: 1px solid #2d6b21; }
.mod-tag-adventure { background: #3e1a00; color: #ffaa55; border: 1px solid #8b4a00; }
.mod-tag-utility { background: #1a1a3e; color: #8888ff; border: 1px solid #3a3a8b; }
.mod-tag-forge   { background: #2e1a00; color: #ff8c42; border: 1px solid #7a3d00; }

.mod-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.mod-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
}

.mod-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.mod-card-version {
    font-size: 0.72rem;
    color: #888;
    background: rgba(0,0,0,0.12);
    padding: 2px 8px;
    border-radius: 4px;
}

.mod-card-count {
    font-size: 0.75rem;
    color: #5D9E31;
    font-weight: 600;
}

.mod-card-btn {
    margin-top: 6px;
    background: linear-gradient(135deg, #5D9E31, #3D6B21);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    width: 100%;
    box-shadow: 0 3px 0 rgba(0,0,0,0.35);
}

.mod-card-btn:hover {
    background: linear-gradient(135deg, #7ac840, #5D9E31);
    transform: translateY(-2px);
}

/* ── Aucun résultat ─────────────────────────────────────────── */
.mods-no-result {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.mods-no-result span {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
}

.mods-no-result p {
    font-size: 1.1rem;
}

/* ── Prochainement ──────────────────────────────────────────── */
.mods-coming-soon {
    text-align: center;
    padding: 80px 20px;
}

.mods-coming-icon {
    font-size: 5rem;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 16px rgba(93,158,49,0.3));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mods-coming-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    color: var(--text-primary);
    text-shadow: 2px 2px rgba(0,0,0,0.3);
    margin-bottom: 18px;
}

.mods-coming-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Overlay ────────────────────────────────────────────────── */
.mods-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 400;
    backdrop-filter: blur(3px);
}

.mods-overlay.active {
    display: block;
}

/* ── Modale recettes ────────────────────────────────────────── */
.mods-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: min(90vw, 760px);
    max-height: 82vh;
    background: #1e1e1e;
    border: 2px solid #5D9E31;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    z-index: 500;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.mods-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mods-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 26px 16px;
    border-bottom: 2px solid #2e2e2e;
    flex-shrink: 0;
}

.mods-modal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.75rem, 2.5vw, 1rem);
    color: #5D9E31;
    text-shadow: 1px 1px #000;
}

.mods-modal-sub {
    color: #888;
    font-size: 0.85rem;
    margin-top: 4px;
}

.mods-modal-close {
    background: #2a2a2a;
    border: 2px solid #444;
    color: #aaa;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.mods-modal-close:hover {
    background: #c0392b;
    border-color: #e74c3c;
    color: #fff;
}

.mods-modal-body {
    overflow-y: auto;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ── Recette individuelle (à compléter plus tard) ─────────── */
.mods-recipe {
    background: #252525;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px 20px;
}

.mods-recipe-name {
    font-weight: 700;
    color: #eee;
    margin-bottom: 8px;
}

.mods-recipe-coming-soon {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* ── Barre de recherche + bouton ────────────────────────────── */
.mods-search-bar {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #444;
    background: #2a2a2a;
    transition: border-color 0.2s;
}

.mods-search-bar:focus-within {
    border-color: #5D9E31;
}

.mods-search-input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    color: #eee;
    font-size: 1rem;
    border: none;
    outline: none;
}

.mods-search-input::placeholder {
    color: #666;
}

.mods-search-btn {
    background: #5D9E31;
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
}

.mods-search-btn:hover {
    background: #7ac840;
}

/* ── Layout principal (sidebar + contenu) ────────────────────── */
.mods-layout {
    background: var(--bg-primary);
    min-height: 70vh;
    padding: 36px 0 80px;
}

.mods-layout-inner {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.mods-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 80px;
}

.mods-filter-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
}

.mods-filter-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.mods-select {
    width: 100%;
    padding: 8px 12px;
    background: #222;
    color: #eee;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.mods-select:focus {
    border-color: #5D9E31;
}

.mods-cat-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mods-cat-btn {
    background: transparent;
    color: #bbb;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
}

.mods-cat-btn:hover {
    background: rgba(93,158,49,0.12);
    color: #7ac840;
}

.mods-cat-btn.active {
    background: rgba(93,158,49,0.18);
    border-color: #5D9E31;
    color: #7ac840;
    font-weight: 700;
}

/* ── Zone principale (droite) ────────────────────────────────── */
.mods-main {
    flex: 1;
    min-width: 0;
}

.mods-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.mods-count {
    font-size: 0.9rem;
    color: #aaa;
}

.mods-page-info {
    font-size: 0.85rem;
    color: #666;
}

/* ── États (chargement / erreur) ─────────────────────────────── */
.mods-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    color: #aaa;
    font-size: 1rem;
    text-align: center;
}

.mods-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #333;
    border-top-color: #5D9E31;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.mods-retry-btn {
    background: #5D9E31;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s;
    margin-top: 8px;
}

.mods-retry-btn:hover {
    background: #7ac840;
}

/* ── Grille style CurseForge ─────────────────────────────────── */
.mods-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* ── Carte mod (style CF) ────────────────────────────────────── */
.mod-card-cf {
    display: flex;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}

.mod-card-cf:hover {
    border-color: #5D9E31;
    box-shadow: 0 4px 18px rgba(93,158,49,0.18);
    transform: translateY(-2px);
}

.mod-card-cf-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-card-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mod-card-logo-fallback {
    font-size: 2.2rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mod-card-cf-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mod-card-cf-top {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.mod-card-cf-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-card-cf-author {
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
}

.mod-card-cf-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.mod-card-cf-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.mod-card-cf-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.mod-ver-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.tag-release { background: #0d2b4e; color: #60b4f0; border: 1px solid #1a5080; }
.tag-beta    { background: #2e1a00; color: #ff9944; border: 1px solid #7a4000; }
.tag-alpha   { background: #2e0000; color: #ff6060; border: 1px solid #7a0000; }
.tag-ver     { background: #1a1a1a; color: #aaa;    border: 1px solid #444; }

.mod-cat-chip {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(93,158,49,0.15);
    color: #7ac840;
    border: 1px solid rgba(93,158,49,0.3);
    white-space: nowrap;
}

.mod-card-cf-stats {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Pagination ──────────────────────────────────────────────── */
.mods-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.mods-page-btn {
    background: var(--bg-secondary);
    color: #eee;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}

.mods-page-btn:hover:not(:disabled) {
    border-color: #5D9E31;
    color: #5D9E31;
}

.mods-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.mods-page-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.mods-page-num {
    background: var(--bg-secondary);
    color: #ccc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mods-page-num:hover {
    border-color: #5D9E31;
    color: #7ac840;
}

.mods-page-num.active {
    background: #5D9E31;
    border-color: #3D6B21;
    color: #fff;
    font-weight: 700;
}

.mods-page-dots {
    color: #666;
    font-size: 0.9rem;
    padding: 0 4px;
    display: flex;
    align-items: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
    .mods-layout-inner {
        flex-direction: column;
    }

    .mods-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .mods-filter-block {
        flex: 1;
        min-width: 160px;
    }

    .mods-cat-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .mods-hero {
        padding: 40px 0 28px;
    }

    .mod-card-cf {
        flex-direction: row;
        gap: 12px;
    }

    .mod-card-cf-logo {
        width: 60px;
        height: 60px;
    }

    .mod-card-logo-fallback {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .mods-modal-header {
        padding: 16px 16px 12px;
    }

    .mods-modal-body {
        padding: 16px;
    }

    .mods-page-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ── Conseil JEI ─────────────────────────────────────────────── */
.mods-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, rgba(93,158,49,0.12), rgba(61,107,33,0.08));
  border: 1px solid rgba(93,158,49,0.35);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: #ccc;
  line-height: 1.5;
}

.mods-tip-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.mods-tip strong {
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

.mods-tip a {
  color: #7ac840;
  text-decoration: underline;
  font-weight: 600;
}

.mods-tip a:hover {
  color: #5D9E31;
}

.mods-tip-close {
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
  align-self: flex-start;
}

.mods-tip-close:hover {
  color: #aaa;
}

.mods-tip-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.mods-tip-arrow {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.mods-tip-arrow:hover {
  border-color: #5D9E31;
  color: #7ac840;
}

.mods-tip code {
  background: rgba(0,0,0,0.3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82rem;
  color: #aaa;
}

/* Animations slide conseils */
.mods-tip-icon,
.mods-tip-content {
  transition: opacity 0.2s, transform 0.2s;
}

.tip-slide-out-left  { opacity: 0; transform: translateX(-30px); }
.tip-slide-out-right { opacity: 0; transform: translateX( 30px); }
.tip-slide-in-right  { animation: tipSlideInRight 0.35s ease forwards; }
.tip-slide-in-left   { animation: tipSlideInLeft  0.35s ease forwards; }

@keyframes tipSlideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes tipSlideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Loader buttons (Forge / Fabric / Quilt / NeoForge) ─────── */
.mods-loader-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mods-loader-btn {
  background: transparent;
  color: #bbb;
  border: 1px solid #333;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.mods-loader-btn:hover {
  background: rgba(93,158,49,0.12);
  color: #7ac840;
  border-color: rgba(93,158,49,0.4);
}

.mods-loader-btn.active {
  background: rgba(93,158,49,0.18);
  border-color: #5D9E31;
  color: #7ac840;
  font-weight: 700;
}

/* ── Favoris toggle button ───────────────────────────────────── */
.mods-fav-toggle {
  width: 100%;
  background: transparent;
  color: #e8c840;
  border: 1px solid #5a4a00;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.mods-fav-toggle:hover {
  background: rgba(232,200,64,0.1);
  border-color: #e8c840;
}

/* ── Carte mod avec wrap (pour le bouton favori) ─────────────── */
.mod-card-cf-wrap {
  position: relative;
}

.mod-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid #444;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 2;
  filter: grayscale(1);
}

.mod-card-cf-wrap:hover .mod-fav-btn {
  opacity: 1;
}

.mod-fav-btn.active {
  opacity: 1;
  filter: none;
  background: rgba(232,200,64,0.15);
  border-color: #e8c840;
}

.mod-fav-btn:hover {
  transform: scale(1.15);
  filter: none;
}

