/* --- RESET & VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

:root {
    --bg-main: #09090b; /* Noir très profond */
    --bg-card: #121217; /* Gris très sombre */
    --border-color: rgba(255, 255, 255, 0.05);
    --primary-violet: #8b5cf6; /* Violet d'accentuation */
    --text-white: #f4f4f5;
    --text-gray: #a1a1aa;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    line-height: 1.6;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo-img {
    height: 40px; /* Adapte cette valeur selon la taille de ton image */
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
}

.btn-login {
    background-color: #5865F2; /* Couleur Discord */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-login:hover {
    background-color: #4752C4;
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 120px 20px;
    /* J'ai supprimé le radial-gradient qui faisait des pixels ici */
    background-color: transparent; 
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-style: italic;
}

.hero .highlight {
    /* Couleur unie, plus de dégradé ni d'ombre lourde */
    color: var(--primary-violet);
}

.hero p {
    color: var(--text-gray);
    max-width: 650px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid var(--primary-violet);
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-violet);
    color: white;
}

/* --- CONTAINERS & GRIDS --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 25px;
    background-color: var(--primary-violet);
    border-radius: 2px;
}

/* --- CATEGORY CARDS --- */
.grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.card-category {
    background-color: var(--bg-card);
    padding: 40px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-category:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--text-white); /* Passage en blanc pour être plus neutre */
    margin-bottom: 25px;
}

.card-category h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.card-category p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.card-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s;
}

.card-category:hover .card-link {
    color: var(--primary-violet);
}

/* --- PRODUCT CARDS --- */
.grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card-product {
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-product:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.3);
}

.product-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #1a1a24; /* Fond neutre pour remplacer le placeholder fluo */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-product:hover .product-image img {
    transform: scale(1.05);
}

.badge, .badge-promo {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge { background-color: var(--primary-violet); color: white; }
.badge-promo { background-color: #ef4444; color: white; }

.product-info {
    padding: 25px;
}

.product-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.product-info .author {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-white);
}

.btn-buy {
    background-color: transparent;
    border: 1px solid var(--primary-violet);
    color: var(--primary-violet);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
}

.btn-buy:hover {
    background-color: var(--primary-violet);
    color: white;
}

/* --- FOOTER --- */
footer {
    padding: 60px 20px;
    margin-top: 50px;
    background-color: #050505;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 15px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    display: block;
}

.footer-logo:hover {
    opacity: 1;
}

footer p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}


/* =========================================
   PAGE DE DOCUMENTATION VOID
========================================= */

.doc-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- SIDEBAR --- */
.doc-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 100px; /* Reste visible au scroll (sous la navbar) */
}

.doc-search {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.doc-search i {
    color: var(--text-gray);
    margin-right: 10px;
}

.doc-search input {
    background: transparent;
    border: none;
    color: var(--text-white);
    width: 100%;
    outline: none;
}

.category-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 10px 0;
    color: var(--text-white);
    transition: color 0.2s;
    user-select: none;
}

.category-header:hover {
    color: var(--primary-violet);
}

.category-header i:first-child {
    width: 25px;
    color: var(--primary-violet);
}

.category-header .arrow {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-gray);
}

.category-links {
    list-style: none;
    margin: 5px 0 15px 25px;
    border-left: 1px solid var(--border-color);
}

.category-links li {
    padding: 8px 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.category-links li:hover {
    color: var(--text-white);
    background: rgba(255,255,255,0.02);
}

/* Indicateur du lien actif */
.category-links li.active {
    color: var(--primary-violet);
    font-weight: 600;
}
.category-links li.active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--primary-violet);
}

/* --- CONTENU --- */
.doc-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.doc-section.active {
    display: block;
}

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

.doc-section h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.doc-section p {
    color: var(--text-gray);
    font-size: 1.05rem;
    margin-bottom: 30px;
}

.doc-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 30px 0 15px 0;
    color: var(--text-white);
}

.doc-list {
    margin-left: 20px;
    color: var(--text-gray);
}

.doc-list li {
    margin-bottom: 10px;
}

.doc-list strong {
    color: var(--text-white);
}

/* --- BLOCS DE CODE (Le conteneur demandé) --- */
.code-container {
    background-color: #0d0d12;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    margin-bottom: 20px;
}

.code-container pre {
    margin: 0;
    overflow-x: auto;
}

.code-container code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.5;
}

/* Bouton Copier dans le bloc de code */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
}

/* Responsive pour téléphone */
@media (max-width: 900px) {
    .doc-wrapper {
        grid-template-columns: 1fr;
    }
    .doc-sidebar {
        position: relative;
        top: 0;
    }
}

/* --- FORMULAIRES (Upload, Profil, etc) --- */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    background-color: #1a1a24;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-violet);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.custom-file-upload {
    display: inline-block;
    padding: 15px 30px;
    cursor: pointer;
    background-color: #1a1a24;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-gray);
    text-align: center;
    width: 100%;
    transition: all 0.3s;
}

.custom-file-upload:hover {
    border-color: var(--primary-violet);
    color: var(--primary-violet);
}

.custom-file-upload input[type="file"] {
    display: none;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover {
    background-color: var(--primary-violet);
    border-color: var(--primary-violet);
}

.page-info {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.95rem;
}

/* --- PROFIL COMPLET (Bannière & Avatar) --- */
.profile-header {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 60px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

.profile-banner {
    width: 100%;
    height: 250px;
    background-color: #1a1a24;
    background-image: url('https://placehold.co/1200x250/1a1a24/1a1a24'); /* Bannière par défaut */
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-avatar-container {
    position: absolute;
    bottom: -50px;
    left: 40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    background-color: #000;
    z-index: 10;
}

.profile-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* --- OVERLAY MODIFICATION PHOTO (Appareil photo) --- */
.edit-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.profile-banner:hover .edit-overlay, 
.profile-avatar-container:hover .edit-overlay {
    opacity: 1;
}

.profile-avatar-container .edit-overlay {
    border-radius: 50%;
}

/* --- PAGE MOD DÉTAILLÉE --- */
.mod-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.mod-stats {
    display: flex;
    gap: 20px;
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.mod-stats i { color: var(--primary-violet); margin-right: 5px; }

.btn-action {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.btn-action.like:hover { border-color: #ef4444; color: #ef4444; }
.btn-action.report:hover { border-color: #f59e0b; color: #f59e0b; }
.btn-action.valoriser { border-color: #eab308; color: #eab308; }
.btn-action.valoriser:hover { background: rgba(234, 179, 8, 0.1); }

/* Commentaires */
.comment-box {
    background-color: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- PROFIL COMPLET (Bannière Full-Width & Avatar) --- */
.full-banner-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px; /* Hauteur de la bannière */
    z-index: -1;
}

.banner-image {
    width: 100%;
    height: 100%;
    background-color: #1a1a24;
    background-image: url('https://placehold.co/1920x400/1a1a24/1a1a24'); /* Bannière par défaut */
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Le fondu vers le bas */
.banner-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Taille du fondu */
    background: linear-gradient(to bottom, transparent, var(--bg-main));
}

.profile-avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid var(--bg-main); /* Contour de la couleur du fond du site */
    background-color: #000;
    margin-top: 150px; /* Pour descendre l'avatar sur la bannière */
    margin-bottom: 30px;
    z-index: 10;
}

.profile-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* --- OVERLAY MODIFICATION PHOTO (Appareil photo) --- */
.edit-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.banner-image:hover .edit-overlay, 
.profile-avatar-container:hover .edit-overlay {
    opacity: 1;
}

.profile-avatar-container .edit-overlay {
    border-radius: 50%;
}

/* Notification de succès */
.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #4ade80;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Remplace cette classe dans ton CSS (j'ai changé le z-index à 1 pour qu'elle soit cliquable) */
.full-banner-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    z-index: 1; 
}

/* Ajoute ceci TOUT EN BAS de ton style.css pour afficher le nom du fichier uploadé */
.file-name {
    display: block;
    margin-top: 10px;
    color: var(--primary-violet);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- PRODUCT CARDS --- */
.product-image {
    position: relative;
    aspect-ratio: 16/9; /* Force le format rectangulaire type YouTube */
    width: 100%; /* Prend toute la largeur de la carte */
    height: 180px; /* Fixe une hauteur maximale stricte */
    overflow: hidden;
    background-color: #1a1a24;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Coupe l'image sans l'écraser pour remplir la case */
    transition: transform 0.4s ease;
}

/* --- PRODUCT CARDS --- */
.grid-products {
    display: grid;
    /* C'est "auto-fill" qui empêche le mod de prendre 3 places de large ! */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px;
}