/* --- RESET & BASES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    color: #d1d1d1;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- BARRE DE NAVIGATION (FIXE & UNIFORME) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 4%;
    background-color: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid #1a1a1a;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
}

.logo a {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: #666;
    font-size: 13px !important; 
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
    white-space: nowrap; 
    letter-spacing: 0.5px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

nav a:hover, nav a.active {
    color: #ffffff !important;
    border-bottom: 2px solid #ffffff;
}

/* --- SECTIONS COMMUNES --- */
.content-page {
    padding: 140px 10% 60px;
    min-height: 100vh;
}

.page-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #aaaaaa !important; /* Gris clair pour lisibilité */
    font-size: 1.1rem;
    margin-bottom: 50px;
    font-weight: 400;
    max-width: 800px;
}

.page-subtitle-bright {
    color: #aaaaaa !important;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* --- ACCUEIL (HERO SPLIT) --- */
.hero-split {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    padding-top: 80px;
}

.hero-text { flex: 1.2; padding-right: 50px; }
.hero-text h1 { font-size: 3rem; color: #fff; line-height: 1.1; margin-bottom: 10px; }
.hero-subtitle { font-size: 1.2rem; color: #444; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 25px; font-weight: 500; }
.hero-intro { color: #888; margin-bottom: 35px; max-width: 500px; font-size: 1.1rem; }

.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; }

.btn-secondary { background: transparent; color: #fff; padding: 12px 25px; text-decoration: none; font-weight: 700; border-radius: 5px; font-size: 0.8rem; border: 1px solid #333; transition: 0.3s; }
.btn-secondary:hover { border-color: #fff; }

.btn-linkedin { display: flex; align-items: center; gap: 8px; color: #0077b5; border: 1px solid #0077b5; padding: 12px 20px; text-decoration: none; font-weight: 700; font-size: 0.8rem; border-radius: 5px; transition: 0.3s; }
.btn-linkedin:hover { background: #0077b5; color: #fff; }

.hero-photo { flex: 0.8; display: flex; justify-content: flex-end; }
.photo-wrapper img { width: 380px; height: 380px; border-radius: 50%; object-fit: cover; border: 2px solid #1a1a1a; filter: grayscale(15%); transition: 0.5s; }

/* --- PAGE PROJETS (OPTIMISÉE POUR VIDÉOS ENTIÈRES) --- */
.project-card-large {
    display: flex;
    background: #080808;
    border: 1px solid #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto 60px;
    max-width: 1200px;
}

.project-info-side { flex: 1.2; padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.project-info-side h2 { color: #fff; font-size: 2rem; margin-bottom: 20px; }

.project-video-side {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-left: 1px solid #1a1a1a;
    height: 400px;
    overflow: hidden;
}

.project-video-side video, 
.project-video-side img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Correction : On voit tout, rien n'est coupé */
    border-radius: 4px;
    transition: 0.5s ease;
}

.project-card-large:hover .project-video-side video,
.project-card-large:hover .project-video-side img {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.project-tech-stack { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.project-tech-stack span { background: #1a1a1a; color: #fff; font-size: 0.75rem; padding: 6px 12px; border-radius: 4px; border: 1px solid #333; }

/* --- STYLE CERTIFICATIONS (LOGOS COULEUR) --- */
.certifs-grid-clean {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.certif-item {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.certif-item:hover { border-color: #444; background: #111; transform: translateX(5px); }
.certif-mini-logo { width: 65px; height: 65px; flex-shrink: 0; }
.certif-mini-logo img { width: 100%; height: 100%; object-fit: contain; }
.certif-info h3 { font-size: 1.1rem; color: #fff; margin: 5px 0; }
.issuer-tag { font-size: 0.75rem; color: #555; text-transform: uppercase; font-weight: 700; }

.btn-certif {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.3s;
}
.btn-certif:hover { background: #fff; color: #000; border-color: #fff; }

/* --- SECTION STAGES (PHOTO + STATS) --- */
.stage-card {
    display: flex;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 50px;
}

.stage-visual { flex: 0.8; position: relative; min-height: 350px; overflow: hidden; }
.stage-photo { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) brightness(0.7); }
.stage-content { flex: 1.2; padding: 30px; }

.key-stats {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.stat-item {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stage-section h3 { color: #fff; font-size: 1.1rem; margin-bottom: 10px; }
.stage-section ul li::before { content: "→"; position: absolute; left: 0; color: #fff; }

.btn-view { 
    display: inline-block; 
    text-decoration: none; 
    color: #fff; 
    font-size: 0.75rem; 
    font-weight: 700; 
    padding: 10px 20px; 
    border: 1px solid #333; 
    border-radius: 6px; 
    transition: 0.3s; 
    min-width: 180px;
    text-align: center;
}
.btn-view:hover { background: #fff; color: #000; }

/* --- RÉALISATIONS --- */
.year-container { margin-bottom: 80px; padding: 30px; background: rgba(255, 255, 255, 0.02); border-radius: 20px; border: 1px solid #111; }
.year-main-title { font-size: 1.8rem; color: #fff; margin-bottom: 40px; text-align: center; border-bottom: 2px solid #333; display: table; margin: 0 auto 40px; padding-bottom: 10px; }
.realisation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.realisation-card { background: #0c0c0c; border: 1px solid #1a1a1a; padding: 25px; border-radius: 12px; }
.realisation-card.stage-highlight { border-left: 4px solid #fff; }
.skills span { background: #1a1a1a; color: #fff; font-size: 0.65rem; padding: 4px 10px; border-radius: 4px; border: 1px solid #333; }

/* --- FOOTER --- */
footer {
    padding: 60px;
    text-align: center;
    border-top: 1px solid #1a1a1a;
    margin-top: 50px;
}

footer p {
    font-size: 0.85rem;
    color: #888888 !important; /* Gris clair lisible */
    letter-spacing: 1px;
}

footer p strong { color: #ffffff; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-split, .stage-card, .project-card-large { flex-direction: column; }
    .hero-photo, .stage-visual, .project-video-side { justify-content: center; width: 100%; height: 250px; border: none; }
    .photo-wrapper img { width: 250px; height: 250px; }
    nav ul { gap: 10px; }
    nav a { font-size: 11px !important; }
}


/* --- PAGE SYNTHÈSE (PDF VIEWER) --- */
.pdf-container {
    background: #0a0a0a;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #1a1a1a;
    text-align: center;
}

.pdf-viewer {
    width: 100%;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.pdf-viewer embed {
    border: none;
    border-radius: 4px;
}


/* --- BARRE DE FILTRE (PLUS GRANDE) --- */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px; /* Plus d'espace sous les boutons */
}

.filter-btn {
    padding: 12px 25px; /* Boutons plus larges */
    font-size: 0.9rem;   /* Texte plus grand */
    border-radius: 30px;
}

/* --- GRILLE DE CERTIFICATIONS (CARTES PLUS LARGES) --- */
.certifs-grid-clean {
    display: grid;
    /* On passe de 280px à 350px minimum pour des cartes plus imposantes */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 25px;
}

/* --- CARTE DE CERTIFICATION (PLUS HAUTE ET TEXTE PLUS GROS) --- */
.certif-item {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 35px; /* Plus d'espace interne */
    display: flex;
    align-items: center;
    gap: 30px;
    border-radius: 15px;
    min-height: 150px; /* Force une hauteur minimale */
}

.certif-mini-logo {
    width: 85px;  /* Logo plus gros (était à 65px) */
    height: 85px;
    flex-shrink: 0;
}

.certif-info h3 {
    font-size: 1.4rem; /* Titre de la certif bien plus gros */
    color: #fff;
    margin: 8px 0;
}

.issuer-tag {
    font-size: 0.85rem; /* Tag plus lisible */
    letter-spacing: 1.5px;
}

.btn-certif {
    padding: 10px 20px;
    font-size: 0.85rem;
    margin-top: 15px;
}

/* --- STYLE DES MENUS DÉROULANTS --- */
.year-dropdown {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: 0.3s;
}

.year-dropdown summary {
    padding: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    list-style: none; /* Enlève la flèche par défaut */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ajouter une flèche personnalisée à droite */
.year-dropdown summary::after {
    content: "+";
    font-size: 2rem;
    transition: 0.3s;
}

.year-dropdown[open] summary::after {
    content: "-";
    transform: rotate(180deg);
}

.year-dropdown summary:hover {
    background: #111;
}

.dropdown-content {
    padding: 30px;
    border-top: 1px solid #1a1a1a;
    background: #050505;
}

/* Ajustement de la grille pour les cartes compactes */
.realisation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.realisation-card {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s;
}

.realisation-card:hover {
    border-color: #fff;
}


/* Style pour Lycée Ozenne */
.school-name {
    font-size: 2rem;
    color: #fff;
    font-weight: 600;
    margin: 5px 0 25px 0;
    opacity: 0.9;
}

/* Style pour la phrase d'introduction aux TP */
.tp-intro-text {
    margin-top: 30px;
    font-size: 1.1rem;
    color: #888;
    font-style: italic;
    border-left: 3px solid #333;
    padding-left: 20px;
}

/* Boutons plus larges pour "Voir le compte rendu" */
.realisation-card .btn-certif {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 12px;
}

/* --- ESPACEMENT DU HEADER --- */
.page-header-massive {
    padding-top: 50px;     /* Descend le titre par rapport au menu */
    margin-bottom: 80px;   /* Donne de l'air avant les menus déroulants */
}

.school-name {
    margin-top: 15px;      /* Décolle le nom du lycée du titre BTS */
    margin-bottom: 35px;
}

.page-subtitle-large {
    margin-bottom: 40px;   /* Espace avant la ligne blanche */
    line-height: 1.8;      /* Aère les lignes de texte du paragraphe */
}

.header-line {
    margin-top: 40px;      /* Espace avant et après la ligne blanche */
    margin-bottom: 40px;
}

/* --- ESPACEMENT DES DROPDOWNS --- */
.year-dropdown {
    margin-bottom: 40px;   /* Double l'espace entre le bloc 1ère et 2ème année */
    border: 1px solid #222; /* Bordure un peu plus visible pour bien séparer */
}

.year-dropdown summary {
    padding: 40px 30px;    /* Augmente la hauteur des barres cliquables */
    letter-spacing: 2px;   /* Aère les lettres du titre */
}


.dropdown-content {
    padding: 50px 40px;    /* Plus d'espace sur les côtés à l'intérieur */
}

.realisation-grid {
    gap: 40px;             /* Plus d'espace entre chaque carte de TP */
}

/* --- GRILLE DE PROJETS 2x2 --- */
.projects-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Deux colonnes */
    gap: 40px; /* Grand espace entre les projets */
    margin-top: 50px;
}

.project-card-compact {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card-compact:hover {
    transform: translateY(-10px);
    border-color: #333;
}

/* Zone visuelle (Image ou Vidéo) */
.project-visual-top {
    height: 300px; /* Hauteur fixe pour l'alignement */
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid #1a1a1a;
}

.project-visual-top img, 
.project-visual-top video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit tout le cadre proprement */
    filter: grayscale(20%);
}

/* Zone texte */
.project-content-bottom {
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.project-tag {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #555;
    font-weight: 700;
    margin-bottom: 15px;
}

.project-content-bottom h2 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 15px;
}

.project-content-bottom p {
    color: #888;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Responsivité : 1 seule colonne sur mobile */
@media (max-width: 992px) {
    .projects-grid-2x2 {
        grid-template-columns: 1fr;
    }
}

.project-visual-top img, 
.project-visual-top video {
    width: 100%;
    height: 100%;
    /* "contain" permet de voir TOUTE la vidéo sans zoom, sur fond noir */
    object-fit: contain; 
    background: #000;
    filter: grayscale(10%);
    transition: 0.5s;
}

/* Optionnel : si tu veux que ça zoom un peu uniquement au survol */
.project-card-compact:hover video, 
.project-card-compact:hover img {
    transform: scale(1.05);
}

/* --- CARTES DE PROJETS 2x2 --- */
.projects-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 50px;
}

.project-card-compact {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Transition douce pour le déplacement */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* --- EFFET AU SURVOL SUR LA CARTE (UNQUEMENT) --- */
.project-card-compact:hover {
    transform: translateY(-8px); /* Lève légèrement la carte */
    border-color: #333; /* Éclaircit la bordure */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Ajoute une ombre portée pour l'effet de profondeur */
}

/* --- ZONE VISUELLE (IMAGE / VIDÉO) --- */
.project-visual-top {
    height: 300px; /* Conserve la hauteur fixe pour l'alignement */
    background: #000;
    overflow: hidden;
    border-bottom: 1px solid #1a1a1a;
}

.project-visual-top img, 
.project-visual-top video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* S'assure que TOUTE la vidéo est visible */
    background: #000;
    filter: grayscale(15%); /* Optionnel : noir et blanc au repos */
    transition: 0.5s ease; /* Transition douce pour le passage en couleur */
}

/* --- EFFET AU SURVOL SUR L'IMAGE/VIDÉO --- */
.project-card-compact:hover video,
.project-card-compact:hover img {
    /* --- ICI, NOUS AVONS ENLEVÉ LE TRANSFORM: SCALE --- */
    filter: grayscale(0%); /* L'image repasse en couleur au survol */
}