/* 🎉 Style festif Picolo */

/* ======= BASE ======= */
body {
    background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
    background-size: 400% 400%;
    animation: gradient-flow 12s ease infinite;
    color: #f9fafb;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

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

h1 {
    margin: 7.5rem 0 0 0;
    font-size: 3.5rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #f43f5e, #fbbf24, #22d3ee);
    -webkit-background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

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

h2 {
    margin: 1.5rem 0;
    font-size: 1.8rem;
    background: rgba(35, 40, 58, 0.9);
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 14px #0006;
    max-width: 80vw;
    animation: fade-in 0.6s ease;
}

@keyframes fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.phrase-box {
    margin: 5rem auto 0 auto;
    padding: 1.5rem 2rem;
    max-width: 80vw;
}

/* ======= BOUTONS ======= */
button, .btn {
    border: none;
    border-radius: 12px;
    padding: 1em 2em;
    font-size: 1.2em;
    cursor: pointer;
    margin: 1rem auto;
    display: inline-block;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #22d3ee, #3b82f6);
    box-shadow: 0 4px 12px rgba(59,130,246,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover, .btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(34,211,238,0.6);
}

#retour-menu {
    background: linear-gradient(135deg, #f43f5e, #f97316);
    box-shadow: 0 4px 12px rgba(244,63,94,0.5);
}

#retour-menu:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 6px 20px rgba(249,115,22,0.6);
}

.invite-link {
    text-align:center;
    margin-top:1em;
}

/* ======= EVENTS ======= */
.events-box {
    margin: 2rem auto;
    max-width: 80vw;
    text-align: left;
    animation: slide-in 0.8s ease;
}

@keyframes slide-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.events-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fbbf24;
    text-shadow: 0 0 6px #f59e0b;
}

.events-box table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(35, 40, 58, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px #0006;
}

.events-box th, .events-box td {
    border: 1px solid #475569;
    padding: 0.7em 1em;
}

.events-box th {
    background: #3b82f6;
    color: #fff;
    text-align: center;
}

.custom-phrases-row {
    margin-top: 1em;
    animation: fade-in 0.5s;
}

.info {
    /* concerne une phrase d'information */
    font-size: 0.9rem;
}

/* Highlight animé pour les prénoms et gorgées */
.prenom {
    color: #22d3ee;
    font-weight: bold;
    background: #0e7490;
    padding: 0.2em 0.6em;
    border-radius: 8px;
    animation: pulse 1s infinite;
}

.gorgees {
    color: #facc15;
    font-weight: bold;
    background: #92400e;
    padding: 0.2em 0.6em;
    border-radius: 8px;
    animation: wobble 1s;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px #22d3ee66; }
    50% { box-shadow: 0 0 16px #22d3eeaa; }
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(-5deg) scale(1.1); }
    30% { transform: rotate(5deg) scale(1.1); }
    45% { transform: rotate(-3deg) scale(1.05); }
    60% { transform: rotate(3deg) scale(1.05); }
    75% { transform: rotate(0deg) scale(1); }
}

/* Fin de partie */
.stats-box {
    margin: 2rem auto;
    padding: 1.5rem 2rem;
    max-width: 420px;
    background: rgba(35, 40, 58, 0.93);
    border-radius: 16px;
    box-shadow: 0 6px 18px #0006;
    border: 2px solid #fbbf24;
    text-align: left;
    animation: fade-in 0.7s ease;
}

.stats-box h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.4rem;
    text-shadow: 0 0 6px #f59e0b;
}

.stats-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stats-box li {
    font-size: 1.1em;
    margin: 0.5em 0;
    color: #f9fafb;
    background: #334155;
    padding: 0.5em 1em;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0003;
}

.total-gorgees {
    display: block;
    margin: 1.5em auto 0 auto;
    padding: 1em 2em;
    font-size: 1.3em;
    font-weight: bold;
    color: #facc15;
    background: linear-gradient(90deg, #92400e 60%, #fbbf24 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px #fbbf2466;
    text-align: center;
    letter-spacing: 1px;
    animation: pulse 1.5s infinite;
}

/* Bulle de report bug */
.report-bubble {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 100;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px #e53e3e33;
    padding: 0.7em 1.4em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1em;
    border: 1px solid #e53e3e;
    transition: box-shadow 0.2s;
}
.report-bubble button {
    background: none;
    border: none;
    color: #e53e3e;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5em;
}
.report-bubble button:disabled {
    color: #aaa;
    cursor: default;
}
.report-bubble i.fa-bug {
    margin-right: 4px;
}

.bug-prop {
    background: #fbbf24;
    color: #1e293b;
    border: none;
    border-radius: 8px;
    padding: 0.5em 1em;
    margin: 0 0.5em 0.5em 0;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.bug-prop:hover {
    background: #f43f5e;
    color: #fff;
}

/* ======= MENU DE DÉPART ======= */
#prenom-form {
    max-width: 420px;
    margin: 2em auto;
    background: rgba(35, 39, 47, 0.95);
    padding: 2em 1.5em;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border: 2px solid #3b82f6;
    animation: fade-in 0.8s ease;
}

label {
    display: block;
    margin: 0.6em 0 0.3em;
    font-weight: bold;
    color: #f9fafb;
}

input[type="text"], input[type="number"] {
    width: 90%;
    padding: 0.7em 1em;
    border-radius: 8px;
    border: none;
    font-size: 1em;
    margin-bottom: 0.8em;
    box-shadow: inset 0 2px 5px #0004;
}
.prenom-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.prenom-row button.remove-prenom {
    border: none;
    background: #e74c3c;
    color: #fff;
    cursor: pointer;
    margin : 0 0 0.7em 0.5em;
}

#add-prenom {
    background: linear-gradient(135deg, #10b981, #22c55e);
    color: #fff;
    border-radius: 8px;
    padding: 0.5em 1em;
    margin-bottom: 1em;
    transition: transform 0.2s;
}

#add-prenom:hover {
    transform: scale(1.05);
}

.remove-prenom {
    background: #ef4444;
    border: none;
    color: #fff;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    margin-left: 0.5em;
    cursor: pointer;
}

.gorgees-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1em;
}

.gorgees-row div {
    flex: 1;
    margin-right: 0.5em;
    max-width: 44%;
}

#prenom-form button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 1.1em;
    border-radius: 10px;
    padding: 0.8em;
    width: 100%;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    transition: transform 0.2s;
}

#prenom-form button[type="submit"]:hover {
    transform: scale(1.05);
}

.tours-row {
    margin: 1em 0;
    text-align: center;
}
.tours-row label {
    font-weight: bold;
    margin-right: 1em;
}
.tours-row input[type="number"] {
    width: 80px;
    padding: 0.4em;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 700px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.3rem; padding: 0.8rem 1.2rem; }
    button { font-size: 1em; padding: 0.8em 1.5em; }
    .events-box table { font-size: 0.9em; }
}

@media (max-width: 700px) {
    body {
        padding: 0 0.5em;
        font-size: 1em;
    }
    h1 {
        font-size: 3rem;
        margin-top: 2.5rem;
    }
    h2 {
        font-size: 1.5rem;
        padding: 0.7rem 0.7rem;
        max-width: 98vw;
    }
    .phrase-box, .stats-box, .events-box {
        padding: 1em 0.5em;
        max-width: 98vw;
        margin: 2em auto 0 auto;
    }
    #prenom-form {
        max-width: 98vw;
        padding: 1em 0.5em;
    }
    input[type="text"], input[type="number"], textarea {
        width: 90%;
        font-size: 1em;
        padding: 0.6em 0.8em;
    }
    .custom-phrases-row textarea {
        font-size: 1em;
        min-height: 90px;
        width: 90% !important;
    }
    button, .btn, #retour-menu, #add-prenom {
        font-size: 1em;
        padding: 0.7em 1em;
        margin: 0.7em auto;
        width: 100%;
        box-sizing: border-box;
    }
    .report-bubble {
        right: 8px;
        bottom: 8px;
        padding: 0.5em 0.7em;
        font-size: 0.95em;
        border-radius: 12px;
    }
    .bug-prop {
        padding: 0.5em 0.7em;
        font-size: 0.95em;
        margin: 0 0.3em 0.3em 0;
    }
    .prenom-row {
        flex-direction: column;
        align-items: stretch;
    }
    .prenom-row button.remove-prenom {
        margin: 0.5em 0 0 0;
        width: 100%;
    }
    .gorgees-row {
        flex-direction: column;
        gap: 0.5em;
    }
    .gorgees-row div {
        max-width: 100%;
        margin-right: 0;
    }
    .tours-row {
        text-align: left;
    }
    .invite-link {
        margin-bottom: 5em;
    }
}