
/*CUSTOM FONT - loaded via <link> in HTML head for non-blocking rendering */


  /* LANGUAGE TOGGLE */
.lang-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100001;
    background: var(--bg-alt);
    color: var(--bg);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid transparent;
}

.lang-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* TERMINAL MODE TOGGLE */
.term-toggle {
    position: fixed;
    bottom: 20px;
    left: 90px;
    z-index: 100001;
    background: var(--bg-alt);
    color: var(--bg);
    width: 55px;
    height: 45px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid transparent;
}

.term-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.term-shortcut-arrow {
    position: fixed;
    bottom: 72px;
    left: 117px;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    animation: termHintFadeIn 0.5s 1s forwards;
    opacity: 0;
}

.term-shortcut-label {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--bg-alt);
    opacity: 0.55;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.term-shortcut-arrow-svg {
    color: var(--bg-alt);
    opacity: 0.45;
    margin-top: -2px;
}

@keyframes termHintFadeIn {
    0% { opacity: 0.5; transform: translateX(-50%) translateY(-5px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

body.terminal-mode .term-shortcut-label {
    color: #138A36 !important;
}

body.terminal-mode .term-shortcut-arrow-svg {
    color: #138A36 !important;
}

/* TERMINAL MODE STYLES */
body.terminal-mode {
    background-color: #0F0A0A !important;
    color: #138A36 !important;
    cursor: crosshair !important;
    font-family: 'JetBrains Mono', monospace !important;
}

body.terminal-mode * {
    border-radius: 0 !important;
    font-family: 'JetBrains Mono', monospace !important;
    cursor: crosshair !important;
    box-shadow: none !important;
}

/* Texte en vert */
body.terminal-mode .hero-name h1,
body.terminal-mode .hero-title p,
body.terminal-mode .hero-greeting h5,
body.terminal-mode .cv-name,
body.terminal-mode .cv-title,
body.terminal-mode h1, body.terminal-mode h2,
body.terminal-mode h3, body.terminal-mode h4,
body.terminal-mode h5, body.terminal-mode p,
body.terminal-mode span, body.terminal-mode a,
body.terminal-mode li,
body.terminal-mode .project-content h3,
body.terminal-mode .project-content p,
body.terminal-mode .contact-title,
body.terminal-mode .about-text,
body.terminal-mode .nav-item,
body.terminal-mode .animation-copyright {
    color: #138A36 !important;
}

/* Wassil NAKIB et SilloVV en vert - haute spécificité */
body.terminal-mode #nom,
body.terminal-mode #sillow,
body.terminal-mode h1#nom,
body.terminal-mode h1#sillow,
body.terminal-mode .hero-name h1#nom,
body.terminal-mode .hero-name h1#sillow {
    color: #138A36 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #138A36 !important;
}

/* Conteneurs avec bordure verte (PAS le CV) */
body.terminal-mode .hero-tag,
body.terminal-mode .tech-tag {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
}

body.terminal-mode #about-me {
    background: #0F0A0A !important;
}

body.terminal-mode .about-img-placeholder {
    border-color: #138A36 !important;
    background: rgba(19, 138, 54, 0.05) !important;
    color: #138A36 !important;
}

/* À propos de moi - titre en vert */
body.terminal-mode .propos,
body.terminal-mode .propos em,
body.terminal-mode #about-me h2,
body.terminal-mode #about-me em {
    color: #138A36 !important;
}

/* Signature en vert pour le mode terminal */
body.terminal-mode .signature {
    filter: brightness(0) saturate(100%) invert(39%) sepia(52%) saturate(1066%) hue-rotate(111deg) brightness(87%) contrast(92%) !important;
}

body.terminal-mode .signature:hover {
    filter: brightness(0) saturate(100%) invert(39%) sepia(52%) saturate(1066%) hue-rotate(111deg) brightness(100%) contrast(92%) !important;
}

/* Boutons TERM et FR/ENG - texte noir sur fond vert */
body.terminal-mode .lang-toggle,
body.terminal-mode .term-toggle {
    background: #138A36 !important;
    color: #0F0A0A !important;
    border: 2px solid #0F0A0A !important;
}

body.terminal-mode .lang-toggle span,
body.terminal-mode .term-toggle span {
    color: #0F0A0A !important;
}

/* Animation/dessin en vert */
body.terminal-mode #hero__animation__img {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

/* Logo menu - cibler .sidebar #btn spécifiquement */
body.terminal-mode .sidebar #btn {
    color: #138A36 !important;
}

/* Toutes les icônes boxicons en vert */
body.terminal-mode i.bx,
body.terminal-mode .bx {
    color: #138A36 !important;
}

/* Section ressources */
body.terminal-mode #resources,
body.terminal-mode .resources-grid,
body.terminal-mode .resource-category {
    background: #0F0A0A !important;
}

body.terminal-mode .resource-card {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
}

body.terminal-mode .resource-icon,
body.terminal-mode .resource-card .resource-icon {
    background: #0F0A0A !important;
    background-image: none !important;
    border: 1px solid #138A36 !important;
}

body.terminal-mode .resource-icon i,
body.terminal-mode .resource-icon i.bx,
body.terminal-mode .resource-card .resource-icon i {
    color: #138A36 !important;
}

/* Icône download et autres icônes boxicons */
body.terminal-mode .bx-download,
body.terminal-mode i.bx-download,
body.terminal-mode .cv-download-fixed i {
    color: #138A36 !important;
}

/* Section Contact - fond noir, pas d'ombres */
body.terminal-mode #contact-section,
body.terminal-mode .contact-content,
body.terminal-mode .contact-method,
body.terminal-mode .social-method,
body.terminal-mode .email-method,
body.terminal-mode .method-content {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
}

/* Icônes de contact - désactiver tous les effets visuels */
body.terminal-mode .contact-icon {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: none !important;
    transform: none !important;
}

body.terminal-mode .contact-icon:hover {
    transform: translateY(-3px) !important;
    background: #0F0A0A !important;
    border-color: #138A36 !important;
    box-shadow: 0 5px 15px rgba(19, 138, 54, 0.2) !important;
}

body.terminal-mode .contact-icon::before,
body.terminal-mode .contact-icon::after {
    display: none !important;
}

body.terminal-mode .contact-icon img {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
    transition: none !important;
    transform: none !important;
}

body.terminal-mode .contact-icon:hover img {
    transform: none !important;
}

/* Section Email */
body.terminal-mode .mail-container,
body.terminal-mode .mail,
body.terminal-mode .copy-btn {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
    color: #138A36 !important;
}

body.terminal-mode .mail::before,
body.terminal-mode .mail::after {
    display: none !important;
}

body.terminal-mode .check-logo-icon {
    filter: invert(39%) sepia(52%) saturate(1066%) hue-rotate(111deg) brightness(87%) contrast(92%) !important;
}

/* Section Malt en mode terminal */
body.terminal-mode .malt-method,
body.terminal-mode .malt-container {
    background: #0F0A0A !important;
}

body.terminal-mode .malt-link {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
    color: #138A36 !important;
    backdrop-filter: none !important;
}

body.terminal-mode .malt-link img {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

body.terminal-mode .malt-link:hover {
    background: #0F0A0A !important;
    transform: none !important;
}

/* Sidebar en mode terminal */
body.terminal-mode .sidebar {
    background: #0F0A0A !important;
    border: 1px solid #138A36 !important;
}

/* LOADING SCREEN - Positioned exactly like hero */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    z-index: 999999999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-greeting {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--bg-alt);
    font-style: italic;
    min-height: 28px;
}

.loading-name {
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
    min-height: 58px;
    font-family: 'Playfair Display', serif;
}

.loading-title {
    font-size: 18px;
    color: var(--text);
    font-weight: 400;
    min-height: 27px;
}

.loading-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.loading-tag {
    background: rgba(51, 51, 51, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 51, 51, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.loading-tag.visible {
    opacity: 1;
    transform: translateY(0);
}

#typing-cursor {
    display: none;
    width: 2px;
    height: 1em;
    background-color: var(--text);
    margin-left: 2px;
    animation: typing-blink 0.7s infinite;
    vertical-align: text-bottom;
}

@keyframes typing-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Progress bar like Claude Code */
.loading-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 35px;
}

.loading-progress-container {
    width: 200px;
    height: 3px;
    background-color: rgba(51, 51, 51, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--bg-alt) 0%, var(--text) 100%);
    border-radius: 3px;
    transition: width 0.15s ease-out;
}

.loading-progress-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--bg-alt);
    min-width: 35px;
    font-family: 'Courier New', monospace;
}

/* Mobile loading screen */
@media screen and (max-width: 768px) {
    .loading-greeting {
        font-size: 16px;
    }

    .loading-name {
        font-size: 32px;
        min-height: 40px;
    }

    .loading-title {
        font-size: 16px;
        min-height: 24px;
    }

    .loading-tags {
        flex-direction: column;
        gap: 8px;
    }

    .loading-tag {
        font-size: 11px;
        padding: 6px 14px;
    }
}

/* GENERAL */
  body{
    font-family: 'Playfair Display', serif;
    background-color: var(--bg);
    color:var(--text);
    height: 100%;
    width: 100%;
    margin:0;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    cursor: none;
  }

h1, h2, h5, p{
    margin:0;

}

.icon{
    height:2rem;
    width:2rem;
    margin: 0 0.5rem;

}

/* HERO */

#hero{
    cursor: none;
    position: absolute;
    top:50%;
    left:50%;
    transform: translate(-50%,-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}


.hero-content{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 15;
    position: relative;
}

.hero-logo {
    position: absolute;
    top: -20px;
    right: -160px;
    z-index: 20;
}

.hero-logo-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
}

.hero-logo-btn:focus-visible {
    outline: 2px solid var(--bg-alt);
    outline-offset: 6px;
    border-radius: 4px;
}

/* Borderless on purpose: the logo ships its own alpha channel */
.hero-logo-img {
    width: 130px;
    height: auto;
    object-fit: contain;
    transform: rotate(6deg);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
                filter 0.35s ease;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

.hero-logo-btn:hover .hero-logo-img,
.hero-logo-btn:focus-visible .hero-logo-img {
    transform: rotate(0deg) scale(1.08);
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.2));
}

.hero-greeting{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.wave-emoji{
    width: 32px;
    height: 32px;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.hero-greeting h5{
    font-size: 20px;
    color: var(--bg-alt);
    font-weight: 400;
    margin: 0;
    font-style: italic;
}

.hero-name{
    position: relative;
    cursor: pointer;
}

.hero-name h1#nom{
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(
        90deg,
        var(--text) 0%,
        var(--text) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.hero-name h1#sillow{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(
        90deg,
        var(--bg-alt) 0%,
        var(--text) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    clip-path: circle(0px at 50% 50%);
    pointer-events: none;
    z-index: 10;
}




.hero-title{
    text-align: center;
}

.hero-title p{
    font-size: 22px;
    color: var(--text);
    font-weight: 500;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.hero-tags{
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tag{
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-tag:hover{
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.cursor{
    font-weight: 900;
    font-size: 28px;
    animation: blink 1s infinite;
    color: var(--text);
    font-family: monospace;
    letter-spacing: -2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

#hero_animation{
    margin-left: 10px;
    height: 21rem;
    width: 21rem;
    max-height: 100Vh;
    max-width: 100Vh;
    position: relative;

}

#hero__animation__img{
    margin-top: 8px;
    background-image: var(--tl-1);
    height: 110%;
    width: 100%;
    position: relative;
    transition: background-image 300ms ease-out;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;


}

.animation-copyright {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 11px;
    color: var(--text);
    opacity: 0.6;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    pointer-events: none;
    z-index: 10;
}

#top-left-img{
    margin-top: 8px;
    background-image: var(--tl-4);
    height: 110%;
    background-position: center;
    background-size: cover;
}

.sidebar{
    position: relative;
    top: 0;
    left: 0;
    height: 6Vh;
    width:50px;
    background-color: var(--bg);
    opacity:0.9;
    padding: .4rem .8rem;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: width, height;
}


.sidebar.active~ .main-content{
    left: 150px;
    width: calc(100%-160px);
}

.sidebar.active{
    width:30Vw;
    height: 50Vh;
}

.sidebar #btn{

    position: absolute;
    color: var(--bg-alt);
    top: 0.4rem;
    left: 50%;
    font-size: 50px;
    transform: translateX(-50%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;

}

.sidebar .menu-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
}

body.terminal-mode .sidebar .menu-logo,
body.terminal-mode .sidebar img#btn,
body.terminal-mode #btn.menu-logo {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%) !important;
}

.sidebar.active #btn{
    left: 90%;
    
     
}



.sidebar .top .logo{
    color: var(--text);
    display: flex;
    height: 50px;
    width: 100%;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform, opacity;
    font-weight: bold;
}

.sidebar.active .top .logo{
    transform: translate(15Vw);
    opacity: 1;
    
}

.top .logo i{
    font-size:2rem ;
    margin-right: 8px;
}

.sidebar ul li{
    position: relative;
    list-style-type: none;
    height: 50px;
    width: 100%;
    margin: 0.8rem auto;
    line-height: 50px;
}


.sidebar ul li a{
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 0.8rem;
}

.sidebar.active ul li a:hover{
    padding-left: 5px;
    background-color:var(--bg-alt);
    color: var(--bg);
    
}

.sidebar ul li a i {
    min-width: 50px;
    text-align: center;
    height: 50px;
    border-radius: 12px;
    line-height: 50px;
}

.sidebar .nav-item{
    display:none;
}

.sidebar.active .nav-item{
    display: flex;
    opacity: 0;
    animation: fadeIn 2s forwards;
}



@keyframes fadeIn{
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

/* Sidebar TERM shortcut hint */
.sidebar-term-hint {
    display: none;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    opacity: 0;
    text-align: center;
    padding: 4px 0;
    margin-top: 4px;
    pointer-events: none;
}

.sidebar.active .sidebar-term-hint {
    display: block;
    opacity: 0.35;
    animation: fadeIn 2s forwards;
}

body.terminal-mode .sidebar-term-hint {
    color: #138A36 !important;
}

/* Hidden Easter Egg Menu Item */
.hidden-menu-item {
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    padding: 0.4rem 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar.active .hidden-menu-item {
    pointer-events: auto;
}

.sidebar.active .hidden-menu-item:hover {
    opacity: 1;
}

.hidden-nav-link {
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 0.8rem;
    height: 50px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.hidden-nav-link:hover {
    padding-left: 5px;
    background-color: var(--bg-alt);
    color: var(--bg);
    opacity: 1;
}

.hidden-nav-item {
    display: none;
    font-size: 14px;
    font-style: italic;
}

.sidebar.active .hidden-nav-item {
    display: flex;
}

.hidden-links {
    display: flex;
    gap: 8px;
    margin-left: 10px;
}

.hidden-links a {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hidden-links a:hover {
    transform: scale(1.2);
    background: var(--text);
}




@keyframes top-left{
    0%{
       background-image: var(--tl-1); 
    }
    25%{
        background-image: var(--tl-2); 
    }
    50%{
        background-image: var(--tl-3); 
    }
    75%{
        background-image: var(--tl-4);
    }
    100%{
        background-image: var(--tl-4);
    }
}

@keyframes reverse-top-left{
    0%{
       background-image: var(--tl-4); 
    }
    25%{
        background-image: var(--tl-3); 
    }
    50%{
        background-image: var(--tl-2); 
    }
    75%{
        background-image: var(--tl-1); 
    }
    100%{
        background-image: var(--tl-1); 
    }
}


/* VARIABLES CSS */

:root{
    /*colors*/
    --bg: #fffefa;
    --bg-alt:#333;
    --bg-alt2:#f0f0f0;
    --bg-transparent:#ffffffe8;
    --border:0.01rem solid #333;
    --text:#333;
    --text-alt:#fff;
    

    /* face animation */
    --tl-1: url(../assets/face-animation-light/tl1.webp);
    --tl-2: url(../assets/face-animation-light/tl2.webp);
    --tl-3: url(../assets/face-animation-light/tl4.webp);
    --tl-4: url(../assets/face-animation-light/tl3.webp);
}

/* CHAT LLM SECTION */
#chat-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-transparent) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s forwards;
    padding: 20px;
    box-sizing: border-box;
}

.chat-container {
    width: 100%;
    max-width: 800px;
    height: 80vh;
    background: var(--bg);
    border: 2px solid var(--bg-alt);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}

.chat-header {
    padding: 25px;
    text-align: center;
    border-bottom: 2px solid var(--bg-alt2);
}

.chat-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px 0;
}

.chat-header p {
    font-size: 16px;
    color: var(--bg-alt);
    margin: 0;
    font-style: italic;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-alt2);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--bg-alt);
    border-radius: 10px;
}

.message {
    display: flex;
    max-width: 80%;
    margin-bottom: 10px;
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    background: var(--bg-alt2);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
}

.user-message .message-content {
    background: var(--bg-alt);
    color: var(--bg);
    border-bottom-right-radius: 8px;
}

.bot-message .message-content {
    border-bottom-left-radius: 8px;
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid var(--bg-alt2);
    display: flex;
    gap: 10px;
    background: var(--bg);
}

#chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid var(--bg-alt2);
    border-radius: 25px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    border-color: var(--bg-alt);
}

#send-button {
    padding: 12px 24px;
    background: var(--bg-alt);
    color: var(--bg);
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-button:hover {
    background: var(--bg-alt2);
    transform: translateY(-2px);
}

#send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chat-info {
    padding: 10px 20px;
    text-align: center;
    background: var(--bg-alt2);
    color: var(--text);
    font-size: 12px;
    opacity: 0.8;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--bg-alt);
    font-style: italic;
    opacity: 0.8;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--bg-alt);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

#cvscroller{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    animation: fadeIn 0.5s forwards;
    padding: 20px 20px 40px 20px;
    box-sizing: border-box;
    min-height: 100vh;
    font-family: Georgia, serif;
    contain: layout style;
    will-change: opacity;
}

#cvscroller::-webkit-scrollbar{
    width: 8px;
}

#cvscroller::-webkit-scrollbar-track {
    background: var(--bg-alt2);
    border-radius: 10px;
}

#cvscroller::-webkit-scrollbar-thumb {
    background: var(--bg-alt);
    border-radius: 10px;
}

.cv-container{
    position: relative;
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--bg-alt);
    border-radius: 20px;
    padding: 40px;
    margin-top: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: var(--text);
    line-height: 1.6;
    backdrop-filter: blur(10px);
    z-index: 1;
}

.cv-header{
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-alt);
}

.cv-name{
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px 0;
    letter-spacing: 2px;
}

.cv-title{
    font-size: 20px;
    font-weight: 500;
    color: var(--bg-alt);
    margin: 0 0 15px 0;
    font-style: italic;
}

.cv-contact{
    font-size: 14px;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.cv-availability{
    font-size: 14px;
    color: var(--bg-alt);
    font-weight: 500;
    font-style: italic;
}

.cv-download-fixed{
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.download-btn-fixed{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg);
    color: var(--bg-alt);
    text-decoration: none;
    border-radius: 50%;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 2px solid var(--bg-alt);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-btn-fixed:hover{
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--text) 100%);
    color: var(--bg);
    border: 2px solid transparent;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.download-btn-fixed i{
    font-size: 24px;
}

.cv-download-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
    transition: all 0.3s ease;
}

.download-btn-fixed:hover .cv-download-icon {
    filter: brightness(0) invert(1);
}

body.terminal-mode .cv-download-icon {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

body.terminal-mode .download-btn-fixed:hover .cv-download-icon {
    filter: brightness(0) saturate(100%);
}

.cv-preview {
    position: absolute;
    bottom: 80px;
    right: -10px;
    background: var(--bg-alt);
    color: var(--bg);
    padding: 15px;
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 9999;
    transform: translateY(10px);
}

.cv-preview::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--bg-alt);
}

.cv-preview-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.cv-preview-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    opacity: 0.9;
}

.cv-preview-content small {
    font-size: 12px;
    opacity: 0.7;
}

.download-btn-fixed:hover .cv-preview {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.download-arrow{
    position: relative;
    transform-origin: center;
    margin-left: -15px;
}

.arrow-svg{
    width: 100px;
    height: 100px;
    opacity: 0.85;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.15)) brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2878%) hue-rotate(346deg) brightness(104%) contrast(97%);
}



.cv-section{
    margin-bottom: 30px;
}

.cv-section-title{
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-alt2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cv-experience{
    margin-bottom: 25px;
}

.cv-exp-header{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cv-exp-header h4{
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex: 1;
}

.cv-duration{
    font-size: 14px;
    color: var(--bg-alt);
    font-style: italic;
    font-weight: 500;
}

.cv-education{
    margin-bottom: 20px;
}

.cv-education h4{
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 5px 0;
}

.cv-school{
    font-size: 14px;
    color: var(--bg-alt);
    font-style: italic;
    margin: 0 0 10px 0;
}

.cv-skills{
    display: grid;
    gap: 15px;
}

.cv-skill-category h5{
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.cv-skill-category p{
    font-size: 14px;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}

.gitlab-preview-container {
    position: relative;
    margin-bottom: 15px;
}

.cv-gitlab-link{
    font-size: 14px;
    margin-bottom: 15px;
}

.gitlab-link {
    color: var(--bg-alt);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gitlab-link:hover{
    text-decoration: underline;
    color: var(--text);
}

.gitlab-preview {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.gitlab-preview-container:hover .gitlab-preview {
    opacity: 1;
    visibility: visible;
    margin-left: 10px;
}

.gitlab-thumbnail {
    width: 550px;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid var(--bg-alt);
    transition: transform 0.3s ease;
}

.gitlab-preview-container:hover .gitlab-thumbnail {
    transform: scale(1.05);
}

.cv-projects h5{
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 15px 0 10px 0;
}

/* Logos des entreprises */
.cv-company-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.cv-company-logo {
    flex-shrink: 0;
    margin-top: 5px;
    overflow: visible;
    position: relative;
}

/* Indicateur de position actuelle */
.current-position-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
    animation: pulse-green 2s infinite;
    z-index: 10;
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.company-logo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.company-logo-placeholder:hover {
    transform: scale(1.1);
}

.company-logo-placeholder.hermine {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.company-logo-placeholder.equasens {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.cv-company-details {
    flex: 1;
}

.cv-company-details h4 {
    margin-top: 0;
}

.company-logo-link {
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.company-logo-link:hover .company-logo-placeholder {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.company-logo-link:hover .company-logo-img {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.education-logo-link {
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.education-logo-link:hover .education-logo-img {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Tooltips pour logos */
.logo-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-alt);
    color: var(--bg);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
}

.logo-tooltip::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--bg-alt);
}

.company-logo-link:hover .logo-tooltip,
.education-logo-link:hover .logo-tooltip {
    opacity: 1;
    visibility: visible;
    top: -45px;
}

/* Logos des entreprises - images réelles */
.company-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.company-logo-img.cerema {
    object-fit: contain;
    padding: 3px;
    background: #fff;
    border: 0;
    box-shadow: 0 4px 12px rgba(22, 79, 99, 0.16);
}

/* Certificats */
.certification-item {
    position: relative;
    cursor: pointer;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.certification-item:hover {
    color: var(--bg-alt);
}

.certification-preview {
    position: absolute;
    left: 70%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.certification-item:hover .certification-preview {
    opacity: 1;
    visibility: visible;
    margin-left: 15px;
}

.certificate-thumbnail {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border: 2px solid var(--bg-alt);
    transition: transform 0.3s ease;
}

.certification-item:hover .certificate-thumbnail {
    transform: scale(1.05);
}

/* Logos d'éducation */
.cv-education-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.cv-education-logo {
    flex-shrink: 0;
    margin-top: 5px;
    overflow: visible;
    position: relative;
}

.education-logo-img {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.education-logo-img:hover {
    transform: scale(1.1);
}

.education-logo-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.education-logo-placeholder:hover {
    transform: scale(1.1);
}

.education-logo-placeholder.master {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.education-logo-placeholder.polytech {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.cv-education-details {
    flex: 1;
}

.cv-education-details h4 {
    margin-top: 0;
    margin-bottom: 5px;
}

/* Indicateur hover pour certificats */
.certification-item {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin-left: 0;
    padding-left: 0;
    position: relative;
}

.certification-text {
    flex: 1;
}

.hover-indicator {
    font-size: 14px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.certification-item:hover .hover-indicator {
    opacity: 1;
    transform: scale(1.2);
}

.cv-section ul{
    padding-left: 20px;
    margin: 0;
}

/* Alignement spécifique pour les certifications */
.cv-section:has(.certification-item) ul {
    list-style: none;
    padding-left: 0;
}

.cv-section:has(.certification-item) li {
    padding-left: 20px;
    position: relative;
}

/* Surlignage orange pastel pour éléments importants */
.highlight {
    background: linear-gradient(120deg, rgba(255, 200, 120, 0.5) 0%, rgba(255, 180, 100, 0.5) 100%);
    padding: 2px 4px;
    border-radius: 3px;
    color: var(--text);
    font-weight: 600;
    transition: all 0.2s ease;
}

.highlight:hover {
    background: linear-gradient(120deg, rgba(255, 200, 120, 0.7) 0%, rgba(255, 180, 100, 0.7) 100%);
}

.cv-section li{
    margin-bottom: 5px;
    font-size: 14px;
    line-height: 1.5;
} 

.closeb {
    position: absolute;
    cursor: pointer;
    font-size: 28px;
    color: var(--text);
    background: var(--bg);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-alt);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 500;
}

#closeb-cv {
    top: 20px;
    right: 20px;
}

#closeb-projects, #closeb-chat {
    top: 30px;
    right: 30px;
}

#closeb-contact, #closeb-about {
    top: 15px;
    right: 30px;
}

#closeb-resources {
    top: 15px;
    right: 30px;
}

.closeb:hover {
    background: var(--bg-alt);
    color: var(--bg);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

#projectwrapper{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-transparent) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    animation: fadeIn 0.5s forwards;
    padding: 40px 20px;
    box-sizing: border-box;
    contain: layout style;
    will-change: opacity;
}

.projects-header{
    text-align: center;
    margin-bottom: 40px;
    color: var(--text);
    position: relative;
}

.projects-header-glow {
    position: absolute;
    left: 50%;
    top: 20%;
    width: min(420px, 70vw);
    height: 120px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center,
        rgba(28, 110, 164, 0.18) 0%,
        rgba(28, 110, 164, 0) 70%);
    pointer-events: none;
    filter: blur(8px);
    z-index: -1;
}

.projects-header h2{
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    background: linear-gradient(120deg, #1c2b4a 20%, #1c6ea4 55%, #1c2b4a 90%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: projectsTitleShine 7s ease-in-out infinite;
}

@keyframes projectsTitleShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.projects-header p{
    font-size: 18px;
    color: var(--bg-alt);
    margin: 0;
    font-style: italic;
}

.project-section{
    margin-bottom: 50px;
    width: 100%;
    max-width: 1400px;
}

.section-title{
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-alt2);
    letter-spacing: 1px;
}

.projects-row{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    width: 100%;
    perspective: 1400px;
}

.project-card{
    --mx: 50%;
    --my: 50%;
    background: var(--bg);
    border: 1px solid rgba(28, 43, 74, 0.12);
    border-radius: 20px;
    padding: 25px;
    transition: opacity 0.35s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 14px 34px rgba(16, 28, 48, 0.08);
    position: relative;
    overflow: visible;
    cursor: pointer;
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.97);
    transform-style: preserve-3d;
    will-change: transform;
    perspective: 900px;
}

.project-card.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

.project-card.is-live {
    /* Tilt is applied inline by JS — keep transform out of CSS transitions */
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        380px circle at var(--mx) var(--my),
        rgba(28, 110, 164, 0.2),
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 0;
}

.project-card > * {
    position: relative;
    z-index: 1;
}

/* Tooltip pour preview project */
.project-card::after {
    content: '↓ Click to see the project ↓';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-alt);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    pointer-events: none;
}

html[data-lang="fr"] .project-card::after {
    content: '↓ Clic pour voir le projet ↓';
}

.project-card:hover::after {
    opacity: 1;
    visibility: visible;
    top: -45px;
}

.project-card:hover,
.project-card.is-live:hover {
    box-shadow:
        0 22px 48px rgba(16, 28, 48, 0.16),
        0 0 0 1px rgba(28, 110, 164, 0.22);
    border-color: rgba(28, 110, 164, 0.4);
    z-index: 100;
}

.project-card:hover::before,
.project-card.is-live:hover::before {
    opacity: 1;
}

.project-card.is-visible:nth-child(1) { transition-delay: 0.02s; }
.project-card.is-visible:nth-child(2) { transition-delay: 0.06s; }
.project-card.is-visible:nth-child(3) { transition-delay: 0.1s; }
.project-card.is-visible:nth-child(4) { transition-delay: 0.14s; }

/* Project images container - horizontal layout */
.project-images-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: stretch;
}

.project-image{
    height: 120px;
    width: 120px;
    flex-shrink: 0;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-description {
    flex: 1;
    background: rgba(51, 51, 51, 0.05);
    border-radius: 12px;
    padding: 12px 15px;
    border: 1px solid rgba(51, 51, 51, 0.1);
}

.project-description h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px 0;
    text-decoration: underline;
}

.project-description ul {
    margin: 0;
    padding-left: 18px;
    list-style: none;
}

.project-description li {
    font-size: 11px;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 6px;
    position: relative;
    padding-left: 10px;
}

.project-description li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--bg-alt);
    font-weight: bold;
}

.project-description strong {
    color: var(--bg-alt);
    font-weight: 600;
}

.project-second-image {
    margin-bottom: 15px;
    height: 180px;
    background: linear-gradient(145deg, rgba(28, 43, 74, 0.04), rgba(28, 110, 164, 0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(28, 43, 74, 0.1);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    isolation: isolate;
}

.project-second-image::after {
    content: '';
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(
        115deg,
        transparent 35%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 65%
    );
    transform: translateX(-120%);
    transition: transform 0.7s ease;
    pointer-events: none;
    z-index: 2;
}

.project-card:hover .project-second-image::after {
    transform: translateX(120%);
}

.project-second-image:hover {
    z-index: 10;
}

.project-second-image img,
.project-second-image .image-placeholder {
    transform: scale(0.94) translateZ(0);
    opacity: 0.88;
    transition: transform 0.18s ease-out, opacity 0.15s ease;
}

.project-card:hover .project-second-image img,
.project-card:hover .project-second-image .image-placeholder {
    transform: scale(1.06) translateZ(20px);
    opacity: 1;
}

.project-second-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.image-placeholder {
    font-size: 13px;
    color: rgba(51, 51, 51, 0.4);
    font-style: italic;
    font-weight: 500;
}

.project-placeholder{
    font-size: 48px;
    opacity: 0.8;
}

.project-content h3{
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.project-content p{
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.project-tech{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag{
    background: var(--bg-alt2);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--bg-alt);
    transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.project-card:hover .tech-tag {
    transform: translateY(-1px);
}

.project-card:hover .tech-tag:nth-child(odd) {
    background: #1c2b4a;
    color: #fffefa;
    border-color: #1c2b4a;
}

.project-link{
    color: var(--bg-alt);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.project-link:hover{
    color: var(--text);
    transform: translateX(5px);
}


/* Project logo styles */
.project-logo{
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* GitLab logo spécifique - x1.5 */
.project-image img[alt="CI/CD"]{
    width: 140px;
    height: 90px;
}


#contact-section {
    animation: fadeIn 0.5s forwards;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 85vh;
    border: none;
    border-radius: 30px;
    display: flex;
    width: 45vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    backdrop-filter: blur(20px);
    overflow: visible;
}

#contact-section .contact-content {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    text-align: center;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,255,255,0.7) 100%);
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    padding: 40px 30px;
    position: relative;
}

/* contact */
.contact-header {
    text-align: center;
    margin-bottom: 30px;
}

.contact-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.contact-subtitle {
    font-size: 16px;
    color: var(--bg-alt);
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
    width: 100%;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.method-icon {
    font-size: 32px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-content {
    flex: 1;
}

.method-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px 0;
}

.contact-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-footer p {
    font-size: 14px;
    color: var(--bg-alt);
    margin: 0;
    font-weight: 500;
}

.contact-icons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding: 10px 0;
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.contact-icon img {
    border: none;
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 25px;
    text-decoration: none;
}

.contact-icon:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-icon:hover img {
    transform: scale(1.05);
}

.tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-alt);
    color: var(--bg);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 9999;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--bg-alt);
}

.contact-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -55px;
}

.mail-container {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    position: relative;
}

.mail {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    background: rgba(255,255,255,0.2);
    padding: 15px 25px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.mail:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mail .tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-alt);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 9999;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    pointer-events: none;
}

.mail .tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--bg-alt);
}

.mail:hover .tooltip {
    opacity: 1;
    visibility: visible;
    top: -50px;
}

/* Check logo displayed after email copy */
.check-logo-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

.copy-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 18px;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.copy-btn:active {
    transform: translateY(0) scale(0.95);
}

.copy-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) saturate(100%);
    transition: all 0.3s ease;
}

.copy-btn:hover .copy-icon {
    transform: scale(1.1);
}

body.terminal-mode .copy-icon {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

/* Section Malt Freelance */
.malt-method {
    text-align: center;
}

.malt-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.malt-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
}

.malt-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.malt-link img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.copy-message {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(245, 222, 179, 0.95);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1003;
    box-shadow: 0 4px 12px rgba(245, 222, 179, 0.4);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    border: 1px solid rgba(245, 222, 179, 0.8);
}

.copy-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* ============== RESOURCES SECTION ============== */
#resources {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    max-width: 900px;
    max-height: 80vh;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-transparent) 100%);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow-y: auto;
    animation: fadeIn 0.5s forwards;
    z-index: 1000;
    contain: layout style;
    will-change: opacity, transform;
}

.resources-header {
    text-align: center;
    margin-bottom: 35px;
}

.resources-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.resources-header p {
    font-size: 16px;
    color: var(--bg-alt);
    font-style: italic;
}

.resource-category-title {
    font-size: 18px;
    color: var(--text);
    margin: 30px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bg-alt);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-category-title:first-of-type {
    margin-top: 20px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(51, 51, 51, 0.1);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--bg-alt);
}

.resource-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--text) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-icon i {
    font-size: 24px;
    color: var(--bg);
}

.resource-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

body.terminal-mode .resource-icon-img {
    filter: brightness(0) saturate(100%) invert(36%) sepia(89%) saturate(412%) hue-rotate(95deg) brightness(95%) contrast(92%);
}

.resource-content {
    flex: 1;
}

.resource-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.resource-desc {
    font-size: 13px;
    color: var(--bg-alt);
    line-height: 1.4;
    margin-bottom: 8px;
}

.resource-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(51, 51, 51, 0.1);
    border-radius: 10px;
    color: var(--text);
    font-weight: 500;
}

.resource-external {
    font-size: 18px;
    color: var(--bg-alt);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-card:hover .resource-external {
    opacity: 1;
}

/* Resources mobile */
@media screen and (max-width: 768px) {
    #resources {
        width: 90vw;
        padding: 25px;
        max-height: 85vh;
    }

    .resources-header h2 {
        font-size: 24px;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .resource-card {
        padding: 15px;
    }

    .resource-icon {
        width: 40px;
        height: 40px;
    }

    .resource-icon i {
        font-size: 20px;
    }
}

/* Scrollbar personnalisée manuscrite pour about-me */
#about-me::-webkit-scrollbar {
    width: 8px;
}

#about-me::-webkit-scrollbar-track {
    background: #f8f6f0;
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 19, 0.1);
}

#about-me::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8B4513 0%, #A0522D 100%);
    border-radius: 6px;
    border: 1px solid rgba(139, 69, 19, 0.3);
}

#about-me::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #A0522D 0%, #8B4513 100%);
}

#about-me{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: fadeIn 0.5s forwards;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-transparent) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px 80px;
    box-sizing: border-box;
    color: var(--text);
    z-index: 1000;
    contain: layout style;
    will-change: opacity;
}

.about-inner {
    max-width: 760px;
    width: 100%;
    text-align: left;
    line-height: 1.6;
    font-size: 18px;
}

.about-header {
    text-align: center;
    margin-bottom: 28px;
}

.about-eyebrow {
    margin: 0 0 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8592a8;
}

#about-me .propos{
    font-size: clamp(28px, 4vw, 40px);
    text-align: center;
    font-weight: 600;
    padding-bottom: 0;
    margin-bottom: 10px;
    border-bottom: none;
    color: var(--text);
}

.about-lead {
    margin: 0;
    font-size: 15px;
    font-style: italic;
    color: #5a6578;
}

.about-milestones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 0 36px;
    padding: 0;
}

.about-chip {
    appearance: none;
    border: 1px solid rgba(28, 43, 74, 0.14);
    background: rgba(255, 254, 250, 0.92);
    color: #1c2b4a;
    font: inherit;
    font-family: 'Playfair Display', serif;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease,
                border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 14px rgba(16, 28, 48, 0.06);
}

.about-chip:hover,
.about-chip:focus-visible {
    transform: translateY(-2px);
    background: #1c2b4a;
    border-color: #1c2b4a;
    color: #fffefa;
    box-shadow: 0 10px 24px rgba(16, 28, 48, 0.18);
    outline: none;
    text-decoration: none;
}

.about-chip--now {
    cursor: pointer;
    background: linear-gradient(135deg, #1c6ea4 0%, #1c2b4a 100%);
    border-color: transparent;
    color: #fffefa;
    box-shadow: 0 8px 22px rgba(28, 110, 164, 0.28);
}

.about-chip--now:hover,
.about-chip--now:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2580bc 0%, #243556 100%);
    color: #fffefa;
    box-shadow: 0 12px 28px rgba(28, 110, 164, 0.36);
}

/* Style pour le texte à propos de moi manuscrit */
.about-text {
    font-family: 'Kalam', cursive;
    font-size: 18px;
    line-height: 1.9;
    color: #1a1a1a;
    text-align: left;
    word-wrap: break-word;
    position: relative;
    z-index: 3;
    font-weight: 400;
    letter-spacing: 0.4px;
    padding: 8px 4px 0;
    border-top: 1px solid rgba(28, 43, 74, 0.1);
}

/* Effet de variation d'encre pour certains mots */
.about-text::first-letter {
    font-family: 'Dancing Script', cursive;
    font-size: 42px;
    float: left;
    line-height: 38px;
    padding-right: 8px;
    padding-top: 4px;
    color: #8B4513;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Style pour les paragraphes */
.about-text br + br {
    display: block;
    content: "";
    margin-top: 20px;
}

/* Container de la signature */
.signature-container {
    display: flex;
    justify-content: right;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    position: relative;
    z-index: 3;
}

/* Style de la signature */
.signature {
    max-width: 180px;
    height: auto;
    opacity: 0.9;
    filter: sepia(20%) saturate(150%) hue-rotate(15deg) brightness(0.95);
    transition: all 0.3s ease;
    transform: rotate(-2deg);
}

.signature:hover {
    opacity: 1;
    transform: rotate(0deg) scale(1.05);
    filter: sepia(30%) saturate(180%) hue-rotate(15deg) brightness(1);
}

/* Styles pour les mots-clés avec hover */
.hover-word {
    color: #c45a12;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease;
    position: relative;
    border-radius: 3px;
}

.hover-word:hover {
    color: #8B4513;
    background: rgba(210, 105, 30, 0.12);
    text-decoration: none;
}

button.hover-word.about-chip:hover {
    background: #1c2b4a;
    color: #fffefa;
}

/* Images de hover profil */
.hover-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%) scale(0.94);
    max-width: min(560px, 70vw);
    max-height: 52vh;
    width: auto;
    height: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0.35s;
    z-index: 999999;
    pointer-events: none;
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(16, 28, 48, 0.35);
    border: 0;
    overflow: hidden;
    background: var(--bg);
    padding: 0;
}

.hover-image.is-shown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.hover-image--pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 28px 36px;
    max-width: min(640px, 86vw);
    background: rgba(255, 254, 250, 0.97);
}

.hover-image--pair picture,
.hover-image--pair img {
    max-height: 140px;
    width: auto;
    object-fit: contain;
}

.hover-image--pair picture img {
    max-height: 140px;
}

.hover-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}



/* Runaway Button Easter Egg */
.dont-click-btn {
    position: fixed;
    bottom: 80px;
    right: 30px;
    padding: 12px 24px;
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--text);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(51, 51, 51, 0.15);
    transition: transform 0.25s ease-out, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 9999;
    font-family: 'Playfair Display', serif;
}

.dont-click-btn:hover {
    box-shadow: 0 6px 20px rgba(51, 51, 51, 0.25);
    background: var(--bg-alt2);
}

/* Terminal mode - dont-click-btn */
body.terminal-mode .dont-click-btn {
    background: #0F0A0A !important;
    color: #138A36 !important;
    border-color: #138A36 !important;
}

body.terminal-mode .dont-click-btn:hover {
    background: #138A36 !important;
    color: #0F0A0A !important;
}

.dont-click-btn.caught {
    animation: btnShake 0.5s ease-in-out;
    background: var(--bg-alt);
    color: var(--bg);
    border-color: var(--bg-alt);
}

@keyframes btnShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}





/* Selma heart emoji overlay */
.selma-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 182, 193, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.selma-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.selma-emoji {
    font-size: 80px;
    animation: heartBeat 1s infinite;
    color: #e91e63;
    text-shadow: 0 0 20px rgba(233, 30, 99, 0.5);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Nul Easter Egg - Screen shake */
.nul-shake {
    animation: violentShake 0.1s infinite;
}

@keyframes violentShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, 5px) rotate(-2deg); }
    50% { transform: translate(10px, -5px) rotate(2deg); }
    75% { transform: translate(-5px, -10px) rotate(-1deg); }
}

/* Nul destruction overlay */
.nul-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.nul-overlay.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.nul-message {
    color: #ff0000;
    font-size: 28px;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #ff0000;
    animation: glitch 0.3s infinite;
}

.nul-countdown {
    color: #ff0000;
    font-size: 120px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 30px #ff0000;
}

.nul-emoji {
    color: white;
    font-size: 60px;
    animation: middleFinger 0.5s ease-in-out;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

@keyframes middleFinger {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.circle{
  height: 20px;
  width: 20px;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999999;
  mix-blend-mode: multiply;
  opacity: 0.8;
}

.inverseur-circle{
  height: 100px;
  width: 100px;
  border-radius: 50%;
  position: fixed; 
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999998;
  background: white !important;
  mix-blend-mode: difference !important;
  opacity: 1;
  display: none;
}

body:not(.page-open) .inverseur-circle {
  display: block !important;
}

.cursor-center{
  height: 4px;
  width: 4px;
  border-radius: 50%;
  position: fixed; 
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999999;
  background: white;
  opacity: 1;
}




.paint-effect {
  filter: blur(0.5px);
  animation: paintGlow 2s infinite alternate;
}

@keyframes paintGlow {
  0% { 
    filter: blur(0.5px) saturate(1.2);
    transform: scale(1);
  }
  100% { 
    filter: blur(1px) saturate(1.5);
    transform: scale(1.1);
  }
}



@media screen and (max-width: 768px) {
    /* Hide runaway button on mobile - too annoying on touch */
    .dont-click-btn {
        display: none;
    }

    /* Hero section mobile */
    #hero {
        padding: 20px;
        gap: 20px;
    }

    .hero-logo {
        position: relative;
        top: auto;
        right: auto;
        align-self: center;
    }

    .hero-logo-img {
        width: 80px;
        transform: rotate(4deg);
    }

    .sidebar.active .top .logo{
        display: none;
    }
    
    .hero-name h1#nom{
        font-size: 32px;
        text-align: center;
        letter-spacing: 1px;
    }

    .hero-name h1#sillow{
        font-size: 32px;
    }
    
    .hero-title p{
        font-size: 16px;
        text-align: center;
    }
    
    .hero-tags{
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .hero-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .wave-emoji{
        width: 24px;
        height: 24px;
    }
    
    .hero-greeting h5 {
        font-size: 16px;
    }
    
    /* Animation hero mobile */
    #hero_animation {
        height: 15rem;
        width: 15rem;
        margin-top: 10px;
    }
    
    /* Sidebar mobile */
    .sidebar {
        width: 60px;
        height: 8vh;
    }
    
    .sidebar.active {
        width: 90vw;
        height: 60vh;
    }
    
    .sidebar #btn {
        font-size: 40px;
        top: 0.2rem;
    }
    
    .sidebar.active #btn {
        left: 85%;
    }
    
    /* CV Responsive */
    .cv-container {
        width: 95%;
        padding: 20px;
        margin-top: 10px;
    }
    
    .cv-name {
        font-size: 28px;
    }
    
    .cv-title {
        font-size: 16px;
    }
    
    .cv-contact {
        flex-direction: column;
        gap: 5px;
        font-size: 12px;
    }
    
    .cv-availability {
        font-size: 12px;
    }
    
    /* Logos et infos entreprises/formation */
    .cv-company-info,
    .cv-education-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .cv-company-logo,
    .cv-education-logo {
        margin-top: 0;
    }
    
    /* Tooltips mobile */
    .logo-tooltip {
        display: none;
    }
    
    /* Aperçus certificats et gitlab */
    .certification-preview,
    .gitlab-preview {
        display: none;
    }
    
    .hover-indicator {
        display: none;
    }
    
    /* Certificats mobile */
    .certification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    
    /* Contact icons mobile */
    .contact-icons-container {
        gap: 15px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon img {
        width: 30px;
        height: 30px;
    }
    
    /* Mail container mobile */
    .mail-container {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Projects mobile */
    .projects-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .project-card {
        width: 100%;
    }
    
    .hero-greeting h5{
        font-size: 16px;
    }
    
    #cvscroller{
        padding: 10px;
        min-height: 100vh;
    }
    
    .cv-container{
        padding: 20px;
        margin-top: 10px;
    }
    
    .cv-name{
        font-size: 28px;
    }
    
    .cv-title{
        font-size: 16px;
    }
    
    .cv-contact{
        font-size: 12px;
        line-height: 1.6;
    }
    
    .cv-section-title{
        font-size: 20px;
    }
    
    .cv-exp-header{
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cv-exp-header h4{
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .cv-duration{
        font-size: 12px;
    }
    
    .closeb{
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    #contact-section {
        width: 90vw;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .contact-icons-container {
        gap: 20px;
        margin-top: 10px;
    }
    
    .contact-icon {
        width: 55px;
        height: 55px;
    }
    
    .contact-icon img {
        width: 30px;
        height: 30px;
    }
    
    .contact-me {
        font-size: 28px;
        margin-bottom: 15px;
        margin-top: -10px;
    }
    
    .mail-container {
        gap: 8px;
    }
    
    .mail {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .copy-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .copy-message {
        font-size: 12px;
        padding: 10px 16px;
        bottom: 15px;
    }
    
    .tooltip {
        font-size: 10px;
        padding: 6px 8px;
        bottom: -40px;
    }
    
    .contact-icon:hover .tooltip {
        bottom: -45px;
    }
    
    /* Chat section mobile */
    .chat-container {
        width: 95%;
        height: 85vh;
        margin: 0 auto;
    }
    
    .chat-header h2 {
        font-size: 20px;
    }
    
    .chat-header p {
        font-size: 14px;
    }
    
    #chat-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    #send-button {
        padding: 10px 20px;
        font-size: 12px;
    }

    /* About me mobile */
    #about-me{
        padding: 40px 15px 60px;
    }

    .about-inner {
        font-size: 16px;
    }

    #about-me .propos{
        font-size: 24px;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .about-text {
        font-size: 15px;
        line-height: 1.6;
        color: var(--text);
        text-align: justify;
    }

    .about-text::first-letter {
        font-size: 32px;
        line-height: 28px;
        padding-right: 6px;
    }

    /* Signature mobile */
    .signature-container {
        justify-content: right;
        margin-top: 15px;
        padding-top: 10px;
        padding-right: 0;
    }

    .signature {
        max-width: 120px;
        transform: rotate(-1deg);
    }

    .about-milestones {
        gap: 8px;
        margin-bottom: 28px;
    }

    .about-chip {
        font-size: 12.5px;
        padding: 8px 13px;
    }

    #projectwrapper{
        padding: 20px 10px;
    }
    
    .projects-header h2{
        font-size: 28px;
    }
    
    .projects-header p{
        font-size: 16px;
    }
    
    .projects-row{
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title{
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .project-card{
        padding: 15px;
        margin: 0 5px;
        max-width: calc(100vw - 40px);
        box-sizing: border-box;
    }
    
    .project-image{
        height: 100px;
    }
    
    .project-placeholder{
        font-size: 36px;
    }
    
   

}

/* Adaptation spécifique iPhone 15 et écrans similaires */
@media screen and (max-width: 430px) and (min-width: 375px) {
    .hero-name h1 {
        font-size: 30px;
        line-height: 1.2;
    }
    
    .hero-title p {
        font-size: 16px;
    }
    
    .hero-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    #hero_animation {
        height: 16rem;
        width: 16rem;
    }
    
  
    
    .sidebar.active {
        width: 85vw;
        height: 55vh;
        border-radius: 15px;
    }
    
    .chat-container {
        width: 90%;
        height: 80vh;
        border-radius: 15px;
    }
    
    /* Contact section pour iPhone 15 */
    #contact-section {
        width: 85vw;
        max-height: 75vh;
    }
    
    #about-me {
        padding: 30px 10px 50px;
    }
}

/* Adaptation pour très petits écrans (moins de 375px) */
@media screen and (max-width: 375px) {
    .hero-name h1 {
        font-size: 28px;
    }
    
    .hero-title p {
        font-size: 14px;
    }
    
    .hero-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    #hero_animation {
        height: 12rem;
        width: 12rem;
    }
    
   
    
    .sidebar.active {
        width: 95vw;
        height: 65vh;
    }
    
    .chat-container {
        width: 98%;
        height: 90vh;
    }
}

/* Adaptation pour iPhone 15 en mode paysage */
@media screen and (max-height: 430px) and (min-width: 700px) and (orientation: landscape) {
    #hero {
        flex-direction: row;
        gap: 40px;
        align-items: center;
    }
    
    .hero-content {
        flex: 1;
    }
    
    #hero_animation {
        height: 12rem;
        width: 12rem;
        flex-shrink: 0;
    }
    
    .hero-name h1 {
        font-size: 36px;
    }
    
    .hero-title p {
        font-size: 18px;
    }
    
    .sidebar.active {
        width: 60vw;
        height: 70vh;
    }
    
    .chat-container {
        width: 85%;
        height: 85vh;
    }
}

/* ============== TERMINAL OVERLAY ============== */

/* Cursor hidden on idle in terminal mode */
body.terminal-mode.cursor-hidden,
body.terminal-mode.cursor-hidden * {
    cursor: none !important;
}

/* Terminal overlay container */
#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0F0A0A;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 15vw;
    font-family: 'JetBrains Mono', monospace;
    color: #138A36;
    box-sizing: border-box;
}

/* Header: $ ls -a */
#terminal-overlay .term-header {
    font-size: 20px;
    margin-bottom: 28px;
    opacity: 0.7;
}

/* Menu items container */
#terminal-overlay .term-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 36px;
}

/* Individual menu item */
#terminal-overlay .term-item {
    font-size: 18px;
    padding: 6px 12px;
    display: flex;
    gap: 20px;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

/* Permission string (dim) */
#terminal-overlay .term-perm {
    opacity: 0.5;
    user-select: none;
}

/* Directory name */
#terminal-overlay .term-name {
    color: #138A36;
}

/* Selected item */
#terminal-overlay .term-item.selected {
    background: rgba(19, 138, 54, 0.12);
    border-left-color: #138A36;
}

#terminal-overlay .term-item.selected .term-name {
    color: #2EE85A;
    text-decoration: underline;
    text-underline-offset: 4px;
}

#terminal-overlay .term-item.selected .term-perm {
    opacity: 0.8;
}

/* Prompt line */
#terminal-overlay .term-prompt {
    font-size: 20px;
    margin-bottom: 40px;
}

#terminal-overlay #term-prompt-target {
    color: #2EE85A;
}

/* Blinking cursor */
#terminal-overlay .term-cursor {
    animation: termBlink 1s step-end infinite;
    color: #138A36;
    margin-left: 2px;
}

@keyframes termBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Bottom bar */
#terminal-overlay .term-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 14px 0;
    text-align: center;
    font-size: 13px;
    background: #0a0707;
    border-top: 1px solid rgba(19, 138, 54, 0.3);
    color: #138A36;
    opacity: 0.7;
}

#terminal-overlay .term-separator {
    margin: 0 16px;
    opacity: 0.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #terminal-overlay {
        padding: 0 8vw;
    }

    #terminal-overlay .term-header {
        font-size: 16px;
    }

    #terminal-overlay .term-item {
        font-size: 14px;
        gap: 12px;
    }

    #terminal-overlay .term-prompt {
        font-size: 16px;
    }

    #terminal-overlay .term-bottom-bar {
        font-size: 11px;
    }

    #terminal-overlay .term-separator {
        margin: 0 8px;
    }
}

/* Terminal mode - selected item within sections (Tab navigation) */
body.terminal-mode .term-section-selected {
    outline: 2px solid #138A36 !important;
    outline-offset: 4px;
    box-shadow: 0 0 12px rgba(19, 138, 54, 0.35) !important;
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

body.terminal-mode .term-section-selected.project-card {
    outline-offset: 6px;
}

body.terminal-mode .term-section-selected.resource-card {
    outline-offset: 4px;
}

body.terminal-mode .term-section-selected.contact-icon {
    outline-offset: 3px;
}

/* ==========================================================================
   PERFORMANCE HELPERS
   ========================================================================== */

/* Keeps <picture> out of the box tree so wrapped images stay direct flex/grid items */
picture {
    display: contents;
}

img,
svg {
    max-width: 100%;
}

/* ==========================================================================
   ANIMATED SIDEBAR ICONS
   ========================================================================== */

.nav-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar:not(.active) .nav-icon {
    display: none;
}

.sidebar.active .nav-icon {
    opacity: 0.85;
    transform: translateX(0);
}

/* Stagger the reveal so the menu unfolds instead of popping */
.sidebar.active ul li:nth-child(1) .nav-icon { transition-delay: 0.05s; }
.sidebar.active ul li:nth-child(2) .nav-icon { transition-delay: 0.11s; }
.sidebar.active ul li:nth-child(3) .nav-icon { transition-delay: 0.17s; }
.sidebar.active ul li:nth-child(4) .nav-icon { transition-delay: 0.23s; }
.sidebar.active ul li:nth-child(5) .nav-icon { transition-delay: 0.29s; }

.sidebar.active ul li a {
    gap: 12px;
    padding: 0 10px;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.sidebar.active ul li a:hover .nav-icon {
    opacity: 1;
}

.nav-icon * {
    transform-box: fill-box;
    transform-origin: center;
}

/* About — the head nods and the shoulders lift */
.nav-icon--about .nav-icon-head {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-icon--about .nav-icon-body {
    transition: transform 0.35s ease;
}
a:hover .nav-icon--about .nav-icon-head {
    transform: translateY(-1.5px) scale(1.12);
}
a:hover .nav-icon--about .nav-icon-body {
    transform: translateY(1px);
}

/* Curriculum — the corner unfolds and the text lines write themselves in */
.nav-icon--cv .nav-icon-fold {
    transition: transform 0.35s ease;
}
a:hover .nav-icon--cv .nav-icon-fold {
    transform: translate(1.5px, -1.5px);
}
.nav-icon--cv .nav-icon-line {
    stroke-dasharray: 8;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
}
a:hover .nav-icon--cv .nav-icon-line {
    animation: navLineWrite 0.5s ease forwards;
}
a:hover .nav-icon--cv .nav-icon-line--2 { animation-delay: 0.08s; }
a:hover .nav-icon--cv .nav-icon-line--3 { animation-delay: 0.16s; }

@keyframes navLineWrite {
    0%   { stroke-dashoffset: 8; }
    100% { stroke-dashoffset: 0; }
}

/* Projects — the stack fans out */
.nav-icon--projects .nav-icon-layer {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
a:hover .nav-icon--projects .nav-icon-layer--back  { transform: translateY(-2.2px); }
a:hover .nav-icon--projects .nav-icon-layer--front { transform: translateY(2.2px); }

/* Resources — the compass needle sweeps and the dial breathes */
.nav-icon--resources .nav-icon-needle {
    transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.nav-icon--resources .nav-icon-dial {
    transition: transform 0.35s ease;
}
a:hover .nav-icon--resources .nav-icon-needle {
    transform: rotate(200deg);
}
a:hover .nav-icon--resources .nav-icon-dial {
    transform: scale(1.06);
}

/* Contact — the envelope flap opens */
.nav-icon--contact .nav-icon-flap {
    transition: transform 0.35s ease;
}
.nav-icon--contact .nav-icon-envelope {
    transition: transform 0.35s ease;
}
a:hover .nav-icon--contact .nav-icon-flap {
    transform: translateY(-2.5px) scaleY(0.55);
}
a:hover .nav-icon--contact .nav-icon-envelope {
    transform: translateY(0.8px);
}

body.terminal-mode .nav-icon {
    stroke: #138A36 !important;
}

/* ==========================================================================
   AGIRISK SHOWCASE
   ========================================================================== */

.agirisk-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    background: #eef3f7;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.agirisk-modal[hidden] {
    display: none;
}

.agirisk-modal.is-open {
    opacity: 1;
}

/* The site hides the system cursor for its custom trail; a map needs it back */
body.agirisk-open,
body.agirisk-open .agirisk-modal,
body.agirisk-open .agirisk-modal * {
    cursor: auto;
}

body.agirisk-open .agirisk-icon-btn,
body.agirisk-open .agirisk-layer-btn,
body.agirisk-open .agirisk-card-toggle,
body.agirisk-open .leaflet-control-zoom a {
    cursor: pointer;
}

/* Leaflet owns this box: dragging, wheel zoom and touch gestures all land here.
   The z-index traps Leaflet's panes (up to 800) in their own stacking context,
   so the toolbar and card above stay on top. */
.agirisk-map {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #eef3f7;
}

body.agirisk-open .agirisk-map,
body.agirisk-open .agirisk-map .leaflet-container {
    cursor: grab;
}

body.agirisk-open .agirisk-map .leaflet-container:active,
body.agirisk-open .agirisk-map .leaflet-dragging .leaflet-container {
    cursor: grabbing;
}

/* Leaflet resets that keep the map legible inside the site's global styles */
.agirisk-map .leaflet-container {
    font-family: inherit;
    background: #eef3f7;
}

.agirisk-map img {
    max-width: none;
}

.agirisk-map .leaflet-control-attribution {
    padding: 3px 9px;
    border-radius: 999px 0 0 0;
    background: rgba(255, 254, 250, 0.88);
    font-size: 10.5px;
    color: #3c4a66;
}

.agirisk-map .leaflet-control-zoom a {
    width: 38px;
    height: 38px;
    line-height: 38px;
    font-size: 20px;
    color: #1c2b4a;
    border-radius: 10px;
}

.agirisk-map .leaflet-bar {
    border: none;
    box-shadow: 0 6px 18px rgba(16, 28, 48, 0.2);
}

/* Loading state ---------------------------------------------------------- */

.agirisk-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.94);
    box-shadow: 0 10px 30px rgba(16, 28, 48, 0.18);
    font-size: 14px;
    color: #1c2b4a;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.agirisk-loader.is-done {
    opacity: 0;
    visibility: hidden;
}

.agirisk-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(28, 43, 74, 0.22);
    border-top-color: #1c6ea4;
    border-radius: 50%;
    animation: agiriskSpin 0.8s linear infinite;
}

@keyframes agiriskSpin {
    to { transform: rotate(360deg); }
}

/* Toolbar ---------------------------------------------------------------- */

.agirisk-toolbar {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agirisk-layers {
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 254, 250, 0.94);
    box-shadow: 0 6px 18px rgba(16, 28, 48, 0.18);
}

.agirisk-layer-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #4a5872;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.agirisk-layer-btn:hover {
    color: #1c2b4a;
}

.agirisk-layer-btn.is-active {
    background: #1c2b4a;
    color: #fffefa;
}

.agirisk-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 254, 250, 0.94);
    color: #1c2b4a;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(16, 28, 48, 0.18);
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.agirisk-icon-btn svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.agirisk-icon-btn:hover {
    background: #fffefa;
    transform: scale(1.07);
}

.agirisk-close:hover {
    background: #1c2b4a;
    color: #fffefa;
}

/* Project card ----------------------------------------------------------- */

.agirisk-card {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 20;
    width: min(330px, calc(100vw - 36px));
    border-radius: 18px;
    background: rgba(255, 254, 250, 0.95);
    box-shadow: 0 14px 38px rgba(16, 28, 48, 0.22);
    backdrop-filter: blur(6px);
    overflow: hidden;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.45s ease;
}

.agirisk-modal.is-open .agirisk-card {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.12s;
}

.agirisk-card-body {
    padding: 22px 22px 6px;
    max-height: 460px;
    max-width: 400px;
    overflow: hidden;
    transition: max-height 0.35s ease, max-width 0.35s ease,
                opacity 0.25s ease, padding 0.35s ease;
}

/* Clamping the width too, so the collapsed card can shrink to its toggle */
.agirisk-card.is-collapsed .agirisk-card-body {
    max-height: 0;
    max-width: 0;
    padding: 0;
    opacity: 0;
}

.agirisk-logo {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
}

.agirisk-title {
    margin: 18px 0 4px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #1c2b4a;
}

.agirisk-subtitle {
    margin: 0;
    font-size: 13.5px;
    font-style: italic;
    line-height: 1.5;
    color: #4a5872;
}

.agirisk-meta {
    display: flex;
    gap: 26px;
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(28, 43, 74, 0.12);
}

.agirisk-meta dt {
    margin: 0 0 3px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #8592a8;
}

.agirisk-meta dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1c2b4a;
}

.agirisk-card-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px;
    border: none;
    border-top: 1px solid rgba(28, 43, 74, 0.1);
    background: none;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #4a5872;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.agirisk-card-toggle:hover {
    background: rgba(28, 43, 74, 0.06);
    color: #1c2b4a;
}

.agirisk-card-toggle svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(180deg);
    transition: transform 0.35s ease;
}

.agirisk-card.is-collapsed .agirisk-card-toggle svg {
    transform: rotate(0deg);
}

/* Collapsed, the card is just its own toggle, so it shrinks to that label */
.agirisk-card.is-collapsed {
    width: auto;
}

.agirisk-card.is-collapsed .agirisk-card-toggle {
    border-top: none;
    padding: 11px 20px;
}

/* Transient navigation hint ---------------------------------------------- */

.agirisk-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    z-index: 20;
    margin: 0;
    padding: 9px 18px;
    border-radius: 999px;
    background: rgba(16, 28, 48, 0.78);
    font-size: 12.5px;
    color: #fffefa;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.agirisk-hint.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.agirisk-open {
    overflow: hidden;
}

/* The pointer trail sits above everything, so it steps aside for the showcase */
body.agirisk-open .circle,
body.agirisk-open .inverseur-circle,
body.agirisk-open .cursor-center {
    display: none !important;
}

@media (max-width: 768px) {
    .agirisk-toolbar {
        top: 12px;
        right: 12px;
        left: 12px;
        justify-content: flex-end;
        gap: 8px;
    }

    .agirisk-layers {
        margin-right: auto;
    }

    .agirisk-layer-btn {
        padding: 7px 13px;
        font-size: 12px;
    }

    .agirisk-icon-btn {
        width: 40px;
        height: 40px;
    }

    /* The card drops to the bottom so the map keeps the usable area */
    .agirisk-card {
        top: auto;
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        transform: translateY(10px);
    }

    .agirisk-card-body {
        padding: 16px 18px 4px;
        max-height: 300px;
    }

    .agirisk-logo {
        max-width: 190px;
    }

    .agirisk-title {
        margin-top: 14px;
        font-size: 17px;
    }

    .agirisk-meta {
        gap: 20px;
        margin-top: 14px;
        padding-top: 12px;
    }

    /* A full-width strip is the easier touch target, so keep it stretched */
    .agirisk-card.is-collapsed {
        width: auto;
        right: 12px;
    }

    .agirisk-card.is-collapsed .agirisk-card-body {
        max-width: none;
    }

    .agirisk-hint {
        bottom: auto;
        top: 64px;
        font-size: 11.5px;
        padding: 8px 14px;
        white-space: normal;
        text-align: center;
    }

    /* Pinch replaces the buttons on touch, and the card gets the bottom strip */
    .agirisk-map .leaflet-control-zoom {
        display: none;
    }

    .agirisk-map .leaflet-control-scale,
    .agirisk-map .leaflet-control-attribution {
        margin-bottom: 58px;
    }
}

/* ==========================================================================
   MOTION PREFERENCES
   ========================================================================== */

@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;
    }

    .circle,
    .inverseur-circle,
    .cursor-center {
        display: none !important;
    }

    .project-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

