/* Chrono Paddock - feuille de style commune */

/* ─── BASE ─── */
:root {
    --noir: #15171c;
    --gris: #2a2d35;
    --rouge: #e10600;
    --texte: #1d1f24;
    --fond: #f4f5f7;
    --bord: #dde0e5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--texte);
    background: var(--fond);
}

/* ─── HAUT DE PAGE ─── */
/* En-tête : bande noire et liseré damier */
.entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    background: var(--noir);
    border-bottom: 6px solid;
    border-image: repeating-linear-gradient(90deg, #fff 0 12px, #000 12px 24px) 6;
}

.logo {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.logo span {
    color: var(--rouge);
}

.entete nav a {
    color: #fff;
    margin-left: 1.2rem;
    text-decoration: none;
}

.entete nav a:hover {
    color: var(--rouge);
}

/* ─── CONTENU ─── */
.contenu {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    border-left: 6px solid var(--rouge);
    padding-left: 0.6rem;
}

/* ─── TABLEAUX ─── */
.tableau {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.tableau th {
    background: var(--gris);
    color: #fff;
    text-align: left;
}

.tableau th, .tableau td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--bord);
}

.tableau tbody tr:hover {
    background: #fafafa;
}

/* ─── BADGES DE STATUT ─── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-prevue {
    background: #e3ecff;
    color: #1d4ed8;
}

.badge-en_cours {
    background: #ffe3e2;
    color: var(--rouge);
}

.badge-terminee {
    background: #e6e7ea;
    color: #4b5563;
}

.badge-attente {
    background: #fff4d6;
    color: #92400e;
}

/* ─── MENU ─── */
/* Navigation : bouton de déconnexion aligné avec les liens */
.entete nav {
    display: flex;
    align-items: center;
}

.form-deconnexion {
    display: inline;
    margin-left: 1.2rem;
}

.form-deconnexion button {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
}

.form-deconnexion button:hover {
    border-color: var(--rouge);
    color: var(--rouge);
}

/* ─── FORMULAIRES ─── */
.formulaire {
    display: flex;
    flex-direction: column;
    max-width: 380px;
    gap: 0.4rem;
    background: #fff;
    padding: 1.5rem;
    border: 1px solid var(--bord);
}

.formulaire input {
    padding: 0.55rem;
    border: 1px solid var(--bord);
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.formulaire select {
    padding: 0.55rem;
    border: 1px solid var(--bord);
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.formulaire button {
    background: var(--rouge);
    color: #fff;
    border: none;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.formulaire button:hover {
    background: #b80500;
}

/* ─── MESSAGES ET AIDE ─── */
.message-erreur {
    max-width: 380px;
    background: #ffe3e2;
    color: #9b0400;
    padding: 0.7rem 1rem;
    border-left: 4px solid var(--rouge);
}

ul.message-erreur {
    padding-left: 2rem;
}

.message-attente {
    background: #fff4d6;
    color: #92400e;
    padding: 0.7rem 1rem;
    border-left: 4px solid #d97706;
}

/* Texte d'aide sous un champ de formulaire */
.aide {
    color: #6b7280;
    font-size: 0.85rem;
    margin: -0.4rem 0 0.6rem;
}

.message-info {
    background: #e3f6e8;
    color: #166534;
    padding: 0.7rem 1rem;
    border-left: 4px solid #16a34a;
}

/* ─── BOUTONS ─── */
/* Bouton d'action (ex. « Ajouter un pilote ») */
.bouton {
    display: inline-block;
    background: var(--rouge);
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 600;
}

.bouton:hover {
    background: #b80500;
}

/* ─── ACTIONS ─── */
/* Colonne Actions des tableaux */
.actions a {
    margin-right: 0.8rem;
}

.actions form {
    display: inline;
}

.lien-danger {
    background: none;
    border: none;
    color: var(--rouge);
    text-decoration: underline;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

/* Bouton « Réactiver » : même allure qu'un lien, en bleu comme « Modifier » (action sans danger) */
.lien-action {
    background: none;
    border: none;
    color: #0000ee;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

/* Bouton placé sur la même ligne qu'un texte (ex. changer le statut d'une session) */
.form-inline {
    display: inline;
    margin-left: 1rem;
}

.form-inline .bouton {
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* ─── SOUS-TITRES ─── */
h2 {
    margin-top: 2rem;
}

/* ─── PAGE D'ERREUR (MODE DEBUG) ─── */
.debug {
    background: #fff4f4;
    border: 1px solid #f3b4b4;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
}

/* ─── PIED DE PAGE ─── */
.pied {
    text-align: center;
    padding: 1.5rem;
    color: #6b7280;
    font-size: 0.85rem;
}

/* ─── PETITS ÉCRANS ─── */
@media (max-width: 600px) {
    .entete {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tableau th, .tableau td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}
