/* --- CONFIGURATION DES COULEURS (Dark mode par défaut) --- */
:root {
    --bg-body: #0f172a;
    --bg-nav: rgba(15, 23, 42, 0.95);
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.6);
    --secondary-btn: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --- MODE CLAIR --- */
.light-mode {
    --bg-body: #f1f5f9;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-sub: #64748b;
    --primary-glow: rgba(59, 130, 246, 0.3);
    --secondary-btn: rgba(15, 23, 42, 0.05);
    --card-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* --- BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    transition: background-color 0.4s ease, color 0.4s ease;
    line-height: 1.6;
}

a, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* --- NAVIGATION --- */
nav { 
    background: var(--bg-nav); 
    padding: 1rem 5%; 
    position: sticky; top: 0; z-index: 1000; 
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: auto; }
.nav-logo-img { height: 38px; margin-right: 12px; }
.logo { display: flex; align-items: center; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px; }
nav ul { display: flex; list-style: none; align-items: center; gap: 24px; }
.theme-btn { background: none; border: none; color: var(--text-main); cursor: pointer; font-size: 1.2rem; transition: transform 0.3s ease; }
.theme-btn:hover { transform: rotate(15deg); color: var(--primary); }

/* --- HERO --- */
.hero { padding: 120px 20px; text-align: center; max-width: 1000px; margin: auto; }
.badge { 
    background: rgba(59, 130, 246, 0.15); 
    color: #60a5fa; 
    padding: 6px 16px; 
    border-radius: 99px; 
    font-weight: 700; 
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); margin: 24px 0; font-weight: 900; letter-spacing: -2px; }
.subtitle { font-size: 1.5rem; color: var(--text-sub); margin-bottom: 24px; font-weight: 500; }
.description { max-width: 650px; margin: 0 auto 48px; color: var(--text-sub); font-size: 1.15rem; }

/* --- BOUTONS AVEC AURA INTENSE --- */
.hero-btns { display: flex; justify-content: center; gap: 24px; }

.btn-primary { 
    background: var(--primary); 
    color: white !important; 
    padding: 18px 36px; 
    border-radius: 14px; 
    font-weight: 700; 
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px var(--primary-glow), 0 0 30px 2px var(--primary-glow);
}

.btn-secondary { 
    background: var(--secondary-btn); 
    color: var(--text-main) !important;
    padding: 18px 36px; 
    border-radius: 14px; 
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.btn-cv { 
    background: var(--primary); 
    color: white !important; 
    padding: 10px 20px; 
    border-radius: 10px; 
    font-weight: 600;
}
.btn-cv:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* --- SKILLS GRID --- */
.skills-preview { padding: 100px 20px; text-align: center; }
.skills-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 32px; margin-top: 56px; max-width: 1200px; margin-left: auto; margin-right: auto;
}

.skill-item { 
    background: var(--bg-card); 
    padding: 48px 32px; 
    border-radius: 24px; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.03);
    display: block;
    box-shadow: var(--card-shadow);
}

.skill-item:hover { 
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4), 0 0 25px 0 var(--primary-glow);
}

.skill-item i { font-size: 2.8rem; color: var(--primary); margin-bottom: 24px; display: block; }
.skill-item span { font-weight: 700; font-size: 1.1rem; }

/* --- PAGE COMPÉTENCES DÉTAILLÉES --- */
.competence-detail { padding: 60px 5%; max-width: 900px; margin: auto; }
.comp-section { 
    padding: 60px 40px; 
    background: var(--bg-card); 
    border-radius: 20px; 
    margin-bottom: 40px; 
    scroll-margin-top: 100px;
    box-shadow: var(--card-shadow);
}
.main-icon { font-size: 3rem; color: var(--primary); margin-bottom: 20px; }
.comp-tags { display: flex; gap: 10px; margin-top: 20px; }
.comp-tags span { background: rgba(59, 130, 246, 0.1); color: var(--primary); padding: 5px 12px; border-radius: 15px; font-size: 0.8rem; font-weight: bold; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-btns { flex-direction: column; align-items: stretch; }
    nav ul { gap: 12px; }
}

model-viewer {
    --poster-color: transparent;
    outline: none;
}




/* --- SECTION ANIMATION POCKET BIKE (VERSION FINALE) --- */

/* La Moto */
.skill-icon {
    height: 3.2rem; /* Taille ajustée pour le titre */
    width: auto;
    display: inline-block; /* Permet l'alignement et la rotation */
    filter: drop-shadow(0 0 8px var(--primary-glow));
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0;
}

/* --- FIX FINAL CLÉ POCKET --- */

.wrench-icon {
    font-size: 1.4rem; 
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    /* On la descend de 6px de base pour l'aligner au texte */
    transform: translateY(8px); 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* SYNCRO AU SURVOL */
.skill-item:hover .wrench-icon {
    /* TRÈS IMPORTANT : On garde le translateY(6px) pour qu'elle reste basse, 
       et on ajoute scale et rotate */
    transform: translateY(8px) scale(1.3) rotate(25deg) !important;
    color: var(--text-main) !important;
}

.skill-item:hover .skill-icon {
    /* La moto s'anime aussi */
    transform: scale(1.1) rotate(-10deg) !important;
}