:root {
    --page-bg: #07101d;
    --page-bg-soft: #0d1828;
    --panel: rgba(10, 18, 31, 0.78);
    --panel-strong: rgba(8, 14, 25, 0.92);
    --text: #edf2ff;
    --muted: #b7c0d8;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
    --radius: 24px;
    --accent: #d4b483;
    --accent-soft: rgba(212, 180, 131, 0.16);
    --accent-strong: #b8935a;
    --hero-overlay: linear-gradient(135deg, rgba(5, 10, 22, 0.9), rgba(7, 13, 24, 0.74));
    --font-display: "Playfair Display", serif;
    --font-serif: "Cormorant Garamond", serif;
    --font-body: "Montserrat", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.03), transparent 36%),
        linear-gradient(180deg, var(--page-bg-soft), var(--page-bg));
    line-height: 1.7;
}

body,
p,
h1,
h2,
h3,
span,
a,
button,
figcaption,
li {
    overflow-wrap: anywhere;
    hyphens: auto;
}

a {
    color: inherit;
}

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

.page-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(5, 10, 20, 0.72);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--muted);
}

.brand-link strong {
    color: var(--text);
    font-weight: 700;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-nav > * {
    flex: 0 1 auto;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.lang-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-link,
.solid-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.ghost-link {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.solid-link {
    color: #130c04;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.ghost-link:hover,
.solid-link:hover {
    transform: translateY(-2px);
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 44px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(0.95) contrast(1.04);
}

.hero-inner,
.content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: end;
}

.eyebrow {
    margin: 0 0 18px;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 8vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    margin: 20px 0 0;
    max-width: 760px;
    font-family: var(--font-serif);
    font-size: clamp(1.18rem, 2.4vw, 1.65rem);
    color: rgba(237, 242, 255, 0.86);
}

.hero-lead {
    margin: 18px 0 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-card {
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    min-width: 0;
}

.hero-card img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-card figcaption {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.overview-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    min-width: 0;
}

.overview-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.overview-value {
    font-size: 0.98rem;
    color: var(--text);
}

.content {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 26px;
    padding: 20px 0 80px;
}

.toc {
    position: sticky;
    top: 94px;
    align-self: start;
    padding: 18px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.toc h2 {
    margin: 0 0 12px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.toc a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.92rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition:
        color 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s ease;
}

.toc a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    transform: translateX(2px);
}

.toc a.active {
    color: var(--text);
    background: var(--accent-soft);
    border-color: var(--line);
    box-shadow: inset 3px 0 0 var(--accent);
}

.main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.section-card {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.section-card h2 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.02;
}

.section-card h3 {
    margin: 22px 0 10px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.insight-grid,
.problem-grid,
.metric-grid,
.comparison-grid,
.gallery-grid,
.text-grid {
    display: grid;
    gap: 16px;
}

.insight-grid,
.problem-grid,
.comparison-grid,
.gallery-grid,
.text-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-card,
.metric-card,
.comparison-card,
.pdf-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    min-width: 0;
}

.mini-card p:last-child,
.comparison-card p:last-child,
.pdf-card p:last-child {
    margin-bottom: 0;
}

.metric-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.8rem;
    color: var(--text);
    font-family: var(--font-display);
}

.figure {
    margin: 0;
}

.figure img {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: zoom-in;
}

.figure figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

.bullet-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.bullet-list li + li {
    margin-top: 8px;
}

.pdf-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

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

.pdf-card details[open] .pdf-summary {
    margin-bottom: 16px;
}

.pdf-preview {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: center;
}

.pdf-preview > div {
    min-width: 0;
}

.pdf-preview img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pdf-frame {
    width: 100%;
    height: min(72vh, 900px);
    border: 0;
    border-radius: 16px;
    background: #fff;
}

.pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.quote {
    padding: 18px 20px;
    border-left: 3px solid var(--accent);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 1.2rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(12px);
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: min(1400px, 94vw);
    max-height: 86vh;
    border-radius: 18px;
}

.lightbox button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

.theme-redoutable {
    --accent: #00e5ff;
    --accent-soft: rgba(0, 229, 255, 0.14);
    --accent-strong: #0097a7;
    --page-bg: #040c13;
    --page-bg-soft: #07141d;
    --hero-overlay: linear-gradient(135deg, rgba(2, 8, 12, 0.9), rgba(5, 17, 22, 0.72));
}

.theme-velora {
    --accent: #2f281f;
    --accent-soft: rgba(47, 40, 31, 0.12);
    --accent-strong: #786955;
    --page-bg: #ece6dd;
    --page-bg-soft: #f8f4ee;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: rgba(255, 255, 255, 0.97);
    --text: #111111;
    --muted: #3f382f;
    --line: rgba(17, 17, 17, 0.16);
    --shadow: 0 26px 60px rgba(28, 23, 16, 0.1);
    --hero-overlay: linear-gradient(135deg, rgba(248, 244, 238, 0.94), rgba(236, 230, 221, 0.78));
}

.theme-velora .solid-link {
    color: #fff;
    background: linear-gradient(135deg, #2f281f, #786955);
}

.theme-velora .ghost-link {
    color: #1b1712;
    background: rgba(47, 40, 31, 0.04);
}

.theme-velora .topbar {
    background: rgba(248, 244, 238, 0.88);
}

.theme-velora .hero-subtitle {
    color: rgba(17, 17, 17, 0.88);
}

.theme-velora .hero-lead,
.theme-velora .hero-card figcaption,
.theme-velora .figure figcaption,
.theme-velora .section-card p,
.theme-velora .bullet-list,
.theme-velora .overview-value,
.theme-velora .mini-card p,
.theme-velora .comparison-card p,
.theme-velora .pdf-card p {
    color: #3f382f;
}

.theme-velora .overview-card,
.theme-velora .section-card,
.theme-velora .mini-card,
.theme-velora .comparison-card,
.theme-velora .metric-card,
.theme-velora .pdf-card,
.theme-velora .toc {
    background: rgba(255, 255, 255, 0.92);
}

.theme-velora .tag-list span,
.theme-velora .quote,
.theme-velora .mini-card,
.theme-velora .comparison-card,
.theme-velora .pdf-card,
.theme-velora .overview-card,
.theme-velora .section-card,
.theme-velora .toc {
    border-color: rgba(47, 40, 31, 0.16);
}

.theme-velora .toc a:hover {
    background: rgba(47, 40, 31, 0.05);
    border-color: rgba(47, 40, 31, 0.16);
}

.theme-velora .toc a.active {
    background: rgba(47, 40, 31, 0.09);
    border-color: rgba(47, 40, 31, 0.24);
    box-shadow: inset 3px 0 0 #2f281f;
}

@media (max-width: 960px) {
    .hero-grid,
    .content,
    .overview,
    .metric-grid,
    .insight-grid,
    .problem-grid,
    .comparison-grid,
    .gallery-grid,
    .text-grid,
    .pdf-preview {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-nav {
        width: 100%;
    }

    .toc {
        position: sticky;
        top: 77px;
        z-index: 24;
        display: flex;
        align-items: center;
        gap: 10px;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 12px 0;
        margin: 0;
        border-radius: 0;
        border: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(5, 10, 20, 0.9);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: none;
    }

    .theme-velora .toc {
        background: rgba(248, 244, 238, 0.94);
    }

    .toc::-webkit-scrollbar {
        display: none;
    }

    .toc h2,
    .toc a {
        flex: 0 0 auto;
        scroll-snap-align: center;
    }

    .toc h2 {
        margin: 0;
        padding: 0 4px 0 0;
    }

    .toc a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 16px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.04);
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 0.04em;
    }

    .toc a:hover,
    .toc a:focus-visible {
        color: var(--text);
        border-color: var(--accent);
        background: var(--accent-soft);
        outline: none;
    }

    .toc a.active {
        color: var(--text);
        border-color: var(--accent);
        background: var(--accent-soft);
        box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset;
    }

    .content {
        padding-bottom: 50px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

@media (max-width: 640px) {
    .topbar-inner,
    .hero-inner,
    .content {
        width: min(100vw - 24px, 1180px);
    }

    .hero {
        padding-top: 60px;
    }

    .brand-link {
        letter-spacing: 0.14em;
        font-size: 0.68rem;
        flex-wrap: wrap;
    }

    .topbar {
        position: sticky;
    }

    .toc {
        top: 69px;
    }

    .toc a {
        min-height: 40px;
        padding: 0 14px;
        font-size: 0.72rem;
    }

    .topbar-inner {
        padding: 14px 0;
    }

    .section-card,
    .hero-card {
        padding: 20px;
    }

    .hero-actions,
    .pdf-actions,
    .topbar-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .ghost-link,
    .solid-link,
    .lang-btn {
        width: 100%;
    }

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

    .ghost-link,
    .solid-link,
    .lang-btn {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .hero-lead,
    .section-card p,
    .bullet-list {
        font-size: 0.95rem;
    }

    .metric-card strong {
        font-size: 1.5rem;
    }

    .overview-value,
    .comparison-card p,
    .mini-card p,
    .pdf-preview p,
    .figure figcaption {
        font-size: 0.92rem;
    }

    .comparison-card h3,
    .mini-card h3,
    .pdf-preview h3,
    .section-card h3 {
        font-size: 0.9rem;
        letter-spacing: 0.06em;
    }

    .pdf-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .pdf-summary > .ghost-link {
        width: 100%;
    }

    .pdf-frame {
        height: min(62vh, 620px);
        border-radius: 12px;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox img {
        max-width: 100%;
        max-height: 82vh;
        border-radius: 14px;
    }

    .lightbox button {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(2.15rem, 12vw, 3rem);
    }

    .eyebrow,
    .overview-label,
    .toc h2 {
        letter-spacing: 0.14em;
    }

    .eyebrow,
    .overview-label {
        font-size: 0.62rem;
    }

    .section-card,
    .hero-card,
    .toc,
    .overview-card,
    .mini-card,
    .metric-card,
    .comparison-card,
    .pdf-card {
        border-radius: 18px;
    }

    .toc {
        top: 70px;
        padding: 14px;
    }

    .toc a {
        font-size: 0.84rem;
        padding: 9px 11px;
    }

    .overview {
        gap: 10px;
    }

    .metric-grid,
    .comparison-grid,
    .gallery-grid,
    .text-grid,
    .insight-grid,
    .problem-grid {
        gap: 12px;
    }
}
