/* Style global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Corps principal */
body {
    background: linear-gradient(135deg, #ff7e5f, #feb47b, #ffcc70); /* Dégradé de trois couleurs */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    font-size: 16px;
    padding: 20px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
}

/* Conteneur principal */
.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 20px;  /* Réduit un peu la marge intérieure */
    width: 100%;
    max-width: 450px;
    max-height: 80vh; /* Limite la hauteur à 80% de la hauteur de la fenêtre */
    overflow-y: auto; /* Ajoute un défilement vertical si le contenu dépasse */
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-wrap: wrap; /* Permet aux boutons de se répartir sur plusieurs lignes si nécessaire */
    justify-content: center; /* Centre les boutons horizontalement */
    align-items: center;
}
/* Animation du conteneur */
.container:hover {
    transform: scale(1.02);
}

.container button {
    background-color: #ff7e5f; 
    color: white;
    padding: 10px 20px; /* Réduit la taille des boutons */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem; /* Taille réduite */
    margin: 10px; /* Espace entre les boutons */
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: auto; /* Laisse la taille des boutons s'ajuster automatiquement */
}


/* Question */
.question {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 25px 0;
    font-weight: bold;
}

/* Input */
input[type="text"] {
    padding: 12px;
    width: 80%;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin: 15px 0;
    font-size: 1.1rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus {
    border-color: #ff7e5f;
    outline: none;
}

/* Boutons */
button {
    background-color: #ff7e5f; /* couleur principale */
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 12px 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 90%;
}

button:hover {
    background-color: #feb47b;
    transform: scale(1.05);
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Message réponse */
.reponse {
    font-size: 1.2rem;
    color: #27ae60;
    font-weight: bold;
    margin: 20px 0;
}

/* Récapitulatif des commandes */
#recap {
    margin-top: 25px;
    font-size: 1.1rem;
    color: #34495e;
    line-height: 1.6;
}

/* Animation de transition pour les boutons */
button#confirm, button#annul, button#nvlcom {
    display: inline-block;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Mise en forme pour les tailles des boutons */
button#confirm, button#annul {
    background-color: #2ecc71;
}

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

.deleteOrder {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.deleteOrder:hover {
    background-color: #c0392b;
}

/* Style pour les messages d'erreur et confirmation */
.reponse.error {
    color: #e74c3c;
}

.reponse.success {
    color: #2ecc71;
}

.reponse.info {
    color: #3498db;
}

/* Responsive design pour les petits écrans */
@media (max-width: 600px) {
    .container {
        width: 90%;
        padding: 25px;
    }

    h1 {
        font-size: 1.5rem;
    }

    input[type="text"] {
        width: 100%;
    }

    button {
        width: 100%;
        font-size: 1.1rem;
        padding: 14px;
    }
}
