/* 1. VARIABLES & RESET */
:root {
    --mac-window: rgba(255, 255, 255, 0.85);
    --mac-window-dark: rgba(30, 30, 30, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --mac-text: #1d1d1f;
    --mac-accent: #007AFF;
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.3);
    
    /* PALETTE PASTEL */
    --pastel-violet: #f3e8ff;
    --pastel-pink: #fce7f3;
    --pastel-rose: #ffe4e6;
    --deep-purple: #2e1065;
}

.dark-mode {
    --mac-window: rgba(40, 40, 40, 0.9);
    --mac-text: #f5f5f7;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none !important; }

html, body { width: 100%; height: 100%; overflow: hidden; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    background: #000; color: var(--mac-text);
    user-select: none; -webkit-font-smoothing: antialiased;
}

/* CURSEUR APPLE MOUSE (SVG) */
.custom-cursor {
    position: fixed;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 99999;
    display: block;
    transform-origin: top left; 
    transition: transform 0.05s linear; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.custom-cursor svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* CANVAS SHADER BACKGROUND  */
#canvas-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
canvas { display: block; width: 100%; height: 100%; }

/* LAYERS */
.screen-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transition: opacity 1.5s ease; display: flex; flex-direction: column;
}
.hidden { opacity: 0; pointer-events: none; z-index: -100; }

/* BOOT SCREEN */
#boot-screen { background: #000; z-index: 10000; align-items: center; justify-content: center; }
.apple-logo { font-size: 80px; color: white; margin-bottom: 50px; }
.loading-bar { width: 200px; height: 6px; background: #333; border-radius: 3px; overflow: hidden; }
.loading-progress { width: 0%; height: 100%; background: #fff; transition: width 3s ease-in-out; }

/* LOCK SCREEN */
#lock-screen { 
    z-index: 9000; 
    align-items: center; 
    color: white; 
    position: relative;
    display: flex;
    justify-content: center;
}

.lock-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    width: 100%; 
    margin-top: 2vh; 
    padding-bottom: 30px; 
}

.lock-clock { font-size: 70px; font-weight: 600; text-shadow: 0 4px 10px rgba(0,0,0,0.2); line-height: 1; }
.lock-date { font-size: 18px; font-weight: 500; margin-top: 5px; text-shadow: 0 2px 5px rgba(0,0,0,0.2); }

/* Avatar de profil circulaire responsive */
.character-container {
    margin-top: 25px; 
    margin-bottom: 15px;
    width: 170px; 
    height: 170px; 
    display: flex; justify-content: center; align-items: center;
    opacity: 0; animation: fadeInUp 1s 0.5s forwards;
}
.character-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 50%; 
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    transition: transform 0.1s ease-out; 
}

.login-container { margin-top: 10px; display: flex; flex-direction: column; align-items: center; opacity: 0; animation: fadeInUp 1s 0.8s forwards; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.user-name { font-size: 18px; font-weight: 600; margin-bottom: 8px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.password-wrapper { position: relative; }

/* Nouveau bouton de déverrouillage cliquable */
.click-unlock-btn {
    background: rgba(255,255,255,0.25); 
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px; 
    padding: 10px 25px; 
    color: white; 
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px); 
    cursor: pointer !important; 
    transition: all 0.3s;
    display: inline-block; 
    margin-top: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.click-unlock-btn:hover { 
    background: rgba(255,255,255,0.4); 
    transform: scale(1.05); 
}

.shake { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* DESKTOP INTERFACE */
#desktop-screen { z-index: 10; opacity: 0; transition: opacity 1s; }

.mac-menu-bar {
    height: 30px; background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(20px);
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px;
    font-size: 13px; font-weight: 600; z-index: 5000;
}
.dark-mode .mac-menu-bar { background: rgba(0,0,0,0.3); color: white; }
.menu-left, .menu-right { display: flex; gap: 18px; align-items: center; }

.menu-item-link { cursor: pointer; transition: color 0.2s; }
.menu-item-link:hover { color: var(--mac-accent); }

/* SWITCH DE LANGUE STYLE */
.lang-switch-container {
    position: relative;
    width: 70px;
    height: 24px;
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.4);
    transition: background 0.3s;
}
.lang-switch-container:hover { background: rgba(255,255,255,0.7); }

.lang-text {
    font-size: 10px;
    font-weight: 700;
    color: #555;
    z-index: 1;
    width: 50%;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lang-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 18px;
    background-color: transparent;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-image: url('https://flagcdn.com/w40/fr.png'); /* Default FR */
}

/* Checkbox logic for toggle */
#lang-toggle { display: none; }

/* If checked (EN Mode) */
#lang-toggle:checked + .lang-switch-container .lang-knob {
    transform: translateX(44px);
    background-image: url('https://flagcdn.com/w40/gb.png');
}

.mobile-menu-btn { display: none; font-size: 16px; cursor: pointer; }

/* MENU MOBILE TRANSPARENT */
.mobile-menu-container {
    display: none;
    position: fixed; top: 30px; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 4999;
    flex-direction: column;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideDown 0.3s ease;
}
.dark-mode .mobile-menu-container { 
    background: rgba(30, 30, 30, 0.6); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.mobile-menu-item { padding: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: pointer; font-size: 16px; }
.dark-mode .mobile-menu-item { border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-menu-item:last-child { border-bottom: none; }

/* WIDGET MUSIQUE */
.music-control {
    display: flex; align-items: center; gap: 10px; 
    background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px;
    cursor: pointer; transition: background 0.3s;
}
.music-control:hover { background: rgba(255,255,255,0.4); }
.music-icon { font-size: 14px; }
.volume-slider {
    width: 60px; height: 4px; -webkit-appearance: none; appearance: none;
    background: rgba(0,0,0,0.2); outline: none; border-radius: 2px;
    cursor: none; 
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 10px; height: 10px;
    background: #000; border-radius: 50%; cursor: none;
}

.desktop-container {
    height: calc(100vh - 30px); padding: 20px;
    display: grid; grid-template-columns: repeat(auto-fill, 100px);
    grid-auto-flow: column; align-content: start; position: relative;
}

/* WIDGET WRAPPER */
.widget-wrapper {
    position: absolute; top: 20px; left: 130px; 
    display: flex; 
    flex-direction: row-reverse; 
    gap: 20px; 
    align-items: flex-start;
    z-index: 20;
}

/* DOSSIERS A DROITE */
.right-folders-wrapper {
    position: absolute; 
    top: 20px; 
    right: 40px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px;
    align-items: center;
    z-index: 20;
}

.folders-wrapper {
    display: flex; 
    flex-direction: column; 
    gap: 10px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); transition: transform 0.2s; cursor: pointer;
}
.glass-card:hover { transform: scale(1.02); }

/* PROFIL WIDGET */
.new-profile-widget {
    background: linear-gradient(135deg, rgba(225, 190, 255, 0.5), rgba(160, 230, 255, 0.5)); 
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 24px;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    align-items: center; 
    text-align: center; 
    color: #1d1d1f;
}

.new-profile-widget .avatar-container { position: relative; margin-bottom: 5px; }
.new-profile-widget img {
    width: 80px; height: 80px; 
    border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
}

.profile-header-text {
    font-size: 20px; font-weight: 700;
    font-family: -apple-system, 'SF Pro Display', sans-serif;
    color: #111; line-height: 1.2;
}

.profile-body-text {
    font-size: 14px; line-height: 1.4; color: rgba(0,0,0,0.7); font-weight: 400;
}

.status-row {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 13px; color: rgba(0,0,0,0.8); font-weight: 500; margin-top: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
}

.status-indicator {
    width: 10px; height: 10px;
    background: #28c840; border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(40, 200, 64, 0.2);
    animation: blink 2s infinite ease-in-out;
}

/* FIGURINE ANIMATION WRAPPER */
.starter-wrapper {
    position: relative;
    width: 280px;
    border-radius: 24px;
    transition: transform 0.3s ease;
    cursor: pointer;
}
.starter-wrapper:hover {
    transform: scale(1.05);
}

.starter-pack-img {
    width: 100%; border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

/* Animation VIBING (Musique) */
@keyframes musicVibe {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-1deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-3px) rotate(1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
.vibing {
    animation: musicVibe 1s infinite ease-in-out;
}

/* Bulle de Dialogue (Talking) */
.talk-bubble {
    position: absolute;
    top: auto; 
    bottom: -50px; 
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: white;
    padding: 12px 18px;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    font-family: 'SF Pro Display', sans-serif;
    font-size: 14px; font-weight: 600; color: #333;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    pointer-events: none;
}

.talk-bubble::after {
    content: '';
    position: absolute;
    top: -8px; 
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px; 
    border-color: transparent transparent white transparent; 
}

.talk-bubble.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* BAG WIDGET */
.bag-widget {
    position: relative; width: 400px; height: 500px; 
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; margin-right: 15px; transform: translateX(-10px);
}

.bag-title {
    position: absolute; top: 20px; width: 100%; text-align: center;
    font-family: 'SF Pro Display', sans-serif;
    font-size: 18px; font-weight: 700; color: #1d1d1f;
    text-shadow: 0 2px 10px rgba(255,255,255,0.6);
    z-index: 20; opacity: 0.9;
}

.bag-img {
    width: 280px; height: auto; z-index: 10;
    transition: transform 0.3s ease-out;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

.bag-widget:not(.active) .bag-img { animation: floatBag 4s ease-in-out infinite; }
@keyframes floatBag { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.bag-widget:hover .bag-img { transform: scale(1.05); }

.bag-item {
    position: absolute; opacity: 0;
    transform: translate(0, 0) scale(0.5);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; width: auto;
}

.bag-item img {
    width: 100%; height: auto; display: block;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.15));
}

.item-label {
    margin-top: 6px; font-family: 'SF Pro Display', sans-serif;
    font-size: 12px; font-weight: 600; color: #1d1d1f;
    background: rgba(255, 255, 255, 0.6); padding: 3px 8px; border-radius: 6px;
    backdrop-filter: blur(8px); text-align: center; white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); opacity: 0; transition: opacity 0.3s 0.3s;
}

.bag-widget.active .bag-item { opacity: 1; pointer-events: auto; }
.bag-widget.active .item-label { opacity: 1; }

.bag-widget.active .item-laptop { transform: translate(120px, -110px) rotate(8deg) scale(1.1); width: 110px; z-index: 4; }
.bag-widget.active .item-brume { transform: translate(-120px, -100px) rotate(-5deg) scale(1.1); width: 45px; z-index: 3; }
.bag-widget.active .item-stanley { transform: translate(-140px, 100px) rotate(-5deg) scale(1.1); width: 45px; }
.bag-widget.active .item-iphone { transform: translate(170px, 0px) rotate(5deg) scale(1.1); width: 45px; z-index: 11; }
.bag-widget.active .item-airpods { transform: translate(140px, 100px) rotate(15deg) scale(1.1); width: 55px; z-index: 11; }

/* CONTACT & CV STYLES */
.contact-container { text-align: center; max-width: 500px; margin: 0 auto; }
.contact-header img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 15px; }
.social-grid { display: flex; justify-content: center; gap: 25px; margin: 20px 0; }
.social-card { 
    width: 60px; height: 60px; border-radius: 50%; color: white; 
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; transition: transform 0.2s; 
    text-decoration: none; font-size: 28px; 
}
.social-card:hover { transform: scale(1.15); }
.sc-github { background: #333; }
.sc-insta { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.sc-linkedin { background: #0077b5; }

.contact-form input, .contact-form textarea { width: 100%; padding: 10px; margin-bottom: 10px; border-radius: 8px; border: 1px solid #ccc; background: rgba(255,255,255,0.5); }
.submit-btn { 
    background: #007aff; color: white; border: none; padding: 10px 20px; border-radius: 20px; 
    cursor: pointer; font-weight: 600; transition: transform 0.2s, background 0.3s; 
}
.submit-btn:hover { transform: scale(1.05); background: #005ecb; }

.cv-container { display: flex; flex-direction: column; align-items: center; height: 100%; }
.cv-preview { flex: 1; width: 100%; background: white; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 20px; overflow: hidden; }
.download-btn { background: #1d1d1f; color: white; padding: 12px 24px; border-radius: 30px; text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: transform 0.2s; }
.download-btn:hover { transform: scale(1.05); background: #000; }

.desktop-icon {
    width: 90px; height: 100px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; cursor: pointer;
    margin-bottom: 10px; border-radius: 8px; transition: background 0.2s;
}
.desktop-icon:hover { background: rgba(255,255,255,0.2); }
.desktop-icon img { width: 64px; height: 64px; margin-bottom: 5px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); }
.icon-label {
    font-size: 12px; color: white; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-align: center; padding: 2px 6px; border-radius: 4px;
}

.mac-dock-container {
    position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.2); padding: 10px 15px; border-radius: 20px;
    display: flex; gap: 15px; align-items: flex-end; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 9000;
}

.dock-app {
    width: 50px; height: 50px; border-radius: 12px; 
    background: transparent; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; position: relative;
}
.dock-app img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2)); transition: transform 0.2s;
}
.dock-app:hover { transform: translateY(-10px) scale(1.1); margin: 0 8px; }
.dock-app.active::after {
    content: ''; position: absolute; bottom: -8px; width: 4px; height: 4px;
    background: rgba(0,0,0,0.6); border-radius: 50%;
}

.mac-window {
    position: absolute; background: var(--mac-window); border-radius: 12px;
    border: var(--glass-border); box-shadow: var(--shadow-lg); backdrop-filter: blur(30px);
    display: none; overflow: hidden; flex-direction: column;
    animation: openWindow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: width 0.4s ease, height 0.4s ease, top 0.4s ease, left 0.4s ease;
}
@keyframes openWindow { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.window-header {
    height: 30px; background: rgba(0,0,0,0.05);
    display: flex; align-items: center; padding: 0 12px; cursor: move;
}
.traffic-lights { display: flex; gap: 8px; }
.light { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; }
.close-btn { background: #FF5F56; } .min-btn { background: #FFBD2E; } .max-btn { background: #27C93F; }
.window-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--mac-text); }
.window-body { flex: 1; overflow-y: auto; padding: 20px; color: var(--mac-text); }

/* STYLES SCRAPBOOK "A PROPOS" */
.scrapbook-container {
    font-family: 'Caveat', cursive; color: #333;
    background-color: #faf3f3;
    background-image: radial-gradient(#d3a9b3 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 30px; 
}

.sb-header { text-align: center; margin-bottom: 40px; }

.polaroid-frame {
    background: white; padding: 15px 15px 50px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: rotate(-2deg); max-width: 320px; margin: 0 auto; position: relative;
    transition: transform 0.3s;
}
.polaroid-frame:hover { transform: rotate(0deg) scale(1.02); z-index: 10; }
.polaroid-frame img { width: 100%; height: auto; object-fit: cover; filter: sepia(0.1); }

.washi-tape {
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 35px; background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0,0,0,0.05); backdrop-filter: blur(2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 2;
}

.flip-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin: 40px 0;
    width: 100%;
}
.flip-card {
    background-color: transparent; 
    width: 280px; 
    height: 290px; 
    perspective: 1000px; 
    cursor: pointer;
}
.flip-card-inner {
    position: relative; width: 100%; height: 100%;
    text-align: center; transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    border-radius: 15px;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute; width: 100%; height: 100%;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 15px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; padding: 15px;
}
.flip-card-front {
    background: linear-gradient(135deg, #fff0f5, #ffe4e1); color: #d6336c;
    border: 4px solid white;
}
.flip-card-back {
    background: white; color: #333; transform: rotateY(180deg);
    border: 4px solid #ffb8c6;
}
.flip-card-front h4 { font-family: 'Caveat', cursive; font-size: 1.8rem; margin: 0; }
.card-tip { font-family: 'SF Pro Display', sans-serif; font-size: 0.8rem; margin-top: 8px; opacity: 0.7; font-weight: normal; }

.skill-icons { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap; 
    justify-content: center; 
    margin-top: 10px; 
}
.skill-icons i { font-size: 28px; }

/* NEW STYLE FOR SKILL LOGOS */
.skill-logo { 
    height: 28px; 
    width: auto; 
    margin: 0 3px; 
    object-fit: contain; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); 
    transition: transform 0.2s; 
}
.skill-logo:hover { transform: scale(1.1); }

/* Timeline Chronologique */
.timeline-container {
    position: relative; max-width: 800px; margin: 50px auto;
    padding-left: 30px; border-left: 4px dotted #ffb8c6;
}
.timeline-box {
    background: white; border-radius: 12px; padding: 20px;
    margin-bottom: 30px; position: relative;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.05); border: 2px solid #333;
}
.timeline-box::before {
    content: '📌'; position: absolute; left: -45px; top: 15px;
    font-size: 24px;
}
.t-date {
    display: inline-block; background: #ffec99; padding: 3px 10px;
    font-weight: bold; border-radius: 4px; margin-bottom: 10px;
    font-family: 'SF Pro Display', sans-serif; font-size: 0.9rem;
}
.t-title { font-family: 'SF Pro Display', sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 5px; }
.t-place { font-family: 'SF Pro Display', sans-serif; font-size: 0.9rem; color: #666; margin-bottom: 10px; display: block; }
.t-desc { font-family: 'SF Pro Display', sans-serif; font-size: 0.95rem; line-height: 1.5; margin-bottom: 15px;}
.t-img { width: 100%; height: 150px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; margin-top: 10px; }

.sticker-note {
    background: #ffc9c9; padding: 30px; text-align: center;
    transform: rotate(1deg); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 40px; border-radius: 2px 2px 20px 2px;
    font-family: 'SF Pro Display', sans-serif;
}

/* NOUVEAU STYLE POUR L'APP COMPETENCES */
.skills-app-container {
    padding: 10px 20px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    /* Sticky filter on scroll inside the window */
    position: -webkit-sticky;
    position: sticky;
    top: -20px; /* Offset for padding */
    z-index: 50;
    padding-top: 10px;
}

/* STYLE APPLE SEGMENTED CONTROL*/
.segmented-control {
    position: relative;
    display: inline-flex;
    background: rgba(118, 118, 128, 0.12);
    padding: 3px;
    border-radius: 9px;
    backdrop-filter: blur(10px);
    /* Responsive scroll logic */
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
}
.segmented-control::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.dark-mode .segmented-control { background: rgba(118, 118, 128, 0.24); }

.segment-btn {
    position: relative;
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    cursor: pointer;
    z-index: 2; /* Text above glider */
    white-space: nowrap; /* Prevent text wrap */
    transition: color 0.2s ease;
}
.dark-mode .segment-btn { color: #e0e0e0; }

/* background (Glider) */
.segment-glider {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    pointer-events: none;
    width: 0; /* JS will set width */
}
.dark-mode .segment-glider { background: #636366; }

.segment-btn.active { font-weight: 600; }

.skills-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding-bottom: 40px;
}

/* NEW CARD DESIGN - 3D HOVER STYLE */
.skill-card {
    position: relative;
    width: 100%;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 3D Hover Effect */
.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
}

.skill-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.skill-card:hover .skill-inner {
    box-shadow: 0 25px 50px rgba(100, 100, 255, 0.15); /* Purple/Blue glow shadow */
}

.skill-card.flipped .skill-inner {
    transform: rotateY(180deg);
}

.skill-front, .skill-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    /* backdrop-filter: blur(20px);  Removed for cleaner white look like image */
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    /* Updated Justify content for layout */
    justify-content: flex-start;
    align-items: center;
    padding: 25px 20px;
}

.skill-back {
    justify-content: center; /* Center content on back */
}

/* Decorative background gradient hint */
.skill-front::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,240,245,0.5) 0%, rgba(255,255,255,0) 100%);
    border-radius: 20px; z-index: -1;
}

.dark-mode .skill-front, .dark-mode .skill-back {
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-back { transform: rotateY(180deg); }

.skill-icon-lg {
    height: 56px; width: 56px; object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.1));
}

.skill-name { 
    font-size: 18px; font-weight: 700; margin-bottom: 6px; color: #333;
    letter-spacing: -0.5px;
}
.dark-mode .skill-name { color: #fff; }

.skill-tag {
    background-color: #ffe4e6; /* Pinkish background */
    color: #d6336c; /* Pink text */
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* NEW Description Text Style */
.skill-desc-text { 
    font-size: 12px; color: #666; line-height: 1.4; 
    margin: 0 0 auto 0; /* Push link to bottom */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Truncate if too long */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dark-mode .skill-desc-text { color: #aaa; }

/* NEW Link Style */
.skill-link {
    font-size: 11px;
    font-weight: 600;
    color: #ff5f57; /* Match red/pink in image */
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.skill-card:hover .skill-link {
    gap: 8px;
}

/* Circular Progress CSS */
.circular-chart {
    width: 90px; height: 90px;
    border-radius: 50%;
    position: relative;
    display: flex; justify-content: center; align-items: center;
    background: conic-gradient(var(--mac-accent) var(--p), #f2f2f7 0);
    transition: background 0.5s ease;
}
.dark-mode .circular-chart { background: conic-gradient(var(--mac-accent) var(--p), #2c2c2e 0); }

.circular-inner {
    width: 76px; height: 76px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}
.dark-mode .circular-inner { background: rgba(50,50,50,0.95); }

.percent-text { font-size: 20px; font-weight: 700; color: var(--mac-accent); }
.level-text { font-size: 9px; font-weight: 500; margin-top: 2px; color: #888; text-transform: uppercase; }

/* RECAP SECTION STYLE */
.process-section {
    margin-top: 60px;
    text-align: left;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.dark-mode .process-section { border-top: 1px solid rgba(255,255,255,0.05); }

.process-header h3 {
    font-size: 28px; font-weight: 700;
    letter-spacing: -0.5px; margin-bottom: 10px; color: #1d1d1f;
}
.dark-mode .process-header h3 { color: #fff; }

.process-intro {
    font-size: 16px; color: #86868b; margin-bottom: 30px; max-width: 600px; line-height: 1.5; font-weight: 400;
}
.dark-mode .process-intro { color: #aaa; }

/* BENTO GRID LAYOUT */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 20px;
    margin-bottom: 40px;
}

.bento-card {
    background: #fff;
    border-radius: 28px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
    overflow: hidden;
    position: relative;
    height: 100%;
}
.dark-mode .bento-card { background: #2c2c2e; border: 1px solid rgba(255,255,255,0.05); }

.bento-card:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 5; }

/* Specific card spans */
.bento-span-2 { grid-column: span 2; }
.bento-span-4 { grid-column: span 4; }

.bento-icon-box {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 20px;
}

/* PASTEL COLORS PERSONALIZATION */
/* Carte 1 : Exploration */
.bc-pastel-blue { background: linear-gradient(135deg, #e0e7ff, #f3e8ff); }
.bc-pastel-blue .bento-icon-box { background: #007aff; color: white; }
.dark-mode .bc-pastel-blue { background: #1c1c1e; }

/* Carte 2 : Conception */
.bc-pastel-violet { background: linear-gradient(135deg, #fae8ff, #f3e8ff); }
.bc-pastel-violet .bento-icon-box { background: #d946ef; color: white; }
.dark-mode .bc-pastel-violet { background: #1c1c1e; }

/* Carte 3 : Feedback */
.bc-pastel-orange { background: linear-gradient(135deg, #fff1f2, #ffe4e6); }
.bc-pastel-orange .bento-icon-box { background: #fb923c; color: white; }
.dark-mode .bc-pastel-orange { background: #1c1c1e; }

/* Carte 4 : DÃ©veloppement */
.bc-deep-dark { background: #f992b3; color: white !important; }
.bc-deep-dark .bento-icon-box { background: rgba(220, 198, 248,0.2); color: white; } /* Vert fluo pour le code */
.bc-deep-dark .bento-desc { color: rgba(220, 198, 248,0.8) !important; }
.dark-mode .bc-deep-dark { background: #1c1c1e; color: white !important; }

.bento-step {
    font-size: 11px; font-weight: 700; 
    text-transform: uppercase; letter-spacing: 1px; 
    opacity: 0.6; margin-bottom: 8px; color: #555;
}

.bento-title {
    font-size: 22px; font-weight: 700; margin-bottom: 10px;
    font-family: -apple-system, sans-serif;
    color: #1d1d1f;
}
.dark-mode .bento-title { color: white; }

.bento-desc {
    font-size: 15px; line-height: 1.5; color: #666; font-weight: 500;
}
.dark-mode .bento-desc { color: #aaa; }

/* CARROUSEL AUTO */
.carousel-container {
    width: 100%;
    height: 380px; /* Plus grand pour l'effet cinÃ©matique */
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Animation fluide */
.carousel-track {
    display: flex;
    width: 200%; 
    height: 100%;
    animation: scrollCarousel 20s linear infinite;
}
.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Ajustement slide visible*/
.hero-slide {
    width: 50%; /* Largeur relative Ã  la vue */
    flex-shrink: 0;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}
.hero-badge {
    background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
    padding: 5px 12px; border-radius: 20px; font-size: 11px; text-transform: uppercase; font-weight: 700;
    margin-bottom: 8px; display: inline-block;
}

/* SECTION STAGE */
.internship-featured {
    background: #fff0f5; /* Light pink base */
    border-radius: 24px;
    padding: 5px; /* Inner spacing like the image */
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.6);
}
.dark-mode .internship-featured { background: #2c2c2e; border: 1px solid #444; }

.internship-content-img {
    width: 100%;
    border-radius: 20px;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* GRILLE PROJETS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px 0 50px 0;
}

.project-card {
    position: relative;
    background: rgba(30, 30, 30, 0.8); /* Plus foncÃ© comme sur l'image */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.1s ease-out; /* Super smooth for JS tilt */
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    /* Modif hauteur : s'adapte au contenu avec min-height */
    height: auto;
    min-height: 480px; 
    transform-style: preserve-3d; /* Key for 3D */
    perspective: 1000px;
}

.light-theme .project-card {
     background: rgba(255, 255, 255, 0.8);
     border: 1px solid rgba(0,0,0,0.1);
}

/* 3D Content inner wrapper */
.project-card-inner {
    display: flex; flex-direction: column; height: 100%; width: 100%;
    transform: translateZ(0); /* Hardware accel */
}

.project-thumb {
    width: 100%;
    height: 200px; /* Un peu plus de place pour l'image */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-thumb {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Remplit l'espace restant */
    justify-content: space-between; /* Pousse le bouton vers le bas */
    transform: translateZ(20px); /* Lift text in 3D */
}

.project-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
    font-weight: 600;
}
.light-theme .project-meta { color: rgba(0,0,0,0.5); }

.project-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    line-height: 1.3;
}
.light-theme .project-title { color: #1d1d1f; }

.project-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Affiche plus de texte */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px; /* Espace avant le bouton */
}
.light-theme .project-desc { color: #555; }

.project-btn {
    padding: 8px 18px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    font-size: 13px;
    color: white;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    align-self: flex-start; /* AlignÃ© Ã  gauche */
}
.light-theme .project-btn {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
    color: #333;
}

.project-btn:hover {
    background: white;
    color: black;
}
.light-theme .project-btn:hover {
    background: #007AFF;
    color: white;
}

/* STYLE FENETRE DETAIL PROJET */
.project-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.detail-img-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.detail-img {
    width: 100%; height: 100%; object-fit: cover;
}
.detail-media {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.detail-info h2 {
    font-size: 24px; font-weight: 700; margin-bottom: 10px;
}
.detail-meta {
    display: flex; gap: 15px; margin-bottom: 20px; font-size: 14px; color: #888;
}
.detail-desc {
    font-size: 16px; line-height: 1.6; color: var(--mac-text);
}
/* Pour aÃ©rer le contenu texte */
.detail-desc p {
    margin-bottom: 15px; /* Espacement entre paragraphes */
}
.detail-desc ul {
    margin-bottom: 15px;
}
/* Assure que la vidÃ©o ne dÃ©passe pas dans la description */
.detail-desc video, .detail-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .bag-widget { display: none; }
    .widget-wrapper { 
        flex-direction: column !important; left: 0; align-items: center; 
        right: 0; top: 0; width: 100%; margin-top: 20px; padding-bottom: 100px;
        max-height: none; position: relative; 
    }
    .right-folders-wrapper {
        display: none; /* Hide folders on small screens to save space */
    }
    .starter-pack-img { width: 100%; max-width: 400px; }
    .desktop-container { 
        display: grid; grid-template-columns: 100px 1fr; 
        align-items: start; padding: 20px 10px; height: calc(100vh - 80px); overflow-y: auto;
    }
    /* Sur mobile, on fixe la largeur pour Ã©viter le dÃ©bordement */
    .flip-card { width: 100%; max-width: 300px; margin: 0 auto 20px auto; }
    
    /* Responsive Process Grid */
    .bento-grid { grid-template-columns: 1fr; }
    .bento-span-2, .bento-span-4 { grid-column: span 1; }
    
    /* Responsive Projects */
    .projects-grid { grid-template-columns: 1fr; }
    
    /* Carousel Mobile */
    .carousel-container { height: 220px; } /* Plus petit sur mobile mais toujours visible */
}

@media (max-width: 768px) {
    * { cursor: auto !important; } .custom-cursor { display: none; }
    .mac-window { width: 96% !important; left: 2% !important; top: 50px !important; height: 80% !important; }
    .mac-dock-container { width: 95%; bottom: 10px; justify-content: space-around; padding: 10px 5px; gap: 5px; }
    .dock-app { width: 40px; height: 40px; }

    /* Padding extra pour le bas sur mobile */
    .window-body { padding-bottom: 50px; }

    /* NEW RULES FOR HEADER RESPONSIVENESS */
    .mac-menu-bar { padding: 0 10px; }
    .menu-item-link { display: none; } /* Hide text links */
    .mobile-menu-btn { display: block; margin-left: 10px; } /* Show hamburger */
    
    .menu-right { gap: 8px; }
    .lang-switch-container { transform: scale(0.8); transform-origin: right center; margin-right: -5px;}
    .volume-slider { display: none; } /* Hide slider, keep icon */
    .music-control { padding: 0; background: none; } /* Minimalist music control */
    .fa-wifi { display: none; } /* Hide wifi icon */
    #menu-clock { font-size: 12px; }
    
    /* Responsive Skills Grid */
    .skills-grid-layout { grid-template-columns: 1fr; } /* 1 column on mobile */
    .skill-card { height: 280px; } /* Slightly smaller height */
    
    /* Responsive Segment Control */
    .filter-container { top: -10px; } /* adjust sticky */
    .segmented-control { width: 100%; padding: 4px; }
    .segment-btn { padding: 8px 12px; flex: 0 0 auto; } /* Prevent shrinking */
    
    /* Responsive Login Avatar pour mobile */
    .character-container {
        width: 130px;
        height: 130px;
    }
}