:root {
    --sidebar-width: 80px;
    --sidebar-bg: #b04296;
    --active-color: #ffffff;
    --active-bg: rgba(255, 255, 255, 0.2);
    --text-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --font-main: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text-white);
    background-color: #0f0f1a;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background: transparent;
    padding: 0;
}

.nav-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.3s;
    border-radius: 10px;
    margin: 10px 0;
}

.nav-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.nav-icon.active {
    background: white;
    color: var(--sidebar-bg);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
    transform: scale(1.1);
}

.sidebar-middle {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background.png') no-repeat center top/cover;
    z-index: -2;
    transform: scale(1.3);
    transform-origin: center top;
}

.hero-bg.animate {
    animation: zoomOutBg 10s ease-out forwards;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 12, 85, 0.85), rgba(15, 23, 42, 0.9));
    z-index: -1;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    padding: 0 20px;
}

.hero-text h1 {
    font-size: 5.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-text .subtitle {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 25px;
    color: #e2e8f0;
    border-left: none;
    padding-left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.hero-text .subtitle::before {
    content: '\f0da';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--sidebar-bg);
    font-size: 1.5rem;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.tagline {
    font-size: 1.3rem;
    color: #cbd5e1;
    font-weight: 300;
    letter-spacing: 1px;
}

@keyframes zoomOutBg {
    0% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.content-section {
    padding: 100px 10%;
    min-height: 100vh;
    background-color: #11111f;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 3rem;
    margin-bottom: 50px;
    border-left: 6px solid var(--sidebar-bg);
    padding-left: 25px;
}

h3.category-title {
    color: var(--sidebar-bg);
    margin: 40px 0 20px 0;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    display: inline-block;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
    line-height: 1.8;
}

.profile-photo {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--sidebar-bg);
    box-shadow: 0 0 30px rgba(176, 66, 150, 0.4);
    flex-shrink: 0;
    transition: 0.3s;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--sidebar-bg);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.btn-cv:hover {
    background: var(--sidebar-bg);
    box-shadow: 0 0 20px rgba(176, 66, 150, 0.5);
    transform: translateY(-3px);
}

.exp-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.exp-item {
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    border-left: 4px solid var(--sidebar-bg);
    transition: 0.3s;
}

.exp-item:hover {
    background: #23233b;
}

.exp-header {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exp-info h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: white;
}

.exp-info span {
    font-size: 0.9rem;
    color: #b0b0b0;
    font-style: italic;
}

.exp-logo {
    height: 70px;
    width: 70px;
    min-width: 70px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.exp-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.5s ease, opacity 0.5s ease;
    background: rgba(0,0,0,0.2);
    padding: 0 25px;
    opacity: 0;
}

.exp-details.open {
    max-height: 1000px;
    padding: 20px 25px;
    border-top: 1px solid rgba(255,255,255,0.05);
    opacity: 1;
    transition: max-height 1s ease-in-out, padding 0.5s ease, opacity 0.5s ease;
}

.skills-category-row {
    margin-bottom: 40px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.skill-badge {
    padding: 12px 25px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--sidebar-bg);
    border-radius: 30px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
    width: fit-content;
}

.skill-badge:hover {
    background: rgba(176, 66, 150, 0.2);
    box-shadow: 0 0 15px var(--sidebar-bg);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.skill-desc {
    font-size: 0.9rem;
    font-weight: 400;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    color: #ddd;
    width: 100%;
}

.skill-badge.active {
    background: var(--sidebar-bg);
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
}

.skill-badge.active .skill-desc {
    max-height: 300px;
    margin-top: 15px;
    opacity: 1;
}

.projects-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--sidebar-bg);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
    transition: 0.3s;
    font-size: 1.2rem;
}

.scroll-btn:hover {
    background: #d65dbd;
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn.left { left: -25px; }
.scroll-btn.right { right: -25px; }

.projects-scroller {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0 40px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    width: 100%;
    scroll-behavior: smooth;
}

.projects-scroller::-webkit-scrollbar { height: 10px; }
.projects-scroller::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 5px; }
.projects-scroller::-webkit-scrollbar-thumb { background: var(--sidebar-bg); border-radius: 5px; }
.projects-scroller::-webkit-scrollbar-thumb:hover { background: #d65dbd; }

.project-card {
    flex: 0 0 600px;
    scroll-snap-align: start;
    background: #1a1a2e;
    border-radius: 15px;
    overflow: hidden;
    transition: 0.4s;
    border-bottom: 4px solid transparent;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.project-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--sidebar-bg);
    box-shadow: 0 15px 40px rgba(176, 66, 150, 0.3);
}

.project-img-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-info {
    padding: 30px;
}

.project-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.project-header-row h3 {
    font-size: 1.1rem;
    color: var(--text-white);
    margin: 0;
    line-height: 1.4;
}

.project-arrow {
    font-size: 1.2rem;
    color: var(--sidebar-bg);
    transition: 0.4s;
}

.project-desc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), padding 0.5s ease, margin 0.5s ease, opacity 0.5s ease;
    padding-top: 0;
    margin-top: 0;
    opacity: 0;
}

.project-desc-content.open {
    max-height: 2500px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 15px;
    opacity: 1;
    transition: max-height 1s ease-in-out, padding 0.5s ease, margin 0.5s ease, opacity 0.5s ease;
}

.project-arrow.rotate {
    transform: rotate(180deg);
}

.btn-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(255,255,255,0.1);
    color: var(--sidebar-bg);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--sidebar-bg);
    transition: 0.3s;
    white-space: normal;
    line-height: 1.4;
}

.btn-pdf-link:hover {
    background: var(--sidebar-bg);
    color: white;
}

.pdf-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.baie-comparison {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.baie-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.baie-item {
    flex: 1;
    text-align: center;
}

.baie-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}

.baie-item img:hover {
    transform: scale(1.05);
}

.baie-label {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-top: 5px;
    display: block;
    font-weight: bold;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s;
}

.contact-row:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(10px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--sidebar-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.contact-text {
    font-size: 1.1rem;
    font-weight: 500;
    word-break: break-all;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.protected-link {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.protected-link:hover {
    color: var(--sidebar-bg);
}

.btn-glow {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 40px;
    background: var(--sidebar-bg);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    text-transform: uppercase;
    transition: 0.3s;
}

.btn-glow:hover {
    background: #d65dbd;
    box-shadow: 0 0 20px var(--sidebar-bg);
}

.secret-number {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.secret-number::after {
    content: "Voir le numéro";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--sidebar-bg);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-in-out;
    border-radius: 5px;
}

.contact-row:hover .secret-number::after {
    transform: translateX(100%);
}

@media (max-width: 900px) {
    .about-container { flex-direction: column-reverse; text-align: center; }
    .hero-text h1 { font-size: 2.8rem; line-height: 1.2; letter-spacing: 2px; }
    .hero-text .subtitle { font-size: 1.2rem; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .hero-text .subtitle::before { font-size: 1rem; }
    .sidebar { width: 100%; height: 70px; flex-direction: row; padding: 0 25px; bottom: 0; top: auto; }
    .sidebar-middle { flex-direction: row; gap: 20px; }
    .sidebar-top, .sidebar-bottom { display: none; }
    .main-content { margin-left: 0; margin-bottom: 70px; width: 100%; }
    .content-section { padding: 80px 5%; }
    .project-card { flex: 0 0 85vw; }
    .scroll-btn.left { left: -10px; }
    .scroll-btn.right { right: -10px; }
}