/* 🍸 Style festif Oui ou Non ou Bois */

body {
    background: linear-gradient(135deg, #0f172a, #4a044e, #1e293b);
    background-size: 400% 400%;
    animation: gradient-flow 14s ease infinite;
    color: #f9fafb;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0 1rem 3rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 {
    margin: 6rem 0 0.5rem 0;
    font-size: 2.6rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #d946ef, #f43f5e, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #d946ef, 0 0 10px #d946ef; }
    to { text-shadow: 0 0 10px #22d3ee, 0 0 20px #f43f5e; }
}

.rules {
    max-width: 480px;
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.rules b { color: #fbbf24; }

.stats-bar {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-pill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    padding: 0.5em 1.2em;
    font-size: 0.95em;
    font-weight: 600;
}

.stat-pill span {
    color: #fbbf24;
}

/* ======= CARTE ======= */
.card-zone {
    perspective: 1200px;
    width: min(90vw, 480px);
    height: 260px;
    margin: 0.5rem 0 2rem 0;
}

.question-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: rgba(30, 27, 46, 0.9);
    border: 2px solid #d946ef;
    box-shadow: 0 10px 40px rgba(217, 70, 239, 0.35), inset 0 0 30px rgba(217, 70, 239, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.question-card.pop {
    animation: card-pop 0.45s ease;
}

@keyframes card-pop {
    0% { transform: scale(0.85) rotate(-2deg); opacity: 0.3; }
    60% { transform: scale(1.04) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

#questionText {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 640px) {
    #questionText { font-size: 1.2rem; }
    .card-zone { height: 220px; }
}

/* ======= BOUTONS REPONSE ======= */
.answers-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.answer-btn {
    border: none;
    border-radius: 16px;
    padding: 1em 1.8em;
    font-size: 1.15em;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    min-width: 120px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.answer-btn:hover { transform: translateY(-3px) scale(1.05); }
.answer-btn:active { transform: translateY(0) scale(0.97); }

.answer-btn.oui { background: linear-gradient(135deg, #22c55e, #15803d); }
.answer-btn.non { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.answer-btn.bois { background: linear-gradient(135deg, #f43f5e, #be123c); }

.next-btn {
    background: linear-gradient(135deg, #22d3ee, #0ea5e9);
    border: none;
    border-radius: 14px;
    padding: 0.9em 2.2em;
    font-size: 1.1em;
    font-weight: 700;
    color: #062a30;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(34, 211, 238, 0.4);
    transition: transform 0.2s;
}
.next-btn:hover { transform: scale(1.06); }

/* ======= SETTINGS ======= */
.settings-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 110;
    font-size: 1.5em;
    background: #fff;
    border-radius: 50%;
    border: none;
    padding: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    color: #1e293b;
}

#settingsModal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 15, 25, 0.85);
    z-index: 120;
    justify-content: center;
    align-items: center;
}

.settingsModal-content {
    background: #1e1b2e;
    border-radius: 18px;
    padding: 2rem;
    max-width: 90vw;
    width: 460px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 2px solid #d946ef;
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: #f9fafb;
    font-size: 1.3em;
    cursor: pointer;
}

.custom-form h2 {
    color: #fbbf24;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.custom-form textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: none;
    padding: 0.8em;
    font-size: 1em;
    min-height: 90px;
    margin-bottom: 0.8em;
}

.add-btn, .update-btn {
    border: none;
    border-radius: 10px;
    padding: 0.7em 1.4em;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #22c55e);
    margin: 0.3em;
}

.update-btn {
    background: linear-gradient(135deg, #d946ef, #a21caf);
}

.custom-list {
    text-align: left;
    margin: 1em 0;
    max-height: 180px;
    overflow-y: auto;
}

.custom-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.5em 0.8em;
    margin-bottom: 0.4em;
    font-size: 0.9em;
    gap: 0.5em;
}

.custom-list-item button {
    background: #ef4444;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 0.3em 0.6em;
    cursor: pointer;
    flex-shrink: 0;
}

/* Confettis */
#confetti-container {
    pointer-events: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 200;
}
