/* ---------- GENERAL ---------- */
body {
    font-family: Poppins, sans-serif !important;
    background-color: #FFF8F0;
    color: #333 !important;
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #34495e;
}

/* ---------- PAGE CONNEXION ---------- */
.connexion-body {
    background: linear-gradient(135deg, #FF4C4C, #4CAF91);
}

.connexion-logo img {
    width: 100px;
}

.connexion-formulaire {
    width: 300px;
    padding: 20px 0 40px 0;
    background-color: #fff;
    border-radius: 20px;
    text-align: center;
    margin: 0 auto;
}

.connexion-champs h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 12px 0;
}

.connexion-champs input {
    width: 80%;
    padding: 8px;
    border: 1px solid #e1d4d4;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 300;
}

.connexion-champs button {
    width: 80%;
    margin-top: 15px;
    padding: 10px 10px;
    color: #fff;
    font-weight: 500;
    background-color: #ff4c4c;
    border: 0;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.connexion-champs button:hover {
    background-color: #b32424;
}

.connexion-erreur {
    color: red;
    margin: 10px 0;
    font-size: 12px;
}

/* ---------- FOOTER ---------- */
footer {
    color: #fff;
    font-weight: 300;
    font-size: 12px;
    padding: 10px 0;
    text-align: center;
}

footer p {
    padding: 0;
    margin: 0;
}

/* ---------- FORMULAIRE ---------- */
form input[type="radio"] {
    margin-right: 8px;
}

form button, form input[type="submit"] {
    margin-top: 20px;
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

form button:hover, form input[type="submit"]:hover {
    background: #2ecc71;
}

/* ---------- MESSAGES ---------- */
.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 15px auto;
    width: fit-content;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: opacity 1s ease-out;
}

.success {
    background: #e8f8f1;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* ---------- TABLEAU ---------- */
.dataTables_paginate .paginate_button {
    margin: 0 3px;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
}

.dataTables_paginate .paginate_button.current {
    background-color: #007bff;
    color: white !important;
    border-color: #007bff;
}

/* ---------- STATISTIQUES ---------- */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    justify-items: center;
}

.chart-item {
    background: #fff;
    padding: 30px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;      /* centre horizontalement */
    justify-content: center;  /* centre verticalement */
    max-width: 600px;
    width: 100%;
    height: 300px;
    box-sizing: border-box;
    overflow: hidden;         /* empêche le débordement */
}

.chart-item canvas {
    flex-grow: 1;             
    width: 100% !important;
    max-height: calc(100% - 20px) !important; /* laisse 10px en haut et en bas */
    margin: 10px 0;
}

.chart-item h3 {
    margin-bottom: 10px;
    font-size: 16px;
    text-align: center;
}
