/* css/modals/modals.css */

/* ==========================================================
   MODAL GAME SETUP (Infobox)
   ========================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from { transform: translateY(20px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setup-group label {
    display: block;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* --- Champs Texte pour Pseudos --- */
.setup-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.setup-input:focus {
    outline: none;
    border-color: #38bdf8;
    background: rgba(0, 0, 0, 0.5);
}

/* --- Groupes de boutons (Toggle) --- */
.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn .btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: #fff;
}

.toggle-btn.active {
    background: #38bdf8;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.4);
}

/* --- Couleurs avec les Rois --- */
.color-group {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.color-btn {
    width: 75px;
    height: 75px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    padding: 10px;
}

.color-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.color-btn.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

/* L'icône SVG du roi s'adapte à la case */
.king-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.4));
}

/* --- Sliders --- */
.sliders-container {
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider-row {
    margin-bottom: 15px;
}

.slider-row:last-child {
    margin-bottom: 0;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.slider-labels .lbl {
    color: #94a3b8;
}

.slider-labels .val {
    color: #38bdf8;
    font-weight: bold;
    font-family: monospace;
}

.slider-row input[type="range"] {
    width: 100%;
    accent-color: #38bdf8;
    cursor: pointer;
}

/* --- Footer Centré --- */
.modal-footer.centered-footer {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-play {
    background: #38bdf8;
    color: #0f172a;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    transition: all 0.2s;
}

.btn-play:hover {
    background: #0284c7;
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}