/* Variables CSS - Thème Violet Moderne */
:root {
    --primary-color: #d8b4fe; /* Violet clair lumineux pour les titres sur fond sombre */
    --accent-color: #a855f7;  /* Violet vif/néon pour les boutons et effets */
    --bg-color: #0b0f19;      /* Couleur de secours sombre */
    --surface-color: rgba(30, 20, 50, 0.4); /* Fond des cartes style "verre fumé" */
    --text-color: #f3f4f6;    /* Blanc cassé pour un texte très lisible */
    --text-light: #9ca3af;    /* Gris clair pour les descriptions */
    --border-color: rgba(168, 85, 247, 0.2); /* Bordure violette semi-transparente */
}

/* Base et défilement fluide */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0f0c29 0%, #1e133c 50%, #0d081b 100%); /* Dégradé sombre profond */
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
}

/* Barre de navigation */
header {
    background-color: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(12px); /* Effet verre dépoli très moderne */
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Ombre plus marquée pour le dark mode */
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

/* Structure des sections */
section {
    padding: 120px 20px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* Section Accueil avec animation d'entrée */
.hero {
    display: flex;
    max-width: 100%;
    margin: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding-top: 0;
    /* L'animation se déclenche au chargement de la page */
    animation: fadeIn 1.2s ease-out forwards;
    
    /* Nouvelle image de fond (serveurs) avec filtre superposé pour garder le thème sombre/violet */
    background: linear-gradient(rgba(11, 15, 25, 0.85), rgba(30, 19, 60, 0.85)), url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

/* Bouton principal */
.btn {
    background-color: var(--accent-color);
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn:hover {
    background-color: var(--primary-color);
    color: #111; /* Texte foncé sur bouton clair au survol */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

/* Bouton LinkedIn */
.linkedin-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* --- SECTIONS A PROPOS, SIO & VEILLE --- */
.about-content {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px); /* L'effet verre fumé */
}

/* --- PRÉSENTATION & SKILLS --- */
.presentation-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.presentation-text {
    flex: 1; /* S'équilibre avec la colonne de droite */
}

.presentation-skills-extended {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-category {
    background-color: rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-color);
    transition: background 0.3s, transform 0.3s;
}

.skill-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.skill-pill img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Nouvelles cartes BTS SIO */
.sio-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.sio-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sio-card h4 {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.sisr-highlight {
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15); /* Légère lueur violette */
    transform: scale(1.02); /* Met la carte légèrement en avant */
}

/* --- TIMELINE (Parcours Scolaire) --- */
.timeline {
    border-left: 3px solid var(--accent-color);
    margin: 0 auto;
    max-width: 800px;
    padding-left: 30px;
    position: relative;
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--surface-color);
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    left: -43px; /* Aligne le point sur la ligne */
    top: 5px;
    animation: pulseGlow 2s infinite;
}

/* --- LE DESIGN DES CARTES (CASES) --- */
.cards-container {
    display: grid;
    /* Rend les cartes responsives : elles s'adaptent à la taille de l'écran */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: var(--surface-color);
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

/* L'effet au survol de la souris */
.card:hover {
    transform: translateY(-15px); /* Fait monter la carte */
    box-shadow: 0 20px 30px -5px rgba(139, 92, 246, 0.25); /* Crée une lueur violette en dessous */
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Bouton secondaire pour les cartes */
.btn-outline {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Responsive pour mobile (téléphones) */
@media (max-width: 768px) {
    .presentation-container {
        flex-direction: column;
    }
    .hero-buttons {
        flex-direction: column;
    }
}

/* Pied de page */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #0d081b;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    margin-top: 50px;
}

/* --- ANIMATIONS CLÉS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* Classes d'animation au défilement (gérées par JavaScript) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) !important;
}

/* --- ANIMATIONS D'ARRIÈRE-PLAN (Fils Réseau) --- */
.cyber-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1; /* Les place tout au fond */
    pointer-events: none; /* Empêche les fils de bloquer les clics */
    overflow: hidden;
}

.cyber-line {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(168, 85, 247, 0.1); /* Ligne violette très discrète */
}

/* Positionnement des 4 lignes sur les côtés */
.cyber-line.left-1 { left: 5%; }
.cyber-line.left-2 { left: 15%; }
.cyber-line.right-1 { right: 5%; }
.cyber-line.right-2 { right: 15%; }

/* Le "paquet" de données lumineux qui voyage */
.cyber-packet {
    position: absolute;
    width: 3px;
    height: 60px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    left: -1px; /* Centre la lumière sur la ligne */
    border-radius: 50px;
    animation: dataTravel linear infinite;
}

/* Vitesses et délais différents pour un rendu naturel et aléatoire */
.cyber-line.left-1 .cyber-packet { animation-duration: 5s; animation-delay: 1s; }
.cyber-line.left-2 .cyber-packet { animation-duration: 8s; animation-delay: 4s; }
.cyber-line.right-1 .cyber-packet { animation-duration: 6s; animation-delay: 0.5s; }
.cyber-line.right-2 .cyber-packet { animation-duration: 7s; animation-delay: 2.5s; height: 90px; }

@keyframes dataTravel {
    0% { top: -100px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 110vh; opacity: 0; }
}
