:root {
    --bg: #0e0e0e;
    --text: #f5f5f5;
    --accent: #b6465f;
    --font-title: "Playfair Display", serif;
    --font-body: "Open Sans", sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    padding: 2rem;
}
header {
    text-align: center;
    margin-bottom: 3rem;
}
h1 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}
p.subtitle {
    color: #ccc;
    font-size: 1.2rem;
}
.formulaire {
    max-width: 600px;
    margin: 0 auto 4rem;
}
#fantasmesContainer {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    justify-content: center;
}
.fantasme {
    background: #1b1b1b;
    border-left: 4px solid var(--accent);
    padding: 1rem;
    font-style: italic;
    border-radius: 8px;
    max-width: 650px;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
footer {
    text-align: center;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: #777;
}

#randomBtn {
    margin-bottom: 32px;
}

.random-display {
    margin-top: 20px;
    padding: 15px;
    /* background: #fff9f9; */
    border-radius: 8px;
    font-style: italic;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn {
    display: inline-block;
    margin: 2rem auto 1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #a13b50;
}

.hidden {
    display: none;
}

/* style du formulaire */

.textarea {
    display: flex;
    flex-direction: column;
}

.reaction-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.reaction-buttons button {
    background: #b6465f; /* un rouge chaleureux, sexy */
    border: none;
    border-radius: 30px;
    padding: 6px 14px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(182, 70, 95, 0.5);
    display: flex;
    align-items: center;
    transition:
        background-color 0.3s ease,
        transform 0.15s ease;
    user-select: none;
}

.reaction-buttons button:hover:not(:disabled) {
    background: #e05a76;
    transform: scale(1.1);
}

.reaction-buttons button:disabled {
    background: #7a3843;
    cursor: default;
    box-shadow: none;
}

.reaction-buttons .count {
    margin-left: 6px;
    font-weight: 600;
    font-size: 16px;
    color: #ffe4e9;
    min-width: 22px;
    text-align: center;
}
/* 
.fantasme {
    margin-bottom: 20px;
  } */

.fantasme-random {
    padding: 15px;
    border-radius: 8px;
}

.fantasmeTexte {
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
}

@media only screen and (max-width: 320px) {
    .fantasme {
        padding: 10px;
        font-size: 14px;
        margin: 8px 0;
        /* Ajuste la largeur si besoin */
        width: 100%;
        box-sizing: border-box;
        /* Exemple : réduire un peu la hauteur ou l’ombre */
        /* height: auto; */
        /* box-shadow: none; */
        .reaction-buttons{
            button{
                font-size: 12px;
            }
        }
    }

    .genre{
        display: flex;
        font-size: 14px;
        select{
            font-size: 12px;
        }
        justify-content: center;
        align-items: center;
    }
}
