* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.background-emojis {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.emoji {
    position: absolute;
    font-size: 100px;
    opacity: 0.1;
    transform: translateY(100vh);
}

/* Émojis rapides */
.emoji.fast {
    animation: floating-emoji 15s linear infinite;
}

.emoji.fast:nth-child(1) { left: 5%; animation-delay: 0s; }
.emoji.fast:nth-child(2) { left: 25%; animation-delay: -3s; }
.emoji.fast:nth-child(3) { left: 45%; animation-delay: -6s; }
.emoji.fast:nth-child(4) { left: 65%; animation-delay: -9s; }
.emoji.fast:nth-child(5) { left: 85%; animation-delay: -12s; }

/* Émojis moyens */
.emoji.medium {
    animation: floating-emoji 25s linear infinite;
    font-size: 80px;
}

.emoji.medium:nth-child(6) { left: 15%; animation-delay: -5s; }
.emoji.medium:nth-child(7) { left: 35%; animation-delay: -10s; }
.emoji.medium:nth-child(8) { left: 55%; animation-delay: -15s; }
.emoji.medium:nth-child(9) { left: 75%; animation-delay: -20s; }
.emoji.medium:nth-child(10) { left: 95%; animation-delay: -25s; }

/* Émojis lents */
.emoji.slow {
    animation: floating-emoji 35s linear infinite;
    font-size: 120px;
    opacity: 0.05;
}

.emoji.slow:nth-child(11) { left: 10%; animation-delay: -7s; }
.emoji.slow:nth-child(12) { left: 30%; animation-delay: -14s; }
.emoji.slow:nth-child(13) { left: 50%; animation-delay: -21s; }
.emoji.slow:nth-child(14) { left: 70%; animation-delay: -28s; }
.emoji.slow:nth-child(15) { left: 90%; animation-delay: -35s; }

@keyframes floating-emoji {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-120vh) rotate(360deg);
    }
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 1;
}

h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

h2 {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin: 1rem 0;
}

.option-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 1.5rem 1rem;
    width: 100%;
    min-width: 180px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.option:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.aligot-img, .bebe-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 5px;
    transition: transform 0.3s ease;
    margin: 10px 0;
}

.option:hover .aligot-img,
.option:hover .bebe-img {
    transform: scale(1.1);
}

.info-bulle {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(52, 73, 94, 0.95);
    color: white;
    padding: 15px;
    border-radius: 8px;
    width: 90%;
    height: 90%;
    font-size: 0.9rem;
    z-index: 10;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    text-align: center;
    backdrop-filter: blur(2px);
}

.info-bulle::before {
    display: none;
}

.info-icon {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #34495e;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 11;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.info-icon:hover {
    background-color: #2c3e50;
    transform: scale(1.1);
}

.info-icon:hover + .info-bulle,
.info-icon:focus + .info-bulle {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .page-wrapper {
        min-height: unset;
        padding: 2rem 1rem;
        align-items: flex-start;
    }

    .container {
        margin: 0 auto;
        max-height: none;
        width: 95%;
    }

    .background-emojis {
        position: fixed;
        pointer-events: none;
    }

    .options {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-height: none;
        overflow-y: auto;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .option {
        min-width: unset;
        padding: 1rem;
    }

    .aligot-img, .bebe-img {
        width: 100px;
        height: 100px;
    }

    .info-bulle {
        font-size: 0.8rem;
        padding: 10px;
    }

    .description-accueil {
        font-size: 1rem;
        margin: 1rem 0;
    }

    .btn-commencer {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }

    /* Ajustement des émojis pour mobile */
    .emoji {
        font-size: 60px;
    }

    .emoji.medium {
        font-size: 50px;
    }

    .emoji.slow {
        font-size: 70px;
    }

    /* Amélioration du touch sur mobile */
    .info-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    /* Support du touch pour les infobulles sur mobile */
    .info-icon:active + .info-bulle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ajustement de l'input pour mobile */
    input[type="number"] {
        font-size: 16px;
        padding: 0.8rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Media queries pour les très petits écrans */
@media (max-width: 320px) {
    .container {
        padding: 0.8rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 0.9rem;
    }

    .aligot-img, .bebe-img {
        width: 80px;
        height: 80px;
    }

    .info-bulle {
        width: 95%;
        height: 95%;
    }
}

/* Ajustements pour éviter les problèmes de scroll sur mobile */
@media (max-height: 600px) {
    .container {
        margin: 0.5rem 0;
    }

    .aligot-img, .bebe-img {
        width: 80px;
        height: 80px;
        margin: 5px 0;
    }

    .options {
        gap: 0.5rem;
    }
}

.input-group {
    margin: 1.5rem 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
}

input {
    padding: 0.5rem;
    width: 200px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
}

.aide {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    font-style: italic;
}

button {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3498db;
}

.btn-retour {
    margin-top: 2rem;
    background-color: #95a5a6;
}

.btn-retour:hover {
    background-color: #7f8c8d;
}

.resultat {
    margin-top: 2rem;
    padding: 1rem;
    border-top: 2px solid #ecf0f1;
}

#poids {
    display: block;
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Styles pour l'écran d'accueil */
.accueil-content {
    text-align: center;
    padding: 2rem;
}

.accueil-image {
    margin: 2rem 0;
}

.aligot-accueil {
    width: 200px;
    height: 200px;
    object-fit: contain;
    animation: float 3s ease-in-out infinite;
}

.description-accueil {
    font-size: 1.2rem;
    color: #34495e;
    line-height: 1.6;
    margin: 2rem 0;
}

.btn-commencer {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: auto;
    min-width: 200px;
}

.btn-commencer:hover {
    background-color: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}
