/* === GPCQM 2025 - Responsive Styles === */

/* === Mobile First Approach === */
/* Base styles are mobile-optimized in style.css */

/* === Small Phones (320px - 375px) === */
@media (max-width: 375px) {
    /* Typography adjustments */
    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.725rem; }
    h3 { font-size: 1.4375rem; }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .countdown-value {
        font-size: 1.25rem;
    }
    
    .countdown-item {
        min-width: 55px;
        padding: var(--spacing-xs) var(--spacing-xs);
    }
    
    .countdown-label {
        font-size: 0.65rem;
    }
    
    /* Header adjustments */
    .event-name span:first-child {
        font-size: 0.875rem;
    }
    
    .event-date {
        font-size: 0.75rem;
    }
    
    .logo {
        height: 35px;
    }
}

/* === Medium Phones (376px - 480px) === */
@media (min-width: 376px) and (max-width: 480px) {
    /* Quick Links removed */
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

/* === Large Phones (481px - 640px) === */
@media (min-width: 481px) and (max-width: 640px) {
    .hero-content {
        padding: 6rem var(--spacing-lg);
    }
    
    /* Quick Links removed */
    
    .course-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instagram-feed {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Tablets (641px - 768px) === */
@media (min-width: 641px) and (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-xl);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .countdown-value {
        font-size: 2.5rem;
    }
    
    /* Quick Links removed */
    
    .timeline-item {
        gap: var(--spacing-lg);
    }
    
    .broadcast-cards,
    .contest-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instagram-feed {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Large Tablets (769px - 1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .countdown {
        gap: var(--spacing-xl);
    }
    
    .countdown-item {
        min-width: 100px;
        padding: var(--spacing-xl);
    }
    
    .instagram-feed {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile-Only App - Desktop styles removed for performance */

/* === Mobile-Specific Adjustments === */
@media (max-width: 768px) {
    /* Touch targets optimization */
    button, 
    .action-btn, 
    .map-control {
        min-height: 44px;
        min-width: 44px;
    }
    
    .language-toggle {
        min-height: 36px;
        min-width: 42px;
        padding: var(--spacing-xs) var(--spacing-xs);
        font-size: 0.7rem;
    }
    
    /* Header mobile optimization */
    .header {
        background: #e9f1e2 !important;
        padding: var(--spacing-xs) 0;
    }
    
    .header-content {
        padding: 0 var(--spacing-sm);
        height: 56px;
    }
    
    .logo-container {
        gap: var(--spacing-xs);
    }
    
    .event-name {
        display: flex;
        flex-direction: column;
    }
    
    .event-name-line1,
    .event-name-line2 {
        font-size: 0.94rem; /* Augmenté de 25% */
        line-height: 1.1;
        color: var(--deep-blue);
    }
    
    /* Hero mobile optimization */
    .hero {
        min-height: 400px;
    }
    
    .hero-content {
        padding: 4.5rem var(--spacing-md);
    }
    
    /* Countdown mobile layout - keep on one line */
    .countdown {
        display: flex;
        gap: var(--spacing-xs);
        justify-content: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 var(--spacing-xs);
        max-width: 100%;
    }
    
    .countdown-item {
        flex-shrink: 0;
    }
    
    /* Timeline mobile layout - ultra compact */
    .schedule-section {
        padding: var(--spacing-xl) 0;
    }
    
    .timeline-item {
        flex-direction: row;
        padding: 6px 0; /* Plus d'espace vertical */
        padding-left: 0;
        gap: var(--spacing-sm); /* Plus d'espace entre heure et texte */
        align-items: center;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-item::after {
        display: none;
    }
    
    .timeline-time {
        flex: 0 0 65px; /* Plus d'espace pour l'heure */
        text-align: left; /* Aligné à gauche comme sur le screenshot */
        font-size: 0.8rem; /* Un peu plus grand */
        font-weight: 600;
        color: var(--primary-green);
        padding-right: 10px;
    }
    
    .timeline-content {
        flex: 1;
        margin-left: 0;
        padding: 6px 10px; /* Plus de padding */
        background: transparent; /* Pas de fond pour un look plus clean */
        border-radius: 0;
        border-left: 2px solid var(--primary-green); /* Ligne verticale */
        padding-left: 12px;
    }
    
    .timeline-content h3 {
        font-size: 0.85rem; /* Un peu plus grand */
        margin-bottom: 0;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text-dark);
    }
    
    .timeline-content p {
        display: block;
    }
    
    /* Map mobile optimization */
    .map-wrapper {
        height: 400px;
        overflow: auto;
    }
    
    .course-map {
        width: 150%;
        max-width: none;
    }
    
    .map-popup {
        width: 90%;
        max-width: 300px;
    }
    
    /* Stats mobile grid */
    .course-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer mobile layout */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* Fan village mobile - more compact */
    .fanvillage-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .fanvillage-section {
        padding: var(--spacing-xl) 0;
    }
    
    .info-card {
        padding: var(--spacing-md);
    }
    
    .info-card h3 {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .info-card p,
    .info-card ul li {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .info-card ul li {
        padding: 3px 0;
    }
    
    /* Broadcast mobile */
    .broadcast-cards {
        grid-template-columns: 1fr;
    }
    
    /* Contest mobile */
    .contest-cards {
        grid-template-columns: 1fr;
    }
    
    /* Instagram mobile */
    .instagram-feed {
        grid-template-columns: 1fr;
    }
    
    /* Install prompt mobile */
    .install-prompt {
        bottom: var(--spacing-md);
        width: calc(100% - var(--spacing-xl));
    }
}

/* === Tablet-Specific Adjustments === */
@media (min-width: 769px) and (max-width: 1024px) {
    .event-name {
        display: flex;
    }
    
    .timeline-item {
        padding-left: 0;
    }
    
    .instagram-feed {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .fanvillage-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Landscape Mobile === */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 300px;
    }
    
    .hero-content {
        padding: 3.75rem var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .countdown {
        display: flex;
        max-width: none;
    }
    
    .countdown-item {
        min-width: 80px;
    }
}

/* === High Resolution Displays === */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .logo,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Mobile-Only App - Print styles removed for performance */

/* === Accessibility - Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hotspot-marker.pulse {
        animation: none;
    }
    
    .status-badge.live {
        animation: none;
    }
}

/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
    /* Currently keeping light theme as primary */
}

/* === Focus Visible for Keyboard Navigation === */
*:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

/* === Safe Area Insets for Modern Phones === */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
    
    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .install-prompt {
        bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
    }
}