/* Page Télécharger : thème Volcano du site (rouge lave, orange, fond brun-noir, Rubik). */
:root {
    --primary: #e83000;
    --primary-rgb: 232, 48, 0;
    --secondary: #d01f00;
    --accent: #ff8c42;
    --accent-rgb: 255, 140, 66;
    --background: #0e0a0a;
    --surface: #160f0e;
    --surface-alt: #1c1312;
    --surface-hover: #241817;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.12);
    --text: #ede0d8;
    --muted: #9a8e84;
    --radius: 10px;
    --radius-sm: 7px;
    --gradient: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 55%, var(--accent) 100%);
    color-scheme: dark;
}

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    background-image:
        radial-gradient(ellipse 70% 45% at 50% -10%, rgba(var(--primary-rgb), 0.18) 0%, transparent 70%),
        radial-gradient(ellipse 120% 60% at 50% 110%, rgba(208, 31, 0, 0.10) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--text);
    font-family: "Rubik", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: #ffb07a;
}

code {
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--accent);
    font-size: 0.88em;
    overflow-wrap: anywhere;
}

strong {
    font-weight: 600;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* En-tête */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px max(24px, calc((100% - 1080px) / 2));
    background: rgba(14, 10, 10, 0.78);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
}

.brand:hover {
    color: var(--text);
}

.header-link {
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.header-link:hover {
    border-color: rgba(var(--accent-rgb), 0.6);
    color: var(--accent);
}

/* Bandeau */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 88px 16px 72px;
    text-align: center;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6.5vw, 62px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.08;
}

.hero-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    margin: 0 0 36px;
    color: var(--muted);
    font-size: clamp(13px, 2.2vw, 15px);
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Compteur d'ouverture */
.opening-countdown {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 26px;
    padding: 7px 16px 7px 12px;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
}

.opening-countdown[hidden] {
    display: none;
}

.opening-countdown strong {
    color: var(--accent);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.live-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.7; }
    to   { transform: scale(2.8); opacity: 0; }
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 34px;
    border: 0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: filter 0.2s, transform 0.15s;
}

.btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gradient);
    clip-path: polygon(12px 0%, 100% 0%, calc(100% - 12px) 100%, 0% 100%);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-link::before {
    content: "←";
}

.btn-link:hover {
    color: var(--accent);
}

/* Contenu */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 80px;
    flex: 1;
}

.panel {
    position: relative;
    padding: 40px;
    background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

/* Fine ligne de lave en haut du panneau */
.panel::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 24px;
    right: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

.panel-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 10px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 999px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-title {
    margin: 0 0 10px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.panel-intro {
    margin: 0 0 28px;
    color: var(--muted);
}

/* Étapes numérotées dans des pastilles */
.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps > li {
    position: relative;
    margin-bottom: 22px;
    padding-left: 46px;
    counter-increment: step;
}

.steps > li:last-child {
    margin-bottom: 0;
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    top: -1px;
    left: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.45);
    border-radius: 50%;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.steps > li > strong:first-child {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
}

/* Bloc launcher : texte à gauche, carte de téléchargement à droite */
.launcher-layout {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 420px);
    gap: 48px;
    align-items: center;
}

.dl-card {
    padding: 26px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

.dl-card-label {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.platform-select {
    position: relative;
    margin-bottom: 14px;
}

.platform-current,
.platform-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.platform-current {
    background: var(--surface-alt);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background-color 0.2s;
}

.platform-current:hover {
    background: var(--surface-hover);
}

.platform-current[aria-expanded="true"] {
    border-color: rgba(var(--accent-rgb), 0.55);
}

.platform-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text);
}

.platform-icon svg,
.download-icon svg,
.choice-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.platform-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.platform-text strong {
    font-size: 15px;
    font-weight: 600;
}

.platform-text span {
    color: var(--muted);
    font-size: 13px;
}

.platform-chevron {
    flex-shrink: 0;
    color: var(--muted);
    transition: transform 0.2s;
}

.platform-current[aria-expanded="true"] .platform-chevron {
    transform: rotate(180deg);
}

.platform-options {
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 6px;
    background: var(--surface-alt);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    animation: dropIn 0.14s ease-out;
}

.platform-options[hidden] {
    display: none;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.platform-option {
    border-radius: 6px;
}

.platform-option:hover,
.platform-option:focus-visible {
    background: var(--surface-hover);
    outline: none;
}

.platform-option[aria-current="true"] {
    background: rgba(var(--primary-rgb), 0.1);
}

.platform-option[aria-current="true"] .platform-icon {
    background: rgba(var(--primary-rgb), 0.18);
    color: var(--accent);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: var(--gradient);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 28px -8px rgba(var(--primary-rgb), 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-download:hover {
    color: #fff;
    filter: brightness(1.1);
    box-shadow: 0 14px 34px -8px rgba(var(--primary-rgb), 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.btn-download:active {
    transform: translateY(0);
}

.dl-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 12px;
}

.dl-meta li::before {
    content: "✓";
    margin-right: 6px;
    color: var(--accent);
    font-weight: 700;
}

.dl-note {
    margin: 16px 0 0;
    padding: 10px 12px;
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.dl-note[hidden] {
    display: none;
}

.dl-note strong {
    color: var(--text);
}

/* Liste des mods */
.download-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.download-link:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.5);
    color: var(--text);
}

.download-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.download-text strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-text > span {
    color: var(--muted);
    font-size: 12px;
}

.download-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 7px;
    background: rgba(var(--primary-rgb), 0.12);
    border-radius: 6px;
    color: var(--accent);
    transition: background-color 0.2s, color 0.2s;
}

.download-link:hover .download-icon {
    background: var(--primary);
    color: #fff;
}

/* Chemins du dossier mods */
.paths {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.paths li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.paths span {
    min-width: 64px;
    color: var(--muted);
    font-size: 13px;
}

/* Autres launchers */
.subsection-title {
    margin: 44px 0 6px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.subsection-title + .panel-intro {
    margin-bottom: 20px;
}

.launcher-guide {
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.launcher-guide[open] {
    border-color: rgba(var(--accent-rgb), 0.35);
}

.launcher-guide summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

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

.launcher-guide summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.2s;
}

.launcher-guide[open] summary::after {
    border-color: var(--accent);
    transform: rotate(-135deg) translateY(-3px);
}

.launcher-guide summary:hover {
    color: var(--accent);
}

.launcher-guide .steps {
    margin: 4px 18px 18px;
}

.launcher-guide .steps > li {
    margin-bottom: 12px;
    padding-left: 38px;
    font-size: 15px;
}

.launcher-guide .steps > li::before {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.guide-note {
    margin: 0 18px 18px;
    padding: 10px 12px;
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 13px;
}

/* Pied de page */
.site-footer {
    padding: 24px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

/* Popup de choix */
.choice-dialog {
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 36px;
    background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
    color: var(--text);
}

.choice-dialog[open] {
    animation: dialogIn 0.2s ease-out;
}

@keyframes dialogIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.choice-dialog::backdrop {
    background: rgba(5, 3, 3, 0.75);
    backdrop-filter: blur(4px);
}

.choice-dialog h2 {
    margin: 0 36px 6px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.choice-dialog > p {
    margin: 0 0 26px;
    color: var(--muted);
}

.dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: color 0.2s, border-color 0.2s;
}

.dialog-close:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.choice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 20px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    text-align: left;
    transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
}

.choice:hover {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.55);
    transform: translateY(-2px);
}

.choice strong {
    margin-top: 6px;
    color: var(--text);
    font-size: 18px;
}

.choice-icon {
    width: 44px;
    height: 44px;
    padding: 11px;
    background: rgba(var(--primary-rgb), 0.12);
    border-radius: 10px;
    color: var(--accent);
}

.choice[data-choice="launcher"] .choice-icon {
    background: var(--gradient);
    color: #fff;
}

.choice-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 2px 9px;
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 999px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Écrans moyens et petits */
@media (max-width: 860px) {
    .launcher-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 560px) {
    .hero {
        padding: 56px 16px 48px;
    }

    .container {
        padding: 0 12px 56px;
    }

    .panel,
    .choice-dialog {
        padding: 26px 18px;
    }

    .dl-card {
        padding: 18px;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
