/* MGF.AI public — responsive.css */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-only { display: none !important; }

@media (max-width: 1100px) {
    .footer-inner,
    .footer-inner.footer-inner--app {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.8rem 1rem; }
    .mobile-menu-toggle { display: block; }
    
    .nav-links {
        display: none; /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10,11,15,0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    .nav-links.show {
        display: flex;
    }
    /* Masquer uniquement les boutons Connexion / CTA (les liens mobile-only du menu restent) */
    .nav-actions .btn {
        display: none !important;
    }
    .nav-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 0.35rem;
    }
    .nav-tokens {
        font-size: 0.78rem;
        padding: 0.28rem 0.55rem;
    }
    .nav-tier-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    .nav-user-trigger {
        width: 36px;
        height: 36px;
    }
    .mobile-only { display: block !important; }
    .mobile-only-flex { display: flex !important; }

    .site-footer { padding-top: 2.5rem; padding-bottom: 2rem; }
    .footer-inner,
    .footer-inner.footer-inner--app {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-brand { align-items: center; }
    .footer-tagline { max-width: none; }
    .footer-age-badge { margin: 0 auto; }
    .footer-col-title { margin-bottom: 0.75rem; }
    .footer-nav { align-items: center; }
    .footer-discord { margin: 0 auto; }
    .footer-lang { justify-content: center; margin-top: 1rem; }
}

/* Première visite — confirmation 18+ (home / fiches SFW sans redirect SEO) */
html.mgf-age-noscroll body { overflow: hidden; }
.mgf-age-gate-overlay {
    display: none; position: fixed; inset: 0; z-index: 99999;
    background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center; justify-content: center; padding: 1.25rem;
}
.mgf-age-gate-overlay.mgf-age-gate-open { display: flex; }
.mgf-age-gate-card {
    width: 100%; max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.15rem;
    box-shadow: var(--shadow-glass);
}
.mgf-age-gate-card h2 {
    font-size: 1.2rem; font-weight: 900; margin: 0 0 0.75rem;
    letter-spacing: -0.02em; color: #fff;
}
.mgf-age-gate-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 1rem; }
.mgf-age-gate-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: flex-end; margin-top: 0.25rem; }
.mgf-age-gate-foot { margin-top: 1rem; font-size: 0.78rem; color: var(--text-faint); text-align: center; }
.mgf-age-gate-foot a { color: var(--sweet-primary); font-weight: 600; text-decoration: none; }

/* Paywall / confirm modal */
.mgf-modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(12px);
    align-items: center; justify-content: center; padding: 1.25rem;
}
.mgf-modal-overlay.open { display: flex; }
.mgf-modal {
    position: relative;
    width: 100%; max-width: 420px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-glass);
}
.mgf-modal__dismiss {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: var(--radius-md, 10px);
    background: transparent;
    color: var(--text-muted);
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.mgf-modal__dismiss:hover,
.mgf-modal__dismiss:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.mgf-modal-overlay.open .mgf-modal__dismiss { display: inline-flex; }
.mgf-modal-snooze-hint {
    margin-top: 0.85rem !important;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}
.mgf-modal-actions--snooze #mgf-modal-later {
    font-weight: 700;
}
.mgf-modal h3 { font-size: 1.15rem; margin-bottom: 0.6rem; font-weight: 800; padding-right: 2.75rem; }
.mgf-modal-body {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}
.mgf-modal-body p { margin: 0 0 0.75rem 0; }
.mgf-modal-body p:last-child { margin-bottom: 0; }
.mgf-modal-body strong { color: var(--text); font-weight: 700; }
.mgf-modal-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; }
.mgf-modal-actions .btn { min-height: 44px; }
@media (max-width: 640px) {
    .mgf-modal-overlay { align-items: flex-end; padding: 0; }
    .mgf-modal {
        max-width: none;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        padding: 1.35rem 1.25rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
    }
    .mgf-modal__dismiss {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.75rem;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 999px;
    }
    .mgf-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .mgf-modal-actions .btn { width: 100%; justify-content: center; }
    .mgf-modal-actions--snooze #mgf-modal-later {
        order: 0;
        min-height: 48px;
        border: 1px solid var(--border-light);
        background: rgba(255, 255, 255, 0.06);
        font-weight: 700;
    }
    .mgf-modal-actions--snooze #mgf-modal-subscribe { order: 1; }
    .mgf-modal--snooze .mgf-modal__dismiss {
        width: 3rem;
        height: 3rem;
        font-size: 1.85rem;
    }
    .mgf-modal-actions:not(.mgf-modal-actions--snooze) .btn-ghost { order: 1; }
}

/* Persona avatar (initiale si portrait absent) */
.persona-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(145deg, #2e3038 0%, #1a1c22 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}
.persona-avatar--xs { width: 32px; height: 32px; font-size: 0.78rem; }
.persona-avatar--sm { width: 40px; height: 40px; font-size: 0.88rem; }
.persona-avatar--md { width: 42px; height: 42px; font-size: 0.92rem; }
.persona-avatar--lg { width: 56px; height: 56px; font-size: 1.1rem; }
.persona-avatar--xl { width: 100px; height: 100px; font-size: 2rem; }
.persona-avatar.conv-avatar,
.persona-avatar.chat-char-avatar { width: 42px; height: 42px; font-size: 0.95rem; }
.persona-avatar.chat-char-avatar { width: 40px; height: 40px; }
.persona-avatar.char-profile-avatar { width: 100px; height: 100px; font-size: 2.2rem; }
.persona-avatar.msg-avatar,
.persona-avatar.persona-avatar--msg { width: 100%; height: 100%; font-size: 1.25rem; }
.msg-avatar-wrap .persona-avatar { width: 56px; height: 56px; }
.persona-avatar__ph {
    position: relative;
    z-index: 1;
    pointer-events: none;
}
.persona-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 2;
}
.persona-avatar--pending {
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25);
    animation: personaAvatarPulse 2.2s ease-in-out infinite;
}
@keyframes personaAvatarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}
.persona-avatar--square {
    border-radius: var(--radius-md, 12px);
}
.persona-avatar--square .persona-avatar__img { border-radius: var(--radius-md, 12px); }
.persona-avatar--fill {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
}
.persona-avatar--fill .persona-avatar__img { border-radius: 0; }

.mgf-ai-disclosure {
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--text-muted);
    opacity: 0.92;
    margin-top: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mgf-ai-disclosure--inline {
    display: inline-block;
    margin-top: 0;
    max-width: 100%;
    text-align: center;
}
.mgf-ai-disclosure--subtle {
    font-size: 0.68rem;
    opacity: 0.85;
    margin-top: 0.75rem;
    padding: 0.25rem 0.4rem;
}
