
/* Réinitialisation générale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #080b12;
}

body {
    font-family: Arial, sans-serif;
    background-color: #080b12;
    color: #f1f5f9;
    line-height: 1.7;
    min-height: 100vh;
}

/* En-tête */
header {
    background-color: #0b1220;
    border-bottom: 1px solid #1e293b;
    padding: 20px 8%;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    color: white;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
}

.logo span {
    color: #39ff14;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: #39ff14;
}

/* Contenu principal */
main {
    width: 84%;
    max-width: 1200px;
    margin: auto;
}

.introduction {
    max-width: 800px;
    padding: 70px 0 45px;
}

.surtitre {
    color: #39ff14;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
}

h1 {
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.2;
    margin: 15px 0;
}

h1 span {
    color: #00aaff;
}

.introduction > p:last-child,
.description {
    color: #cbd5e1;
    margin-top: 15px;
}

h2 {
    color: #39ff14;
    font-size: 27px;
    margin-bottom: 25px;
}

/* Cartes des projets */
.projets {
    padding: 25px 0 60px;
}

.grille {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.carte {
    background-color: #101827;
    border: 1px solid #263449;
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s, border-color 0.3s;
}

.carte:hover {
    transform: translateY(-5px);
    border-color: #00aaff;
}

.numero {
    color: #39ff14;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
}

.carte h3 {
    color: #00aaff;
    margin-bottom: 12px;
}

.technologies {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 18px;
}

.statut {
    display: inline-block;
    margin-top: 15px;
    padding: 4px 10px;
    border: 1px solid #287a25;
    border-radius: 20px;
    color: #39ff14;
    font-size: 12px;
}

/* Diaporama CSS sans JavaScript */
.galerie {
    padding: 30px 0 60px;
}

.diaporama {
    position: relative;
    height: 420px;
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid #263449;
    border-radius: 12px;
    background-color: #101827;
}

.diapo {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: defilement 15s infinite;
}

.diapo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.diapo figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: white;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.8);
}

.diapo1 {
    animation-delay: 0s;
}

.diapo2 {
    animation-delay: 5s;
}

.diapo3 {
    animation-delay: 10s;
}

@keyframes defilement {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    30% {
        opacity: 1;
    }

    35% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.source {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 12px;
}

.source a,
.ressources a,
footer a {
    color: #00aaff;
}

.source a:hover,
.ressources a:hover,
footer a:hover {
    color: #39ff14;
}

/* Objectifs et ressources */
.objectifs,
.ressources {
    padding: 30px;
    margin-bottom: 35px;
    background-color: #0b1220;
    border-left: 3px solid #39ff14;
    border-radius: 8px;
}

.objectifs ul,
.ressources ul {
    padding-left: 25px;
}

.objectifs li,
.ressources li {
    margin-bottom: 10px;
}

.ressources p {
    color: #cbd5e1;
    margin-bottom: 15px;
}

/* Pied de page */
footer {
    background-color: #0b1220;
    border-top: 1px solid #1e293b;
    padding: 25px;
    text-align: center;
    color: #94a3b8;
}

footer a {
    display: inline-block;
    margin-top: 8px;
    text-decoration: none;
}

/* Adaptation aux écrans plus petits */
@media screen and (max-width: 850px) {
    header {
        flex-direction: column;
    }

    nav {
        justify-content: center;
    }

    .grille {
        grid-template-columns: repeat(2, 1fr);
    }

    .diaporama {
        height: 320px;
    }
}

@media screen and (max-width: 550px) {
    main {
        width: 90%;
    }

    .grille {
        grid-template-columns: 1fr;
    }

    .introduction {
        padding-top: 45px;
    }

    .diaporama {
        height: 240px;
    }

    .objectifs,
    .ressources {
        padding: 20px;
    }
}

/* Respecte le réglage système de réduction des animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
