/* ==========================================================
   NEXUS - Style de base
   ========================================================== */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #333;
}

/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222;
    color: white;
    padding: 0.6em 1.2em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

header h1 {
    margin: 0;
    font-size: 1.4em;
    letter-spacing: 1px;
}

nav a {
    color: white;
    margin-right: 1em;
    text-decoration: none;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

/* ----------------------------------------------------------
   Liens de langue (toggle)
   ---------------------------------------------------------- */
header .right a {
    color: #ddd;
    text-decoration: none;
    padding: 0 0.3em;
}

header .right a:hover {
    color: white;
}

/* ----------------------------------------------------------
   Zone principale
   ---------------------------------------------------------- */
main {
    padding: 2em;
}

/* ----------------------------------------------------------
   Boutons
   ---------------------------------------------------------- */
.button,
button {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 0.5em 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95em;
    transition: background 0.2s;
}

.button:hover,
button:hover {
    background: #0056b3;
}

.button.cancel {
    background: #6c757d;
}

.button.cancel:hover {
    background: #5a6268;
}

/* ----------------------------------------------------------
   Tables de données
   ---------------------------------------------------------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background: #f1f3f5;
    font-weight: bold;
    color: #444;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* ----------------------------------------------------------
   Formulaires
   ---------------------------------------------------------- */
form {
    background: white;
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

form label {
    display: block;
    margin-top: 1em;
    font-weight: 600;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form select {
    width: 100%;
    padding: 0.5em;
    margin-top: 0.3em;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

form button {
    margin-top: 1.5em;
}

/* ----------------------------------------------------------
   Messages
   ---------------------------------------------------------- */
.error {
    color: #c00;
    background: #ffeaea;
    padding: 0.5em 0.8em;
    border-radius: 5px;
    margin-top: 1em;
    font-size: 0.9em;
}

.success {
    color: #155724;
    background: #d4edda;
    padding: 0.5em 0.8em;
    border-radius: 5px;
    margin-top: 1em;
    font-size: 0.9em;
}

/* ----------------------------------------------------------
   Responsivité minimale
   ---------------------------------------------------------- */
@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    main {
        padding: 1em;
    }

    .data-table th, .data-table td {
        font-size: 0.9em;
    }

    form {
        width: 100%;
        box-shadow: none;
        padding: 1em;
    }
}

.search-form {
    margin-bottom: 1em;
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    align-items: center;
}
.search-bar select {
    padding: 0.3em;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1em;
}

.card {
    background: #fff;
    padding: 1em;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card h4 {
    margin: 0 0 0.5em;
}

.btn-add {
    background: #007bff;
    color: #fff;
    padding: 0.4em 0.8em;
    border-radius: 6px;
    text-decoration: none;
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    max-width: 400px;
    margin-top: 1em;
}

.error-page {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2em;
    max-width: 600px;
    margin: 2em auto;
    text-align: center;
}

.error-page h2 {
    color: #c00;
    font-size: 1.5em;
}

.error-page p {
    font-size: 1.1em;
}

.error-page a {
    display: inline-block;
    margin-top: 1em;
    background: #007bff;
    color: white;
    padding: 0.5em 1em;
    border-radius: 5px;
    text-decoration: none;
}

.error-page a:hover {
    background: #0056b3;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 0.5em;
}

.data-table th {
    background: #f0f0f0;
}

.data-table td a {
    margin: 0 0.2em;
}

.dashboard-section {
    margin-top: 1.5em;
}

.stat-card {
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.stat-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

canvas {
    max-width: 600px;
    margin: 1em auto;
    display: block;
}

