/* =============================================
   STYLE.CSS — CV de Tossad Mezzane
   HTML/CSS natif + effets visuels
   ============================================= */

/* --- Reset & Base --- */
body {
    background: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

/* --- Scrollbar personnalisée --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0A0A0A;
}
::-webkit-scrollbar-thumb {
    background: #6366F1;
    border-radius: 3px;
}

/* --- Glass morphisme --- */
.glass {
    background: rgba(22, 22, 22, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Texte dégradé --- */
.text-gradient {
    background: linear-gradient(to right, #fff, #fff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Fond hero --- */
.hero-bg {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.65), #000);
}

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

/* --- Apparition au scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Flottement --- */
.float {
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* --- Pulsation lumineuse (photo profil) --- */
.pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.25); }
    50% { box-shadow: 0 0 45px rgba(99, 102, 241, 0.55); }
}

/* --- Effet shimmer (carte À propos) --- */
.shimmer {
    position: relative;
    overflow: hidden;
}
.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    animation: shimmer 4s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =============================================
   COMPÉTENCES — Barres de progression
   ============================================= */
.skill-progress {
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================
   COMPÉTENCES — Étoiles
   ============================================= */
.star {
    color: #525252;
    transition: color 0.4s ease, transform 0.3s ease;
}
.star.filled {
    color: #FBBF24;
}

/* =============================================
   FORMATION — Accordéon
   ============================================= */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.accordion-content.open {
    max-height: 250px;
}
.accordion-arrow {
    transition: transform 0.3s ease;
}
.accordion-arrow.rotated {
    transform: rotate(180deg);
}

/* =============================================
   NAVIGATION
   ============================================= */

/* --- Lien actif avec underline --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #6366F1;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* --- Menu mobile --- */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu.open {
    transform: translateX(0);
}

/* =============================================
   FORMULAIRE DE CONTACT
   ============================================= */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}
.form-input.error {
    border-color: #F87171;
}
.error-msg {
    color: #F87171;
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}
.error-msg.show {
    display: block;
}

/* =============================================
   TAGS TECHNOLOGIES
   ============================================= */
.tech-tag {
    transition: all 0.3s ease;
}
.tech-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

/* =============================================
   CARTES PROJETS (React)
   ============================================= */
.project-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s ease,
                border-color 0.5s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

/* =============================================
   BOUTON SCROLL TOP
   ============================================= */
#scroll-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#scroll-top.show {
    opacity: 1;
    pointer-events: auto;
}