/* ═══════════════════════════════════════════
   ScorlyBoard — style.css
   Styles globaux partagés entre toutes les pages
   ═══════════════════════════════════════════ */

/* ── Thèmes centralisés ── */
@import url('./themes/dark/dark.css');
@import url('./themes/light/light.css');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ── TYPOGRAPHY ── */
.font-display {
    font-family: 'Playfair Display', serif;
}

/* ── LAYOUT ── */
#app {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
}

/* ── BOUTON RETOUR ── */
.btn-back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--glass-subtle);
    color: var(--text);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.btn-back:active { background: var(--glass-hover); }

/* ── INPUTS ── */
input[type="text"] {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}
input[type="text"]:focus { border-color: var(--accent); }
input[type="text"]::placeholder { color: var(--muted); }

/* ── MODAL BASE ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 36px;
    width: 100%;
    max-width: 480px;
    transform: translateY(60px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}
.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}
.modal-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 20px;
}

/* ── TAGS ── */
.tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tag-multi   { background: rgba(56, 189, 248, 0.15); color: var(--blue); }
.tag-coop    { background: rgba(61, 220, 132, 0.15); color: var(--green); }
.tag-solo    { background: rgba(245, 197, 66, 0.15); color: var(--accent); }
.tag-dominos { background: rgba(224, 92, 42, 0.15);  color: var(--accent2); }
.tag-cartes  { background: rgba(155, 89, 245, 0.15); color: var(--purple); }
.tag-des     { background: rgba(251, 113, 133, 0.15); color: #fb7185; }
.tag-plateau { background: rgba(163, 230, 53, 0.15); color: #a3e635; }

/* ── DIVIDER ── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 18px 0 0;
}

/* ── THEME TOGGLE ── */
.theme-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 150;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.theme-toggle:active { transform: scale(0.9); }

/* ── Sur les pages jeu, décaler le toggle au-dessus de la bottom-bar ── */
body:has(.bottom-bar) .theme-toggle {
    bottom: 90px;
}