/* ------------------------------
   RESET SIMPLE
--------------------------------*/
body, h1, h2, p, form, input, table, tr, td {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ------------------------------
   BODY
--------------------------------*/
body {
    background: #f4f6f9;
    padding: 40px;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ------------------------------
   TITRES
--------------------------------*/
h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #2c3e50;
}

h2 {
    margin-top: 40px;
    margin-bottom: 15px;
    color: #34495e;
    font-size: 24px;
}

/* ------------------------------
   FORMULAIRES
--------------------------------*/
form {
    background: white;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    width: 350px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    margin-bottom: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    transition: 0.2s;
    box-sizing:border-box;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #3498db;
    outline: none;
}

/* ------------------------------
   BOUTONS
--------------------------------*/
input[type="submit"] {
    background: #3498db;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
}

input[type="submit"]:hover {
    background: #2980b9;
}

/* ------------------------------
   TABLEAU
--------------------------------*/
table {
    width: 700px;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #ecf5ff;
}

/* ------------------------------
   MESSAGES
--------------------------------*/
p {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    width: 350px;
    text-align: center;
}

p[style*="green"] {
    background: #e8f9e8;
    border: 1px solid #a6e3a1;
}

p[style*="red"] {
    background: #fdeaea;
    border: 1px solid #f5b5b5;
}

p[style*="blue"] {
    background: #e8f1ff;
    border: 1px solid #b3ccff;
}

.trashBtn {
    margin-top: 15px;
    background: #e74c3c;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    opacity: 0.4;
    cursor: not-allowed;
    transition: 0.2s;
}

.trashBtn:hover {
    background: #c0392b;
}

/* Empêche la table de dépasser */
table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

/* Les cellules s’adaptent */
td, th {
    word-wrap: break-word;
    text-align: center;
}

/* Conteneur des formulaires et de la table */
form {
    background: white;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    width: 800px; /* AUGMENTÉ */
    max-width: 90%; /* Pour éviter de dépasser sur mobile */
}