/* ========================================
   STYLES MOBILES MODERNES - IMPACT PARE-BRISE
   ======================================== */

/* Variables CSS pour cohérence */
:root {
    --primary-color: #1a237e;
    --primary-dark: #0d1854;
    --accent-color: #76ff03;
    --accent-dark: #64dd17;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --transition-base: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 15px;
    --touch-target: 44px;
}

/* Reset mobile spécifique */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========================================
   1. HERO SECTION - CAROUSEL INTERACTIF
   ======================================== */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding-bottom: 80px; /* Espace pour bottom nav */
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        padding: 80px 15px 0;
        gap: 1.5rem;
    }
    
    /* Hero Features Carousel */
    .hero-features {
        position: relative;
        overflow: visible;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .hero-features-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 1rem;
        padding: 0.5rem 0 1.5rem;
    }
    
    .hero-features-carousel::-webkit-scrollbar {
        display: none;
    }
    
    .hero-features .feature-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(118, 255, 3, 0.3);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
        transform: scale(0.95);
        transition: all 0.3s ease;
        cursor: grab;
        padding: 1.5rem;
    }
    
    .hero-features .feature-card:active {
        cursor: grabbing;
    }
    
    .hero-features .feature-card.active {
        transform: scale(1);
        box-shadow: 0 12px 35px rgba(26, 35, 126, 0.25);
        border-color: var(--accent-color);
    }
    
    .feature-card i {
        font-size: 2.5rem;
        background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: iconFloat 3s ease-in-out infinite;
    }
    
    @keyframes iconFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }
    
    .feature-card h3 {
        color: var(--primary-color);
        font-size: 1.1rem;
        margin: 1rem 0 0.5rem;
    }
    
    .feature-card p {
        color: var(--text-light);
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Carousel Indicators */
    .hero-carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
        border: none;
        cursor: pointer;
        transition: all var(--transition-base);
        position: relative;
    }
    
    .carousel-indicator.active {
        background: var(--accent-color);
        transform: scale(1.3);
        box-shadow: 0 0 10px rgba(118, 255, 3, 0.5);
    }
    
    .carousel-indicator.active::after {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        border: 2px solid var(--accent-color);
        border-radius: 50%;
        animation: indicatorPulse 2s ease-in-out infinite;
    }
    
    @keyframes indicatorPulse {
        0%, 100% { opacity: 0; transform: scale(1); }
        50% { opacity: 0.5; transform: scale(1.5); }
    }
    
    /* Hero Image avec Parallaxe */
    .hero-image {
        position: relative;
        height: 300px;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .floating-car {
        position: relative;
        width: 90%;
        max-width: 400px;
        height: auto;
        transform: scale(1);
        filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
        margin: 0 auto;
    }
}

/* Breakpoints responsive supplémentaires pour l'image Mercedes */
@media (max-width: 480px) {
    .hero-image {
        height: 250px;
    }
    
    .floating-car {
        width: 95%;
        max-width: 350px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .hero-image {
        height: 280px;
    }
    
    .floating-car {
        width: 85%;
        max-width: 380px;
    }
}

@media (max-width: 768px) {
    /* CTA Flottants avec Pulsation */
    .hero-cta {
        position: fixed;
        bottom: 90px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 1rem;
        padding: 0 20px;
        z-index: 100;
    }
    
    .hero-cta .btn-primary {
        animation: ctaPulse 2s ease-in-out infinite;
        box-shadow: 0 8px 25px rgba(118, 255, 3, 0.4);
    }
    
    .hero-cta .btn-secondary {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        color: var(--primary-color);
        border: 2px solid var(--accent-color);
    }
    
    @keyframes ctaPulse {
        0%, 100% { 
            transform: scale(1); 
            box-shadow: 0 8px 25px rgba(118, 255, 3, 0.4);
        }
        50% { 
            transform: scale(1.05); 
            box-shadow: 0 12px 35px rgba(118, 255, 3, 0.6);
        }
    }
}

/* ========================================
   2. SERVICES - NAVIGATION TABBED
   ======================================== */
@media (max-width: 768px) {
    .services-section {
        padding: 3rem 0;
    }
    
    /* Tabs Container */
    .services-mobile-tabs {
        display: flex;
        overflow-x: auto;
        gap: 0.8rem;
        margin-bottom: 2rem;
        padding: 0 15px 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .services-mobile-tabs::-webkit-scrollbar {
        display: none;
    }
    
    /* Tab Items */
    .service-tab {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 1rem 1.5rem;
        background: var(--white);
        border: 2px solid var(--bg-light);
        border-radius: 25px;
        text-align: center;
        cursor: pointer;
        transition: all var(--transition-base);
        scroll-snap-align: center;
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .service-tab:active {
        transform: scale(0.95);
    }
    
    .service-tab.active {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: var(--white);
        border-color: var(--accent-color);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(26, 35, 126, 0.3);
    }
    
    .service-tab i {
        font-size: 1.8rem;
        transition: all var(--transition-base);
    }
    
    .service-tab.active i {
        animation: iconBounce 0.5s ease;
    }
    
    @keyframes iconBounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-5px); }
    }
    
    .service-tab span {
        font-size: 0.85rem;
        font-weight: 600;
    }
    
    /* Service Content avec Preview Cards */
    .service-content-wrapper {
        position: relative;
        overflow: hidden;
    }
    
    .service-content {
        display: none;
        animation: fadeInUp 0.5s ease;
    }
    
    .service-content.active {
        display: block;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Service Preview Cards */
    .service-preview-card {
        background: var(--white);
        border-radius: var(--border-radius);
        overflow: hidden;
        margin-bottom: 1.5rem;
        box-shadow: var(--shadow-md);
        transition: all var(--transition-base);
        cursor: pointer;
    }
    
    .service-preview-card.expanded {
        transform: scale(1.02);
        box-shadow: var(--shadow-lg);
    }
    
    .service-preview-header {
        padding: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(135deg, var(--bg-light), var(--white));
    }
    
    .service-preview-header h3 {
        color: var(--primary-color);
        font-size: 1.2rem;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
    
    .service-preview-header i {
        font-size: 1.5rem;
        color: var(--accent-color);
    }
    
    .expand-icon {
        color: var(--accent-color);
        transition: transform var(--transition-base);
        font-size: 1.2rem;
    }
    
    .service-preview-card.expanded .expand-icon {
        transform: rotate(180deg);
    }
    
    .service-preview-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-smooth);
    }
    
    .service-preview-card.expanded .service-preview-content {
        max-height: 500px;
    }
    
    .service-preview-inner {
        padding: 0 1.5rem 1.5rem;
    }
    
    /* Service Video Preview */
    .service-video-preview {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 aspect ratio */
        margin-bottom: 1rem;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .service-video-preview video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ========================================
   3. PROCESS - TIMELINE HORIZONTALE
   ======================================== */
@media (max-width: 768px) {
    .process-section {
        padding: 3rem 0;
        background: var(--bg-light);
    }
    
    /* Timeline Container */
    .process-timeline-mobile {
        position: relative;
        margin: 2rem 0;
    }
    
    .timeline-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 2rem 15px 3rem;
        scrollbar-width: none;
    }
    
    .timeline-track::-webkit-scrollbar {
        display: none;
    }
    
    /* Timeline Line */
    .timeline-line {
        position: absolute;
        top: 3rem;
        left: 15px;
        right: 15px;
        height: 2px;
        background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
        z-index: 0;
    }
    
    /* Timeline Step */
    .timeline-step {
        flex: 0 0 280px;
        scroll-snap-align: center;
        position: relative;
        cursor: pointer;
        transition: all var(--transition-base);
    }
    
    .timeline-step:active {
        transform: scale(0.98);
    }
    
    /* Step Number */
    .step-number-circle {
        width: 60px;
        height: 60px;
        background: var(--white);
        border: 3px solid var(--primary-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1rem;
        position: relative;
        z-index: 2;
        transition: all var(--transition-base);
        box-shadow: var(--shadow-md);
    }
    
    .timeline-step.active .step-number-circle {
        background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
        border-color: var(--accent-color);
        transform: scale(1.15);
        box-shadow: 0 8px 25px rgba(118, 255, 3, 0.4);
    }
    
    .step-number-circle span {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    .timeline-step.active .step-number-circle span {
        color: var(--white);
    }
    
    /* Step Card */
    .timeline-card {
        background: var(--white);
        border-radius: var(--border-radius);
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        transform: translateY(0);
        transition: all var(--transition-base);
        min-height: 180px;
        position: relative;
        overflow: hidden;
    }
    
    .timeline-step:hover .timeline-card,
    .timeline-step.active .timeline-card {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }
    
    .timeline-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
        transform: scaleX(0);
        transition: transform var(--transition-base);
    }
    
    .timeline-step.active .timeline-card::before {
        transform: scaleX(1);
    }
    
    .timeline-card h3 {
        color: var(--primary-color);
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .timeline-card p {
        color: var(--text-light);
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* Progress Dots */
    .timeline-progress {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .timeline-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        transition: all var(--transition-base);
        cursor: pointer;
    }
    
    .timeline-dot.active {
        background: var(--accent-color);
        transform: scale(1.5);
    }
}

/* ========================================
   4. BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    z-index: 1000;
    display: none;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
}

.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    min-height: var(--touch-target);
    cursor: pointer;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    transition: all var(--transition-base);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.bottom-nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 0 0 3px 3px;
    transition: transform var(--transition-base);
}

.bottom-nav-item.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Floating Action Button Multi-actions */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
}

@media (max-width: 768px) {
    .hero-cta {
        position: static;
        margin-top: 2rem;
    }
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: var(--primary-color);
    border: none;
    box-shadow: 0 8px 25px rgba(118, 255, 3, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-base);
    position: relative;
    z-index: 2;
}

.fab-main:active {
    transform: scale(0.95);
}

.fab-main.active {
    transform: rotate(45deg);
    background: var(--primary-color);
    color: var(--white);
}

.fab-actions {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
}

.fab-actions.active {
    opacity: 1;
    pointer-events: auto;
}

.fab-action {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--bg-light);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-base);
    transform: scale(0);
    font-size: 1.2rem;
}

.fab-actions.active .fab-action {
    transform: scale(1);
}

.fab-actions.active .fab-action:nth-child(1) {
    transition-delay: 0.1s;
}

.fab-actions.active .fab-action:nth-child(2) {
    transition-delay: 0.2s;
}

.fab-actions.active .fab-action:nth-child(3) {
    transition-delay: 0.3s;
}

.fab-action:active {
    transform: scale(0.9);
}

.fab-action.whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.fab-action.call {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   5. ANIMATIONS & UTILITIES
   ======================================== */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Touch Feedback */
.touch-feedback {
    position: relative;
    overflow: hidden;
}

.touch-feedback::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.touch-feedback:active::before {
    width: 200px;
    height: 200px;
}

/* Haptic-like Animation */
@keyframes hapticFeedback {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

.haptic {
    animation: hapticFeedback 0.1s ease;
}

/* Swipe Hint */
.swipe-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.3rem;
    opacity: 0.6;
    animation: swipeHint 2s ease-in-out infinite;
}

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

.swipe-hint span {
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* ========================================
   OPTIMISATION SCROLL MOBILE (Anti-reload)
   ======================================== */

/* Optimiser les performances de scroll */
.scrolling {
    pointer-events: none;
}

.scrolling * {
    pointer-events: none;
}

/* Désactiver le bounce scroll sur iOS */
body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Optimisations de performance mobile */
@media (max-width: 768px) {
    /* Réduire les repaints/reflows */
    * {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    /* Optimiser les transitions et animations */
    .touch-feedback,
    .carousel-indicator,
    .timeline-dot,
    .service-tab {
        will-change: transform;
        transform-style: preserve-3d;
    }
    
    /* Éviter les problèmes de scroll bounce */
    .hero-features-carousel,
    .timeline-track,
    .cities-chips {
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimiser les animations lors du scroll */
    @media (prefers-reduced-motion: no-preference) {
        .animate {
            animation-duration: 0.6s;
            animation-fill-mode: both;
            animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }
    }
    
    /* Réduire les animations si demandé */
    @media (prefers-reduced-motion: reduce) {
        .animate,
        .touch-feedback,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* États de performance pour les éléments interactifs */
.touching {
    transform: scale(0.98);
    opacity: 0.8;
    transition: all 0.1s ease;
}

.haptic {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

/* Optimisations spécifiques pour les carousels */
@media (max-width: 768px) {
    .hero-features-carousel,
    .timeline-track {
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .hero-features-carousel::-webkit-scrollbar,
    .timeline-track::-webkit-scrollbar {
        display: none;
    }
}

/* ========================================
   CORRECTIONS SECTION FRANCHISE OFFERTE MOBILE
   ======================================== */
@media (max-width: 768px) {
    /* Tailles optimisées pour le tactile (minimum 44px selon guidelines) */
    .gift-item {
        width: 110px !important; /* Augmentation de 85px à 110px pour meilleur confort tactile */
        height: auto;
        min-width: 95px;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Repositionnement intelligent pour visibilité optimale - tous les coffrets visibles */
    .gift-item:nth-child(1) { 
        top: 5%; 
        left: 10%; 
        width: 110px !important;
        z-index: 6;
    }
    .gift-item:nth-child(2) { 
        top: 8%; 
        right: 10%; 
        width: 105px !important;
        z-index: 6;
    }
    .gift-item:nth-child(3) { 
        bottom: 8%; 
        left: 12%; 
        width: 115px !important;
        z-index: 6;
    }
    .gift-item:nth-child(4) { 
        bottom: 5%; 
        right: 12%; 
        width: 110px !important;
        z-index: 6;
    }
    .gift-item:nth-child(5) { 
        top: 35%; 
        left: 2%; 
        width: 100px !important;
        z-index: 6;
    }
    .gift-item:nth-child(6) { 
        top: 55%; 
        right: 2%; 
        width: 105px !important;
        z-index: 6;
    }
    
    /* Feedback tactile amélioré avec vibration */
    .gift-item:active {
        transform: scale(0.95) !important;
        animation: giftTouchPulse 0.3s ease;
    }
    
    /* Animation de pulse au touch */
    @keyframes giftTouchPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(0.95); }
    }
    
    /* Débordement contrôlé avec plus d'espace */
    .offer-section {
        overflow: visible !important; /* Permet aux coffrets de déborder */
        padding: 8rem 0 5rem; /* Plus d'espace vertical */
        position: relative;
        min-height: 600px; /* Hauteur minimale pour contenir les coffrets */
    }
    
    /* Contenu principal bien au premier plan - opacité supprimée */
    .offer-content {
        z-index: 7 !important;
        position: relative;
        background: transparent; /* Suppression du fond semi-transparent */
        backdrop-filter: none; /* Suppression du blur */
        border-radius: 20px;
        padding: 2rem;
        margin: 2rem 1rem;
    }
    
    /* S'assurer que le texte est bien visible */
    .offer-content h2,
    .offer-content h3,
    .offer-content p,
    .offer-content .offer-badge,
    .offer-content .offer-plus,
    .offer-content .cta-franchise {
        opacity: 1 !important; /* Forcer l'opacité à 100% */
    }
    
    /* Amélioration du contraste du texte */
    .offer-content h2,
    .offer-content h3,
    .offer-content p,
    .cta-franchise {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    /* Overlays repositionnés pour ne pas gêner */
    .offer-section::before {
        z-index: 2 !important;
        opacity: 0.3;
    }
    
    .offer-section::after {
        z-index: 3 !important;
        opacity: 0.6;
    }
    
    /* Triangles repositionnés pour mobile */
    .offer-section .triangle {
        z-index: 4 !important;
    }
}

/* Corrections spécifiques pour petits mobiles */
@media (max-width: 480px) {
    .gift-item {
        width: 75px !important;
        min-width: 70px;
    }
    
    .gift-item:nth-child(1) { width: 75px !important; }
    .gift-item:nth-child(2) { width: 70px !important; }
    .gift-item:nth-child(3) { width: 80px !important; }
    .gift-item:nth-child(4) { width: 75px !important; }
    .gift-item:nth-child(5) { width: 65px !important; }
    .gift-item:nth-child(6) { width: 70px !important; }
    
    .offer-section {
        padding: 6rem 0 3rem;
    }
    
    .offer-content {
        margin: 1rem 0.5rem;
        padding: 1.5rem;
    }
}

/* Corrections pour écrans très larges en mode paysage mobile */
@media (max-width: 896px) and (max-height: 414px) and (orientation: landscape) {
    .gift-item {
        width: 60px !important;
    }
    
    .offer-section {
        padding: 4rem 0 2rem;
    }
    
    /* Repositionnement pour paysage */
    .gift-item:nth-child(5) { 
        top: 10%; 
        left: -3%; 
        width: 55px !important;
    }
    .gift-item:nth-child(6) { 
        top: 35%; 
        right: -3%; 
        width: 60px !important;
    }
}

/* Masquer certains éléments non essentiels sur mobile */
@media (max-width: 768px) {
    .floating-badge,
    .floating-badge-2,
    .floating-badge-3 {
        display: none !important;
    }
}


/* ========================================
   MODAL DE RÉVÉLATION AMÉLIORÉ MOBILE
   ======================================== */
@media (max-width: 768px) {
    /* Modal principal optimisé - CORRECTION COMPLÈTE */
    .gift-reveal-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        min-height: -webkit-fill-available !important; /* iOS fix */
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 3003 !important;
        padding: 1rem !important;
        backdrop-filter: blur(20px) !important;
        background: rgba(26, 35, 126, 0.95) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        /* iOS specific fixes */
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        will-change: opacity, transform !important;
    }
    
    /* Forcer l'affichage quand visible */
    .gift-reveal-modal.visible {
        display: flex !important;
        opacity: 1 !important;
    }
    
    .gift-reveal-content {
        width: 95% !important;
        max-width: 400px !important;
        max-height: 85vh !important;
        padding: 2rem 1.5rem !important;
        border-radius: 25px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
        border: 3px solid #76ff03 !important;
        background: #ffffff !important;
        position: relative !important;
        overflow-y: auto !important;
        margin: auto !important;
        /* Centrage parfait */
        transform: translateZ(0) !important;
        -webkit-transform: translateZ(0) !important;
        /* iOS fixes */
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        /* Assurer la visibilité */
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 3004 !important;
    }
    
    /* Désactiver les effets qui peuvent causer des problèmes */
    .gift-reveal-content::before {
        content: none !important;
        display: none !important;
    }
    
    .gift-reveal-content::after {
        content: none !important;
        display: none !important;
    }
    
    /* Header simplifié pour mobile */
    .gift-reveal-header {
        margin-bottom: 2rem !important;
    }
    
    .gift-reveal-header h2 {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
        /* Simplifier l'animation pour mobile */
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        color: #1a237e !important;
    }
    
    .gift-reveal-header p {
        font-size: 1rem !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        color: #666 !important;
    }
    
    /* Image simplifiée pour mobile */
    .gift-reveal-image {
        margin: 2rem 0 !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .gift-reveal-image img {
        max-height: 200px !important;
        max-width: 100% !important;
        object-fit: contain !important;
        filter: drop-shadow(0 15px 35px rgba(26, 35, 126, 0.3)) !important;
    }
    
    /* Titres simplifiés pour mobile */
    .gift-reveal-title {
        margin: 1.5rem 0 !important;
    }
    
    .gift-reveal-title h3 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        color: #1a237e !important;
    }
    
    /* Sous-titre simplifié */
    #gift-reveal-subtitle-text {
        font-size: 1rem !important;
        color: #666 !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Boutons simplifiés pour mobile */
    .gift-reveal-actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        margin-top: 1rem !important;
    }
    
    /* Bouton optimisé pour mobile */
    .btn-another-gift {
        background: linear-gradient(135deg, #1a237e, #3949ab) !important;
        color: white !important;
        padding: 1rem 2rem !important;
        border: none !important;
        border-radius: 30px !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        box-shadow: 0 8px 25px rgba(26, 35, 126, 0.3) !important;
        position: relative !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 300px !important;
        justify-content: center !important;
    }
    
    /* Simplifier les effets pour mobile */
    .btn-another-gift::before {
        display: none !important;
    }
    
    .btn-another-gift:active {
        transform: scale(0.95) !important;
        opacity: 0.9 !important;
    }
    
    /* Bouton de fermeture optimisé pour mobile */
    .gift-reveal-close {
        position: absolute !important;
        top: 15px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 50% !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        font-size: 1.5rem !important;
        color: #666 !important;
        transition: all 0.3s ease !important;
        z-index: 3005 !important;
    }
    
    .gift-reveal-close:active {
        background: rgba(220, 53, 69, 0.9) !important;
        color: white !important;
        transform: scale(1.1) !important;
    }
}

/* CORRECTION CONFETTI CANVAS - POSITION ABSOLUE AU-DESSUS DE TOUT */
.confetti-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 3005 !important;
    /* iOS fixes */
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
}

/* Animations simplifiées pour mobile - CORRECTION */
@media (max-width: 768px) {
    /* Désactiver les animations complexes qui peuvent causer des problèmes */
    .gift-reveal-content * {
        animation: none !important;
    }
    
    /* Performance optimizations */
    .gift-reveal-modal {
        -webkit-transform: translateZ(0) !important;
        transform: translateZ(0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        will-change: opacity !important;
    }
}

/* ========================================
   PAGE SERVICES - MOBILE LAYOUT FIX V2
   ======================================== */
@media (max-width: 768px) {
    .service-detail-content {
        display: flex;
        flex-direction: column;
    }

    /* On réinitialise l'ordre pour la classe .reverse pour qu'elle suive l'ordre du DOM */
    .service-detail-card.reverse .service-detail-text,
    .service-detail-card.reverse .service-detail-image {
        order: unset;
    }

    .service-detail-image {
        margin-top: 2rem; /* Espace entre le texte et l'image */
    }
}
