:root {
    --bg: #0d1117;
    --card: #161b22;
    --border: #30363d;
    --accent: #58a6ff;
    --text: #c9d1d9;
    --white: #f0f6fc;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
}

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

header { text-align: center; padding: 60px 20px; border-bottom: 1px solid var(--border); }
h1 { color: var(--white); font-size: 2.5rem; margin: 0; }
.subtitle { color: var(--accent); font-size: 1.2rem; margin-bottom: 20px; }
.intro-text { max-width: 750px; margin: 0 auto 30px; color: #8b949e; }

.social-links a {
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    margin: 5px;
    display: inline-block;
    transition: 0.2s;
}

.social-links a:hover { border-color: var(--accent); background: var(--border); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

/* --- SLIDER --- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.slider-container {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.4s ease-in-out;
    height: 100%;
}

.slider-wrapper img {
    width: 100%;
    object-fit: cover;
    height: 100%;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover { background: var(--accent); }
.prev { left: 10px; }
.next { right: 10px; }

.card-body { padding: 20px; flex-grow: 1; }
h3 { margin: 0 0 10px; color: var(--white); }
.tag {
    background: #23863622;
    color: #3fb950;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #23863644;
    margin-right: 5px;
}

.card-footer { padding: 15px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); }
.card-footer a { color: var(--accent); text-decoration: none; font-weight: bold; font-size: 14px; }

.card-img img, .slider-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cela force l'image à rester dans son cadre sans se déformer */
}

/* --- SECTION COMPÉTENCES --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.skill-category h4 {
    color: var(--accent);
    margin-top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.skill-category li {
    font-size: 0.95rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.skill-category li::before {
    content: "▹";
    color: var(--accent);
    margin-right: 8px;
}


.cv-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}


.slider-wrapper img {
  width: 100%;
  aspect-ratio: 16 / 9; 
  object-fit: cover;    
  display: block;     
}


.img-zoom img, .img-zoom-code img {
  object-fit: cover; 
}


/* --- AMBIANCE GÉNÉRALE VIOLETTE --- */
:root {
    --accent: #9370DB; /* Violet Medium Purple */
    --accent-glow: rgba(147, 112, 219, 0.3);
}

body {
    /* Dégradé radial violet profond */
    background: radial-gradient(ellipse at bottom, #1a1033 0%, #050508 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* --- CIEL ÉTOILÉ  --- */
.bg-animation {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

#stars {
    width: 1px; height: 1px;
    background: transparent;
    /* J'ai multiplié les points ici pour saturer l'espace */
    box-shadow: 
        10vw 20vh #FFF, 25vw 10vh #FFF, 45vw 35vh #FFF, 75vw 15vh #FFF, 90vw 40vh #FFF, 5vw 60vh #FFF, 35vw 85vh #FFF, 55vw 55vh #FFF, 80vw 90vh #FFF, 15vw 45vh #FFF, 65vw 75vh #FFF, 40vw 10vh #FFF, 95vw 5vh #FFF, 20vw 80vh #FFF, 50vw 25vh #FFF, 12vw 12vh #FFF, 88vw 88vh #FFF, 42vw 68vh #FFF, 2vw 98vh #FFF, 66vw 22vh #FFF, 3vw 15vh #FFF, 18vw 72vh #FFF, 28vw 44vh #FFF, 38vw 12vh #FFF, 48vw 88vh #FFF, 58vw 33vh #FFF, 68vw 66vh #FFF, 78vw 05vh #FFF, 82vw 95vh #FFF, 92vw 25vh #FFF, 14vw 34vh #FFF, 24vw 54vh #FFF, 34vw 74vh #FFF, 44vw 94vh #FFF, 54vw 14vh #FFF, 64vw 44vh #FFF, 74vw 84vh #FFF, 84vw 14vh #FFF, 94vw 64vh #FFF, 04vw 24vh #FFF;
    animation: twinkle 3s infinite ease-in-out;
}

#stars2 {
    width: 2px; height: 2px;
    background: transparent;
    box-shadow: 
        15vw 25vh #FFF, 55vw 75vh #FFF, 85vw 15vh #FFF, 25vw 85vh #FFF, 75vw 45vh #FFF, 45vw 5vh #FFF, 5vw 95vh #FFF, 95vw 55vh #FFF, 33vw 33vh #FFF, 66vw 66vh #FFF, 11vw 88vh #FFF, 88vw 11vh #FFF, 40vw 40vh #FFF, 20vw 20vh #FFF, 70vw 70vh #FFF, 90vw 90vh #FFF;
    animation: moveStars 80s linear infinite;
}

/* Grosses étoiles et lueurs violettes */
#stars3 {
    width: 3px; height: 3px;
    background: transparent;
    box-shadow: 
        30vw 50vh var(--accent), 70vw 20vh var(--accent), 10vw 80vh var(--accent), 50vw 10vh #FFF, 90vw 90vh #FFF, 20vw 40vh var(--accent);
    animation: moveStars 120s linear infinite;
}

/* --- ANIMATIONS --- */
@keyframes twinkle {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes moveStars {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}


h1 {
    background: linear-gradient(90deg, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tag {
    background: rgba(147, 112, 219, 0.1) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(147, 112, 219, 0.3) !important;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent) !important;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.card-footer a {
    color: var(--accent) !important;
}

.cv-button, .btn-cv {
    background: var(--accent) !important;
    color: white !important;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- EFFET SUR LES CARTES --- */
.card {
    background: rgba(22, 27, 34, 0.8) !important;
    backdrop-filter: blur(8px); /* Flou derrière la carte */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #58a6ff !important;
    box-shadow: 0 10px 30px rgba(88, 166, 255, 0.15); /* Lueur bleue */
}

/* --- TITRE GRADIENT --- */
h1 {
    background: linear-gradient(90deg, #ffffff, #58a6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* --- BOUTON CV ÉCLATANT --- */
.btn-cv {
    position: relative;
    overflow: hidden;
    background: #238636 !important; /* Vert GitHub plus vif */
    border: none;
    box-shadow: 0 0 15px rgba(35, 134, 54, 0.3);
}

.btn-cv::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.card-content {
    padding: 30px 25px; /* Augmente l'espace haut/bas et gauche/droite */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les titres et tags */
    text-align: center;  /* Centre la description */
    flex-grow: 1;
}

.project-details {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    font-size: 0.85rem;
    color: #a3aab5;
    text-align: left; /* On garde la liste à gauche pour la clarté */
    display: inline-block;
}

.project-details li {
    margin-bottom: 6px;
    line-height: 1.4;
}

.tags {
    margin-bottom: 15px;
    justify-content: center; /* Centre les badges */
}

.card-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center; /* Centre le bouton de lien */
}

footer { 
    text-align: center; 
    padding: 30px 20px; 
    color: #8b949e; 
    font-size: 0.9rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
}

/* Carte mise en avant (pleine largeur) */
.card-featured {
    grid-column: 1 / -1; /* Occupe toutes les colonnes de la grille */
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.video-container {
    width: 100%;
    background-color: #000;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    max-height: 500px; /* Limite la hauteur pour ne pas envahir tout l'écran */
    object-fit: contain;
    display: block;
}