/* ============================================
   MAIN.CSS — Base globale
   ============================================ */

/* --- VARIABLES THÈME SOMBRE (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);
}

/* --- VARIABLES THÈME 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);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, 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;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

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

/* --- NAVIGATION --- */
nav {
    position: sticky;
    background: var(--bg-nav);
    padding: 1rem 5%;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

.nav-logo-img {
    height: 70px;
    width: auto;
    margin-right: 15px;
}

.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;
}

nav ul li a {
    font-size: 0.9rem;
    padding: 8px 12px;
}

nav ul li a.active {
    color: var(--primary);
    font-weight: 700;
}

/* --- BOUTON THÈME --- */
.theme-btn {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.theme-btn:hover {
    transform: rotate(15deg);
    color: var(--primary);
}

/* --- BOUTONS --- */
.btn-primary {
    position: relative; /* Indispensable pour placer l'icône par rapport au bouton */
    background: var(--primary);
    color: white !important;
    padding: 16px 30px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Le texte sera parfaitement au milieu */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.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: 16px 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-secondary:hover {
    background: var(--secondary-btn-hover, rgba(59, 130, 246, 0.08));
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px var(--primary-glow);
}

/* Hover adapté à chaque thème */
:root {
    --secondary-btn-hover: rgba(59, 130, 246, 0.1);
}
.light-mode {
    --secondary-btn-hover: rgba(59, 130, 246, 0.08);
}
.btn-icon {
    width: 100px;  /* Ajuste la taille selon tes besoins */
    height: 100px;
    object-fit: contain; /* Garde les proportions de l'image */
    /* Optionnel : arrondit un peu les angles de l'image */
}
.btn-cv {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: box-shadow 0.3s ease;
}

.btn-cv:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* --- BOUTONS HERO --- */
.hero-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%; /* Changez 600% par 100% */
    max-width: 500px;
    margin: 30px auto 0;
    padding: 0 20px; /* Ajoute une sécurité sur les bords */
}
.hero-btns .btn-primary,
.hero-btns .btn-secondary {
    width: 100%; /* Changez 150% par 100% pour qu'ils remplissent le conteneur */
    padding: 25px; /* Réduisez le padding (40px c'est énorme sur mobile) */
    font-size: 1.2rem; /* Réduisez la police (2rem est trop gros pour un bouton mobile) */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* --- ANTI-SÉLECTION SUR ÉLÉMENTS INTERACTIFS --- */
.btn-primary, .btn-secondary, .theme-btn, .nav-container a {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* --- BOUTON FLOTTANT RETOUR EN HAUT --- */
.back-btn-floating {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary);
    color: white !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 2000;
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    
}

.back-btn-floating.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-btn-floating:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}
