/* =====================================================
   BASE GLOBALE
   Définit l’apparence générale de la page
   ===================================================== */

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;

    /* Fond dégradé animé pour donner une identité visuelle moderne */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-size: 300% 300%;
    animation: bgMove 12s ease infinite;
}

/* =====================================================
   CONTENEUR PRINCIPAL
   Centre le contenu du CV à l’écran
   ===================================================== */

main {
    max-width: 950px;
    margin: 60px auto;
    padding: 0 20px;
}

/* =====================================================
   CARTES (HEADER + SECTIONS)
   Effet "glassmorphism" avec ombre et animation
   ===================================================== */

header,
section {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 18px;

    /* Effet de profondeur */
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);

    margin-bottom: 30px;

    /* Nécessaire pour les pseudo-éléments (shine effect) */
    position: relative;
    overflow: hidden;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Légère élévation des cartes au survol */
header:hover,
section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 55px rgba(0,0,0,0.35);
}

/* =====================================================
   EFFET LUMINEUX AU SURVOL (SHINE EFFECT)
   Simule un reflet de lumière sur les cartes
   ===================================================== */

header::before,
section::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;

    width: 50%;
    height: 100%;

    /* Dégradé clair pour simuler une lumière */
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255,255,255,0.35),
        transparent
    );

    transform: skewX(-20deg);
    transition: 0.6s;
}

/* Animation du reflet lors du survol */
header:hover::before,
section:hover::before {
    left: 130%;
}

/* =====================================================
   TITRES DES SECTIONS
   ===================================================== */

h2 {
    border-left: 6px solid #4e73df;
    padding-left: 12px;
}

/* =====================================================
   HERO (EN-TÊTE PRINCIPAL)
   Organisation horizontale du nom et de la photo
   ===================================================== */

.hero {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Photo de profil stylisée */
.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;

    border: 4px solid rgba(255,255,255,0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    transition: transform 0.3s ease;
}

/* Effet léger de zoom au survol */
.profile-pic:hover {
    transform: scale(1.05);
}

/* =====================================================
   ANIMATIONS AU SCROLL
   Les sections apparaissent progressivement
   ===================================================== */

section {
    opacity: 0;
    transform: translateY(40px);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* =====================================================
   MODE SOMBRE
   ===================================================== */

.dark-mode {
    background: linear-gradient(135deg, #0f0f0f, #1c1c1c, #2b2b2b);
}

.dark-mode header,
.dark-mode section {
    background: rgba(30,30,30,0.85);
    color: white;
}

/* =====================================================
   BARRE LATÉRALE FLOTTANTE
   Accès rapide aux liens externes
   ===================================================== */

.side-links {
    position: fixed;
    top: 40%;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-links a {
    background: #4e73df;
    color: white;
    padding: 10px;
    border-radius: 50%;
}

/* =====================================================
   ANIMATIONS CSS
   ===================================================== */

@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =====================================================
   RESPONSIVE DESIGN
   Adaptation pour petits écrans
   ===================================================== */

@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   CANVAS DE FOND (ANIMATION PARTICULES)
   ===================================================== */

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* =====================================================
   BOUTON MODE SOMBRE
   ===================================================== */

.theme-btn {
    position: absolute;
    top: 20px;
    right: 20px;

    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;

    background: linear-gradient(135deg, #4e73df, #224abe);
    color: white;
    font-size: 18px;

    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

/* Animation du bouton au survol */
.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
}
