@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@400;500;600;700&family=JetBrains+Mono:wght@100;200;300;400&family=Josefin+Slab:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=Mulish:ital,wght@0,200;0,300;0,400;0,500;1,200;1,300;1,400&display=swap');
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css);

* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

body {
    background-color: #b76df0;
    overflow-x: hidden;
}

body.preloading {
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --- CONTENEUR PRINCIPAL & FADE IN --- */
.container {
    animation: opacity 1.5s ease-out;
}

/* --- PRELOADER --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 35%),
        radial-gradient(circle at 80% 30%, rgba(255, 0, 0, 0.2), transparent 30%),
        linear-gradient(135deg, #111111 0%, #2a2a2a 55%, #111111 100%);
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preloader__ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ff3d3d;
    border-right-color: #ffffff;
    box-shadow: 0 0 35px rgba(255, 61, 61, 0.35);
    animation: loaderSpin 1s linear infinite, loaderPulse 1.8s ease-in-out infinite;
}

.preloader__text {
    font-family: var(--font-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    color: #f4f4f4;
    animation: loaderTextBlink 1.4s ease-in-out infinite;
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(255, 61, 61, 0.3);
    }

    50% {
        box-shadow: 0 0 50px rgba(255, 61, 61, 0.65);
    }
}

@keyframes loaderTextBlink {

    0%,
    100% {
        opacity: 0.45;
    }

    50% {
        opacity: 1;
    }
}

/* --- ANIMATIONS --- */
[data-animation] {
    opacity: 0;
    transition: .3s;
}

[data-animation="haut"] {
    opacity: 0;
    transform: translate3d(0px, 250px, 0px)
}

[data-animation="gauche"] {
    opacity: 0;
    transform: translate3d(10px, 0px, 0px)
}

[data-animation="droite"] {
    opacity: 0;
    transform: translate3d(-10px, 0px, 0px)
}

[data-animation].anime {
    opacity: 1;
    transform: translate3d(0px, 0px, 0px)
}

/* --- RÉSEAUX SOCIAUX --- */
.reseaux-sociaux {
    position: absolute;
    bottom: 4rem;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
}

.reseaux-sociaux a {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}

.reseaux-sociaux i {
    background-color: transparent;
    color: black;
    height: 2.5rem;
    width: 2.5rem;
    font-size: 2.7rem;
    transition: color 1s;
    pointer-events: auto;
}

.reseaux-sociaux i:hover {
    color: rgb(187, 3, 3);
}

/* --- TITRES --- */
.entete-section h1,
.entete-projets h1 {
    font-family: var(--font-tertiary);
    text-transform: uppercase;
    padding: 1rem;
    margin: 1rem;
    font-size: 30px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.493);
    text-align: center;
}

/* --- MENU BURGER --- */
.menu-burger {
    background-color: rgba(255, 0, 0, 0);
    width: 2rem;
    height: 2rem;
    position: fixed;
    z-index: 100;
    right: 2rem;
    top: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    cursor: pointer;
}

.ligne {
    width: 100%;
    height: .1rem;
    background-color: white;
    transition: transform 1s;
    box-shadow: 1px 2px 4px 0px rgb(0 0 0 / 72%);
}

/* --- BOUTONS --- */
.bouton-personnalise {
    padding: 1.3em 3em;
    font-family: var(--font-tertiary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 500;
    color: #000;
    background-color: #fff;
    border: none;
    border-radius: 45px;
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease 0s;
    cursor: pointer;
    outline: none;
}

.bouton-personnalise:hover {
    background-color: #f50000;
    box-shadow: 0px 15px 20px rgba(63, 63, 63, 0.4);
    color: #fff;
    transform: translateY(-7px);
}

.bouton-personnalise:active {
    transform: translateY(-1px);
}

/* --- HEADER / BANNIERE --- */
header {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.conteneur-image {
    width: 100%;
    height: 100%;
    background-color: rgba(2, 2, 2, 0.952);
}

.conteneur-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    animation: zoom 25s;
}

.banniere {
    position: absolute;
    top: 30%;
    left: 15%;
}

.banniere h1 {
    color: white;
    font-size: 3.5rem;
    font-family: var(--font-tertiary);
    font-weight: 300;
    text-transform: uppercase;
    text-shadow: .3rem .4rem 2px rgba(0, 0, 0, 0.404);
    line-height: 3.5rem;
    opacity: 0;
    animation: moveBanner 0.5s forwards;
}

.banniere p {
    font-family: var(--font-tertiary);
    font-size: 2rem;
    color: white;
    text-shadow: .3rem .4rem 2px rgba(0, 0, 0, 0.404);
    line-height: 3.5rem;
    margin-bottom: 2rem;
    animation: moveBanner 0.7s forwards;
}

.banniere #bouton-banniere {
    animation: moveBanner 1s forwards;
}

/* --- BARRE LATÉRALE (SIDEBAR) --- */
.barre-laterale {
    width: 20rem;
    height: 100vh;
    background-color: rgb(182, 181, 181);
    position: fixed;
    top: 0;
    right: -20rem;
    transition: all 0.4s;
    z-index: 2;
    backdrop-filter: blur(19px) saturate(124%);
    -webkit-backdrop-filter: blur(19px) saturate(124%);
    background-color: rgba(255, 255, 255, 0.47);
}

.afficher-menu .barre-laterale {
    right: 0;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -57%);
    text-align: center;
    text-transform: uppercase;
}

.menu-burger span {
    position: absolute;
    right: 50px;
    width: 5rem;
    height: 2rem;
    padding: 0.4rem;
    background-color: rgb(221, 220, 220);
    text-align: center;
    font-family: var(--font-primary);
    text-transform: uppercase;
    border-radius: 18px;
    opacity: 0;
}

.menu-burger span::before {
    content: " ";
    position: absolute;
    border-right: .5rem solid transparent;
    border-top: .5rem solid transparent;
    border-left: .5rem solid rgb(221, 220, 220);
    border-bottom: .5rem solid transparent;
    left: 5.7rem;
    bottom: .9rem;
}

@media (min-width: 821px) {
    .afficher-menu .menu-burger:hover span {
        opacity: 1;
        transition-delay: 1s;
    }
}

.afficher-menu #ligne2 {
    transform: translate(-2px, -15px);
    background-color: rgba(255, 255, 255, 0.418)
}

.afficher-menu #ligne1 {
    transform: rotate(45deg) translate(.3rem, .44rem);
}

.afficher-menu #ligne3 {
    transform: rotate(-45deg) translate(.3rem, -.44rem);
}

.lien-menu {
    font-family: var(--font-tertiary);
    font-size: 2rem;
    color: rgba(13, 14, 13, 0.801);
    transition: color 1s;
}

.lien-menu:hover {
    color: rgb(255, 254, 254);
}

.element-menu {
    margin: 1.5em;
}

/* Animations menu */
.afficher-menu .element-menu:nth-child(1) {
    animation: moveMenu .4s;
}

.afficher-menu .element-menu:nth-child(2) {
    animation: moveMenu .6s;
}

.afficher-menu .element-menu:nth-child(3) {
    animation: moveMenu .8s;
}

/* --- PROJETS --- */
.section-projets {
    width: 100%;
    margin-bottom: 0;
    box-shadow: 1px 12px 71px -13px rgba(0, 0, 0, 0.55);
}

.entete-projets {
    display: flex;
    justify-content: center;
    background-color: #fafafa;
    color: rgb(37, 37, 37);
}

.cartes-projets {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    padding-bottom: 0;
    padding-top: 3rem;
    background-color: #ededf2;
    background-image: linear-gradient(180deg, #fafafa 0%, #dadbdb 100%);
}

.carte {
    width: 20rem;
    height: 30rem;
    margin: 1rem;
    border: 1px transparent;
    border-radius: 30px;
    box-shadow: 3px 0px 50px -3px rgba(0, 0, 0, 0.41);
}

.wrapper-img-carte {
    width: 100%;
    height: 100%;
    border: inherit;
    border-radius: inherit;
}

.wrapper-img-carte img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border: inherit;
    border-radius: inherit;
}

.carte-overlay {
    width: 20rem;
    height: 30rem;
    position: relative;
    bottom: 30rem;
    border: inherit;
    border-radius: inherit;
    opacity: 0;
}

.info-carte {
    display: flex;
    height: 15rem;
    width: 15rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    border-radius: inherit;
    backdrop-filter: blur(19px) saturate(124%);
    -webkit-backdrop-filter: blur(19px) saturate(124%);
    background-color: rgba(255, 255, 255, 0.47);
    padding: 1rem;
    box-shadow: 3px 0px 37px 6px rgba(0, 0, 0, 0.55);
    position: absolute;
    bottom: 6rem;
    left: 1.6rem;
    font-family: var(--font-tertiary);
    color: rgb(46, 46, 46);
    opacity: 1;
}

.info-carte p,
.info-carte h3,
.info-carte h2 {
    margin-bottom: .2rem;
}

.carte-overlay:hover {
    opacity: 1;
    background-color: rgba(182, 182, 182, 0.651);
    animation: opacity .5s;
}

.info-carte .bouton-voir {
    position: relative;
    margin-top: 2rem;
    font-size: 10px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1em 2.5em;
    display: inline-block;
    border-radius: 6em;
    transition: all .2s;
    border: none;
    font-family: inherit;
    font-weight: 500;
    color: black;
    background-color: white;
    cursor: pointer;
}

.info-carte .bouton-voir:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.info-carte .bouton-voir:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.info-carte .bouton-voir::after {
    content: "";
    display: inline-block;
    height: 100%;
    width: 100%;
    border-radius: 100px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    transition: all .4s;
    background-color: #fff;
}

.info-carte .bouton-voir:hover::after {
    transform: scaleX(1.4) scaleY(1.6);
    opacity: 0;
}

/* --- MOBILE SPECIFIQUE --- */
@media (max-width: 820px) {

    .barre-laterale,
    .menu-burger {
        display: none !important;
    }

    .grille-competences {
        row-gap: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Réinitialisation de la grille pour mobile */
    .carte-competence:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }

    .carte-competence {
        width: 20rem;
        padding: 1rem;
        margin-bottom: 2rem;
        align-items: center;
        backdrop-filter: blur(13px) saturate(137%);
        -webkit-backdrop-filter: blur(13px) saturate(137%);
        background-color: rgba(137, 137, 137, 0.38);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.125);
        font-size: smaller;
    }

    .icone-fond {
        display: none;
    }
}

/* --- MODALE --- */
.modale {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.contenu-modale {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    position: relative;
}

.fermer-modale {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 5px;
}

.fermer-modale:hover {
    color: black;
}

/* Optimisation pour la modale CV */
#cvModal .contenu-modale {
    height: 90vh;
    display: flex;
    flex-direction: column;
}

#cvModal iframe {
    flex-grow: 1;
    border: none;
}

/* Ajustement mobile pour que le CV soit lisible */
@media (max-width: 820px) {
    #cvModal .contenu-modale {
        width: 95%;
        height: 80vh;
        margin: 10% auto;
    }
}

/* --- CONFIGURATION TERMINAL AVANCÉE --- */
.section-competences {
    background: linear-gradient(180deg, #f5f5f5 0%, #d9d9d9 100%);
    padding: 3rem 1rem;
    display: flex;
    justify-content: center;
    flex-direction: column;
    /* Empile les éléments verticalement */
    align-items: center;
    /* Centre les éléments horizontalement */
}

/* --- HEADER SPECIFIQUE TERMINAL --- */
.entete-section-terminal {
    text-align: center;
    margin-bottom: 1rem;
    /* Réduit de 3rem à 1rem pour rapprocher le titre */
    padding-top: 2rem;
}

.entete-section-terminal h1 {
    font-family: var(--font-tertiary);
    text-transform: uppercase;
    font-size: 30px;
    padding: 1rem;
    margin: 1rem;
    text-align: center;
    /* On reprend exactement les couleurs de la section Projets */
    color: rgb(37, 37, 37);
    border-bottom: 2px solid rgba(0, 0, 0, 0.493);
    display: inline-block;
    /* Permet au soulignement de s'adapter à la taille du texte */
}

.entete-section-terminal p {
    color: #6c757d;
    font-family: var(--font-secondary);
}

.terminal-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
    flex-wrap: wrap;
    /* Pour mobile */
    justify-content: center;
}

/* --- SIDEBAR (Menu d'aide) --- */
.terminal-sidebar {
    flex: 1;
    min-width: 250px;
    background: rgba(22, 27, 34, 0.8);
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 20px;
    color: #c9d1d9;
    font-family: var(--font-tertiary);
    height: fit-content;
}

.terminal-sidebar h3 {
    border-bottom: 1px solid #30363d;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #58a6ff;
}

.sidebar-hint {
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 10px;
}

.command-list li {
    padding: 10px;
    margin-bottom: 5px;
    background: #21262d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.command-list li:hover {
    background: #30363d;
    color: #58a6ff;
    transform: translateX(5px);
}

/* --- DESIGN INTERIEUR DU TERMINAL (Style Image) --- */
.terminal-window {
    flex: 3;
    min-width: 300px;
    background-color: #1e1e1e;
    /* Fond gris foncé VSCode */
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 550px;
    /* Un peu plus grand pour tout afficher */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
}

.terminal-bar {
    background-color: #252526;
    border-bottom: 1px solid #333;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.terminal-bar .buttons {
    position: absolute;
    left: 15px;
    display: flex;
    gap: 8px;
}

.terminal-bar .circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-bar .title {
    color: #8b949e;
    font-family: sans-serif;
    font-size: 0.85rem;
}

.terminal-screen {
    background-color: #1e1e1e;
    padding: 20px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Police plus "code" */
    font-size: 15px;
    flex-grow: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
    cursor: text;
    color: #f0f0f0;
    /* Blanc cassé par défaut */
}

/* Prompt flèche et couleurs */
.prompt-arrow {
    color: #00e676;
    font-weight: bold;
    margin-right: 5px;
}

/* Flèche verte/cyan */
.prompt-path {
    color: #29b6f6;
    font-weight: bold;
    margin-right: 10px;
}

/* Tilde bleu */
.text-muted {
    color: #d4d4d4;
}

/* Gris beaucoup plus clair */
.cyan {
    color: #4fc3f7;
}

/* Cyan lumineux */
.orange {
    color: #ffb74d;
}

/* Orange clair */

/* Styles pour les réponses (Compétences) */
.output-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    display: block;
}

.title-html {
    color: #ff9100;
    border-bottom: 1px dashed #ff9100;
    display: inline-block;
    margin-bottom: 10px;
}

.title-js {
    color: #ffd740;
    border-bottom: 1px dashed #ffd740;
    display: inline-block;
    margin-bottom: 10px;
}

.title-py {
    color: #40c4ff;
    border-bottom: 1px dashed #40c4ff;
    display: inline-block;
    margin-bottom: 10px;
}

/* Grille pour l'affichage des infos (Niveau, Focus...) */
.info-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 5px;
    margin-bottom: 15px;
    color: #d4d4d4;
}

.label {
    color: #a0a0a0;
    /* Gris moyen clair (au lieu de sombre) */
    font-weight: bold;
}

.value {
    color: #ffffff;
    /* Blanc pur pour l'info importante */
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Barre de progression texte */
.progress-bar {
    color: #e0e0e0;
    font-family: monospace;
}

/* --- NOUVEAU FOOTER (RACCOURCIS) --- */
.terminal-footer {
    display: none !important;
}

.footer-label {
    color: #5c6370;
    font-weight: bold;
    margin-right: 5px;
}

.footer-btn {
    background: transparent;
    border: 1px solid #3e4451;
    color: #abb2bf;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.footer-btn:hover {
    background: #3e4451;
    color: white;
}

.footer-btn.blue {
    color: #61afef;
    border-color: rgba(97, 175, 239, 0.3);
}

.footer-btn.orange {
    color: #d19a66;
    border-color: rgba(209, 154, 102, 0.3);
}

.footer-btn.yellow {
    color: #e5c07b;
    border-color: rgba(229, 192, 123, 0.3);
}

.footer-btn.pink {
    color: #c678dd;
    border-color: rgba(198, 120, 221, 0.3);
}

.spacer {
    flex-grow: 1;
}

.clear-btn {
    color: #5c6370;
    cursor: pointer;
}

.clear-btn:hover {
    color: #e06c75;
}

/* --- SAISIE & CURSEUR --- */
.input-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.prompt {
    color: #27c93f;
    /* Vert prompt */
    margin-right: 10px;
    font-weight: bold;
}

.cursor-block {
    color: #58a6ff;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Input caché mais fonctionnel */
#hidden-input {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
}

/* Scrollbar personnalisée */
.terminal-screen::-webkit-scrollbar {
    width: 10px;
}

.terminal-screen::-webkit-scrollbar-track {
    background: #0d1117;
}

.terminal-screen::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 5px;
}

/* Ajustement Mobile pour le Terminal */
@media (max-width: 820px) {
    .terminal-container {
        flex-direction: column;
        width: 100%;
        padding: 0 5px;
        /* Évite que le terminal colle aux bords */
    }

    /* 1. On cache le gros menu latéral pour gagner de la place */
    .terminal-sidebar {
        display: none;
    }

    /* 2. On ajuste la taille du terminal pour qu'il ne soit pas trop haut sur mobile */
    .terminal-window {
        width: 100%;
        min-width: auto;
        height: 350px;
        min-height: 350px;
        max-height: 350px;
        margin-bottom: 20px;
    }

    /* 3. On AFFICHE le footer (boutons) pour naviguer facilement au doigt */
    .terminal-footer {
        display: flex !important;
        /* Force l'affichage */
        flex-wrap: wrap;
        /* Permet aux boutons de passer à la ligne */
        justify-content: center;
        gap: 8px;
        padding: 10px;
        height: auto;
        /* Hauteur adaptative */
        background-color: #21262d;
        /* Assure un fond propre */
    }

    /* Style des boutons pour qu'ils soient faciles à toucher */
    .footer-btn {
        flex-grow: 1;
        /* Les boutons s'étirent pour remplir l'espace */
        justify-content: center;
        padding: 10px 15px;
        /* Zone de touche plus grande */
        font-size: 0.9rem;
    }

    /* On masque le label "RACCOURCIS" et le bouton "Clear" pour simplifier si besoin */
    .footer-label,
    .spacer {
        display: none;
    }

    /* Ajustement de la police à l'intérieur de l'écran */
    .terminal-screen {
        font-size: 13px;
        padding: 10px;
    }
}