/* ===================================
   FULLSCREEN V2 - OPTIMIZED LAYOUT
   Système intelligent de disposition
   Mockup + Texte dans le tiers central
   =================================== */

/* === Layout Container === */
.fs-section {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* 25% - 50% - 25% pour les marges */
    grid-template-areas: "left-margin center right-margin";
    align-items: center;
    gap: 0;
    padding: 0;
}

/* Zone centrale (tiers central intelligent) */
.fs-center-zone {
    grid-area: center;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* === Content repositionné === */
.fs-content {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fs-content-inner {
    max-width: 550px;
    width: 100%;
}

/* === Phone Mockup repositionné === */
.fs-phone-mockup {
    position: relative !important;
    width: 320px;
    max-width: 100%;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.6));
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    justify-self: center;
}

.fs-phone-mockup img {
    width: 100%;
    height: auto;
    border-radius: 36px;
    border: 10px solid #1a1f35;
    display: block;
}

/* ==========================================
   LAYOUT PAR SECTION (Alternance intelligente)
   ========================================== */

/* Hero (Section 0) - Centré avec mockup flottant */
.fs-section[data-index="0"] {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fs-section[data-index="0"] .fs-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.fs-section[data-index="0"] .fs-content-inner {
    max-width: 100%;
}

/* Hero mockup positionné de manière élégante */
.fs-section[data-index="0"] .fs-hero-mockup {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(240px, 20vw, 320px);
    z-index: 5;
    animation: heroPhoneFloat 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.95;
}

@keyframes heroPhoneFloat {
    0%, 100% {
        transform: translateY(-50%) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-52%) translateX(-8px) rotate(-1deg);
    }
    50% {
        transform: translateY(-48%) translateX(-5px) rotate(1deg);
    }
    75% {
        transform: translateY(-52%) translateX(5px) rotate(-0.5deg);
    }
}

.fs-section[data-index="0"] .fs-hero-mockup img {
    width: 100%;
    height: auto;
    border-radius: 36px;
    border: 8px solid #1a1f35;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

/* Hide hero mockup on smaller screens */
@media (max-width: 1200px) {
    .fs-section[data-index="0"] .fs-hero-mockup {
        display: none;
    }
    
    .fs-section[data-index="0"] .fs-content {
        max-width: 100%;
        padding: 0 24px;
    }
}

/* Section 1 - TEXTE GAUCHE | MOCKUP DROITE */
.fs-section[data-index="1"] .fs-center-zone {
    grid-template-areas: "text mockup";
}

.fs-section[data-index="1"] .fs-content {
    grid-area: text;
    justify-content: flex-end;
}

.fs-section[data-index="1"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(-3deg);
    animation: phoneFloat1 8s ease-in-out infinite;
}

/* Section 2 - MOCKUP GAUCHE | TEXTE DROITE */
.fs-section[data-index="2"] .fs-center-zone {
    grid-template-areas: "mockup text";
}

.fs-section[data-index="2"] .fs-content {
    grid-area: text;
    justify-content: flex-start;
}

.fs-section[data-index="2"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(4deg);
    animation: phoneFloat2 7s ease-in-out infinite;
}

/* Section 3 - TEXTE GAUCHE | MOCKUP DROITE */
.fs-section[data-index="3"] .fs-center-zone {
    grid-template-areas: "text mockup";
}

.fs-section[data-index="3"] .fs-content {
    grid-area: text;
    justify-content: flex-end;
}

.fs-section[data-index="3"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(-5deg);
    animation: phoneFloat3 9s ease-in-out infinite;
}

/* Section 4 - MOCKUP GAUCHE | TEXTE DROITE */
.fs-section[data-index="4"] .fs-center-zone {
    grid-template-areas: "mockup text";
}

.fs-section[data-index="4"] .fs-content {
    grid-area: text;
    justify-content: flex-start;
}

.fs-section[data-index="4"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(3deg);
    animation: phoneFloat4 6s ease-in-out infinite;
}

/* Section 5 - TEXTE GAUCHE | MOCKUP DROITE */
.fs-section[data-index="5"] .fs-center-zone {
    grid-template-areas: "text mockup";
}

.fs-section[data-index="5"] .fs-content {
    grid-area: text;
    justify-content: flex-end;
}

.fs-section[data-index="5"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(-4deg);
    animation: phoneFloat5 10s ease-in-out infinite;
}

/* Section 6 - MOCKUP GAUCHE | TEXTE DROITE */
.fs-section[data-index="6"] .fs-center-zone {
    grid-template-areas: "mockup text";
}

.fs-section[data-index="6"] .fs-content {
    grid-area: text;
    justify-content: flex-start;
}

.fs-section[data-index="6"] .fs-phone-mockup {
    grid-area: mockup;
    transform: rotate(5deg);
    animation: phoneFloat6 7.5s ease-in-out infinite;
}

/* === Animations float optimisées === */
@keyframes phoneFloat1 {
    0%, 100% { 
        transform: rotate(-3deg) translateY(0) translateX(0); 
    }
    50% { 
        transform: rotate(-1deg) translateY(-20px) translateX(-10px); 
    }
}

@keyframes phoneFloat2 {
    0%, 100% { 
        transform: rotate(4deg) translateY(0) translateX(0); 
    }
    50% { 
        transform: rotate(6deg) translateY(-15px) translateX(10px); 
    }
}

@keyframes phoneFloat3 {
    0%, 100% { 
        transform: rotate(-5deg) translateY(0) scale(1); 
    }
    50% { 
        transform: rotate(-3deg) translateY(-25px) scale(1.02); 
    }
}

@keyframes phoneFloat4 {
    0%, 100% { 
        transform: rotate(3deg) translateY(0) translateX(0); 
    }
    50% { 
        transform: rotate(5deg) translateY(-18px) translateX(8px); 
    }
}

@keyframes phoneFloat5 {
    0%, 100% { 
        transform: rotate(-4deg) translateY(0) scale(1); 
    }
    50% { 
        transform: rotate(-2deg) translateY(-22px) scale(1.03); 
    }
}

@keyframes phoneFloat6 {
    0%, 100% { 
        transform: rotate(5deg) translateY(0) translateX(0); 
    }
    50% { 
        transform: rotate(3deg) translateY(-20px) translateX(-12px); 
    }
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Large desktop (1600px+) */
@media (min-width: 1600px) {
    .fs-center-zone {
        max-width: 1600px;
        gap: 80px;
    }
    
    .fs-phone-mockup {
        width: 360px;
    }
    
    .fs-content-inner {
        max-width: 600px;
    }
}

/* Standard desktop (1200px - 1600px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .fs-center-zone {
        gap: 50px;
        padding: 0 30px;
    }
    
    .fs-phone-mockup {
        width: 300px;
    }
}

/* Tablet landscape (900px - 1199px) */
@media (max-width: 1199px) {
    .fs-section {
        grid-template-columns: 1fr;
        grid-template-areas: "center";
    }
    
    .fs-center-zone {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 40px;
        padding: 60px 40px;
        max-width: 700px;
    }
    
    /* Toutes les sections: Mockup en haut, texte en bas */
    .fs-section[data-index="1"] .fs-center-zone,
    .fs-section[data-index="2"] .fs-center-zone,
    .fs-section[data-index="3"] .fs-center-zone,
    .fs-section[data-index="4"] .fs-center-zone,
    .fs-section[data-index="5"] .fs-center-zone,
    .fs-section[data-index="6"] .fs-center-zone {
        grid-template-areas: 
            "mockup"
            "text";
    }
    
    .fs-content,
    .fs-phone-mockup {
        justify-self: center;
    }
    
    .fs-content-inner {
        text-align: center;
        max-width: 100%;
    }
    
    .fs-phone-mockup {
        width: 260px;
        margin: 0 auto;
    }
    
    .fs-cta {
        justify-content: center;
    }
}

/* Mobile (< 900px) */
@media (max-width: 899px) {
    .fs-center-zone {
        padding: 60px 24px 40px;
        gap: 20px;
        min-height: auto;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .fs-phone-mockup {
        width: min(200px, 30vh);
        max-height: 35vh;
        flex-shrink: 1;
    }
    
    .fs-phone-mockup img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .fs-title {
        font-size: 32px;
    }
    
    .fs-description {
        font-size: 16px;
    }
}

/* Small mobile (< 600px) */
@media (max-width: 599px) {
    .fs-center-zone {
        padding: 50px 20px 30px;
        gap: 16px;
    }
    
    .fs-phone-mockup {
        width: min(160px, 28vh);
        max-height: 32vh;
    }
    
    .fs-phone-mockup img {
        border-radius: 28px;
        border-width: 6px;
    }
    
    .fs-title {
        font-size: 28px;
    }
    
    .fs-description {
        font-size: 15px;
    }
    
    .fs-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .fs-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small mobile (iPhone SE and smaller: ≤ 375px) */
@media (max-width: 375px) {
    .fs-center-zone {
        padding: 50px 16px 40px;
        gap: 12px;
    }
    
    .fs-phone-mockup {
        width: min(140px, 25vh);
        max-height: 28vh;
    }
    
    .fs-phone-mockup img {
        border-radius: 24px;
        border-width: 5px;
    }
    
    .fs-title {
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .fs-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .fs-badge {
        font-size: 11px;
        padding: 5px 14px;
        margin-bottom: 16px;
    }
    
    .fs-cta {
        gap: 10px;
    }
}
