/* MUSEO - Styles principaux */

/* Variables CSS - Palette Professionnelle Musée */
:root {
    --primary-color: #1a4d7a;
    --secondary-color: #c9a961;
    --accent-color: #2c5f8d;
    --success-color: #10b981;
    --info-color: #3b82f6;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #1e293b;
    --dark-color: #0f172a;
    --white: #ffffff;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    
    /* Gradients professionnels */
    --gradient-primary: linear-gradient(135deg, #1a4d7a 0%, #2c5f8d 100%);
    --gradient-hero: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.6) 100%);
    --gradient-weather: linear-gradient(135deg, #1e293b, #334155);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --gradient-accent: linear-gradient(135deg, #c9a961 0%, #dfc480 100%);
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    
    /* Border radius */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Reset et base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations supplémentaires pour les CTA */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Animation pour les cartes au hover */
.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--dark-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 212, 170, 0.1) 0%, transparent 50%);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-weight: 700;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

/* Navigation */
.navbar {
    background: none !important;
    backdrop-filter: none;
    box-shadow: none;
    transition: var(--transition);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border: none;
    padding: 1.25rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: var(--transition);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    font-size: 1.5rem;
}

.logo-icon {
    filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.6));
    transition: var(--transition);
    height: auto;
    max-height: 70px;
}

.logo-icon:hover {
    filter: drop-shadow(0 0 25px rgba(99, 102, 241, 1));
    transform: scale(1.05);
}

.navbar-brand:hover {
    transform: translateY(-1px);
    text-shadow: 0 0 25px rgba(99, 102, 241, 1);
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: var(--white) !important;
    transition: var(--transition);
    position: relative;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    background: none;
    backdrop-filter: none;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 20px rgba(99, 102, 241, 1);
    background: none;
    transform: translateY(-2px);
    box-shadow: none;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 5px;
    left: 50%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
    font-weight: 700;
    background: none;
}

.navbar-nav .nav-link.active::after {
    width: 80%;
    background: linear-gradient(90deg, var(--secondary-color), var(--secondary-color));
    height: 3px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    background: 
        url('../public/images/louvre.png'),
        linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    background-size: cover;
    background-position: center center;
    background-attachment: scroll; /* Changé de fixed pour meilleur responsive */
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    height: auto; /* avoid fixed 100vh on mobile (address bar issues) */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Optimisations de performance */
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Overlay sombre pour améliorer la lisibilité du texte */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    z-index: 1;
}

/* Conteneur du contenu hero */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 90%;
    width: 100%;
    padding: 2rem 1rem;
    margin: 0 auto;
}

/* Wrapper sans fond - texte direct sur l'image */
.hero-text-wrapper {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 1rem;
    box-shadow: none;
    animation: fadeInScale 0.8s ease-out;
    max-width: 1200px;
    margin: 0 auto;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Titre principal avec gradient doré et ombres multiples renforcées - RESPONSIVE */
.hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem); /* Taille fluide entre 2rem et 4.5rem */
    font-weight: 900;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.2;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffa500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 1))
            drop-shadow(0 0 30px rgba(255, 215, 0, 0.8))
            drop-shadow(0 0 60px rgba(255, 215, 0, 0.4));
    padding: 0 0.5rem;
}

/* Sous-titre avec meilleure visibilité - ombres ultra fortes - RESPONSIVE */
.hero-subtitle {
    font-size: clamp(1.2rem, 4vw, 2rem); /* Taille fluide entre 1.2rem et 2rem */
    color: #ffffff;
    font-weight: 700;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 1),
        0 6px 20px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(99, 102, 241, 0.7),
        0 0 80px rgba(99, 102, 241, 0.4);
    letter-spacing: 0.5px;
    padding: 0 0.5rem;
}

/* Description sans fond - ombres puissantes pour lisibilité - RESPONSIVE */
.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.3rem); /* Taille fluide entre 1rem et 1.3rem */
    color: #ffffff;
    max-width: min(800px, 90%);
    margin: 0 auto clamp(1.5rem, 3vw, 2.5rem) auto;
    line-height: 1.8;
    font-weight: 500;
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 1),
        0 6px 16px rgba(0, 0, 0, 0.9),
        0 10px 30px rgba(0, 0, 0, 0.7);
    background: none;
    padding: 0 1rem;
    border-radius: 0;
    border: none;
}

/* Boutons hero améliorés - RESPONSIVE */
.hero-buttons {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.btn-hero-primary, .btn-hero-secondary {
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.5rem);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.6s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.btn-hero-primary {
    background: linear-gradient(135deg, #c9a961 0%, #dfc480 100%);
    color: #0f172a;
    border: 3px solid #c9a961;
    transition: all 0.8s ease;
    font-weight: 800;
}

.btn-hero-primary:hover {
    background: linear-gradient(135deg, #1a4d7a 0%, #2c5f8d 100%);
    color: white;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(201, 169, 97, 0.5),
        0 0 40px rgba(201, 169, 97, 0.7);
    border-color: #dfc480;
    transition: all 0.8s ease;
}

.btn-hero-secondary {
    background: rgba(26, 77, 122, 0.2);
    backdrop-filter: blur(10px);
    color: #ffffff;
    border: 3px solid #ffffff;
    transition: all 0.8s ease;
    font-weight: 800;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #1a4d7a;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 
        0 15px 40px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.6);
    border-color: #c9a961;
    transition: all 0.8s ease;
}

/* Indicateur de scroll */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
    color: #ffd700;
    font-size: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Animations d'entrée */
.animate-up {
    animation: slideUp 0.8s ease-out;
}

.animate-up-delay-1 {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.animate-up-delay-2 {
    animation: slideUp 0.8s ease-out 0.4s both;
}

.animate-up-delay-3 {
    animation: slideUp 0.8s ease-out 0.6s both;
}

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

/* Section moderne avec meilleure visibilité */
.modern-section {
    background: rgba(15, 23, 42, 0.95);
    position: relative;
}

.section-header {
    margin-bottom: 2rem;
}

/* ========== OVERLAY BACKDROP POUR MENU (tous écrans responsive) ========== */
/* Overlay flou/opaque qui apparaît DERRIÈRE le menu hamburger */
.navbar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1030; /* DERRIÈRE tout */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.navbar-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Cliquable seulement quand visible */
}

/* ========== RESPONSIVE TOUS ÉCRANS - TABLETTES & MOBILES (max-width: 992px) ========== */
@media (max-width: 992px) {
    /* Navbar container - force flex layout - AU-DESSUS de l'overlay */
    .navbar {
        padding: 0.9rem 0;
        position: relative;
        z-index: 1050; /* Au-dessus de l'overlay (1030) */
    }
    
    .navbar .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    /* Logo responsive - doit rester visible */
    .navbar-brand {
        position: relative;
        z-index: 1055; /* Au-dessus de l'overlay */
    }
    
    .logo-icon {
        max-height: 60px;
    }
    
    /* Hamburger button - toujours à droite - STYLE UNIFORME */
    .navbar-toggler {
        margin-left: auto;
        margin-right: 0;
        border: none;
        background: rgba(15, 23, 42, 0.7);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-radius: 10px;
        padding: 0.6rem 0.8rem;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1070; /* Encore plus haut */
    }
    
    .navbar-toggler:hover {
        background: rgba(99, 102, 241, 0.2);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
    
    .navbar-toggler:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 215, 0, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 1.8em;
        height: 1.8em;
    }
    
    /* Menu déroulant - BIEN VISIBLE AU-DESSUS de l'overlay */
    .navbar-collapse {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        left: auto;
        width: auto;
        min-width: 260px;
        max-width: 90vw;
        background: rgba(15, 23, 42, 0.92); /* Plus opaque pour être bien visible */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(99, 102, 241, 0.3);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.3);
        border-radius: 16px;
        padding: 1rem 0;
        z-index: 1060; /* AU-DESSUS de l'overlay (1030) mais sous le toggler (1070) */
        margin-top: 0.5rem;
    }
    
    .navbar-collapse.show {
        animation: slideInRight 0.3s ease-out;
    }
    
    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(20px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* Navigation links dans le menu - STYLE UNIFORME */
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
    }
    
    .navbar-nav .nav-link {
        text-align: right;
        padding: 0.9rem 1.5rem !important;
        font-size: 1.05rem;
        margin: 0;
        border-radius: 0;
        background: transparent;
        transition: all 0.25s ease;
        border-left: 3px solid transparent;
    }
    
    .navbar-nav .nav-link:hover {
        background: rgba(99, 102, 241, 0.15);
        border-left-color: #ffd700;
        padding-right: 2rem !important;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    /* Hero adjustments */
    .hero-content {
        padding: 2rem 1rem;
        max-width: 95%;
    }
    
    .hero-section {
        min-height: calc(100vh - 56px);
        height: auto;
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
        background-position: center top;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        white-space: normal;
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
}

/* Ajustements supplémentaires pour tablettes moyennes */
@media (min-width: 769px) and (max-width: 992px) {
    .logo-icon {
        max-height: 65px;
    }
    
    .navbar-collapse {
        min-width: 280px;
    }
    
    .navbar-nav .nav-link {
        font-size: 1.1rem;
        padding: 1rem 1.8rem !important;
    }
}

/* Badges */
.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 30px;
    color: #a5b4fc;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modern-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modern-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Labels de formulaire améliorés */
.form-label {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Inputs modernes */
.modern-input {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #ffffff;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.modern-input:focus {
    background: rgba(15, 23, 42, 0.95);
    border-color: #6366f1;
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        0 5px 15px rgba(99, 102, 241, 0.2);
    color: #ffffff;
    outline: none;
}

.modern-input::placeholder {
    color: #94a3b8;
}

/* Animation fade-in-up */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

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

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 215, 0, 0.4);
}

.museum-card {
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.museum-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 215, 0, 0.4);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    font-weight: 600;
}

.card-img-top {
    transition: var(--transition);
}

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

/* Weather Widget */
.weather-widget {
    background: var(--gradient-weather);
    color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.invalid-feedback {
    font-size: 0.875rem;
    color: var(--danger-color);
}

/* Search Section */
#search {
    position: relative;
    margin-top: 0;
    background: var(--white);
}

.modern-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.modern-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%236366f1" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%238b5cf6" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="%2306b6d4" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.modern-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.modern-title {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 12px;
    transition: all 0.6s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
}

#search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    z-index: -1;
}

/* Statistics */
.statistics .card {
    text-align: center;
    padding: 2rem;
    border: none;
    background: var(--white);
}

.statistics .card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.statistics .card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 40px 0;
    margin-top: 0 !important;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer .text-light {
    color: var(--gray-300) !important;
}

/* Map */
#map, #museumMap {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--gray-500);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid;
}

.alert-info {
    background-color: #e8f4f8;
    border-left-color: var(--info-color);
    color: var(--gray-700);
}

.alert-success {
    background-color: #f0f8f0;
    border-left-color: var(--success-color);
    color: var(--gray-700);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 2px solid var(--gray-300);
    margin: 0 2px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

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

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

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive Design - AMÉLIORÉ POUR TOUS LES ÉCRANS */

/* ========== TRÈS PETITS MOBILES (max-width: 480px) ========== */
@media (max-width: 480px) {
    /* Navbar - ajustements finaux petits écrans */
    .navbar {
        padding: 0.6rem 0;
    }
    
    .logo-icon {
        max-height: 50px;
    }
    
    .navbar-toggler {
        padding: 0.5rem 0.65rem;
    }
    
    .navbar-toggler-icon {
        width: 1.5em;
        height: 1.5em;
    }
    
    .navbar-collapse {
        min-width: 220px;
        max-width: 88vw;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1.2rem !important;
        font-size: 1rem;
    }
    
    /* Hero section */
    .hero-section {
        background-attachment: scroll;
        background-position: center center;
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-content {
        padding: 1rem 0.5rem;
        max-width: 95%;
    }
    
    .hero-text-wrapper {
        padding: 0.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .scroll-indicator {
        bottom: 1rem;
        font-size: 1.5rem;
    }
}

/* Petits mobiles et mobiles standard (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        background-position: center center;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 1.5rem 1rem;
        max-width: 90%;
    }
    
    .hero-buttons {
        gap: 1rem;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        min-width: 160px;
    }
}

/* Tablettes (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 85%;
        padding: 2rem 1.5rem;
    }
    
    .hero-title {
        font-size: clamp(3rem, 5vw, 4rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1.5rem, 3.5vw, 1.8rem);
    }
}

/* Grands écrans (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-content {
        max-width: 80%;
    }
}

/* Très grands écrans (1441px+) */
@media (min-width: 1441px) {
    .hero-content {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 2.2rem;
    }
    
    .hero-description {
        font-size: 1.4rem;
    }
}

/* Mode paysage mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ========== RESPONSIVE COMPLÉMENTAIRE (max-width: 768px) ========== */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 30px;
    }
    
    /* Cartes de musées - responsive grid */
    .museum-card {
        margin-bottom: 1.5rem;
    }
    
    /* Rendre les images fluides */
    .card-img-top {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }
    
    /* Statistics section - amélioration mobile */
    .stats-section .row {
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        font-size: 2rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .statistics .card {
        padding: 1.5rem;
    }
    
    .statistics .card i {
        font-size: 2rem;
    }
    
    .statistics .card h3 {
        font-size: 2rem;
    }
    
    /* Section search - optimisation formulaire */
    .modern-card .card-body {
        padding: 2rem 1.5rem !important;
    }
    
    .modern-section {
        padding: 2rem 0 !important;
    }
    
    .section-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .modern-title {
        font-size: 1.5rem !important;
    }
    
    /* Formulaires - stacking sur mobile */
    #searchForm .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .form-control, .form-select, .modern-input {
        font-size: 16px; /* Évite le zoom automatique sur iOS */
    }
    
    /* Boutons modernes */
    .modern-btn {
        padding: 0.85rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Footer - amélioration mobile */
    .footer {
        padding: 2rem 0;
        text-align: center;
    }
    
    .footer .row > div {
        margin-bottom: 2rem;
    }
    
    .footer h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer ul {
        padding-left: 0;
    }
    
    .footer .col-md-4 {
        text-align: center;
    }
    
    /* Container padding général */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Museums section - grille responsive */
    .museums-section .row {
        margin: 0 -0.5rem;
    }
    
    .museums-section .col-md-4 {
        padding: 0 0.5rem;
    }
}

/* ========== TRÈS PETITS ÉCRANS (max-width: 576px) ========== */
@media (max-width: 576px) {
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Hero - ajustements finaux petits écrans */
    .hero-title {
        font-size: clamp(1.75rem, 9vw, 2.5rem) !important;
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 5vw, 1.3rem) !important;
    }
    
    .hero-description {
        font-size: 0.95rem !important;
        line-height: 1.6;
    }
    
    /* Stats - 2 colonnes sur petits écrans */
    .stats-section .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .stat-card {
        padding: 1rem 0.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* Section padding réduit */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Cards musées - full width */
    .museum-card {
        margin-bottom: 1rem;
    }
    
    /* Footer compact */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    .footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    /* Navbar toggler plus petit */
    .navbar-toggler {
        padding: 0.4rem 0.6rem;
    }
    
    .navbar-toggler-icon {
        width: 1.5em;
        height: 1.5em;
    }
    
    /* Menu déroulant ajusté */
    .navbar-collapse {
        min-width: 200px;
        max-width: 85vw;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1.2rem !important;
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn, .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid var(--gray-300) !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12px !important;
        line-height: 1.4;
    }
    
    .hero-section {
        background: none !important;
        color: var(--dark-color) !important;
        padding: 20px 0 !important;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.border-gradient {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
}

/* Custom Scrollbar - WebKit only */
@supports selector(::-webkit-scrollbar) {
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--gray-100);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--gradient-primary);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(45deg, #5a6fd8, #6a4190);
    }
}

/* Search Suggestions Home - from index.php */
.search-suggestions-home {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-suggestions-home.show {
    display: block;
}

.suggestion-item-home {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item-home:last-child {
    border-bottom: none;
}

.suggestion-item-home:hover {
    background: #f8fafc;
}

.suggestion-name-home {
    font-weight: 600;
    color: #1a4d7a;
    margin-bottom: 4px;
}

.suggestion-location-home {
    font-size: 0.875rem;
    color: #64748b;
}

.no-suggestions-home {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
}

[data-theme="dark"] .search-suggestions-home {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .suggestion-item-home:hover {
    background: #334155;
}

[data-theme="dark"] .suggestion-name-home {
    color: #93c5fd;
}

[data-theme="dark"] .suggestion-location-home {
    color: #cbd5e1;
}

/* Museum Result Cards - from index.php */
.museum-result-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.museum-result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.museum-result-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.museum-result-card .card-body {
    padding: 1.5rem;
}

.museum-result-card .museum-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a4d7a;
    margin-bottom: 0.75rem;
}

.museum-result-card .museum-location {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.museum-result-card .museum-category {
    display: inline-block;
    background: linear-gradient(135deg, #c9a961 0%, #dfc480 100%);
    color: #0f172a;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.museum-result-card .museum-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #c9a961;
    margin-bottom: 1rem;
}

.museum-result-card .btn-details {
    width: 100%;
    background: linear-gradient(135deg, #1a4d7a 0%, #2c5f8d 100%);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.museum-result-card .btn-details:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(26, 77, 122, 0.3);
}

[data-theme="dark"] .museum-result-card {
    background: #1e293b;
}

[data-theme="dark"] .museum-result-card .museum-name {
    color: #93c5fd;
}

[data-theme="dark"] .museum-result-card .museum-location {
    color: #cbd5e1;
}

/* Cookie Banner Animation - from cookie-banner.php */
#cookieConsent {
    transform: translateY(100%);
}
