/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Protection générale contre la sélection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Réactiver la sélection pour le texte dans les paragraphes */
.about-text, .about-text p, .contact-card, .contact-card h2, .about-card p {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Rendre le titre sélectionnable */
#main-title {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    pointer-events: auto; /* Permet les interactions avec le titre */
}

/* ============================================
   BACKGROUND & ATMOSPHERE (WHITE GALLERY)
   ============================================ */
body {
    background: #F5F5F7;
    position: relative;
    color: #1D1D1F;
}

/* Texture de grain subtile */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZmlsdGVyIGlkPSJhIiB4PSIwJSIgeT0iMCUiPjxmZVR1cmJ1bGVuY2UgYmFzZUZyZXF1ZW5jeT0iLjkiIG51bU9jdGF2ZXM9IjQiIHJlc3VsdD0ibm9pc2UiLz48ZmVDb2xvck1hdHJpeCB0eXBlPSJzYXR1cmF0ZSIgdmFsdWVzPSIwIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    pointer-events: none;
    z-index: 1;
    opacity: 0.15;
}

/* ============================================
   LIQUID GLASS DESIGN SYSTEM (LIGHT MODE)
   ============================================ */
.liquid-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.liquid-glass-strong {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: none;
    border-radius: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* ============================================
   CANVAS CONTAINER
   ============================================ */
#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    transition: filter 0.6s ease, opacity 0.6s ease;
    z-index: 2;
}

#canvas-container:active {
    cursor: grabbing;
}

#canvas-container.blurred {
    filter: blur(20px) brightness(0.95);
    opacity: 0.3;
}

/* ============================================
   UI BUTTONS
   ============================================ */
.ui-button {
    position: fixed;
    z-index: 1000;
    padding: 12px 20px;
    font-size: 10px;
    font-weight: 400;
    color: #1D1D1F;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    /* Style Liquid Glass */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.ui-button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ui-button:active {
    transform: translateY(0);
}

#about-button {
    top: 20px;
    right: 20px;
}

#contact-button {
    top: 20px;
    right: 140px;
}

/* ============================================
   MAIN TITLE
   ============================================ */
#main-title {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: #1D1D1F;
    font-family: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 6px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    pointer-events: auto; /* Permet la sélection du texte */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#main-title.hidden {
    opacity: 0;
}

/* ============================================
   GALLERY VIEW (EDITORIAL STYLE)
   ============================================ */
#gallery-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#gallery-view.active {
    display: flex;
}

.gallery-frame {
    max-width: 80vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    object-fit: contain;
    /* Protection contre le téléchargement */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.gallery-location {
    margin-top: 20px;
    font-size: 10px;
    font-weight: 300;
    color: #1D1D1F;
    opacity: 0.5;
    letter-spacing: 0.5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    text-transform: none;
    text-align: center;
}

/* Navigation positionnée aux bords de l'écran */
.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    padding: 10px 15px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 300;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    z-index: 2001;
}

.gallery-nav:hover {
    opacity: 0.5;
}

.gallery-nav.prev {
    left: 40px;
}

.gallery-nav.next {
    right: 40px;
}

.gallery-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 5px 10px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    z-index: 2001;
}

.gallery-close:hover {
    opacity: 0.5;
}

/* ============================================
   ABOUT OVERLAY
   ============================================ */
#about-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    gap: 60px;
}

#about-overlay.active {
    display: flex;
}

.about-image-wrapper {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: #F5F5F7;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
}

.about-card {
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.about-card h2 {
    color: #1D1D1F;
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: left;
}

.about-text {
    width: 100%;
}

.about-text p {
    color: #1D1D1F;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
    opacity: 0.8;
}

.about-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    /* Style Liquid Glass */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.about-close:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* ============================================
   CONTACT OVERLAY
   ============================================ */
#contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
}

#contact-overlay.active {
    display: flex;
}

.contact-card {
    max-width: 500px;
    width: 100%;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card h2 {
    color: #1D1D1F;
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.contact-link {
    padding: 16px 24px;
    text-align: center;
    text-decoration: none;
    color: #1D1D1F;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    /* Style Liquid Glass */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contact-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: #1D1D1F;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    /* Style Liquid Glass */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.contact-close:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

/* ============================================
   LOADING STATE
   ============================================ */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F5F7;
    color: #1D1D1F;
    font-size: 12px;
    letter-spacing: 1px;
    opacity: 0.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

#loading.hidden {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    /* Optimisation des boutons sur mobile */
    .ui-button {
        padding: 10px 14px;
        font-size: 10px;
        letter-spacing: 0.5px;
        /* Réduire les effets pour améliorer les performances */
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }

    #about-button {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
    }

    #contact-button {
        top: 12px;
        right: 80px;
        padding: 8px 12px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-card h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    #main-title {
        font-size: 20px;
        letter-spacing: 3px;
        top: 60px; /* Plus bas pour éviter la superposition avec les boutons */
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 100%;
        padding: 0 80px; /* Espace pour les boutons */
    }

    .gallery-frame {
        max-width: 90vw;
    }

    /* Flèches de navigation repositionnées pour mobile */
    .gallery-nav {
        padding: 8px 12px;
        font-size: 28px;
        /* Positionner en bas de l'écran sur mobile */
        top: auto;
        bottom: 30px;
        transform: translateY(0);
    }

    .gallery-nav.prev {
        left: 50%;
        transform: translateX(-120%);
        bottom: 30px;
    }

    .gallery-nav.next {
        right: 50%;
        transform: translateX(120%);
        bottom: 30px;
    }

    .gallery-close {
        top: 15px;
        right: 15px;
    }

    /* Optimisation de l'overlay About sur mobile */
    #about-overlay {
        flex-direction: column;
        gap: 30px;
        padding: 15px;
        align-items: center;
        /* Réduire les effets de flou sur mobile pour améliorer les performances */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .about-image-wrapper {
        width: 220px;
        height: 220px;
        order: 1;
        flex-shrink: 0;
        /* Réduire l'ombre pour améliorer les performances */
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .about-image-wrapper:hover {
        transform: none; /* Désactiver le hover sur mobile */
    }

    .about-card {
        padding: 25px 20px;
        max-height: none;
        max-width: 100%;
        width: 100%;
        order: 2;
        /* Réduire les effets glass sur mobile */
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }

    .about-card h2 {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: center;
        letter-spacing: 1.5px;
    }

    .about-text {
        width: 100%;
    }

    .about-text p {
        font-size: 15px;
        line-height: 1.8;
        margin-bottom: 16px;
        text-align: left;
    }

    .about-close {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 20px;
        /* Réduire les effets glass */
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }
}

@media (max-width: 480px) {
    /* Optimisation pour très petits écrans */
    .gallery-nav {
        padding: 6px 10px;
        font-size: 24px;
        bottom: 20px;
    }
    
    .gallery-nav.prev {
        left: 50%;
        transform: translateX(-120%);
        bottom: 20px;
    }
    
    .gallery-nav.next {
        right: 50%;
        transform: translateX(120%);
        bottom: 20px;
    }

    #about-overlay {
        gap: 25px;
        padding: 12px;
        align-items: center;
    }

    .about-image-wrapper {
        width: 200px;
        height: 200px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    }

    .about-card {
        padding: 22px 18px;
        max-height: none;
        width: 100%;
    }

    .about-card h2 {
        font-size: 20px;
        margin-bottom: 18px;
        letter-spacing: 1px;
    }

    .about-text p {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 14px;
        text-align: left;
    }

    .about-close {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
        font-size: 18px;
    }

    /* Optimisation des boutons sur très petits écrans */
    .ui-button {
        padding: 8px 10px;
        font-size: 9px;
    }

    #about-button {
        top: 10px;
        right: 10px;
    }

    #contact-button {
        top: 10px;
        right: 70px;
    }
}

