﻿/* Reset et Base */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0f172a; /* Fond bleu nuit très sombre */
    color: #e2e8f0; /* Texte clair */
    line-height: 1.6;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: #0f172a;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #334155;
    z-index: 1000;
}

nav .logo {
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 35px; 
    width: auto;  
    display: block;
}

/* Site title next to logo */
.site-title {
    color: #e2e8f0;
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: 10px;
    text-decoration: none;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-link:hover .site-title {
    color: #38bdf8;
}

nav ul { list-style: none; display: flex; gap: 20px; padding: 0; margin: 0; }
nav a { text-decoration: none; color: #e2e8f0; font-weight: bold; transition: color 0.3s; }
nav a:hover { color: #38bdf8; /* Bleu clair */ }

/* Sections */
.container { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; }

/* Titres */
h2 {
    border-left: 4px solid #38bdf8; /* Barre bleue à gauche */
    padding-left: 1rem;
    margin-bottom: 2rem;
    color: #f1f5f9;
}

/* Hero Section */
header, .project-header{
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    overflow: hidden;
    background-color: #0f172a;
}

header::before, .project-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;

    background-image: var(--bg-image);
    background-position: center center;
    background-size: cover;

    filter: blur(4px);
    transform: scale(1.1); /* Agrandir pour cacher les bords flous */
    z-index: 0;
}

header::after, .project-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;

    /* Dégradé sombre pour la lisibilité du texte */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), #0f172a);
    z-index: 1;
}

/* 4. Le contenu (Texte, Boutons) doit être au-dessus des calques */
.hero-content, .container {
    position: relative;
    z-index: 2; /* Au premier plan */
}

/* Spécificités pour l'accueil */
header h1 { font-size: 3rem; margin-bottom: 0.5rem; color: #ffffff; }
header h2 { border: none; font-size: 1.5rem; color: #94a3b8; font-weight: normal; margin-top: 0; }

/* Spécificités pour les pages projets (écraser la hauteur) */
.project-header {
    height: auto !important; /* Pas de 80vh pour les projets */
    min-height: 50vh;
    padding: 6rem 1rem;
}

.project-header h1 { font-size: 3.5rem; color: #38bdf8; margin-bottom: 0.5rem; }
.subtitle { font-size: 1.5rem; color: #94a3b8; margin-bottom: 3rem; }

.highlight {
    color: #38bdf8;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    display: block;
}

/* Boutons */
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #38bdf8;
    color: #0f172a; /* Texte foncé sur fond bleu */
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: transform 0.2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

.btn-outline {
    border: 2px solid #38bdf8;
    background: transparent;
    color: #38bdf8;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}
.btn-outline:hover { background: #38bdf8; color: #0f172a; }

/* Grilles */
.skills-grid, .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Cartes (Compétences & Projets) */
.skill-card, .project-card {
    background: #1e293b; /* Fond carte légèrement plus clair */
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #334155;
    transition: transform 0.2s;
    position: relative; /* For absolute positioned link */
}
.skill-card:hover, .project-card:hover { transform: translateY(-5px); border-color: #38bdf8; }

.skill-card h3 { color: #38bdf8; margin-top: 0; }
.sub-skill { color: #94a3b8; font-size: 0.9rem; margin-top: 0.5rem; }

.project-card img {
    width: 100%;
    height: 200px; /* Force une hauteur fixe */
    object-fit: cover; /* Recadre l'image sans l'écraser */
    border-radius: 4px;
    margin-bottom: 1rem;
    background-color: #1e293b; /* Couleur de fond pendant le chargement */
}

/* Tags Projets */
.tags { margin-top: 1rem; }
.tags span {
    display: inline-block;
    background: #334155;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    color: #38bdf8;
    text-decoration: none;
    font-weight: bold;
}
.project-link:hover { text-decoration: underline; }

/* Full card clickable link */
.card-full-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    /* Make sure screen readers only read it once or handle it properly */
    text-indent: -9999px;
    color: transparent;
}

/* Timeline Formation */
.timeline { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-item {
    background: #1e293b;
    padding: 1.5rem;
    border-left: 4px solid #38bdf8;
    border-radius: 0 8px 8px 0;
}
.timeline-item h3 { margin: 0 0 0.5rem 0; color: #f1f5f9; border: none; padding: 0; }
.timeline-item .date {
    display: block;
    color: #38bdf8;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 2rem;
    background: #0f172a;
    border-top: 1px solid #334155;
}
.social-links { margin: 2rem 0; }
.social-links a { color: #94a3b8; text-decoration: none; margin: 0 0.5rem; }
.social-links a:hover { color: #38bdf8; }
.copyright { color: #64748b; font-size: 0.9rem; margin-top: 2rem; }

/* Responsive Mobile */
@media (max-width: 768px) {
    nav { flex-direction: column; align-items: center; gap: 1rem; }
    nav ul { gap: 10px; flex-wrap: wrap; justify-content: center; }
    header h1 { font-size: 2rem; }
}

.project-header {
    height: auto; /* On enlève la hauteur fixe de 80vh */
    min-height: 40vh;
    padding: 4rem 1rem;
}

.project-header h1 {
    font-size: 3.5rem;
    color: #38bdf8;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 3rem;
}

/* Grille de métadonnées (Role, Status, etc.) */
.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: left;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    padding: 2rem 0;
}

.meta-item { display: flex; flex-direction: column; }
.meta-label { color: #94a3b8; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.meta-value { color: #e2e8f0; font-weight: bold; font-size: 1.1rem; }

.project-links { margin-top: 2rem; }

/* Contenu principal */
.project-content { padding-top: 0; }

.main-project-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #334155;
    margin-bottom: 4rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.content-block {
    margin-bottom: 4rem;
    max-width: 800px; /* Pour une meilleure lisibilité */
}

.content-block h2 { color: #e2e8f0; border-left-color: #38bdf8; }
.content-block p, .content-block li { color: #cbd5e1; font-size: 1.1rem; margin-bottom: 1rem; }
.content-block ul { margin-left: 1.5rem; }

/* Galerie */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-grid figure {
    margin: 0;
    background: #1e293b;
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #334155;
}

.gallery-grid img, .gallery-grid video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.gallery-grid figcaption {
    text-align: center;
    padding: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

.image-container {
    position: relative;
    overflow: hidden; /* Pour que le badge ne dépasse pas des coins arrondis si besoin */
    border-radius: 4px;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px; /* Forme de pilule */
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffffff; /* Texte blanc par défaut */
    box-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Petite ombre pour lisibilité */
    z-index: 10;
}

/* --- Codes Couleurs --- */

/* Vert pour Terminé */
.status-completed {
    background-color: #10b981;
}

/* Orange/Jaune pour En cours (On Going) */
.status-on-going {
    background-color: #f59e0b;
}

/* Gris ou Rouge pour Abandonné */
.status-abandoned {
    background-color: #64748b; /* Gris neutre */
    /* background-color: #ef4444; /* Ou Rouge si tu préfères */
}

/* Bleu/Violet pour Prototype */
.status-prototype {
    background-color: #8b5cf6;
}

/* Bouton de langue */
.lang-btn {
    background: #334155;
    color: #e2e8f0;
    border: 1px solid #38bdf8;
    border-radius: 4px;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}
.lang-btn:hover {
    background: #38bdf8;
    color: #0f172a;
}

.btn-disabled {
    pointer-events: none; /* Empêche le clic */
    opacity: 0.5;        /* Style visuel grisé */
    cursor: not-allowed;
}