/* Reset et configuration de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

/* Container principal */
.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

/* Section instructions */
.instructions {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    margin-bottom: 25px;
}

.instructions h2 {
    color: #1976D2;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.instructions p {
    color: #555;
    margin-bottom: 8px;
}

.instructions strong {
    color: #1976D2;
    font-weight: 600;
}

.instructions em {
    color: #666;
    font-style: italic;
}

/* Boîte de message */
.message-box {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.5s ease-out;
}

.message-box.hidden {
    display: none;
}

.message-box.success {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
}

.message-box.error {
    background: linear-gradient(135deg, #f44336, #e57373);
    color: white;
}

.message-box.cold {
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    color: white;
}

.message-box.hot {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
}

/* Section de saisie */
.input-section {
    margin-bottom: 25px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="number"] {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="number"]:focus {
    outline: none;
    border-color: #4CAF50;
}

input[type="number"]:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

button {
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #45a049;
}

button:active {
    transform: scale(0.98);
}

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

.counter {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Tableau des résultats */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

thead {
    background-color: #f8f9fa;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #555;
}

tbody tr {
    animation: fadeIn 0.5s ease-out;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .input-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
