/* Reset minimal + variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;

}

:root {
    --bg: #000000;
    --surface: #1a1a1a;
    --text: #fafafa;
    --text-yellow: #A88B02;
    --accent: #ffd200;
    --gradient: linear-gradient(90deg, #FFD84C 0%, #FFB400 50%, #FF8C00 100%);
    --muted: #9aa0a6;
    --radius: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial,
        "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
}

/* Skip link for a11y */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: var(--space-4);
    top: var(--space-4);
    width: auto;
    height: auto;
    background: var(--accent);
    color: #000;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    z-index: 1000;
}

/* Navigation */
nav {
    background-color: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-4);
}

nav .logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: inherit;
    text-decoration: none;
}

nav img {
    height: 40px;
    inline-size: auto;
}

nav h1 {
    font-size: 1.25rem;
}

nav ul {
    list-style: none;
    display: flex;
    text-transform: uppercase;
    gap: var(--space-2);
}

nav a {
    color: var(--text);
    text-decoration: none;
    align-items: center;
    text-align: center;
    border-radius: var(--radius);
}

nav a:hover {
    color: var(--accent);
}

.navbar .nav-list {
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
}

button.nav-link {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    padding: 0.5rem 0.75rem;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--accent);
}

/* Sticky header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.burger {
    display: none;
}

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

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-4);
}

section+section {
    margin-top: var(--space-6);
}

section[id] {
    scroll-margin-top: 80px;
}

h2 {
    margin-top: 4rem;
    margin-bottom: 3rem;
    font-size: clamp(2rem, 6vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: lighter;
    text-align: center;
}

.hero {
    position: relative;
    min-height: 92svh;
    width: 100%;
    display: grid;
    place-items: center;
    padding: var(--space-6) var(--space-4);
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -1;
}

.hero__content {
    text-align: center;
    max-width: 600px;
}

.hero__title {
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero__subtitle {
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    margin: var(--space-4) auto var(--space-6);
}


.btn {
    display: inline-block;
    background: var(--gradient);
    color: var(--bg);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    margin-top: var(--space-4);
}

.btn:hover {
    filter: brightness(1.05);
}

.btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Barre de filtre */
.filter-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-2);
    margin: var(--space-6) 0;
}

.filter-bar label {
    color: var(--text);
    font-weight: 600;
}

.filter-bar select {
    background: var(--surface);
    color: var(--accent);
    border: 1px solid #5d5d5d;
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-3);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-bar select:hover,
.filter-bar select:focus {
    outline: none;
    background: #222;
    cursor: pointer;
}

/* Tops section */
.top-cards-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-6);
}

.top-cards-list a {
    text-decoration: none;
    color: inherit;
}

.top-card {
    width: 280px;
    padding: var(--space-4);
    text-align: center;
    border-width: 1px;
    border-style: solid;
    border-image: var(--gradient) 1;
    border-radius: var(--radius);
    transition: all 0.1s ease;
}

.top-card:hover {
    cursor: pointer;
    box-shadow: #A88B02 0px 0px 20px;
}

.top-card img {
    width: 100%;
    height: auto;
}

h3 {
    margin: var(--space-3) 0;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: normal;
    font-size: 1.7rem;
}

#grandes-marques #marques-logos {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: var(--space-4);
}

#grandes-marques #marques-logos img {
    height: 60px;
    margin: var(--space-2);
}

/* Section Guides d'achat */
.card-guide-dachat {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.card-guide-dachat img {
    height: 400px;
}

/* Footer */
footer {
    background-color: var(--surface);
    text-align: center;
    padding: var(--space-4);
    margin-top: var(--space-6);
    color: var(--muted);
    font-size: 0.9rem;
}

footer img {
    height: 20px;
}

footer .marques-footer {
    margin: var(--space-6) 0;
}

footer a {
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
}

footer .legal {
    margin: var(--space-2) 0;
}

footer a:hover {
    color: var(--accent);
}

/* Contact section */
.contact-intro {
    color: var(--muted);
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-6);
}

.contact-form {
    display: grid;
    gap: var(--space-4);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.contact-form .form-field label {
    display: block;
    margin-bottom: var(--space-2);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 12px 14px;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 210, 0, 0.25);
}

.contact-form .form-actions {
    text-align: center;
}

.contact-form .hidden {
    display: none;
}

button {
    border: none;
    cursor: pointer;
}

/* --- Sous-menus  --- */
.nav-link.js-menu-toggle {
    background: none;
    border: 0;
    padding: var(--space-2) var(--space-3);
    font: inherit;
    cursor: pointer;
    text-transform: uppercase;
}

.nav-item.has-submenu {
    position: relative;
}

.submenu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.submenu[hidden] {
    display: none !important;
}

.nav-item.has-submenu>.submenu {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 20px 1rem;
    min-width: 180px;
    background: var(--surface);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 220ms ease, opacity 180ms ease;
}

.submenu>li {
    display: block;
    margin-left: 10px;
}

.submenu a:hover,
.submenu a:focus-visible {
    color: var(--accent);
    background: rgba(0, 0, 0, .05);
}

.submenu a {
    color: var(--muted);
    font-size: 14px;
}

.nav-item.has-submenu.open>.submenu {
    opacity: 1;
    pointer-events: auto;
}

/* FAQ */
.faq details {
    border-radius: 12px;
    margin-bottom: 16px;
    background: var(--surface);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.faq summary {
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f2f2f2;
    padding: 18px 22px;
    position: relative;
    list-style: none;
}

.faq summary::marker {
    display: none;
}

.faq summary::after {
    content: "›";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    color: var(--accent);
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.faq details[open] summary::after {
    transform: translateY(-50%) rotate(270deg);
}

.faq p {
    color: #ccc;
    padding: 0 22px 18px 22px;
    line-height: 1.6;
    font-size: 1rem;
}

.intro {
    color: var(--muted);
    text-align: center;
    margin: 0 auto var(--space-6);
}

.faq a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq a:hover {
    color: #ff9933;
    text-decoration: underline;
}

.faq details[open] p {
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* legal page */
.legal-page h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: lighter;
    text-align: center;
}

.legal-page h2 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: lighter;
    text-align: center;
}

.legal-page a {
    color: var(--muted);
    text-decoration: underline;
}

/* confirmation */
#back-home {
    text-decoration: none;
    color: var(--bg);
    display: flex;
    margin-top: var(--space-4);
    width: fit-content;
    margin: 0 auto;
}

@media (min-width: 1025px) {
    .nav-item.has-submenu>.submenu {
        position: absolute;
        top: 50px;
        left: 0;
        z-index: 1000;
    }
}

@media only screen and (max-width : 1024px) {

    /*Burger menu*/
    .burger {
        display: block;
        position: absolute;
        width: 32px;
        height: 24px;
        right: 35px;
        cursor: pointer;
    }

    .burger span {
        display: block;
        position: absolute;
        top: 12px;
        width: 100%;
        height: 4px;
        background-color: #ffffff;
        transform: translateY(-50%);
        border-radius: 15px;
        transition: background-color 0.5s ease-in-out;
    }

    .burger span::before,
    .burger span::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 4px;
        border-radius: 15px;
        background-color: #ffffff;
        transition: transform 0.5s ease-in-out;
    }

    .burger span::before {
        transform: translateY(-10px);
    }

    .burger span::after {
        transform: translateY(10px);
    }

    .burger.active span {
        background-color: transparent;
    }

    .burger.active span::before {
        transform: translateY(0) rotateZ(45deg);
    }

    .burger.active span::after {
        transform: translateY(0) rotateZ(-45deg);
    }

    .nav-links {
        position: absolute;
        display: flex;
        flex-direction: column;
        padding: 10px;
        width: 100%;
        top: 55px;
        left: -100%;
        background-color: var(--surface);
        transition: left 0.8s ease-in-out;
    }

    .nav-links li {
        text-align: center;
    }

    .responsive-show-menu {
        width: 100%;
        left: 0px;
        transition: left 0.8s ease-in-out;
    }

    .top-cards-list {
        display: flex;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--space-6);
    }

    #grandes-marques #marques-logos img {
        height: 40px;
    }

    .card-guide-dachat {
        flex-direction: column;
        text-align: center;
        margin: 20px 0;
    }

    .card-guide-dachat img {
        width: 100%;
        height: auto;
    }

    .nav-item.has-submenu>.submenu {
        position: static;
        border: 0;
        padding: 0;
        box-shadow: none;
        min-width: 0;
    }

    .submenu>li {
        margin-left: 0;
    }
}

@media (max-width: 720px) {
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    #grandes-marques #marques-logos {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

.nav-item.has-submenu.open>.nav-link,
.nav-item.has-submenu.open>.js-menu-toggle {
    color: var(--accent);
}

/* === Chatbot GamerLab === */
#gl-chatbot {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 9999;
    font-family: inherit;
}

#gl-chatbot-toggle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    color: var(--surface);
    font-weight: 700;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

#gl-chatbot-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(230, 230, 230, 0.4);
}

#gl-chatbot-window {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: min(340px, 90vw);
    max-height: min(480px, 70vh);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #e5e7eb;
    font-size: 0.9rem;
    /* transition pour apparition/disparition fluide */
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition:
        opacity 0.2s ease-out,
        transform 0.2s ease-out;
}

/* état caché via l'attribut hidden : fade + slide vers le bas */
#gl-chatbot-window[hidden] {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition:
        opacity 0.15s ease-in,
        transform 0.15s ease-in;
}

.gl-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid rgba(55, 65, 81, 0.8);
    border-top: solid var(--accent) 4px;
    border-radius: 15px 15px 0 0;
    font-weight: 600;
}

.gl-chatbot-header button {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
}

.gl-chatbot-header button:hover {
    color: #e5e7eb;
}

.gl-chatbot-messages {
    padding: 0.75rem 0.9rem;
    overflow-y: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.gl-chatbot-message {
    max-width: 85%;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    line-height: 1.3;
}

.gl-chatbot-message--bot {
    align-self: flex-start;
    background: #374151;
}

.gl-chatbot-message--user {
    align-self: flex-end;
    background: #7388aa;
    color: #fff;
}

/* Bulle "assistant est en train d'écrire" */
.gl-chatbot-message--typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #374151;
}

.gl-chatbot-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e5e7eb;
    animation: gl-typing-bounce 0.9s infinite;
}

.gl-chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.gl-chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes gl-typing-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

.gl-chatbot-choices {
    padding: 0.5rem 0.9rem 0.7rem;
    border-top: 1px solid rgba(55, 65, 81, 0.8);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.gl-chatbot-choice {
    border: none;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    background: #111827;
    color: #e5e7eb;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid #374151;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gl-chatbot-choice:hover {
    background: var(--gradient);
    color: #000;
}

.gl-chatbot-choice--link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cartes produit dans le chatbot */
.gl-chatbot-product {
    margin-top: 0.4rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gl-chatbot-product img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #000;
}

.gl-chatbot-product-title {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.gl-chatbot-product-cta {
    display: inline-flex;
    /* pour bien centrer le logo */
    align-items: center;
    justify-content: center;
    gap: 4px;
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.gl-chatbot-product-cta img {
    height: 20px;
    width: auto;
    display: block;
}

/* Mobile : rapprocher du bord, limiter hauteur */
@media (max-width: 600px) {
    #gl-chatbot {
        right: 1rem;
        bottom: 1rem;
    }

    #gl-chatbot-window {
        width: min(320px, 94vw);
        max-height: 70vh;
    }
}