/* ==========================================================================
   CSS FRONT-END (One-Pager Client)
   ========================================================================== */

/* Thèmes Saisonniers */
:root {
    /* Valeurs par défaut (Nature générique) */
    --theme-primary: #87A96B;
    --theme-primary-light: #A3C189;
    --theme-primary-dark: #68874E;
    --theme-secondary: #E3F2E1;
    --theme-bg: #F9FBF9;
    --theme-surface: rgba(255, 255, 255, 0.85);
    --theme-text: #2c3e2e;
    --theme-text-muted: #5e7360;
    --theme-accent: #D4E2D0;
    
    /* Global variables */
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --border-radius-lg: 24px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.05);
}

body.theme-spring {
    --theme-primary: #87A96B;       /* Vert tendre */
    --theme-primary-light: #A8C78C;
    --theme-primary-dark: #638548;
    --theme-secondary: #E8F5E9;
    --theme-bg: #F4F9F4;
    --theme-surface: rgba(255, 255, 255, 0.85);
    --theme-text: #2A3B2C;
    --theme-text-muted: #647C66;
    --theme-accent: #C5E1A5;
}

body.theme-summer {
    --theme-primary: #FDB813;       /* Soleil / Doré */
    --theme-primary-light: #FFD54F;
    --theme-primary-dark: #F57F17;
    --theme-secondary: #FFF8E1;
    --theme-bg: #FFFCF7;
    --theme-surface: rgba(255, 255, 255, 0.85);
    --theme-text: #4A3500;
    --theme-text-muted: #8D6E63;
    --theme-accent: #FFE082;
}

body.theme-autumn {
    --theme-primary: #E2725B;       /* Orangé / Terre cuite */
    --theme-primary-light: #F48FB1;
    --theme-primary-dark: #D84315;
    --theme-secondary: #FBE9E7;
    --theme-bg: #FCF7F5;
    --theme-surface: rgba(255, 255, 255, 0.85);
    --theme-text: #4E271F;
    --theme-text-muted: #8D6E63;
    --theme-accent: #FFCCBC;
}

body.theme-winter {
    --theme-primary: #779ECB;       /* Bleu gris */
    --theme-primary-light: #90CAF9;
    --theme-primary-dark: #4A7A9F;
    --theme-secondary: #E3F2FD;
    --theme-bg: #F5F8FA;
    --theme-surface: rgba(255, 255, 255, 0.85);
    --theme-text: #1C2D3D;
    --theme-text-muted: #546E7A;
    --theme-accent: #BBDEFB;
}

/* Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--theme-bg);
    color: var(--theme-text);
    line-height: 1.6;
    transition: background-color 0.8s ease;
    overflow-x: hidden;
}

/* Formes organiques d'arrière-plan (Effet Zen / Nature / Glassmorphism) */
body::before, body::after {
    content: '';
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: floatBlob 25s infinite ease-in-out;
}

body::before {
    width: 700px;
    height: 700px;
    background: var(--theme-primary);
    top: -150px;
    left: -200px;
}

body::after {
    width: 600px;
    height: 600px;
    background: var(--theme-primary-light);
    bottom: -100px;
    right: -150px;
    animation-delay: -12s;
    animation-duration: 30s;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Typographie Premium */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0;
    color: var(--theme-text);
}

p {
    color: var(--theme-text-muted);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-primary-light));
    border-radius: 4px;
}

/* Apparition douce au défilement. public/js/scroll-reveal.js ajoute cette
   classe lui-même (jamais présente dans le HTML servi) avant de surveiller
   .is-visible via IntersectionObserver : sans JS, le contenu reste visible
   normalement au lieu de rester caché derrière une classe jamais activée. */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}



/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 60px 0;
    background-image: linear-gradient(180deg, rgba(20, 32, 24, 0.22) 0%, rgba(20, 32, 24, 0.32) 55%, rgba(20, 32, 24, 0.7) 100%), var(--hero-bg, url('../img/hero-bg.jpg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    color: white;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-primary-light);
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.85);
    animation: heroScrollCue 2.2s ease-in-out infinite;
}

@keyframes heroScrollCue {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
    50% { transform: translate(-50%, 10px); opacity: 1; }
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: white;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-title em {
    color: var(--theme-accent);
    font-style: italic;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

/* Grille de Cours */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.course-card {
    background: var(--theme-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    /* Les enfants d'une grille ont min-width:auto par défaut : un titre de
       cours un peu long et non-coupé forcerait sinon la carte (et donc la
       grille entière et la page) à déborder horizontalement au lieu de
       rétrécir. Même bug que .client-card / .cours-card côté admin. */
    min-width: 0;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.course-image {
    width: 100%;
    height: 320px;
    background-color: var(--theme-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-primary);
    font-weight: 500;
    position: relative;
}

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

.course-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    margin-bottom: 15px;
}

.meta-tag {
    background: var(--theme-accent);
    color: var(--theme-text);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-desc {
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Section À Propos */
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    gap: 70px;
    align-items: center;
}

.about-photo-wrap {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
}

.about-photo-wrap::before {
    content: '';
    position: absolute;
    inset: 24px -24px -24px 24px;
    border: 2px solid var(--theme-primary-light);
    border-radius: var(--border-radius-lg);
    z-index: 0;
}

.about-photo {
    position: relative;
    z-index: 1;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.about-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.about-content .section-title {
    text-align: left;
}

.about-content .section-title::after {
    left: 0;
    transform: none;
}

.about-text {
    text-align: justify;
    line-height: 1.8;
    color: var(--theme-text-muted);
    font-size: 1.05rem;
}

/* Timeline Moderne & Images Intégrées (Alternating Layout) */
.modern-timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 20px 0;
}
.modern-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--theme-primary-light), var(--theme-primary-dark));
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    opacity: 0.5;
}
.timeline-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
    width: 100%;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    left: 50%; 
    top: 50%;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--theme-bg);
    border: 4px solid var(--theme-primary);
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.6);
    transition: var(--transition-smooth);
}
.timeline-item:hover .timeline-dot {
    background-color: var(--theme-primary);
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.9);
}
.timeline-panel {
    width: 45%;
}
.timeline-content {
    background: var(--theme-surface);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition-smooth);
}
.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: var(--theme-primary-light);
}
.timeline-image {
    height: 350px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
}
.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.timeline-item:hover .timeline-image img {
    transform: scale(1.05);
}
.timeline-item:hover .timeline-image {
    box-shadow: var(--shadow-premium);
}
.timeline-date {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--theme-secondary);
    color: var(--theme-primary-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.timeline-title {
    font-size: 1.35rem;
    color: var(--theme-text);
    margin-bottom: 10px;
}
.timeline-desc {
    margin: 0;
    font-size: 0.95rem;
    color: var(--theme-text-muted);
}

/* Alternance (Correction de l'alignement) */
.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}
.timeline-item:nth-child(odd) .timeline-content {
    text-align: right; /* Le texte à gauche s'aligne vers la ligne centrale */
}
.timeline-item:nth-child(even) .timeline-content {
    text-align: left; /* Le texte à droite s'aligne vers la ligne centrale */
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .modern-timeline::after {
        left: 20px;
        transform: none;
    }
    .timeline-item, .timeline-item:nth-child(odd) {
        flex-direction: column;
        align-items: flex-end;
        margin-bottom: 50px;
    }
    .timeline-dot {
        left: 20px;
        top: 40px; /* Align near top */
        transform: translate(-50%, -50%);
    }
    .timeline-item:hover .timeline-dot {
        transform: translate(-50%, -50%) scale(1.3);
    }
    .timeline-panel {
        width: calc(100% - 50px);
        margin-bottom: 20px;
    }
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left; /* On réinitialise l'alignement à gauche sur mobile */
    }
    .timeline-image {
        height: 250px;
    }
}

/* Section Booking */
/* Section Booking transparente pour laisser passer l'aura */
.booking-section {
    background-color: transparent;
}

/* Surcharge du CSS existant pour le booking */
.booking-card {
    background: var(--theme-surface) !important;
    border-color: rgba(255,255,255,0.4) !important;
    box-shadow: var(--shadow-premium) !important;
}

.booking-header h1 {
    color: var(--theme-text) !important;
}

.btn-submit-booking {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark)) !important;
}

/* Footer */
.footer-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--theme-secondary);
    color: var(--theme-primary-dark);
}

@media (max-width: 960px) {
    .hero-image-block {
        position: relative;
        width: 100%;
        height: 300px;
        transform: none;
        top: 0;
        right: 0;
        margin-top: 40px;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-photo-wrap {
        max-width: 320px;
    }
    .about-content .section-title,
    .about-content .section-title::after {
        text-align: center;
    }
    .about-content .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .hero-title {
        font-size: 2.5rem;
    }
    /* "background-attachment: fixed" (l'effet parallax) est notoirement mal
       géré par Safari iOS (image qui disparaît ou saute) et coûteux au scroll
       sur mobile en général : on repasse en défilement normal en dessous du
       point où le hero cesse d'être en plein écran. */
    .hero-section {
        background-attachment: scroll;
    }
    section {
        padding: 60px 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.9rem;
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .hero-eyebrow {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .course-image {
        height: 220px;
    }
    .about-photo-wrap {
        max-width: 100%;
    }
}
