/* ==========================
   BASE & RESET
========================== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family:'Inter', sans-serif;
    background:#0d0d0d;
    color:#f0f0f0;
    line-height:1.6;
    scroll-behavior:smooth;
}
a { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }

/* ==========================
   NAVIGATION
========================== */
nav {
    position: fixed;
    top:0; left:0;
    width:100%;
    background:#121212;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 30px;
    z-index:1000;
    box-shadow:0 2px 10px rgba(0,0,0,0.5);
    overflow:visible; /* ✅ nécessaire pour voir le dropdown */
}

nav .logo {
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    font-size:1.5rem;
}
nav .logo-img { width:40px; height:40px; }
nav .logo-text { color:#FFD966; }

nav ul {
    display:flex;
    gap:25px;
    list-style:none;
}
nav ul li {
    cursor:pointer;
    transition:0.3s;
    position:relative;
}
nav ul li.active,
nav ul li:hover {
    color:#FFD966;
}

/* ==========================
   LANGUE DROPDOWN (modifié)
========================== */
.lang-dropdown {
    position: relative;
    font-size: 0.9rem;
    z-index: 3000;
}

.lang-btn {
    background: none;
    border: 1px solid #555;
    color: #ccc;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.lang-btn:hover {
    border-color: #FFD966;
    color: #FFD966;
}

.lang-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #1b1b1b;
    border: 1px solid #555;
    border-radius: 8px;
    list-style: none;
    min-width: 60px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: none;
    z-index: 9999;
}

.lang-menu li {
    padding: 6px 10px;  /* réduit pour éviter trop d'espace */
    cursor: pointer;
    transition: 0.2s;
    color: #fff;
    text-align: left;    /* aligné à gauche pour supprimer l'espace avant */
    background: transparent;
}

.lang-menu li:hover {
    background: rgba(255, 217, 102, 0.15);
}

.lang-menu li.active {
    color: #FFD966;
    font-weight: 600;
}

.lang-dropdown.active .lang-menu {
    display: block;
}

/* ==========================
   HEADER
========================== */
header {
    position:relative;
    height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    overflow:hidden;
}
header::before {
    content:"";
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    background: linear-gradient(135deg, rgba(255,217,102,0.15), rgba(255,204,0,0.08));
    z-index:0;
}
header::after {
    content:"";
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    background: url('../img/header-bg.png') center/cover no-repeat;
    opacity: 0.5;
    z-index:0;
}
header h1 {
    font-size:4rem;
    font-weight:700;
    z-index:1;
    margin-bottom:20px;
    background: linear-gradient(90deg,#FFD966,#FFC700);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    text-shadow:0 0 10px rgba(255,217,102,0.5);
}
header p {
    font-size:1.5rem;
    color:#d0d0d0;
    z-index:1;
    margin-bottom:30px;
    max-width:700px;
}
header .btn-primary {
    display:flex;
    align-items:center;
    gap:8px;
    background: linear-gradient(90deg,#7289DA,#99AADD);
    color:#fff;
    font-weight:700;
    border-radius:12px;
    padding:12px 35px;
    transition:0.3s;
    z-index:1;
}
header .btn-primary:hover {
    transform:translateY(-3px);
    box-shadow:0 10px 25px rgba(114,137,218,0.5);
}
header .btn-primary .discord-logo {
    width:22px; height:22px;
}

/* ==========================
   SECTIONS
========================== */
section {
    padding:100px 20px;
    max-width:1200px;
    margin:auto;
}
section h2 {
    font-size:2.5rem;
    text-align:center;
    margin-bottom:50px;
    background: linear-gradient(90deg,#FFD966,#FFC700);
    background-clip:text;
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    text-shadow:0 0 5px rgba(255,217,102,0.3);
}

/* FEATURES */
.features {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:30px;
}

/* COMMANDS (modifié : flex vertical pour stabilité - pas de mouvement de /install) */
.commands {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center; /* Centre les cartes */
    max-width: 950px;
    margin: 0 auto;
}

.feature-card, .command-card {
    background:#1b1b1b;
    padding:35px;
    border-radius:20px;
    transition:0.5s;
    cursor:pointer;
    box-shadow:0 5px 20px rgba(0,0,0,0.5);
    min-height: 120px; /* Ajout : hauteur minimale pour uniformité et stabilité */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribue le contenu */
}

.feature-card:hover, .command-card:hover {
    transform:translateY(-15px);
    box-shadow:0 25px 50px rgba(255,217,102,0.3);
}
.feature-card h3, .command-card h3 {
    color:#FFD966;
    font-size:1.6rem;
    margin-bottom:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.feature-card p, .command-card p {
    color:#ccc;
    font-size:1rem;
}
.command-card ul { margin-top:10px; padding-left:20px; }
.command-card.has-subactions .subactions {
    max-height:0;
    overflow:hidden;
    transition:max-height 0.4s ease;
}
.command-card.has-subactions.open .subactions {
    max-height:500px;
}
.command-card.has-subactions h3 i {
    transition: transform 0.3s;
}
.command-card.has-subactions.open h3 i {
    transform:rotate(180deg);
}

/* Media query pour côte à côte sur desktop (optionnel, stable avec align-items: flex-start) */
@media (min-width: 768px) {
    .commands {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start; /* ✅ Évite l'étirement vertical lors de l'expansion */
    }
    
    .command-card {
        flex: 1;
        max-width: 500px;
    }
}

/* ==========================
   DOCS
========================== */
.docs {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:25px;
}
.docs a {
    padding:15px 40px;
    background: linear-gradient(90deg,#FFD966,#FFC700);
    border-radius:14px;
    font-weight:700;
    color:#121212;
    transition:0.3s;
}
.docs a:hover {
    transform:translateY(-5px);
    box-shadow:0 15px 30px rgba(255,217,102,0.3);
}

/* ==========================
   FOOTER
========================== */
footer {
    background:#121212;
    padding:50px 20px;
    text-align:center;
    color:#888;
}
footer a {
    margin:0 15px;
    font-size:1.4rem;
    transition:0.3s;
}
footer a:hover {
    color:#FFD966;
}

/* ==========================
   ANIMATIONS
========================== */
.fade-up {
    opacity:0;
    transform:translateY(30px);
    transition:1s ease-out;
}
.visible {
    opacity:1;
    transform:translateY(0);
}

/* ==========================
   RESPONSIVE
========================== */
@media(max-width:768px){
    header h1 { font-size:3rem; }
    header p { font-size:1.2rem; }
    nav ul { display:none; }
}
