/* ===== FRANCKITO PORTFOLIO – Design System ===== */

:root {
    --fk-bg:        #07122b;
    --fk-bg2:       #0c1e45;
    --fk-bg3:       #112259;
    --fk-blue:      #2a7cf7;
    --fk-blue-lt:   #5aa0ff;
    --fk-blue-xlt:  #a8c8ff;
    --fk-accent:    #4fc3f7;
    --fk-white:     #e8f0ff;
    --fk-muted:     #6b85b5;
    --fk-card-bg:   rgba(17, 34, 89, 0.6);
    --fk-card-bd:   rgba(42, 124, 247, 0.2);
    --fk-radius:    16px;
    --fk-radius-sm: 10px;
    --fk-shadow:    0 8px 32px rgba(0,0,40,0.5);
    --fk-glow:      0 0 20px rgba(42,124,247,0.3);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--fk-bg);
    color: var(--fk-white);
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Masque le curseur natif sur desktop uniquement */
@media (pointer: fine) {
    body, body * { cursor: none !important; }
}

/* ===== DISPLAY FONT (style logo franckito) ===== */
.fk-display,
.fk-hero h1,
.fk-section-title,
.fk-form-card h2,
.fk-brand span {
    font-family: 'Pacifico', cursive;
    font-weight: 400;
    letter-spacing: -0.5px;
}

/* Ajustements Pacifico par contexte */
.fk-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.25;
    letter-spacing: 0px;
}
.fk-section-title {
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    line-height: 1.3;
}
.fk-form-card h2 {
    font-size: 1.4rem;
}
.fk-brand span {
    font-size: 1.15rem;
    letter-spacing: 0px;
}

/* ===== BLOBS BACKGROUND ===== */
body::before {
    content: '';
    position: fixed;
    top: -200px; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(42,124,247,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: blobDrift 18s ease-in-out infinite alternate;
    will-change: transform;
    transform: translateZ(0);
}
body::after {
    content: '';
    position: fixed;
    bottom: -150px; right: -150px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(79,195,247,0.10) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: blobDrift 22s ease-in-out infinite alternate-reverse;
    will-change: transform;
    transform: translateZ(0);
}
@keyframes blobDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, 40px, 0) scale(1.1); }
}

/* ===== NAVBAR ===== */
.fk-navbar {
    background: rgba(7, 18, 43, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--fk-card-bd);
    padding: 10px 0;
    z-index: 1000;
}
.fk-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--fk-white) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fk-nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--fk-blue);
    object-fit: cover;
}
.fk-blue { color: var(--fk-blue-lt); }
.navbar-nav .nav-link {
    color: var(--fk-blue-xlt) !important;
    transition: color 0.2s;
    padding: 6px 14px;
    border-radius: 8px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(42,124,247,0.15);
}
.fk-logout { color: var(--fk-muted) !important; }
.fk-logout:hover { color: #ff6b6b !important; background: rgba(255,107,107,0.1) !important; }

/* ===== WAVE DIVIDERS ===== */
.fk-wave-divider, .fk-footer-wave {
    line-height: 0;
    overflow: hidden;
    pointer-events: none;
}
.fk-wave-divider svg { display: block; width: 100%; height: 40px; }
.fk-footer-wave svg { display: block; width: 100%; height: 60px; }

/* ===== BUTTONS ===== */
.btn-fk-primary {
    background: linear-gradient(135deg, var(--fk-blue), var(--fk-accent));
    border: none;
    color: #fff;
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    box-shadow: var(--fk-glow);
}
.btn-fk-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(42,124,247,0.5);
    color: #fff;
}
.fk-btn-outline {
    background: transparent;
    border: 1.5px solid var(--fk-blue);
    color: var(--fk-blue-lt);
    border-radius: 50px;
    padding: 8px 22px;
    font-weight: 600;
    transition: background .2s, color .2s, border-color .2s;
}
.fk-btn-outline:hover {
    background: var(--fk-blue);
    color: #fff;
}

/* ===== CARDS ===== */
.fk-card {
    background: var(--fk-card-bg);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    overflow: hidden;
}
.fk-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fk-shadow), var(--fk-glow);
    border-color: rgba(42,124,247,0.5);
}

/* ===== HERO ===== */
.fk-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.fk-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(42,124,247,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(79,195,247,0.10) 0%, transparent 50%),
        var(--fk-bg);
    z-index: 0;
}
.fk-hero-content { position: relative; z-index: 1; }

.fk-hero-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid var(--fk-blue);
    box-shadow: 0 0 40px rgba(42,124,247,0.4), 0 0 80px rgba(42,124,247,0.15);
    object-fit: cover;
    animation: avatarPulse 3s ease-in-out infinite;
}
@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(42,124,247,0.4), 0 0 80px rgba(42,124,247,0.15); }
    50%       { box-shadow: 0 0 60px rgba(42,124,247,0.6), 0 0 100px rgba(42,124,247,0.25); }
}

.fk-hero h1 {
    /* font-size géré dans le bloc display font ci-dessus */
}
.fk-hero h1 span {
    background: linear-gradient(90deg, var(--fk-blue-lt), var(--fk-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fk-hero .subtitle {
    font-size: 1.1rem;
    color: var(--fk-blue-xlt);
    font-weight: 400;
    letter-spacing: 1px;
}

/* Blob shapes hero */
.fk-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(35px);
    opacity: .15;
    pointer-events: none;
    animation: blobFloat 14s ease-in-out infinite alternate;
    will-change: transform;
    transform: translateZ(0);
    contain: layout style paint;
}
.fk-blob-1 { width: 320px; height: 320px; background: var(--fk-blue); top: -100px; right: -100px; animation-delay: 0s; }
.fk-blob-2 { width: 240px; height: 240px; background: var(--fk-accent); bottom: 50px; left: 20%; animation-delay: 4s; }
.fk-blob-3 { width: 180px; height: 180px; background: #8b5cf6; top: 30%; left: -60px; animation-delay: 8s; }
@keyframes blobFloat {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(30px, -30px, 0) scale(1.08); }
}

/* ===== SECTIONS ===== */
.fk-section { padding: 80px 0; position: relative; z-index: 1; }
.fk-section-dark { background: rgba(12, 30, 69, 0.5); }

.fk-section-title {
    /* font-family et font-size gérés dans le bloc display font */
    color: var(--fk-white);
    margin-bottom: 8px;
}
.fk-section-title .accent {
    background: linear-gradient(90deg, var(--fk-blue-lt), var(--fk-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fk-divider {
    width: 50px; height: 3px;
    background: linear-gradient(90deg, var(--fk-blue), var(--fk-accent));
    border-radius: 2px;
    margin-bottom: 2rem;
}

/* ===== SKILLS ===== */
.fk-skill-bar { margin-bottom: 1rem; }
.fk-skill-label { display: flex; justify-content: space-between; font-size: .9rem; color: var(--fk-blue-xlt); margin-bottom: 6px; }
.fk-progress {
    height: 8px;
    background: rgba(42,124,247,0.15);
    border-radius: 4px;
    overflow: hidden;
}
.fk-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--fk-blue), var(--fk-accent));
    transition: width 1.2s ease;
    position: relative;
}
.fk-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    border-radius: 4px;
}

/* Language dots */
.fk-lang-dot {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    margin-right: 3px;
}
.fk-lang-dot.filled { background: var(--fk-blue); }
.fk-lang-dot.empty  { background: rgba(42,124,247,0.2); border: 1px solid var(--fk-blue); }

/* ===== SOCIAL LINKS ===== */
.fk-social-links { display: flex; gap: 12px; justify-content: center; }
.fk-social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(42,124,247,0.15);
    border: 1px solid var(--fk-card-bd);
    color: var(--fk-blue-lt);
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.fk-social-icon:hover {
    background: var(--fk-blue);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--fk-glow);
}

/* ===== COMPETENCE BADGES ===== */
.fk-badge-comp {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .3px;
}
.badge-comprendre  { background: rgba(59,130,246,0.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3);  opacity: .65; transition: opacity .2s; }
.badge-concevoir   { background: rgba(139,92,246,0.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3);  opacity: .65; transition: opacity .2s; }
.badge-exprimer    { background: rgba(236,72,153,0.15); color: #f9a8d4; border: 1px solid rgba(236,72,153,0.3);  opacity: .65; transition: opacity .2s; }
.badge-developer   { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3);  opacity: .65; transition: opacity .2s; }
.badge-entreprendre{ background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3);  opacity: .65; transition: opacity .2s; }

/* Projet perso category badges */
.badge-projet-all     { background: rgba(42,124,247,0.15); color: var(--fk-blue-lt); border: 1px solid rgba(42,124,247,0.3);  opacity: .65; transition: opacity .2s; }
.badge-projet-video   { background: rgba(239,68,68,0.15);  color: #fca5a5;           border: 1px solid rgba(239,68,68,0.3);   opacity: .65; transition: opacity .2s; }
.badge-projet-photo   { background: rgba(245,158,11,0.15); color: #fcd34d;           border: 1px solid rgba(245,158,11,0.3);  opacity: .65; transition: opacity .2s; }
.badge-projet-musique { background: rgba(139,92,246,0.15); color: #c4b5fd;           border: 1px solid rgba(139,92,246,0.3);  opacity: .65; transition: opacity .2s; }

/* Placeholder couleur par catégorie */
.fk-projet-cat-video   { background: linear-gradient(135deg, rgba(239,68,68,.2), rgba(239,68,68,.08)) !important; }
.fk-projet-cat-photo   { background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(245,158,11,.08)) !important; }
.fk-projet-cat-musique { background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(139,92,246,.08)) !important; }

/* Badge actif : couleur pleine + glow coloré */
.fk-badge-comp.fk-badge-active { opacity: 1 !important; filter: brightness(1.25); }

/* Projets */
.badge-projet-all.fk-badge-active     { background: rgba(42,124,247,0.35);  border-color: rgba(42,124,247,0.75);  box-shadow: 0 0 0 2px #4a90f7, 0 0 16px rgba(42,124,247,.45); }
.badge-projet-video.fk-badge-active   { background: rgba(239,68,68,0.35);   border-color: rgba(239,68,68,0.75);   box-shadow: 0 0 0 2px #f87171, 0 0 16px rgba(239,68,68,.45); }
.badge-projet-photo.fk-badge-active   { background: rgba(245,158,11,0.35);  border-color: rgba(245,158,11,0.75);  box-shadow: 0 0 0 2px #fbbf24, 0 0 16px rgba(245,158,11,.45); }
.badge-projet-musique.fk-badge-active { background: rgba(139,92,246,0.35);  border-color: rgba(139,92,246,0.75);  box-shadow: 0 0 0 2px #a78bfa, 0 0 16px rgba(139,92,246,.45); }

/* Bouton Tous traces */
.badge-trace-all { background: rgba(42,124,247,0.15); color: var(--fk-blue-lt); border: 1px solid rgba(42,124,247,0.3); opacity: .65; transition: opacity .2s; }
.badge-trace-all.fk-badge-active    { background: rgba(42,124,247,0.35);  border-color: rgba(42,124,247,0.75);  box-shadow: 0 0 0 2px #4a90f7, 0 0 16px rgba(42,124,247,.45); }
.badge-trace-all:hover              { box-shadow: 0 4px 18px rgba(42,124,247,.5) !important; }

/* Compétences traces */
.badge-comprendre.fk-badge-active   { background: rgba(59,130,246,0.35);  border-color: rgba(59,130,246,0.75);  box-shadow: 0 0 0 2px #60a5fa, 0 0 16px rgba(59,130,246,.45); }
.badge-concevoir.fk-badge-active    { background: rgba(139,92,246,0.35);  border-color: rgba(139,92,246,0.75);  box-shadow: 0 0 0 2px #a78bfa, 0 0 16px rgba(139,92,246,.45); }
.badge-exprimer.fk-badge-active     { background: rgba(236,72,153,0.35);  border-color: rgba(236,72,153,0.75);  box-shadow: 0 0 0 2px #f472b6, 0 0 16px rgba(236,72,153,.45); }
.badge-developer.fk-badge-active    { background: rgba(16,185,129,0.35);  border-color: rgba(16,185,129,0.75);  box-shadow: 0 0 0 2px #34d399, 0 0 16px rgba(16,185,129,.45); }
.badge-entreprendre.fk-badge-active { background: rgba(245,158,11,0.35);  border-color: rgba(245,158,11,0.75);  box-shadow: 0 0 0 2px #fbbf24, 0 0 16px rgba(245,158,11,.45); }

/* Type badges */
.fk-badge-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 500;
    background: rgba(79,195,247,0.15);
    color: var(--fk-accent);
    border: 1px solid rgba(79,195,247,0.3);
}

/* ===== TRACE CARD ===== */
.fk-trace-card {
    background: var(--fk-card-bg);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius);
    padding: 1.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Transitions spécifiques — évite "all" qui est coûteux */
    transition: transform .38s cubic-bezier(.25,.46,.45,.94),
                box-shadow .38s cubic-bezier(.25,.46,.45,.94),
                border-color .3s;
    will-change: transform;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.fk-trace-card:hover {
    transform: translateY(-7px);
    border-color: rgba(42,124,247,.45);
    color: inherit;
    /* box-shadow géré dynamiquement par JS selon position souris */
}
.fk-trace-card .trace-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--fk-white);
    margin: .6rem 0 .4rem;
    line-height: 1.35;
}
.fk-trace-card .trace-desc {
    font-size: .85rem;
    color: var(--fk-muted);
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fk-trace-card .trace-meta {
    font-size: .75rem;
    color: var(--fk-muted);
    margin-top: .8rem;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== TRACE DETAIL ===== */
.fk-trace-detail { max-width: 860px; margin: 0 auto; }
.fk-argumentaire {
    background: rgba(42,124,247,0.07);
    border-left: 3px solid var(--fk-blue);
    border-radius: 0 var(--fk-radius-sm) var(--fk-radius-sm) 0;
    padding: 1.4rem 1.8rem;
    color: var(--fk-blue-xlt);
    line-height: 1.8;
    font-size: .95rem;
}
.fk-comment-box {
    background: rgba(17, 34, 89, 0.4);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius-sm);
    padding: 1rem 1.2rem;
    margin-bottom: .8rem;
}
.fk-comment-box .comment-author {
    font-weight: 600;
    color: var(--fk-blue-lt);
    font-size: .85rem;
}
.fk-comment-box .comment-date {
    font-size: .75rem;
    color: var(--fk-muted);
}
.fk-comment-box .comment-text {
    margin-top: .5rem;
    color: var(--fk-white);
    font-size: .9rem;
}

/* ===== FILTER BAR ===== */
.fk-filter-bar {
    background: rgba(12, 30, 69, 0.7);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius);
    padding: 1.2rem 1.5rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    margin-bottom: 2rem;
}
.fk-filter-bar .form-select,
.fk-filter-bar .form-control {
    background: rgba(42,124,247,0.08);
    border: 1px solid rgba(42,124,247,0.25);
    color: var(--fk-white);
    border-radius: 8px;
}
.fk-filter-bar .form-select:focus,
.fk-filter-bar .form-control:focus {
    border-color: var(--fk-blue);
    box-shadow: 0 0 0 3px rgba(42,124,247,0.2);
    background: rgba(42,124,247,0.12);
    color: var(--fk-white);
}
.fk-filter-bar .form-select option { background: var(--fk-bg2); color: var(--fk-white); }

/* ===== FORMS ===== */
.fk-form-card {
    background: var(--fk-card-bg);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius);
    padding: 2rem 2.5rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 520px;
    margin: 0 auto;
}
.fk-form-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--fk-white);
}
.form-label { color: var(--fk-blue-xlt); font-size: .88rem; font-weight: 500; }
.form-control, .form-select {
    background: rgba(42,124,247,0.08) !important;
    border: 1px solid rgba(42,124,247,0.25) !important;
    color: var(--fk-white) !important;
    border-radius: 8px !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--fk-blue) !important;
    box-shadow: 0 0 0 3px rgba(42,124,247,0.2) !important;
    background: rgba(42,124,247,0.12) !important;
}
.form-control::placeholder { color: var(--fk-muted) !important; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ===== ADMIN ===== */
.fk-admin-sidebar {
    background: rgba(12, 30, 69, 0.8);
    border-right: 1px solid var(--fk-card-bd);
    min-height: calc(100vh - 70px);
    padding: 1.5rem 0;
}
.fk-admin-sidebar .nav-link {
    color: var(--fk-blue-xlt) !important;
    padding: 10px 20px;
    border-radius: 0 8px 8px 0;
    margin-right: 8px;
    transition: background .15s, color .15s;
}
.fk-admin-sidebar .nav-link:hover,
.fk-admin-sidebar .nav-link.active {
    background: rgba(42,124,247,0.15);
    color: #fff !important;
}
.fk-admin-sidebar .nav-link i { width: 20px; }
.fk-stat-card {
    background: var(--fk-card-bg);
    border: 1px solid var(--fk-card-bd);
    border-radius: var(--fk-radius);
    padding: 1.4rem;
    text-align: center;
}
.fk-stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--fk-blue-lt), var(--fk-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.fk-stat-label { color: var(--fk-muted); font-size: .85rem; }

/* Admin table */
.fk-table { width: 100%; }
.fk-table th {
    color: var(--fk-blue-xlt);
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--fk-card-bd);
    padding: 10px 12px;
    background: rgba(42,124,247,0.06);
}
.fk-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(42,124,247,0.08);
    vertical-align: middle;
    font-size: .88rem;
    color: var(--fk-white);
}
.fk-table tr:hover td { background: rgba(42,124,247,0.06); }

/* ===== ALERTS ===== */
.fk-alert {
    border-radius: 10px;
    border: 1px solid;
    padding: .9rem 1.2rem;
    font-size: .9rem;
    margin-bottom: 1rem;
}
.fk-alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.fk-alert-danger  { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }
.fk-alert-info    { background: rgba(42,124,247,.1); border-color: rgba(42,124,247,.3); color: var(--fk-blue-xlt); }

/* ===== FOOTER ===== */
.fk-footer {
    background: var(--fk-bg);
    border-top: 1px solid var(--fk-card-bd);
    color: var(--fk-muted);
    font-size: .88rem;
    position: relative;
    z-index: 1;
}

/* ===== PROJECT GRID (home) ===== */
.fk-project-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--fk-radius-sm) var(--fk-radius-sm) 0 0;
    background: linear-gradient(135deg, var(--fk-bg3), var(--fk-bg2));
}
.fk-project-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, rgba(42,124,247,.15), rgba(79,195,247,.1));
    border-radius: var(--fk-radius-sm) var(--fk-radius-sm) 0 0;
    color: var(--fk-blue-lt);
}

/* ===== MISCELLANEOUS ===== */
.text-fk-muted { color: var(--fk-muted) !important; }
.text-fk-blue  { color: var(--fk-blue-lt) !important; }
.border-fk     { border-color: var(--fk-card-bd) !important; }

.fk-immat {
    font-family: monospace;
    font-size: .78rem;
    color: var(--fk-muted);
    background: rgba(42,124,247,0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.fk-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--fk-muted); margin-bottom: 1.5rem; }
.fk-breadcrumb a { color: var(--fk-blue-lt); text-decoration: none; }
.fk-breadcrumb a:hover { text-decoration: underline; }
.fk-breadcrumb .sep { color: var(--fk-card-bd); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .fk-hero-avatar { width: 140px; height: 140px; }
    .fk-form-card { padding: 1.5rem; }
    .fk-hero { min-height: 90vh; }
    .fk-section { padding: 50px 0; }
    #fk-cursor, #fk-cursor-dot { display: none !important; }
}

/* ============================================================
   ANIMATIONS & INTERACTIONS
   ============================================================ */

/* ── PAGE LOADER ─────────────────────────────────────────── */
#fk-loader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--fk-bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .55s ease, visibility .55s;
}
#fk-loader.fade-out { opacity: 0; visibility: hidden; }

.fk-loader-inner {
    position: relative;
    width: 96px; height: 96px;
    display: flex; align-items: center; justify-content: center;
}

/* Anneau extérieur — tourne dans le sens horaire */
.fk-loader-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(42,124,247,.15);
    border-top-color: var(--fk-blue);
    border-right-color: rgba(79,195,247,.5);
    animation: spin .9s linear infinite;
    will-change: transform;
}

/* Anneau intérieur — tourne en sens inverse */
.fk-loader-ring2 {
    position: absolute; inset: 10px;
    border-radius: 50%;
    border: 1.5px solid rgba(42,124,247,.08);
    border-bottom-color: var(--fk-accent);
    border-left-color: rgba(42,124,247,.3);
    animation: spin 1.3s linear infinite reverse;
    will-change: transform;
}

/* Initiales AF */
.fk-loader-letters {
    position: relative; z-index: 1;
    font-family: 'Pacifico', cursive;
    font-size: 28px;
    background: linear-gradient(135deg, var(--fk-blue) 0%, var(--fk-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(42,124,247,.5));
    animation: loaderPulse 1.4s ease-in-out infinite alternate;
}

@keyframes loaderPulse {
    from { opacity: .6; transform: scale(.93); }
    to   { opacity: 1;  transform: scale(1.07); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCROLL PROGRESS BAR ─────────────────────────────────── */
#fk-scroll-bar {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, var(--fk-blue), var(--fk-accent));
    z-index: 9998; width: 0%;
    transition: width .1s linear;
    box-shadow: 0 0 10px var(--fk-blue);
}

/* ── CUSTOM CURSOR ───────────────────────────────────────── */
/* Petit point bleu — suit la souris exactement */
#fk-cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 7px; height: 7px;
    background: var(--fk-blue);
    border-radius: 50%;
    pointer-events: none; z-index: 99999;
    will-change: transform;
    box-shadow: 0 0 8px rgba(42,124,247,.7);
}
/* Grand anneau — suit avec lag (lerp JS) */
#fk-cursor {
    position: fixed; top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(42,124,247,.75);
    border-radius: 50%;
    pointer-events: none; z-index: 99998;
    will-change: transform;
    /* Seules taille et couleur sont CSS-animées — le transform est géré par JS */
    transition: width  .32s cubic-bezier(.25,.46,.45,.94),
                height .32s cubic-bezier(.25,.46,.45,.94),
                background .22s, border-color .22s;
}
/* État hover : l'anneau se referme sur le point → "cliquable" */
#fk-cursor.hover {
    width: 12px; height: 12px;
    background: var(--fk-blue);
    border-color: var(--fk-blue);
}

/* ── NAVBAR SCROLL ───────────────────────────────────────── */
.fk-navbar { transition: background .3s, box-shadow .3s; }
.fk-navbar.scrolled {
    background: rgba(5, 10, 28, 0.97) !important;
    box-shadow: 0 4px 30px rgba(0,0,0,.5);
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.fk-fade-in {
    opacity: 0; transform: translateY(28px);
    transition: opacity .65s cubic-bezier(.22,1,.36,1),
                transform .65s cubic-bezier(.22,1,.36,1);
}
.fk-slide-up {
    opacity: 0; transform: translateY(40px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1),
                transform .7s cubic-bezier(.22,1,.36,1);
}
.fk-slide-left {
    opacity: 0; transform: translateX(-40px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1),
                transform .7s cubic-bezier(.22,1,.36,1);
}
.fk-slide-right {
    opacity: 0; transform: translateX(40px);
    transition: opacity .7s cubic-bezier(.22,1,.36,1),
                transform .7s cubic-bezier(.22,1,.36,1);
}
.fk-zoom-in {
    opacity: 0; transform: scale(.88);
    transition: opacity .6s cubic-bezier(.22,1,.36,1),
                transform .6s cubic-bezier(.22,1,.36,1);
}
.fk-fade-in.revealed, .fk-slide-up.revealed,
.fk-slide-left.revealed, .fk-slide-right.revealed,
.fk-zoom-in.revealed {
    opacity: 1; transform: none;
}

/* ── HERO AVATAR FLOAT ───────────────────────────────────── */
@keyframes avatarFloat {
    0%,100% { transform: translateY(0);    }
    50%      { transform: translateY(-12px); }
}
.fk-hero-avatar {
    animation: avatarFloat 4s ease-in-out infinite,
               avatarPulse 3s ease-in-out infinite !important;
}

/* ── HERO TITLE GRADIENT SHIMMER ─────────────────────────── */
.fk-hero h1 span {
    background: linear-gradient(90deg,
        var(--fk-blue-lt) 0%,
        var(--fk-accent)  30%,
        #fff               50%,
        var(--fk-accent)  70%,
        var(--fk-blue-lt) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}
@keyframes shimmer {
    from { background-position: 0% center; }
    to   { background-position: 200% center; }
}

/* Aussi sur les accents de section */
.fk-section-title .accent {
    background: linear-gradient(90deg,
        var(--fk-blue-lt), var(--fk-accent), #fff, var(--fk-accent), var(--fk-blue-lt));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ── TYPING CURSOR ───────────────────────────────────────── */
[data-typing]::after {
    content: '|';
    animation: blink .7s step-end infinite;
    color: var(--fk-blue);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── RIPPLE ──────────────────────────────────────────────── */
.btn-fk-primary, .fk-btn-outline { position: relative; overflow: hidden; }
.fk-ripple {
    position: absolute; border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 120px; height: 120px;
    background: rgba(255,255,255,.25);
    animation: ripple .7s ease-out forwards;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: translate(-50%,-50%) scale(3); opacity: 0; }
}

/* ── CARD SHINE (mouse follow) ───────────────────────────── */
.fk-trace-card, .fk-card {
    --shine-x: 50%; --shine-y: 50%;
}
.fk-trace-card::before, .fk-card::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        200px circle at var(--shine-x) var(--shine-y),
        rgba(255,255,255,.07) 0%,
        transparent 70%
    );
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
    z-index: -1; /* derrière le contenu, devant le fond de la carte */
}
.fk-trace-card { position: relative; }
.fk-card       { position: relative; }
.fk-trace-card:hover::before, .fk-card:hover::before { opacity: 1; }

/* ── SOCIAL ICONS WAVE ───────────────────────────────────── */
@keyframes waveFloat {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.fk-wave-anim {
    animation: waveFloat 2.2s ease-in-out infinite;
}
.fk-social-icon {
    transition: transform .25s, background .25s, box-shadow .25s, color .25s !important;
}
.fk-social-icon:hover {
    animation: none;
    transform: translateY(-6px) scale(1.15) !important;
}

/* ── MAGNETIC BUTTON TRANSITION ──────────────────────────── */
.fk-magnetic { transition: transform .3s cubic-bezier(.22,1,.36,1); }

/* ── STAT CARDS HOVER ────────────────────────────────────── */
.fk-stat-card {
    transition: transform .3s, box-shadow .3s, border-color .3s;
    cursor: default;
    position: relative;
}
.fk-stat-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--fk-shadow), 0 0 30px rgba(42,124,247,.3);
    border-color: rgba(42,124,247,.5);
}
/* Variante cliquable (lien) */
.fk-stat-card.fk-stat-link {
    cursor: pointer;
    color: inherit;
}
.fk-stat-arrow {
    position: absolute;
    bottom: .7rem; right: .9rem;
    font-size: 1.1rem;
    color: var(--fk-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .25s, transform .25s;
}
.fk-stat-link:hover .fk-stat-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── BADGE HOVER POP ─────────────────────────────────────── */
.fk-badge-comp {
    transition: transform .2s, box-shadow .2s, opacity .2s;
    cursor: pointer;
}
.fk-badge-comp:hover {
    transform: scale(1.08) translateY(-1px);
    opacity: 1 !important;
}
.badge-projet-all:hover       { box-shadow: 0 4px 18px rgba(42,124,247,.5) !important; }
.badge-projet-video:hover     { box-shadow: 0 4px 18px rgba(239,68,68,.5) !important; }
.badge-projet-photo:hover     { box-shadow: 0 4px 18px rgba(245,158,11,.5) !important; }
.badge-projet-musique:hover   { box-shadow: 0 4px 18px rgba(139,92,246,.5) !important; }
.badge-comprendre:hover       { box-shadow: 0 4px 18px rgba(59,130,246,.5) !important; }
.badge-concevoir:hover        { box-shadow: 0 4px 18px rgba(139,92,246,.5) !important; }
.badge-exprimer:hover         { box-shadow: 0 4px 18px rgba(236,72,153,.5) !important; }
.badge-developer:hover        { box-shadow: 0 4px 18px rgba(16,185,129,.5) !important; }
.badge-entreprendre:hover     { box-shadow: 0 4px 18px rgba(245,158,11,.5) !important; }

/* ── NAV LINK UNDERLINE ANIM ─────────────────────────────── */
.navbar-nav .nav-link {
    position: relative;
}
.navbar-nav .nav-link::after {
    content: ''; position: absolute;
    bottom: 2px; left: 50%;
    width: 0; height: 2px;
    background: var(--fk-blue-lt);
    border-radius: 2px;
    transition: width .25s, left .25s;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 70%; left: 15%;
}

/* ── TRACE CARD EMOJI BOUNCE ─────────────────────────────── */
.fk-project-placeholder {
    transition: font-size .3s, background .3s;
}
.fk-trace-card:hover .fk-project-placeholder {
    font-size: 3.2rem;
    background: linear-gradient(135deg, rgba(42,124,247,.25), rgba(79,195,247,.15));
}

/* ── SECTION TITLE APPEAR ────────────────────────────────── */
.fk-section-title, .fk-divider {
    opacity: 0; transform: translateY(20px);
    animation: sectionAppear .8s cubic-bezier(.22,1,.36,1) forwards;
}
.fk-divider { animation-delay: .15s; }
@keyframes sectionAppear {
    to { opacity: 1; transform: translateY(0); }
}

/* ── HERO ENTRY ANIMATIONS ───────────────────────────────── */
.fk-hero-content .col-lg-6:first-child > * {
    opacity: 0; animation: heroSlideIn .8s cubic-bezier(.22,1,.36,1) forwards;
}
.fk-hero-content .col-lg-6:first-child > *:nth-child(1) { animation-delay: .1s; }
.fk-hero-content .col-lg-6:first-child > *:nth-child(2) { animation-delay: .25s; }
.fk-hero-content .col-lg-6:first-child > *:nth-child(3) { animation-delay: .4s; }
.fk-hero-content .col-lg-6:first-child > *:nth-child(4) { animation-delay: .55s; }
.fk-hero-content .col-lg-6:first-child > *:nth-child(5) { animation-delay: .7s; }
.fk-hero-content .col-lg-6:last-child img {
    opacity: 0; animation: heroFadeScale .9s .5s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes heroSlideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: none; }
}
@keyframes heroFadeScale {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── BANNER IMAGE HOVER ──────────────────────────────────── */
.fk-hero .col-lg-6:last-child img {
    transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s;
}
.fk-hero .col-lg-6:last-child img:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 40px rgba(42,124,247,.3) !important;
}

/* ── FORM FIELDS FOCUS ANIM ──────────────────────────────── */
.form-control, .form-select {
    transition: border-color .25s, box-shadow .25s !important;
    /* sans transform:scale — évite le clip par overflow:hidden des .fk-card */
}

/* ── FOOTER SOCIAL ICONS ─────────────────────────────────── */
.fk-footer .fk-social-icon:hover {
    animation: none;
    transform: translateY(-4px) scale(1.1) !important;
}

/* ── PROGRESS BAR SHIMMER ────────────────────────────────── */
.fk-progress-fill::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,.3) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    border-radius: 4px;
}
@keyframes progressShimmer {
    from { background-position: -200% center; }
    to   { background-position:  200% center; }
}

/* ── BREADCRUMB HOVER ────────────────────────────────────── */
.fk-breadcrumb a {
    transition: color .2s, letter-spacing .2s;
}
.fk-breadcrumb a:hover {
    letter-spacing: .3px;
    text-decoration: none;
    color: #fff !important;
}

/* ── ADMIN TABLE ROW ─────────────────────────────────────── */
.fk-table tr {
    transition: background .2s;
}
.fk-table tbody tr:hover td {
    background: rgba(42,124,247,.08);
}

/* ── ALERT SLIDE IN ──────────────────────────────────────── */
.fk-alert {
    animation: alertSlide .4s cubic-bezier(.22,1,.36,1);
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: none; }
}

/* ── CARD SHINE : z-index:-1 → derrière le contenu, au-dessus du fond */

/* ── ADMIN MOBILE NAV ────────────────────────────────────── */
.fk-admin-mobile-nav {
    display: flex;
    overflow-x: auto;
    gap: .5rem;
    padding: .75rem 1rem;
    background: rgba(12,30,69,.95);
    border-bottom: 1px solid var(--fk-card-bd);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.fk-admin-mobile-nav::-webkit-scrollbar { display: none; }
.fk-admin-mobile-nav a {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .9rem;
    border-radius: 20px;
    font-size: .82rem; font-weight: 600;
    color: var(--fk-blue-xlt);
    background: rgba(42,124,247,.08);
    border: 1px solid rgba(42,124,247,.2);
    text-decoration: none;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.fk-admin-mobile-nav a.active,
.fk-admin-mobile-nav a:hover {
    background: var(--fk-blue);
    color: #fff;
    border-color: var(--fk-blue);
}

/* ── SWITCHER DE LANGUE ──────────────────────────────────── */
.fk-lang-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: .4rem;
    padding: 6px 12px !important;
    border-radius: 20px;
    background: rgba(42,124,247,.1);
    border: 1px solid rgba(42,124,247,.25);
    font-size: .82rem;
    font-weight: 600;
    transition: background .2s, border-color .2s;
}
.fk-lang-toggle:hover,
.fk-lang-toggle:focus {
    background: rgba(42,124,247,.2);
    border-color: rgba(42,124,247,.5);
}
.fk-lang-flag { font-size: 1.05rem; line-height: 1; display: inline-flex; align-items: center; }
.fk-lang-flag-img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; background: #fff; vertical-align: middle; }
.fk-lang-code { font-weight: 700; letter-spacing: .5px; }

.fk-lang-menu {
    background: var(--fk-bg2, #0c1e45);
    border: 1px solid rgba(42,124,247,.25);
    border-radius: 12px;
    padding: .4rem;
    min-width: 160px;
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.fk-lang-menu .dropdown-item {
    color: var(--fk-blue-xlt, #b5d4ff);
    border-radius: 8px;
    padding: .5rem .8rem;
    font-size: .88rem;
    display: flex;
    align-items: center;
    transition: background .15s, color .15s;
}
.fk-lang-menu .dropdown-item:hover,
.fk-lang-menu .dropdown-item:focus {
    background: rgba(42,124,247,.18);
    color: #fff;
}
.fk-lang-menu .dropdown-item.active {
    background: rgba(42,124,247,.35);
    color: #fff;
    font-weight: 600;
}

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fk-progress-fill { transition: none !important; }
    .fk-blob { display: none; }
    .fk-card, .fk-navbar, .fk-filter-bar, .fk-form-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ── MODE PERFORMANCE BAS — appliqué automatiquement par JS sur appareils faibles ── */
html.fk-perf-low .fk-blob { display: none; }
html.fk-perf-low .fk-card,
html.fk-perf-low .fk-navbar,
html.fk-perf-low .fk-filter-bar,
html.fk-perf-low .fk-form-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html.fk-perf-low #fk-particles { display: none; }
html.fk-perf-low .fk-card:hover { transform: none; box-shadow: var(--fk-shadow); }
html.fk-perf-low .fk-stat-card:hover { transform: none; }
html.fk-perf-low #fk-cursor, html.fk-perf-low #fk-cursor-dot { display: none !important; }
html.fk-perf-low .fk-section { content-visibility: visible; }

/* ── SKIP TO CONTENT ─────────────────────────────────────── */
.fk-skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--fk-blue);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    transition: top .2s;
}
.fk-skip-link:focus { top: 0; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   CHAT BUBBLE FLOTTANTE
   ═══════════════════════════════════════════════════════════════ */
#fk-chat-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1050;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fk-blue), #7c3aed);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(42,124,247,.45);
    transition: transform .2s, box-shadow .2s;
    will-change: transform;
    animation: fk-bubble-in .4s cubic-bezier(.34,1.56,.64,1) both;
}
#fk-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(42,124,247,.65);
}
@keyframes fk-bubble-in {
    from { opacity:0; transform:scale(.5) translateY(20px); }
    to   { opacity:1; transform:scale(1)  translateY(0);    }
}
#fk-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border: 2px solid var(--fk-bg);
    animation: fk-badge-pop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes fk-badge-pop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

#fk-chat-panel {
    position: fixed;
    bottom: 96px;
    right: 28px;
    z-index: 1049;
    width: 340px;
    max-height: 480px;
    border-radius: var(--fk-radius);
    background: var(--fk-card-bg);
    border: 1px solid var(--fk-card-bd);
    box-shadow: 0 12px 48px rgba(0,0,20,.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: opacity .25s, transform .25s cubic-bezier(.34,1.2,.64,1);
    opacity: 0;
    transform: scale(.85) translateY(10px);
    pointer-events: none;
    will-change: transform, opacity;
}
#fk-chat-panel.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}
#fk-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: linear-gradient(90deg, rgba(42,124,247,.18), rgba(124,58,237,.14));
    border-bottom: 1px solid var(--fk-card-bd);
    flex-shrink: 0;
}
#fk-chat-close {
    background: none;
    border: none;
    color: var(--fk-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
#fk-chat-close:hover { color: var(--fk-text); background: rgba(255,255,255,.08); }
#fk-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}
#fk-chat-messages::-webkit-scrollbar { width: 4px; }
#fk-chat-messages::-webkit-scrollbar-track { background: transparent; }
#fk-chat-messages::-webkit-scrollbar-thumb { background: var(--fk-card-bd); border-radius: 2px; }
.fk-cmsg {
    max-width: 82%;
    padding: .5rem .75rem;
    border-radius: 14px;
    font-size: .83rem;
    line-height: 1.45;
    word-break: break-word;
    contain: content;
}
.fk-cmsg-visitor {
    align-self: flex-end;
    background: var(--fk-blue);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.fk-cmsg-admin {
    align-self: flex-start;
    background: rgba(255,255,255,.07);
    color: var(--fk-text);
    border-bottom-left-radius: 4px;
}
.fk-cmsg-time {
    font-size: .68rem;
    color: var(--fk-muted);
    margin-top: 2px;
    text-align: right;
}
.fk-cmsg-admin .fk-cmsg-time { text-align: left; }
#fk-chat-footer {
    padding: .6rem;
    border-top: 1px solid var(--fk-card-bd);
    flex-shrink: 0;
}
#fk-chat-form {
    display: flex;
    gap: .4rem;
    align-items: center;
}
#fk-chat-input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--fk-card-bd);
    border-radius: 20px;
    color: var(--fk-text);
    padding: .45rem .9rem;
    font-size: .83rem;
    outline: none;
    transition: border-color .15s;
}
#fk-chat-input:focus { border-color: var(--fk-blue); }
#fk-chat-form button[type="submit"] {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fk-blue);
    border: none;
    color: #fff;
    font-size: .9rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#fk-chat-form button[type="submit"]:hover { background: #1a6ef5; }
#fk-chat-form button[type="submit"]:active { transform: scale(.93); }

.fk-chat-empty {
    text-align: center;
    color: var(--fk-muted);
    font-size: .82rem;
    padding: 2rem 0;
}

@media (max-width: 480px) {
    #fk-chat-panel {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 88px;
        max-height: 60vh;
    }
    #fk-chat-bubble { bottom: 18px; right: 18px; }
}

/* ── PERFORMANCE ─────────────────────────────────────────────── */
img[loading="lazy"] { content-visibility: auto; }

/* Containment sur les cartes répétées — évite le recalcul de layout global */
.fk-project-card, .fk-trace-card { contain: layout style paint; }

/* Admin : lignes de table isolées pour éviter reflow en cascade */
.fk-table tbody tr { contain: layout; }

/* Sections hors écran : le navigateur peut ignorer leur rendu jusqu'au scroll */
.fk-section:not(:first-of-type) { content-visibility: auto; contain-intrinsic-size: 0 600px; }

/* GPU layer sur les éléments qui utilisent backdrop-filter (coûteux sans isolation) */
.fk-navbar, .fk-card { isolation: isolate; }

/* Admin dashboard : isolation des stat-cards (hover indépendant) */
.fk-stat-card { contain: layout style; }

/* Admin sidebar : layout isolé */
.fk-admin-sidebar { contain: layout style; }

/* Mobile nav admin : isolation pour éviter reflow lors du tap actif */
.fk-admin-mobile-nav { contain: layout style; }
