/* ===================================================
   EAST COAST — Ma'Tour Guide Madagascar
   Direction : "Carnet de voyage" — chapitres plein
   écran qui se révèlent au scroll. Design organique et
   narratif, très différent des grilles/mosaïques
   des autres destinations.
   Version optimisée – 29 août 2026

   Requires base.css to be loaded first (reset,
   typography, header, nav, buttons live there).
=================================================== */

/* ==========================================
   1. VARIABLES
========================================== */
:root {
    --ec-forest:  #1F3D2B;   /* vert forêt profond — encre des textes / overlays   */
    --ec-emerald: #2F7A5D;   /* canopée — accent principal                         */
    --ec-ocean:   #1C6E8C;   /* océan Indien — accent secondaire                   */
    --ec-coral:   #E8946B;   /* corail doux — accent Sainte-Marie                  */
    --ec-mist:    #F4F1E8;   /* brume matinale — fond des sections claires         */
}

/* ==========================================
   2. HERO — doux, sans découpe agressive
========================================== */
.journal-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: url('images/east-coast/hero.jpg') center/cover no-repeat;
}

.journal-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 61, 43, 0.35) 0%, rgba(31, 61, 43, 0.25) 45%, rgba(31, 61, 43, 0.65) 100%);
    z-index: 1;
}

.journal-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white, #fff);
    max-width: 760px;
    padding: 0 24px;
    opacity: 0;
    transform: translateY(18px);
    animation: journalFadeIn 1.4s ease 0.2s forwards;
}

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

.journal-hero-content .eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ec-coral);
    margin-bottom: 12px;
}

.journal-hero-content h1 {
    font-family: var(--display, Georgia, serif);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(36px, 7vw, 60px);
    line-height: 1.15;
    margin: 18px 0 22px;
}

.journal-hero-content p {
    font-size: clamp(16px, 1.5vw, 19px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 38px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white, #fff);
    opacity: 0.8;
}

.scroll-cue span {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-cue svg {
    width: 16px;
    height: 16px;
    animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ==========================================
   3. INTRO — courte transition
========================================== */
.journal-intro {
    padding: clamp(60px, 10vw, 110px) 6% clamp(50px, 8vw, 90px);
    text-align: center;
    background: var(--ec-mist, #F4F1E8);
}

.journal-intro .eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ec-emerald, #2F7A5D);
    margin-bottom: 12px;
}

.journal-intro p {
    font-family: var(--display, Georgia, serif);
    font-style: italic;
    font-size: clamp(20px, 3vw, 26px);
    line-height: 1.6;
    max-width: 720px;
    margin: 20px auto 0;
    color: var(--ec-forest, #1F3D2B);
    font-weight: 500;
}

/* ==========================================
   4. CHAPITRES — le carnet
========================================== */
.chapter {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.chapter-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.chapter-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chapter-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(31, 61, 43, 0.82) 0%, rgba(31, 61, 43, 0.15) 55%, transparent 80%);
    z-index: 1;
}

.chapter-panel {
    position: relative;
    z-index: 2;
    color: var(--white, #fff);
    padding: clamp(40px, 6vw, 70px) 6% clamp(50px, 8vw, 90px);
    max-width: 660px;
    opacity: 0;
    transform: translateY(46px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

.chapter-index {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display, Georgia, serif);
    font-style: italic;
    font-size: 15px;
    color: var(--ec-coral, #E8946B);
    margin-bottom: 14px;
}

.chapter-index::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--ec-coral, #E8946B);
}

.chapter-panel h3 {
    font-family: var(--display, Georgia, serif);
    font-weight: 600;
    font-size: clamp(30px, 5vw, 46px);
    margin-bottom: 18px;
}

.chapter-panel p {
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 22px;
    max-width: 540px;
}

.chapter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.chapter-tags span {
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12.5px;
    font-weight: 500;
}

/* alterne le point d'ancrage du texte pour rythmer la lecture */
.chapter:nth-child(even) .chapter-panel {
    margin-left: auto;
    text-align: right;
}

.chapter:nth-child(even) .chapter-index {
    flex-direction: row-reverse;
}

.chapter:nth-child(even) .chapter-tags {
    justify-content: flex-end;
}

.chapter:nth-child(even) .chapter-panel p {
    margin-left: auto;
}

/* accent Sainte-Marie (dernier chapitre) en corail plutôt qu'océan */
.chapter.accent-coral .chapter-index {
    color: var(--ec-coral, #E8946B);
}

.chapter.accent-coral .chapter-index::before {
    background: var(--ec-coral, #E8946B);
}

.chapter.accent-ocean .chapter-index {
    color: #7FD4E0;
}

.chapter.accent-ocean .chapter-index::before {
    background: #7FD4E0;
}

/* ==========================================
   5. FAQ — NOUVEAU
========================================== */
.faq-section {
    padding: clamp(60px, 10vw, 100px) 6% clamp(50px, 8vw, 80px);
    background: var(--ec-mist, #F4F1E8);
    text-align: center;
}

.faq-section h2 {
    font-family: var(--display, Georgia, serif);
    font-size: clamp(28px, 4vw, 42px);
    color: var(--ec-forest, #1F3D2B);
    margin-bottom: 40px;
}

.faq-section details {
    max-width: 900px;
    margin: 0 auto 8px;
    border-bottom: 1px solid rgba(31, 61, 43, 0.12);
    padding: 18px 0;
    text-align: left;
}

.faq-section summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    color: var(--ec-forest, #1F3D2B);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary::after {
    content: "+";
    font-size: 26px;
    font-weight: 300;
    color: var(--ec-coral, #E8946B);
    transition: transform 0.3s ease;
}

.faq-section details[open] summary::after {
    transform: rotate(45deg);
}

.faq-section details p {
    padding: 16px 4px 4px;
    margin: 0;
    line-height: 1.8;
    color: var(--bark-soft, #665c55);
    font-size: 15px;
}

.faq-section details p strong {
    color: var(--ec-emerald, #2F7A5D);
}

/* ==========================================
   6. CONTACT
========================================== */
.journal-contact {
    position: relative;
    padding: clamp(80px, 12vw, 150px) 6% clamp(60px, 10vw, 120px);
    text-align: center;
    color: var(--white, #fff);
    background: linear-gradient(160deg, var(--ec-forest, #1F3D2B) 0%, var(--ec-ocean, #1C6E8C) 100%);
    overflow: hidden;
}

.journal-contact .eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ec-coral, #E8946B);
    margin-bottom: 12px;
}

.journal-contact h2 {
    font-family: var(--display, Georgia, serif);
    font-weight: 600;
    font-size: clamp(30px, 4.5vw, 42px);
    margin-bottom: 18px;
}

.journal-contact p {
    font-size: clamp(16px, 1.5vw, 18px);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.journal-contact .btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    background: var(--ec-coral, #E8946B);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    text-decoration: none;
    border: 2px solid var(--ec-coral, #E8946B);
    transition: all 0.3s ease;
}

.journal-contact .btn:hover {
    background: var(--gold, #d4b071);
    border-color: var(--gold, #d4b071);
    color: var(--ec-forest, #1F3D2B);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 176, 113, 0.4);
}

.journal-contact .btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
}

.journal-contact .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}

/* ==========================================
   7. FOOTER — GLASSMORPHISM
========================================== */
.footer-glass {
    position: relative;
    padding: clamp(80px, 12vw, 150px) 6% 0;
    background:
        radial-gradient(ellipse 900px 500px at 10% 0%, rgba(47, 122, 93, 0.22), transparent 60%),
        radial-gradient(ellipse 900px 600px at 90% 100%, rgba(232, 148, 107, 0.18), transparent 55%),
        linear-gradient(190deg, #142A1D 0%, var(--ec-forest, #1F3D2B) 45%, #0F2016 100%);
    overflow: hidden;
    isolation: isolate;
}

/* signature — houle océane */
.footer-swell {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 1;
}

.footer-glass-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
    gap: 22px;
}

.footer-glass-panel {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.footer-brand h3 {
    font-family: var(--display, Georgia, serif);
    font-weight: 600;
    font-style: italic;
    font-size: 22px;
    color: var(--ec-mist, #F4F1E8);
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 14.5px;
    line-height: 1.75;
    color: rgba(244, 241, 232, 0.62);
    font-weight: 300;
    max-width: 280px;
    margin-bottom: 26px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--ec-mist, #F4F1E8);
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    background: rgba(232, 148, 107, 0.2);
    border-color: rgba(232, 148, 107, 0.5);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-glass-panel h4 {
    font-family: var(--display, Georgia, serif);
    font-weight: 600;
    font-style: italic;
    font-size: 15px;
    letter-spacing: 0.4px;
    color: #7FD4E0;
    margin-bottom: 20px;
}

.footer-glass-panel a,
.footer-glass-panel .footer-static {
    display: block;
    font-size: 14.5px;
    color: rgba(244, 241, 232, 0.78);
    text-decoration: none;
    line-height: 1;
    margin-bottom: 16px;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-glass-panel a:hover {
    color: var(--ec-mist, #F4F1E8);
    transform: translateX(4px);
}

.footer-glass-panel a:last-child,
.footer-glass-panel .footer-static:last-child {
    margin-bottom: 0;
}

.footer-contact-panel p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(244, 241, 232, 0.62);
    font-weight: 300;
    margin-bottom: 22px;
}

.footer-glass-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ec-mist, #F4F1E8);
    backdrop-filter: blur(6px);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.footer-glass-btn:last-child { margin-bottom: 0; }

.footer-glass-btn.filled {
    background: rgba(28, 110, 140, 0.3);
    border-color: rgba(127, 212, 224, 0.5);
}

.footer-glass-btn:hover {
    transform: translateY(-2px);
    background: rgba(232, 148, 107, 0.22);
    border-color: rgba(232, 148, 107, 0.55);
}

.footer-glass-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.footer-glass-btn:focus-visible {
    outline: 2px solid var(--ec-coral, #E8946B);
    outline-offset: 3px;
}

/* bandeau du bas */
.footer-bottom-glass {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 56px auto 0;
    padding: 22px 6px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-glass p {
    font-size: 12.5px;
    color: rgba(244, 241, 232, 0.45);
    font-weight: 300;
    letter-spacing: 0.2px;
}

.footer-bottom-links {
    display: flex;
    gap: 22px;
}

.footer-bottom-links a {
    font-size: 12.5px;
    color: rgba(244, 241, 232, 0.45);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-bottom-links a:hover {
    color: var(--ec-coral, #E8946B);
}

/* ==========================================
   8. ACCESSIBILITÉ — FOCUS VISIBLE
========================================== */
.footer-glass-btn:focus-visible,
.journal-contact .btn:focus-visible {
    outline: 2px solid var(--ec-coral, #E8946B);
    outline-offset: 3px;
}

.faq-section summary:focus-visible {
    outline: 2px solid var(--ec-emerald, #2F7A5D);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ==========================================
   9. RESPONSIVE
========================================== */
@media (max-width: 1000px) {
    .footer-glass-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .chapter-panel h3 {
        font-size: 34px;
    }
    
    .chapter-panel {
        padding: 50px 7% 70px;
        max-width: 100%;
    }
    
    .chapter:nth-child(even) .chapter-panel {
        margin-left: 0;
        text-align: left;
    }
    
    .chapter:nth-child(even) .chapter-index {
        flex-direction: row;
    }
    
    .chapter:nth-child(even) .chapter-tags {
        justify-content: flex-start;
    }
    
    .chapter:nth-child(even) .chapter-panel p {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .journal-hero {
        min-height: 70vh;
        height: auto;
        padding: 80px 0 60px;
    }
    
    .journal-hero-content h1 {
        font-size: 32px;
    }
    
    .journal-hero-content p {
        font-size: 16px;
    }
    
    .chapter {
        min-height: 70vh;
    }
    
    .chapter-panel {
        padding: 40px 6% 50px;
    }
    
    .chapter-panel h3 {
        font-size: 28px;
    }
    
    .faq-section {
        padding: 60px 5% 50px;
    }
    
    .faq-section h2 {
        font-size: 28px;
    }
    
    .faq-section summary {
        font-size: 16px;
    }
    
    .journal-contact {
        padding: 70px 5% 60px;
    }
    
    .journal-contact h2 {
        font-size: 28px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .footer-glass {
        padding: 70px 6% 0;
    }
    
    .footer-glass-container {
        grid-template-columns: 1fr;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-bottom-glass {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .journal-hero-content h1 {
        font-size: 26px;
    }
    
    .journal-intro p {
        font-size: 18px;
    }
    
    .chapter-panel h3 {
        font-size: 24px;
    }
    
    .chapter-panel p {
        font-size: 14px;
    }
    
    .chapter-tags span {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .faq-section summary {
        font-size: 14px;
    }
    
    .faq-section details p {
        font-size: 13px;
    }
    
    .footer-glass-panel {
        padding: 24px 18px;
    }
}

/* ==========================================
   10. RÉDUCTION D'ANIMATIONS
========================================== */
@media (prefers-reduced-motion: reduce) {
    .journal-hero-content {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .chapter-panel {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .scroll-cue svg {
        animation: none;
    }
    
    .footer-social a,
    .footer-glass-btn,
    .footer-glass-panel a,
    .journal-contact .btn {
        transition: none;
    }
    
    .faq-section summary::after {
        transition: none;
    }
}

/* ==========================================
   11. COMPATIBILITÉ NAVIGATEURS
========================================== */
@supports (height: 100svh) {
    .journal-hero {
        height: 100svh;
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .footer-glass-panel {
        background: rgba(31, 61, 43, 0.85);
    }
}

/* ==========================================
   12. CHAPTER MEDIA — fallback
========================================== */
.chapter-media img {
    background-color: var(--ec-forest, #1F3D2B);
}

/* ==========================================
   13. SCROLLBAR (optionnel)
========================================== */
.faq-section details {
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 61, 43, 0.2) transparent;
}

.faq-section details::-webkit-scrollbar {
    width: 4px;
}

.faq-section details::-webkit-scrollbar-track {
    background: transparent;
}

.faq-section details::-webkit-scrollbar-thumb {
    background: rgba(31, 61, 43, 0.2);
    border-radius: 10px;
}