/* =========================
   Template
========================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(to left, #2e6592, #40585e);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
}


/* TITRE */

#titreaccueil {
    text-align: center;
    margin-top: clamp(20px, 15vh, 5px);
    margin-bottom: clamp(24px, 4vw, 60px);
    color: white;
    font-size: clamp(18px, 2.5vw, 28px);
    letter-spacing: 2px;
}

/* MENU */

.menu-barre {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    display: flex;
    flex-wrap: wrap;            /* passe à la ligne sur petit écran */
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 1.5vw, 15px);
    width: 90%;
    margin: 0 auto clamp(32px, 6vw, 80px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.menu-barre a {
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: clamp(8px, 1.2vw, 12px) clamp(8px, 1.2vw, 15px);
    border-radius: 8px;
    flex: 1;
    min-width: 100px;           /* évite que les liens deviennent trop étroits */
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
    font-size: clamp(13px, 1.2vw, 16px);
}

/* Soulignement menu */

.menu-barre a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    bottom: 5px;
    left: 50%;
    background: white;
    transition: 0.3s ease;
    transform: translateX(-50%);
}

.menu-barre a:hover::after {
    width: 60%;
}

/* Effet élévation */

.menu-barre a:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* FOOTER */

footer {
    margin-top: auto;
    padding: clamp(14px, 2vw, 25px);
    font-size: clamp(11px, 1vw, 13px);
    text-align: center;
    color: rgba(255,255,255,0.7);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* =========================
   Template modop
========================= */

#textemodop {
    color: white;
    margin: clamp(40px, 8vw, 100px) auto clamp(80px, 15vw, 200px);
    border-radius: 20px;
    padding: clamp(20px, 3vw, 30px);
    width: min(700px, 95%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    line-height: 1.7;
    font-size: clamp(13px, 1.5vw, 16px);
}

pre {
    background: rgba(0, 0, 0, 0.3);
    padding: clamp(8px, 1.5vw, 10px);
    border-radius: 8px;
    overflow-x: auto;
    font-size: clamp(12px, 1.3vw, 14px);
}

code {
    font-family: monospace;
}

/* BOUTON RETOUR */

#mainboutton {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: clamp(20px, 5vw, 70px) clamp(15px, 5vw, 70px);
    font-family: 'Segoe UI', sans-serif;
}

.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: clamp(10px, 1.5vw, 12px) clamp(16px, 2.5vw, 24px);
    font-size: clamp(13px, 1.4vw, 16px);
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #4a90e2, #0077ff);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-retour .arrow {
    transition: transform 0.3s ease;
}

.btn-retour:hover {
    background: linear-gradient(135deg, #357ABD, #005fcc);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-retour:hover .arrow {
    transform: translateX(-5px);
}

.btn-retour:active {
    transform: scale(0.95);
}

/* =========================
   RESPONSIVE — Tablette (≤1024px)
========================= */

@media (max-width: 1024px) {
    #textemodop {
        width: min(700px, 92%);
    }
}

/* =========================
   RESPONSIVE — Mobile large (≤768px)
========================= */

@media (max-width: 768px) {
    #logo {
        position: relative;
        margin: 15px auto 0;
        display: block;
        text-align: center;
    }

    .menu-barre {
        gap: 6px;
        width: 95%;
    }

    .menu-barre a {
        width: 100%;
        min-width: unset;
    }

    #textemodop {
        width: 95%;
        margin-top: 40px;
        margin-bottom: 60px;
    }

    #mainboutton {
        justify-content: center;
        padding: 20px 15px;
    }
}

/* =========================
   RESPONSIVE — Petit mobile (≤500px)
========================= */

@media (max-width: 500px) {
    .menu-barre {
        gap: 5px;
    }

    #textemodop {
        width: 100%;
        padding: 15px;
        font-size: 13px;
        border-radius: 12px;
    }

    pre {
        font-size: 12px;
        padding: 8px;
    }

    .btn-retour {
        font-size: 13px;
        padding: 10px 18px;
    }
}
