/**
 * ================================================================
 *  BILIA  — Global Styles
 *  Fichier : BILIA/frontend/css/style.css
 * ================================================================
 */

@import url('theme.css');
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; text-decoration: none; }
html { font-size: 62.5%; scroll-behavior: smooth; scroll-padding-top: 9rem; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    position: relative;
    min-height: 100vh;
}

/* ── THEME BACKGROUND OVERLAY ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--theme-overlay);
    pointer-events: none;
    z-index: 0;
}



/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: .8rem; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--main-color); border-radius: .5rem; }

/* ── SECTIONS ── */
section { padding: 3rem 2rem; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: .05em; text-transform: uppercase; }

.heading {
    margin-bottom: 3rem;
    text-align: center;
    font-size: 4rem;
    color: var(--white);
    position: relative;
    padding-bottom: 1.5rem;
}
.heading::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 6rem; height: .3rem;
    background: var(--main-color);
    box-shadow: var(--glow-shadow);
    border-radius: 2rem;
}
.heading span { color: var(--main-color); }

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    margin-top: 1rem;
    color: var(--main-color);
    border-radius: .5rem;
    border: .15rem solid var(--main-color);
    font-size: 1.6rem;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: .08em;
    padding: 1rem 3rem;
    cursor: pointer;
    background: transparent;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-transform: uppercase;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    height: 100%; width: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: var(--transition);
}
.btn:hover::before { left: 0; }
.btn:hover { color: var(--black); box-shadow: var(--glow-shadow); }
.btn--solid { background: rgba(var(--main-color-rgb), 0.15); }
.btn--sm { font-size: 1.3rem; padding: .6rem 1.6rem; margin-top: 0; }

/* ── INPUTS ── */
.input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
textarea {
    background: var(--surface);
    color: var(--white);
    border: .1rem solid var(--border-color);
    border-radius: .5rem;
    padding: 1.2rem 1.6rem;
    font-size: 1.6rem;
    font-family: var(--font-body);
    transition: var(--transition);
    width: 100%;
}
.input:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 .3rem rgba(var(--main-color-rgb), 0.15);
}
.input::placeholder, textarea::placeholder { color: var(--muted); }

/* ── HEADER ── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}
.header.active {
    background: rgba(var(--main-color-rgb), 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 .2rem 3rem rgba(0,0,0,.5), 0 .1rem 0 var(--border-color);
}
.header .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.8rem 2.5rem;
}
.header .flex .logo {
    font-family: var(--font-head);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: .15em;
    text-transform: uppercase;
    text-shadow: 0 0 2rem rgba(var(--main-color-rgb), 0.5);
}
.header .flex .logo:hover { color: var(--main-color); }
.header .flex .navbar a {
    margin: 0 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: .07em;
    color: var(--light-white);
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
}
.header .flex .navbar a::after {
    content: '';
    position: absolute;
    bottom: -.4rem; left: 0;
    width: 0; height: .2rem;
    background: var(--main-color);
    transition: width var(--transition);
}
.header .flex .navbar a:hover { color: var(--main-color); }
.header .flex .navbar a:hover::after,
.header .flex .navbar a.active::after { width: 100%; }

#menu-btn {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 10000;
    background: var(--main-color);
    color: var(--black);
    height: 4.5rem; width: 5rem;
    line-height: 4.5rem;
    font-size: 2rem;
    border-radius: .5rem;
    text-align: center;
    display: none;
    cursor: pointer;
    box-shadow: var(--glow-shadow);
}

/* ── HOME ── */
.home {
    background: url(../images/home-bg.webp) no-repeat center/cover;
    position: relative;
    z-index: 1;
}
.home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--main-color-rgb), 0.06) 0%, rgba(0,0,0,0.5) 60%, var(--black) 100%);
}
.home .flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 100vh;
    flex-wrap: wrap-reverse;
    position: relative;
}
.home .flex .image { flex: 1 1 40rem; }
.home .flex .image img {
    width: 100%;
    filter: drop-shadow(0 0 3rem rgba(var(--main-color-rgb), 0.4));
    animation: biliaFloat 4s ease-in-out infinite;
}
.home .flex .content { flex: 1 1 40rem; }
.home .flex .content h3 {
    font-family: var(--font-head);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .05em;
}
.home .flex .content h3 span { color: var(--main-color); text-shadow: var(--glow-shadow); }
.home .flex .content p {
    font-size: 1.6rem;
    color: var(--light-white);
    padding: 1.5rem 0;
    line-height: 1.9;
    max-width: 50rem;
}

/* ── FEATURES ── */
.features .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
    gap: 2.5rem;
}
.features .box-container .box {
    text-align: center;
    padding: 5rem 3rem;
    border-radius: 1rem;
    background: var(--surface);
    border: .1rem solid var(--border-color);
    transition: var(--transition);
}
.features .box-container .box:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: var(--glow-shadow);
}
.features .box-container .box img { height: 12rem; object-fit: contain; }
.features .box-container .box h3 { margin: 2rem 0 1rem; font-size: 2.2rem; }
.features .box-container .box p { font-size: 1.5rem; line-height: 1.8; color: var(--light-white); }

/* ── ABOUT ── */
.about .flex { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; }
.about .flex .image { flex: 1 1 30rem; }
.about .flex .image img {
    height: 28rem;
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 2rem rgba(var(--main-color-rgb), 0.3));
}
.about .flex .content { flex: 1 1 30rem; }
.about .flex .content h3 { font-size: 3rem; margin-bottom: 1.5rem; }
.about .flex .content p { font-size: 1.5rem; line-height: 1.9; color: var(--light-white); padding: .5rem 0; }

/* ── TOP GAMES ── */
.top-games .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(27rem, 1fr));
    gap: 2rem;
}
.top-games .box-container .box {
    height: 30rem;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    border: .1rem solid var(--border-color);
}
.top-games .box-container .box img {
    height: 100%; width: 100%;
    object-fit: cover;
    transition: .6s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-games .box-container .box:hover img { transform: scale(1.08); }
.top-games .box-container .box::before {
    content: 'Jouer maintenant';
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(transparent 40%, rgba(var(--main-color-rgb), 0.92));
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 2rem;
    color: var(--black);
    font-family: var(--font-head);
    font-size: 2rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    opacity: 0; transition: var(--transition);
}
.top-games .box-container .box:hover::before { opacity: 1; }

/* ── INFO ── */
.info-container {
    padding: 5rem 2rem;
    background: var(--surface);
    border-top: .1rem solid var(--border-color);
    border-bottom: .1rem solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
}
.info-container .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: auto;
}
.info-container .box {
    background: var(--bg-color);
    padding: 4rem 2.5rem;
    border-radius: 1rem;
    border: .1rem solid var(--border-color);
    transition: var(--transition);
}
.info-container .box:hover {
    transform: translateY(-6px);
    border-color: var(--main-color);
    box-shadow: var(--glow-shadow);
}
.info-container .box h3 { font-size: 1.8rem; color: var(--light-white); line-height: 1.5; }

/* ── FAQ ── */
.faq .box-container { display: grid; gap: 1.5rem; }
.faq .box-container .box {
    border: .1rem solid var(--border-color);
    border-radius: .8rem;
    padding: 2rem;
    background: rgba(var(--main-color-rgb), 0.03);
    transition: var(--transition);
}
.faq .box-container .box:hover { border-color: var(--main-color); }
.faq .box-container .box .title {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    color: var(--white);
    font-size: 1.8rem;
    font-family: var(--font-head);
    font-weight: 600;
}
.faq .box-container .box .title i { color: var(--main-color); transition: var(--transition); }
.faq .box-container .box .content {
    font-size: 1.5rem; line-height: 1.8;
    color: var(--light-white);
    transform-origin: top;
    transform: scaleY(0); height: 0;
    overflow: hidden;
    transition: var(--transition);
}
.faq .box-container .box .content.active {
    transform: scaleY(1); height: auto; padding-top: 1.5rem;
}

/* ── CONTACT ── */
.contact .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.5rem;
}
.contact .box-container .box {
    text-align: center;
    padding: 3.5rem;
    border-radius: 1rem;
    background: var(--surface);
    border: .1rem solid var(--border-color);
    transition: var(--transition);
}
.contact .box-container .box:hover { border-color: var(--main-color); box-shadow: var(--glow-shadow); }
.contact .box-container .box img { height: 10rem; width: 10rem; margin-bottom: 2rem; border-radius: 50%; object-fit: cover; }
.contact .box-container .box h3 { margin: 1.5rem 0; font-size: 2.2rem; }
.contact .box-container .box a { display: block; color: var(--light-white); font-size: 1.5rem; transition: var(--transition); }
.contact .box-container .box a:hover { color: var(--main-color); }
.contact .form { margin-top: 2rem; }
.contact .form .flex { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact .form .flex .input,
.contact .form textarea { flex: 1 1 40rem; text-transform: none; }
.contact .form textarea { height: 18rem; width: 100%; resize: none; }

/* ── FOOTER ── */
.footer {
    background: var(--surface);
    border-top: .1rem solid var(--border-color);
    position: relative;
    z-index: 1;
}
.footer .box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 3rem;
}
.footer .box-container .box h3 { font-size: 2rem; color: var(--main-color); margin-bottom: 1.5rem; }
.footer .box-container .box .link {
    padding: .8rem 0; font-size: 1.5rem;
    color: var(--light-white); display: block;
    transition: var(--transition);
}
.footer .box-container .box .link:hover { color: var(--main-color); padding-left: .8rem; }
.footer .box-container .box p { font-size: 1.5rem; line-height: 1.7; color: var(--light-white); }
.footer .box-container .box .share-links { margin-top: 1.5rem; }
.footer .box-container .box .share-links a {
    height: 4rem; width: 4rem; line-height: 4rem;
    border-radius: 50%; font-size: 1.8rem;
    background: var(--surface-2);
    border: .1rem solid var(--border-color);
    color: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 .5rem;
    transition: var(--transition);
}
.footer .box-container .box .share-links a:hover {
    background: var(--main-color); color: var(--black);
    box-shadow: var(--glow-shadow); border-color: var(--main-color);
}
.footer .credit {
    display: flex; flex-wrap: wrap;
    justify-content: space-between;
    font-size: 1.4rem;
    border-top: .1rem solid var(--border-color);
    color: var(--muted);
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}
.footer .credit span { color: var(--main-color); }

/* ── TOAST ── */
#toast-container {
    position: fixed;
    bottom: 3rem; left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.4rem 2.4rem;
    border-radius: .8rem;
    background: var(--surface);
    border: .1rem solid var(--border-color);
    color: var(--white);
    font-size: 1.5rem;
    font-family: var(--font-body);
    box-shadow: var(--box-shadow);
    animation: toastIn .4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
    min-width: 28rem;
    max-width: 45rem;
}
.toast.toast--success { border-color: #00ff88; }
.toast.toast--success .toast__icon { color: #00ff88; }
.toast.toast--error { border-color: #ff4466; }
.toast.toast--error .toast__icon { color: #ff4466; }
.toast.toast--info { border-color: var(--main-color); }
.toast.toast--info .toast__icon { color: var(--main-color); }
.toast.toast--warning { border-color: #ffcc00; }
.toast.toast--warning .toast__icon { color: #ffcc00; }
.toast__icon { font-size: 2rem; flex-shrink: 0; }
.toast__msg { flex: 1; }
.toast__close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.6rem; padding: 0 .4rem; }
.toast.leaving { animation: toastOut .3s ease forwards; }

/* ── BACK BUTTON (Global) ── */
.back-btn {
    position: fixed;
    top: 8rem; left: 2rem;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: .8rem;
    background: var(--surface);
    border: .1rem solid var(--border-color);
    color: var(--light-white);
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 1rem 1.8rem;
    border-radius: .8rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.back-btn:hover {
    border-color: var(--main-color);
    color: var(--main-color);
    box-shadow: var(--glow-shadow);
}

/* ── KEYFRAMES ── */
@keyframes biliaFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5rem); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(2rem) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(2rem) scale(.9); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(2.5rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes biliaGlowPulse { 0%, 100% { box-shadow: 0 0 5px rgba(var(--main-color-rgb), 0.4); } 50% { box-shadow: 0 0 25px rgba(var(--main-color-rgb), 0.8), 0 0 50px rgba(var(--main-color-rgb), 0.3); } }
@keyframes neonPulse { 0%, 100% { box-shadow: 0 0 5px rgba(var(--main-color-rgb), 0.4); } 50% { box-shadow: 0 0 20px rgba(var(--main-color-rgb), 0.8); } }
@keyframes xpFill { from { width: 0; } to { width: var(--xp-width, 50%); } }
@keyframes badgePop { 0% { transform: scale(0) rotate(-15deg); opacity: 0; } 70% { transform: scale(1.2) rotate(5deg); } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── MEDIA QUERIES ── */
@media (max-width: 991px) { html { font-size: 55%; } }
@media (max-width: 768px) {
    #menu-btn { display: inline-block; }
    .header .flex .navbar {
        position: fixed; top: 0; left: -120%;
        height: 100vh; width: 100%;
        z-index: 2000;
        background: var(--black);
        display: flex; align-items: center;
        justify-content: center;
        gap: 3rem; flex-direction: column;
        transition: var(--transition);
    }
    .header .flex .navbar.active { left: 0; }
    .header .flex .navbar a { font-size: 2.8rem; }
    .home .flex .content h3 { font-size: 4rem; }
    .footer .credit { justify-content: center; text-align: center; }
}
@media (max-width: 450px) { html { font-size: 50%; } }
