/* 1. VARIABLES & RESET */
:root {
    --bg-color: #050505;
    --card-bg: #0a0a0a;
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #ededed;
    --text-muted: #888;
    --accent-color: #CC6905; /* Ton Orange Principal */
    --accent-rgb: 204, 105, 5; /* Version RGB pour les transparences */
    --spacing: 80px;
    --font-main: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;

    /* GESTION DU FOND */
    background-image:
            linear-gradient(rgba(5, 5, 5, 0.70), rgba(5, 5, 5, 0.95)),
            url("./img/wallhaven-6kyo56.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* GESTION GRAIN */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.07;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 9999;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
h2 { color: var(--accent-color); }

/*  2. Scrollbar et Selection */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover { background: #555; }

::selection {
	
  /* CORRECTION : Orange avec transparence */
    background: rgba(204, 105, 5, 0.3);
    color: #fff;
}

/* 3. LAYOUT */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 4. NAVIGATION */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin: 0 auto;
    max-width: 1000px;
    position: sticky;
    top: 20px;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease, border 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-top: 15px;
    padding-bottom: 15px;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    padding: 12px 24px;
    border-radius: 50px;
    position: static;
}

.logo { font-weight: 700; font-size: 1.1rem; color: #fff; flex-shrink: 0; }

.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--accent-color); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.location-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 20px;
}

/* Bouton Contact Nav */
.btn-nav-contact {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.btn-nav-contact:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
.btn-nav-contact svg { transition: transform 0.3s ease; }
.btn-nav-contact:hover svg { transform: translate(2px, -2px); }

/* Bouton Retour (Gallery/Project) */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: static;
    text-decoration: none;
    transition: color 0.3s;
}
.back-link:hover { color: #fff; }

/* 5. HERO SECTION */
.hero {
    padding-top: 80px;
    margin-bottom: var(--spacing);
}

.hero-text { margin-bottom: 2rem; }
.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 600;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight { -webkit-text-fill-color: var(--accent-color); }

.greeting {
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-family: monospace;
}

/* Status Alert */
.status-alert {
    /* CORRECTION : Fond Orange léger */
    background: rgba(204, 105, 5, 0.05);
    border: 1px solid rgba(204, 105, 5, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}
.status-dot1 {
    width: 8px; height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    animation: pulse 2s infinite;
}

/*  6. ABOUT SECTION */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}
.about-text p { margin-bottom: 1.5rem; color: #ccc; }

.profile-pic {
    width: 100%;
    border-radius: 12px;
    filter: grayscale(100%);
    transition: 0.5s;
    object-fit: cover;
	margin-bottom: 80px;
}
.profile-pic:hover { filter: grayscale(0%); }

.btn-primary {
    display: inline-block;
    background: var(--text-main);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
}
.btn-primary:hover { background: var(--accent-color); }

/* =========================================
   7. SKILLS, TOOLS & BENTO CARDS
   ========================================= */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: var(--spacing);
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.2s ease;
    will-change: transform;
}
.card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.large-card h3 { margin-bottom: 10px; font-size: 1.4rem; color: #fff; }
.large-card p { color: var(--text-muted); font-size: 0.95rem; }

.card-visual {
    height: 150px;
    width: 100%;
    border-radius: 12px;
    margin-top: 25px;
    position: relative;
}
.visual-blue { background: linear-gradient(180deg, rgba(30, 58, 138, 0.4), rgba(0,0,0,0)); border: 1px solid rgba(30, 58, 138, 0.3); }
.visual-purple { background: linear-gradient(180deg, rgba(88, 28, 135, 0.4), rgba(0,0,0,0)); border: 1px solid rgba(88, 28, 135, 0.3); }

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.skill-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 16px;
    transition: background 0.2s ease;
    will-change: transform;
}
.skill-icon { font-size: 1.8rem; margin-bottom: 15px; }
.skill-card h4 { color: #fff; margin-bottom: 8px; }
.skill-card p { font-size: 0.85rem; color: var(--text-muted); }

/* Tools */
.tools-section { margin-top: 2rem; }
.tools-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tool-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #ccc;
    transition: 0.2s;
    cursor: default;
}
.tool-item:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #555; }

/* =========================================
   8. PROJECTS SECTION (HOME & GALLERY)
   ========================================= */
.projects-section {
    margin-bottom: var(--spacing);
    margin-top: 5rem;
}
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; font-weight: 500; }

.projects-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Gallery Page Specifics */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 100px;
}
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}
.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}
.filter-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(204, 105, 5, 0.8);
}

/* Project Cards */
.project-card { padding: 0; }
.project-card:hover .project-img img { transform: scale(1.05); }

.project-img {
    height: 200px;
    background: #151515;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}
/* Note: Code mort (::after vide) supprimé ici */

.project-info { padding: 25px; }
.tags { margin-top: 15px; }
.tags span {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
}
.link-arrow:hover{ color: var(--accent-color); }

/* =========================================
   9. SINGLE PROJECT PAGE
   ========================================= */
.project-header {
    text-align: center;
    margin: 40px 0 60px;
}
.project-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 15px auto 0;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}
.meta-item { display: flex; flex-direction: column; gap: 5px; }
.meta-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.meta-value { font-weight: 500; color: #fff; }

.project-hero-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    margin-bottom: 80px;
}
.project-hero-image img { width: 100%; display: block; }

.project-content { max-width: 800px; margin: 0 auto; }
.content-block { margin-bottom: 60px; }
.content-block h2 { font-size: 1.8rem; color: #fff; margin-bottom: 20px; }
.content-block p { color: #ccc; font-size: 1.05rem; line-height: 1.8; }

.feature-list { margin-top: 20px; }
.feature-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    color: #ccc;
}
.feature-list li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}
.project-gallery-grid img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.next-project {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}
.next-project p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
.next-project h3 {
    font-size: 2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}
.next-project h3:hover { color: var(--accent-color); }
.next-project .arrow { transition: transform 0.3s; }
.next-project h3:hover .arrow { transform: translateX(10px); }

/* =========================================
   10. WRITING SECTION & SINGLE ARTICLE
   ========================================= */
.writing-section { margin-bottom: var(--spacing); }
.article-item {
    display: flex;
    justify-content: space-between;
    padding: 25px 0;
    border-bottom: 1px solid var(--card-border);
    transition: 0.3s;
}
.article-item:hover { transform: translateX(10px); }
.article-title { font-weight: 500; color: #ddd; }

/* Single Article */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 60px auto 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--card-border);
}
.article-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin: 20px 0;
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.article-meta {
    font-family: monospace;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.article-meta .separator { margin: 0 10px; color: #555; }

.article-content {
    max-width: 680px;
    margin: 0 auto;
    font-size: 1.1rem;
}
.article-content p {
    color: #d4d4d4;
    line-height: 1.8;
    margin-bottom: 1.8rem;
}
.article-content .lead { font-size: 1.25rem; color: #fff; font-weight: 400; }
.article-content h2 { color: #fff; margin-top: 3rem; margin-bottom: 1.5rem; font-size: 1.8rem; }
.article-content h3 { color: #fff; margin-top: 2rem; margin-bottom: 1rem; font-size: 1.4rem; }
.article-content ul { list-style: disc; margin-left: 20px; margin-bottom: 2rem; color: #d4d4d4; }
.article-content li { margin-bottom: 10px; }

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 25px;
    margin: 3rem 0;
    font-style: italic;
    color: #fff;
    font-size: 1.2rem;
    /* CORRECTION : Gradient Orange */
    background: linear-gradient(90deg, rgba(204, 105, 5, 0.1), transparent);
    padding: 20px 25px;
    border-radius: 0 10px 10px 0;
}

.code-block {
    background: #0f0f0f;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin: 2rem 0;
    overflow: hidden;
}
.code-header {
    background: rgba(255,255,255,0.03);
    padding: 8px 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
    font-family: monospace;
}
.code-block pre { padding: 20px; overflow-x: auto; margin: 0; }
.code-block code { font-family: 'Courier New', Courier, monospace; font-size: 0.9rem; color: #e0e0e0; }

.next-article-nav {
    max-width: 680px;
    margin: 80px auto 0;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}
.next-article-nav p { color: var(--text-muted); margin-bottom: 10px; }
.next-article-nav h3 { font-size: 1.5rem; transition: color 0.3s; }
.next-article-nav h3:hover { color: var(--accent-color); }

/* =========================================
   11. FOOTER
   ========================================= */
.site-footer {
    border-top: 1px solid var(--card-border);
    background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,1) 100%);
    padding-top: 80px;
    margin-top: 100px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 60px;
}
.footer-cta h2 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 15px; color: #fff; }
.footer-cta p { color: var(--text-muted); margin-bottom: 25px; font-size: 1.1rem; }
.cta-button { display: flex; margin-top: 2rem; justify-items: center; }

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 5px;
    transition: all 0.3s ease;
}
.email-link:hover { color: var(--accent-color); border-color: var(--accent-color); }
.email-link svg { transition: transform 0.3s ease; }
.email-link:hover svg { transform: translate(3px, -3px); }

.social-links { display: flex; gap: 15px; }
.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}
.social-btn svg { width: 20px; height: 20px; z-index: 2; transition: stroke 0.3s; }
.social-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    /* CORRECTION : Lueur Orange */
    box-shadow: 0 5px 15px rgba(204, 105, 5, 0.2);
}
.social-btn:hover svg { stroke: var(--accent-color); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    text-align: center;
    color: #555;
    font-size: 0.85rem;
}

/* =========================================
   12. ANIMATIONS & EFFECTS
   ========================================= */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.work-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    position: relative;
}

.phone-mockup {
    width: 100%;
    height: 100%;
    background: #000;
    background-color: #1a1a1a;
    border-radius: 36px;
    border: 8px solid #2d2d2d;
    box-shadow: 0 0 0 2px #444, 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.screen-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 28px;
    opacity: 0.9;
}

/* =========================================
   13. MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 900px) {
    .work-layout { flex-direction: column; }
    .project-image-container { display: none; }
}

@media (max-width: 768px) {
    .location-time { display: none; }

    /* CORRECTION MOBILE : Scroll horizontal */
    .nav-inner {
        overflow-x: auto; /* Permet le scroll */
        justify-content: flex-start; /* Aligne tout à gauche */
        padding-right: 20px;
        /* Cache la barre de défilement (Chrome/Safari) */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .nav-inner::-webkit-scrollbar { display: none; }

    .nav-links {
        display: flex; /* On garde l'affichage ! */
        flex-shrink: 0; /* Empêche le menu de s'écraser */
        margin-left: 20px;
    }

    /* Le bouton contact reste visible et accessible */
    .btn-nav-contact {
        background-color: #fff;
        color: #000;
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .about-content { grid-template-columns: 1fr; }
    .hero-text h1 { font-size: 2.5rem; }
    .article-item { flex-direction: column; gap: 8px; }

    .footer-content { flex-direction: column; align-items: flex-start; }
    .footer-cta h2 { font-size: 2rem; }

    .project-meta-grid { grid-template-columns: 1fr 1fr; }
    .project-gallery-grid { grid-template-columns: 1fr; }

    .article-content { font-size: 1rem; padding: 0 10px; }
    .article-header h1 { font-size: 2rem; }
}


/* --- CSS CORRECTIF POUR LE HTML NETTOYÉ --- */

/* Pour les cartes qui sont des liens (<a>) */
.clickable-card {
    display: flex;
    flex-direction: column;
    text-decoration: none; /* Enlève le soulignement du lien */
    color: inherit; /* Garde la couleur du texte */
    cursor: pointer;
}

/* Flexbox pour le header de la carte (Titre + Icône flèche) */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    width: 100%;
}

/* Style de l'icône flèche dans la carte */
.card-header-row svg {
    margin-top: 4px;
    flex-shrink: 0;
    transition: stroke 0.3s;
}

/* Au survol, la flèche devient Orange */
.clickable-card:hover .card-header-row svg {
    stroke: var(--accent-color);
}