/* public/assets/css/index.css */

/* --- FONTS & BASES --- */
@font-face {
    font-family: "Nohemi";
    src: url("/assets/fonts/Nohemi-VF.ttf") format("truetype-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    font-family: "Nohemi", Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    background-color: #050505; /* Fond très sombre pour correspondre au thème */
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
}

/* Fond texturé */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        linear-gradient(
            45deg,
            rgba(200, 200, 200, 0.02) 25%,
            transparent 25%,
            transparent 75%,
            rgba(200, 200, 200, 0.02) 75%
        ),
        linear-gradient(
            45deg,
            rgba(200, 200, 200, 0.01) 25%,
            transparent 25%,
            transparent 75%,
            rgba(200, 200, 200, 0.01) 75%
        );
    background-size: 4px 4px;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

main {
    width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}
a {
    text-decoration: none;
    color: #bb86fc;
    transition: color 0.3s ease;
}
a:hover {
    color: #ffffff;
}

/* --- UTILITAIRES --- */
.conteneur-limite {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BOUTONS GLOBAUX --- */
.btn-principal {
    font-family: "Nohemi", Arial, sans-serif;
    display: inline-block;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    cursor: pointer;
    background-color: #ffffff;
    color: #1e1e1e;
    border: 1px solid #ffffff;
    transition: all 0.4s ease;
}

.btn-principal:hover {
    background-image: linear-gradient(to right, #bb86fc, #8e44ad);
    background-color: transparent;
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-secondaire {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid #bb86fc;
    color: #bb86fc;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-secondaire:hover {
    background-color: #bb86fc;
    color: #000;
    box-shadow: 0 0 15px rgba(187, 134, 252, 0.4);
}

/* --- SECTION HEROS --- */
.section-heros {
    background-color: #000000;
    background-image: radial-gradient(
        ellipse at 50% 25%,
        #404040 0%,
        #181818 35%,
        #000000 75%
    );
    color: #ffffff;
    min-height: 93vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 0 20px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.heros-contenu-haut {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex-grow: 1;
    gap: 60px;
}

.heros-colonne-gauche {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.heros-colonne-droite {
    flex: 1 1 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.heros-texte {
    text-align: left;
}

.heros-nom {
    font-size: 4em;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.nom-surligne {
    background-image: linear-gradient(to right, #bb86fc, #8e44ad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.heros-role {
    font-size: 2em;
    font-weight: 300;
    color: #cccccc;
    margin: 0;
}

/* --- TERMINAL ANIMATION --- */
#animation-terminal {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.terminal-entete {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-controles {
    display: flex;
}

.terminal-controles .point {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 7px;
    box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.point.rouge {
    background-color: #ff5f57;
}
.point.jaune {
    background-color: #febb2e;
}
.point.vert {
    background-color: #28c840;
}

#terminal-titre {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85em;
    color: #bbbbbb;
    margin-left: auto;
    padding-right: 5px;
}

#terminal-contenu {
    padding: 15px 20px 20px 20px;
    font-family: "Courier New", Courier, monospace;
    min-height: 250px;
}

.code-ligne {
    display: block;
    margin-bottom: 6px;
    font-size: 1em;
    white-space: pre;
    border-right: 0.15em solid #ccc;
    overflow: hidden;
    animation: curseur-clignotant 0.75s step-end infinite;
}

@keyframes curseur-clignotant {
    from,
    to {
        border-color: transparent;
    }
    50% {
        border-color: #ccc;
    }
}

.texte-final p {
    font-family: "Nohemi", Arial, sans-serif;
    color: #e8e8e8;
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.65;
    margin-bottom: 25px;
    white-space: normal;
}

/* --- SECTION A PROPOS --- */
.section-a-propos {
    padding: 80px 20px;
    background-color: #121212;
    position: relative;
    z-index: 1;
}

.a-propos-contenu {
    display: flex;
    align-items: center;
    gap: 70px;
    max-width: 1000px;
    margin: 0 auto;
}

.a-propos-photo {
    flex-basis: 300px;
    flex-shrink: 0;
}

.a-propos-photo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #333;
}

.a-propos-texte {
    flex: 1;
    text-align: left;
}

.a-propos-texte h2 {
    font-size: 2.8em;
    margin-bottom: 25px;
    color: #ffffff;
}

.a-propos-texte p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #cccccc;
}

/* --- SECTION PROJETS RECENTS (NOUVEAU STYLE GRILLE) --- */
.section-projets-recents {
    background-color: #0f0f0f;
    padding: 80px 0;
    width: 100%;
}

.titre-section {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 50px;
    color: #ffffff;
    font-weight: 600;
}

/* Grille Responsive */
.grille-projets {
    display: grid;
    /* Crée automatiquement des colonnes de min 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Carte Projet */
.carte-projet {
    background-color: #1c1c1c;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: block; /* Important pour le lien */
    aspect-ratio: 16 / 9; /* Format rectangulaire standard */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    text-decoration: none; /* Enlève le soulignement du lien */
}

.carte-projet:hover {
    transform: translateY(-8px);
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(187, 134, 252, 0.2);
}

/* Wrapper Image (Zoom) */
.carte-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carte-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carte-projet:hover .carte-image-wrapper img {
    transform: scale(1.08);
}

/* Contenu Overlay */
.carte-contenu {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    box-sizing: border-box;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.6) 60%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transform: translateY(10px); /* Petit effet de glissement */
    transition: transform 0.3s ease;
}

.carte-projet:hover .carte-contenu {
    transform: translateY(0);
}

/* Badge Type */
.carte-badge {
    background-color: #bb86fc;
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Titre */
.carte-titre {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Message Info (Si vide) */
.message-info {
    text-align: center;
    color: #888;
    grid-column: 1 / -1; /* Prend toute la largeur */
    padding: 20px;
}

/* Bouton Voir Plus */
.voir-plus-container {
    text-align: center;
    margin-top: 20px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 900px) {
    .heros-contenu-haut {
        flex-direction: column;
        gap: 40px;
    }

    .heros-colonne-droite {
        width: 100%;
    }

    .heros-nom {
        font-size: 3em;
        text-align: center;
    }
    .heros-role {
        font-size: 1.5em;
        text-align: center;
    }
    .heros-texte {
        text-align: center;
        width: 100%;
    }

    .a-propos-contenu {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .a-propos-photo {
        max-width: 280px;
        width: 80%;
    }

    .a-propos-texte p {
        text-align: left;
    }

    /* Sur mobile, on force un peu de marge sur les côtés de la grille */
    .grille-projets {
        padding: 0 10px;
    }
}
