
/* ========== Police ==========
   Sora (licence SIL OFL), auto-hebergee : un seul fichier variable (graisses 100-800),
   sous-ensemble latin = tous les accents du francais. display: swap evite un texte invisible. */
@font-face {
    font-family: 'Sora';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('../fonts/sora-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Variables globales:
       elles centralisent les couleurs et facilitent les changements de theme. */
    --primary: #3773d4;
    --secondary: #8e44ad;
    --dark: #070707;
    --light: #f5f5f5;
    --text: #333;
    --text-light: #666;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(212, 175, 55, 0.2);
    /* palette variables used for themes */
    --bg: #0f0f0f;
    --fg: #ffffff;
    --card-bg: rgba(255,255,255,0.03);
    --muted: #ccc;
}

* {
    /* Reset simple pour partir d'une base propre sur tous les navigateurs */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    /* body definit l'apparence generale de la page:
       fond, couleur du texte, police et comportement horizontal */
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 18% 0%, rgba(55, 115, 212, 0.08), transparent 32%),
        linear-gradient(180deg, #0a0d15 0%, #090b12 45%, #06080e 100%);
}

body.lightbox-open {
    overflow: hidden;
}

button, input, textarea, select {
    font-family: inherit;
}

html {
    /* Reglage de la scrollbar sur les navigateurs qui supportent la propriete standard */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.08);
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
}

body::-webkit-scrollbar-thumb {
    /* Version WebKit de la scrollbar (Chrome, Edge, Safari) */
    background: var(--primary);
    border-radius: 999px;
    border: 2px solid rgba(15, 15, 15, 0.85);
}

body::-webkit-scrollbar-thumb:hover {
    background: #4b88ec;
}

.container {
    /* Largeur maximale commune a plusieurs sections pour garder un alignement propre */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== Navigation ========== */
/* La navigation est fixe en haut et reste visible pendant le scroll. */
.navbar {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        rgba(10, 12, 20, 0.76);
    backdrop-filter: blur(18px) saturate(145%);
    border: 1px solid rgba(122, 167, 255, 0.18);
    border-radius: 50px;
    z-index: 1000;
    padding: 8px 20px;
    box-shadow:
        0 18px 40px rgba(4, 8, 20, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 28px rgba(55, 115, 212, 0.12);
    overflow: hidden;
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(110, 183, 255, 0.14), transparent);
    opacity: 0.75;
    pointer-events: none;
}

.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    pointer-events: none;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    gap: 12px;
}

.logo {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.logo::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    margin-top: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), rgba(142, 68, 173, 0.2));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-links a {
    color: var(--fg);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    position: relative;
    display: block;
    padding: 9px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #eaf4ff;
    background: rgba(55, 115, 212, 0.22);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 5px;
    height: 1px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.burger-menu {
    /* Cache sur desktop et active sur mobile via media query plus bas */
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    gap: 6px;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px rgba(55, 115, 212, 0.24);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========== Boutons ==========
   Le hero lui-meme (mise en page, portrait, effets) est dans css/motion.css. */
.btn {
    /* Classe bouton reutilisable dans plusieurs parties du site */
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.95), rgba(142, 68, 173, 0.88));
    color: white;
    box-shadow:
        0 12px 28px rgba(55, 115, 212, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(55, 115, 212, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #dce9ff;
    border: 1px solid rgba(83, 145, 255, 0.34);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: rgba(55, 115, 212, 0.18);
    color: white;
    box-shadow: 0 12px 28px rgba(55, 115, 212, 0.16);
}

/* ========== Bandeau des applications (hero) ==========
   Piste horizontale qui defile en boucle continue (voir @keyframes heroMarqueeScroll).
   .hero-marquee-track contient DEUX fois la meme sequence d'icones
   (.hero-marquee-seq) cote a cote ; l'animation translate de -50%, ce qui
   correspond exactement a la largeur d'une seule sequence, donc la boucle
   est invisible (la 2e copie prend le relais pile ou la 1ere s'arretait). */
.hero-marquee {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    padding: 16px 0;
    background: linear-gradient(180deg, transparent, rgba(5, 7, 14, 0.5));
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-marquee-track {
    display: flex;
    width: max-content;
    animation: heroMarqueeScroll 26s linear infinite;
}

.hero-marquee:hover .hero-marquee-track {
    animation-play-state: paused;
}

.hero-marquee-seq {
    display: flex;
    align-items: center;
    gap: 44px;
    padding-right: 44px;
    flex-shrink: 0;
}

.hero-marquee-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #c7d3e8;
    white-space: nowrap;
}

.app-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-icon--learn { background: #4f46e5; }
.app-icon--cvmaker { background: #2f8fe0; }
.app-icon--stock { background: #f97316; }
.app-icon--soon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

@keyframes heroMarqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-marquee-track {
        animation: none;
    }
}

@media (max-width: 768px) {
    .hero-marquee {
        padding: 12px 0;
    }

    .hero-marquee-item {
        font-size: 13px;
    }
}

/* ========== About Section ========== */
.about {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(55, 115, 212, 0.04), rgba(15, 18, 28, 0.02));
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.about-text p {
    font-size: 16px;
    color: #c7d3e8;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat {
    text-align: center;
    padding: 24px 20px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(55, 115, 212, 0.05));
    border: 1px solid rgba(87, 144, 255, 0.16);
    box-shadow: 0 16px 32px rgba(4, 8, 20, 0.22);
    backdrop-filter: blur(12px);
}

.stat h3 {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat p {
    color: #9fb1cf;
    margin: 0;
}

/* ========== Parcours Section (Timeline) ========== */
.timeline-section {
    padding: 100px 0;
}

.timeline {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 19px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    opacity: 0.4;
}

.timeline-item {
    position: relative;
    padding-bottom: 42px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 2px;
    left: -50px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(55, 115, 212, 0.22), rgba(142, 68, 173, 0.2));
    border: 1px solid rgba(110, 170, 255, 0.4);
    box-shadow: 0 0 18px rgba(55, 115, 212, 0.3);
    color: var(--primary);
    font-size: 16px;
    z-index: 1;
}

.timeline-item.is-goal .timeline-dot {
    background: linear-gradient(145deg, rgba(142, 68, 173, 0.3), rgba(55, 115, 212, 0.24));
    color: #c69cff;
}

.timeline-content {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(55, 115, 212, 0.05));
    border: 1px solid rgba(112, 164, 255, 0.14);
    border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 14px 30px rgba(4, 8, 20, 0.22);
    backdrop-filter: blur(10px);
}

.timeline-content h4 {
    color: #f3f8ff;
    font-size: 17px;
    margin-bottom: 4px;
}

.timeline-content span {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.timeline-content p {
    color: #a9b9d6;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .timeline {
        padding-left: 42px;
    }

    .timeline-dot {
        left: -42px;
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

/* ========== Skills Section ========== */

/* ========== CV Section ========== */
.cv-section {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
}

.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.cv-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(55,115,212,0.045));
    border: 1px solid rgba(112, 164, 255, 0.14);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 14px 36px rgba(0,0,0,0.34),
        0 0 0 1px rgba(255,255,255,0.03) inset;
    backdrop-filter: blur(14px);
}

.cv-left .cv-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.cv-left .cv-role {
    font-weight: 600;
    color: #e4ebfa;
    margin-bottom: 12px;
}

.cv-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
}

.download-btn {
    background: rgba(55,115,212,0.12);
    color: var(--primary);
    border: 1px solid rgba(55,115,212,0.25);
}

.cv-right h4 {
    margin-top: 12px;
    color: var(--primary);
}

.cv-item {
    margin-bottom: 12px;
    color: #c2d1ea;
}

.cv-skills .tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.18), rgba(142, 68, 173, 0.1));
    color: #f5f9ff;
    padding: 7px 12px;
    border-radius: 999px;
    margin: 6px 6px 0 0;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(110, 170, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
    .cv-grid { grid-template-columns: 1fr; }
}

/* Le prechargeur de marque est defini dans css/motion.css */

/* ========== Bouton Remonter en haut ========== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(55,115,212,0.16), rgba(142,68,173,0.12));
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 24px rgba(55,115,212,0.08);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 320ms ease, transform 320ms ease;
    z-index: 4000;
}
.back-to-top.show { opacity: 1; transform: translateY(0) scale(1); }
.back-to-top i { font-size: 16px; }

@media (max-width: 480px) {
    .back-to-top { right: 12px; bottom: 16px; }
}

/* ========== Light Theme Overrides ==========
   Apply when `body` has class `light-theme` */
/* Toutes les regles ci-dessous ne s'activent que lorsque JavaScript ajoute
   la classe .light-theme sur body. */
.light-theme {
    --bg: #f6f8fc;
    --fg: #101b2d;
    --card-bg: rgba(255, 255, 255, 0.82);
    --muted: #46566f;
    --surface-border: rgba(24, 38, 64, 0.1);
    background:
        radial-gradient(circle at top left, rgba(55, 115, 212, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(142, 68, 173, 0.08), transparent 26%),
        linear-gradient(180deg, #fbfcff 0%, #f2f5fb 100%);
}

.light-theme .navbar {
    background: rgba(255,255,255,0.88);
    border-color: var(--surface-border);
    box-shadow:
        0 14px 34px rgba(33, 59, 112, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

.light-theme .about,
.light-theme .projects,
.light-theme .reviews-section {
    background: rgba(55, 115, 212, 0.04);
}

.light-theme .chat-section {
    background: linear-gradient(180deg, rgba(142, 68, 173, 0.04), rgba(55, 115, 212, 0.05));
}

.light-theme .nav-links a { color: var(--fg); }
.light-theme .cv-card,
.light-theme .project-card,
.light-theme .stat,
.light-theme .skill-item,
.light-theme .reviews-card,
.light-theme .chat-box,
.light-theme .timeline-content,
.light-theme .tool-item {
    background: var(--card-bg);
    border-color: var(--surface-border);
    color: var(--fg);
    box-shadow: 0 12px 36px rgba(33, 59, 112, 0.08);
    backdrop-filter: blur(14px);
}

.light-theme .timeline-content p,
.light-theme .tool-item span {
    color: #51627b;
}

.light-theme .skill-chip {
    background: rgba(16, 24, 40, 0.03);
    border-color: rgba(16, 24, 40, 0.1);
    color: #45536b;
}

.light-theme .skills-note {
    color: #6b7994;
}
.light-theme .project-card p,
.light-theme .about-text p,
.light-theme .contact-info p,
.light-theme .cv-item,
.light-theme .stat p,
.light-theme .review-item-message,
.light-theme .review-empty,
.light-theme .review-status { color: var(--muted); }

.light-theme .project-card h3,
.light-theme .skill-header h3,
.light-theme .reviews-card h3,
.light-theme .contact-info h3,
.light-theme .cv-left .cv-name,
.light-theme .cv-right h4 {
    color: #13233a;
}
.light-theme .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(55, 115, 212, 0.18);
}
.light-theme .btn-primary:hover {
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(55, 115, 212, 0.22);
}
.light-theme .btn-secondary {
    background: rgba(55, 115, 212, 0.06);
    color: var(--primary);
    border-color: rgba(55, 115, 212, 0.22);
}
.light-theme .btn-secondary:hover {
    background: var(--primary);
    color: #ffffff;
}
.light-theme .footer {
    background: rgba(255,255,255,0.55);
    color: var(--muted);
    border-top-color: rgba(24, 38, 64, 0.08);
}

/* Adjust progress/backgrounds in light theme for contrast */
.light-theme .progress-bar { background: rgba(18, 32, 51, 0.08); }
.light-theme .progress-fill { box-shadow: 0 8px 20px rgba(55, 115, 212, 0.18); }

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--fg);
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}
.theme-toggle:focus { outline: none; }

/* Force override des textes blancs en mode clair pour meilleure lisibilité */
.light-theme .timeline-content h4 { color: #101b2d; }
.light-theme .skills-category-title { color: #2952a3; }
.light-theme .contact-item h4,
.light-theme .footer-links a,
.light-theme .cv-left .cv-role {
    color: #1c2c43;
}

/* Replace white-ish borders used for dark theme with subtle dark borders on light */
.light-theme .contact-item { border-bottom: 1px solid rgba(16,24,40,0.08); }
.light-theme .project-card,
.light-theme .skill-item,
.light-theme .reviews-card,
.light-theme .cv-card,
.light-theme .stat,
.light-theme .timeline-content,
.light-theme .tool-item { border: 1px solid rgba(16,24,40,0.08); }

/* Inputs in light theme should show dark text */
.light-theme .form-group input,
.light-theme .form-group textarea,
.light-theme .review-form select {
    background: rgba(255,255,255,0.86);
    color: var(--fg);
    border: 1px solid rgba(16,24,40,0.1);
}

.light-theme .form-group input::placeholder,
.light-theme .form-group textarea::placeholder {
    color: #76849a;
}

.light-theme .form-group input:focus,
.light-theme .form-group textarea:focus,
.light-theme .review-form select:focus {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(55, 115, 212, 0.12);
}

/* Specific adjustments for burger menu & mobile nav in light theme */
.light-theme .burger-menu span {
    background: var(--fg);
}

.light-theme .burger-menu.active span:nth-child(1),
.light-theme .burger-menu.active span:nth-child(3) {
    background: var(--fg);
}

.light-theme .nav-links {
    background: rgba(248,250,255,0.97);
    backdrop-filter: blur(16px);
    color: var(--fg);
    border-color: rgba(24, 38, 64, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.light-theme .nav-links li {
    border-bottom: 1px solid rgba(16,24,40,0.08);
}

.light-theme .nav-links a {
    color: var(--fg);
    font-weight: 700;
}

.light-theme .nav-links a:hover {
    color: #ffffff;
    background: var(--primary);
}

.light-theme .nav-links.active { opacity: 1; pointer-events: auto; }

/* ensure the close/active transforms keep visible color */
.light-theme .burger-menu.active span:nth-child(2) { opacity: 0; }
.light-theme .review-item-name {
    color: #15253c;
}
.light-theme .review-item {
    background: rgba(248, 250, 255, 0.9);
    border-color: rgba(16,24,40,0.08);
}

.light-theme .tag,
.light-theme .download-btn {
    background: rgba(55, 115, 212, 0.08);
    border-color: rgba(55, 115, 212, 0.18);
}

.light-theme .tag {
    color: #17304d;
}

.light-theme .project-image {
    border-color: rgba(55, 115, 212, 0.22);
}

.light-theme .project-lightbox {
    background: rgba(21, 30, 47, 0.62);
}

.light-theme .project-lightbox-dialog {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(232, 239, 251, 0.95));
    border-color: rgba(16,24,40,0.08);
    box-shadow: 0 30px 60px rgba(33, 59, 112, 0.18);
}

.light-theme .project-lightbox-caption {
    color: #17304d;
}

.light-theme .project-lightbox-close {
    background: rgba(16, 24, 40, 0.08);
    color: #17304d;
}

.light-theme .chat-messages {
    background: rgba(245, 248, 255, 0.9);
}

.light-theme .user-message .message-content {
    color: #ffffff;
}

.light-theme .bot-message .message-content {
    background: rgba(55, 115, 212, 0.08);
    color: var(--fg);
    border-color: rgba(55, 115, 212, 0.18);
}

.light-theme .chat-suggestions {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.14), rgba(142, 68, 173, 0.1));
    border-top-color: rgba(55, 115, 212, 0.28);
}

.light-theme .chat-suggestions h4 {
    color: #24457f;
}

.light-theme .suggestion-btn {
    background: rgba(255,255,255,0.88);
    border-color: rgba(55, 115, 212, 0.16);
    color: #17304d;
    box-shadow: 0 8px 18px rgba(33, 59, 112, 0.08);
}

.light-theme .suggestion-btn:hover {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.88), rgba(142, 68, 173, 0.82));
    color: #ffffff;
    border-color: transparent;
}

.light-theme .suggestion-btn.used {
    background: rgba(16, 24, 40, 0.04);
    color: #6b7994;
    border-color: rgba(16, 24, 40, 0.08);
}

.light-theme .chat-input-row {
    border-top-color: rgba(16, 24, 40, 0.08);
}

.light-theme .chat-input-row input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(16, 24, 40, 0.12);
    color: var(--fg);
}

.light-theme .social-link {
    background: rgba(255,255,255,0.8);
    border-color: rgba(55, 115, 212, 0.2);
}

.light-theme .social-link:hover {
    color: #ffffff;
}

.light-theme .back-to-top {
    color: #ffffff;
    border-color: rgba(55, 115, 212, 0.14);
    box-shadow: 0 14px 28px rgba(55, 115, 212, 0.16);
}

.light-theme .footer p {
    color: var(--muted);
}

.light-theme .contact-item p,
.light-theme .contact-item a,
.light-theme .footer-links a,
.light-theme .project-link {
    color: #24457f;
}

.light-theme .contact-item a:hover,
.light-theme .footer-links a:hover,
.light-theme .project-link:hover {
    color: #6a3ea8;
}

.light-theme body::-webkit-scrollbar-track {
    background: rgba(18, 32, 51, 0.06);
}

.light-theme body::-webkit-scrollbar-thumb {
    border-color: rgba(246, 248, 252, 0.9);
}

.skills {
    padding: 100px 0;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.skill-item {
    padding: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(55, 115, 212, 0.04));
    border: 1px solid rgba(55, 115, 212, 0.18);
    border-radius: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 14px 34px rgba(3, 8, 20, 0.22);
    backdrop-filter: blur(12px);
}

.skill-item:hover {
    border-color: rgba(55, 115, 212, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(3, 8, 20, 0.28);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.skill-header i {
    font-size: 28px;
    color: var(--primary);
    min-width: 30px;
}

.skill-header h3 {
    margin: 0;
    font-size: 18px;
    flex: 1;
}

.percentage {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(55, 115, 212, 0.2);
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 15px;
    transition: width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: width;
}

/* Regroupe les .skill-item d'une meme categorie (Front-end, Back-end, ...) */
.skills-category {
    margin-bottom: 50px;
}

.skills-category:last-of-type {
    margin-bottom: 0;
}

.skills-category-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8fb0ff;
    margin-bottom: 20px;
    padding-left: 4px;
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}

.skills-note {
    text-align: center;
    color: #8898b8;
    font-size: 13px;
    max-width: 560px;
    margin: -30px auto 50px;
    line-height: 1.6;
}

/* "Connaissances complementaires" (C, C++, PHP): presentees en petites pastilles
   plutot qu'en grandes barres animees, pour rester discretes face aux competences
   principales mises en avant plus haut dans la section. */
.skills-complementary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.skill-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 13px;
    color: #c7d3e8;
}

.skill-chip i {
    color: #8898b8;
    font-size: 14px;
}

.skill-chip .chip-percentage {
    color: #7a8bab;
    font-weight: 600;
    font-size: 12px;
}

/* ========== Projects Section ========== */
.projects {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(55, 115, 212, 0.045), rgba(15, 18, 28, 0.02));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(55, 115, 212, 0.05));
    border: 1px solid rgba(112, 164, 255, 0.14);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 16px 36px rgba(4, 8, 20, 0.24);
    backdrop-filter: blur(12px);
}

.project-card:hover {
    border-color: rgba(55, 115, 212, 0.45);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(4, 8, 20, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(55, 115, 212, 0.24), rgba(142, 68, 173, 0.26));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.project-image:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.project-image:focus {
    outline: 2px solid rgba(110, 170, 255, 0.8);
    outline-offset: -4px;
}

/* Tuile utilisee a la place de <img class="project-image"> quand un projet n'a
   pas (encore) de capture d'ecran reelle : icone + degrade plutot qu'une fausse
   image. .tone-orange reprend la couleur de marque d'OSWEL Stock. */
.project-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: rgba(220, 233, 255, 0.85);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 30%),
        linear-gradient(135deg, rgba(55, 115, 212, 0.3), rgba(142, 68, 173, 0.3));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-image-placeholder.tone-orange {
    color: rgba(255, 244, 230, 0.92);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.55), rgba(194, 65, 12, 0.5));
}

.projects-note {
    text-align: center;
    color: #8898b8;
    font-size: 13px;
    max-width: 620px;
    margin: -32px auto 50px;
    line-height: 1.6;
}

.light-theme .projects-note {
    color: #6b7994;
}

.project-card-header {
    position: relative;
}

.project-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(10, 12, 20, 0.75);
    border: 1px solid rgba(198, 156, 255, 0.4);
    color: #e6d4ff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.project-features {
    list-style: none;
    padding: 0 20px;
    margin: 0 0 15px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-features li {
    color: #a9b9d6;
    font-size: 13px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.project-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
    font-size: 10px;
}

/* Remplace .project-link quand un projet n'a pas d'URL reelle a montrer
   (ex: "Projet en cours") — jamais de faux lien ou de fausse demo. */
.project-status {
    display: inline-block;
    padding: 0 20px 20px 20px;
    color: #8898b8;
    font-size: 13px;
    font-style: italic;
}

.project-card h3 {
    font-size: 20px;
    padding: 20px 20px 10px 20px;
    margin: 0;
}

.project-card p {
    padding: 0 20px 15px 20px;
    color: #c7d3e8;
    font-size: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 15px;
}

.tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.18), rgba(142, 68, 173, 0.1));
    color: #f5f9ff;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(110, 170, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.project-link {
    display: inline-block;
    padding: 0 20px 20px 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: #c69cff;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 8, 20, 0.86);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 3000;
}

.project-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.project-lightbox-dialog {
    position: relative;
    width: min(100%, 980px);
    max-height: 90vh;
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(18, 24, 38, 0.96), rgba(30, 44, 74, 0.9));
    border: 1px solid rgba(122, 167, 255, 0.18);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.project-lightbox-image {
    display: block;
    width: 100%;
    max-height: calc(90vh - 88px);
    object-fit: contain;
    border-radius: 18px;
    background: rgba(5, 10, 20, 0.6);
}

.project-lightbox-caption {
    margin-top: 12px;
    text-align: center;
    color: #e8f2ff;
    font-size: 14px;
}

.project-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: background 0.25s ease, transform 0.25s ease;
}

.project-lightbox-close:hover {
    background: rgba(55, 115, 212, 0.28);
    transform: scale(1.05);
}

/* ========== Chat Section ========== */
.chat-section {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(142, 68, 173, 0.06), rgba(55, 115, 212, 0.04));
}

.chat-container {
    max-width: 900px;
    margin: 0 auto;
}

.chat-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(55,115,212,0.05));
    border: 1px solid rgba(92, 150, 255, 0.22);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(55, 115, 212, 0.14);
    animation: fadeInScale 0.8s ease-out;
    backdrop-filter: blur(14px);
}

.chat-messages {
    height: 450px;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(55, 115, 212, 0.5);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(55, 115, 212, 0.8);
}

.message {
    display: flex;
    animation: slideInChat 0.4s ease-out;
}

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

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.95), rgba(142, 68, 173, 0.88));
    color: white;
    border-radius: 15px 15px 0 15px;
    max-width: 70%;
    box-shadow: 0 10px 22px rgba(55, 115, 212, 0.22);
}

.bot-message {
    justify-content: flex-start;
}

.bot-message .message-content {
    background: rgba(55, 115, 212, 0.12);
    color: #e5edfb;
    border: 1px solid rgba(55, 115, 212, 0.28);
    border-radius: 15px 15px 15px 0;
    max-width: 70%;
    backdrop-filter: blur(10px);
}

.message-content {
    padding: 12px 16px;
    word-wrap: break-word;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 16px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(55, 115, 212, 0.6);
    animation: typingAnimation 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chat-suggestions {
    padding: 25px;
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.22), rgba(142, 68, 173, 0.18));
    border-top: 1px solid rgba(55, 115, 212, 0.42);
    border-radius: 18px;
}

.chat-suggestions h4 {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

/* Les libelles (ex: "Mes etudes superieures") peuvent faire deux lignes:
   pas de troncature en "..." pour garder chaque suggestion lisible en entier. */
.suggestion-btn {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.34), rgba(142, 68, 173, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 8px 18px rgba(55, 115, 212, 0.24);
}

.suggestion-btn:hover {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.88), rgba(142, 68, 173, 0.76));
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(55, 115, 212, 0.32);
    color: #ffffff;
}

.suggestion-btn:active {
    transform: translateY(-1px);
}

/* Ajoutee en JS (handleTopicRequest) quand ce sujet a deja ete demande,
   pour que le visiteur voie d'un coup d'oeil ce qu'il a deja explore. */
.suggestion-btn.used {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #b9c6df;
    box-shadow: none;
}

.suggestion-btn.used::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: 6px;
    color: #7ed9a3;
}

/* Barre de saisie libre du chat (formulaire #chatInputForm) */
.chat-input-row {
    display: flex;
    gap: 10px;
    padding: 16px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 12px 18px;
    color: var(--fg);
    font-family: inherit;
    font-size: 14px;
}

.chat-input-row input::placeholder {
    color: #8898b8;
}

.chat-input-row input:focus {
    outline: none;
    border-color: rgba(55, 115, 212, 0.5);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

.chat-send-btn:hover {
    background: #4b88ec;
    transform: translateY(-1px);
}

/* ========== Reviews Section ========== */
.reviews-section {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(55, 115, 212, 0.045), rgba(15, 18, 28, 0.02));
}

.reviews-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.reviews-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(55,115,212,0.05));
    border: 1px solid rgba(55, 115, 212, 0.2);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 16px 38px rgba(4, 8, 20, 0.22);
    backdrop-filter: blur(12px);
}

.reviews-card h3 {
    margin-bottom: 18px;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-form select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 15px;
    color: white;
    font-family: inherit;
    font-size: 14px;
}

.review-form select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(55, 115, 212, 0.2);
}

.review-status {
    min-height: 22px;
    font-size: 14px;
    color: #cdd8ef;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.review-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    backdrop-filter: blur(10px);
}

.review-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.review-item-name {
    font-weight: 600;
    color: #f3f3f3;
}

.review-item-rating {
    color: #f1c40f;
    font-size: 14px;
}

.review-item-message {
    color: #d0d0d0;
    font-size: 14px;
    line-height: 1.6;
}

.review-empty {
    color: #b8b8b8;
    font-size: 14px;
}

/* ========== Contact Section ========== */
.contact {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(10, 12, 20, 0.02), rgba(55,115,212,0.02));
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.contact-info p {
    color: #c7d3e8;
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 18px 18px 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    color: #f2f6ff;
    margin-bottom: 5px;
}

.contact-item p {
    margin: 0;
    color: #bccae2;
}

.contact-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(55, 115, 212, 0.16), rgba(142, 68, 173, 0.14));
    border: 1px solid rgba(96, 165, 250, 0.36);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8bc2ff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 22px rgba(55, 115, 212, 0.14);
}

.social-link:hover {
    background: linear-gradient(135deg, rgba(55, 115, 212, 0.92), rgba(142, 68, 173, 0.84));
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 16px 30px rgba(55, 115, 212, 0.24);
}

/* ========== Contact Form ========== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(55,115,212,0.04));
    border: 1px solid rgba(96, 165, 250, 0.14);
    box-shadow: 0 18px 38px rgba(4, 8, 20, 0.24);
    backdrop-filter: blur(14px);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 15px;
    color: white;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(55, 115, 212, 0.2);
}

/* ========== Section Title ========== */
.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 52px;
    text-align: center;
    color: var(--fg);
    letter-spacing: 0.01em;
    position: relative;
    padding-bottom: 18px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

/* ========== Environnement / Outils ========== */
.tools-section {
    padding: 90px 0;
    background: linear-gradient(180deg, rgba(55, 115, 212, 0.04), rgba(15, 18, 28, 0.02));
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.tool-item {
    text-align: center;
    padding: 24px 12px;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(55, 115, 212, 0.04));
    border: 1px solid rgba(112, 164, 255, 0.14);
    transition: all 0.3s ease;
}

.tool-item:hover {
    transform: translateY(-4px);
    border-color: rgba(55, 115, 212, 0.5);
    background: linear-gradient(145deg, rgba(55, 115, 212, 0.1), rgba(142, 68, 173, 0.08));
}

.tool-item i {
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.tool-item span {
    font-size: 13px;
    color: #c7d3e8;
    font-weight: 600;
}

/* ========== Footer ========== */
.footer {
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
    border-top: 1px solid rgba(96, 165, 250, 0.14);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    color: #93a6c7;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #cfdbef;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ========== Responsive ========== */
/* Le menu horizontal ne peut plus contenir 8 liens en dessous de ~1100px :
   le burger prend le relais plus tot que le reste du responsive (768px). */
@media (max-width: 1100px) {
    .navbar {
        width: 95%;
        padding: 12px 18px;
        top: 10px;
        border-radius: 28px;
        overflow: visible;
    }

    .logo {
        font-size: 15px;
        letter-spacing: 0.1em;
        max-width: calc(100% - 122px);
        line-height: 1.2;
    }

    .logo::after {
        width: 28px;
    }

    .burger-menu {
        display: flex;
        z-index: 2101;
    }

    .theme-toggle {
        margin-left: auto;
        width: 42px;
        height: 42px;
        font-size: 16px;
        z-index: 2101;
    }


    .nav-links {
        position: fixed;
        top: 88px;
        left: 50%;
        transform: translateX(-50%) translateY(-12px);
        width: calc(100vw - 24px);
        max-width: 460px;
        height: auto;
        max-height: calc(100vh - 108px);
        flex-direction: column;
        background: rgba(10, 12, 20, 0.96);
        backdrop-filter: blur(18px);
        padding: 16px;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow-y: auto;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        list-style: none;
        border: 1px solid rgba(122, 167, 255, 0.14);
        border-radius: 24px;
        margin: 0;
        z-index: 2000;
        box-shadow: 0 24px 48px rgba(4, 8, 20, 0.42);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }


    .nav-links li {
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        text-align: center;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        font-size: 1.08rem;
        font-weight: 600;
        letter-spacing: 1px;
        color: #f3f8ff;
        transition: color 0.2s, background 0.2s, transform 0.2s;
        border-radius: 16px;
        padding: 16px 18px;
    }

    .nav-links a:active,
    .nav-links a:focus,
    .nav-links a:hover {
        color: #ffffff;
        background: rgba(55, 115, 212, 0.22);
    }

    .nav-links a::after {
        display: none;
    }

    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .reviews-content {
        grid-template-columns: 1fr;
    }

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

    .skills-container {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .chat-messages {
        height: 350px;
    }

    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-message .message-content,
    .bot-message .message-content {
        max-width: 85%;
    }
}
