/* Olympus - Styles personnalisés */

/* ===========================
   BRAND OLYMPUS
   =========================== */
.olympus-brand {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.18em;
    background: linear-gradient(135deg, #b8720a 0%, #d4950f 35%, #f0c040 55%, #d4950f 75%, #b8720a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.olympus-brand-sm {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    background: linear-gradient(135deg, #b8720a, #d4950f, #f0c040, #d4950f, #b8720a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Avatar circulaire */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

/* Filtres */
.filters-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Cartes d'événements */
.event-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.event-card.event-joined {
    border: 2px solid #28a745;
}

.event-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
}

/* Image de l'événement */
.event-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

/* ===========================
   BANDEAU HORIZONTAL DES ÉVÉNEMENTS
   =========================== */

.events-horizontal-container {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.events-horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    scroll-behavior: smooth;
}

/* Scrollbar personnalisée */
.events-horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.events-horizontal-scroll::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.events-horizontal-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Carte d'événement horizontale */
.event-card-horizontal {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.event-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.event-card-horizontal.event-joined {
    border: 2px solid #28a745;
}

/* En-tête de la carte horizontale */
.event-card-header-horizontal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-card-header-horizontal .event-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Image horizontale */
.event-image-horizontal {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* Corps de la carte horizontale */
.event-card-body-horizontal {
    padding: 15px;
}

.event-card-body-horizontal .event-info {
    font-size: 13px;
    margin-bottom: 10px;
}

.event-card-body-horizontal .event-info span {
    display: block;
    margin-bottom: 4px;
}

.event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.event-action {
    margin-top: 10px;
}

/* ===========================
   LAYOUT PRINCIPAL 2 COLONNES
   =========================== */

.main-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

/* Colonne gauche : Activités */
.activities-column {
    flex: 1;
    min-width: 0;
}

/* Grille des activités */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Carte d'activité */
.activity-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: visible;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.activity-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Highlight animation quand on arrive depuis le calendrier */
.activity-card.highlight-from-calendar {
    animation: calendarHighlight 3s ease-out;
}

@keyframes calendarHighlight {
    0% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.6);
        border-color: #667eea;
    }
    30% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.3);
        border-color: #667eea;
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border-color: transparent;
    }
}

.activity-card.event-joined {
    border-color: #28a745;
}

.activity-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-sport {
    font-weight: 600;
    font-size: 15px;
}

.activity-card-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.activity-card-header {
    border-radius: 12px 12px 0 0;
}

.activity-card-content {
    padding: 12px 15px;
}

.activity-lieu, .activity-date {
    font-size: 13px;
    margin-bottom: 5px;
    color: #555;
}

.activity-badges {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.badge-pmr {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.badge-geo {
    background: #17a2b8;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* Badges de genre */
.badge-genre {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-genre-homme {
    background: #007bff;
    color: white;
}

.badge-genre-femme {
    background: #e83e8c;
    color: white;
}

.badge-genre-mixte {
    background: #6f42c1;
    color: white;
}

.activity-action {
    margin-top: 10px;
}

/* ===========================
   SIDEPANEL (PANNEAU DROIT)
   =========================== */

.sidepanel {
    width: 320px;
    min-width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidepanel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
}

.sidepanel-header h5 {
    margin: 0;
    font-size: 16px;
}

.sidepanel-filters {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.sidepanel-map {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.map-placeholder {
    background: #f8f9fa;
    border-radius: 8px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
}

.sidepanel-details {
    padding: 15px;
}

.no-selection {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

/* Carte de détails */
.detail-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

.detail-title {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.detail-lieu, .detail-date, .detail-organizer, .detail-participants {
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
}

.detail-badges {
    margin-top: 10px;
}

.detail-badge-pmr {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

/* Tablettes et petits écrans */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }

    .sidepanel {
        width: 100%;
        min-width: 100%;
        position: relative;
        top: 0;
        max-height: none;
        order: -1;
        margin-bottom: 20px;
    }

    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Filtres en colonne */
    .filters-section .row {
        flex-direction: column;
    }

    .filters-section .col-md-3 {
        width: 100%;
        margin-bottom: 8px;
    }

    /* Admin tables */
    .admin-table {
        font-size: 14px;
    }

    .admin-table .btn-group {
        flex-direction: column;
        gap: 4px;
    }

    .admin-table .btn {
        width: 100%;
        margin: 0 !important;
    }
}

/* Mobile */
@media (max-width: 576px) {
    /* Container principal */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Grille des activités */
    .activities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Cartes d'activités */
    .activity-card {
        margin: 0;
    }

    .activity-card-header {
        padding: 8px 12px;
    }

    .activity-sport {
        font-size: 14px;
    }

    .activity-card-image {
        height: 100px;
    }

    .activity-card-content {
        padding: 10px 12px;
    }

    /* Sidepanel */
    .sidepanel {
        border-radius: 8px;
    }

    .sidepanel-map {
        height: 180px !important;
    }

    #leaflet-map {
        height: 180px !important;
    }

    /* Chat */
    .chat-messages {
        height: 280px;
    }

    .chat-message {
        max-width: 90%;
    }

    .chat-bubble {
        padding: 6px 10px;
    }

    .chat-content {
        font-size: 13px;
    }

    /* Navbar */
    .navbar-brand img {
        height: 30px !important;
    }

    .navbar .avatar-circle {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    /* Barre de progression gamification */
    .navbar .progress {
        width: 100px !important;
    }

    .navbar .text-end small {
        font-size: 10px;
    }

    /* Formulaires */
    .card-body {
        padding: 15px !important;
    }

    .form-label {
        font-size: 14px;
    }

    .form-control, .form-select {
        font-size: 14px;
        padding: 8px 12px;
    }

    /* Boutons */
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 10px 20px;
        font-size: 16px;
    }

    /* En-tête des pages */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 10px;
    }

    h2, h3 {
        font-size: 1.3rem;
    }

    /* Admin header */
    .admin-header {
        padding: 15px 0;
    }

    .admin-header h2 {
        font-size: 1.2rem;
    }

    .admin-header .btn {
        width: 100%;
        margin-top: 10px;
    }

    /* Tables admin en mode carte sur mobile */
    .admin-table thead {
        display: none;
    }

    .admin-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 10px;
        background: white;
    }

    .admin-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .admin-table tbody td:last-child {
        border-bottom: none;
        flex-direction: column;
        gap: 8px;
    }

    .admin-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        font-size: 12px;
        text-transform: uppercase;
    }

    /* Transport checkboxes */
    .transport-checkboxes {
        gap: 6px;
    }

    .transport-check .line-label {
        min-width: 35px;
        height: 28px;
        font-size: 11px;
        padding: 0 8px;
    }

    /* Profile */
    .profile-header {
        padding: 20px;
        text-align: center;
    }

    .profile-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 24px;
    }

    /* Badges */
    .badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    /* Notification icon */
    .chat-notification-icon {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 10px;
        top: -8px;
        right: -8px;
    }
}

/* Très petits écrans */
@media (max-width: 375px) {
    .navbar-brand span {
        display: none;
    }

    .activity-card-image {
        height: 80px;
    }

    .filters-section {
        padding: 10px;
    }

    .chat-messages {
        height: 220px;
    }

    .btn-group-sm .btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* ===========================
   BADGES DE TRANSPORT
   =========================== */

/* Badge transport sur les cartes */
.activity-transport {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.transport-badge {
    background: #003366;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    display: inline-block;
}

/* Section transport dans le sidepanel */
.detail-transport {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.transport-station-label {
    margin-bottom: 10px;
    font-size: 14px;
}

.transport-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Badge de ligne générique */
.line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: white;
    background: #6c757d;
}

/* Lignes de métro - Couleurs officielles RATP */
.line-metro {
    border-radius: 50%;
}

.line-m1 { background: #FFCD00; color: #000; }
.line-m2 { background: #0055C8; }
.line-m3 { background: #6E6E00; }
.line-m3bis, .line-m3b { background: #82C8E6; color: #000; }
.line-m4 { background: #A0006E; }
.line-m5 { background: #FF7E2E; }
.line-m6 { background: #6ECA97; color: #000; }
.line-m7 { background: #FA9ABA; color: #000; }
.line-m7bis, .line-m7b { background: #6ECA97; color: #000; }
.line-m8 { background: #E19BDF; color: #000; }
.line-m9 { background: #B6BD00; color: #000; }
.line-m10 { background: #C9910D; }
.line-m11 { background: #704B1C; }
.line-m12 { background: #007852; }
.line-m13 { background: #6EC4E8; color: #000; }
.line-m14 { background: #62259D; }

/* RER - Couleurs officielles */
.line-rer {
    border-radius: 4px;
    min-width: 45px;
}

.line-rer-a { background: #E3051C; }
.line-rer-b { background: #5291CE; }
.line-rer-c { background: #FFCD00; color: #000; }
.line-rer-d { background: #00814F; }
.line-rer-e { background: #BD76A1; }

/* Tramway */
.line-tram {
    background: #000000;
    border-radius: 4px;
}

/* Bus */
.line-bus {
    background: #91BE1E;
    color: #000;
    border-radius: 4px;
}

/* Défaut */
.line-default {
    background: #6c757d;
    border-radius: 4px;
}

/* Badges */
.badge-participant {
    background-color: #6c757d;
    font-size: 12px;
    padding: 5px 10px;
}

.badge-joined {
    background-color: #28a745;
    font-size: 11px;
    padding: 4px 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Boutons d'action */
.btn-join {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    transition: all 0.3s;
}

.btn-join:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
    color: white;
}

.btn-leave {
    background-color: #dc3545;
    border: none;
    color: white;
}

.btn-cancel-event {
    background-color: #ffc107;
    border: none;
    color: #000;
}

/* Profil */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
}

/* Barre de progression personnalisée */
.progress-custom {
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #e9ecef;
}

.progress-bar-custom {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.6s ease;
}

/* Tables */
.table-events {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-events thead {
    background-color: #f8f9fa;
}

.table-events tbody tr:hover {
    background-color: #f1f3f5;
}

/* Icônes sportives */
.sport-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* ===========================
   SPORT PICKER CUSTOM
   =========================== */
.sport-display-field {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.sport-display-field.is-invalid {
    border-color: #dc3545;
}

.sport-picker-arrow {
    font-size: 0.7rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.sport-picker-arrow.open {
    transform: rotate(180deg);
}

.sport-picker-dropdown {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 50;
}

.sport-chips-container {
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sport-chips-separator {
    width: 100%;
    border-top: 1px dashed #dee2e6;
    margin: 4px 0;
}

.sport-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px 4px 6px;
    border: 1.5px solid #dee2e6;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: #fff;
    font-size: 0.875rem;
    white-space: nowrap;
}

.sport-chip:hover {
    border-color: #0d6efd;
    background: #f0f6ff;
}

.sport-chip-selected {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.sport-chip-selected .heart-btn {
    color: #fff !important;
}

.sport-chip-selected .heart-btn.heart-active {
    color: #ffb3d1 !important;
}

.heart-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    cursor: pointer;
    color: #ccc;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.heart-btn:hover {
    transform: scale(1.3);
}

.heart-btn.heart-active {
    color: #ff69b4;
}

/* Cœur sur les cartes d'activités */
.card-heart-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ccc;
    line-height: 1;
    transition: color 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.card-heart-btn:hover {
    transform: scale(1.3);
    color: #ff69b4;
}

.card-heart-btn.heart-active {
    color: #ff69b4;
}

/* Cœur sur les boutons sport du coach */
.coach-sport-wrapper {
    position: relative;
    display: flex;
}

.coach-sport-wrapper .coach-sport-btn {
    width: 100%;
}

.coach-heart-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 1rem;
    cursor: pointer;
    color: #ccc;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
    z-index: 2;
}

.coach-heart-btn:hover {
    transform: scale(1.3);
    color: #ff69b4;
}

.coach-heart-btn.heart-active {
    color: #ff69b4;
}

/* Niveau badges */
.niveau-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.niveau-debutant {
    background-color: #d1ecf1;
    color: #0c5460;
}

.niveau-intermediaire {
    background-color: #fff3cd;
    color: #856404;
}

.niveau-expert {
    background-color: #f8d7da;
    color: #721c24;
}

/* Accessibilité PMR */
.accessibility-badge {
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-block;
}

/* Messages flash personnalisés */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Formulaires */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .filters-section {
        padding: 15px;
    }

    .profile-header {
        padding: 20px;
        text-align: center;
    }

    .profile-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .stat-number {
        font-size: 24px;
    }

    .event-card {
        margin-bottom: 20px;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Footer */
footer {
    margin-top: 80px;
}

/* ===========================
   INTERFACE ADMINISTRATION
   =========================== */

/* En-tête admin */
.admin-header {
    padding: 20px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.admin-header h2 {
    color: #343a40;
    font-weight: 600;
}

/* Table admin */
.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 15px 12px;
}

.admin-table tbody td {
    vertical-align: middle;
    padding: 12px;
}

.admin-table .btn-group {
    flex-wrap: nowrap;
}

.admin-table .btn-group .btn {
    white-space: nowrap;
}

/* Carte Leaflet dans le formulaire admin */
.admin-map {
    height: 350px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    z-index: 1;
}

/* Couleur des liens navbar */
.navbar-light .navbar-nav .nav-link {
    color: #1a1a1a !important;
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #000 !important;
}

/* Badge admin dans la navbar */
.nav-link.text-warning {
    font-weight: 600;
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
    padding: 8px 12px !important;
}

.nav-link.text-warning:hover {
    background-color: rgba(255, 193, 7, 0.2);
}

/* Formulaire admin */
.admin-form .form-label {
    font-weight: 500;
    color: #495057;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.25);
}

/* Cartes admin */
.admin-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.admin-card .card-header {
    background: #343a40;
    color: white;
    font-weight: 600;
}

/* Alertes admin */
.admin-alert {
    border-left: 4px solid;
    border-radius: 4px;
}

.admin-alert.alert-info {
    border-left-color: #17a2b8;
}

.admin-alert.alert-warning {
    border-left-color: #ffc107;
}

/* Responsive admin */
@media (max-width: 992px) {
    .admin-table .btn-group {
        flex-direction: column;
    }

    .admin-table .btn-group .btn {
        border-radius: 4px !important;
        margin-bottom: 2px;
    }
}

@media (max-width: 768px) {
    .admin-map {
        height: 250px;
    }
}

/* ===========================
   CHECKBOXES TRANSPORT ADMIN
   =========================== */

.transport-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.transport-check {
    margin: 0 !important;
}

.transport-check .form-check-input {
    display: none;
}

.transport-check .line-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    transition: all 0.2s;
}

.transport-check .form-check-input:checked + .line-label {
    border-color: transparent;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Couleurs Métro RATP */
.transport-check .form-check-input:checked + .line-label-m1 { background: #FFCD00; color: #000; }
.transport-check .form-check-input:checked + .line-label-m2 { background: #0055C8; }
.transport-check .form-check-input:checked + .line-label-m3 { background: #6E6E00; }
.transport-check .form-check-input:checked + .line-label-m3bis { background: #82C8E6; color: #000; }
.transport-check .form-check-input:checked + .line-label-m4 { background: #A0006E; }
.transport-check .form-check-input:checked + .line-label-m5 { background: #FF7E2E; }
.transport-check .form-check-input:checked + .line-label-m6 { background: #6ECA97; color: #000; }
.transport-check .form-check-input:checked + .line-label-m7 { background: #FA9ABA; color: #000; }
.transport-check .form-check-input:checked + .line-label-m7bis { background: #6ECA97; color: #000; }
.transport-check .form-check-input:checked + .line-label-m8 { background: #E19BDF; color: #000; }
.transport-check .form-check-input:checked + .line-label-m9 { background: #B6BD00; color: #000; }
.transport-check .form-check-input:checked + .line-label-m10 { background: #C9910D; }
.transport-check .form-check-input:checked + .line-label-m11 { background: #704B1C; }
.transport-check .form-check-input:checked + .line-label-m12 { background: #007852; }
.transport-check .form-check-input:checked + .line-label-m13 { background: #6EC4E8; color: #000; }
.transport-check .form-check-input:checked + .line-label-m14 { background: #62259D; }

/* Couleurs RER */
.transport-check .form-check-input:checked + .line-label-rer-a { background: #E3051C; }
.transport-check .form-check-input:checked + .line-label-rer-b { background: #5291CE; }
.transport-check .form-check-input:checked + .line-label-rer-c { background: #FFCD00; color: #000; }
.transport-check .form-check-input:checked + .line-label-rer-d { background: #00814F; }
.transport-check .form-check-input:checked + .line-label-rer-e { background: #BD76A1; }

/* Couleurs Tramway */
.transport-check .form-check-input:checked + .line-label-tram { background: #000000; }

/* ===========================
   CHAT INTERFACE
   =========================== */

/* Container messages */
.chat-messages {
    height: 350px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-empty {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
}

/* Message individuel */
.chat-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.chat-message-other {
    align-self: flex-start;
}

.chat-message-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

/* Avatar dans le chat */
.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

/* Bulle de message */
.chat-bubble {
    background: white;
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chat-message-mine .chat-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.chat-username {
    font-size: 11px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 2px;
}

.chat-content {
    font-size: 14px;
    word-wrap: break-word;
}

/* Zone de saisie */
.chat-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #dee2e6;
}

.chat-input-container .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 25px;
    overflow: hidden;
}

.chat-input-container .form-control {
    border: none;
    padding-left: 20px;
}

.chat-input-container .form-control:focus {
    box-shadow: none;
}

.chat-input-container .btn {
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
}

/* Animation notification */
@keyframes chatFlash {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    50% { background: #28a745; }
}

.chat-notification-flash {
    animation: chatFlash 0.5s ease-in-out;
}

/* Badge notification */
#chat-notification-badge {
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 10px;
}

/* Responsive chat */
@media (max-width: 992px) {
    .chat-messages {
        height: 250px;
    }
}

/* ===========================
   NOTIFICATION ICON
   =========================== */

.chat-notification-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.6);
    animation: notifPulse 1.5s infinite;
    z-index: 20;
    border: 2px solid white;
}

.chat-notification-icon.visible {
    display: flex;
}

.notif-count {
    line-height: 1;
}

@keyframes notifPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(220, 53, 69, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 2px 12px rgba(220, 53, 69, 0.8);
    }
}

/* ===========================
   ICÔNE CALENDRIER NAVBAR
   =========================== */

.navbar-calendar-icon {
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.navbar-calendar-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* ===========================
   PAGE CALENDRIER
   =========================== */

.calendar-container {
    max-width: 900px;
    margin: 0 auto;
}

.calendar-header {
    text-align: center;
    margin-bottom: 25px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 5px;
}

.calendar-title {
    font-weight: 700;
    color: #333;
    margin: 0;
    min-width: 220px;
}

.calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.calendar-nav-btn:hover {
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

/* Grille du calendrier */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #667eea;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day-header.calendar-weekend {
    color: #764ba2;
}

.calendar-day {
    position: relative;
    min-height: 70px;
    padding: 6px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calendar-day-empty {
    background: transparent;
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.calendar-day-today {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
}

.calendar-day-today .calendar-day-number {
    color: #667eea;
    font-weight: 700;
}

.calendar-day-has-events {
    background: rgba(102, 126, 234, 0.05);
    cursor: default;
}

.calendar-day-has-events:hover {
    background: rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

/* Points/dots d'événements */
.calendar-event-dots {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.calendar-event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.calendar-event-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
}

/* Icônes des sports dans la grille du calendrier */
.calendar-sport-icons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.calendar-sport-entry {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    border-radius: 6px;
    padding: 1px 3px;
    transition: all 0.2s ease;
}

.calendar-sport-entry:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

.calendar-sport-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.calendar-sport-time {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    line-height: 1;
}

/* Lien cliquable autour de l'icône dans la grille du calendrier */
.calendar-event-link {
    display: flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    border-radius: 10px;
    padding: 1px 4px 1px 1px;
    transition: all 0.2s ease;
}

.calendar-event-link:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

.calendar-event-time {
    font-size: 9px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.calendar-event-more {
    font-size: 9px;
    color: #667eea;
    font-weight: 600;
}

.calendar-event-count {
    font-size: 10px;
    color: #667eea;
    font-weight: 700;
    margin-top: 2px;
}

/* Légende des sports */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.calendar-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-legend-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
}

/* Section liste des événements */
.calendar-events-section {
    margin-top: 10px;
}

.calendar-events-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

.calendar-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-event-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.calendar-event-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Lien cliquable autour des cartes d'événements du calendrier */
.calendar-event-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.calendar-event-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.calendar-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    height: 55px;
    border-radius: 10px;
    color: #fff;
    flex-shrink: 0;
}

.calendar-event-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.calendar-event-month {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-event-info {
    flex: 1;
}

.calendar-event-sport {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.calendar-event-details {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.5;
}

.calendar-event-details i {
    color: #667eea;
    margin-right: 3px;
}

.calendar-event-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Message aucun événement */
.calendar-no-events {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 10px;
}

.calendar-no-events i {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    color: #ccc;
}

.calendar-no-events p {
    font-size: 16px;
    margin-bottom: 15px;
}

/* ===========================
   CALENDRIER RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .calendar-grid {
        gap: 2px;
        padding: 10px;
    }

    .calendar-day {
        min-height: 50px;
        padding: 4px;
    }

    .calendar-day-number {
        font-size: 12px;
    }

    .calendar-day-header {
        font-size: 11px;
    }

    .calendar-event-dots {
        gap: 2px;
    }

    .calendar-event-dot {
        width: 5px;
        height: 5px;
    }

    .calendar-sport-icons {
        gap: 2px;
        margin-top: 2px;
    }

    .calendar-sport-icon {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .calendar-sport-time {
        font-size: 8px;
    }

    .calendar-sport-entry {
        gap: 2px;
        padding: 0 2px;
    }

    .calendar-event-time {
        display: none;
    }

    .calendar-event-link {
        padding: 0;
    }

    .calendar-event-count {
        display: none;
    }

    .calendar-title {
        font-size: 20px;
        min-width: 180px;
    }

    .calendar-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .calendar-event-card {
        padding: 12px;
        gap: 10px;
    }

    .calendar-event-date-badge {
        min-width: 45px;
        height: 45px;
    }

    .calendar-event-day {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .calendar-day {
        min-height: 40px;
        padding: 3px;
    }

    .calendar-day-number {
        font-size: 11px;
    }

    .calendar-event-more {
        display: none;
    }

    .calendar-nav {
        gap: 10px;
    }

    .calendar-title {
        font-size: 18px;
        min-width: 150px;
    }
}


/* ===========================
   CHATBOT SPORTY
   =========================== */

.chatbot-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header h3 {
    font-weight: 700;
    font-size: 20px;
}

.chatbot-avatar-lg {
    font-size: 36px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Zone de messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f5f7fb;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c5cae9;
    border-radius: 3px;
}

/* Messages */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: chatFadeIn 0.3s ease;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    flex-shrink: 0;
}

.user-avatar {
    background: linear-gradient(135deg, #34D399, #059669) !important;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
    line-height: 1.5;
}

.chat-bubble p {
    margin: 0 0 4px 0;
}

.chat-bubble p:last-of-type {
    margin-bottom: 0;
}

.bot-bubble {
    background: #fff;
    color: #333;
    border-radius: 4px 16px 16px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.user-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px 4px 16px 16px;
}

/* Bouton écouter */
.btn-speak {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s;
    position: absolute;
    bottom: 4px;
    right: 6px;
}

.btn-speak:hover {
    opacity: 1;
    background: rgba(102, 126, 234, 0.1);
}

/* Indicateur de frappe */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 10px;
    background: #f5f7fb;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Zone de saisie */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e8eaf6;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e8eaf6;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #667eea;
}

.chatbot-input::placeholder {
    color: #aaa;
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-mic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e8eaf6;
    background: #fff;
    color: #667eea;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-mic:hover {
    background: #f0f0ff;
    border-color: #667eea;
}

.btn-mic.recording {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: micPulse 1.5s infinite;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
}

#btn-auto-speak.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive chatbot */
@media (max-width: 768px) {
    .chatbot-container {
        height: calc(100vh - 140px);
        border-radius: 0;
        margin: -12px;
    }

    .chatbot-header {
        padding: 12px 16px;
    }

    .chatbot-avatar-lg {
        font-size: 28px;
        width: 40px;
        height: 40px;
    }

    .chat-bubble {
        max-width: 85%;
    }

    .chatbot-messages {
        padding: 12px;
        gap: 12px;
    }
}

/* Suggestions d'activités dans le chatbot */
.sporty-events-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sporty-event-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 10px 12px;
    gap: 10px;
}

.sporty-event-info {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
    flex: 1;
}

.sporty-event-info strong {
    font-size: 14px;
    color: #3730a3;
}

.sporty-event-niveau {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 6px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 5px;
    font-weight: 600;
}

.sporty-event-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sporty-event-btn:hover {
    opacity: 0.85;
    color: white;
    text-decoration: none;
}

/* ===========================
   PAGE COACH SPORT
   =========================== */

.coach-page {
    max-width: 900px;
    margin: 0 auto;
}

/* Grille de sélection des sports */
.coach-sport-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.coach-sport-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.coach-sport-btn:hover {
    border-color: var(--sport-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.coach-sport-emoji {
    font-size: 36px;
    line-height: 1;
}

.coach-sport-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

/* Container du chat coach */
.coach-chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    background: #fff;
}

.coach-chat-header {
    background: linear-gradient(135deg, #34D399 0%, #059669 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.coach-chat-header h5 {
    font-weight: 700;
    font-size: 20px;
}

.coach-chat-header-emoji {
    font-size: 32px;
}

/* Zone messages */
.coach-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f0fdf4;
}

.coach-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.coach-chat-messages::-webkit-scrollbar-thumb {
    background: #86efac;
    border-radius: 3px;
}

/* Typing indicator */
.coach-chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 10px;
    background: #f0fdf4;
    flex-shrink: 0;
}

/* Suggestions rapides */
.coach-suggestions {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: #f0fdf4;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.coach-suggestion-btn {
    padding: 6px 14px;
    border: 1px solid #86efac;
    border-radius: 20px;
    background: #fff;
    color: #059669;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.coach-suggestion-btn:hover {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* Zone de saisie */
.coach-chat-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #fff;
    border-top: 1px solid #d1fae5;
    flex-shrink: 0;
}

.coach-chat-input {
    flex: 1;
    border: 2px solid #d1fae5;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.coach-chat-input:focus {
    border-color: #34D399;
}

.coach-chat-input::placeholder {
    color: #aaa;
}

.coach-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #34D399 0%, #059669 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.coach-chat-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

/* Responsive Coach */
@media (max-width: 768px) {
    .coach-sport-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .coach-sport-emoji {
        font-size: 28px;
    }

    .coach-sport-btn {
        padding: 12px 6px;
    }

    .coach-sport-name {
        font-size: 11px;
    }

    .coach-chat-container {
        height: calc(100vh - 140px);
        border-radius: 0;
        margin: -12px;
    }
}

@media (max-width: 576px) {
    .coach-sport-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .coach-suggestion-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ===========================
   WIDGET CHAT IA FLOTTANT (legacy)
   =========================== */

/* Bouton flottant */
.chatia-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    transition: all 0.3s ease;
}

.chatia-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.6);
}

.chatia-fab.active {
    border-radius: 50%;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.chatia-fab.active .chatia-fab-label {
    display: none;
}

.chatia-fab-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.chatia-fab.active .chatia-fab-icon {
    transform: rotate(90deg);
}

/* Panneau de chat */
.chatia-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 9998;
    width: 380px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatia-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* En-tete du panneau */
.chatia-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chatia-panel-header h6 {
    font-weight: 700;
    font-size: 15px;
}

.chatia-panel-avatar {
    font-size: 26px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Zone des messages */
.chatia-panel-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f7fb;
}

.chatia-panel-messages::-webkit-scrollbar {
    width: 5px;
}

.chatia-panel-messages::-webkit-scrollbar-thumb {
    background: #c5cae9;
    border-radius: 3px;
}

/* Indicateur typing */
.chatia-panel-typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 8px;
    background: #f5f7fb;
    flex-shrink: 0;
}

/* Zone de saisie */
.chatia-panel-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid #e8eaf6;
    flex-shrink: 0;
}

.chatia-input {
    flex: 1;
    border: 2px solid #e8eaf6;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chatia-input:focus {
    border-color: #667eea;
}

.chatia-input::placeholder {
    color: #aaa;
}

.chatia-btn-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.chatia-btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive widget */
@media (max-width: 576px) {
    .chatia-panel {
        width: calc(100vw - 16px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 8px;
        border-radius: 12px;
    }

    .chatia-fab {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
        font-size: 14px;
    }

    .chatia-fab.active {
        padding: 12px;
    }
}
