/* ========================================
   PHENIX - CSS Moderne Unifié
   ======================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

/* ========================================
   HEADER
   ======================================== */
header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 150px;
    width: auto;
}

.login-form {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.login-form strong {
    margin-right: 5px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 120px;
}

.login-form button {
    padding: 6px 16px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #555;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* ========================================
   MAIN LAYOUT
   ======================================== */
.main-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
    display: flex;
    gap: 25px;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: 200px;
    position: sticky;
    top: 90px;
    height: fit-content;
    background: white;
    padding: 20px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 5px;
}

.sidebar nav ul li a {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 13px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    background: #f0f0f0;
    color: #333;
    padding-left: 16px;
}

/* ========================================
   CONTENT
   ======================================== */
.content {
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.project-section {
    margin-bottom: 50px;
    padding-bottom: 35px;
    border-bottom: 1px solid #eee;
}

.project-section h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #333;
    scroll-margin-top: 180px;
}

.project-section:last-child {
    border-bottom: none;
}

.project-section .description {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

/* ========================================
   CAROUSEL
   ======================================== */
.carousel {
    position: relative;
    margin-bottom: 25px;
}

.carousel-main {
    width: 100%;
    height: 400px;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.carousel-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    cursor: zoom-in;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-main img.active {
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 12px 15px;
    font-size: 13px;
    z-index: 10;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
    z-index: 20;
}

.carousel-nav button {
    background: rgba(255,255,255,0.9);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    pointer-events: auto;
}

.carousel-nav button:hover {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Thumbnails */
.carousel-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 15px 0;
    scroll-behavior: smooth;
}

.carousel-thumbs::-webkit-scrollbar {
    height: 5px;
}

.carousel-thumbs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.carousel-thumbs::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.carousel-thumbs::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.carousel-thumbs img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.carousel-thumbs img:hover {
    border-color: #333;
    transform: scale(1.05);
}

.carousel-thumbs img.active {
    border-color: #333;
}

/* ========================================
   LIGHTBOX (Zoom plein écran)
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover {
    color: #ddd;
}

/* ========================================
   VIDEO PLAYER
   ======================================== */
.video-container {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   OVERLAY (Mobile Menu)
   ======================================== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    display: none;
}

.overlay.active {
    display: block;
}

/* ========================================
   RESPONSIVE - TABLET (< 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .header-container {
        flex-wrap: wrap;
    }

    .login-form {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 200;
        transition: left 0.3s;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .content {
        padding: 20px;
    }

    .carousel-main {
        height: 350px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (< 600px)
   ======================================== */
@media (max-width: 600px) {
    .project-section h2 {
        font-size: 20px;
    }

    .carousel-main {
        height: 250px;
    }

    .carousel-thumbs img {
        width: 70px;
        height: 50px;
    }

    .carousel-nav button {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .content {
        padding: 15px;
    }

    .sidebar {
        width: 260px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    header,
    .sidebar,
    .carousel-nav,
    .carousel-thumbs {
        display: none;
    }

    .content {
        box-shadow: none;
        padding: 0;
    }
}