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

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Amiri:wght@400&display=swap');

body {
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
}

/* ==================== LANDING PAGE ==================== */
.landing {
    overflow: hidden;
}

.landing-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.landing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 20s ease-in-out infinite alternate;
    transition: transform 0.1s ease-out;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.landing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.landing-title {
    text-align: center;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.title-fr {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.title-ar {
    display: block;
    font-family: 'Amiri', serif;
    font-size: clamp(1.5rem, 5vw, 4rem);
    letter-spacing: 0.1em;
}

/* ==================== MAIN PAGE ==================== */
.main-page {
    background: #e8e8e8;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Hamburger menu (mobile only) */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    background: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: black;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar {
    width: 250px;
    background: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow-y: auto;
}

.site-title {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.site-title:hover {
    opacity: 0.6;
}

.menu-section {
    flex-grow: 1;
}

.menu-item {
    padding: 0.8rem 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.menu-item:hover {
    opacity: 0.6;
}

.menu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    height: 1px;
    background: black;
}

.menu-item.expandable {
    position: relative;
}

.menu-title {
    display: block;
    position: relative;
    padding-left: 1.2rem;
}

.menu-title::before {
    content: '▸';
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.expandable.expanded .menu-title::before {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 1rem;
}

.expandable.expanded .submenu {
    max-height: 300px;
}

.submenu-item {
    padding: 0.6rem 0;
    cursor: pointer;
    transition: opacity 0.3s ease;
    position: relative;
}

.submenu-item:hover {
    opacity: 0.6;
}

.submenu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    right: 0;
    height: 1px;
    background: black;
}

.footer {
    font-size: 0.75rem;
    line-height: 1.6;
    color: #666;
    margin-top: 2rem;
}

.footer a {
    color: #666;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.6;
}

.content-area {
    margin-left: 250px;
    width: calc(100% - 250px);
    height: 100vh;
    background: black;
    position: relative;
    transition: background 0.5s ease;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
}

.content-area.has-content {
    background: white;
}

.placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    text-align: center;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.placeholder.hidden {
    opacity: 0;
}

.gallery {
    display: none;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    opacity: 0;
    transition: opacity 0.5s ease;
    gap: 2rem;
    padding: 2rem;
}

.gallery.visible {
    display: flex;
    opacity: 1;
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

.gallery-item {
    flex-shrink: 0;
    height: calc(100vh - 4rem);
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.about-content,
.contact-content {
    display: none;
    padding: 4rem;
    max-width: 800px;
    line-height: 1.8;
    opacity: 0;
    transition: opacity 0.5s ease;
    min-height: 100vh;
}

.about-content.visible,
.contact-content.visible {
    display: block;
    opacity: 1;
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.close-lightbox {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
    transition: opacity 0.3s ease;
}

.close-lightbox:hover {
    opacity: 0.6;
}

#lightboxImage {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    pointer-events: all;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== RESPONSIVE ==================== */

/* Desktop et tablette large : > 768px */
/* Pas de media query nécessaire, c'est le style par défaut */

/* Tablette et mobile : ≤ 768px */
@media (max-width: 768px) {
    /* Afficher le hamburger */
    .hamburger {
        display: flex !important;
    }
    
    /* Menu caché par défaut, ouvert via hamburger */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 80%;
        max-width: 300px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Content area prend toute la largeur */
    .content-area {
        margin-left: 0;
        width: 100%;
        height: 100vh;
    }
    
    /* Galerie en colonne verticale pour scroll vertical */
    .gallery {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .gallery-item {
        height: auto;
        width: 100%;
    }
    
    .gallery-item img {
        width: 100%;
        height: auto;
        max-height: 70vh;
    }
    
    /* About et Contact avec marge pour le hamburger */
    .about-content,
    .contact-content {
        padding: 2rem 1.5rem;
        margin-top: 60px;
    }
    
    .placeholder {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    
    /* Lightbox adapté */
    .nav-btn {
        font-size: 2rem;
        padding: 0.5rem 1rem;
    }
    
    .close-lightbox {
        font-size: 2rem;
        top: 1rem;
        right: 1rem;
    }
}

/* Très petits écrans : ≤ 480px */
@media (max-width: 480px) {
    .site-title {
        font-size: 1rem;
        letter-spacing: 0.15em;
    }
    
    .menu-item {
        padding: 0.6rem 0;
        font-size: 0.9rem;
    }
    
    .submenu-item {
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
    
    .footer {
        font-size: 0.65rem;
    }
    
    .about-content,
    .contact-content {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .gallery {
        padding: 0.5rem;
    }
    
    .hamburger {
        top: 0.75rem;
        left: 0.75rem;
    }
}