/* =========================================
   PAGE TRANSITIONS
   ========================================= */
.main-content {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

html.page-leaving .main-content {
    opacity: 0;
    transform: translateY(-8px);
}

/* Card entrance animation */
.animate-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   CUSTOM PROPERTIES
   ========================================= */
:root {
    --color-bg: #0b0f1a;
    --color-bg-alt: #111827;
    --color-surface: #1a2235;
    --color-surface-hover: #1f2b42;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(99, 102, 241, 0.4);

    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-accent: #06b6d4;
    --color-success: #10b981;
    --color-error: #ef4444;

    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-faint: #64748b;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img { max-width: 100%; display: block; }

/* =========================================
   UTILITIES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section {
    padding: 100px 0;
}

.section--dark {
    background-color: var(--color-bg-alt);
}

.section__header {
    text-align: center;
    margin-bottom: 64px;
}

.section__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 520px;
    margin: 0 auto;
}

.section__cta {
    text-align: center;
    margin-top: 48px;
}

.main-content {
    min-height: calc(100vh - var(--nav-height));
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    will-change: transform;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn--ghost:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.btn--outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--color-primary-light);
}

.btn--lg {
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(11, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition);
}

.navbar--scrolled {
    background: rgba(11, 15, 26, 0.95);
}

.navbar__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: opacity var(--transition);
}

.navbar__logo:hover { opacity: 0.8; }

.navbar__logo-icon {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--color-primary-light);
}

.navbar__logo-text {
    color: var(--color-text);
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar__link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.navbar__link:hover,
.navbar__link.active {
    color: var(--color-text);
    background: rgba(255,255,255,0.05);
}

.navbar__link--cta {
    background: rgba(99, 102, 241, 0.12);
    color: var(--color-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.navbar__link--cta:hover,
.navbar__link--cta.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-primary-light);
    border-color: rgba(99, 102, 241, 0.4);
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-muted);
    border-radius: 2px;
    transition: all var(--transition);
}

/* =========================================
   HERO
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.hero__orb--1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero__orb--2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero__container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 32px;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #f8fafc;
}

.hero__title-gradient {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-text-muted);
    max-width: 560px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero__subtitle strong {
    color: var(--color-text);
    font-weight: 600;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero__stats {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f1f5f9, var(--color-primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__stat-label {
    font-size: 0.8rem;
    color: var(--color-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero__stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* =========================================
   SKILLS
   ========================================= */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color var(--transition), box-shadow var(--transition), opacity 0.45s ease, transform 0.45s ease;
}

.skill-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow);
}

.skill-card__icon {
    font-size: 2rem;
    margin-bottom: 14px;
}

.skill-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 14px;
}

.skill-card__bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.skill-card__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
    animation: fillBar 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fillBar {
    from { width: 0 !important; }
}

.skill-card__level {
    font-size: 0.75rem;
    color: var(--color-text-faint);
}

/* =========================================
   PROJECT CARDS
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.projects-grid--full {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color var(--transition), box-shadow var(--transition), opacity 0.45s ease, transform 0.45s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.project-card--featured {
    border-color: rgba(99, 102, 241, 0.15);
    background: var(--color-surface);
    position: relative;
}

.project-card--featured::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.04));
    pointer-events: none;
    z-index: 0;
}

.project-card--featured > * { position: relative; z-index: 1; }

.project-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.project-card__icon {
    font-size: 2rem;
    line-height: 1;
}

.project-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 1;
    padding: 0 12px;
}

.project-card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.project-card__date {
    font-size: 0.75rem;
    color: var(--color-text-faint);
    font-family: var(--font-mono);
}

.project-card__links {
    display: flex;
    gap: 10px;
}

.project-card__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.project-card__link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--color-primary-light);
}

.project-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f1f5f9;
}

.project-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-mono);
    color: var(--color-accent);
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    transition: background 0.2s, color 0.2s;
}

/* ── TAG COLORS par technologie ── */
[data-tech^="php"]                      { background: rgba(139,92,246,.15);  color: #a78bfa; border-color: rgba(139,92,246,.3); }
[data-tech^="symfony"]                  { background: rgba(99,102,241,.15);  color: #818cf8; border-color: rgba(99,102,241,.3); }
[data-tech^="react"]                    { background: rgba(6,182,212,.15);   color: #22d3ee; border-color: rgba(6,182,212,.3); }
[data-tech^="javascript"], [data-tech^="js"],
[data-tech^="jquery"]                   { background: rgba(245,158,11,.15);  color: #fbbf24; border-color: rgba(245,158,11,.3); }
[data-tech^="typescript"]               { background: rgba(49,120,198,.15);  color: #60a5fa; border-color: rgba(49,120,198,.3); }
[data-tech^="sql"], [data-tech^="mysql"],
[data-tech^="postgresql"]               { background: rgba(16,185,129,.15);  color: #34d399; border-color: rgba(16,185,129,.3); }
[data-tech^="linux"], [data-tech^="devops"] { background: rgba(239,68,68,.15); color: #f87171; border-color: rgba(239,68,68,.3); }
[data-tech^="docker"]                   { background: rgba(14,165,233,.15);  color: #38bdf8; border-color: rgba(14,165,233,.3); }
[data-tech^="nginx"], [data-tech^="apache"] { background: rgba(0,153,0,.15);  color: #4ade80; border-color: rgba(0,153,0,.3); }
[data-tech^="git"], [data-tech^="github"] { background: rgba(249,115,22,.15); color: #fb923c; border-color: rgba(249,115,22,.3); }
[data-tech^="api"]                      { background: rgba(236,72,153,.15);  color: #f472b6; border-color: rgba(236,72,153,.3); }
[data-tech^="python"]                   { background: rgba(55,118,171,.15);  color: #60a5fa; border-color: rgba(55,118,171,.3); }
[data-tech^="chart"]                    { background: rgba(251,191,36,.15);  color: #fbbf24; border-color: rgba(251,191,36,.3); }
[data-tech^="cache"], [data-tech^="ttl"] { background: rgba(168,85,247,.15); color: #c084fc; border-color: rgba(168,85,247,.3); }
[data-tech^="riot"], [data-tech^="api-riot"] { background: rgba(200,170,110,.15); color: #C8AA6E; border-color: rgba(200,170,110,.3); }

/* =========================================
   PAGE HERO
   ========================================= */
.page-hero {
    padding: 140px 0 40px;
    text-align: center;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(99,102,241,0.06), transparent);
    pointer-events: none;
}

.page-hero__title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #f8fafc;
    margin-bottom: 20px;
}

.page-hero__subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-section { overflow: hidden; }

.cta-box {
    position: relative;
    background: linear-gradient(135deg, var(--color-surface), rgba(99,102,241,0.05));
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    overflow: hidden;
}

.cta-box__orb {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-box__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #f1f5f9;
    margin: 16px 0;
}

.cta-box__text {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

/* =========================================
   FLASH MESSAGES
   ========================================= */
.flash {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    width: max-content;
    max-width: min(700px, calc(100vw - 48px));
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.flash--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.flash--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.flash__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    background: currentColor;
    color: var(--color-bg);
    flex-shrink: 0;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   CONTACT
   ========================================= */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact-info__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
}

.contact-info__text {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

.contact-info__items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.contact-info__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.contact-info__icon {
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contact-info__item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-info__item strong {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.contact-info__item span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.contact-info__socials {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.social-btn:hover {
    border-color: var(--color-border-hover);
    color: var(--color-text);
    transform: translateY(-2px);
}

/* FORM */
.contact-form-wrapper {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-faint);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.04);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.form-group .form-error {
    font-size: 0.8rem;
    color: var(--color-error);
}

/* Symfony form error display */
.form-group ul.errors {
    list-style: none;
    padding: 0;
}

.form-group ul.errors li {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 4px;
}

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
}

.empty-state__icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.empty-state code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    color: var(--color-primary-light);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 60px 0;
    text-align: center;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}

.footer__tagline {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    max-width: 400px;
}

.footer__links {
    display: flex;
    gap: 24px;
}

.footer__link {
    font-size: 0.875rem;
    color: var(--color-text-faint);
    transition: color var(--transition);
}

.footer__link:hover {
    color: var(--color-primary-light);
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--color-text-faint);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .navbar__toggle {
        display: flex;
    }

    .navbar__links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(11, 15, 26, 0.98);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--color-border);
    }

    .navbar__links.open {
        display: flex;
    }

    .hero__stats {
        gap: 20px;
    }

    .hero__stat-divider {
        display: none;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills__grid {
        grid-template-columns: 1fr;
    }

    .cta-box {
        padding: 50px 24px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .section { padding: 70px 0; }

    .hero__scroll { display: none; }

    /* Quadrillage plus visible sur mobile */
    .hero__grid {
        background-image:
            linear-gradient(rgba(99,102,241,0.07) 1px, transparent 1px),
            linear-gradient(90deg, rgba(99,102,241,0.07) 1px, transparent 1px);
    }
    .lol-teaser__card::before {
        background-image:
            linear-gradient(rgba(200,170,110,0.09) 1px, transparent 1px),
            linear-gradient(90deg, rgba(200,170,110,0.09) 1px, transparent 1px);
    }
}

@media (max-width: 480px) {
    .contact-form-wrapper {
        padding: 24px;
    }

    .hero__title {
        font-size: 2.2rem;
    }
}

/* =========================================
   TIMELINE (Expérience)
   ========================================= */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), rgba(99,102,241,0.1));
}

.timeline__item {
    display: flex;
    gap: 32px;
    padding-bottom: 48px;
    position: relative;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

.timeline__content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    flex: 1;
    transition: border-color var(--transition), opacity 0.45s ease, transform 0.45s ease;
}

.timeline__content:hover {
    border-color: var(--color-border-hover);
}

.timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.timeline__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.timeline__company {
    font-size: 0.875rem;
    color: var(--color-primary-light);
    font-weight: 500;
}

.timeline__date {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-text-faint);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--color-border);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.timeline__list {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline__list li {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}

.timeline__list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-primary-light);
    font-size: 0.8rem;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* =========================================
   EDUCATION
   ========================================= */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.edu-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    transition: border-color var(--transition), box-shadow var(--transition), opacity 0.45s ease, transform 0.45s ease;
}

.edu-card:hover {
    border-color: var(--color-border-hover);
}

.edu-card__icon {
    font-size: 2rem;
    line-height: 1;
}

.edu-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.edu-card__school {
    font-size: 0.875rem;
    color: var(--color-primary-light);
    margin-bottom: 6px;
}

.edu-card__date {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-text-faint);
}

@media (max-width: 768px) {
    .timeline::before { display: none; }
    .timeline__item { flex-direction: column; gap: 12px; }
    .timeline__dot { display: none; }
    .timeline__header { flex-direction: column; }
    .edu-grid { grid-template-columns: 1fr; }
}

/* =========================================
   DARK / LIGHT MODE
   ========================================= */
[data-theme="light"] {
    --color-bg: #eef2f7;
    --color-bg-alt: #e8edf5;
    --color-surface: #ffffff;
    --color-surface-hover: #f8fafc;
    --color-border: rgba(0, 0, 0, 0.10);
    --color-border-hover: rgba(99, 102, 241, 0.5);
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-text-faint: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .section__title,
[data-theme="light"] .edu-card__title,
[data-theme="light"] .timeline__title,
[data-theme="light"] .contact-info__title,
[data-theme="light"] .hero__title { color: #0f172a; }

[data-theme="light"] .hero__stat-value {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero__stat-label { color: var(--color-text-muted); }

[data-theme="light"] .skill-card:hover { box-shadow: none; }
[data-theme="light"] .skill-card__bar  { background: rgba(0,0,0,0.08); }
[data-theme="light"] .skill-card__level { color: var(--color-text-muted); }

[data-theme="light"] .project-card__title { color: #0f172a; }
[data-theme="light"] .project-card:hover { box-shadow: none; }

[data-theme="light"] .cta-box__title { color: #0f172a; }

.navbar__link--lol { color: #C8AA6E !important; }
.navbar__link--lol:hover, .navbar__link--lol.active {
    background: rgba(200,170,110,0.08) !important;
    color: #C8AA6E !important;
}

[data-theme="light"] .navbar__link { color: #475569; }
[data-theme="light"] .navbar__link:hover,
[data-theme="light"] .navbar__link.active {
    color: #0f172a;
    background: rgba(0,0,0,0.06);
}

[data-theme="light"] .page-hero__title { color: #0f172a; }

[data-theme="light"] .pstat-value {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
[data-theme="light"] .pstat-label { color: var(--color-text-muted); }

[data-theme="light"] .hero__title-gradient,
[data-theme="light"] .text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .footer {
    background: #f1f5f9;
    border-top-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .hero__grid { opacity: 0.04; }
[data-theme="light"] .hero__orb--1 { background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%); }
[data-theme="light"] .hero__orb--2 { background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%); }

.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--color-border-hover);
    color: var(--color-primary-light);
}

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: all var(--transition);
    z-index: 200;
    color: var(--color-text-muted);
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--color-border-hover);
    color: var(--color-primary-light);
    background: var(--color-surface-hover);
}

/* =========================================
   SKELETON LOADER
   ========================================= */
.skeleton {
    background: linear-gradient(90deg, var(--color-surface) 25%, var(--color-surface-hover) 50%, var(--color-surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.chart-skeleton {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
}

/* =========================================
   PAGE 404
   ========================================= */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.error-page__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.error-page__content {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 4rem 24px;
}

.error-page__code {
    display: flex;
    justify-content: center;
    gap: 0.1em;
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}

.error-page__4 {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-page__0 {
    color: var(--color-bg);
    -webkit-text-stroke: 2px var(--color-border-hover);
    text-shadow: 0 0 60px rgba(99,102,241,0.3);
}

.error-page__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.error-page__subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.error-page__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   TIMELINE — PROGRESSION
   ========================================= */
.timeline__progression {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.timeline__badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.timeline__badge--alt {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.25);
    color: var(--color-primary-light);
}

.timeline__badge--cdi {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: #34d399;
}

.timeline__progression-arrow {
    color: var(--color-text-faint);
    font-size: 0.85rem;
}

/* =========================================
   LOL TEASER
   ========================================= */
.lol-teaser__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    background: #050F23;
    border: 1px solid rgba(200,170,110,0.2);
    border-radius: var(--radius-xl);
    padding: 2.5rem 3rem;
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    flex-wrap: wrap;
    will-change: transform;
}

/* Grille hexagonale en fond */
.lol-teaser__card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(200,170,110,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200,170,110,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Orbes de lumière */
.lol-teaser__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 10% 50%, rgba(183,125,232,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 90% 50%, rgba(200,170,110,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.lol-teaser__card > * { position: relative; z-index: 1; }

.lol-teaser__culling {
    position: absolute !important;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0 !important;
}

/* Flash initial au départ */
.lol-teaser__muzzle {
    position: absolute;
    left: var(--mx, 60px);
    top: var(--my, 50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(180,220,255,0.8) 40%, transparent 70%);
    box-shadow: 0 0 20px 8px rgba(150,200,255,0.6);
    animation: culling-muzzle var(--muzzle-dur, 0.15s) var(--muzzle-delay, 0s) ease-out forwards;
}

@keyframes culling-muzzle {
    0%   { transform: translate(-50%,-50%) scale(0);   opacity: 1; }
    40%  { transform: translate(-50%,-50%) scale(1.4); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(0.6); opacity: 0; }
}

/* Flash global sur la carte au démarrage */
.lol-teaser__flash {
    position: absolute;
    inset: 0;
    background: rgba(180,220,255,0.07);
    animation: culling-flash 0.12s ease-out forwards;
    border-radius: inherit;
}

@keyframes culling-flash {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* Projectiles */
.lol-teaser__bullet {
    position: absolute;
    height: var(--bullet-h, 2px);
    border-radius: 1px;
    opacity: 0;
    animation: culling-shoot var(--bullet-dur, 0.35s) var(--bullet-delay, 0s) linear forwards;
    width: var(--bullet-w, 55px);
    top: var(--bullet-y, 50%);
    left: var(--bullet-x, -60px);
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(180,220,255,0.4) 10%,
        rgba(255,255,255,0.95) 45%,
        rgba(220,240,255,0.8) 70%,
        transparent 100%
    );
    box-shadow: 0 0 4px 1px rgba(180,220,255,0.6), 0 0 8px 2px rgba(150,200,255,0.2);
}

@keyframes culling-shoot {
    0%   { opacity: 0; transform: translateX(0); }
    5%   { opacity: 1; }
    88%  { opacity: 0.85; }
    100% { opacity: 0; transform: translateX(var(--bullet-travel, 1000px)); }
}

.lol-teaser__card:hover {
    border-color: rgba(200,170,110,0.45);
    box-shadow: 0 0 60px rgba(200,170,110,0.1), 0 0 20px rgba(183,125,232,0.08);
}

.lol-teaser__left { flex: 1; min-width: 240px; }

.lol-teaser__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: #C8AA6E;
    margin: 0.5rem 0 0.75rem;
}

.lol-teaser__text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
    max-width: 480px;
}

.lol-teaser__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #C8AA6E;
    transition: gap var(--transition);
}

.lol-teaser__card:hover .lol-teaser__cta { gap: 0.7rem; }

.lol-teaser__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.lol-teaser__rank {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(183,125,232,0.06);
    border: 1px solid rgba(183,125,232,0.2);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
}

.lol-teaser__rank-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.lol-teaser__rank-tier {
    font-size: 1.1rem;
    font-weight: 800;
    color: #b77de8;
}

.lol-teaser__rank-label {
    font-size: 0.75rem;
    color: var(--color-text-faint);
    font-family: var(--font-mono);
    margin-top: 0.15rem;
}

.lol-teaser__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 768px) {
    .lol-teaser__card { padding: 1.75rem; }
    .lol-teaser__right { align-items: flex-start; }
    .lol-teaser__tags { justify-content: flex-start; }
}

