/* Fichier: style.css (version 3.0 - Bannière responsive) */

/* === VARIABLES DE COULEUR === */
:root {
    --primary-color: #001f3f; /* Bleu Marine */
    --primary-hover: #003366;
    --secondary-color: #6c757d; /* Gris */
    --secondary-hover: #5a6268;
    --danger-color: #dc3545; /* Rouge */
    --danger-hover: #c82333;
    --light-color: #f8f9fa; /* Fond clair */
    --text-color: #333;
    --border-color: #dee2e6;
    --white-color: #ffffff;
}

/* === STYLES GÉNÉRAUX === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
}

/* === HEADER === */
.main-header {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
}
.logo {
    height: 50px;
    margin-right: 15px;
}
.site-title {
    color: var(--white-color);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}
.main-nav .button {
    margin-left: 10px;
}

/* === BANDEAU ADMIN === */
.admin-bar {
    background-color: #222;
    color: var(--white-color);
    padding: 0.5rem 0;
}
.admin-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-bar .button {
    padding: 5px 12px;
    font-size: 0.9rem;
}

/* === CONTENU PRINCIPAL === */
.main-content {
    flex: 1;
    padding: 2rem 0;
}
.content-box {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
h1, h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* === BOUTONS === */
.button, button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    color: var(--white-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    text-align: center;
}
.button-primary, button[type="submit"] {
    background-color: var(--primary-color);
}
.button-primary:hover, button[type="submit"]:hover {
    background-color: var(--primary-hover);
}
.button-secondary {
    background-color: var(--secondary-color);
}
.button-secondary:hover {
    background-color: var(--secondary-hover);
}
.button-danger {
    background-color: var(--danger-color);
}
.button-danger:hover {
    background-color: var(--danger-hover);
}
.button-outline {
    background-color: transparent;
    border: 2px solid var(--white-color);
    color: var(--white-color);
}
.button-outline:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

/* === FORMULAIRES === */
.form-logo-container {
    margin-bottom: 2rem;
    text-align: center;
}
.form-logo {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
form button {
    width: 100%;
}
.checkbox-group { border: 1px solid var(--border-color); padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.checkbox-item { display: block; margin-bottom: 10px; }
.checkbox-item input { margin-right: 10px; }
.checkbox-item.disabled { color: #999; text-decoration: line-through; }

/* === TABLES === */
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
th {
    background-color: var(--primary-color);
    color: var(--white-color);
}
td .button {
    padding: 5px 10px;
    font-size: 0.9rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* === MESSAGES === */
.message-success { color: green; background-color: #e8f5e9; padding: 10px; border: 1px solid green; border-radius: 4px; text-align: center; margin-bottom: 1rem; }
.message-error { color: red; background-color: #ffebee; padding: 10px; border: 1px solid red; border-radius: 4px; text-align: center; margin-bottom: 1rem; }

/* === FOOTER === */
.main-footer {
    background-color: #343a40;
    color: var(--white-color);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}
.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
}

/* === STYLES POUR LA TABLE MATRICE (APPROCHE VERTICALE ROBUSTE) === */
.participant-header {
    min-width: 200px;
    width: 250px;
    vertical-align: middle;
}
.regate-header {
    height: 160px;
    min-width: 50px;
    max-width: 70px;
    padding: 8px 5px;
    text-align: center;
    vertical-align: bottom;
}
.regate-header > div {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    margin: 0 auto;
}
.regate-header small {
    display: block;
    font-weight: normal;
    color: #cde1f7;
    font-size: 0.8em;
    margin-top: 5px;
}
.checkmark-cell {
    text-align: center;
    vertical-align: middle;
}
.checkmark {
    color: green;
    font-size: 1.5rem;
    font-weight: bold;
}

/* === RESPONSIVITÉ === */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav {
        width: 100%;
        display: flex;
        justify-content: space-around;
        gap: 10px;
    }
    .main-nav .button {
        flex-grow: 1;
        margin-left: 0;
    }
    .site-title {
        font-size: 1.2rem;
    }
    h1 {
        font-size: 1.8rem;
    }
    .content-box {
        padding: 20px;
    }
    .admin-bar-container {
        flex-direction: column;
        gap: 10px;
    }
}