/* ================================================
   Plaisir Coupable – Karaoké Live : kl-style.css
   ================================================ */

/* ── Racine ── */
#kl-app {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    color: #222;
}

/* ── En-tête ── */
#kl-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    color: #fff;
    border-radius: 14px;
    padding: 24px 28px 20px;
    margin-bottom: 22px;
    text-align: center;
}
#kl-header h2 {
    margin: 0 0 14px;
    font-size: 1.8em;
    letter-spacing: .02em;
    color: #fff !important;
    border: none !important;
}

/* Barre de progression */
#kl-counter-text { font-size: 1em; opacity: .85; margin-bottom: 8px; display: block; }
#kl-progress-wrap {
    background: rgba(255,255,255,.15);
    border-radius: 20px;
    height: 10px;
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto;
}
#kl-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    border-radius: 20px;
    width: 0%;
    transition: width .4s ease;
}

/* Message complet */
#kl-closed-msg {
    background: #c0392b;
    border-radius: 8px;
    padding: 10px 20px;
    margin-top: 14px;
    font-weight: bold;
    font-size: 1.05em;
}

/* ── Barre de filtres ── */
#kl-filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
#kl-search {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-size: .97em;
    outline: none;
    transition: border-color .2s;
}
#kl-search:focus { border-color: #0f3460; }
#kl-filter-dispo { accent-color: #0f3460; margin-right: 5px; }

/* ── Grille ── */
#kl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
}

/* ── Carte chanson ── */
.kl-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    position: relative;
    user-select: none;
}
.kl-card:hover:not(.kl-taken):not(.kl-locked) {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    border-color: #0f3460;
}
.kl-card .kl-artiste {
    font-size: .78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #888;
    margin-bottom: 4px;
}
.kl-card .kl-titre {
    font-size: 1em;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}
.kl-card .kl-badge-duo {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: .7em;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 8px;
    margin-top: 6px;
    letter-spacing: .04em;
}
.kl-card .kl-num {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: .72em;
    color: #bbb;
    font-weight: 600;
}

/* Prise */
.kl-card.kl-taken {
    background: #f8f8f8;
    border-color: #ddd;
    cursor: default;
    opacity: .7;
}
.kl-card.kl-taken .kl-titre,
.kl-card.kl-taken .kl-artiste { color: #aaa; }
.kl-card .kl-taken-by {
    display: none;
    font-size: .78em;
    color: #27ae60;
    margin-top: 6px;
    font-weight: 600;
}
.kl-card.kl-taken .kl-taken-by { display: block; }
.kl-card .kl-check {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.1em;
    display: none;
}
.kl-card.kl-taken .kl-check { display: block; }
.kl-card.kl-taken .kl-num   { display: none; }

/* Bloquée (limite atteinte, non prise) */
.kl-card.kl-locked {
    opacity: .45;
    cursor: not-allowed;
}

/* ── Modal ── */
#kl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    backdrop-filter: blur(2px);
}
#kl-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9001;
    width: 94%;
    max-width: 440px;
}
#kl-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 28px 28px 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,.25);
    position: relative;
}
#kl-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
#kl-modal-song {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
#kl-modal-song .ms-artiste {
    font-size: .78em;
    text-transform: uppercase;
    letter-spacing: .07em;
    opacity: .75;
    margin-bottom: 4px;
}
#kl-modal-song .ms-titre {
    font-size: 1.15em;
    font-weight: 700;
}
#kl-modal-song .ms-duo {
    display: inline-block;
    background: #e67e22;
    color: #fff;
    font-size: .7em;
    border-radius: 20px;
    padding: 2px 8px;
    margin-top: 6px;
}

.kl-person-block { margin-bottom: 16px; }
.kl-person-block h4 { margin: 0 0 8px; font-size: .9em; color: #555; }
.kl-person-block input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: .97em;
    margin-bottom: 8px;
    outline: none;
    transition: border-color .2s;
}
.kl-person-block input:focus { border-color: #0f3460; }

#kl-modal-msg {
    text-align: center;
    font-size: .9em;
    min-height: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}
#kl-modal-msg.ok  { color: #27ae60; }
#kl-modal-msg.err { color: #c0392b; }

#kl-btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: opacity .2s;
}
#kl-btn-submit:hover { opacity: .88; }
#kl-btn-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 480px) {
    #kl-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    #kl-modal-box { padding: 22px 18px 18px; }
}
@media (max-width: 320px) {
    #kl-grid { grid-template-columns: 1fr; }
}
