/* ================= GLOBAL ================= */

:root {
    --bg-main: #070707;
    --bg-card: rgba(255, 255, 255, 0.055);
    --bg-card-strong: rgba(255, 255, 255, 0.09);
    --text-main: #ffffff;
    --text-muted: #b8b1a2;
    --gold: #d8a84e;
    --gold-light: #ffd77a;
    --orange: #ff7a1a;
    --red: #b91515;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
    --radius: 28px;
    --transition: 0.35s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(216, 168, 78, 0.13), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(185, 21, 21, 0.12), transparent 28%),
        var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

.mytho-container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.section-label,
.mytho-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-label::before,
.mytho-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light));
}

.mytho-primary-btn,
.mytho-secondary-btn,
.read-myth-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: var(--transition);
}

.mytho-primary-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    color: #120a03;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
    box-shadow: 0 16px 35px rgba(255, 122, 26, 0.22);
}

.mytho-primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 45px rgba(255, 122, 26, 0.34);
}

.mytho-secondary-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    color: var(--text-main);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.mytho-secondary-btn:hover {
    border-color: rgba(255, 215, 122, 0.55);
    background: rgba(255, 215, 122, 0.08);
}


/* ================= NAV ================= */

.mytho-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: 78px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(7, 7, 7, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.mytho-logo img {
    width: 150px;
    height: auto;
}

.mytho-nav-links > ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.mytho-nav-links > ul > li {
    position: relative;
}

.mytho-nav-links > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition);
}

.mytho-nav-links > ul > li > a:hover {
    color: var(--gold-light);
}

.mytho-dropdown-content {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 330px;
    padding: 14px;
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(12, 10, 8, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition);
}

.mytho-dropdown:hover .mytho-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mytho-dropdown-content a {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.mytho-dropdown-content a:hover {
    background: rgba(216, 168, 78, 0.13);
}

.mytho-dropdown-content span {
    font-size: 1.25rem;
}

.mytho-dropdown-content strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.mytho-dropdown-content small {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.nav-open-btn,
.nav-close-btn {
    display: none;
    border: none;
    color: #fff;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}


/* ================= HERO ================= */

.mytho-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

.mytho-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.88)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), #070707),
        url("pictures/apocalypse.jpg") center/cover no-repeat;
}

.mytho-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -160px;
    top: 120px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216, 168, 78, 0.22), transparent 68%);
    filter: blur(8px);
}

.mytho-hero::after {
    content: "𓂀";
    position: absolute;
    right: 10%;
    bottom: 12%;
    z-index: -1;
    color: rgba(255, 215, 122, 0.075);
    font-family: "Cinzel", serif;
    font-size: clamp(8rem, 22vw, 22rem);
    line-height: 1;
}

.mytho-hero-content {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
    max-width: 780px;
    margin-left: max(20px, calc((100vw - 1180px) / 2));
}

.mytho-hero-content h1 {
    margin-top: 24px;
    font-family: "Cinzel", serif;
    font-size: clamp(3.3rem, 8vw, 8rem);
    line-height: 0.9;
    text-transform: uppercase;
}

.mytho-hero-content h1 span {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 215, 122, 0.8);
    text-shadow: none;
}

.mytho-hero-content p {
    max-width: 680px;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
}

.mytho-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.mytho-scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 28px;
    width: 28px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    transform: translateX(-50%);
}

.mytho-scroll-indicator span {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold-light);
    transform: translateX(-50%);
    animation: scrollDot 1.6s infinite ease-in-out;
}

@keyframes scrollDot {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 18px);
    }
}


/* ================= INTRO ================= */

.mytho-intro {
    position: relative;
    padding: 110px 0;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 44px;
    align-items: center;
}

.intro-text h2,
.section-heading h2,
.experience-text h2,
.mytho-cta h2 {
    margin-top: 18px;
    font-family: "Cinzel", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
}

.intro-text p,
.section-heading p,
.experience-text p,
.mytho-cta p {
    margin-top: 20px;
    color: var(--text-muted);
    line-height: 1.85;
}

.intro-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
        radial-gradient(circle at top right, rgba(216, 168, 78, 0.20), transparent 48%);
    box-shadow: var(--shadow);
}

.intro-card::after {
    content: "";
    position: absolute;
    inset: auto -90px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 122, 26, 0.12);
    filter: blur(24px);
}

.intro-symbol {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--gold-light);
    font-size: 3rem;
    background: rgba(216, 168, 78, 0.10);
    border: 1px solid rgba(216, 168, 78, 0.30);
}

.intro-card h3 {
    margin-top: 24px;
    font-family: "Cinzel", serif;
    font-size: 1.6rem;
}

.intro-card p {
    margin-top: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.intro-stats div {
    padding: 16px 12px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-stats strong {
    display: block;
    color: var(--gold-light);
    font-size: 1.3rem;
}

.intro-stats span {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
}


/* ================= CATEGORIES ================= */

.mytho-categories {
    padding: 60px 0 30px;
}

.section-heading {
    max-width: 720px;
    text-align: center;
    margin: auto;
}

.filter-buttons {
    margin-top: 34px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 20px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    color: #120a03;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
}


/* ================= MYTH LIBRARY ================= */

.mytho-library {
    padding: 40px 0 110px;
}

.myth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.myth-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.myth-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 215, 122, 0.35);
    background: var(--bg-card-strong);
}

.myth-card.hide {
    display: none;
}

.myth-card-image {
    position: relative;
    height: 290px;
    overflow: hidden;
    background: #111;
}

.myth-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.myth-card:hover .myth-card-image img {
    transform: scale(1.08);
}

.myth-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.84));
}

.myth-tag {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 8px 13px;
    border-radius: 999px;
    color: #160e05;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
    font-size: 0.76rem;
    font-weight: 800;
}

.myth-card-content {
    padding: 24px;
}

.myth-origin {
    color: var(--gold-light);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.myth-card-content h3 {
    margin-top: 10px;
    font-family: "Cinzel", serif;
    font-size: 1.65rem;
}

.myth-card-content p {
    margin-top: 12px;
    min-height: 96px;
    color: var(--text-muted);
    line-height: 1.75;
}

.read-myth-btn {
    margin-top: 22px;
    width: 100%;
    min-height: 46px;
    border-radius: 16px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.read-myth-btn:hover {
    color: #120a03;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
}


/* ================= EXPERIENCE ================= */

.mytho-experience {
    padding: 110px 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        rgba(255, 255, 255, 0.015);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.experience-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
    gap: 54px;
    align-items: center;
}

.experience-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.experience-visual img {
    width: 100%;
    height: 560px;
    object-fit: cover;
}

.experience-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.floating-note {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px);
}

.floating-note strong {
    display: block;
    color: var(--gold-light);
}

.floating-note span {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.experience-list {
    margin-top: 30px;
    display: grid;
    gap: 14px;
}

.experience-list div {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.experience-list span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #120a03;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
    font-weight: 900;
}

.experience-list p {
    margin: 0;
}


/* ================= CTA ================= */

.mytho-cta {
    padding: 110px 0;
    text-align: center;
}

.mytho-cta .mytho-container {
    position: relative;
    overflow: hidden;
    padding: 64px 26px;
    border: 1px solid var(--border);
    border-radius: 34px;
    background:
        radial-gradient(circle at 50% 0%, rgba(216, 168, 78, 0.16), transparent 42%),
        rgba(255, 255, 255, 0.045);
    box-shadow: var(--shadow);
}

.mytho-cta h2 {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.mytho-cta p {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 32px;
}


/* ================= FOOTER ================= */

.mytho-footer {
    padding: 0 0 32px;
    background: #050505;
}

.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(216, 168, 78, 0.7), transparent);
}

.footer-container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
    padding: 54px 0 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.footer-block {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
}

.footer-block h4 {
    margin-bottom: 12px;
    color: var(--gold-light);
}

.footer-block p,
.footer-block li,
.footer-block a {
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-block ul {
    list-style: none;
}

.support-icons,
.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.support-icons img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.social-icons a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    transition: var(--transition);
}

.social-icons a:hover {
    color: #120a03;
    background: linear-gradient(135deg, var(--gold-light), var(--orange));
}

.footer-message {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
    text-align: center;
    color: var(--text-muted);
}


/* ================= MODAL ================= */

.myth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.myth-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
}

.modal-box {
    position: relative;
    z-index: 2;
    width: min(960px, 100%);
    max-height: 88vh;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    background: #0d0b08;
    box-shadow: var(--shadow);
    animation: modalIn 0.32s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: #120a03;
    background: var(--gold-light);
}

.modal-image {
    min-height: 470px;
}

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

.modal-content {
    padding: 48px 38px;
    overflow-y: auto;
}

.modal-content span {
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-content h3 {
    margin-top: 14px;
    font-family: "Cinzel", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.modal-content p {
    margin-top: 20px;
    color: var(--text-muted);
    line-height: 1.9;
}


/* ================= REVEAL ANIMATION ================= */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1050px) {
    .myth-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intro-grid,
    .experience-grid {
        grid-template-columns: 1fr;
    }

    .experience-visual img {
        height: 460px;
    }
}

@media (max-width: 900px) {
    .mytho-nav {
        height: 72px;
    }

    .nav-open-btn,
    .nav-close-btn {
        display: grid;
        place-items: center;
    }

    .mytho-nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(340px, 88vw);
        height: 100vh;
        padding: 78px 22px 30px;
        background: rgba(8, 7, 6, 0.98);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        transition: right var(--transition);
        overflow-y: auto;
    }

    .mytho-nav-links.active {
        right: 0;
    }

    .nav-close-btn {
        position: absolute;
        top: 22px;
        right: 22px;
    }

    .mytho-nav-links > ul {
        display: grid;
        gap: 4px;
    }

    .mytho-nav-links > ul > li > a {
        width: 100%;
        justify-content: space-between;
        padding: 14px 0;
    }

    .mytho-dropdown-content {
        position: static;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: 6px 0 12px;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.04);
    }

    .mytho-dropdown.open .mytho-dropdown-content {
        display: block;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .mytho-container,
    .mytho-hero-content,
    .footer-container,
    .footer-message {
        width: min(100% - 26px, 1180px);
    }

    .mytho-hero {
        min-height: 92vh;
        padding-top: 115px;
    }

    .mytho-hero-content {
        margin-left: auto;
    }

    .mytho-hero-content p {
        font-size: 0.96rem;
    }

    .mytho-hero-actions {
        flex-direction: column;
    }

    .mytho-primary-btn,
    .mytho-secondary-btn {
        width: 100%;
    }

    .intro-stats {
        grid-template-columns: 1fr;
    }

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

    .modal-box {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .modal-image {
        min-height: 280px;
        max-height: 300px;
    }

    .modal-content {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .mytho-logo img {
        width: 128px;
    }

    .myth-card-image {
        height: 240px;
    }

    .intro-card,
    .footer-block {
        padding: 22px;
    }

    .experience-list div {
        grid-template-columns: 1fr;
    }
}


/***************************************************************************************************************/
/* =========================================================
   CORRECTION MENU AU-DESSUS DU CONTENU
   SANS MODIFIER LE DESIGN DU MENU STYLE.CSS
========================================================= */

/* 1. On supprime le contexte d'empilement qui enferme le menu */
.mytho-hero {
    isolation: auto !important;
}

/* 2. Le menu reste géré visuellement par style.css.
      Ici on corrige uniquement sa priorité d'affichage. */
nav,
.sticky-nav,
.mytho-nav {
    z-index: 999999 !important;
}

/* 3. Le menu mobile doit passer au-dessus des sections */
.nav-links,
.mytho-nav-links {
    z-index: 1000000 !important;
}

/* 4. Les sous-menus doivent aussi rester au-dessus du contenu */
.dropdown-content,
.services-dropdown-content,
.portfolio-dropdown-content,
.mytho-dropdown-content {
    z-index: 1000001 !important;
}

/* 5. Les sections ne doivent pas créer une couche au-dessus du menu */
.mytho-hero,
.mytho-intro,
.mytho-categories,
.mytho-library,
.mytho-experience,
.mytho-cta,
.mytho-footer {
    z-index: auto !important;
}

/* 6. Les cartes, textes animés et blocs ne doivent pas dépasser le menu */
.reveal,
.reveal.active,
.myth-card,
.intro-card,
.experience-visual,
.experience-list div,
.mytho-cta .mytho-container,
.footer-block {
    z-index: auto !important;
}

/* 7. Les éléments décoratifs du header restent derrière */
.mytho-hero-bg {
    z-index: -3 !important;
}

.mytho-hero::before,
.mytho-hero::after {
    z-index: -2 !important;
}

/* 8. Les ancres descendent correctement sous le menu */
html {
    scroll-padding-top: 95px !important;
}

#vision,
#mythes,
.mytho-intro,
.mytho-categories,
.mytho-library,
.mytho-experience,
.mytho-cta {
    scroll-margin-top: 95px !important;
}

/* 9. La popup reste volontairement au-dessus de tout */
.myth-modal {
    z-index: 2000000 !important;
}

/* =====================================================================
   CORRECTION FINALE V8 — NAVIGATION / SCROLL / RESPONSIVE
   ---------------------------------------------------------------------
   Cette couche remplace les anciens patchs cumulés V3 à V7.
   Principes :
   1. une seule zone de défilement sous la navigation ;
   2. aucune transition du drawer pendant le passage Desktop -> Burger ;
   3. les animations du drawer ne sont exécutées qu'après une action
      explicite d'ouverture ou de fermeture ;
   4. aucune règle globale de style.css ne peut reprendre le contrôle
      du menu de cette page.
   ===================================================================== */

:root {
    --mytho-nav-height: 78px;
    --mytho-scrollbar-width: 0px;
    --mytho-drawer-width: min(390px, calc(100vw - 44px - var(--mytho-scrollbar-width)));
}

/* La page entière ne défile jamais : une seule surface interne défile. */
html,
body {
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    scrollbar-gutter: auto !important;
}

body {
    position: relative;
    max-width: none !important;
    overscroll-behavior: none;
}

/* C'est la seule barre de défilement autorisée sur cette page. */
.mytho-page-scroll {
    position: fixed;
    inset: var(--mytho-nav-height) 0 0 0;
    z-index: 0;
    min-width: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    background:
        radial-gradient(circle at top left, rgba(216, 168, 78, 0.13), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(185, 21, 21, 0.12), transparent 28%),
        var(--bg-main);
}

/* Verrouille le contenu sans créer une seconde scrollbar. */
.mytho-page-scroll.menu-locked {
    overflow: hidden !important;
    touch-action: none;
}

/* Navigation : largeur utile uniquement, donc jamais au-dessus de la piste. */
.mytho-nav {
    position: fixed !important;
    inset: 0 var(--mytho-scrollbar-width) auto 0 !important;
    z-index: 1000000 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: var(--mytho-nav-height) !important;
    padding-inline: clamp(18px, 4.8vw, 5%) !important;
}

.mytho-menu-backdrop {
    position: fixed !important;
    inset: 0 var(--mytho-scrollbar-width) 0 0 !important;
    z-index: 999998 !important;
    display: block !important;
    width: auto !important;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(3px);
}

.mytho-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.22s ease;
}

/* Le hero occupe exactement le viewport disponible sous le menu. */
.mytho-page-scroll .mytho-hero {
    min-height: calc(100dvh - var(--mytho-nav-height)) !important;
}

@supports not (height: 100dvh) {
    .mytho-page-scroll .mytho-hero {
        min-height: calc(100vh - var(--mytho-nav-height)) !important;
    }
}

/* ===================== DESKTOP ===================== */
@media (min-width: 1281px) {
    .nav-open-btn,
    .nav-close-btn {
        display: none !important;
    }

    .mytho-nav-links {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .mytho-nav-links > ul {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: clamp(0px, 0.24vw, 6px);
        min-width: 0;
    }

    .mytho-nav-links > ul > li > a {
        white-space: nowrap;
        font-size: clamp(0.68rem, 0.72vw, 0.82rem);
        padding-inline: clamp(7px, 0.70vw, 14px);
    }

    .mytho-logo {
        flex: 0 0 auto;
    }

    .mytho-logo img {
        width: clamp(128px, 9.2vw, 150px);
    }

    /* Panneaux desktop : aucune sortie hors de la largeur visible. */
    .mytho-dropdown-content {
        width: min(330px, calc(100vw - var(--mytho-scrollbar-width) - 32px));
        max-width: calc(100vw - var(--mytho-scrollbar-width) - 32px);
        left: 50%;
        right: auto;
        box-sizing: border-box;
        overflow: hidden;
        transform: translate(-50%, 12px);
    }

    .mytho-dropdown:hover > .mytho-dropdown-content,
    .mytho-dropdown:focus-within > .mytho-dropdown-content {
        transform: translate(-50%, 0);
    }

    /* Portfolio est placé à l'intérieur de l'écran, vers la gauche. */
    .mytho-nav-links > ul > li.mytho-dropdown:nth-last-child(2) > .mytho-dropdown-content {
        left: auto;
        right: 0;
        transform: translateY(12px);
    }

    .mytho-nav-links > ul > li.mytho-dropdown:nth-last-child(2):hover > .mytho-dropdown-content,
    .mytho-nav-links > ul > li.mytho-dropdown:nth-last-child(2):focus-within > .mytho-dropdown-content {
        transform: translateY(0);
    }

    .mytho-dropdown-content a {
        grid-template-columns: 36px minmax(0, 1fr);
        min-width: 0;
    }

    .mytho-dropdown-content div,
    .mytho-dropdown-content strong,
    .mytho-dropdown-content small {
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Laptops et écrans externes intermédiaires. */
    .mytho-hero-content {
        width: min(1000px, calc(100% - 72px));
        max-width: none;
        margin-left: max(36px, calc((100vw - 1180px) / 2));
    }

    .mytho-hero-content h1 {
        font-size: clamp(4.3rem, 6.25vw, 6.65rem);
        line-height: 0.94;
        letter-spacing: -0.035em;
        white-space: nowrap;
    }

    .mytho-hero-content h1 span {
        white-space: nowrap;
    }

    .mytho-hero-content p {
        max-width: 660px;
        font-size: clamp(0.98rem, 1.18vw, 1.05rem);
    }
}

@media (min-width: 1600px) {
    .mytho-hero-content h1 {
        white-space: nowrap;
        letter-spacing: -0.025em;
    }
}

/* ===================== TABLETTES / BURGER ===================== */
@media (max-width: 1280px) {
    :root {
        --mytho-nav-height: 72px;
        --mytho-drawer-width: min(390px, calc(100vw - 44px - var(--mytho-scrollbar-width)));
    }

    .mytho-nav {
        height: var(--mytho-nav-height) !important;
    }

    /* Bouton ouvert, forcé malgré les styles génériques de style.css. */
    .nav-open-btn {
        position: relative;
        z-index: 1000003;
        display: grid !important;
        place-items: center;
        width: 48px;
        height: 48px;
        margin-left: auto;
        flex: 0 0 48px;
        border: 1px solid rgba(255, 215, 122, 0.42);
        border-radius: 15px;
        color: #fff8e7;
        background:
            radial-gradient(circle at 30% 25%, rgba(255, 215, 122, 0.22), transparent 46%),
            linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 122, 26, 0.16));
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.16);
        font-size: 1.25rem;
        line-height: 1;
        cursor: pointer;
        transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    }

    .nav-open-btn .fa,
    .nav-close-btn .fa {
        display: block !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        color: currentColor !important;
        line-height: 1 !important;
        pointer-events: none;
    }

    .nav-open-btn:hover,
    .nav-open-btn:focus-visible {
        outline: none;
        transform: translateY(-2px);
        border-color: var(--gold-light);
        background: linear-gradient(135deg, rgba(255, 215, 122, 0.30), rgba(255, 122, 26, 0.30));
    }

    /*
       Etat fermé stable. AUCUNE transition ici : lorsque la fenêtre passe
       de desktop à burger, le drawer apparaît directement hors écran.
       Il ne peut donc jamais produire une "animation de fermeture".
    */
    .mytho-nav-links {
        position: fixed !important;
        top: 0 !important;
        right: var(--mytho-scrollbar-width) !important;
        z-index: 1000002 !important;
        display: block !important;
        width: var(--mytho-drawer-width) !important;
        max-width: calc(100vw - 44px - var(--mytho-scrollbar-width));
        height: 100dvh !important;
        min-height: 100vh;
        padding: calc(var(--mytho-nav-height) + 22px) 24px calc(32px + env(safe-area-inset-bottom)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 1 !important;
        border-left: 1px solid rgba(255, 215, 122, 0.20) !important;
        border-radius: 22px 0 0 22px;
        background:
            radial-gradient(circle at 100% 0%, rgba(255, 122, 26, 0.16), transparent 34%),
            radial-gradient(circle at 0% 100%, rgba(216, 168, 78, 0.10), transparent 42%),
            rgba(7, 7, 9, 0.985) !important;
        box-shadow: -24px 0 58px rgba(0, 0, 0, 0.50);
        transform: translate3d(calc(100% + 28px), 0, 0) !important;
        will-change: transform;
        transition: none !important;
    }

    /* Ouverture : transition uniquement après un clic explicite. */
    .mytho-nav-links.active {
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translate3d(0, 0, 0) !important;
        transition: transform 0.30s cubic-bezier(.2, .8, .2, 1) !important;
    }

    /* Fermeture manuelle : même animation, jamais utilisée par le resize. */
    .mytho-nav-links.is-closing {
        visibility: visible !important;
        pointer-events: none !important;
        transform: translate3d(calc(100% + 28px), 0, 0) !important;
        transition: transform 0.24s cubic-bezier(.4, 0, 1, 1) !important;
    }

    .nav-close-btn {
        position: absolute !important;
        top: 14px;
        right: 16px;
        z-index: 3;
        display: grid !important;
        place-items: center;
        width: 46px;
        height: 46px;
        border: 1px solid rgba(255, 215, 122, 0.36);
        border-radius: 50%;
        color: #fff8e7;
        background: rgba(255, 255, 255, 0.075);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
        font-size: 1.22rem;
        line-height: 1;
        cursor: pointer;
    }

    html.mytho-drawer-open .mytho-nav .nav-open-btn {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(.82) rotate(-18deg) !important;
    }

    .mytho-nav-links > ul {
        display: grid !important;
        width: 100%;
        gap: 5px;
    }

    .mytho-nav-links > ul > li {
        width: 100%;
    }

    .mytho-nav-links > ul > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 50px;
        padding: 14px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.065);
        color: rgba(255, 255, 255, 0.92);
        font-size: 0.86rem;
        line-height: 1.25;
        white-space: normal;
    }

    .mytho-dropdown-content {
        position: static !important;
        width: 100% !important;
        display: none;
        margin: 8px 0 12px;
        padding: 8px;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        border-color: rgba(255, 255, 255, 0.10);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.035);
        box-shadow: none;
    }

    .mytho-dropdown.open .mytho-dropdown-content {
        display: block;
    }

    .mytho-dropdown-content a {
        grid-template-columns: 32px minmax(0, 1fr);
        padding: 11px 10px;
    }

    .mytho-dropdown-content small,
    .mytho-dropdown-content strong {
        overflow-wrap: anywhere;
    }

    .mytho-page-scroll .mytho-hero {
        min-height: calc(100dvh - var(--mytho-nav-height)) !important;
        padding: calc(var(--mytho-nav-height) + 54px) 0 88px;
    }

    .mytho-hero-content {
        width: min(1080px, calc(100% - 56px));
        max-width: none;
        margin-inline: auto;
    }

    .mytho-hero-content h1 {
        max-width: 100%;
        margin-top: 18px;
        font-size: clamp(3.1rem, 6.65vw, 5.95rem);
        line-height: 0.96;
        letter-spacing: -0.035em;
        white-space: nowrap;
    }

    .mytho-hero-content h1 span {
        white-space: nowrap;
    }

    .mytho-hero-content p {
        max-width: min(680px, 100%);
        font-size: clamp(0.96rem, 1.35vw, 1.05rem);
    }

    .intro-grid,
    .experience-grid {
        grid-template-columns: 1fr;
        gap: clamp(30px, 4vw, 44px);
    }
}

/* ===================== MOBILES ===================== */
@media (max-width: 720px) {
    :root {
        --mytho-nav-height: 72px;
        --mytho-drawer-width: min(360px, calc(100vw - 30px - var(--mytho-scrollbar-width)));
    }

    .mytho-container,
    .mytho-hero-content,
    .footer-container,
    .footer-message {
        width: min(calc(100% - 32px), 1180px);
    }

    .mytho-logo img {
        width: clamp(112px, 30vw, 132px);
    }

    .nav-open-btn {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .mytho-nav-links {
        padding: calc(var(--mytho-nav-height) + 20px) 18px calc(26px + env(safe-area-inset-bottom)) !important;
        border-radius: 18px 0 0 18px;
    }

    .mytho-page-scroll .mytho-hero {
        padding: calc(var(--mytho-nav-height) + 44px) 0 66px;
    }

    .mytho-hero-content h1 {
        font-size: clamp(2.05rem, 10.2vw, 3.6rem);
        line-height: 0.98;
        letter-spacing: -0.045em;
        white-space: normal;
    }

    .mytho-hero-content h1 span {
        white-space: nowrap;
    }

    .mytho-hero-content p {
        margin-top: 22px;
        font-size: clamp(0.92rem, 3.75vw, 1rem);
        line-height: 1.72;
    }

    .mytho-hero-actions {
        flex-direction: row;
        gap: 10px;
        margin-top: 28px;
    }

    .mytho-primary-btn,
    .mytho-secondary-btn {
        width: auto;
        min-height: 46px;
        padding-inline: 17px;
        font-size: clamp(0.78rem, 3.35vw, 0.94rem);
        white-space: nowrap;
    }

    .mytho-scroll-indicator {
        bottom: 18px;
    }

    .myth-card-image {
        height: clamp(220px, 63vw, 290px);
    }

    .intro-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modal-box {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .modal-image {
        min-height: 240px;
        max-height: 300px;
    }

    .modal-content {
        padding: 32px 24px;
    }
}

@media (max-width: 390px) {
    .mytho-hero-content h1 {
        font-size: clamp(2rem, 10vw, 2.65rem);
    }

    .mytho-hero-actions {
        flex-wrap: wrap;
    }

    .mytho-primary-btn,
    .mytho-secondary-btn {
        min-width: 0;
        flex: 1 1 auto;
    }

    .intro-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 620px) and (min-width: 721px) and (max-width: 1280px) {
    :root {
        --mytho-nav-height: 68px;
    }

    .nav-open-btn {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .mytho-page-scroll .mytho-hero {
        padding-top: calc(var(--mytho-nav-height) + 30px);
        padding-bottom: 38px;
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .mytho-page-scroll .mytho-hero {
        min-height: 600px !important;
    }

    .mytho-nav-links {
        padding-top: calc(var(--mytho-nav-height) + 14px) !important;
    }
}

@media (hover: none) {
    .nav-open-btn:hover {
        transform: none;
    }
}
