/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --bg:          #07091a;
    --bg-card:     rgba(15, 20, 50, 0.7);
    --border:      rgba(160, 140, 255, 0.18);
    --gold:        #e8c97a;
    --gold-light:  #f5e3a8;
    --gold-dim:    rgba(232, 201, 122, 0.15);
    --purple:      #8b72ff;
    --purple-soft: rgba(139, 114, 255, 0.12);
    --blue-glow:   #4a90e2;
    --text:        #d4cff0;
    --text-muted:  #8880a8;
    --radius:      20px;
    --radius-lg:   32px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    color: var(--gold);
}

/* ============================================================
   CANVAS ÉTOILES
   ============================================================ */
#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   LUEURS DE FOND
   ============================================================ */
.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.glow-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #3a1d8a, transparent 70%);
    top: -150px; left: -100px;
    animation: floatGlow 10s ease-in-out infinite;
}
.glow-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, #1a3a8a, transparent 70%);
    bottom: 100px; right: -80px;
    animation: floatGlow 13s ease-in-out infinite reverse;
}
.glow-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #6a3a1a, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: floatGlow 8s ease-in-out infinite 2s;
}
@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(20px, -30px) scale(1.1); }
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
main {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

/* ============================================================
   EN-TÊTE
   ============================================================ */
header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeDown 1s ease both;
}

.badge {
    font-family: 'Nunito', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--gold-dim);
    border: 1px solid rgba(232, 201, 122, 0.3);
    padding: 6px 18px;
    border-radius: 999px;
}

h1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1;
}
.title-small {
    font-family: 'Lora', serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.12em;
}
.title-big {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, #c89a3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(232, 201, 122, 0.4));
}

.subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ============================================================
   CARTE DESCRIPTION
   ============================================================ */
.description-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2px;
    animation: fadeUp 1s ease 0.2s both;
    position: relative;
    overflow: hidden;
}

.description-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
        rgba(232, 201, 122, 0.08) 0%,
        transparent 50%,
        rgba(139, 114, 255, 0.06) 100%);
    pointer-events: none;
}

.card-inner {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-icon {
    font-size: 2.4rem;
    filter: drop-shadow(0 0 12px rgba(232, 201, 122, 0.5));
}

.description-card h2 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.description-card p {
    font-size: 0.97rem;
    line-height: 1.8;
    color: var(--text);
}

.description-card p strong {
    color: var(--gold-light);
    font-weight: 600;
}

.italic {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--text-muted) !important;
    font-size: 0.9rem !important;
    border-left: 2px solid rgba(232, 201, 122, 0.25);
    padding-left: 16px;
}

.divider {
    text-align: center;
    color: rgba(232, 201, 122, 0.4);
    font-size: 1rem;
    letter-spacing: 0.5em;
    margin: 4px 0;
}

/* Bloc astuce */
.tip-block {
    background: rgba(74, 144, 226, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tip-question {
    font-weight: 600 !important;
    color: var(--gold-light) !important;
    font-size: 0.95rem !important;
}

.tip-answer {
    font-size: 0.92rem !important;
    color: var(--text-muted) !important;
}

.code {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.88em;
    color: var(--gold);
}

/* ============================================================
   SECTION TÉLÉCHARGEMENT
   ============================================================ */
.download-section {
    width: 100%;
    text-align: center;
    animation: fadeUp 1s ease 0.4s both;
}

.download-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--gold);
    margin-bottom: 8px;
}

.download-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 36px;
    font-style: italic;
    font-family: 'Lora', serif;
}

.download-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Carte OS */
.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 28px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    cursor: default;
}

.download-card:hover {
    transform: translateY(-6px);
    border-color: rgba(232, 201, 122, 0.4);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(232, 201, 122, 0.08);
}

/* Shimmer effect */
/* .card-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
} */

.os-icon {
    width: 72px; height: 72px;
    color: var(--gold);
    filter: drop-shadow(0 0 14px rgba(232, 201, 122, 0.35));
    transition: filter 0.3s ease, transform 0.3s ease;
}
.download-card:hover .os-icon {
    filter: drop-shadow(0 0 22px rgba(232, 201, 122, 0.6));
    transform: scale(1.05);
}

.download-card h3 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 0.05em;
}

.download-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: 'Lora', serif;
    font-style: italic;
}

/* Bouton télécharger */
.btn-download {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8c97a, #c89a3a);
    color: #0a0816;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 20px rgba(200, 154, 58, 0.35);
}

.btn-download:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 28px rgba(200, 154, 58, 0.55);
    filter: brightness(1.1);
}

.btn-download:active {
    transform: scale(0.98);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    animation: bounce 2.5s ease-in-out infinite;
}

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

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeUp 1s ease 0.6s both;
}

footer p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.heart {
    color: #e07a7a;
    animation: heartbeat 1.8s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15%       { transform: scale(1.3); }
    30%       { transform: scale(1); }
    45%       { transform: scale(1.15); }
}

.footer-small {
    font-size: 0.72rem !important;
    opacity: 0.5;
}

/* ============================================================
   ANIMATIONS D'ENTRÉE
   ============================================================ */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .card-inner { padding: 28px 24px; }

    .download-cards {
        grid-template-columns: 1fr;
    }

    .download-card {
        padding: 32px 24px;
    }
}


/* ============================================================
   MODAL OVERLAY
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 9, 26, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.modal-visible {
    opacity: 1;
}

.modal-overlay.modal-visible .modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ============================================================
   MODAL BOX
   ============================================================ */
.modal-box {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(18, 22, 58, 0.97) 0%, rgba(12, 15, 40, 0.99) 100%);
    border: 1px solid rgba(232, 201, 122, 0.22);
    border-radius: var(--radius-lg);
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(232, 201, 122, 0.06),
        inset 0 1px 0 rgba(232, 201, 122, 0.1);
    transform: translateY(28px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 201, 122, 0.2) transparent;
}

.modal-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
        rgba(232, 201, 122, 0.05) 0%,
        transparent 50%,
        rgba(139, 114, 255, 0.04) 100%);
    pointer-events: none;
}

/* ============================================================
   MODAL CLOSE
   ============================================================ */
.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(160, 140, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(232, 201, 122, 0.12);
    color: var(--gold);
    border-color: rgba(232, 201, 122, 0.35);
    transform: rotate(90deg);
}

/* ============================================================
   MODAL HEADER
   ============================================================ */
.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 40px;
}

.modal-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(232, 201, 122, 0.4));
    flex-shrink: 0;
}

.modal-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.04em;
    line-height: 1.3;
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.modal-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
}

.carousel-track {
    display: flex;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.slide-img-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

/* Placeholder si image absente */
.slide-img-wrap::after {
    content: attr(data-placeholder);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    pointer-events: none;
}

.slide-text {
    padding: 18px 22px;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text);
    border-top: 1px solid var(--border);
    background: rgba(15, 20, 50, 0.5);
}

.slide-text strong {
    color: var(--gold-light);
    font-weight: 600;
}

/* Flèches */
.carousel-arrow {
    position: absolute;
    top: calc(50% - 22px); /* centré sur la zone image uniquement */
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(232, 201, 122, 0.25);
    background: rgba(7, 9, 26, 0.75);
    backdrop-filter: blur(8px);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.3s ease, transform 0.2s ease;
    z-index: 2;
}

.carousel-arrow:hover {
    background: rgba(232, 201, 122, 0.15);
    border-color: rgba(232, 201, 122, 0.5);
    transform: translateY(-50%) scale(1.08);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* ============================================================
   DOTS
   ============================================================ */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(160, 140, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.dot-active {
    background: var(--gold);
    transform: scale(1.1);
    width: 22px;
    border-radius: 999px;
}

/* ============================================================
   NOTE DE BAS DE MODAL
   ============================================================ */
.modal-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(74, 144, 226, 0.07);
    border: 1px solid rgba(74, 144, 226, 0.18);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.note-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.modal-note p {
    font-size: 0.83rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-family: 'Lora', serif;
    font-style: italic;
}

.modal-note p strong {
    color: var(--gold-light);
    font-style: normal;
}

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

/* ============================================================
   LANG SWITCHER
   ============================================================ */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(232, 201, 122, 0.28);
    background: rgba(15, 20, 50, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--gold);
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lang-switcher:hover {
    background: rgba(232, 201, 122, 0.12);
    border-color: rgba(232, 201, 122, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(232, 201, 122, 0.15);
}

.lang-switcher:active {
    transform: translateY(0);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-label {
    line-height: 1;
}

@media (max-width: 600px) {
    .modal-box {
        padding: 28px 20px 24px;
        gap: 20px;
        max-height: 92vh;
    }

    .modal-title {
        font-size: 0.9rem;
    }

    .slide-text {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 600px) {
    .lang-switcher {
        top: 14px;
        right: 14px;
        padding: 7px 13px;
    }
}