/* ═══════════════════════════════════════════
   Menu.css
   Styles spécifiques à la page d'accueil
   ═══════════════════════════════════════════ */

/* ── LAYOUT ── */
#app { padding-bottom: 40px; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
            radial-gradient(ellipse 80% 50% at 15% 10%, rgba(94, 50, 180, 0.3) 0%, transparent 55%),
            radial-gradient(ellipse 60% 40% at 85% 85%, rgba(224, 92, 42, 0.18) 0%, transparent 55%),
            radial-gradient(ellipse 50% 60% at 60% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── HEADER ── */
header {
    padding: 28px 20px 20px;
    text-align: center;
    position: relative;
}
.logo { font-size: 2.4rem; margin-bottom: 6px; }

/* ── Settings button ── */
.settings-btn {
    position: absolute;
    top: 20px; right: 16px;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.15s;
}
.settings-btn:active { transform: scale(0.9); background: var(--glass-hover); }
.app-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
}
.app-title span { color: var(--accent2); }
.app-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── INSTALL HINT ── */
.install-hint {
    margin: 10px 20px 0;
    animation: fadeIn 0.4s ease;
    display: flex;
    justify-content: center;
}
.install-hint.install-done {
    background: rgba(61, 220, 132, 0.08);
    border: 1px solid rgba(61, 220, 132, 0.2);
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 0.82rem;
    color: var(--green);
    justify-content: center;
}
/* Texte d'instructions (iOS) */
.install-hint span {
    background: rgba(61, 220, 132, 0.08);
    border: 1px solid rgba(61, 220, 132, 0.2);
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 0.75rem;
    color: var(--green);
    text-align: center;
    line-height: 1.5;
}
/* Bouton install PWA */
.install-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 14px;
    border: 1.5px solid rgba(61, 220, 132, 0.45);
    background: rgba(61, 220, 132, 0.1);
    color: var(--green);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    transition: all 0.18s;
}
.install-btn:active {
    transform: scale(0.95);
    background: rgba(61, 220, 132, 0.18);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── SEARCH ── */
.search-bar {
    margin: 16px 16px 16px;
    position: relative;
}
.search-bar input {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px 12px 42px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--muted); }
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--muted);
    pointer-events: none;
}

/* ── FILTERS ── */
.filters-wrap {
    padding: 0 16px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.filters-wrap::-webkit-scrollbar { display: none; }
.filters {
    display: flex;
    gap: 8px;
    width: max-content;
}
.filter-btn {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--glass-subtle);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.filter-btn:active { transform: scale(0.95); }
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* ── SECTION HEADER ── */
.section-header {
    padding: 0 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted);
}
.games-count {
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--glass-subtle);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ── GAMES GRID ── */
.games-grid {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    margin: 0 10px;
    padding: 12px;
    background: rgba(255,255,255,0.015);
}
/* ── GAME CARD ── */
.game-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}
.game-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--game-color, var(--accent));
    border-radius: 4px 0 0 4px;
}
.game-card:active { transform: scale(0.98); border-color: var(--game-color, var(--accent)); }
.game-card:hover  { border-color: rgba(245, 197, 66, 0.35); }

.game-card-inner { display: flex; align-items: center; gap: 14px; }
.game-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--game-bg, rgba(245, 197, 66, 0.12));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.game-info { flex: 1; min-width: 0; }
.game-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.game-desc {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-tags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }

.game-arrow {
    font-size: 1.2rem;
    color: var(--muted);
    margin-left: 8px;
    flex-shrink: 0;
    transition: color 0.18s, transform 0.18s;
}
.game-card:active .game-arrow {
    color: var(--game-color, var(--accent));
    transform: translateX(4px);
}

/* ── COMING SOON ── */
.game-card.soon { opacity: 0.5; cursor: default; }
.game-card.soon:active { transform: none; }
.soon-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .big-emoji { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 28px 20px 10px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}
footer span { color: var(--accent2); }

.reset-btn {
    display: block;
    margin: 14px auto 0;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}
.reset-btn:hover { opacity: 1; }
.reset-btn:active { transform: scale(0.96); }
.reset-btn.confirm {
    border-color: rgba(255, 85, 85, 0.4);
    background: rgba(255, 85, 85, 0.08);
    color: var(--red);
    opacity: 1;
}
.reset-btn.done {
    border-color: rgba(61, 220, 132, 0.4);
    background: rgba(61, 220, 132, 0.08);
    color: var(--green);
    opacity: 1;
}

/* ═══════════════════════════════════════════
   INFO BUTTON
   ═══════════════════════════════════════════ */
.info-btn {
    position: absolute;
    top: 20px; left: 16px;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.15s;
}
.info-btn:active { transform: scale(0.9); background: var(--glass-hover); }


/* ═══════════════════════════════════════════
   SHARED MODAL OVERLAY
   ═══════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}


/* ═══════════════════════════════════════════
   INFO MODAL
   ═══════════════════════════════════════════ */
.info-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 82vh;
    overflow-y: auto;
    padding: 0 0 32px;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .info-modal,
.modal-overlay.open .reset-modal {
    transform: translateY(0);
}

.info-modal-handle {
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 0;
}
.info-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
}
.info-modal-icon { font-size: 1.6rem; }
.info-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.info-sections { padding: 16px 20px 0; }

.info-block {
    margin-bottom: 20px;
    background: var(--glass-subtle);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
}
.info-block-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.83rem;
    color: var(--text-secondary, var(--muted));
    line-height: 1.5;
}
.info-item:last-child { margin-bottom: 0; }
.info-emoji { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.info-item strong { color: var(--text); font-weight: 600; }
.info-item em { color: var(--muted); font-style: italic; }

.info-modal-close {
    display: block;
    margin: 20px 20px 0;
    width: calc(100% - 40px);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.info-modal-close:active { transform: scale(0.97); background: var(--glass-hover); }


/* ═══════════════════════════════════════════
   RESET MODAL
   ═══════════════════════════════════════════ */
.reset-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 520px;
    padding: 0 0 32px;
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reset-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    padding: 20px 22px 2px;
}
.reset-modal-sub {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 0 22px 16px;
    border-bottom: 1px solid var(--border);
}

.reset-options {
    padding: 14px 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reset-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s;
    width: 100%;
}
.reset-option-btn:active { transform: scale(0.97); }
.reset-option-btn.confirming {
    border-color: rgba(255, 170, 0, 0.45);
    background: rgba(255, 170, 0, 0.08);
}
.reset-option-btn.danger {
    border-color: rgba(255, 85, 85, 0.3);
    background: rgba(255, 85, 85, 0.05);
}
.reset-option-btn.danger.confirming {
    border-color: rgba(255, 85, 85, 0.55);
    background: rgba(255, 85, 85, 0.12);
}
.reset-option-btn.done {
    border-color: rgba(61, 220, 132, 0.4);
    background: rgba(61, 220, 132, 0.08);
    pointer-events: none;
}

.ro-icon { font-size: 1.4rem; flex-shrink: 0; }
.ro-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.ro-sub {
    font-size: 0.74rem;
    color: var(--muted);
    line-height: 1.4;
}
.ro-sub em { font-style: italic; }

.reset-modal-cancel {
    display: block;
    margin: 14px 18px 0;
    width: calc(100% - 36px);
    padding: 13px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.reset-modal-cancel:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════
   SECTION OUTILS
   ═══════════════════════════════════════════ */
.tools-section {
    padding: 0 16px;
    margin-top: 8px;
}
.tools-frame {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--glass-subtle);
}
.tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    text-align: left;
    width: 100%;
}
.tool-card:active { transform: scale(0.98); border-color: var(--accent); }
.tool-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--glass);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.tool-info { flex: 1; min-width: 0; }
.tool-name { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.tool-desc { font-size: 0.73rem; color: var(--muted); margin-top: 2px; }
.tool-card .game-arrow {
    font-size: 1.1rem; color: var(--muted);
    flex-shrink: 0; transition: all 0.15s;
}
.tool-card:active .game-arrow { color: var(--accent); transform: translateX(3px); }

/* ═══════════════════════════════════════════
   PAGINATION JEUX
   ═══════════════════════════════════════════ */
.games-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
}
.pag-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    color: var(--text);
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}
.pag-btn:active { transform: scale(0.9); }
.pag-btn:disabled { opacity: 0.25; pointer-events: none; }
.pag-nums { display: flex; gap: 4px; }
.pag-num {
    min-width: 34px; height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s;
    padding: 0 4px;
}
.pag-num:active { transform: scale(0.9); }
.pag-num.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}