/* --- Global & Variables --- */
:root {
    --accent: #58a6ff;
    --accent-purple: #a371f7;
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --border: #30363d;
    --success: #238636;
    --text-main: #c9d1d9;
    --glass: rgba(22, 27, 34, 0.85);
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.8;
}

/* --- Header & Hero Section --- */
header {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: black;
    padding: 70px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

haut {
    display: block;
    text-align: center;
    animation: fadeIn 1.2s ease-out;
}

haut h1 {
    font-size: 4.5rem;
    margin: 0;
    letter-spacing: -2px;
    text-transform: uppercase;
    font-weight: 900;
    background-image: linear-gradient(to right, var(--accent), var(--accent-purple));
    -webkit-background-clip: text;
    /* Ajout du préfixe webkit pour compatibilité */
    background-clip: text;
    color: transparent;
}

haut p {
    color: var(--text-main);
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: 10px;
    opacity: 0.9;
}

/* --- Main Container --- */
main {
    max-width: 1100px;
    margin: 100px auto 60px;
    padding: 50px;
    background: var(--glass);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 10;
}

main h2 {
    color: var(--accent);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}

main h2::before {
    content: "";
    width: 30px;
    height: 4px;
    background: var(--accent-purple);
    border-radius: 10px;
    display: inline-block;
}

/* --- Tableaux --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 30px;
    text-align: center;
}

th {
    color: white;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 20px;
}

td {
    background: rgba(48, 54, 61, 0.2);
    padding: 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

td:first-child {
    border-left: 1px solid var(--border);
    border-radius: 12px 0 0 12px;
}

td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 12px 12px 0;
}

tr:hover td {
    background: rgba(88, 166, 255, 0.08);
    border-color: var(--accent);
}

thead tr {
    background-color: var(--accent);
}

.version,
.version a {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    color: var(--accent-purple) !important;
    font-weight: 700;
}

.téléchargement a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

/* --- Download Section --- */
.download-section {
    padding: 40px;
    background: radial-gradient(circle at top right, rgba(163, 113, 247, 0.1), transparent);
    border-radius: 20px;
    border: 1px solid var(--border);
    margin: 50px 0;
    text-align: center;
}

.download-btn {
    background: linear-gradient(135deg, var(--success), #2ea043);
    color: white !important;
    padding: 20px 45px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(35, 134, 54, 0.3);
    border: none;
    text-decoration: none;
    display: inline-block;
    /* Crucial pour le padding sur mobile */
}

.download-btn:hover {
    transform: scale(1.05) translateY(-5px);
    background: linear-gradient(135deg, var(--accent-purple), #8957e5);
}

/* --- Code Block --- */
pre {
    background: #010409 !important;
    padding: 30px !important;
    border-radius: 16px !important;
    border: 1px solid var(--accent-purple) !important;
    font-family: 'JetBrains Mono', monospace !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    /* Empêche le texte de sortir du cadre */
    white-space: pre-wrap;
    /* Permet au texte de passer à la ligne si trop long */
    word-break: break-all;
}

pre::before {
    content: "● ● ●";
    display: block;
    margin-bottom: 15px;
    color: #ff5f56;
    letter-spacing: 5px;
    font-size: 12px;
    opacity: 0.6;
}

/* --- Slider --- */
.screenshots {
    margin-top: 50px;
}




.slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid #30363d;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    background-color: black;
}




.slider {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}




.slider img {
    min-width: 100%;
    height: auto;
    object-fit: contain;
}




.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(22, 27, 34, 0.8);
    border: none;
    color: #de98ff;
    font-size: 2rem;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.3s;
    z-index: 10;
}




.slide-btn:hover {
    background-color: #58a6ff;
    color: #fff;
}




.slide-btn.left {
    left: 10px;
}




.slide-btn.right {
    right: 10px;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- RESPONSIVE CORRIGÉ --- */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 100px 15px;
    }

    haut h1 {
        font-size: 2.2rem;
    }

    haut p {
        font-size: 1rem;
    }

    main {
        padding: 20px;
        margin-top: -30px;
        width: 90%;
        /* Évite de toucher les bords de l'écran */
    }

    /* Correction Tableau : On cache le head et on transforme les lignes en blocs */
    thead {
        display: none;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: hidden;
        /* Sécurité anti-débordement */
    }

    td {
        display: block;
        width: 100%;
        border: none !important;
        border-bottom: 1px solid var(--border) !important;
        box-sizing: border-box;
        text-align: left;
        padding: 12px 15px;

        /* RÉDUCTION DE LA TAILLE DU TEXTE */
        font-size: 0.85rem;
        word-break: break-word;
        /* Force le texte trop long à la ligne */
    }

    /* On réduit spécifiquement la police pour les liens et versions */
    td .version,
    td a {
        font-size: 0.8rem;
    }

    td:first-child {
        border-radius: 12px 12px 0 0;
        background: var(--accent);
        color: white;
        font-weight: bold;
        font-size: 0.9rem;
        /* Un peu plus grand pour le titre de la ligne */
    }

    /* Correction Bouton : Ajustement taille pour mobile */
    .download-btn {
        padding: 15px 25px;
        font-size: 1rem;
        width: 100%;
        /* Le bouton prend toute la largeur sur petit écran */
        box-sizing: border-box;
    }

    /* Correction Bash : Scroll et wrap */
    pre {
        padding: 15px !important;
        font-size: 0.8rem !important;
    }
}