@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
    --primary: #a78bfa;
    --primary-hover: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.3);
    --bg: #0f0e13;
    --bg-card: #16151b;
    --bg-card2: #1c1b23;
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(167, 139, 250, 0.5);
    --text: #e8e6f0;
    --text-muted: #7c7a90;
    --text-faint: #4a4860;
    --hero-grad-from: #ffffff;
    --modal-bg: rgba(0, 0, 0, 0.8);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 12px 40px rgba(139, 92, 246, 0.25);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --primary: #7c3aed;
    --primary-hover: #5b21b6;
    --primary-glow: rgba(124, 58, 237, 0.15);
    --bg: #f4f2ff;
    --bg-card: #ffffff;
    --bg-card2: #f0eeff;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(124, 58, 237, 0.4);
    --text: #1a1730;
    --text-muted: #5a5480;
    --text-faint: #b0aac8;
    --hero-grad-from: #1a1730;
    --modal-bg: rgba(244, 242, 255, 0.9);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(124, 58, 237, 0.18);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100vh;
    background-color: var(--bg);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

a,
button,
label[for],
[role="button"],
.clickable {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-hover);
    border-radius: 3px;
}

/* =========================================================
   THEME SWITCH
   ========================================================= */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Fond solide par défaut — fallback universel (Firefox, anciens Safari) */
    background: rgba(22, 21, 27, 0.98);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: box-shadow var(--transition);
}

/* Blur uniquement si le navigateur le supporte (Chrome, Edge, Safari récent) */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .theme-switch-wrapper {
        background: rgba(22, 21, 27, 0.75);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    [data-theme="light"] .theme-switch-wrapper {
        background: rgba(255, 255, 255, 0.75);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }
}

[data-theme="light"] .theme-switch-wrapper {
    background: rgba(255, 255, 255, 0.98);
}

.theme-switch-wrapper:hover {
    box-shadow: 0 4px 24px var(--primary-glow);
}

.theme-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    transition: color var(--transition);
}

.theme-label.active {
    color: var(--primary);
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--text-faint);
    border-radius: 50px;
    transition: .4s;
}

.theme-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .4s;
}

.theme-switch input:checked+.theme-slider {
    background: var(--primary-hover);
}

.theme-switch input:checked+.theme-slider::before {
    transform: translateX(22px);
}

/* =========================================================
   NAVIGATION
   ========================================================= */
nav {
    position: sticky;
    top: 1rem;
    z-index: 100;
    display: flex;
    justify-content: center;
    margin: 1rem auto;
    width: min(1000px, calc(100% - 2rem));
    padding: 0.8rem 2rem;
    /* Fond opaque par défaut — fallback universel Firefox/anciens navigateurs */
    background: rgba(22, 21, 27, 0.97);
    border-radius: 50px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: box-shadow var(--transition), transform var(--transition);
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.97);
}

/* Blur activé uniquement si le navigateur le supporte (Chrome, Edge, Safari) */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    nav {
        background: rgba(22, 21, 27, 0.75);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    [data-theme="light"] nav {
        background: rgba(255, 255, 255, 0.75);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
}

nav:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--primary-glow);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
}

nav li {
    position: relative;
}

nav li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

nav .dropdown {
    position: absolute;
    left: -12px;
    top: calc(100% + 12px);
    padding: 0.5rem;
    min-width: 160px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

nav .dropdown li {
    padding: 0;
}

nav .dropdown a {
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

nav .dropdown a:hover {
    background: var(--bg-card2);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

nav a:hover {
    color: var(--primary);
}

nav .has-arrow svg {
    transition: transform 0.2s;
}

nav li:hover .has-arrow svg {
    transform: rotate(180deg);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Fond animé */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.18) 0%, transparent 70%),
        radial-gradient(circle at 80% 50%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Grid dots */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--text-faint) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.25;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Photo de profil — anneau lumineux avec pseudo-élément animé */
.profile-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    padding: 3px;
    /* L'anneau est le fond du container */
    background: conic-gradient(from 0deg, var(--primary), var(--primary-hover), #6d28d9, var(--primary));
    margin-bottom: 0.5rem;
    position: relative;
    /* Animation sur le ring lui-même via wrapper externe */
    filter: drop-shadow(0 0 16px var(--primary-glow));
}

/* Pseudo-élément qui fait la rotation — l'image reste immobile */
.profile-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), var(--primary-hover), #6d28d9, var(--primary));
    z-index: -1;
    animation: ring-spin 4s linear infinite;
}

@keyframes ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.profile-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 3px solid var(--bg);
    /* L'image ne bouge pas */
    position: relative;
    z-index: 1;
}

/* Badge disponible */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: #34d399;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
    }
}

.availability-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
}

.hero-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--hero-grad-from) 0%, var(--primary) 60%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hero-content .subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 500px;
}

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.hero-role-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    transition: all var(--transition);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-faint);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    animation: bounce-arrow 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes bounce-arrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* Stats row */
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================================
   SECTIONS COMMUNES
   ========================================================= */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 50px;
    padding: 0.3rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

section h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

section hr.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
    opacity: 0.2;
    margin: 1.5rem 0 3.5rem;
}

/* =========================================================
   À PROPOS
   ========================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.98rem;
    line-height: 1.8;
}

.about-text p strong {
    color: var(--text);
}

.about-highlight {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
}

.about-highlight p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.about-highlight p strong {
    color: var(--primary);
}

.about-card-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition), transform var(--transition);
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.info-card-icon {
    font-size: 1.8rem;
    width: 48px;
    text-align: center;
    flex-shrink: 0;
}

.info-card h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.info-card p {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

/* =========================================================
   COMPÉTENCES — GRID MODERNE AVEC ICÔNES
   ========================================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition);
    cursor: default;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card2);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: block;
}

.skill-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.skill-level {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

.skill-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-hover), var(--primary));
    border-radius: 2px;
    transition: width 1s ease-out;
    width: 0;
}

.skills-grid.animated .skill-bar-fill {
    width: var(--fill);
}

/* =========================================================
   PROJETS SCOLAIRES — SHOWCASE UNIFIÉ
   ========================================================= */
.showcase-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.showcase-box {
    display: grid;
    grid-template-columns: 340px 1fr;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.showcase-box:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.showcase-image {
    background-size: cover;
    background-position: center;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.showcase-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, var(--bg-card));
}

.showcase-content {
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.showcase-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.showcase-content p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.showcase-content strong {
    color: var(--text);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-card2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

/* Timeline */
.timeline {
    margin-top: 1rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.timeline h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline ul {
    list-style: none;
    padding-left: 0;
}

.timeline li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-left: 2px solid var(--border);
}

.timeline li.final-step {
    color: var(--text);
    font-weight: 600;
    border-left-color: var(--primary);
}

.step-dot {
    position: absolute;
    left: -5px;
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-faint);
}

.step-dot.highlight-dot {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.btn-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-details:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px var(--primary-glow);
}

/* Portfolio card toggle IA */
.showcase-box.featured {
    border-color: rgba(167, 139, 250, 0.3);
}

.ia-toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card2);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    align-self: flex-start;
}

.toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition);
}

.toggle-label.active-label {
    color: var(--primary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--text-faint);
    border-radius: 22px;
    transition: .4s;
}

.slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .4s;
}

.slider.round {
    border-radius: 22px;
}

.slider.round::before {
    border-radius: 50%;
}

input:checked+.slider {
    background: var(--primary-hover);
}

input:checked+.slider::before {
    transform: translateX(18px);
}

.highlight-text {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* =========================================================
   GRILLE PROJETS (PRO & PERSO)
   ========================================================= */
.section-title-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 3.5rem 0 1.5rem;
}

.section-title-row h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.section-title-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    width: 100%;
    height: 190px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.project-image-placeholder {
    width: 100%;
    height: 190px;
    background: var(--bg-card2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.project-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--bg-card));
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.project-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    flex: 1;
}

.project-card.wip {
    opacity: 0.6;
    border-style: dashed;
}

/* =========================================================
   SECTION CONTACT
   ========================================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-left h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-left p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
    color: var(--text);
}

.contact-link:hover {
    border-color: var(--primary);
    background: var(--bg-card2);
    transform: translateX(4px);
}

.contact-link-icon {
    width: 42px;
    height: 42px;
    background: var(--primary-glow);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-link-text {
    flex: 1;
}

.contact-link-text span {
    display: block;
}

/* =========================================================
   FORMULAIRE DE CONTACT (NOUVEAU DESIGN)
   ========================================================= */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .form-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 0.3rem;
    transition: color 0.3s ease;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* Effets de Focus super lisses */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.contact-form input:focus+label,
.contact-form textarea:focus+label,
.contact-form .form-group:focus-within label {
    color: var(--primary);
}

/* Pseudo-classes de validation requises (CSS Natif) */
.contact-form input:user-invalid,
.contact-form textarea:user-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.contact-form input:user-valid,
.contact-form textarea:user-valid {
    border-color: #10b981;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-faint);
}

.contact-link-text .label {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-link-text .value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.contact-right {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.contact-right p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    text-align: center;
}

.cv-card {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.cv-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.cv-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin: 0;
}

.cv-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition);
}

.cv-download:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 5rem;
    position: relative;
    /* Ombre interne en haut pour adoucir la transition */
    box-shadow: inset 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

footer p {
    color: var(--text-faint);
    font-size: 0.85rem;
}

footer span {
    color: var(--primary);
}

/* =========================================================
   MODALES
   ========================================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-bg);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 760px;
    width: 90%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-body {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.close-btn:hover {
    color: var(--text);
}

.modal-body h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 2rem;
}

.modal-step {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-card2);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
    border-left: 3px solid var(--primary);
}

.modal-step img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.modal-step-info h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-step-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.projects-grid .project-card {
    transition-delay: calc(var(--card-idx, 0) * 0.08s);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    nav ul {
        gap: 1.2rem;
        flex-wrap: wrap;
    }

    nav {
        padding: 0.7rem 1.2rem;
    }

    /* Hero */
    .hero-stats {
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    /* Showcase */
    .showcase-box {
        grid-template-columns: 1fr;
    }

    .showcase-image {
        min-height: 200px;
    }

    .showcase-image::after {
        background: linear-gradient(transparent 50%, var(--bg-card));
    }

    .showcase-content {
        padding: 1.5rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    section {
        padding: 4rem 1.2rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    nav ul {
        gap: 0.8rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .modal-step {
        flex-direction: column;
    }

    .modal-step img {
        width: 100%;
        height: 160px;
    }
}

/* =========================================================
   UTILITAIRES
   ========================================================= */
.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}