/* ==========================================================================
   1. RESET ET BASES (SÉCURISÉ)
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #0f0f0f;
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

:root {
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --accent: #60a5fa;
}


/* ==========================================================================
   2. HEADER DYNAMIQUE (VAGUES ÉPURÉES)
   ========================================================================== */
header.main-header {
    position: relative;
    width: 100vw;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #050a0f; /* Bleu très foncé profond */
    overflow: hidden;
}

.ocean-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh; /* Hauteur des vagues en bas du header */
    min-height: 100px;
    max-height: 150px;
    z-index: 1;
}

.waves {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Animation des vagues */
.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

/* --- Styles du texte pour ressortir sur les vagues --- */
.header-name, header.main-header h1, header.main-header p {
    position: relative;
    z-index: 2; /* S'assure que le texte est au-dessus des vagues */
}

.header-name {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

header.main-header h1 {
    font-size: 2.2rem;
    color: #f8fafc;
    margin: 10px 15%;
}

header.main-header .highlight { 
    color: #60a5fa; /* Bleu ciel plus doux */
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .ocean-waves { height: 40px; min-height: 40px; }
    .header-name { font-size: 2rem; }
    header.main-header h1 { font-size: 1.5rem; }
}
/* ==========================================================================
   2.1 ENCADRÉ PORTRAIT HEADER (DORIAN)
   ========================================================================== */
.header-profiles {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.profile-box {
    /* TAILLE AGRANDIE ICI */
    width: 240px !important;  
    height: 240px !important; 
    
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px; /* Coins un peu plus arrondis pour la grande taille */
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease;
}

.profile-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-box:hover {
    transform: scale(1.03);
    border-color: #60a5fa;
}

/* On désactive l'écrasement de taille sur tablette pour garder ton portrait grand */
@media (max-width: 1024px) {
    .header-profiles {
        left: 2%; /* On le colle un peu plus au bord sur tablette */
    }
    .profile-box {
        width: 220px !important; /* Taille intermédiaire sur tablette */
        height: 220px !important;
    }
}

/* Sur mobile (téléphone), on le centre pour ne pas masquer le texte */
@media (max-width: 768px) {
    .header-profiles {
        position: relative;
        top: 20px;
        left: 0;
        transform: none;
        align-items: center;
        margin-bottom: 30px;
    }
    .profile-box {
        width: 180px !important;
        height: 180px !important;
    }
}


/* ==========================================================================
   2.2 Infographie
   ========================================================================== */

/* Cache le contenu supplémentaire avec une transition */
.info-content-extra {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease-out, opacity 0.8s ease;
    opacity: 0;
}

/* Classe activée par le clic */
.info-content-extra.active {
    max-height: 5000px; /* Une valeur assez grande pour tout contenir */
    opacity: 1;
}

/* Style du bouton */
.read-more-wrapper {
    text-align: center;
    margin: 20px 0;
}

.btn-read-more {
    background: rgba(37, 99, 235, 0.1);
    color: #4facfe;
    border: 1px solid rgba(79, 172, 254, 0.3);
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Cache le bouton une fois cliqué */
.btn-read-more.hidden {
    display: none;
}
/* Style pour le bouton de fermeture en bas */
#close-wrapper {
    margin-top: 30px;
    padding-bottom: 20px;
}

/* Optionnel : animation de fondu pour le bouton fermer */
#close-wrapper.visible {
    display: block !important;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   3. NAVIGATION (CORRIGÉE)
   ========================================================================== */
nav {
    display: flex;
    justify-content: flex-end;
    padding: 0 10%;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 2000;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Animation de transition */
    transition: transform 0.4s ease-in-out, background 0.3s ease;
}

/* Classe qui cache le menu */
.nav-hidden {
    transform: translateY(-100%);
}

.burger-menu {
    display: flex;
    flex-direction: column;
    width: 30px;
    cursor: pointer;
    gap: 5px;
    z-index: 2005;
    transition: 0.3s;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation du Burger -> Croix quand la classe .active est ajoutée par le JS */
.burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    position: absolute;
    top: 75px; /* Aligné juste sous la nav bar de 70px */
    right: 10%;
    width: 280px;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 15px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 2001;
}

/* État affiché quand la classe .active est ajoutée */
.nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 15px;
    font-weight: 600;
    transition: 0.2s;
}

.nav-links a:hover {
    background: var(--accent);
    border-radius: 10px;
}

header.main-header {
    padding-top: 70px; /* Compense la hauteur de la nav fixe */
}

nav::before {
    content: "Dorian Lapeyre";
    position: absolute;
    left: 10%;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

/* Sur mobile, on peut cacher le texte pour ne laisser que le burger */
@media (max-width: 480px) {
    nav::before { content: "DL"; }
}
/* ==========================================================================
   4. SECTIONS ET CARTES (CONSERVÉES)
   ========================================================================== */
section { padding: 80px 10%; border-top: 1px solid #222; }

.center-text { text-align: center; width: 100%; margin-bottom: 50px; font-size: 2.2rem; }
.center-text::after { content: ""; display: block; width: 60px; height: 4px; background: var(--accent); margin: 20px auto 0; }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; }
.card-link { text-decoration: none; color: inherit; display: block; flex: 1 1 300px; max-width: 350px; }

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: 0.3s ease;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover { transform: translateY(-8px); border-color: var(--accent); }

.card-logo { 
    height: 80px; 
    width: 100%; 
    display: flex; 
    justify-content: center; /* Change flex-start par center */
    align-items: center;     /* Assure un centrage vertical aussi */
    margin-bottom: 20px; 
}
.card-logo img { 
    max-height: 100%; 
    max-width: 150px; 
    object-fit: contain; 
    filter: none !important; /* Force la suppression du noir et blanc */
}

.card h3 { margin: 10px 0; font-size: 1.4rem; color: white; }
.card p { color: var(--text-dim); margin-bottom: 15px; }
.card span { color: white; font-weight: bold; font-size: 0.9rem; }

/* ==========================================================================
   5. MODALE DE CONTACT
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    margin: 15vh auto;
    padding: 40px;
    border-radius: 20px;
    width: 320px;
    position: relative;
    border: 1px solid var(--accent);
    text-align: center;
}

.close-button {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    color: var(--text-dim);
    cursor: pointer;
}

.contact-links { display: flex; flex-direction: column; gap: 15px; margin-top: 25px; }

.contact-item {
    text-decoration: none;
    color: white;
    padding: 12px;
    background: #252525;
    border-radius: 10px;
    transition: 0.3s;
    font-weight: 600;
}

.contact-item:hover { background: var(--accent); transform: scale(1.05); }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
footer {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid #222;
}
/* ==========================================================================
   7. STYLES POUR LES PAGES DE DÉTAILS (TIMELINE & MODERNE)
   ========================================================================== */


.detail-page {
    padding-top: 40px;
}

/* Header de page de détail - Meilleure disposition et contraste */
.detail-header {
    width: 100%;
    padding: 80px 10% 40px 10%;
    background: linear-gradient(to bottom, #050a0f, #0f0f0f);
    text-align: center;
    border-bottom: 1px solid #222;
    box-sizing: border-box;
}

/* Titre principal mieux mis en valeur */
.detail-header h1 {
    font-size: 3.2rem;
    color: #ffffff;
    margin: 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* Plus de contraste */
}

/* Sous-titre dans un petit badge élégant */
.detail-subtitle {
    display: inline-block;
    color: var(--accent);
    background: rgba(79, 70, 229, 0.1);
    padding: 6px 15px;
    border-radius: 8px;
    border: 1px solid rgba(79, 70, 229, 0.3);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

/* BOUTON RETOUR STYLE "CARTE" INTERACTIF */
.back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #e0e0e0; /* Pas de bleu par défaut */
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    background: var(--card-bg); /* Fond comme les cartes */
    border: 1px solid #333;
    border-radius: 12px;
    margin-top: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Animation fluide */
    cursor: pointer;
}

/* Interaction au survol (Hover) */
.back-link:hover {
    transform: scale(1.05); /* Léger grossissement */
    border-color: var(--accent); /* Contour bleuté */
    color: #ffffff;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.2); /* Halo bleuté */
}

/* Section "Mon Expérience" (le texte au-dessus de la timeline) */
.experience-intro {
    max-width: 800px;
    margin: 60px auto;
    text-align: center;
    padding: 0 20px;
}

.experience-intro h2 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
}

.experience-intro p {
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Structure de la Timeline */
.timeline-container {
    position: relative;
    padding-left: 40px;
    margin-top: 50px;
}

/* La ligne verticale à gauche */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

/* Le point sur la ligne */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px; /* Ajusté pour être sur la ligne */
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #0f0f0f;
    z-index: 2;
}

/* Encadrés modernes */
.content-box {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: 0.3s ease;
}

.content-box:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.1);
}

.timeline-date {
    display: block;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-box h3 {
    margin-top: 0;
    color: white;
}

.content-box p {
    color: var(--text-dim);
    margin-bottom: 0;
}
/* ==========================================================================
   8. CARTE SOBRE ET MARQUEURS NÉON (FIXED)
   ========================================================================== */

/* Rend le fond de carte sombre sans toucher aux marqueurs */
.leaflet-tile-pane {
    filter: grayscale(100%) invert(100%) brightness(90%) contrast(90%) !important;
}

/* PROTECTION : Empêche la décoloration des marqueurs et des popups */
.leaflet-marker-pane, 
.leaflet-shadow-pane, 
.leaflet-popup-pane,
.leaflet-marker-icon,
.neon-marker {
    filter: none !important; /* Annule toute inversion héritée */
}

#experience-map {
    height: 500px;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto;
    border-radius: 20px;
    border: 1.5px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    background-color: #050a0f;
    z-index: 1; /* S'assure que la map reste sous le menu */
}

/* Le point central bleu - Ultra contrasté */
.neon-marker {
    width: 14px !important;
    height: 14px !important;
    background-color: #4facfe !important; /* Bleu vif */
    border: 2px solid #ffffff !important;
    border-radius: 50%;
    box-shadow: 0 0 15px #4facfe, 0 0 5px #ffffff !important;
    display: block;
    position: relative;
}

/* Animation de pulsation */
.neon-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #4facfe;
    animation: pulsate 2s ease-out infinite;
}

@keyframes pulsate {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}
/* ==========================================================================
   9. SECTION INFOGRAPHIE (STYLISÉE)
   ========================================================================== */

.infographie-container {
    padding: 80px 10%; /* Marge généreuse de 10% sur les côtés */
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box; /* Garantit que le padding ne casse pas la largeur */
}

.info-block {
    margin-bottom: 40px; /* Espace entre chaque article */
    padding: 25px 30px;  /* Espace interne pour que le texte ne colle pas aux bords du bloc */
    transition: all 0.3s ease;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 10px 10px 0;
}

.info-block p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: justify;
    color: var(--text-dim); /* Utilise ta variable de couleur de texte si définie */
}

.info-block:hover {
    border-left-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px); /* Petit effet de glissement au survol */
}

.info-block h3 {
    color: #60a5fa;
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-accent {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 5px var(--accent));
}

.lead-text {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 25px;
    font-weight: 700;
}

/* Bloc Sauveteur & Expériences clés mis en avant */
.highlight-block {
    background: rgba(79, 172, 254, 0.07); /* Bleu léger pour rappeler ton thème */
    border-radius: 0 15px 15px 0;
    border-left: 4px solid var(--accent);
}

.infographie-container strong {
    color: white; /* Rend le gras bien visible sur fond sombre */
    font-weight: 600;
}

/* Adaptation pour les écrans mobiles */
@media (max-width: 768px) {
    .infographie-container {
        padding: 40px 6%; /* Réduction de la marge latérale sur mobile pour gagner de la place */
    }

    .info-block {
        padding: 20px 15px; /* Moins d'espace interne sur mobile */
        text-align: left;    /* On enlève souvent le justify sur mobile pour éviter les grands blancs */
    }

    .info-block h3 {
        font-size: 1.3rem;
        flex-wrap: wrap; /* Évite que le titre ne dépasse si l'émoji + texte est trop long */
    }

    .info-block p {
        text-align: left; /* Meilleure lisibilité sur petit écran */
    }
}
/* ==========================================================================
   10 SECTION PRÉSENTATION (POWERPOINT)
   ========================================================================== */
.slideshow-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.slideshow-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Ratio 16:9 */
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid rgba(96, 165, 250, 0.4);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.slideshow-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.presentation-hint {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 15px;
    font-style: italic;
}

/* Ajustement pour les petits écrans */
@media (max-width: 768px) {
    .slideshow-wrapper {
        padding: 10px;
    }
}
/* ==========================================================================
   11 SECTION RAPPORT PDF (PORTRAIT)
   ========================================================================== */
.pdf-wrapper {
    max-width: 800px; /* Plus étroit que le PPT car c'est du portrait */
    margin: 40px auto;
    padding: 0 20px;
}

.pdf-container {
    position: relative;
    width: 100%;
    /* On définit une hauteur max basée sur la largeur pour garder le format A4 */
    aspect-ratio: 1 / 1.41; 
    max-height: 90vh; /* Évite que le PDF ne soit trop long sur les grands écrans */
    background: #525659; /* Couleur grise standard des lecteurs PDF */
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.4);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.pdf-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Ajustement pour mobile : on réduit la hauteur pour que l'écran ne soit pas bloqué */
@media (max-width: 768px) {
    .pdf-container {
        height: 500px;
    }
}
/* ==========================================================================
   11 SECTION STACK TECHNIQUE
   ========================================================================== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.stack-item {
    background: var(--card-bg);
    border: 1px solid #333;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stack-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.05);
}

.stack-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    /* Petit effet de lueur sur l'icône */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.stack-item h3 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 8px;
}

.stack-item p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin: 0;
}

/* Optimisation pour mobile */
@media (max-width: 600px) {
    .stack-grid {
        grid-template-columns: 1fr 1fr; /* Deux colonnes sur mobile */
    }
}
/* ==========================================================================
   DASHBOARD MONITORING OCÉANO (DESIGN GLASSMORPHISM)
   ========================================================================== */
/* --- DASHBOARD MODERNE --- */
#real-time-data {
    background: radial-gradient(circle at top right, #0a192f, #050a0f);
    padding: 80px 10%;
}

.dashboard-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 25px;
    width: 100%;
    max-width: 450px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(79, 172, 254, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4facfe;
    border-radius: 50%;
    box-shadow: 0 0 10px #4facfe;
}

.pulse {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 18px;
    border-radius: 16px;
    border-left: 2px solid #4facfe;
}

.stat-box.full-width { grid-column: span 2; border-left: 2px solid #00f2fe; }

.label {
    display: block;
    font-size: 0.7rem;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.main-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.main-val small { font-size: 0.9rem; color: #4facfe; }

.sub-val, .mini-grid {
    font-size: 0.85rem;
    color: #a8b2d1;
    margin-top: 5px;
}

.mini-grid {
    display: flex;
    justify-content: space-between;
}

/* Nouveau code */

/* ==========================================================================
   4. CARTES ET GRILLES (EXPÉRIENCES)
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 10%;
}

.card-link { text-decoration: none; color: inherit; }

.card {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: #60a5fa;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.2);
}

.card-logo img {
    height: 80px;
    margin-bottom: 20px;
    filter: grayscale(1) brightness(1.2);
    transition: 0.3s;
}

.card:hover .card-logo img { filter: grayscale(0); }



/* ==========================================================================
   6. MONITORING OCÉANO (GLASSMORPHISM)
   ========================================================================== */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 10%;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 10px;
}

.pulse { animation: pulse-dot 2s infinite; }
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.stat-box { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 15px; text-align: center; }
.full-width { grid-column: span 2; }
.main-val { font-size: 1.6rem; font-weight: 700; color: #60a5fa; }
.label { font-size: 0.7rem; text-transform: uppercase; color: #a0a0a0; }

/* ==========================================================================
   7. STACK TECHNIQUE
   ========================================================================== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px 10%;
}

.stack-item {
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid transparent;
}

.stack-item:hover { border-color: #4facfe; background: rgba(79, 172, 254, 0.05); }

/* Centrage global des titres */
.center-text { text-align: center; margin-top: 60px; font-size: 2rem; color: #fff; }
.mini-grid strong { color: #fff; }


/* ==========================================================================
   12. AGENCEMENT PCSI : VERSION FINALE HARMONISÉE
   ========================================================================== */

.subjects-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important; /* On désactive le gap pour éviter les bugs d'espacement */
    margin: 10px 0 !important;
    width: 100% !important;
    align-items: flex-start !important; 
}

.toggle-subject-btn {
    box-sizing: border-box !important;
    flex: none !important; 
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: white !important;
    
    /* Largeur fixe et espacement régulier */
    width: 90% !important; 
    max-width: 600px;
    margin-bottom: 20px !important; /* L'espacement de 20px est ici ! */
    
    min-height: 60px !important;  
    padding: 15px 25px !important;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Reset pour le tout dernier bouton pour ne pas doubler avec le margin du container */
.toggle-subject-btn:last-of-type {
    margin-bottom: 0 !important;
}

.toggle-subject-btn:hover {
    background: #2563eb !important;
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* LA CARTE : Correction de l'affichage */
.subject-card {
    display: none;
    width: 95% !important;
    max-width: 1200px;
    background: rgba(26, 26, 26, 0.98) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    /* La carte s'insère dans le flux sans casser le rythme */
    margin: -10px 0 25px 0 !important; 
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    z-index: 50;
}

.subject-card.active {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
}

/* --- DESIGN INTERNE (CONSERVÉ) --- */

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 70px !important; 
}

.subject-header h3 { font-size: 1.8rem; color: #fff; margin: 0; }

.subject-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.subject-subtitle {
    color: #60a5fa;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.subject-info ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px 30px;
    list-style: none;
    padding: 0;
}

.subject-info li {
    color: #ffffff;
    position: relative;
    padding-left: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.subject-info li::before {
    content: "";
    position: absolute;
    left: 0; top: 8px;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: white !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s ease;
    white-space: nowrap;
    margin-left: 20px;
}

.close-section-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.close-section-btn:hover { background: #ef4444; }

.download-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #2563eb;
    color: white !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-link-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.4);
}

/* ==========================================================================
   13. SECTION MON EXPÉRIENCE (REMODÉLISÉE - VERSION JUSTIFIÉE)
   ========================================================================== */

/* Centrage du conteneur global */
.experience-intro .subject-info {
    max-width: 900px;
    margin: 0 auto;
}

/* Titres en bleu et centrés */
.experience-intro .subject-subtitle {
    color: #4facfe; 
    font-size: 1.5rem;
    text-align: center; /* On garde le titre au centre */
    margin-top: 40px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    font-weight: 700;
}

/* Texte justifié pour les paragraphes */
.experience-intro p {
    text-align: justify; /* MISE EN PAGE JUSTIFIÉE */
    text-justify: inter-word; /* Améliore la répartition des espaces */
    hyphens: auto; /* Coupe les mots si nécessaire pour éviter les trous (optionnel) */
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-dim);
}

/* Blocs des points clés */
.experience-intro ul {
    list-style: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-intro li {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(79, 172, 254, 0.1);
    transition: all 0.3s ease;
}

.experience-intro li:hover {
    border-color: rgba(79, 172, 254, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

/* Titres des points clés (Centrés ou à gauche selon votre préférence) */
.experience-intro li strong {
    color: #4facfe;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-align: center; /* Garde le petit titre du bloc centré pour le style */
}

/* Désactive les puces héritées */
.experience-intro li::before {
    display: none !important;
}

/* Responsive : On enlève la justification sur petit mobile pour éviter les bugs d'affichage */
@media (max-width: 480px) {
    .experience-intro p {
        text-align: left; 
    }
}


/* ==========================================================================
   13. SPÉCIFIQUE PAGE DÉTAIL MASTER (NOUVEAU)
   ========================================================================== */

/* Conteneur principal de la page Master */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Grille pour les images de modélisation 3D */
.modelling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Style des encadrés d'images */
.modelling-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 10px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition: border-color 0.3s ease;
}

.image-wrapper:hover {
    border-color: var(--accent);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Légendes des images */
.caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Zone de téléchargement des PDF */
.download-zone {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    border: 1px solid var(--accent);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-download:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(96, 165, 250, 0.3);
}

/* Texte de description justifié pour le Master */
.description-text p {
    text-align: justify;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Style spécifique pour le lien de l'université */
.university-tag {
    margin: 15px 0;
    color: var(--text-dim);
}

.university-tag a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.university-tag a:hover {
    text-decoration: underline;
}

/* Responsive pour la zone de téléchargement */
@media (max-width: 600px) {
    .download-zone {
        flex-direction: column;
        align-items: center;
    }
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}
