/* =========================================
   VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Colors derived from book cover */
    --bg-main: #FDFBF7; /* Cream/Off-white */
    --bg-light: #F4EFE7; /* Slightly darker cream for contrast sections */
    --text-primary: #2C443B; /* Elegant dark green */
    --text-secondary: #4A6359; /* Softened dark green */
    --text-white: #ffffff;
    
    /* Gold gradient effects */
    --accent-gold: #C89B42;
    --gold-gradient: linear-gradient(135deg, #DEB35E 0%, #B8862D 50%, #E8C170 100%);
    --gold-glow: rgba(200, 155, 66, 0.4);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-script: 'Great Vibes', cursive;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1100px;
    --section-padding: 8rem 2rem;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.text-center { text-align: center; }
.text-white { color: var(--text-white); }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 4rem; }
.italic { font-style: italic; }
.relative { position: relative; }

/* =========================================
   TYPOGRAPHY ACCENTS
   ========================================= */
.gold-text {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0px 1px 2px rgba(44, 68, 59, 0.15));
}

.gold-script {
    font-family: var(--font-script);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8em;
    font-weight: 400;
    line-height: 1.2;
    display: block;
    margin-top: -0.2em;
    padding-left: 0.15em;
    padding-bottom: 0.2em;
    margin-left: -0.15em;
    filter: drop-shadow(0px 2px 4px rgba(44, 68, 59, 0.15));
}

.uppercase-script {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.6em;
}

.hero-accent {
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.8em;
}

.description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.lead-text {
    font-size: 1.3rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--text-secondary);
}

.emphasize {
    font-size: 1.1rem;
    font-weight: 600;
}

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Skip to content link (a11y clavier) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--text-primary);
    color: var(--text-white);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    z-index: 2000;
    font-size: 0.95rem;
    font-weight: 600;
    transition: top 0.2s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.85); /* Slightly transparent cream */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(44, 68, 59, 0.05);
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    padding: 1rem 5%;
    background: rgba(253, 251, 247, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

/* Buttons */
.btn-primary, .btn-primary-small, .btn-secondary {
    display: inline-block;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-smooth);
    text-align: center;
    cursor: pointer;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(200, 155, 66, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(200, 155, 66, 0.4);
}

.btn-primary-small {
    background: var(--text-primary);
    color: var(--text-white);
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

.btn-primary-small:hover {
    background: var(--accent-gold);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--text-white);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(44, 68, 59, 0.05);
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(44, 68, 59, 0.08);
    border-color: rgba(200, 155, 66, 0.3);
}

/* Table of Contents */
.toc-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(44, 68, 59, 0.05);
    transition: var(--transition-smooth);
}

.toc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(44, 68, 59, 0.08);
}

.part-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.toc-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.toc-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

/* =========================================
   SECTIONS
   ========================================= */

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

/* Ambient glow in hero */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 155, 66, 0.15) 0%, rgba(253,251,247,0) 70%);
    z-index: 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3px solid var(--accent-gold);
    padding-left: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    z-index: 1;
    position: relative;
}

.hero-image img {
    max-height: 70vh;
    box-shadow: 0 30px 60px rgba(44, 68, 59, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition-smooth);
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

/* Paradox Section */
.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.stat {
    font-size: 4.5rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.stat span {
    font-size: 2rem;
    color: var(--accent-gold);
    font-family: var(--font-body);
}

.glow-text {
    position: relative;
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(200, 155, 66, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(200, 155, 66, 0.3);
}

/* Features */
.feature-box {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(44, 68, 59, 0.03);
    border: 1px solid rgba(44, 68, 59, 0.05);
}

.feature-box .icon {
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 15px var(--gold-glow);
}

.promo-image {
    max-width: 80%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Usage Section */
.usage-card {
    text-align: center;
}

.usage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* =========================================
   FAQ — Design éditorial élégant
   ========================================= */
.faq {
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-light) 100%);
    position: relative;
}

.faq::before {
    content: '';
    position: absolute;
    top: 15%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 155, 66, 0.08) 0%, rgba(253, 251, 247, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

.faq .container {
    position: relative;
    z-index: 1;
}

.faq-list {
    max-width: 820px;
    margin: 0 auto;
}

.faq-item {
    position: relative;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(44, 68, 59, 0.08);
    margin-bottom: 1.25rem;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(44, 68, 59, 0.04);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

.faq-item > * {
    box-sizing: border-box;
}

.faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(44, 68, 59, 0.07);
}

.faq-item[open] {
    background: #fff;
    border-color: rgba(200, 155, 66, 0.25);
    box-shadow: 0 20px 45px rgba(44, 68, 59, 0.08);
    transform: translateY(-2px);
}

.faq-item[open]::before {
    opacity: 1;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color 0.3s ease;
}

.faq-item summary:hover {
    color: var(--accent-gold);
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
    display: none;
    content: '';
}

/* Chevron indicateur (fallback si pas de .faq-icon span) */
.faq-item summary::after {
    content: '';
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(200, 155, 66, 0.1) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C89B42' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") center/14px no-repeat;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                background-color 0.3s ease;
}

/* Si le HTML contient déjà un .faq-icon, on masque le fallback */
.faq-item summary:has(.faq-icon)::after {
    display: none;
}

.faq-item[open] summary::after {
    background-color: #C89B42;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    transform: rotate(180deg);
}

.faq-item summary:hover::after {
    background-color: rgba(200, 155, 66, 0.2);
}

.faq-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(200, 155, 66, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
                background 0.3s ease;
}

.faq-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-gold);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.faq-item[open] .faq-icon {
    background: var(--gold-gradient);
    transform: rotate(180deg);
}

.faq-item[open] .faq-icon svg {
    stroke: #fff;
}

.faq-item summary:hover .faq-icon {
    background: rgba(200, 155, 66, 0.2);
}

/* Cible tous les paragraphes directement dans .faq-item,
   qu'ils soient ou non enveloppés dans .faq-answer */
.faq-item > p,
.faq-answer,
.faq-answer > p {
    position: relative;
    padding: 1.25rem 2rem 1.75rem 2rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1.02rem;
    box-sizing: border-box;
}

.faq-answer > p {
    padding: 0;
}

.faq-item > p::before,
.faq-answer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: rgba(200, 155, 66, 0.25);
}

.faq-item > p strong,
.faq-item > p em,
.faq-answer strong,
.faq-answer em {
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .faq-item summary {
        font-size: 1.05rem;
        padding: 1.2rem 1.3rem;
        gap: 1rem;
    }
    .faq-icon {
        width: 30px;
        height: 30px;
    }
    .faq-answer {
        font-size: 0.98rem;
        padding: 1rem 1.3rem 1.4rem 1.3rem;
    }
    .faq-answer::before {
        left: 1.3rem;
        right: 1.3rem;
    }
}

/* Final CTA */
.cta-final {
    position: relative;
    background-color: var(--text-primary);
    padding: 10rem 2rem;
    overflow: hidden;
}

/* Background pattern for final CTA */
.cta-final::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.3;
}

.cta-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--text-primary) 80%);
}

.cta-desc {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25rem;
}

/* Footer */
footer {
    background: #1A2E26; /* Darker green */
    color: rgba(255,255,255,0.6);
    padding: 2rem;
    font-size: 0.9rem;
}

/* Legal pages (mentions légales, etc.) */
.legal-page {
    padding-top: 10rem; /* Clear the fixed navbar */
    max-width: 850px;
    margin: 0 auto;
}

.legal-page h1 {
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.legal-page p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-page a {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* =========================================
   ANIMATIONS & EFFECTS
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.wobble-hover:hover {
    animation: wobble 1s ease-in-out;
}

@keyframes wobble {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateY(-4px) rotate(-3deg); }
    30% { transform: translateY(2px) rotate(2deg); }
    45% { transform: translateY(-2px) rotate(-1deg); }
    60% { transform: translateY(1px) rotate(1deg); }
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero-content {
        margin-bottom: 4rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-note {
        border-left: none;
        border-top: 3px solid var(--accent-gold);
        padding-left: 0;
        padding-top: 1rem;
        display: inline-block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 5rem 1.5rem;
    }
    
    .navbar {
        padding: 0.8rem 5%;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gold-script {
        margin-top: 0;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-cta .btn-primary, .hero-cta .btn-secondary {
        width: 100%;
    }
    
    .stat {
        font-size: 3.5rem;
    }
    
    .promo-image {
        max-width: 100%;
    }
}
