/* Fredoka — auto-hébergée (RGPD : aucune requête vers Google, aucune IP transmise à un tiers).
   Police variable : un seul fichier woff2 par sous-ensemble couvre les graisses 400 → 700. */
@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 400 700;
    font-stretch: 100%;
    font-display: swap;
    src: url('assets/fonts/fredoka-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Fredoka';
    font-style: normal;
    font-weight: 400 700;
    font-stretch: 100%;
    font-display: swap;
    src: url('assets/fonts/fredoka-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* Color Palette - Modern Arcade */
    --color-bg: #121225;
    --color-primary: #00f0ff;
    /* Cyan */
    --color-secondary: #bd00ff;
    /* Purple */
    --color-accent-1: #ff00aa;
    /* Pink */
    --color-accent-2: #00ff66;
    /* Green */
    --color-gold: #FFD700;
    /* Gold */
    --color-white: #ffffff;
    --color-surface: #1f1f3a;

    --font-main: 'Fredoka', sans-serif;

    --shadow-hard: 4px 4px 0px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(0, 240, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: var(--color-white);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    margin: auto;
}

@keyframes gradient {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* Background Shapes & Waves */
/* Background Shapes & Waves */
/* Background Shapes Container */
.background-shapes {
    display: none;
    /* Replaced by star elements */
}

/* Starfield Animations */
#stars,
#stars2,
#stars3 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

#stars {
    width: 1px;
    height: 1px;
    background: transparent;
    animation: animStar 100s linear infinite;
}

#stars:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 1px;
    height: 1px;
    background: transparent;
}

#stars2 {
    width: 2px;
    height: 2px;
    background: transparent;
    animation: animStar 150s linear infinite;
}

#stars2:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 2px;
    height: 2px;
    background: transparent;
}

#stars3 {
    width: 3px;
    height: 3px;
    background: transparent;
    animation: animStar 200s linear infinite;
}

#stars3:after {
    content: " ";
    position: absolute;
    top: 2000px;
    width: 3px;
    height: 3px;
    background: transparent;
}

@keyframes animStar {
    from {
        transform: translateY(0px);
    }

    to {
        transform: translateY(-2000px);
    }
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-top: 2rem;
}

.logo-container {
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
    }

    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.3));
    }
}

.tagline {
    font-size: 1.5rem;
    color: var(--color-primary);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Services Grid */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.service-card {
    background-color: var(--color-surface);
    border: 3px solid var(--color-primary);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-hard);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 255, 255, 0.2);
}

.service-card:active {
    transform: translateY(0);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.7);
}

.icon {
    font-size: 3rem;
}

.service-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.service-name {
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    line-height: 1.1;
}

.service-desc {
    font-weight: 400;
    font-size: 0.8rem;
    opacity: 0.7;
    line-height: 1.3;
    margin-top: -0.4rem;
    max-width: 22ch;
}

/* Specific Card Colors */
.service-card.minecraft {
    border-color: var(--color-accent-2);
    /* Green */
}

.service-card.minecraft:hover {
    background-color: rgba(0, 255, 102, 0.1);
}

.service-card.minecraft.disabled {
    border-color: #555;
    background-color: rgba(30, 30, 30, 0.6);
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.8;
}

.service-card.minecraft.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-hard);
    background-color: rgba(30, 30, 30, 0.6);
}

.service-card .status {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: -0.5rem;
}

.service-card.jellyfin {
    border-color: var(--color-secondary);
    /* Purple */
}

.service-card.jellyfin:hover {
    background-color: rgba(189, 0, 255, 0.1);
}

.service-card.discord {
    border-color: #5865F2;
    /* Discord Blurple */
}

.service-card.discord:hover {
    background-color: rgba(88, 101, 242, 0.1);
}

.service-card.more {
    border-color: var(--color-primary);
    /* Cyan */
    border-style: dashed;
    opacity: 0.7;
}

/* MindMatch card (pink/purple, brain theme) */
.service-card.mindmatch {
    border-color: var(--color-accent-1);
    /* Pink */
}

.service-card.mindmatch:hover {
    background-color: rgba(255, 0, 170, 0.1);
}

/* Featured card — spans the full grid width, horizontal layout, flagship treatment */
.service-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    background:
        radial-gradient(circle at 12% 40%, rgba(255, 0, 170, 0.18), transparent 60%),
        linear-gradient(135deg, rgba(189, 0, 255, 0.14) 0%, rgba(31, 31, 58, 0.9) 55%);
}

.service-card.featured .service-icon {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 14px rgba(255, 0, 170, 0.55));
    animation: pulse 3s infinite ease-in-out;
}

.featured-text {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.service-card.featured .service-name {
    font-size: 1.6rem;
}

.service-card.featured .service-desc {
    max-width: 46ch;
    font-size: 0.95rem;
    opacity: 0.85;
    margin-top: 0;
}

.featured-cta {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-accent-1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
}

.service-card.featured:hover .featured-cta {
    transform: translateX(4px);
}

/* "Nouveau" badge */
.badge-new {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--color-accent-1), var(--color-secondary));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    box-shadow: 0 0 12px rgba(255, 0, 170, 0.6);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(255, 0, 170, 0.5);
    }

    50% {
        box-shadow: 0 0 18px rgba(255, 0, 170, 0.9);
    }
}

/* Status Indicators */
.status-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.status-dot.online {
    background-color: var(--color-accent-2);
    /* Green */
    box-shadow: 0 0 10px var(--color-accent-2);
    animation: statusPulse 2s infinite;
}

.status-dot.offline {
    background-color: #ff3333;
    /* Red */
    box-shadow: 0 0 8px rgba(255, 51, 51, 0.7);
}

.status-dot.checking {
    /* État "vérification en cours" avant la réponse du ping */
    background-color: #9aa0b5;
    box-shadow: none;
    animation: statusPulse 1.2s infinite;
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Footer & Support */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 1rem;
}

.footer-links {
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--color-primary);
    opacity: 0.65;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Legal / privacy page */
.legal-page {
    max-width: 720px;
    width: 100%;
    background-color: var(--color-surface);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 16px;
    padding: 2.5rem;
    line-height: 1.6;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.legal-back {
    display: inline-block;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.legal-back:hover {
    opacity: 1;
    text-decoration: underline;
}

.legal-page h1 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.legal-page h2 {
    color: var(--color-white);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.legal-page section {
    margin-bottom: 1.75rem;
}

.legal-page a {
    color: var(--color-primary);
}

.legal-updated {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 2rem;
}

.support-button {
    background: transparent;
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.support-button:hover {
    background-color: var(--color-gold);
    color: #000;
    box-shadow: 0 0 15px var(--color-gold);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, #1f1f3a 0%, #121225 100%);
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid var(--color-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    animation: slideDown 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close-modal:hover {
    color: var(--color-white);
}

.modal h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.modal p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.qr-container {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    display: inline-block;
}

.qr-code {
    width: 200px;
    /* Reduced specific size for QR */
    height: auto;
    display: block;
}

.qr-label {
    color: #000;
    font-weight: bold;
    margin-top: 0.5rem;
    margin-bottom: 0 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .main-logo {
        max-width: 200px;
    }

    .services {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Featured card stacks vertically and stays centered on small screens */
    .service-card.featured {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
    }

    .featured-text {
        align-items: center;
    }

    .service-card.featured .service-desc {
        max-width: 32ch;
    }
}

/* Respect users who prefer reduced motion: kill the heavy starfield scroll, the logo/icon
   pulsing and badge glow. The page stays fully usable, just calmer and lighter on the CPU. */
@media (prefers-reduced-motion: reduce) {

    #stars,
    #stars2,
    #stars3 {
        animation: none;
    }

    .main-logo,
    .service-card.featured .service-icon,
    .status-dot.online,
    .badge-new {
        animation: none;
    }

    .service-card,
    .featured-cta,
    .support-button {
        transition: none;
    }
}