/**
 * Style CSS Principal - Thème WordPress avec Scroll Effects
 * Style inspiré du site Charles Leclerc
 */

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 50px;
    transition: all 0.3s ease;
    background: transparent;
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    padding: 15px 50px;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.3s ease;
}

.main-nav a:hover {
    opacity: 0.7;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.hero-title {
    font-size: clamp(40px, 8vw, 120px);
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(50px);
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
}

.scroll-indicator::after {
    content: '';
    display: block;
    width: 1px;
    height: 40px;
    background: #fff;
    margin: 10px auto 0;
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(15px); opacity: 0; }
}

/* ==========================================
   SECTIONS GÉNÉRALES
   ========================================== */

.section {
    position: relative;
    min-height: 100vh;
    padding: 100px 50px;
    display: flex;
    align-items: center;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.2;
}

.section-text {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
    max-width: 800px;
}

/* Sections avec backgrounds alternés */
.section:nth-child(even) {
    background: #f5f5f5;
}

.section:nth-child(odd) {
    background: #fff;
}

/* ==========================================
   HORIZONTAL SCROLL SECTION
   ========================================== */

.horizontal-scroll-wrapper {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.horizontal-scroll-container {
    display: flex;
    height: 100vh;
    will-change: transform;
}

.horizontal-card {
    min-width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 50px;
    flex-shrink: 0;
}

.horizontal-card-content {
    max-width: 600px;
    text-align: center;
}

.horizontal-card h2 {
    font-size: clamp(30px, 5vw, 60px);
    margin-bottom: 30px;
}

.horizontal-card p {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.horizontal-card:nth-child(1) { background: #1a1a1a; color: #fff; }
.horizontal-card:nth-child(2) { background: #e74c3c; color: #fff; }
.horizontal-card:nth-child(3) { background: #2c3e50; color: #fff; }
.horizontal-card:nth-child(4) { background: #27ae60; color: #fff; }

/* ==========================================
   IMAGE GALLERY WITH PARALLAX
   ========================================== */

.gallery-section {
    position: relative;
    padding: 150px 50px;
    background: #000;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* ==========================================
   CARDS SECTION
   ========================================== */

.cards-section {
    padding: 150px 50px;
    background: #f5f5f5;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 30px;
}

.card-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.card-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* ==========================================
   PINNED SECTION
   ========================================== */

.pinned-section {
    height: 300vh;
    position: relative;
}

.pinned-content {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pinned-text {
    text-align: center;
    padding: 50px;
}

.pinned-text h2 {
    font-size: clamp(40px, 6vw, 80px);
    margin-bottom: 30px;
}

.pinned-text p {
    font-size: clamp(18px, 2.5vw, 24px);
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 80px 50px 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    line-height: 2;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
}

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

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Tablettes et petits écrans (max 1024px) */
@media (max-width: 1024px) {
    .site-header {
        padding: 15px 30px;
    }
    
    .section {
        padding: 80px 30px;
    }
    
    .gallery-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* Tablettes portrait et mobiles paysage (max 768px) */
@media (max-width: 768px) {
    
    /* Header */
    .site-header {
        padding: 15px 20px;
    }
    
    .site-header.scrolled {
        padding: 12px 20px;
    }
    
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .main-nav.is-open {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav a {
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }
    
    /* Hero Section */
    .hero-section {
        height: 100svh; /* Support pour mobile */
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-title {
        font-size: clamp(32px, 10vw, 60px);
    }
    
    .hero-subtitle {
        font-size: clamp(16px, 4vw, 20px);
    }
    
    /* Sections */
    .section {
        padding: 60px 20px;
        min-height: auto;
    }
    
    .section-title {
        font-size: clamp(32px, 8vw, 50px);
        margin-bottom: 20px;
    }
    
    .section-text {
        font-size: clamp(14px, 3.5vw, 18px);
    }
    
    /* Horizontal Scroll - Devient vertical sur mobile */
    .horizontal-scroll-wrapper {
        height: auto;
    }
    
    .horizontal-scroll-container {
        flex-direction: column;
        height: auto;
    }
    
    .horizontal-card {
        min-width: 100%;
        height: auto;
        min-height: 60vh;
        padding: 60px 20px;
    }
    
    .horizontal-card h2 {
        font-size: clamp(28px, 7vw, 40px);
        margin-bottom: 20px;
    }
    
    .horizontal-card p {
        font-size: clamp(14px, 3.5vw, 18px);
    }
    
    /* Gallery */
    .gallery-section {
        padding: 80px 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item {
        aspect-ratio: 16/9;
    }
    
    /* Cards */
    .cards-section {
        padding: 80px 20px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-title {
        font-size: 20px;
    }
    
    .card-text {
        font-size: 14px;
    }
    
    /* Pinned Section */
    .pinned-section {
        height: auto;
    }
    
    .pinned-content {
        position: relative;
        height: auto;
        min-height: 60vh;
        padding: 60px 20px;
    }
    
    .pinned-text h2 {
        font-size: clamp(28px, 8vw, 50px);
    }
    
    .pinned-text p {
        font-size: clamp(16px, 4vw, 20px);
    }
    
    /* Footer */
    .site-footer {
        padding: 60px 20px 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Mobiles portrait (max 480px) */
@media (max-width: 480px) {
    
    .site-header {
        padding: 12px 15px;
    }
    
    .hero-title {
        font-size: clamp(28px, 12vw, 50px);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: clamp(14px, 5vw, 18px);
    }
    
    .section {
        padding: 50px 15px;
    }
    
    .section-title {
        font-size: clamp(28px, 10vw, 40px);
    }
    
    .horizontal-card {
        padding: 50px 15px;
        min-height: 50vh;
    }
    
    .gallery-section,
    .cards-section {
        padding: 60px 15px;
    }
    
    .card-image {
        height: 200px;
    }
    
    .scroll-indicator {
        font-size: 10px;
        bottom: 30px;
    }
}

/* Très grands écrans (min 1440px) */
@media (min-width: 1440px) {
    .section-content {
        max-width: 1400px;
    }
    
    .gallery-grid,
    .cards-grid {
        max-width: 1600px;
    }
}

/* Mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px 50px;
    }
    
    .horizontal-card {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* Préférence de mouvement réduit (accessibilité) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator::after {
        animation: none;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .card:hover,
    .gallery-item:hover img {
        transform: none;
    }
    
    /* Désactiver les animations hover sur mobile */
    .main-nav a:hover {
        opacity: 1;
    }
}

/* Print */
@media print {
    .site-header,
    .scroll-indicator,
    .site-footer {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* ==========================================
   UTILITIES
   ========================================== */

.fade-in {
    opacity: 0;
    transform: translateY(50px);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
}
