:root {
    --sonic-blue: #2c2cff;
    --sonic-cyan: #00f0ff;
    --sonic-red: #ff0055;
    --dark-bg: #050510;
    --light-bg: #f0f0f0;
    --card-bg: rgba(20, 20, 40, 0.8);
    --glass-border: 1px solid rgba(0, 240, 255, 0.3);
    --section-angle: -5deg;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

/* --- GLOBAL --- */
html {
    width: 100%;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--sonic-cyan) var(--dark-bg);
}

body { 
    background-color: var(--dark-bg); 
    color: white; 
    font-family: 'Exo 2', sans-serif; 
    overflow-x: hidden; 
    width: 100%; 
    min-height: 100vh;
    margin: 0;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { 
    background: var(--sonic-cyan); 
    border-radius: 5px; 
    border: 2px solid var(--dark-bg); 
}
::-webkit-scrollbar-thumb:hover { background: var(--sonic-blue); }

/* --- OVERLAY --- */
.project-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9998; 
    visibility: hidden; 
    overflow-y: auto; 
    overflow-x: hidden; 
    display: block; 
    scrollbar-width: none; 
    -ms-overflow-style: none;  
}
.project-overlay::-webkit-scrollbar { display: none; }

.project-overlay.active { visibility: visible; pointer-events: auto; }
.project-overlay::before { content: ''; position: fixed; top: 0; left: -40%; width: 180%; height: 100%; background: var(--dark-bg); transform: skewX(-25deg) translateX(-110%); transition: transform 0.5s cubic-bezier(0.8, 0, 0.2, 1); z-index: -1; }
.project-overlay.active::before { transform: skewX(-25deg) translateX(0); }
.project-overlay.exit::before { transform: skewX(-25deg) translateX(110%); }

/* --- PDF CONTROLS --- */
.pdf-container { width: 100%; height: 100%; display: flex; flex-direction: column; background: #000; }
.pdf-controls { height: 50px; background: rgba(5, 5, 16, 0.95); border-top: 2px solid var(--sonic-cyan); display: flex; align-items: center; justify-content: center; gap: 20px; z-index: 10; }
.pdf-btn { background: transparent; border: 1px solid var(--sonic-cyan); color: var(--sonic-cyan); padding: 5px 15px; font-family: 'Exo 2', sans-serif; font-weight: 700; cursor: pointer; transition: 0.3s; text-transform: uppercase; font-size: 0.9rem; }
.pdf-btn:hover { background: var(--sonic-cyan); color: var(--dark-bg); box-shadow: 0 0 10px var(--sonic-cyan); }
.pdf-page-indicator { color: white; font-weight: 900; font-style: italic; min-width: 80px; text-align: center; }

/* --- CURSEUR --- */
* { cursor: none !important; }
.cursor-dot { 
    position: fixed; top: 0; left: 0; width: 12px; height: 12px; 
    background-color: var(--sonic-cyan); 
    transform: translate(-50%, -50%) rotate(45deg); 
    box-shadow: 0 0 10px var(--sonic-cyan), 0 0 20px var(--sonic-cyan); 
    z-index: 9999; pointer-events: none; border: 1px solid #fff; 
    transition: transform 0.1s;
}
.cursor-dot.active { transform: translate(-50%, -50%) rotate(45deg) scale(0.5); }
.cursor-trail {
    position: fixed; width: 6px; height: 6px; background: var(--sonic-blue); 
    border-radius: 50%; pointer-events: none; z-index: 9998; 
    animation: fadeTrail 0.5s linear forwards; box-shadow: 0 0 5px var(--sonic-blue);
}
@keyframes fadeTrail {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}

/* --- TRANSITION FLASH --- */
.sonic-flash {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--sonic-cyan) !important; 
    z-index: 10000; 
    transform: translateX(-150%) skewX(-10deg); 
    pointer-events: none;
}

.sonic-flash.run {
    animation: flashAnim 0.6s cubic-bezier(0.8, 0, 0.2, 1) forwards;
}

@keyframes flashAnim {
    0% { transform: translateX(-150%) skewX(-10deg); }
    50% { transform: translateX(0) skewX(-10deg); }
    100% { transform: translateX(150%) skewX(-10deg); }
}

/* --- BACKGROUND --- */
.speed-lines { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient(90deg, transparent 0, transparent 50px, rgba(0, 240, 255, 0.03) 50px, rgba(0, 240, 255, 0.03) 52px); z-index: 0; transform: skewX(-20deg); pointer-events: none; }

/* --- MENU --- */
.nav-dropdown { position: fixed; top: 30px; left: 50%; transform: translateX(-50%); z-index: 1000; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; }
.nav-dropdown.active { pointer-events: auto; }
.dropdown-content { display: flex; align-items: center; gap: 20px; }
.side-links { display: flex; gap: 15px; opacity: 0; pointer-events: none; transition: 0.5s cubic-bezier(0.2, 1, 0.3, 1); }
.side-links.left { transform: translateX(50px) skewX(-15deg); }
.side-links.right { transform: translateX(-50px) skewX(-15deg); }
.nav-dropdown.active .side-links { opacity: 1; transform: translateX(0) skewX(-15deg); pointer-events: auto; }

.side-links a, .menu-button, #backToTop { width: 160px; height: 45px; display: flex; justify-content: center; align-items: center; text-align: center; text-decoration: none; font-family: 'Exo 2', sans-serif; font-weight: 700; text-transform: uppercase; font-size: 0.85rem; cursor: pointer; transition: 0.3s ease; white-space: nowrap; }
.side-links a, #backToTop { color: white; background: rgba(5, 5, 16, 0.8); border: 1px solid rgba(0, 240, 255, 0.1); }
.side-links a:hover, #backToTop:hover { background: var(--sonic-cyan); color: var(--dark-bg); box-shadow: 0 0 20px var(--sonic-cyan); border-color: var(--sonic-cyan); }
.menu-button { background: rgba(5, 5, 16, 0.9); border: 1px solid rgba(0, 240, 255, 0.4); color: var(--sonic-cyan); font-weight: 900; font-size: 1.2rem; z-index: 1001; position: relative; pointer-events: auto; transform: skewX(-15deg); }
.menu-button:hover { border-color: var(--sonic-cyan); box-shadow: 0 0 15px rgba(0, 240, 255, 0.5); text-shadow: 0 0 8px var(--sonic-cyan); }
.nav-dropdown.active .menu-button { background: var(--sonic-cyan); color: var(--dark-bg); border-color: #fff; }
#backToTop { margin: 15px auto 0 auto; transform: translateY(-20px) skewX(-15deg); opacity: 0; pointer-events: none; }
.nav-dropdown.active #backToTop { opacity: 1; pointer-events: auto; transform: translateY(0) skewX(-15deg); }

/* --- HEADER --- */
header { height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-left: 10%; position: relative; align-items: flex-start; z-index: 1; overflow: hidden; }
.header-quote { position: absolute; right: 10%; top: 50%; transform: translateY(-50%); width: 600px; text-align: right; z-index: 2; }
.header-quote p { font-family: 'Exo 2', sans-serif; font-size: 1.5rem; font-weight: 300; font-style: italic; line-height: 1.6; color: rgba(255, 255, 255, 0.8); position: relative; display: inline-block; }
.header-quote p::after { content: ''; position: absolute; right: -20px; top: 0; width: 2px; height: 100%; background: var(--sonic-cyan); box-shadow: 0 0 10px var(--sonic-cyan); }
.header-quote .highlight { color: var(--sonic-cyan); font-weight: 700; text-shadow: 0 0 10px rgba(0, 240, 255, 0.3); }

h1 { font-size: 6rem; font-weight: 900; font-style: italic; line-height: 0.9; text-transform: uppercase; background: linear-gradient(90deg, #fff, var(--sonic-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; transform: skewX(-10deg); }
.role { font-size: 1.5rem; color: var(--sonic-red); font-weight: 700; letter-spacing: 5px; margin-left: 10px; transform: skewX(-10deg); }

/* --- CTA --- */
.cta-btn { position: relative; display: inline-block; margin-top: 50px; padding: 25px 60px; text-decoration: none; transform: skewX(-20deg); background: transparent; overflow: hidden; }
.btn-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(5, 5, 16, 0.8); z-index: 0; border: 1px solid rgba(0, 240, 255, 0.1); transition: 0.3s; }
.btn-bg::before { content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transform: skewX(20deg); transition: none; }
.btn-text { position: relative; z-index: 2; color: var(--sonic-cyan); font-size: 1.5rem; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: 4px; transition: 0.3s; text-shadow: 0 0 5px rgba(0, 240, 255, 0.3); }
.cta-btn span { position: absolute; display: block; z-index: 10; pointer-events: none; filter: drop-shadow(0 0 2px var(--sonic-cyan)) drop-shadow(0 0 5px var(--sonic-cyan)); }
.cta-btn span:nth-child(1) { top: 0; left: -100%; width: 100%; height: 2px; background: linear-gradient(90deg, transparent 50%, var(--sonic-cyan)); animation: animate1 1s linear infinite; }
.cta-btn span:nth-child(2) { top: -100%; right: 0; width: 2px; height: 100%; background: linear-gradient(180deg, transparent 50%, var(--sonic-cyan)); animation: animate2 1s linear infinite; animation-delay: 0.25s; }
.cta-btn span:nth-child(3) { bottom: 0; right: -100%; width: 100%; height: 2px; background: linear-gradient(270deg, transparent 50%, var(--sonic-cyan)); animation: animate3 1s linear infinite; }
.cta-btn span:nth-child(4) { bottom: -100%; left: 0; width: 2px; height: 100%; background: linear-gradient(360deg, transparent 50%, var(--sonic-cyan)); animation: animate4 1s linear infinite; animation-delay: 0.25s; }
@keyframes animate1 { 0% { left: -100%; } 50%, 100% { left: 100%; } } @keyframes animate2 { 0% { top: -100%; } 50%, 100% { top: 100%; } } @keyframes animate3 { 0% { right: -100%; } 50%, 100% { right: 100%; } } @keyframes animate4 { 0% { bottom: -100%; } 50%, 100% { bottom: 100%; } }
.cta-btn:hover .btn-bg { background: rgba(0, 240, 255, 0.2); border-color: var(--sonic-cyan); box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.2); }
.cta-btn:hover .btn-text { color: #fff; text-shadow: 0 0 10px var(--sonic-cyan), 0 0 20px var(--sonic-cyan); }
.cta-btn:hover .btn-bg::before { left: 150%; transition: 0.5s ease-in-out; }

.section-title { font-size: 3.5rem; font-weight: 900; font-style: italic; line-height: 0.9; text-transform: uppercase; background: linear-gradient(90deg, #fff, var(--sonic-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 50px; transform: skewX(-10deg); position: relative; display: inline-block; }

/* --- ABOUT --- */
#about { padding: 100px 10%; background: transparent; position: relative; z-index: 2; }
.about-container { max-width: 1200px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-top: 50px; }
.about-item { background: rgba(255, 255, 255, 0.03); border-left: 4px solid var(--sonic-cyan); padding: 30px; transform: skewX(-10deg); transition: 0.3s; }
.about-item:hover { background: rgba(0, 240, 255, 0.05); border-left-color: var(--sonic-red); }
.about-q { color: var(--sonic-cyan); font-size: 1.2rem; font-weight: 900; font-style: italic; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 2px; transform: skewX(10deg); }
.about-p { font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, 0.8); transform: skewX(10deg); text-align: justify; }

/* --- SKILLS --- */
#skills { padding: 100px 10%; background: transparent; position: relative; z-index: 1; padding-bottom: 250px; }
#skills::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 350px; background: linear-gradient(to bottom, transparent 0%, var(--dark-bg) 75%, var(--dark-bg) 100%); z-index: -1; pointer-events: none; }
.skills-container { max-width: 1400px; margin: 0 auto; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.skill-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(0, 240, 255, 0.1); padding: 40px 30px; transform: skewX(-10deg); transition: 0.3s; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 20px; z-index: 2; }
.skill-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--sonic-cyan); box-shadow: 0 0 10px var(--sonic-cyan); opacity: 0.5; transition: 0.3s; }
.skill-card:hover { background: rgba(0, 240, 255, 0.05); transform: skewX(-10deg) translateY(-10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border-color: var(--sonic-cyan); }
.skill-card:hover::before { opacity: 1; width: 6px; }
.skill-icon { font-size: 2.5rem; color: var(--sonic-cyan); margin-bottom: 10px; transform: skewX(10deg); }
.skill-card h3 { color: #fff; font-size: 1.5rem; font-weight: 900; font-style: italic; text-transform: uppercase; transform: skewX(10deg); }
.skill-card p { color: rgba(255, 255, 255, 0.7); font-size: 1rem; line-height: 1.5; transform: skewX(10deg); }
.skill-list { list-style: none; margin-top: auto; transform: skewX(10deg); border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; }
.skill-list li { color: var(--sonic-cyan); font-weight: 700; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 5px; display: flex; align-items: center; gap: 10px; }
.skill-list li::before { content: '▶'; font-size: 0.6rem; color: #fff; }

/* --- PROJECTS --- */
#projects { padding: 50px 0; background: var(--dark-bg); position: relative; z-index: 2; width: 100%; margin-top: -1px; }
#projects .section-title { margin-left: 10%; margin-bottom: 50px; }
.project-category { position: relative; min-height: 80vh; display: flex; align-items: center; overflow: visible; margin-top: -2vh; padding: 4vh 0; z-index: 1; transform: skewY(var(--section-angle)); }
.category-content { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0; z-index: 2; transform: skewY(calc(var(--section-angle) * -1)); }
.layout-reverse .category-content { flex-direction: row-reverse; }
.cat-info { width: 35%; height: 420px; display: flex; flex-direction: column; gap: 20px; z-index: 5; align-items: center; justify-content: center; text-align: center; padding: 0 5%; }
.cat-title { font-size: 3.5rem; font-weight: 900; font-style: italic; color: white; transform: none; -webkit-text-fill-color: initial; background: none; }
.nav-btns-wrapper { position: relative; display: flex; gap: 0; transform: skewX(-20deg); background: transparent; overflow: hidden; border: 1px solid rgba(0, 240, 255, 0.2); }
.nav-btns-wrapper .wrapper-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(5, 5, 16, 0.8); z-index: 0; }
.nav-btns-wrapper span { position: absolute; display: block; z-index: 10; pointer-events: none; filter: drop-shadow(0 0 2px var(--sonic-cyan)) drop-shadow(0 0 5px var(--sonic-cyan)); }
.nav-btns-wrapper span:nth-child(1) { top: 0; left: -100%; width: 100%; height: 2px; background: linear-gradient(90deg, transparent 50%, var(--sonic-cyan)); animation: animate1 1s linear infinite; }
.nav-btns-wrapper span:nth-child(2) { top: -100%; right: 0; width: 2px; height: 100%; background: linear-gradient(180deg, transparent 50%, var(--sonic-cyan)); animation: animate2 1s linear infinite; animation-delay: 0.25s; }
.nav-btns-wrapper span:nth-child(3) { bottom: 0; right: -100%; width: 100%; height: 2px; background: linear-gradient(270deg, transparent 50%, var(--sonic-cyan)); animation: animate3 1s linear infinite; }
.nav-btns-wrapper span:nth-child(4) { bottom: -100%; left: 0; width: 2px; height: 100%; background: linear-gradient(360deg, transparent 50%, var(--sonic-cyan)); animation: animate4 1s linear infinite; animation-delay: 0.25s; }
.nav-btn { position: relative; width: 80px; height: 55px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; z-index: 2; transition: 0.3s; }
.prev-btn { border-right: 1px solid rgba(0, 240, 255, 0.1); }
.nav-btn .btn-text { color: var(--sonic-cyan); font-size: 1.5rem; font-weight: 900; transition: 0.3s; text-shadow: 0 0 5px rgba(0, 240, 255, 0.3); }
.prev-btn .btn-text { transform: rotate(180deg); }
.nav-btn:hover { background: rgba(0, 240, 255, 0.2); box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2); }
.nav-btn:hover .btn-text { color: #fff; text-shadow: 0 0 10px var(--sonic-cyan); }

.cat-carousel { flex: 1; height: 420px; position: relative; z-index: 1; display: flex; align-items: center; transform: skewX(-10deg); overflow: hidden; margin-right: -100px; padding-right: 100px; margin-left: 20px; }
.cat-carousel::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 5px; background: var(--sonic-cyan); box-shadow: 0 0 15px var(--sonic-cyan); z-index: 50; }
.layout-reverse .cat-carousel { margin-right: 20px; margin-left: -100px; padding-left: 100px; padding-right: 0; }
.layout-reverse .cat-carousel::before { left: auto; right: 0; }
.carousel-track { display: flex; gap: 40px; transition: none; transform: skewX(10deg); padding: 0 40px; will-change: transform; }
.project-card { min-width: 450px; height: 350px; background: #000; position: relative; transition: 0.4s; box-shadow: 20px 20px 0px rgba(0,0,0,0.1); overflow: hidden; }
.project-card:hover { transform: translateY(-10px); }
.project-img { width: 100%; height: 85%; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-style: italic; transition: filter 0.4s ease; position: relative; z-index: 1; }
.project-card:hover .project-img { filter: brightness(0.3) blur(5px); }
.project-desc { position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%); width: 80%; text-align: justify; font-family: 'Exo 2', sans-serif; color: white; font-size: 1rem; line-height: 1.5; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; z-index: 10; }
.project-card:hover .project-desc { opacity: 1; }
.project-info-bar { height: 15%; background: var(--sonic-cyan); display: flex; align-items: center; justify-content: space-between; padding: 0 15px; color: var(--dark-bg); position: relative; z-index: 11; }
.project-title { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.1rem; }
.project-stack { display: flex; gap: 12px; align-items: center; }
.sw-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: transparent; }

/* --- OVERLAY CONTENT --- */
.overlay-content { width: 90%; max-width: 1400px; margin: 0 auto; opacity: 0; transition: opacity 0.4s ease; display: flex; flex-direction: column; align-items: center; padding: 100px 2% 100px 2%; }
.overlay-content.visible { opacity: 1; }
#overlayZone { width: 100%; text-align: center; color: var(--sonic-cyan); font-style: italic; font-weight: 900; font-size: 3rem; letter-spacing: 5px; text-transform: uppercase; margin-bottom: 40px; }
.main-project-row { display: flex; align-items: center; justify-content: center; gap: 50px; width: 100%; margin-bottom: 80px; }
#mainMediaContainer { flex: 1; aspect-ratio: 16/9; background: #000; border: 2px solid var(--sonic-cyan); box-shadow: 0 0 30px rgba(0, 240, 255, 0.2); overflow: hidden; }
#mainMediaContainer video, #mainMediaContainer img, #mainMediaContainer iframe { width: 100%; height: 100%; object-fit: cover; display: block; vertical-align: middle; border: none; }
.main-info-column { flex: 1; display: flex; flex-direction: column; gap: 40px; text-align: left; }
.info-group { display: flex; flex-direction: column; gap: 15px; }
.info-section-title { color: var(--sonic-cyan); font-size: 1.2rem; font-weight: 900; text-transform: uppercase; letter-spacing: 3px; border-left: 5px solid var(--sonic-cyan); padding-left: 15px; }
.overlay-tech-list { display: flex; gap: 25px; flex-wrap: wrap; padding-top: 5px; }
.tech-box-wrapper { position: relative; display: inline-block; }
.tech-box-wrapper::before { content: ''; position: absolute; top: 5px; left: 5px; width: 60px; height: 60px; background: #ffffff; transform: skewX(-10deg); z-index: 1; }
.tech-box { position: relative; width: 60px; height: 60px; background: var(--sonic-cyan); display: flex; align-items: center; justify-content: center; padding: 12px; transform: skewX(-10deg); z-index: 2; }
.tech-box img { width: 100%; height: 100%; object-fit: contain; transform: skewX(10deg); }

/* DESCRIPTION HARMONISÉE */
.main-full-desc { font-size: 1.2rem; line-height: 1.8; color: rgba(255, 255, 255, 0.9); text-align: justify; font-weight: 300; }

#extraMediaContainer { width: 100%; display: flex; flex-direction: column; gap: 120px; margin-top: 50px; }
.extra-media-row { display: flex; align-items: center; width: 100%; gap: 60px; flex-direction: row; }
.extra-media-row:nth-child(even) { flex-direction: row-reverse; } 

.extra-text { flex: 1.2; font-size: 1.2rem; line-height: 1.8; color: rgba(255, 255, 255, 0.9); text-align: justify; font-weight: 300; }
.extra-img-wrapper { flex: 0.8; border: 2px solid var(--sonic-cyan); box-shadow: 15px 15px 0px #ffffff; background: #000; }

/* Modification : On autorise le clic sur les iframes (PDF/Youtube) et Vidéos */
.extra-img-wrapper img { width: 100%; display: block; object-fit: cover; pointer-events: none; }
.extra-img-wrapper iframe, .extra-img-wrapper video { width: 100%; display: block; object-fit: cover; pointer-events: auto !important; }

#closeOverlayBtn { margin-top: 100px; align-self: center; }

footer { height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #ffffff; text-align: center; position: relative; z-index: 15; border-top: 1px solid rgba(0, 0, 0, 0.1); }
footer > * { transform: none; }
footer .cta-btn .btn-bg { background: transparent; border: 2px solid var(--dark-bg); }
footer .cta-btn .btn-text { color: var(--dark-bg); text-shadow: none; }
footer .cta-btn:hover .btn-bg { background: var(--dark-bg); border-color: var(--dark-bg); }
footer .cta-btn:hover .btn-text { color: white; text-shadow: 0 0 10px rgba(255,255,255,0.5); }

.site-link-icon { text-decoration: none; margin-left: 30px; position: relative; display: inline-block; }
.site-link-icon .tech-box { background: white !important; box-shadow: 5px 5px 0px var(--sonic-cyan) !important; transition: 0.3s ease; }
.site-link-icon i { color: var(--dark-bg) !important; font-size: 1.5rem; transform: skewX(10deg); transition: 0.3s ease; }
.site-link-icon:hover .tech-box { background: var(--sonic-cyan) !important; box-shadow: 5px 5px 0px white !important; }
.site-link-icon:hover i { color: var(--dark-bg) !important; }
.custom-tooltip { position: absolute; background: white; color: var(--dark-bg); padding: 5px 12px; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 0.8rem; top: -20px; left: 50%; transform: skewX(-15deg) translateX(-50%) translateY(-100%); pointer-events: none; opacity: 0; transition: 0.3s cubic-bezier(0.2, 1, 0.3, 1); white-space: nowrap; box-shadow: 4px 4px 0px var(--sonic-cyan); z-index: 100; }
.site-link-icon:hover .custom-tooltip { opacity: 1; transform: skewX(-15deg) translateX(-50%) translateY(-130%); }

/* --- GESTION PDF HYBRIDE (GLOBAL PC) --- */
.pdf-desktop { display: block; }
.pdf-mobile-btn { display: none; } 

.pdf-fallback-link, .pdf-fallback-btn {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--sonic-cyan);
    color: var(--sonic-cyan);
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.3s;
    font-size: 1rem;
    cursor: pointer;
    pointer-events: auto !important;
}

.pdf-fallback-link:hover, .pdf-fallback-btn:hover {
    background: var(--sonic-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--sonic-cyan);
}

.extra-pdf-box {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #101015;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- RESPONSIVE GENERAL (Tablette) --- */
@media (max-width: 1200px) { .overlay-content { width: 80%; } .extra-media-row { transform: none !important; } .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1024px) { .skills-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; } .skill-card { transform: skewX(-5deg); } .skill-card > * { transform: skewX(5deg); } .header-quote { display: none; } }

/* --- RESPONSIVE TÉLÉPHONE (VERSION FINALE PDF VISIBLE) --- */
@media (max-width: 768px), (max-height: 600px) and (orientation: landscape) {
    
    /* 1. RESET GLOBAL */
    * { cursor: auto !important; } 
    .cursor-dot, .cursor-outline, .cursor-trail { display: none !important; } 
    body { overflow-x: hidden; }

    /* Stop Hover */
    .project-card:hover, .skill-card:hover, .about-item:hover, .cta-btn:hover {
        transform: none !important; box-shadow: none !important; filter: none !important;
    }
    .project-card:hover .project-img { filter: none !important; }

    /* 2. MENU SUPPRIMÉ */
    .nav-dropdown, .menu-button { display: none !important; pointer-events: none !important; }

    /* 3. BOUTONS RÉDUITS */
    .cta-btn {
        margin-top: 20px !important; 
        padding: 12px 25px !important; 
        transform: skewX(-20deg) !important;
    }
    .cta-btn .btn-text { font-size: 0.9rem !important; letter-spacing: 2px !important; }

    /* 4. HEADER & CITATION */
    h1 { font-size: 2.5rem; text-align: center; margin: 0; }
    header { padding: 0; align-items: center; justify-content: center; text-align: center; gap: 20px; }
    .header-quote { display: block !important; position: relative !important; width: 90% !important; right: auto !important; top: auto !important; transform: none !important; margin: 0 auto; text-align: center; }
    .header-quote p { font-size: 1rem !important; color: rgba(255, 255, 255, 0.7); }
    .header-quote p::after { display: none !important; }
    .role { margin-left: 0; font-size: 1rem; text-align: center; }

    /* 5. SECTIONS REDRESSÉES */
    #about, #skills, #projects { padding: 40px 5%; transform: none; }
    .about-grid, .skills-grid { display: flex; flex-direction: column; gap: 20px; }
    .about-item, .skill-card { transform: none !important; background: rgba(255,255,255,0.03) !important; }
    .about-item *, .skill-card * { transform: none !important; }
    
    #projects .section-title { margin-left: 0 !important; margin-right: 0 !important; }
    .section-title { font-size: 2rem; transform: none; text-align: center; display: block; margin: 0 auto 30px auto; }

    /* 6. PROJETS */
    .project-category, .layout-reverse .project-category { min-height: auto; padding: 20px 0; transform: none; flex-direction: column; gap: 0; }
    .category-content, .layout-reverse .category-content { flex-direction: column; transform: none; }
    .cat-info { display: contents !important; }
    .cat-title { order: 1; width: 100%; text-align: center; margin-bottom: 15px; font-size: 1.8rem; transform: none; }
    .cat-carousel { order: 2; width: 100%; height: auto !important; min-height: 280px; margin: 0 !important; padding: 10px 0 !important; transform: none !important; overflow: visible !important; }
    .cat-carousel::before { display: none; } 
    .carousel-track { padding-left: 0; transform: none; align-items: flex-start; }
    .project-card { min-width: 70vw; height: 260px; margin-right: 15px; transform: none !important; box-shadow: 0 5px 10px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
    .project-img { flex: 1; min-height: 0; width: 100%; }
    .project-desc { display: none !important; }
    .project-info-bar { height: auto !important; min-height: 50px; padding: 8px 10px; flex-shrink: 0; width: 100% !important; }
    .project-title { font-size: 0.8rem !important; max-width: 65%; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .sw-icon { width: 16px; height: 16px; }
    .nav-btns { order: 3; width: 100%; display: flex; justify-content: center; margin-top: 15px; pointer-events: auto !important; z-index: 500; transform: none; position: relative; }
    .nav-btns-wrapper { transform: none; border: none; background: transparent; gap: 40px; }
    .nav-btns-wrapper .wrapper-bg, .nav-btns-wrapper span { display: none; }
    .nav-btn { width: 70px; height: 60px; background: rgba(0, 240, 255, 0.15); border: 1px solid var(--sonic-cyan); pointer-events: auto !important; cursor: pointer; }

    /* 7. OVERLAY & EXTRA MEDIA */
    .project-overlay::before { transform: none !important; width: 100% !important; height: 100% !important; left: 0 !important; background: var(--dark-bg) !important; }
    .overlay-content { width: 100% !important; max-width: none !important; padding: 60px 15px 40px 15px; transform: none; }
    #overlayZone { font-size: 1.8rem !important; letter-spacing: 2px !important; margin-bottom: 25px !important; line-height: 1.2; }
    .info-section-title { font-size: 1rem !important; }

    .main-project-row { flex-direction: column; gap: 20px; }
    .extra-media-row, .extra-media-row:nth-child(even) { flex-direction: column-reverse !important; gap: 20px; align-items: center; }
    .extra-text { width: 100%; text-align: justify; }
    .extra-img-wrapper { width: 100% !important; flex: none; }

    /* --- PDF SUR MOBILE --- */
    /* On force l'iframe à être visible et avoir une hauteur minimale sur mobile */
    .pdf-iframe { 
        display: block !important; 
        min-height: 350px; /* Vital pour voir le document */
        background: #fff;
    }
}

/* --- AJUSTEMENT PAYSAGE --- */
@media (max-height: 600px) and (orientation: landscape) {
    .project-card { min-width: 40vw !important; height: 200px !important; flex-direction: column !important; }
    .project-img { width: 100% !important; flex: 1; min-height: 0; }
    .project-info-bar { width: 100% !important; min-height: 45px !important; padding: 5px 10px !important; }
    .project-title { font-size: 0.75rem !important; -webkit-line-clamp: 1 !important; }
    .cat-carousel { min-height: 220px !important; }
}