/* CSS Responsive pour le portfolio */

/* Breakpoints */
/* Mobile: 320px - 767px */
/* Tablet: 768px - 1023px */
/* Desktop: 1024px+ */

/* Mobile First Approach */
@media (max-width: 767px) {
    /* Hero section mobile */
    .hero {
        padding: 2rem 1rem;
        height: 100vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-shape {
        width: 300px;
        height: 300px;
        top: -30%;
        right: -30%;
    }
    
    /* Galerie mobile */
    .gallery {
        padding: 3rem 1rem;
    }
    
    .gallery-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .photo-item {
        border-radius: 15px;
    }
    
    .photo-container {
        border-radius: 15px;
    }
    
    .photo-overlay {
        padding: 1.5rem;
    }
    
    .photo-title {
        font-size: 1.1rem;
    }
    
    .photo-description {
        font-size: 0.85rem;
    }
    
    /* Éléments décoratifs mobile */
    .floating-leaf {
        width: 25px;
        height: 25px;
    }
    
    /* Loader mobile */
    .organic-shape {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
    
    /* Outro mobile */
    .outro h2 {
        font-size: 2rem;
    }
    
    .outro p {
        font-size: 1rem;
    }
    
    .outro-shape {
        width: 400px;
        height: 400px;
        top: -40%;
        left: -40%;
    }
    
    /* Curseur désactivé sur mobile */
    body::before {
        display: none;
    }
    
    /* Animations simplifiées sur mobile */
    .photo-item:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .photo-item:hover .photo-img {
        transform: scale(1.05);
    }
    
    /* Scroll indicator mobile */
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .scroll-arrow {
        height: 30px;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Hero section tablet */
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-shape {
        width: 500px;
        height: 500px;
    }
    
    /* Galerie tablet */
    .gallery {
        padding: 4rem 2rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Éléments décoratifs tablet */
    .floating-leaf {
        width: 35px;
        height: 35px;
    }
    
    /* Outro tablet */
    .outro-shape {
        width: 600px;
        height: 600px;
    }
}

/* Desktop large screens */
@media (min-width: 1024px) {
    /* Galerie desktop */
    .gallery-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Effets avancés desktop uniquement */
    .photo-item {
        transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .photo-item:hover {
        transform: translateY(-15px) scale(1.03) rotateZ(1deg);
    }
    
    /* Parallax plus prononcé sur desktop */
    .parallax-element {
        will-change: transform;
    }
}

/* Ultra wide screens */
@media (min-width: 1400px) {
    .gallery-container {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 6rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
}

/* Orientation landscape sur mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        padding: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .scroll-indicator {
        bottom: 0.5rem;
    }
    
    .gallery {
        padding: 2rem 1rem;
    }
    
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .photo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --dark: #ffffff;
        --light-gray: #2a2a2a;
    }
    
    .hero {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    }
    
    .gallery {
        background: #1a1a1a;
    }
    
    .photo-item {
        background: #2a2a2a;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .loader {
        background: #1a1a1a;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-leaf {
        animation: none;
    }
    
    .organic-shape {
        animation: none;
    }
    
    .hero-shape,
    .outro-shape {
        animation: none;
    }
    
    .scroll-arrow {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #000000;
        --accent-coral: #ffffff;
        --neutral-gray: #808080;
    }
    
    .photo-item {
        border: 2px solid var(--primary-green);
    }
    
    .photo-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Print styles */
@media print {
    .loader,
    .decorative-elements,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero,
    .gallery,
    .outro {
        page-break-inside: avoid;
    }
    
    .photo-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .photo-item:hover {
        transform: none;
    }
    
    .photo-item:active {
        transform: scale(0.98);
    }
    
    .photo-overlay {
        transform: translateY(0);
        background: linear-gradient(transparent 60%, rgba(0,0,0,0.8));
    }
    
    /* Larger touch targets */
    .photo-item {
        min-height: 44px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-transparency: reduce) {
    .photo-container::before,
    .photo-overlay {
        opacity: 1 !important;
        background: solid colors;
    }
}

/* Container queries support (future-proofing) */
@supports (container-type: inline-size) {
    .gallery-container {
        container-type: inline-size;
    }
    
    @container (max-width: 600px) {
        .photo-item {
            border-radius: 10px;
        }
    }
    
    @container (min-width: 800px) {
        .photo-item {
            border-radius: 25px;
        }
    }
}
