:root {
    --primary-color: #e53935;
    --primary-dark: #b71c1c;
    --secondary-color: #212121;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: var(--text-color);
    padding-bottom: 60px;
    
    /* --- CONFIGURATION DE L'IMAGE DE FOND --- */
    /* Par défaut : une image sombre et pro de équipement de pompier depuis Unsplash */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('test1.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.header-banner {
    background: linear-gradient(135deg, rgba(33,33,33,0.95) 0%, rgba(58,58,58,0.95) 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 5px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.header-banner h1 {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header-banner p {
    font-size: 14px;
    color: #b0bec5;
    max-width: 600px;
    margin: 0 auto;
}

.actions-bar {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 100;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border-color);
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(229, 57, 53, 0.4);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: #616161;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 6px 12px;
    font-size: 12px;
}

.btn-secondary:hover {
    background-color: #424242;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.main-container {
    max-width: 850px;
    margin: 30px auto;
    padding: 0 15px;
}

.mission-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.mission-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mission-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-focus {
    background-color: #f8f9fa;
    padding: 8px 20px;
    font-size: 12px;
    color: #616161;
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    color: #424242;
    font-size: 11px;
    text-transform: uppercase;
    padding: 12px 16px;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) {
    background-color: #fbfbfb;
}

.exercise-name {
    font-weight: 600;
    color: #1a1a1a;
}

.badge-repos {
    background-color: #efebe9;
    color: #4e342e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.input-weight {
    width: 75px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s;
}

.input-weight:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1);
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.text-pdc {
    font-style: italic;
    color: #757575;
    font-size: 13px;
}

/* Style de validation visuelle */
tr.row-checked {
    background-color: #e8f5e9 !important;
    transition: background-color 0.3s ease;
}

tr.row-checked .exercise-name {
    color: #2e7d32;
    text-decoration: line-through;
}

@media (max-width: 600px) {
    td, th {
        padding: 10px 8px;
        font-size: 13px;
    }
    .input-weight {
        width: 65px;
        padding: 6px;
    }
    .header-banner h1 {
        font-size: 20px;
    }
    .mission-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-secondary {
        align-self: flex-end;
    }
}

/* ---------- Ajouts : navigation + page de gestion ---------- */
.actions-bar { gap: 10px; flex-wrap: wrap; }
a.btn { text-decoration: none; }
.btn-light { background-color: #fff; color: #333; border: 1px solid #ccc; box-shadow: none; }
.btn-light:hover { background-color: #f0f0f0; box-shadow: none; }
.status { font-size: 13px; color: #2e7d32; font-weight: 600; opacity: 0; transition: opacity 0.3s; }
.status.on { opacity: 1; }

.admin-day summary { cursor: pointer; list-style: none; }
.admin-day summary::-webkit-details-marker { display: none; }
.admin-day .count { font-size: 12px; color: #b0bec5; }
.day-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 14px 20px; background: #f8f9fa; border-bottom: 1px solid var(--border-color); }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #616161; }
.fld.wide { grid-column: 1 / -1; }
.fld input, .ex-in { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; background: #fff; }
.fld input:focus, .ex-in:focus, .icon-btn:focus-visible, .btn:focus-visible { border-color: var(--primary-color); outline: 2px solid rgba(229, 57, 53, 0.35); outline-offset: 1px; }
.admin-table { min-width: 760px; }
.admin-table td { padding: 8px; }
.admin-table td:first-child .ex-in { min-width: 190px; }
.row-actions { white-space: nowrap; }
.icon-btn { border: 1px solid #ccc; background: #fff; border-radius: 6px; padding: 6px 9px; cursor: pointer; font-size: 13px; }
.icon-btn:hover { background: #f0f0f0; }
.icon-btn.danger:hover { background: #ffebee; border-color: var(--primary-color); }
.day-footer { padding: 14px 20px; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--border-color); }
.day-footer .btn { margin-left: 4px; }
