/* =========================================================
   PORTFOLIO BADA Fernando Evrard
   Palette : Bleu tech (#0077ff) + Marron (#8b5e3c)
   Thème clair + sombre avec bascule
   ========================================================= */

/* ------------------- VARIABLES GLOBALES ------------------- */
:root {
    /* Couleurs principales */
    --blue-tech: #0077ff;
    --blue-tech-dark: #0055cc;
    --brown: #8b5e3c;
    --brown-light: #b07a52;
    --accent-gradient: linear-gradient(135deg, #0077ff 0%, #8b5e3c 100%);

    /* Thème clair (par défaut) */
    --bg: #f7f9fc;
    --bg-alt: #ffffff;
    --text: #1a1a2e;
    --text-muted: #555;
    --card-bg: #ffffff;
    --border: #e0e6ef;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.85);

    /* Divers */
    --radius: 16px;
    --transition: all 0.35s ease;
}

/* ------------------- THÈME SOMBRE ------------------- */
body.dark {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --text: #e6edf3;
    --text-muted: #9aa7b4;
    --card-bg: #1c232c;
    --border: #2b3441;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(13, 17, 23, 0.85);
}

/* ------------------- RESET ------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Défilement fluide */
    scroll-padding-top: 80px; /* Compense la navbar fixe */
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.accent { color: var(--blue-tech); }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled { box-shadow: var(--shadow); }

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.logo .accent { color: var(--brown); }

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--blue-tech); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boutons langue et thème */
.lang-btn, .theme-btn, .menu-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.lang-btn:hover, .theme-btn:hover {
    border-color: var(--blue-tech);
    color: var(--blue-tech);
    transform: translateY(-2px);
}

.menu-toggle { display: none; font-size: 1.1rem; }

/* =========================================================
   SECTION HERO (ACCUEIL)
   ========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 60px;
    position: relative;
    /* Léger dégradé lumineux en fond */
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 119, 255, 0.12), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 94, 60, 0.12), transparent 50%),
        var(--bg);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

/* Texte Hero */
.hero-greeting {
    font-size: 1.1rem;
    color: var(--brown-light);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hero-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--blue-tech);
    font-weight: 600;
    min-height: 2em;
    margin-bottom: 20px;
}

/* Curseur clignotant du typing */
.typing::after {
    content: '|';
    animation: blink 0.9s infinite;
    color: var(--brown);
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-desc {
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

/* Boutons génériques */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.35);
    /* Effet clignotant doux */
    animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(0, 119, 255, 0.35); }
    50%      { box-shadow: 0 6px 30px rgba(139, 94, 60, 0.55); }
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 119, 255, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--blue-tech);
}
.btn-outline:hover {
    background: var(--blue-tech);
    color: #fff;
    transform: translateY(-3px);
}

.btn-full { width: 100%; justify-content: center; }

/* Réseaux sociaux hero */
.social-hero {
    display: flex;
    gap: 14px;
}
.social-hero a {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.social-hero a:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-4px) rotate(8deg);
    border-color: transparent;
}

/* Photo de profil ronde */
.hero-photo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.photo-ring {
    position: absolute;
    width: 340px; height: 340px;
    border-radius: 50%;
    background: var(--accent-gradient);
    /* Animation clignotante lumineuse */
    animation: ringPulse 3s ease-in-out infinite;
}
@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; filter: blur(0px); }
    50%      { transform: scale(1.06); opacity: 0.6; filter: blur(6px); }
}

.profile-img {
    position: relative;
    width: 300px; height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--bg);
    z-index: 2;
    box-shadow: var(--shadow);
}

/* Flèche scroll */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--blue-tech);
    font-size: 1.4rem;
    animation: bounceDown 1.8s infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 12px); }
}

/* =========================================================
   SECTIONS GÉNÉRIQUES
   ========================================================= */
.section {
    padding: 90px 5%;
    background: var(--bg);
}
.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    text-align: center;
    font-weight: 700;
}

.underline {
    width: 80px; height: 4px;
    margin: 12px auto 50px;
    background: var(--accent-gradient);
    border-radius: 4px;
    /* Effet clignotant doux */
    animation: underlineGlow 2.5s ease-in-out infinite;
}
@keyframes underlineGlow {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* =========================================================
   À PROPOS
   ========================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 50px;
    align-items: start;
}
.about-text p { margin-bottom: 18px; color: var(--text-muted); }

.about-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 20px;
    color: var(--blue-tech);
}
.timeline li {
    padding: 14px 18px;
    background: var(--card-bg);
    border-left: 4px solid var(--brown);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.timeline li:hover {
    transform: translateX(6px);
    border-left-color: var(--blue-tech);
}
.timeline .year {
    display: block;
    font-size: 0.8rem;
    color: var(--brown-light);
    font-weight: 600;
    margin-bottom: 4px;
}

/* =========================================================
   COMPÉTENCES
   ========================================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--card-bg);
    padding: 34px 26px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    /* Bande lumineuse animée en haut */
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 4px;
    background: var(--accent-gradient);
    animation: slideLight 3s linear infinite;
}
@keyframes slideLight {
    0% { left: -100%; }
    100% { left: 100%; }
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--blue-tech);
}

.skill-icon {
    font-size: 2.4rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
}

.skill-card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.skill-card p { font-size: 0.9rem; color: var(--text-muted); }

/* =========================================================
   PROJETS
   ========================================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--brown);
}

.project-img { height: 200px; overflow: hidden; }
.project-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-img img { transform: scale(1.1); }

.project-info { padding: 22px; }
.project-info h3 { margin-bottom: 10px; font-size: 1.15rem; }
.project-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.project-tags span {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 119, 255, 0.12);
    color: var(--blue-tech);
    font-weight: 600;
}
body.dark .project-tags span {
    background: rgba(0, 119, 255, 0.2);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--brown);
    transition: var(--transition);
}
.project-link:hover { color: var(--blue-tech); gap: 12px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
}

.contact-info h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 12px;
    font-size: 1.4rem;
}
.contact-info > p { color: var(--text-muted); margin-bottom: 28px; }

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.contact-item:hover {
    transform: translateX(6px);
    border-color: var(--blue-tech);
}
.contact-item i {
    font-size: 1.3rem;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    flex-shrink: 0;
}
.contact-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}
.contact-item strong { font-size: 0.95rem; }

/* WhatsApp : petit effet de pulsation */
.whatsapp-item i {
    background: linear-gradient(135deg, #25d366, #128c7e);
    animation: waPulse 2s ease-in-out infinite;
}
@keyframes waPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    50%      { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
}

.contact-socials {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.contact-socials a {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    transition: var(--transition);
}
.contact-socials a:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-4px);
}

/* Formulaire */
.contact-form {
    background: var(--card-bg);
    padding: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue-tech);
    box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.15);
}

.form-status {
    margin-top: 14px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #25d366;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 26px 5%;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================================
   BOUTON RETOUR EN HAUT
   ========================================================= */
.back-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
    z-index: 999;
}
.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-top:hover { transform: translateY(-4px) scale(1.08); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-buttons, .social-hero { justify-content: center; }
    .hero-photo { order: -1; }
    .photo-ring { width: 260px; height: 260px; }
    .profile-img { width: 230px; height: 230px; }

    .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Menu mobile */
    .nav-menu {
        position: fixed;
        top: 70px; right: -100%;
        flex-direction: column;
        background: var(--bg-alt);
        width: 240px;
        height: calc(100vh - 70px);
        padding: 30px;
        gap: 20px;
        border-left: 1px solid var(--border);
        transition: right 0.4s ease;
    }
    .nav-menu.open { right: 0; }

    .menu-toggle { display: block; }
    .lang-btn span { display: inline; }
}