/* =========================
   Base
========================= */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
}

main {
    min-height: calc(100vh - 220px);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    max-width: var(--max-width);
}

.section-title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--white);
    text-align: center;
}

.section-subtitle {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    font-size: 1.08rem;
    color: var(--text-soft);
    text-align: center;
}

.hero-title {
    margin: 0 0 1rem;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    font-weight: 900;
    color: var(--white);
}

.hero-subtitle {
    max-width: 760px;
    margin: 0 auto 2rem;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    color: var(--text-soft);
}

.cta-button,
.hero-cta,
.hero-button,
.oops-button,
.community-link {
    transition: all 0.25s ease;
}

.cta-button,
.hero-cta,
.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.9rem 1.4rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover,
.hero-cta:hover,
.hero-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.hero-cta.secondary,
.hero-button.secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--border-strong);
    box-shadow: none;
}

.hero-cta.secondary:hover,
.hero-button.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: var(--white);
}

.hero-cta.documentation-cta {
    background: var(--accent);
    color: var(--black);
}

.hero-cta.documentation-cta:hover {
    background: var(--accent-hover);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 600;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: 0.875rem;
    background: var(--surface);
    color: var(--text);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* =========================
   Header
========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: rgba(11, 18, 32, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-navbar {
    min-height: var(--header-height);
    padding: 0.8rem 0;
}

.header-brand {
    color: var(--white) !important;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header-brand:hover {
    color: var(--primary) !important;
}

.header-nav .header-nav-link {
    position: relative;
    margin-left: 1rem;
    padding: 0.6rem 0.9rem !important;
    color: var(--text) !important;
    font-weight: 600;
    border-radius: 999px;
}

.header-nav .header-nav-link:hover,
.header-nav .header-nav-link.active {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.05);
}

.header-btn-quasar {
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.08);
    color: var(--primary) !important;
}

.header-btn-quasar:hover,
.header-btn-quasar.active {
    background: rgba(56, 189, 248, 0.16);
    color: var(--white) !important;
    border-color: rgba(56, 189, 248, 0.65);
}

.navbar-toggler {
    border-color: var(--border-strong);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

@media (max-width: 991.98px) {
    .header-collapse {
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--surface);
    }

    .header-nav .header-nav-link {
        margin-left: 0;
        margin-bottom: 0.4rem;
    }
}

/* =========================
   Footer + cookies
========================= */
.footer {
    background: var(--bg-soft);
    color: var(--text);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-title {
    position: relative;
    margin-bottom: 1.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--white);
}

.footer-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    margin-top: 0.7rem;
    border-radius: 999px;
    background: var(--primary);
}

.footer-text,
.footer-contact li,
.footer-link,
.footer-copyright-text {
    color: var(--text-soft);
}

.footer-links,
.footer-contact {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.footer-link {
    display: inline-block;
    margin-bottom: 0.65rem;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.footer-icon {
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    text-decoration: none;
}

.footer-social-link:hover {
    background: rgba(56, 189, 248, 0.18);
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-copyright {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1200;
    padding: 0;
    transform: translateY(120%);
    transition: transform 0.35s ease;
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.15rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(17, 24, 39, 0.96);
    box-shadow: var(--shadow-md);
}

.cookie-text {
    margin: 0;
    color: var(--text-soft);
}

.cookie-link {
    color: var(--primary);
}

.cookie-link:hover {
    color: var(--white);
}

.cookie-buttons {
    display: flex;
    flex-shrink: 0;
    gap: 0.75rem;
}

.cookie-button {
    min-height: 42px;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
}

.cookie-button.accept {
    background: var(--primary);
    color: var(--black);
}

.cookie-button.accept:hover {
    background: var(--primary-hover);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-buttons {
        width: 100%;
    }

    .cookie-button {
        width: 100%;
    }
}

/* =========================
   Home
========================= */
.home-page .hero-section {
    padding: 6.5rem 0 4rem;
    background:
        radial-gradient(circle at top, rgba(45, 212, 191, 0.15), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.18), transparent 25%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.home-page .hero-content {
    max-width: 900px;
    margin: 0 auto 2rem;
}

#heroCarousel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

#heroCarousel .carousel-item img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.home-page .projects-section,
.home-page .about-section {
    padding: var(--section-padding) 0;
}

.home-page .projects-section {
    background: var(--bg-soft);
}

.home-page .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.home-page .project-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.home-page .project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.home-page .project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.home-page .project-content {
    padding: 1.25rem;
}

.home-page .project-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
}

.home-page .project-description {
    margin-bottom: 1rem;
    color: var(--text-soft);
}

.home-page .project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.home-page .project-link:hover {
    color: var(--white);
}

.home-page .about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.home-page .about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.home-page .feature {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.home-page .feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.home-page .feature-icon {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--primary);
}

.home-page .feature-title {
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 800;
}

.home-page .feature-description {
    margin: 0;
    color: var(--text-soft);
}

/* =========================
   Quasar Engine
========================= */
.quazar-engine-page .hero-section {
    padding: 7rem 0 5rem;
    background:
        radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.22), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(45, 212, 191, 0.16), transparent 26%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.quazar-engine-page .hero-content {
    max-width: 920px;
    margin: 0 auto;
}

.quazar-engine-page .hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.quazar-engine-page .presentation-section,
.quazar-engine-page .download-section {
    padding: var(--section-padding) 0;
    background: var(--bg-soft);
}

.quazar-engine-page .updates-section,
.quazar-engine-page .community-section {
    padding: var(--section-padding) 0;
}

.quazar-engine-page .presentation-content {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 2rem;
    align-items: center;
}

.quazar-engine-page .presentation-text p {
    color: var(--text-soft);
    font-size: 1.06rem;
}

.quazar-engine-page .feature-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0 0;
}

.quazar-engine-page .feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    color: var(--text);
}

.quazar-engine-page .feature-list li i {
    margin-top: 0.2rem;
    color: var(--accent);
}

.quazar-engine-page .presentation-image img {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.quazar-engine-page .updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.update-card {
    height: 100%;
    padding: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.update-card:hover,
.update-card.active {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.update-version {
    margin: 0 0 0.4rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
}

.update-date {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.update-patches {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-soft);
}

.patch-list-button {
    margin-top: 2rem;
    text-align: center;
}

.quazar-engine-page .download-section {
    text-align: center;
}

.download-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.community-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
}

.community-link:hover {
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

/* =========================
   Patch notes
========================= */
.patch-list-page .patch-hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.patch-list-page .patch-list-section {
    padding: 3rem 0 5rem;
}

.patch-card {
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.patch-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.patch-version {
    margin: 0 0 0.3rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.patch-date {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.patch-subtitle {
    margin: 1rem 0 0.5rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 800;
}

.patch-features,
.patch-bugs {
    list-style: none;
    margin: 0;
    padding-left: 1.5rem;
}

.patch-features li,
.patch-bugs li {
    position: relative;
    margin-bottom: 0.6rem;
    color: var(--text-soft);
}

.patch-features li::before,
.patch-bugs li::before {
    position: absolute;
    left: -1.4rem;
    top: 0;
    font-weight: 900;
}

.patch-features li::before {
    content: "✔";
    color: var(--success);
}

.patch-bugs li::before {
    content: "✖";
    color: var(--danger);
}

/* =========================
   Projets
========================= */
.projects-page .projects-hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.projects-page .projects-list-section {
    padding: 3rem 0 5rem;
}

.projects-page .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.projects-page .project-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.projects-page .project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.projects-page .project-link {
    display: block;
    text-decoration: none;
}

.projects-page .project-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.projects-page .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects-page .project-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
}

.projects-page .project-title {
    margin: 0;
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
}

.projects-page .project-version {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

/* =========================
   Contact
========================= */
.contact-page .contact-hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.contact-page .contact-form-section,
.contact-page .contact-info-section {
    padding: 3rem 0;
}

.contact-page .contact-form {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.contact-page .contact-info-section {
    background: var(--bg-soft);
}

.contact-page .contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.contact-page .contact-info-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.contact-page .contact-info-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-page .contact-icon {
    margin-bottom: 0.8rem;
    font-size: 2rem;
    color: var(--primary);
}

.contact-page .contact-info-title {
    margin-bottom: 0.4rem;
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 800;
}

.contact-page .contact-info-text {
    margin: 0;
    color: var(--text-soft);
}

/* =========================
   Pages légales
========================= */
.privacy-policy-page,
.terms-and-conditions-page,
.eula-page {
    background: var(--bg);
}

.privacy-section,
.terms-section,
.eula-section {
    padding: 5rem 0;
}

.privacy-content,
.terms-content,
.eula-content {
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.privacy-content h2,
.terms-content h2,
.eula-content h2 {
    margin: 2rem 0 0.8rem;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 800;
}

.privacy-content h2:first-child,
.terms-content h2:first-child,
.eula-content h2:first-child {
    margin-top: 0;
}

.privacy-content p,
.privacy-content li,
.privacy-content address,
.terms-content p,
.terms-content li,
.terms-content address,
.eula-content p,
.eula-content li,
.eula-content address {
    color: var(--text-soft);
}

.privacy-content ul,
.terms-content ul,
.eula-content ul {
    padding-left: 1.25rem;
}

.privacy-content a,
.terms-content a,
.eula-content a {
    color: var(--primary);
}

.privacy-content a:hover,
.terms-content a:hover,
.eula-content a:hover {
    color: var(--white);
}

/* =========================
   404
========================= */
.oops-page .oops-hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(180deg, var(--bg-soft), var(--bg));
    text-align: center;
}

.oops-title {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--white);
}

.oops-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-soft);
}

.oops-page .oops-options-section {
    padding: 3rem 0 5rem;
}

.oops-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.oops-option-card {
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.oops-option-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.oops-icon {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--primary);
}

.oops-option-title {
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 800;
}

.oops-option-description {
    margin-bottom: 1rem;
    color: var(--text-soft);
}

.oops-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
}

.oops-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px) {
    .quazar-engine-page .presentation-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.4rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .footer {
        padding-top: 2.5rem;
    }

    .home-page .hero-section,
    .quazar-engine-page .hero-section,
    .patch-list-page .patch-hero-section,
    .projects-page .projects-hero-section,
    .contact-page .contact-hero-section,
    .oops-page .oops-hero-section {
        padding-top: 4.5rem;
    }
}