/* --- Variables --- */
:root {
    --couleur-fond: #111111;
    --couleur-texte: #FFFFFF;
    --couleur-bordure: #FFFFFF;
    --font-principale: 'IBM Plex Mono', 'Consolas', monospace;
}

/* --- Styles de base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--couleur-fond);
    color: var(--couleur-texte);
    font-family: var(--font-principale);
    min-height: 100vh;
}

a {
    color: var(--couleur-texte);
    text-decoration: none;

    font-size: 1rem;
    font-weight: 700;
}

h1 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 300;
    color: #ccc;
    line-height: 1.5;
}

/* * CLASSE DE MISE EN PAGE PRINCIPALE (Conteneur global)
 * Gère le centrage et l'espacement pour les sections pleine largeur.
*/
.container {
    width: 80%; 
    margin-left: auto;
    margin-right: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.align-right{
    text-align: right;
}

/* --- Section Intro --- */
.intro {
    z-index: 100;
}

/* --- GRILLE 2 COLONNES (Projets | Compétences) --- */
.main-content-grid {
    display: grid;
    /* Crée 2 colonnes (la 1ère est un peu plus grande) */
    grid-template-columns: 1.2fr 1fr; 
    gap: 2rem;
    
    /* Centre la grille sur la page */
    width: 80%;
    margin: 0 auto;
}

/* Ajustement des .container à l'intérieur de la grille */
.main-content-grid .container {
    width: 100%;
    max-width: none;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    margin-left: 0;
    margin-right: 0;
}

/* --- Section Projets (Carousel) --- */
.projects {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les boutons */
}

.projects .container {
    padding-bottom: 0.5rem; 
}

.projects-carousel-wrapper {
    width: 100%; /* S'adapte à sa colonne */
    max-width: min(80vw, 400px); /* Garde une taille max raisonnable */
}

.projects-carousel {
    display: grid;
    grid-template-columns: repeat(4, 100%); /* Lié au JS */
    overflow: hidden;
}

.projects-carousel-item {
    width: 100%;
    transform: translateX(-0%) scale(0.9);
    opacity: 0;
    border-radius: 3px;
    transition: all 0.7s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.projects-carousel-item.active {
    transform: scale(1) translateX(-0%);
    opacity: 1;
}

.project-card {
    width: 100%;
    flex-shrink: 0;
    border: 2px solid var(--couleur-bordure);
    background-color: #111;
    border-radius: 3px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 250px;
    background-color: #000;
    border-bottom: 2px solid var(--couleur-bordure);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.project-info {
    padding: 1.5rem;
}

.project-info h4 {
    font-size: 1rem;
    margin-bottom: .5rem;
}

.project-info p {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #ccc;
    white-space: normal; 
    margin-bottom: .5rem;
}

/* Boutons du Carousel */
.carousel-buttons {
    margin: 10px 0;
    display: flex;
    max-width: 400px;
    justify-content: center;
}

.carousel-btn {
    font-size: 1rem;
    margin: 0 5px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    border: 1px solid var(--couleur-bordure);
    color: var(--couleur-texte);
    background-color: transparent;
    border-radius: 3%;
    height: 40px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
}
.carousel-btn:focus {
    background-color: #333;
}
.carousel-btn:hover {
    background-color: #222;
}

/* --- Section Compétences --- */
.skills-list {
    display: flex;
    flex-wrap: wrap; /* Passe à la ligne si pas assez de place */
    flex-direction: row-reverse;
    gap: 1.5rem;
    /* On enlève justify-content: center pour un alignement à gauche */
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    
    border: 2px solid var(--couleur-bordure);
    border-radius: 3px;
    padding: 0.5rem;
    background-color: #1e1e1e;
}

.skill-logo {
    max-width: 100%; 
    height: auto;
    max-height: 30px;
}

.skill-rating {
    display: flex;
    gap: 2px;
}

.skill-rating-square {
    height: 25px;
    aspect-ratio: 1;
    border: 2px solid var(--couleur-bordure);
}

.skill-rating-square.is-filled {
    background-color: var(--couleur-texte);
}

/* --- Section Contact (Simplifiée) --- */
.contact {
    z-index: 100;
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}


a:hover {
    background-color: var(--couleur-texte);
    color: var(--couleur-fond);
}

/* --- Effet de fond --- */
.bg-noise {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200vh;
    background: transparent url('http://assets.iceable.com/img/noise-transparent.png') repeat 0 0;
    animation: bg-animation .2s infinite;
    opacity: .9;
    z-index: -1;
}

@keyframes bg-animation {
    0% { transform: translate(0,0) }
    10% { transform: translate(-5%,-5%) }
    20% { transform: translate(-10%,5%) }
    30% { transform: translate(5%,-10%) }
    40% { transform: translate(-5%,15%) }
    50% { transform: translate(-10%,5%) }
    60% { transform: translate(15%,0) }
    70% { transform: translate(0,10%) }
    80% { transform: translate(-15%,0) }
    90% { transform: translate(10%,5%) }
    100% { transform: translate(5%,0) }
}

/* --- Styles Responsives --- */
@media screen and (max-width: 900px) { 
    /* Repasse à 1 colonne */
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}