:root {
    --bg-deep: #0f172a;
    --accent-primary: #4f46e5;
    --accent-secondary: #8b5cf6;
    --text-main: #f8fafc;
    --text-dim: rgba(248, 250, 252, 0.75);
    --glass: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(30, 41, 59, 0.65);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden;
}

/* ── Hero ── */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    overflow: hidden;
}
.hero-bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: blur(8px) brightness(0.85) contrast(1.05);
    transform: scale(1.02);
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(15,23,42,0.5) 0%, rgba(30,41,59,0.4) 100%);
    z-index: 1;
    pointer-events: none;
}
#hero-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.4;
}
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 20px;
}
.hero h1 {
    font-family: 'Calistoga';
    font-size: clamp(3rem, 10vw, 7rem);
    line-height: 0.9;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    color: #c7d2fe;
    font-weight: 800;
    letter-spacing: 5px;
    margin-bottom: 30px;
    text-transform: uppercase;
    font-size: clamp(0.8rem, 3vw, 1rem);
}
.hero-email-btn {
    margin-top: 20px;
    background: rgba(79, 70, 229, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid #818cf8;
    padding: 12px 28px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 1rem;
}
.hero-email-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* ── Custom Cursor ── */
@media (pointer: fine) {
    .cursor-dot {
        width: 6px; height: 6px;
        background: var(--accent-primary);
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
    }
    .cursor-outline {
        width: 36px; height: 36px;
        border: 1px solid var(--accent-primary);
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transition: transform 0.15s ease-out;
    }
}
@media (pointer: coarse) {
    .cursor-dot, .cursor-outline { display: none; }
    * { cursor: auto; }
}

/* ── Navigation ── */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 12px 20px;
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
}
.logo {
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.2rem;
    z-index: 2001;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.8;
    transition: 0.3s;
}
.nav-links a:hover {
    opacity: 1;
    color: var(--accent-primary);
}
.btn-cv-nav {
    background: var(--accent-primary);
    padding: 8px 18px;
    border-radius: 20px;
    opacity: 1 !important;
}

/* ── Hamburger (mobile) ── */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 2001;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    width: 25px; height: 2.5px;
    background: #ffffff;
    transition: 0.3s;
    border-radius: 2px;
    display: block;
}

/* ── Menu latéral mobile ── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 280px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    border-left: 1px solid var(--glass-border);
    padding: 100px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 1999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0,0,0,0.4);
}
.mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav .btn-cv-nav-mobile {
    background: var(--accent-primary);
    display: inline-block;
    text-align: center;
    border-radius: 40px;
    padding: 12px;
    margin-top: 10px;
}
.mobile-nav.open { right: 0; }
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1998;
    display: none;
}
.overlay.active { display: block; }

/* ── Sections ── */
section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.section-title {
    font-family: 'Calistoga';
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 60px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── About ── */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    padding: 50px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    transition: all 0.5s ease;
}
.profile-img {
    width: 100%;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    filter: grayscale(0.4);
    transition: 0.5s;
}
.profile-img:hover { filter: grayscale(0); transform: scale(1.02); }
.btn-contact {
    background: var(--accent-primary);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: 0.3s;
}
.btn-contact:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3); }
.btn-email {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}
.btn-email:hover { background: var(--accent-primary); color: white; transform: translateY(-3px); }

/* ── Services & Expertise ── */
.services-expertise-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}
.services-block, .expertise-block {
    flex: 1;
    min-width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 30px;
    transition: all 0.4s ease;
}
.services-block:hover, .expertise-block:hover {
    border-color: var(--accent-primary);
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(-5px);
}
.services-block h3, .expertise-block h3 {
    font-family: 'Calistoga';
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--accent-primary);
}
.services-grid-custom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}
.service-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px 20px;
    border-radius: 24px;
    transition: 0.3s;
    text-align: center;
}
.service-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-8px);
    background: rgba(79, 70, 229, 0.15);
}
.service-card i {
    font-size: 2.5rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    display: inline-block;
}
.service-card h4 { font-size: 1.4rem; margin-bottom: 12px; font-weight: 600; }
.service-card p { color: var(--text-dim); font-size: 0.9rem; }

/* ── Expertise ── */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.expertise-category {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 20px;
    transition: 0.3s;
}
.expertise-category:hover {
    border-color: var(--accent-primary);
    background: rgba(79, 70, 229, 0.12);
    transform: translateY(-5px);
}
.expertise-category h4 {
    font-size: 1.3rem;
    margin-bottom: 18px;
    color: var(--accent-primary);
    font-weight: 700;
    border-left: 3px solid var(--accent-primary);
    padding-left: 12px;
}
.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.tech-item { text-align: center; min-width: 70px; }
.tech-item i { font-size: 2.4rem; transition: all 0.25s ease; }
.tech-item span { display: block; font-size: 0.75rem; margin-top: 8px; color: var(--text-dim); }

/* ── Projects ── */
#projects {
    max-width: 1400px;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.2);
}

/* Barre navigateur */
.project-browser { display: flex; flex-direction: column; }
.browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.9);
    padding: 10px 14px;
    border-bottom: 1px solid var(--glass-border);
}
.browser-dots { display: flex; gap: 5px; flex-shrink: 0; }
.browser-dots i {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: block;
}
.browser-dots i:nth-child(1) { background: #ef4444; }
.browser-dots i:nth-child(2) { background: #f59e0b; }
.browser-dots i:nth-child(3) { background: #10b981; }
.browser-url {
    flex: 1;
    font-size: 0.72rem;
    color: var(--text-dim);
    background: rgba(255,255,255,0.06);
    padding: 4px 10px;
    border-radius: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.browser-open {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-decoration: none;
    flex-shrink: 0;
    transition: color 0.2s;
}
.browser-open:hover { color: var(--accent-primary); }

/* Zone aperçu */
.project-preview {
    position: relative;
    overflow: hidden;
    background: #0d0d1a;
    line-height: 0;
}
.project-preview img {
    width: 100%;
    height: auto;
    display: block;
}
.preview-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
}
.preview-brand span {
    font-family: 'Calistoga';
    font-size: 1.6rem;
    color: white;
    letter-spacing: 1px;
}
.preview-brand small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

/* Corps de la carte */
.project-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.project-card-tags span {
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid var(--accent-primary);
    padding: 3px 10px;
    border-radius: 50px;
    color: var(--accent-primary);
    background: rgba(79,70,229,0.12);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.project-card-body h3 {
    font-family: 'Calistoga';
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-main);
}
.project-card-body p {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}
.project-card-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}
.btn-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-primary);
    color: white;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}
.btn-live:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}
.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}
.btn-github:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}
.btn-private {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(99,102,241,0.08);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: default;
    letter-spacing: 0.3px;
}
.browser-lock {
    margin-left: auto;
    font-size: 0.72rem;
    color: #818cf8;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 5px;
    padding: 2px 8px;
    white-space: nowrap;
}

/* ── SokoJust screenshot carousel ── */
.soko-preview {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}
.soko-slider {
    position: relative;
    line-height: 0;
}
.soko-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.55s ease;
    pointer-events: none;
}
.soko-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}
.soko-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.soko-labels {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.soko-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(0,0,0,0.45);
    color: rgba(255,255,255,0.45);
    backdrop-filter: blur(4px);
    transition: 0.3s;
}
.soko-label.active {
    background: rgba(99,102,241,0.85);
    color: #fff;
}
.soko-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.soko-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
    border: 1px solid rgba(255,255,255,0.3);
}
.soko-dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* ── Contact ── */
.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 50px;
}
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
input, textarea {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    color: white;
    margin-bottom: 15px;
    outline: none;
}
input:focus, textarea:focus { border-color: var(--accent-primary); background: rgba(255,255,255,0.12); }
.btn-send {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: var(--accent-primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}
.contact-email-direct {
    margin-top: 20px;
    display: inline-block;
    background: rgba(79,70,229,0.25);
    padding: 10px 18px;
    border-radius: 40px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
}
.contact-email-direct:hover { background: var(--accent-primary); }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 30px 20px 40px;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-dim);
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(2px);
}
.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-icons a {
    color: var(--text-dim);
    font-size: 1.2rem;
    margin: 0 8px;
    transition: 0.3s;
    text-decoration: none;
}
.footer-icons a:hover { color: var(--accent-primary); transform: translateY(-2px); display: inline-block; }

/* ── Chatbot ── */
.whatsapp-btn {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 55px; height: 55px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    z-index: 2001;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.chat-trigger {
    position: fixed;
    bottom: 30px; right: 95px;
    width: 55px; height: 55px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    z-index: 2001;
    cursor: pointer;
}
.chat-container {
    position: fixed;
    bottom: 100px; right: 30px;
    width: 320px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    z-index: 2000;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.chat-header { background: var(--accent-primary); padding: 15px; font-weight: bold; display: flex; justify-content: space-between; }
.chat-body { height: 300px; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.msg { padding: 10px 14px; border-radius: 15px; max-width: 85%; }
.msg.bot { background: rgba(255,255,255,0.1); align-self: flex-start; }
.msg.user { background: var(--accent-primary); align-self: flex-end; }
.chat-input { display: flex; border-top: 1px solid var(--glass-border); padding: 10px; }
.chat-input input { margin-bottom: 0; background: transparent; border: none; outline: none; color: white; }

/* ── Responsive ── */

/* Tablette : scroll horizontal sur les projets */
@media (max-width: 1024px) and (min-width: 601px) {
    .projects-grid {
        grid-template-columns: repeat(3, 280px);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
        scrollbar-width: thin;
        scrollbar-color: rgba(99,102,241,0.3) transparent;
    }
    .projects-grid::-webkit-scrollbar { height: 4px; }
    .projects-grid::-webkit-scrollbar-track { background: transparent; }
    .projects-grid::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.35); border-radius: 4px; }
    .project-card { scroll-snap-align: start; }
}

@media (max-width: 850px) {
    .contact-wrapper, .about-container {
        grid-template-columns: 1fr;
    }
    .hero h1 { font-size: 3.5rem; }
    .nav-links a { display: none; }
    .hamburger { display: flex; }
    .services-expertise-wrapper { flex-direction: column; }
    .expertise-grid { grid-template-columns: 1fr; }
}

/* Mobile : 1 colonne */
@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
        overflow-x: visible;
    }
}
