/* Variables de design */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg: #f1f5f9;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --success: #27ae60;
    --pending: #f1c40f;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    /* Changé de 2rem à 0 car le header prend toute la largeur */
    line-height: 1.5;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* En-têtes */
h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
}

/* Header global */
/* header {
    background-color: #1e293b;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
} */

/* header a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
} */

/* nav { display: flex; ... } removed to rely on Tailwind */

nav a:hover {
    color: var(--primary);
}

/* Grille de mise en page */
/* Grille de mise en page */
.course-grid {
    display: grid;
    /* Mobile: 1 colonne par défaut ou adaptation */
    grid-template-columns: 1fr;
    gap: 15px;
    /* Reduced gap */
    margin-top: 20px;
}

@media (min-width: 640px) {
    .course-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Style de la carte de course */
.course-card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    /* Slightly reduced radius */
    padding: 1rem;
    /* Compact padding for mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .course-card {
        padding: 1.5rem;
        border-radius: 1rem;
    }
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* État en attente (Pending) */
.course-card.pending-card {
    background: #fffcf0;
    border: 1px dashed var(--pending);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Badges dynamiques */
.badge-sport {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-triathlon {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #d8b4fe;
}

.badge-trail {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.badge-route {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.badge-vtt {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.badge-pending {
    background: var(--pending);
    color: #854d0e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
}

.course-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    /* Smaller for mobile */
    color: var(--text-main);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .course-card h3 {
        font-size: 1.25rem;
    }
}

.course-info p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Boutons */
.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--success);
    color: white !important;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    box-sizing: border-box;
    /* Évite que le padding ne fasse déborder le bouton */
}

.btn-disabled {
    width: 100%;
    background: #e2e8f0;
    color: #94a3b8;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: not-allowed;
    margin-top: 1rem;
}

/* Alertes */
.alert-info {
    background: #e0f2fe;
    color: #0369a1;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #0ea5e9;
    margin-bottom: 2rem;
}

/* Rétablir les bordures des blocs de l'accueil */
.dashboard-grid .card,
.card,
.agenda-item {
    border: 1px solid #e2e8f0;
    /* Ajout de la délimitation manquante */
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Rétablir les boutons "Voir" en bleu sur l'accueil */
.agenda-item a,
.btn-view {
    display: inline-block;
    background-color: var(--primary);
    color: white !important;
    padding: 6px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.agenda-item a:hover {
    background-color: var(--primary-hover);
}

/* Rétablir le bouton Admin en rouge dans le header */
header .btn-admin {
    background-color: #ef4444 !important;
    /* Rouge vif moderne */
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
    border: none;
    transition: background 0.2s;
}

header .btn-admin:hover {
    background-color: #dc2626 !important;
}

/* Espacement spécifique pour les items de l'agenda */
.agenda-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* --- PAGES AUTH (LOGIN/REGISTER) --- */

.auth-wrapper {
    min-height: calc(100vh - 80px);
    /* Prend toute la hauteur moins le header */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
    /* Reduced for mobile */
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    .auth-card {
        padding: 2.5rem;
        border-radius: 1.5rem;
    }
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    /* Très important pour éviter que l'input dépasse */
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

Pour harmoniser le style de ton interface admin et éviter le côté "décousu",
nous allons standardiser les tableaux,
les formulaires de filtres et les boutons d'action.

Voici le CSS corrigé à ajouter à ton fichier style.css pour un rendu "pro" et cohérent. 1. Le CSS de nettoyage (Admin & Tableaux) CSS

/* --- TABLEAUX ADMIN --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 15px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.9rem;
}

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

tr:hover td {
    background-color: #f8fafc;
}

/* --- BARRE DE RECHERCHE / FILTRES --- */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-bar input {
    flex: 1;
    min-width: 150px;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* --- BOUTONS D'ACTION --- */
.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.btn-edit {
    background: #6366f1;
    color: white !important;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 500;
}

.btn-delete:hover {
    background: #dc2626;
}

.btn-edit:hover {
    background: #4f46e5;
}

/* Container du lien utilisateur */
.header-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff !important;
    /* Blanc pur */
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

/* L'image de l'avatar redimensionnée */
.mini-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    /* Important pour ne pas déformer l'image */
    border: 2px solid #e2e8f0;
}

/* Style pour les initiales (quand il n'y a pas de photo) */
.mini-initials {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
    /* Fond translucide */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 1.5px solid #ffffff;
}

.btn-logout {
    color: #ffffff;
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

/* Style pour le badge de notifications (si besoin) */
.unread-dot {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 15px;
    text-align: center;
}

/* Style du lien Logo */
.logo-brand {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    /* Très gras pour le côté startup moderne */
    color: #ffffff;
    /* Ou la couleur de ton header */
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    /* Resserre un peu les lettres pour le look tech */
}

/* Le badge Bêta */
.beta-tag {
    margin-left: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    /*background: linear-gradient(135s, #6366f1 0%, #a855f7 100%); /* Dégradé moderne indigo/violet */
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 100px;
    /* Bordures très arrondies (pill-shape) */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.logo-brand:hover {
    opacity: 0.9;
}

.logo-brand:hover .beta-tag {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* nav override removed */