/* ==========================================================================
   Loïsa Hicaubert Portfolio - Main Stylesheet
   Clean version without Adobe dependencies - i18n FR/EN
   ========================================================================== */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --color-background: #fff;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-lighter: #999;
    --color-border: #e5e5e5;
    --color-accent: #000;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --sidebar-width: 380px;
    --transition-speed: 0.3s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-easing);
}

a:hover {
    color: var(--color-text-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.cfix::after {
    content: "";
    display: table;
    clear: both;
}

.site-wrap {
    min-height: 100vh;
}

.site-container {
    max-width: 1800px;
    margin: 0 auto;
}

.site-content {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar-content {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
    z-index: 100;
    overflow-y: auto;
    text-align: center;
}

.site-header {
    margin-bottom: 40px;
}

.logo-wrap {
    margin-bottom: 10px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.logo a {
    display: block;
}

.logo a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
    flex: 1;
}

nav ul {
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-bottom: 8px;
}

nav ul li a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    color: #999;
    transition: all var(--transition-speed) var(--transition-easing);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--color-text);
}

nav ul li.gallery-title a {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    margin-top: 10px;
    display: inline-block;
}

nav ul li.project-title {
    padding-left: 0;
}

nav ul li.project-title a {
    font-size: 15px;
    line-height: 1.7;
    color: #888;
}

nav ul li.project-title a:hover {
    color: #333;
}

/* ==========================================================================
   Language Switch
   ========================================================================== */
.lang-switch {
    margin-top: auto;
    padding-top: 30px;
    text-align: center;
}

.lang-switch a {
    display: inline-block;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-switch a:hover {
    color: #333;
    border-color: #333;
}

/* ==========================================================================
   Hamburger Menu (Mobile)
   ========================================================================== */
.hamburger-click-area {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
}

.hamburger i {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    position: absolute;
    left: 0;
    transition: all var(--transition-speed) var(--transition-easing);
}

.hamburger i:nth-child(1) { top: 0; }
.hamburger i:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger i:nth-child(3) { bottom: 0; }

/* Hamburger active state */
.nav-open .hamburger i:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.nav-open .hamburger i:nth-child(2) {
    opacity: 0;
}

.nav-open .hamburger i:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ==========================================================================
   Responsive Navigation
   ========================================================================== */
.js-responsive-nav {
    display: none;
}

.responsive-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-background);
    z-index: 1000;
    padding: 80px 30px 30px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) var(--transition-easing);
}

.nav-open .responsive-nav {
    transform: translateX(0);
}

.close-responsive-click-area {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.close-responsive-button {
    width: 24px;
    height: 24px;
    position: relative;
    margin: 10px;
}

.close-responsive-button::before,
.close-responsive-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    top: 50%;
    left: 0;
}

.close-responsive-button::before {
    transform: rotate(45deg);
}

.close-responsive-button::after {
    transform: rotate(-45deg);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    min-height: 100vh;
}

/* ==========================================================================
   Project Covers Grid
   ========================================================================== */
.project-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.project-cover {
    display: block;
    position: relative;
    overflow: hidden;
}

.cover-image-wrap {
    position: relative;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.cover__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover Overlay */
.cover-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.project-cover:hover .cover-overlay {
    opacity: 1;
}

.cover-overlay-content {
    text-align: center;
    padding: 20px;
}

.cover-overlay .date {
    font-size: 16px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 400;
}

.cover-overlay .title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preserve-whitespace {
    white-space: pre-wrap;
}

/* ==========================================================================
   Back to Top
   ========================================================================== */
.back-to-top {
    text-align: center;
    padding: 60px 0 40px;
}

.back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-lighter);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-to-top a:hover {
    color: var(--color-text);
}

.back-to-top .arrow {
    font-size: 16px;
}

.back-to-top-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) var(--transition-easing);
    z-index: 99;
}

.back-to-top-fixed.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-fixed:hover {
    background: var(--color-text);
    border-color: var(--color-text);
}

.back-to-top-fixed:hover .icon-back-to-top {
    fill: var(--color-background);
}

.icon-back-to-top {
    width: 16px;
    height: 16px;
    fill: var(--color-text);
    transition: fill var(--transition-speed) var(--transition-easing);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
}

.footer-text {
    font-size: 12px;
    color: var(--color-text-lighter);
}

.footer-text a {
    color: var(--color-text-light);
}

.footer-text a:hover {
    color: var(--color-text);
}

/* ==========================================================================
   Social Icons
   ========================================================================== */
.social {
    margin-top: auto;
    padding-top: 30px;
}

.social ul {
    display: flex;
    gap: 15px;
}

.social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-border);
    transition: all var(--transition-speed) var(--transition-easing);
}

.social a:hover {
    background: var(--color-text);
    color: var(--color-background);
}

/* ==========================================================================
   Page Background
   ========================================================================== */
.page-background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   Transitions
   ========================================================================== */
.transition-enabled * {
    transition-property: opacity, transform;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.group::after {
    content: "";
    display: table;
    clear: both;
}

.hold-space {
    display: block;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .sidebar-content {
        padding: 30px 25px;
    }
    
    main {
        padding: 30px;
    }
    
    .project-covers {
        gap: 15px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .sidebar-content {
        position: relative;
        width: 100%;
        height: auto;
        padding: 20px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .sidebar-content nav {
        display: none;
    }
    
    .sidebar-content .social {
        display: none;
    }
    
    .site-header {
        margin-bottom: 0;
    }
    
    .hamburger-click-area {
        display: block;
    }
    
    .js-responsive-nav {
        display: block;
    }
    
    main {
        margin-left: 0;
        padding: 20px;
    }
    
    .project-covers {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .site-content {
        flex-direction: column;
    }
}

/* Mobile Portrait */
@media (max-width: 540px) {
    .project-covers {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .title {
        font-size: 13px;
    }
    
    .back-to-top-fixed {
        bottom: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   Project Page Styles
   ========================================================================== */
.project-page main {
    max-width: 1200px;
}

.project-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.project-title-main {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.project-date {
    font-size: 12px;
    color: var(--color-text-lighter);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-content {
    max-width: 800px;
}

.project-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.project-content img {
    margin: 30px 0;
    border-radius: 4px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.project-video {
    margin: 40px 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.about-image img {
    width: 100%;
    border-radius: 4px;
}

.about-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--color-text-light);
}

.about-contact {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.about-contact a {
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.about-contact a:hover {
    border-color: var(--color-text);
}

.about-text.centered {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.about-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
}

.about-social {
    margin-top: 40px;
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icons li {
    display: inline-block;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-border);
    transition: background 0.3s ease;
}

.social-icons a:hover {
    background: var(--color-text);
}

.social-icons a:hover .icon {
    fill: #fff;
}

.social-icons .icon {
    width: 24px;
    height: 24px;
    fill: var(--color-text);
    transition: fill 0.3s ease;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-title {
        font-size: 36px;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.js-lazy {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.js-lazy.loaded {
    opacity: 1;
}

/* ==========================================================================
   Project Page - Modules System
   ========================================================================== */
.page-container {
    max-width: 100%;
}

.page.standard-modules {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-header {
    margin-bottom: 50px;
    padding: 60px 0 30px 0;
    text-align: center;
}

.page-header .title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
}

.page-content {
    width: 100%;
}

.modules.content {
    width: 100%;
}

/* Project Module Base */
.project-module {
    margin-bottom: 20px;
}

.project-module:last-child {
    margin-bottom: 0;
}

/* Module: Text */
.project-module.text {
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.project-module.text .rich-text {
    font-size: 16px;
    line-height: 1.9;
    color: #777;
    text-align: center;
}

.project-module.text .rich-text p {
    margin-bottom: 15px;
}

.project-module.text .rich-text p:last-child {
    margin-bottom: 0;
}

/* Module: Text Small */
.project-module.text.small .rich-text {
    font-size: 14px;
    line-height: 1.8;
    color: #999;
}

/* Module: Button */
.project-module.button {
    margin: 30px 0;
}

.project-module.button .button-container {
    text-align: center;
}

.button-module {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-text);
    color: var(--color-background);
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all var(--transition-speed) var(--transition-easing);
    text-align: center;
}

.button-module:hover {
    background-color: var(--color-text-light);
    color: var(--color-background);
    transform: translateY(-1px);
}

/* Module: Image */
.project-module.image {
    margin-bottom: 20px;
}

.project-module.image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.project-module.image .js-lightbox {
    cursor: pointer;
    overflow: hidden;
}

/* Module: Image Grid */
.project-module.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.project-module.image-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.project-module.image-grid.cols-2 img {
    aspect-ratio: auto;
    object-fit: contain;
}

.project-module.image-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Module: Audio */
.project-module.audio {
    margin: 30px 0;
}

.project-module.audio audio {
    width: 100%;
    border-radius: 4px;
}

.project-module.image .js-lightbox img {
    transition: transform 0.4s var(--transition-easing);
}

.project-module.image .js-lightbox:hover img {
    transform: scale(1.02);
}

/* Module: Video Embed */
.project-module.video {
    margin: 30px 0;
}

.project-module.video .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.project-module.video .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Module: Caption */
.module-caption {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-light);
}

.module-caption p {
    margin: 0;
}

/* Module: Text Alignment */
.project-module.text.align-center .rich-text {
    text-align: center;
}

.project-module.text.align-left .rich-text {
    text-align: left;
}

.project-module.text.align-right .rich-text {
    text-align: right;
}

/* Rich Text Links */
.rich-text a {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-text a:hover {
    color: var(--color-text-light);
}

/* Module: Spacer */
.project-module.spacer {
    height: 40px;
}

/* Module: Divider */
.project-module.divider {
    height: 1px;
    background-color: var(--color-border);
    margin: 40px 0;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-text);
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

/* ==========================================================================
   Responsive - Project Modules
   ========================================================================== */
@media (max-width: 768px) {
    .page.standard-modules {
        padding: 0;
    }
    
    .page-header .title {
        font-size: 22px;
    }
    
    .project-module.text .rich-text {
        font-size: 14px;
    }
    
    .button-module {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .sidebar-content,
    .back-to-top,
    .back-to-top-fixed,
    .hamburger-click-area {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
    }
    
    .project-covers {
        grid-template-columns: repeat(3, 1fr);
    }
}
