/* ========================================
   MODULES PAGE
   ======================================== */

/* Video Hero Section */
.video-hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #000;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.video-hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
}

.video-hero-title {
    font-size: 72px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

/* Introduction Section */
.modules-intro-section {
    padding: 120px 0;
    background: var(--background);
}

.intro-header {
    max-width: 800px;
    margin-bottom: 60px;
}

.section-title-left {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.08;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    text-align: left;
}

.section-subtitle-left {
    font-size: 21px;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: left;
}

/* Restaurant Module Section */
.restaurant-module-section {
    background: #000000;
    padding-bottom: 0;
    position: relative;
    min-height: calc(30vh + 800px);
}

.module-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 100px 0 60px;
    z-index: 10;
}

.module-name {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.module-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.08;
    color: #FFFFFF;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    text-align: left;
}

.module-subtitle {
    font-size: 21px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    max-width: 800px;
}

.module-image-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    margin-bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.module-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.1s ease-out;
}

/* Module Carousel Section with Background */
.module-carousel-section {
    position: absolute;
    top: 280px;
    left: 0;
    width: 100%;
    padding: 80px 0 120px;
    background: transparent;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

.carousel-background {
    display: none;
}

.carousel-bg-image {
    display: none;
}

.carousel-blur-overlay {
    display: none;
}

.module-carousel-section .feature-carousel,
.module-carousel-section .carousel-controls {
    position: relative;
    z-index: 1;
}

.module-carousel-section .cell-content p {
    color: rgba(255, 255, 255, 0.6);
}

.module-carousel-section .cell-content strong {
    color: #FFFFFF;
}

/* Why Modules Section */
.why-modules-section {
    padding: 120px 0;
    background: var(--background-secondary);
}

.why-modules-title {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 60px;
    letter-spacing: -0.02em;
    text-align: left;
    opacity: 0.8;
}

/* Why Modules - Icon Style */
.why-modules-section .cell-image {
    width: 80px;
    height: 80px;
    background: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 20px;
    aspect-ratio: auto;
    align-items: flex-start;
    justify-content: flex-start;
}

.why-modules-section .cell-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Carousel Styles (imported from fonctionnalites.css logic) */
.feature-carousel {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

.carousel-container {
    display: flex;
    gap: 24px;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    padding-left: 0;
    padding-right: 40px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.carousel-container:active {
    cursor: grabbing;
}

.carousel-container * {
    user-select: none;
    -webkit-user-select: none;
}

.carousel-container::-webkit-scrollbar {
    height: 0;
    display: none;
}

.carousel-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-cell {
    flex: 0 0 350px;
    width: 350px;
}

.carousel-cell:first-child {
    margin-left: max(calc(50vw - 580px), 20px);
}

.cell-image {
    width: 100%;
    aspect-ratio: 4/5;
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cell-content {
    padding: 0 8px;
}

.cell-content p {
    font-size: 17px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.cell-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 40px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: var(--background);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--background-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: var(--background);
    border-color: var(--border-color);
    color: var(--text-primary);
    transform: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .video-hero-title {
        font-size: 56px;
    }

    .section-title-left {
        font-size: 48px;
    }

    .module-title {
        font-size: 48px;
    }

    .carousel-cell {
        flex: 0 0 300px;
        width: 300px;
    }

    .carousel-cell:first-child {
        margin-left: 40px;
    }

    .carousel-controls {
        justify-content: flex-start;
        padding-left: 40px;
    }

    .why-modules-title {
        font-size: 32px;
    }

    .intro-header,
    .module-header .container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .video-hero-section {
        min-height: 70vh;
    }

    .video-hero-title {
        font-size: 40px;
    }

    .video-hero-content {
        padding: 40px 0;
    }

    .modules-intro-section {
        padding: 80px 0;
    }

    .section-title-left {
        font-size: 36px;
    }

    .section-subtitle-left {
        font-size: 18px;
    }

    .module-header {
        padding: 60px 0 40px;
    }

    .module-name {
        font-size: 16px;
    }

    .module-title {
        font-size: 36px;
    }

    .module-subtitle {
        font-size: 18px;
    }

    .restaurant-module-section {
        min-height: calc(30vh + 700px);
    }

    .module-carousel-section {
        padding: 60px 0 80px;
    }

    .why-modules-section {
        padding: 80px 0;
    }

    .why-modules-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .why-modules-section .cell-image {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }

    .why-modules-section .cell-image img {
        width: 60px;
        height: 60px;
    }

    .carousel-container {
        padding: 20px 20px 20px 0;
        gap: 16px;
    }

    .carousel-cell {
        flex: 0 0 280px;
        width: 280px;
    }

    .carousel-cell:first-child {
        margin-left: 20px;
    }

    .carousel-controls {
        justify-content: flex-start;
        padding-left: 20px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .cell-content p {
        font-size: 15px;
    }

    .intro-header,
    .module-header .container {
        padding: 0 20px;
    }
}
