/* =========================================
   1. VARIABLES & RESET GLOBAL
========================================= */

:root {
    --bg-dark: #15151c; /* Couleur de fond principale */
    --text-light: #ffffff;
    --text-muted: #a0a0b8;
    --primary-gradient: linear-gradient(90deg, #7c3aed, #8b5cf6);
    --glass-bg: rgba(30, 30, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

/* =========================================
   2. BARRE DE NAVIGATION (HEADER)
========================================= */

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    z-index: 1000;
}

/* --- Section Logo --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px; /* Espace entre l'image et le texte */
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: #333; /* Placeholder si pas d'image */
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.2; /* Rapproche le pseudo et le tag */
}

.logo-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-light);
}

.logo-handle {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Liens de navigation --- */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-light);
}

/* =========================================
   3. BOUTONS
========================================= */

.btn-signup {
    background: var(--primary-gradient);
    color: #fff;
    text-decoration: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 0 20px #ffffff57;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-signup:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 138, 0, 0.6);
}

.btn-scroll {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-muted);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-scroll:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

/* =========================================
   4. SECTION PRINCIPALE (HERO)
========================================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 10% 0 10%;
    position: relative;
}

.hero-content {
    max-width: 50%;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
}

.description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-image {
    width: 45%;
}

.hero-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

/* =========================================
   5. SECTION COMPÉTENCES / PROJETS
========================================= */

.skills {
    padding: 80px 10%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
}

.card h3 {
    margin: 15px 0 10px 0;
    font-size: 1.2rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}
/* =========================================
   6. PORTFOLIO - CARTES DES PROJETS
========================================= */

.portfolio-section {
    padding: 150px 10% 80px 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.portfolio-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.portfolio-card h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
}

.card-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
}

/* =========================================
   7. FENÊTRE MODALE (DÉTAILS DU PROJET)
========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none; /* Empêche de cliquer quand c'est caché */
    transition: opacity 0.3s ease;
}

/* Classe ajoutée par JS pour afficher la modale */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.btn-close {
    background: #8b5cf6; /* Violet */
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.btn-close:hover {
    background: #7c3aed;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 25px;
}

.modal-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.modal-text {
    flex: 1;
}

.modal-text p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Section Technologies */
.tech-section h4 {
    margin-bottom: 5px;
    color: var(--text-light);
}

.tech-tags {
    color: #ffc837 !important; /* Jaune/Orange pour ressortir */
    font-weight: 600;
}

.btn-action {
    display: inline-block;
    background: #169700;
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.btn-action:hover {
    background: #e65c00;
}

.modal-image {
    flex: 1;
}

.modal-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Adaptation pour téléphones */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column-reverse; /* Met l'image au dessus du texte sur mobile */
    }
}
/* =========================================
   8. FOOTER (BAS DE PAGE)
========================================= */

.site-footer {
    /* Dégradé violet inspiré de l'image */
    background: linear-gradient(90deg, #242136 0%, #4c3773 100%);
    color: var(--text-light);
    margin-top: 100px; /* Espace pour séparer le footer du reste du contenu */
}

.footer-main {
    padding: 50px 10% 40px 10%;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Espace entre le logo en haut et les liens en bas */
}

/* --- Bloc "Website by" --- */
.website-by {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo-text {
    font-weight: 800;
    font-size: 1.5rem;
}

/* --- Navigation du footer --- */
.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne sur téléphone */
    gap: 30px;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 30px; /* Espacement entre les mots */
    flex-wrap: wrap;
    flex: 1;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffc837; /* Devient jaune/orange au survol */
}

/* --- Ligne du bas (Copyright) --- */
.footer-bottom {
    background-color: #121017; /* Très sombre, presque noir */
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.5); /* Ligne de séparation très fine */
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 400;
}
/* =========================================
   9. PAGE YOUTUBE (GRILLE DE VIDÉOS)
========================================= */

.youtube-section {
    padding: 150px 10% 80px 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 800;
    text-align: center;
}

/* Grille de 3 colonnes */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.youtube-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.youtube-card .card-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9; /* Format miniature YouTube parfait */
    margin-bottom: 15px;
}

.youtube-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bouton Play qui apparaît au survol */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    padding-left: 5px; /* Compense visuellement le triangle */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.youtube-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-card h3 {
    font-size: 1.1rem;
    text-align: center;
}

/* Rendre la grille responsive (2 colonnes sur tablette, 1 sur téléphone) */
@media (max-width: 992px) {
    .youtube-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .youtube-grid { grid-template-columns: 1fr; }
}