@keyframes slideIn {
    0% {
        transform: translateY(-3rem);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

::-webkit-scrollbar {
    width: 0.75rem;
    background: #223052;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(120deg, #3e4d6e 40%, #071530 100%);
    border-radius: 0.5rem;
    border: 2px solid #fff;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(120deg, #ff3131 40%, #3e4d6e 100%);
}

::-webkit-scrollbar-track {
    background: #b3c6e0;
    border-radius: 0.5rem;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Courier New', Courier, monospace;
    background-image: url("portfolio/Images/photoAccueil.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.background-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(7, 21, 48, 0.6);
    z-index: 0;
}

.menu-container {
    background-color: rgba(7, 21, 48, 0.9);
    padding: 3rem 2rem;
    border-radius: 1.25rem;
    box-shadow: 0 0 1.25rem rgba(255, 255, 255, 0.2);
    text-align: center;
    max-width: 50rem;
    width: 90%;
    animation: slideIn 1s ease-out;
    color: white;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-height: 90vh;
    overflow: auto;
}

.profile-wrapper {
    margin-bottom: 0;
}

.profile-img {
    width: 9rem;
    height: 9rem;
    object-fit: cover;
    border-radius: 50%;
    border: 0.25rem solid white;
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.menu-container h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    -webkit-text-stroke: 1px #3e4d6e;
}

.menu-container h2 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    font-weight: normal;
    color: #d0d6e0;
}
.subdomain-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 40rem;
}

.subdomain-links a {
    background-color: white;
    color: #071530;
    padding: 1rem 2rem;
    border-radius: 50vw;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.4s ease;
    min-width: 9rem;
    text-align: center;
    flex-grow: 1;
    flex-basis: calc(33.33% - 1rem);
    box-sizing: border-box;
}

.subdomain-links a:hover {
    background-color: #3e4d6e;
    color: white;
    transform: rotate(2deg) scale(0.95);
    box-shadow: 0 0 0.625rem white;
}

@media (max-width: 1024px) {
    .subdomain-links a {
        flex-basis: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .menu-container {
        padding: 1.25rem 1rem;
    }

    .menu-container h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .menu-container h2 {
        font-size: clamp(0.9rem, 4vw, 1rem);
    }

    .profile-img {
        width: 7.5rem;
        height: 7.5rem;
    }

    .subdomain-links a {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
        min-width: unset;
        flex-basis: calc(50% - 1rem);
    }

    .menu-container p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    html,
    body {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .subdomain-links {
        flex-direction: column;
        max-width: 100%;
        gap: 0.75rem;
    }

    .subdomain-links a {
        width: 100%;
        min-width: unset;
        flex-basis: auto;
    }

    .menu-container {
        padding: 1.5rem 1rem;
    }
}