html {
    scroll-behavior: smooth;
}

#home {
    transition: all 300ms ease-in-out;
    transform-origin: center;

}

nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: all 0.3s ease;

}

.light-mode nav {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #2e3338;
}

.light-mode nav a {
    color: #2e3338;
}

a {
    text-decoration: none;
    color: white;
    padding: 0.5rem;
}

body {
    margin: 0;
    background-color: #36393f;
    color: #e0e0e0;
    font-family: Inter, sans-serif;
    transition: background-color 0.4s ease, color 0.4s ease;
    padding-top: 100px;


}

section, .card, .about-skills, input, textarea, button, nav, a {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
h2 {
    font-size: 200%;
}

section {
    border-bottom: 1px solid #444;
    max-width: 1000px;
    margin: auto;


}

#hero {
    gap: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero h1 {
    font-size: 500%;
    margin: 0;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;

}

#hero h2 {
    font-size: 500%;
    margin: 0;

}



@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nom {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
input, textarea {
    width: 100%;
    background-color: #2f3136;
    border-radius: 0.5rem;
    border: 2px solid #4f545c;
    padding: 0.8rem;
    color: #e0e0e0;
    font-family: inherit;
    box-sizing: border-box;
}

button {
    background-color: #4f545c;
    border: none;
    color: white;
    font-weight: bold;
    font-family: Inter, sans-serif;
    min-height: 50px;
    cursor: pointer;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

#contact a {
    display: inline-flex;
    margin-top: 1.5rem;
    background-color: #4f545c;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 0.5rem;
    font-weight: bold;
    border: 1px solid #72767d;
    margin-bottom: 5rem;

}


#contact a:hover {
    background-color: #5d6269;
}

#contact {
    text-align: center;
}

.card-content {
    display: flex;
    flex-direction: row;
    gap: 12px;
}


.project-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.card {
    background-color: #2f3136;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #444;
    flex: 0 1 calc(50% - 0.75rem);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-align: left;
    display: flex;
}

.card img {
    object-fit: cover;
    border-radius: 8px;
}

.card .calculette, .calendrier, .date, .minuteur{
    height: contain;
    width: 150px;
}

.card:hover {
    transform: translateY(-8px);
    border-color: #5865f2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card h3 {
    margin-top: 0;
    color: #fff;
}

.card p {
    font-size: 0.9rem;
    color: #b9bbbe;
}


.card a {
    display: inline-block;
    margin-top: 1rem;
    color: #00aff4;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.card a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.about-text {
    flex: 2;
    min-width: 300px;
    line-height: 1.6;
}

.about-skills {
    flex: 1;
    background-color: #2f3136;
    padding: 1.5rem;
    border-radius: 10px;
    min-width: 250px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}


.skills-list span {
    background-color: #5865f2;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
    cursor: default;
}

.skills-list span:hover {
    background-color: #4752c4;
    transform: scale(1.1);
}
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #444;
    color: #72767d;
    font-size: 0.85rem;
}

footer p {
    margin: 0.5rem 0;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #2f3136;
    color: white;
    text-align: center;
    line-height: 40px;
    text-decoration: none;
    border-radius: 50%;
    font-size: 20px;
    transition: 0.4s;
    z-index: 1000;
    border: 1px solid #444;


    opacity: 0;
    visibility: hidden;
}


.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #5865f2;
    transform: translateY(-5px);
}

@media (max-width: 600px) {
    .card {
        flex: 1 1 100%;
    }
}


body.light-mode {
    background-color: #ffffff;
    color: #2e3338;
}

.light-mode section {
    border-bottom: 1px solid #e3e5e8;
}


.light-mode .card,
.light-mode .about-skills {
    background-color: #f2f3f5;
    border: 1px solid #dbdee1;
}

.light-mode .card h3 {
    color: #060607;
}

.light-mode .card p {
    color: #4e5058;
}


.light-mode input,
.light-mode textarea {
    background-color: #ebedef;
    border: 2px solid #dbdee1;
    color: #2e3338;
}

.light-mode button,
.light-mode #contact a {
    background-color: #5865f2;
    color: white;
    border: none;
}

.light-mode button:hover,
.light-mode #contact a:hover {
    background-color: #4752c4;
}


.light-mode footer {
    border-top: 1px solid #e3e5e8;
    color: #5c6370;
}

.light-mode .back-to-top {
    background-color: #ffffff;
    color: #2e3338;
    border: 1px solid #dbdee1;
}

#theme-toggle {
    cursor: pointer;
    border: 1px solid #4f545c;
    background: #2f3136;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: auto;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: #5865f2;
    transform: scale(1.05);
}

.light-mode #theme-toggle {
    background: #ebedef;
    color: #2e3338;
    border-color: #dbdee1;
}


nav.scrolled {
    width: 100%;
    top: 0;
    border-radius: 0;
}

section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

#portfolioetgithub {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: -1rem;

}
