/* FoodBus - Style Sobre London Bus */

:root {
    --primary-color: #DC143C;    /* Rouge bus londonien */
    --secondary-color: #FFFFFF;  /* Blanc pur */
    --accent-color: #F8F9FA;     /* Gris très clair */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #FFFFFF;
    --dark-color: #212529;       /* Noir profond */
    --text-muted: #6c757d;       /* Gris sobre */
    --border-color: #dee2e6;     /* Bordures discrètes */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Nouveaux styles pour les événements */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #B71C1C 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Styles pour les événements cliquables */
.event-row {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px;
    margin: -8px;
}

.event-row:hover {
    background-color: rgba(220, 20, 60, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Styles pour la modale événement */
.modal-content {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 15px;
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-header .modal-title .text-primary {
    color: rgba(255, 255, 255, 0.9) !important;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    background-color: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

#eventImageContainer img {
    border: 4px solid var(--accent-color);
    transition: transform 0.3s ease;
}

#eventImageContainer img:hover {
    transform: scale(1.02);
}

#eventImagePlaceholder {
    border: 2px dashed var(--border-color);
}

/* Global Styles */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.main-content {
    padding-top: 76px; /* Hauteur de la navbar fixe */
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(220, 20, 60, 0.15);
}

.card-img-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #B71C1C;
    border-color: #B71C1C;
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

/* Calendar Styles */
.calendar-table {
    font-size: 0.9rem;
}

.calendar-table th {
    background: var(--light-color);
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.calendar-table td {
    vertical-align: top;
    padding: 0;
    position: relative;
    height: 100px;
    border: 1px solid #dee2e6;
}

.calendar-day {
    height: 100%;
    padding: 0.5rem;
    transition: background-color 0.3s ease;
}

.calendar-day:hover {
    background-color: rgba(220, 20, 60, 0.1);
}

.day-number {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-indicator {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    margin-bottom: 0.2rem;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Page Headers */
.page-header {
    background-color: var(--primary-color);
    position: relative;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: white !important;
    transition: color 0.3s ease;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Image Styles */
.img-thumbnail {
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 0.25rem;
}

/* Social Media Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: white;
}

.social-links .facebook:hover {
    background-color: #3b5998;
}

.social-links .instagram:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
}

.social-links .twitter:hover {
    background-color: #1da1f2;
}

.social-links .linkedin:hover {
    background-color: #0077b5;
}

/* Menu Items Styles */
.menu-items {
    max-height: 300px;
    overflow-y: auto;
}

.menu-items::-webkit-scrollbar {
    width: 6px;
}

.menu-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.menu-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.menu-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.menu-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.menu-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .min-vh-75 {
        min-height: auto;
    }

    .calendar-table {
        font-size: 0.8rem;
    }

    .calendar-day {
        height: 80px;
        padding: 0.25rem;
    }

    .event-indicator {
        font-size: 0.6rem;
    }

    .navbar-nav {
        padding-top: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }

    .form-control, .form-select {
        padding: 0.5rem 0.75rem;
    }

    .page-header {
        padding: 2rem 0;
    }

    .display-4, .display-5 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer,
    .page-header {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .text-white {
        color: #000 !important;
    }

    .bg-primary,
    .bg-dark {
        background: #fff !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn-outline-primary {
        border-width: 2px;
    }

    .form-control,
    .form-select {
        border-width: 2px;
        border-color: #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}

/* London Bus Inspired Elements */
.bus-icon {
    color: var(--primary-color);
}

/* Clean Focus for Better Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: none;
}

/* ==============================
   EVENTS PAGE STYLES
   ============================== */

/* Hero Section pour événements */
.events-hero {
    background: var(--gradient-primary);
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.events-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='m0 40l40-40h-40v40z'/%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0px); }
    100% { transform: translateX(40px); }
}

.min-vh-50 {
    min-height: 50vh;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Cards événements hero */
.next-event-card,
.no-event-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.next-event-card:hover,
.no-event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-icon {
    transition: transform 0.3s ease;
}

.next-event-card:hover .event-icon {
    transform: scale(1.1);
}

/* Illustration hero */
.hero-illustration {
    position: relative;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Statistiques */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15);
}

/* Calendrier moderne */
.calendar-container {
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.calendar-header {
    background: var(--gradient-primary) !important;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.calendar-nav-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.calendar-title {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

/* Calendrier moderne avec table */
.modern-calendar-table {
    border-collapse: separate;
    border-spacing: 2px;
}

.modern-calendar-table th,
.modern-calendar-table td {
    vertical-align: top;
    border: 1px solid var(--border-color);
}

.day-header-modern {
    padding: 1rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--accent-color);
}

.calendar-day-modern {
    background-color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.calendar-day-modern:hover {
    background-color: var(--accent-color);
    transform: scale(1.02);
}

.calendar-day-modern.is-today-modern {
    background-color: rgba(220, 20, 60, 0.05);
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.2);
}

.day-content-modern {
    padding: 0.75rem 0.5rem;
    height: 100%;
    min-height: 90px;
}

.day-number-modern {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.is-today-modern .day-number-modern {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.1rem;
}

.events-container-modern {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-indicator-modern {
    font-size: 0.7rem !important;
    line-height: 1.2;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease;
}

.event-indicator-modern:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.public-event {
    background-color: var(--success-color);
}

.legend-dot.private-event {
    background-color: var(--danger-color);
}

/* Cards événements */
.event-card {
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.event-badge {
    z-index: 10;
}

.event-image {
    height: 250px;
    overflow: hidden;
}

.event-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.event-card:hover .event-img {
    transform: scale(1.05);
}

.event-placeholder {
    height: 100%;
    background: var(--gradient-primary) !important;
}

.event-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
}

.event-number {
    font-size: 0.8rem;
    box-shadow: var(--shadow-sm);
}

.event-content {
    position: relative;
}

.event-title {
    color: var(--dark-color);
    font-size: 1.25rem;
    line-height: 1.4;
}

.meta-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.event-card:hover .meta-icon {
    transform: scale(1.1);
}

.event-description {
    min-height: 4rem;
}

.event-footer {
    background-color: var(--accent-color) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Call to Action */
.cta-section {
    background: var(--gradient-primary) !important;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    animation: cta-float 15s infinite linear;
}

@keyframes cta-float {
    0% { transform: translateX(-60px); }
    100% { transform: translateX(0px); }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-actions {
    position: relative;
    z-index: 2;
}

/* Gradients Bootstrap personnalisés */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

/* Rounded Bootstrap étendu */
.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-pill {
    border-radius: 50rem !important;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .events-hero {
        min-height: 50vh;
    }

    .hero-illustration {
        margin-top: 2rem;
    }

    .floating-card {
        padding: 2rem;
    }

    .calendar-title {
        font-size: 1.2rem;
    }

    .calendar-day-modern {
        height: 80px !important;
    }

    .day-content-modern {
        padding: 0.5rem 0.25rem;
        min-height: 70px;
    }

    .event-image {
        height: 200px;
    }

    .stat-card h4 {
        font-size: 1.25rem;
    }

    .cta-section .row {
        text-align: center;
    }

    .cta-section .col-lg-8 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .modern-calendar-table {
        font-size: 0.8rem;
        border-spacing: 1px;
    }

    .calendar-day-modern {
        height: 70px !important;
    }

    .day-header-modern {
        padding: 0.75rem 0.25rem;
        font-size: 0.8rem;
    }

    .day-content-modern {
        padding: 0.25rem 0.15rem;
        min-height: 60px;
    }

    .event-indicator-modern {
        font-size: 0.6rem !important;
        padding: 1px 2px !important;
    }

    .next-event-card,
    .no-event-card {
        margin-top: 1rem;
    }
}