/**
 * Collection Mayotte Légendes - Feuilles de style CSS
 * Design moderne et immersif pour la présentation du livre "Les Fleurs du Crépuscule"
 * @author Expert Ionic & Design
 * @version 1.0
 */

/* ==========================================================================
   Variables CSS et Reset
   ========================================================================== */

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

:root {
    /* Palette de couleurs inspirée de Mayotte */
    --primary-color: #2D5A87;
    --secondary-color: #F4A261;
    --accent-color: #E76F51;
    --dark-color: #264653;
    --light-color: #F1FAEE;
    
    /* Gradients */
    --gradient-sunset: linear-gradient(135deg, #E76F51 0%, #F4A261 50%, #2D5A87 100%);
    --gradient-ocean: linear-gradient(135deg, #2D5A87 0%, #457B9D  50%, #1D3557 100%);
    
    /* Couleurs de texte */
    --text-primary: #264653;
    --text-light: #F1FAEE;
    
    /* Shadows */
    --shadow-light: 0 2px 20px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-heavy: 0 20px 50px rgba(0,0,0,0.3);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--light-color);
    overflow-x: hidden;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
    background: var(--gradient-ocean);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-light);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition-fast);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: var(--gradient-sunset);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="30" r="0.5" fill="white" opacity="0.2"/><circle cx="40" cy="70" r="1.5" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-10px) rotate(360deg); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.hero-content {
    color: var(--text-light);
}

.hero-badge {
    background: rgba(255,255,255,0.2);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: pulse 2s infinite;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-medium);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 20px rgba(231, 111, 81, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(231, 111, 81, 0.4);
    background: linear-gradient(135deg, #E76F51 0%, #ff6b47 100%);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover {
    max-width: 400px;
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-heavy);
    transform: perspective(1000px) rotateY(-15deg);
    transition: var(--transition-medium);
    animation: bookFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.3));
}

@keyframes bookFloat {
    0%, 100% { transform: perspective(1000px) rotateY(-15deg) translateY(0px); }
    50% { transform: perspective(1000px) rotateY(-15deg) translateY(-20px); }
}

.book-cover:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.05);
    filter: drop-shadow(0 0 30px rgba(244, 162, 97, 0.5));
}

/* ==========================================================================
   Container & Section Utilities
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 80px;
    height: 4px;
    background: var(--gradient-sunset);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features {
    padding: 5rem 0;
    background: var(--light-color);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-sunset);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    text-align: center;
    transition: var(--transition-fast);
    border: 1px solid rgba(244, 162, 97, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-sunset);
    transform: translateX(-100%);
    transition: var(--transition-medium);
}

.feature-card:hover::before {
    transform: translateX(0);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-sunset);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    transition: var(--transition-fast);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(360deg);
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 600;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* ==========================================================================
   Story Preview Section
   ========================================================================== */

.story-preview {
    padding: 5rem 0;
    background: var(--gradient-ocean);
    color: var(--text-light);
    position: relative;
}

.story-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10,50 Q50,10 90,50 Q50,90 10,50" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></svg>');
    animation: wave 15s infinite linear;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100px); }
}

.preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.preview-text {
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
    position: relative;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.preview-text::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -1rem;
    left: 1rem;
    color: var(--secondary-color);
    font-family: serif;
}

.preview-image {
    text-align: center;
}

.character-illustration {
    max-width: 300px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: var(--transition-medium);
}

.character-illustration:hover {
    transform: scale(1.05) rotate(2deg);
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials {
    padding: 5rem 0;
    background: var(--light-color);
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
    position: relative;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition-fast);
}

.testimonial-card:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.7;
}

.testimonial-author {
    font-weight: bold;
    color: var(--primary-color);
}

/* ==========================================================================
   Call to Action Section
   ========================================================================== */

.cta-section {
    padding: 5rem 0;
    background: var(--gradient-sunset);
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s infinite linear;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.cta-button {
    background: white;
    color: var(--primary-color);
    padding: 1.5rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(244, 162, 97, 0.3), transparent);
    transition: var(--transition-medium);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, white 0%, #f8f9fa 100%);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--dark-color);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    text-align: center;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-sunset);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-info {
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition-fast);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--secondary-color);
    transition: var(--transition-fast);
}

.footer-link:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-link:hover::after {
    width: 100%;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Parallax effect for hero */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-container {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 100px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .preview-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }

    .cta-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .preview-text {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .header,
    .footer,
    .cta-section {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        background: none;
        color: black;
    }
}

/* ==========================================================================
   Accessibility & Performance
   ========================================================================== */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #ff6600;
        --accent-color: #ff0000;
        --dark-color: #000;
        --light-color: #fff;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* GPU acceleration for animations */
.book-cover,
.feature-card,
.btn {
    transform: translateZ(0);
    will-change: transform;
}