@charset "utf-8";

body {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 20px;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 17px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

h1 {
    text-align: center;
    color: #005a8d;
    margin-bottom: 10px;
}

h2 {
    color: #005a8d;
    margin-top: 30px;
}

.subtitle {
    text-align: center;
    margin-bottom: 25px;
    color: #444;
}


.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lang-switch button,
.theme-switch button {
    margin-left: 5px;
    padding: 8px 14px;
    background: #e0e0e0;
    color: #333;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.lang-switch button:hover,
.theme-switch button:hover {
    background: #ccc;
}


.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

button {
    margin-top: 10px;
    padding: 12px 20px;
    background: #005a8d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #0073b8;
}

.btn-main {
    min-width: 180px;
}


.result {
    margin-top: 25px;
    padding: 20px;
    background: #eef5ff;
    border-left: 5px solid #005a8d;
    border-radius: 8px;
}


.chart-area {
    margin-top: 30px;
    width: 100%;
}


.export-buttons {
    text-align: center;
    margin-top: 20px;
}

.export-buttons button {
    margin: 10px;
}


.history-box {
    margin-top: 40px;
    padding: 20px;
    background: #f4f4f4;
    border-left: 5px solid #777;
    border-radius: 8px;
}

#historiqueTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#historiqueTable th,
#historiqueTable td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    font-size: 14px;
}

#historiqueTable th {
    background: #e6e6e6;
    font-weight: bold;
}

.supprimer-btn {
    background: #cc0000;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
}

.supprimer-btn:hover {
    background: #ff3333;
}


.alert-box {
    margin-top: 25px;
    padding: 20px;
    background: #ffecec;
    border-left: 6px solid #cc0000;
    border-radius: 8px;
}

.alert-box h3 {
    color: #cc0000;
    margin-top: 0;
}

.pathologique {
    color: #cc0000;
    font-weight: bold;
}

.normal {
    color: #007700;
    font-weight: bold;
}

.info-box {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 5px solid #999;
    border-radius: 8px;
}

small {
    color: #555;
}


.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
    color: #666;
    font-size: 14px;
}

.footer a {
    color: #005a8d;
    text-decoration: none;
}

body.dark-mode .footer {
    border-top-color: #555;
    color: #aaa;
}

body.dark-mode .footer a {
    color: #90caf9;
}


body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .container {
    background: #1e1e1e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

body.dark-mode h1,
body.dark-mode h2 {
    color: #90caf9;
}

body.dark-mode .subtitle {
    color: #b0bec5;
}

body.dark-mode .form-group input {
    background: #2b2b2b;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .result {
    background: #1a237e;
    border-left-color: #90caf9;
}

body.dark-mode .alert-box {
    background: #3b0000;
    border-left-color: #ff5252;
}

body.dark-mode .info-box {
    background: #263238;
    border-left-color: #78909c;
}

body.dark-mode small {
    color: #b0bec5;
}

body.dark-mode button {
    background: #1976d2;
}

body.dark-mode button:hover {
    background: #2196f3;
}

body.dark-mode .lang-switch button,
body.dark-mode .theme-switch button {
    background: #424242;
    color: #e0e0e0;
}

body.dark-mode .lang-switch button:hover,
body.dark-mode .theme-switch button:hover {
    background: #616161;
}

body.dark-mode #historiqueTable th {
    background: #333;
    color: #eee;
}

body.dark-mode #historiqueTable td {
    background: #222;
    color: #ddd;
}

body.dark-mode .supprimer-btn {
    background: #ff4444;
}


@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
        border-radius: 10px;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .export-buttons button,
    .btn-main {
        display: block;
        width: 100%;
        max-width: 260px;
        margin: 8px auto;
    }

    #historiqueTable {
        font-size: 12px;
    }

    #historiqueTable th,
    #historiqueTable td {
        padding: 6px;
    }

    h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
    }
}

