@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;500;600;700&family=Roboto+Condensed:wght@400;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f0f4f7;
    color: #333;
    line-height: 1.5;
}

/* Header Magellan */
header {
    background: #fff;
    color: #163A4E;
    padding: 0.8rem 2rem;
    border-bottom: 4px solid #163A4E;
}

header h1 {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #163A4E;
}

.header-contenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    height: 40px;
    margin-right: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.btn-logout {
    background: transparent;
    color: #163A4E;
    border-color: #163A4E;
    font-family: 'Josefin Sans', sans-serif;
}

.btn-logout:hover {
    background: #163A4E;
    color: #fff;
}

/* Login */
.login-panel {
    max-width: 420px;
    margin: 3rem auto;
    border-top: 4px solid #E0174A;
}

.login-panel h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1.3rem;
    color: #163A4E;
}

.login-panel .btn-primary {
    background: #E0174A;
    border-color: #E0174A;
}

.login-panel .btn-primary:hover {
    background: #c01440;
    border-color: #c01440;
}

.btn-block {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-family: 'Josefin Sans', sans-serif;
}

main {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

/* Layout liste avec sidebar */
.liste-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.liste-contenu {
    flex: 1;
    min-width: 0;
}

/* Sidebar filtres */
.filtres-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(22, 58, 78, 0.08);
    padding: 1rem;
    border-top: 3px solid #163A4E;
}

.filtres-sidebar h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #163A4E;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filtre-groupe {
    margin-bottom: 1rem;
}

.filtre-groupe > label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.3rem;
}

.filtre-groupe input[type="date"] {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
}

.filtre-boutons {
    display: flex;
    gap: 0.3rem;
}

.filtre-boutons .btn {
    flex: 1;
    text-align: center;
}

.filtre-clubs {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.btn-club {
    text-align: left;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-actif {
    background: #163A4E;
    color: #fff;
    border-color: #163A4E;
}

.btn-actif:hover {
    background: #1e4a62;
    border-color: #1e4a62;
}

/* Tri colonne */
.th-triable {
    cursor: pointer;
    user-select: none;
}

.th-triable:hover {
    color: #E0174A;
}

.tri-indicateur {
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

/* Editeurs riches Quill */
.editeur-riche {
    min-height: 120px;
}

.editeur-riche .ql-editor {
    min-height: 100px;
    font-size: 0.9rem;
    font-family: inherit;
}

/* Panels */
.panel {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(22, 58, 78, 0.08);
    padding: 1.5rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #163A4E;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    background: #f0f0f0;
}

.btn-primary {
    background: #163A4E;
    color: #fff;
    border-color: #163A4E;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1e4a62;
    border-color: #1e4a62;
}

.btn-danger {
    color: #E0174A;
    border-color: #E0174A;
}

.btn-danger:hover {
    background: #E0174A;
    color: #fff;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e8edf0;
}

.table th {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: #163A4E;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f6f9fb;
}

.table tbody tr:hover {
    background: #f0f6fa;
}

.table-sm th,
.table-sm td {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.actions {
    white-space: nowrap;
    display: flex;
    gap: 0.4rem;
}

/* Zones depliables */
.zone {
    border: 1px solid #d8e0e5;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.zone-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    user-select: none;
    background: #f6f9fb;
    border-radius: 6px;
}

.zone-header:hover {
    background: #edf2f6;
}

.zone-header h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #163A4E;
}

.zone-fleche {
    font-size: 0.7rem;
    color: #163A4E;
    width: 1rem;
    text-align: center;
}

.zone-contenu {
    padding: 1rem;
    border-top: 1px solid #d8e0e5;
}

/* Champs */
.champ {
    margin-bottom: 0.75rem;
}

.champ label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #163A4E;
    margin-bottom: 0.25rem;
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="password"],
.champ input[type="tel"],
.champ input[type="date"],
.champ input[type="time"],
.champ textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.champ input:focus,
.champ textarea:focus {
    outline: none;
    border-color: #163A4E;
    box-shadow: 0 0 0 2px rgba(22, 58, 78, 0.15);
}

.champ-groupe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.champ-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #E0174A;
}

/* Sous-fiche inscrit */
.sous-fiche {
    background: #f6f9fb;
    border: 1px solid #d8e0e5;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.sous-fiche h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #163A4E;
}

.sous-fiche-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Messages */
.chargement {
    text-align: center;
    padding: 2rem;
    color: #888;
}

.vide {
    text-align: center;
    padding: 1.5rem;
    color: #999;
    font-style: italic;
}

.erreur {
    background: #fdecea;
    color: #c0392b;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid #E0174A;
}

.succes {
    background: #f0f9ff;
    color: #155724;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 4px solid #0096B4;
}

/* Responsive */
@media (max-width: 768px) {
    .liste-layout {
        flex-direction: column;
    }

    .filtres-sidebar {
        width: 100%;
    }

    .filtre-clubs {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .champ-groupe {
        grid-template-columns: 1fr;
    }

    .champ-checkboxes {
        flex-direction: column;
    }

    .panel-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    header {
        padding: 0.6rem 1rem;
    }
}
