/* Variables */
:root {
    --primary-color: #ff4d4d;
    --secondary-color: #333;
    --accent-color: #ff8c00;
    --text-color: #333;
    --light-color: #f4f4f4;
    --dark-color: #222;
    --gray-color: #888;
    --border-color: #ddd;
    --font-main: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --transition: all 0.3s ease;
    
    /* Responsive breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large-desktop: 1200px;
}

/* Lecteur radio intégré dans l'en-tête */
.header-radio-player {
    background: rgba(31, 41, 55, 0.9);
    border: 1px solid rgba(75, 85, 99, 0.5);
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.header-radio-player iframe {
    border-radius: 4px;
    background: #000;
    width: 100%;
    max-width: 100%;
}

/* Lecteur flottant - styles forcés */
#floating-player {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

/* Animation pour l'indicateur EN DIRECT */
@keyframes live-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

.live-indicator {
    animation: live-pulse 2s infinite;
}

/* Animation pour les ondes radio */
@keyframes radio-waves {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.radio-wave {
    position: absolute;
    border: 2px solid #ef4444;
    border-radius: 50%;
    animation: radio-waves 2s infinite;
}

.radio-wave:nth-child(2) {
    animation-delay: 0.5s;
}

.radio-wave:nth-child(3) {
    animation-delay: 1s;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f9f9f9;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    /* Touch-friendly tap targets */
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
}

/* Container responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 15px;
    }
}

/* Chat en direct */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ff6b6b;
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.05);
    background-color: #ff5252;
}

.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    opacity: 0;
}

.chat-container.open {
    transform: scale(1);
    opacity: 1;
}

.chat-header {
    background-color: #ff6b6b;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.chat-online {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.chat-online i {
    color: #4CAF50;
    margin-right: 5px;
    font-size: 10px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-break: break-word;
    background-color: #f1f1f1;
    align-self: flex-start;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.chat-message--user {
    background-color: #ff6b6b;
    color: white;
    align-self: flex-end;
}

.chat-message--system {
    background-color: #e9ecef;
    color: #495057;
    align-self: center;
    font-style: italic;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 10px;
    max-width: 90%;
}

.chat-message__username {
    font-weight: bold;
    margin-right: 5px;
    font-size: 13px;
}

.chat-message__text {
    font-size: 14px;
}

.chat-message__time {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: -15px;
    right: 10px;
}

.chat-message--user .chat-message__time {
    color: rgba(255, 255, 255, 0.7);
}

.chat-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}

.chat-send {
    background-color: #ff6b6b;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-send:hover {
    background-color: #ff5252;
}

/* Modal nom d'utilisateur */
.username-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.username-modal.show {
    opacity: 1;
    visibility: visible;
}

.username-modal__content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.username-modal.show .username-modal__content {
    transform: translateY(0);
}

.username-modal h3 {
    margin-top: 0;
    color: #333;
}

.username-modal p {
    margin-bottom: 20px;
    color: #666;
}

.username-modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Section commentaires */
.comments-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.comments-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-top: 30px;
}

.comments-list {
    margin-bottom: 40px;
}

.comment {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.comment-date {
    font-size: 12px;
    color: #999;
}

.comment-body {
    margin-bottom: 15px;
}

.comment-body p {
    margin: 0;
    color: #555;
}

.comment-footer {
    display: flex;
    gap: 15px;
}

.comment-like, .comment-reply {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: color 0.2s;
}

.comment-like:hover, .comment-reply:hover {
    color: #ff6b6b;
}

.comment-like i.fas {
    color: #ff6b6b;
}

.comment-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.comment-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.comment-form.replying {
    border: 2px solid #ff6b6b;
    animation: pulse 1s infinite;
}

#cancel-reply {
    margin-left: 10px;
    background-color: #e9ecef;
    color: #495057;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

/* Styles pour les messages du chatbot */
.chat-message.bot-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-left: 4px solid #4f46e5;
}

.chat-message.bot-message .message-user {
    color: #fbbf24;
    font-weight: 600;
}

.chat-message.bot-message .message-content p {
    color: #f3f4f6;
}

/* Indicateur de frappe */
.typing-indicator {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid #6366f1;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #6366f1;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 14px;
    font-size: 14px;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

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

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-weight: 600;
    font-size: 16px;
    padding: 10px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Lecteur audio - Version améliorée */
.player-container {
    background: var(--gradient-dark);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.player-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.player-container.playing {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.player-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.album-art {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: var(--accent-color);
    margin-right: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.playing .album-art {
    transform: scale(1.05);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-info {
    flex: 1;
    transition: all 0.3s ease;
}

.track-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: white;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.artist {
    color: var(--light-text);
    font-size: 0.9rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.track-title.updating, .artist.updating {
    opacity: 0;
    transform: translateY(-5px);
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.play-button:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
}

.play-button:active {
    transform: scale(0.95);
}

.play-button i {
    color: white;
    font-size: 1.2rem;
}

.volume-control {
    flex: 1;
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.volume-control i {
    color: var(--light-text);
    margin-right: 10px;
    width: 20px;
    text-align: center;
    transition: color 0.2s;
}

.volume-control:hover i {
    color: white;
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    margin: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: -100vw 0 0 100vw rgba(255, 255, 255, 0.2);
    border: 2px solid var(--accent-color);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid var(--accent-color);
}

/* Indicateur de statut */
.player-status {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--light-text);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background: #666;
    transition: all 0.3s ease;
}

.status-dot.online {
    background: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #F44336;
}

.status-dot.buffering {
    background: #FFC107;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Notifications du lecteur */
.player-notification {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 0 0 10px 10px;
    text-align: center;
    transition: transform 0.3s ease;
    z-index: 10;
}

.player-notification.show {
    transform: translateY(-50px);
}

.player-notification.error {
    background: rgba(244, 67, 54, 0.9);
}

.player-notification.info {
    background: rgba(33, 150, 243, 0.9);
}

/* Visualisation audio */
.audio-visualizer {
    height: 30px;
    margin-top: 10px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.visualizer-bar {
    width: 3px;
    background: var(--accent-color);
    border-radius: 1px;
    opacity: 0.7;
    transition: height 0.1s ease;
}

/* Featured Section */
.featured {
    padding: 80px 0;
    background-color: white;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.featured-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.featured-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.featured-image {
    height: 200px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-item:hover .featured-image img {
    transform: scale(1.1);
}

.featured-content {
    padding: 20px;
}

.featured-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.featured-content p {
    color: var(--gray-color);
    margin-bottom: 15px;
}

/* News Section */
.news {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-date {
    color: var(--primary-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-item h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.news-item p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover::after {
    margin-left: 10px;
}

/* Newsletter Section */
.newsletter {
    padding: 60px 0;
    background-color: var(--secondary-color);
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.newsletter-content h2 {
    margin-bottom: 20px;
    font-size: 32px;
}

.newsletter-content p {
    margin-bottom: 30px;
    font-size: 18px;
}

#newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

#newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

#newsletter-form button {
    border-radius: 0 4px 4px 0;
    padding: 0 25px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-social h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #bbb;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #bbb;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 36px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        max-height: 300px;
        padding: 20px 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 0 20px;
    }
    
    nav ul li {
        margin: 0;
        margin-bottom: 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    #newsletter-form {
        flex-direction: column;
    }
    
    #newsletter-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    #newsletter-form button {
        border-radius: 4px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 24px;
    }
    
    .featured-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== MOBILE NAVIGATION IMPROVEMENTS ===== */

/* Mobile dropdown functionality */
.mobile-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.mobile-dropdown-toggle.active .fa-chevron-down {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-dropdown-content.show {
    max-height: 300px;
}

/* Mobile menu button improvements */
#mobileMenuToggle {
    position: relative;
    z-index: 60;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#mobileMenuToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#mobileMenuToggle.active {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Mobile menu overlay improvements */
#mobileMenu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Enhanced responsive breakpoints */
@media (max-width: 1024px) {
    /* Tablet adjustments */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    /* Mobile navigation visibility fix */
    .lg\:hidden {
        display: block !important;
    }
    
    .hidden.lg\:flex {
        display: none !important;
    }
    
    /* Header improvements for mobile */
    header {
        padding: 0;
    }
    
    header .container {
        padding: 12px 16px;
    }
    
    /* Logo adjustments for mobile */
    .logo h1 {
        font-size: 18px;
    }
    
    .logo span:last-child {
        font-size: 10px;
    }
    
    /* Hero section mobile optimization */
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 16px;
    }
    
    .hero-content p {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 24px;
        padding: 0 20px;
    }
    
    /* Grid improvements for mobile */
    .featured-grid,
    .news-grid,
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Card improvements for mobile */
    .card {
        margin-bottom: 20px;
    }
    
    .card-content {
        padding: 16px;
    }
    
    /* Button improvements for mobile */
    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        text-align: center;
    }
    
    /* Search bar mobile adjustments */
    .search-container {
        display: none;
    }
    
    /* Footer mobile improvements */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    header .container {
        padding: 10px 12px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 14px;
        padding: 0 10px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    /* Mobile menu improvements for very small screens */
    #mobileMenu .container {
        padding: 0 12px;
    }
    
    #mobileMenu .flex.flex-col {
        padding: 16px 0;
    }
    
    #mobileMenu a {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Cross-browser compatibility improvements */
@supports (-webkit-backdrop-filter: blur(10px)) {
    #mobileMenu {
        -webkit-backdrop-filter: blur(10px);
    }
}

@supports (backdrop-filter: blur(10px)) {
    #mobileMenu {
        backdrop-filter: blur(10px);
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .hero {
        background-attachment: scroll;
    }
    
    .gradient-text {
        background: linear-gradient(135deg, #ef4444, #8b5cf6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* Chrome/Safari specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .hero video {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

/* Corrections spécifiques pour la compatibilité navigateur */

/* Firefox - Corrections spécifiques */
@-moz-document url-prefix() {
    /* Correction pour les flexbox dans Firefox */
    .hero-content {
        display: -moz-box;
        display: -moz-flex;
        display: flex;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -moz-flex-direction: column;
        flex-direction: column;
    }
    
    /* Correction pour les grilles dans Firefox */
    .featured-grid, .news-grid {
        display: -moz-grid;
        display: grid;
    }
    
    /* Correction pour les transformations dans Firefox */
    .mobile-menu-toggle {
        -moz-transform: rotate(0deg);
        transform: rotate(0deg);
        -moz-transition: all 0.3s ease;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active {
        -moz-transform: rotate(90deg);
        transform: rotate(90deg);
    }
}

/* Chrome/Safari - Corrections spécifiques */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Correction pour les flexbox dans Chrome/Safari */
    .hero-content {
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
    }
    
    /* Correction pour les transformations dans Chrome/Safari */
    .mobile-menu-toggle {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
        -webkit-transition: all 0.3s ease;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active {
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
    
    /* Correction pour le scrolling dans Chrome/Safari */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Corrections générales pour tous les navigateurs */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Amélioration de la compatibilité des images */
img {
    max-width: 100%;
    height: auto;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Correction pour les boutons dans tous les navigateurs */
button, .btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: none;
    cursor: pointer;
}

/* Amélioration des transitions pour tous les navigateurs */
.mobile-menu, .mobile-dropdown-content {
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -moz-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -o-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Correction pour les z-index dans tous les navigateurs */
.mobile-menu {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.mobile-menu-toggle {
    z-index: 10000;
    position: relative;
}

/* Amélioration de la lisibilité du texte */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Correction pour les viewport sur mobile */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* Correction pour les tailles de police responsive */
html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
}

/* Correction pour les hauteurs minimales */
.hero-section {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* Correction pour les grilles responsive */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .featured-grid {
        gap: 1rem;
    }
}

/* Correction pour les marges et paddings responsive */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
}