/*
Theme Name: Altra Production
Theme URI: https://altraproduction.com
Author: Georges Smookherjee
Description: Custom theme for Altra Production - A minimalist portfolio theme for creative production showcasing photography and video projects
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altra
*/

/* ==========================================================================
   FONTS — Suisse Ecal International
   ========================================================================== */

@font-face {
    font-family: 'SuisseEcalIntl';
    src: url('assets/fonts/suisseecalintl-regular-webfont.woff2') format('woff2'),
         url('assets/fonts/suisseecalintl-regular-webfont.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SuisseEcalIntl';
    src: url('assets/fonts/suisseecalintl-medium-webfont.woff2') format('woff2'),
         url('assets/fonts/suisseecalintl-medium-webfont.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SuisseEcalIntl';
    src: url('assets/fonts/suisseecalintl-bold-webfont.woff2') format('woff2'),
         url('assets/fonts/suisseecalintl-bold-webfont.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CatalogueTrial';
    src: url('assets/fonts/CatalogueTrial-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

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

:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray: #F5F5F5;
    --font-primary: 'SuisseEcalIntl', Georgia, serif;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* ==========================================================================
   ACCESSIBILITY - FOCUS INDICATORS
   ========================================================================== */

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

/* Modern focus-visible for better UX - only show outline when keyboard navigating */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

/* Screen reader only text */
.screen-reader-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-sm);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ==========================================================================
   HERO SECTION - FULLSCREEN INTRO
   ========================================================================== */

.hero-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: background-color 0.3s ease;
}

.hero-content {
    text-align: center;
    color: var(--color-black) !important;
}

.hero-logo {
    position: fixed;
    top: 44.8%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    color: var(--color-black) !important;
    will-change: transform;
    margin: 0;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: baseline;
    gap: 0.25em;
    white-space: nowrap;
}

.hero-logo .logo-altra {
    font-family: 'CatalogueTrial', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
}

.hero-logo .logo-production {
    font-family: 'SuisseEcalIntl', sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero-info {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.8;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 120px));
    z-index: 1001;
    width: 100%;
    text-align: center;
    will-change: transform;
}

/* Adaptive hero-info for non-logged-in users */
body:not(.logged-in) .hero-info {
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    transform: translate(-50%, calc(-50% + clamp(60px, 10vw, 120px)));
}

.hero-info p {
    margin: 0.5rem 0;
}

/* .hero-instagram {
    font-weight: 500;
}

.hero-contact {
    font-weight: 300;
} */

/* Hero Navigation Links */
.hero-nav-left,
.hero-nav-right {
    position: fixed;
    top: 45.9%;
    z-index: 1001;
    will-change: transform;
    transition: opacity 0.3s ease;
}

.hero-nav-left {
    left: 2rem;
    transform: translateY(-50%);
}

.hero-nav-right {
    right: 2rem;
    transform: translateY(-50%);
}

.hero-nav-left a,
.hero-nav-right a {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
    text-decoration: none;
    color: var(--color-black);
}

/* Hero nav — same as header nav */
body:not(.logged-in) .hero-nav-left a,
body:not(.logged-in) .hero-nav-right a {
    font-size: 0.75rem;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-black);
    opacity: 0.6;
    animation: bounce 2s infinite;
    transition: opacity 0.3s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-0%) translateY(0); }
    50% { transform: translateX(-0%) translateY(-10px); }
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 2rem; /*haut droite bas gauche */
    background-color: var(--color-white);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.site-header.visible {
    opacity: 1;
}

.site-header,
.site-header a,
.site-logo {
    color: var(--color-black);
}

.site-logo {
    grid-column: 2;
    text-align: center;
    line-height: 1;
}

.site-logo a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: baseline;
    gap: 0.25em;
}

/* "Altra" — Catalogue Trial Bold */
.logo-altra {
    font-family: 'CatalogueTrial', Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
}

/* "Production" — petite, légère, SuisseEcal */
.logo-production {
    font-family: 'SuisseEcalIntl', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.nav-left {
    grid-column: 1;
    justify-self: start;
}

.nav-right {
    grid-column: 3;
    justify-self: end;
}

.nav-left,
.nav-right {
    align-self: center;
    transform: translateY(0.5vw); /* ← monte/descend INFOS + CONTACT sans affecter le logo */
}

.nav-left a,
.nav-right a {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-left a:hover,
.nav-right a:hover {
    opacity: 0.5;
}

/* Remove logged-in override — clamp handles responsiveness */
body:not(.logged-in) .nav-left a,
body:not(.logged-in) .nav-right a {
    font-size: 0.75rem;
}

/* Legacy navigation support */
.main-navigation {
    grid-column: 3;
    justify-self: end;
}

.main-navigation ul {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
}

.main-navigation a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.site-main {
    position: relative;
    z-index: 1;
    flex: 1;
    background-color: var(--color-white);
    /* color: var(--color-black); */
}

/* Espace pour le hero fullscreen uniquement sur la page d'accueil */
.home .site-main {
    margin-top: 100vh;
}

/* ==========================================================================
   PROJECTS GRID
   ========================================================================== */

/* Les styles de la grille et des cartes projet sont maintenant dans flexible-layout.css */

/* ==========================================================================
   SINGLE PROJECT
   ========================================================================== */

/* ==========================================================================
   SINGLE PROJECT PAGE
   ========================================================================== */

.single-project {
    padding-top: 45px;
}

/* Container page projet — galerie centrée, pas de padding latéral */
.project-container {
    padding: 0;
    max-width: none;
}

/* Gallery viewer — plein écran, clic pour naviguer */
.project-gallery-viewer {
    position: relative;
    width: 100%;
    cursor: pointer;
    margin-bottom: 1rem;
}

.gallery-images {
    width: 100%;
}

.gallery-slide {
    display: none;
}

.gallery-slide.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gallery-slide img {
    max-height: 68vh;
    height: auto;
    width: auto;
    max-width: 80%;
    display: block;
    margin: 0 auto;
}

/* Vidéo dans la galerie */
.gallery-video-wrapper {
    position: relative;
    height: 68vh;        /* même que les photos */
    width: auto;
    aspect-ratio: 16 / 9;
    max-width: none;     /* retire la contrainte à 900px */
}

.gallery-video-wrapper.gallery-video-portrait {
    max-width: 500px;
    aspect-ratio: 9 / 16;
}

.gallery-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    pointer-events: none; /* Les clics passent au gallery viewer pour la navigation */
}

/* Label gauche — affiché à gauche de l'image, centré verticalement */
.gallery-left-label {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    pointer-events: none;
    z-index: 10;
}

/* Compteur discret en bas à droite de la galerie */
.gallery-counter {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color-black);
    letter-spacing: 0.05em;
    pointer-events: none;
    z-index: 10;
}

/* Métadonnées — grille 5 colonnes, retour à la ligne automatique */
.project-details {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 2rem 10rem 1.5rem 2rem; /*haut   droite bas  gauche */
}

.project-detail-item {
    font-size: 0.85rem;
    line-height: 1.5;
}

/* "Label — Valeur" : flex pour que les lignes supplémentaires s'alignent sous la valeur */
.project-detail-item {
    display: flex;
    align-items: flex-start;
}

.project-detail-label {
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-detail-label::after {
    content: '\00a0—\00a0';
    font-weight: 400;
}

.project-detail-value {
    font-weight: 400;
}

/* Titre projet — sobre, au-dessus des métadonnées */
.project-header {
    margin-bottom: 0.5rem;
}

.project-header h1 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

/* Old gallery styles (kept for backwards compatibility) */
.project-gallery {
    display: grid;
    gap: var(--spacing-md);
}

.project-gallery img {
    width: 100%;
    height: auto;
}

/* Old gallery styles (kept for backwards compatibility) */
.project-gallery {
    display: grid;
    gap: var(--spacing-md);
}

.project-gallery img {
    width: 100%;
    height: auto;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: var(--spacing-sm);
    color: var(--color-black) !important;
    background-color: var(--color-white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-black) !important;
}

.footer-copyright {
    font-size: clamp(0.6rem, 2vw, 0.85rem);
    opacity: 0.6;
}

.footer-social a {
    font-size: clamp(0.6rem, 2vw, 0.85rem);
}

.footer-copyright p {
    margin: 0; /* reset navigateur qui décalait le texte verticalement */
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    padding-bottom: 0.1rem;
}

/* ==========================================================================
   RESPONSIVE
   Note: Responsive disabled for logged-in users (admin mode)
   ========================================================================== */

/* Mobile - only layout changes and hiding elements */
@media (max-width: 768px) {
    /* ============================================================
       PAGE PROJET — GALERIE
       ============================================================ */

    /* Label gauche : sort de l'absolu, passe au-dessus de l'image */
    /* Viewer en flex pour aligner label (gauche) et compteur (droite) sur la même ligne */
    .project-gallery-viewer {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
    }

    .gallery-images {
        order: 2;
        width: 100%;
    }

    .gallery-left-label {
        position: static;
        transform: none;
        padding: 0 1rem 0.75rem;
        font-size: 70%;
        order: 1;
        flex: 1; /* prend tout l'espace disponible à gauche */
    }

    /* Compteur : sort de l'absolu, se place à droite du label */
    .gallery-counter {
        position: static;
        order: 1;
        padding: 0 1rem 0.75rem;
        font-size: 0.55rem;
        font-weight: 300;
    }

    .project-gallery-viewer {
        margin-bottom: 0.3rem;
    }

    /* Slide : hauteur fixe = les infos en bas ne bougent pas d'une slide à l'autre */
    .gallery-slide.active {
        height: 65vh;
        padding: 0 1rem;
        overflow: visible;
        align-items: center; /* centrage vertical → paysage a du vide haut/bas */
    }

    /* Images : le navigateur choisit la contrainte selon le ratio :
       - Portrait → max-height s'applique → remplit 65vh, marges latérales naturelles
       - Paysage  → max-width s'applique  → remplit la largeur, espace haut/bas */
    .gallery-slide img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }

    /* Vidéo galerie paysage : remplit la largeur, hauteur par aspect-ratio */
    .gallery-video-wrapper {
        width: 100%;
        height: auto;
        max-height: 100%;
    }

    /* Vidéo galerie portrait : s'étire sur toute la hauteur du slide, largeur par aspect-ratio */
    .gallery-video-wrapper.gallery-video-portrait {
        align-self: stretch;
        width: auto;
        height: auto;
        max-width: 100%;
    }

    /* ============================================================
       PAGE PROJET — ESPACEMENT
       ============================================================ */

    .single-project {
        padding-top: 30px;
    }

    /* ============================================================
       PAGE PROJET — MÉTADONNÉES
       ============================================================ */

    /* 2 colonnes sur tablette/mobile */
    .project-details {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem; /* top  */
        /*padding: 2rem 10rem 1.5rem 2rem; /*haut droite bas  gauche */
        gap: 0.5rem 1rem;
    }

    /* ============================================================
       HERO — MOBILE
       ============================================================ */
    /* Hero navs : position sur mobile */
    .hero-nav-left,
    .hero-nav-right {
        top: 45.3%;
    }

    /* Font-size sur les liens hero — !important pour surcharger body:not(.logged-in) */
    .hero-nav-left a,
    .hero-nav-right a {
        font-size: 0.6rem !important;
    }

    .hero-nav-left {
        left: 1rem;
    }

    .hero-nav-right {
        right: 1rem;
    }

    /* Header : réduire padding sur mobile */
    .site-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Position verticale dans le header mobile portrait */
    .site-header .nav-left,
    .site-header .nav-right {
        transform: translateY(1vw); /* ← ajuste pour mobile portrait */
    }

    /* Font-size avec spécificité suffisante pour surcharger body:not(.logged-in) */
    .site-header .nav-left a,
    .site-header .nav-right a {
        font-size: 0.6rem !important;
    }

    /* Adjust hero-info position on smaller screens */
    .hero-info {
        transform: translate(-50%, calc(-50% + 80px));
        padding: 0 20px;
    }

    body:not(.logged-in) .project-header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

@media (max-width: 480px) {
    /* 1 colonne sur très petits écrans */
    .project-details {
        grid-template-columns: 1fr;
        gap: 0.5rem 0;
    }
}

/* Mobile paysage — la largeur dépasse 768px donc le breakpoint portrait ne suffit pas */
@media (orientation: landscape) and (max-height: 500px) {
    /* Header : aligner INFOS/CONTACT avec le logo en paysage */
    .site-header .nav-left,
    .site-header .nav-right {
        transform: translateY(0.5vw); /* ← ajuste pour mobile landscape */
    }

    /* Galerie : colle au contenu, pas de marge excessive */
    .project-gallery-viewer {
        margin-bottom: -0.5rem;
    }

    .gallery-slide.active {
        height: 80vh;
    }

    /* Compteur : centré verticalement à droite, aligné sur le padding-right du header */
    .gallery-counter {
        position: absolute;
        top: 50%;
        bottom: auto;
        right: 2rem; /* = header padding-right sur les écrans > 768px */
        transform: translateY(-170%);
    }
    
    .gallery-left-label {
        position: absolute;
        transform: translateY(-170%);
        left: 2rem;
        font-size: 70%;
    }

    /* Métadonnées */
    .project-details {
        grid-template-columns: repeat(3, 1fr);
        padding: 0.1rem 2rem;
        gap: 0.1rem 1rem;
    }

    .single-project {
        padding-top: 30px;
    }

    /* Footer : aligner les marges sur le header (padding-right: 2rem sur > 768px) */
    .site-footer .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Portrait mobile — réduire les marges autour de la galerie */
@media (max-width: 768px) and (orientation: portrait) {
    .project-gallery-viewer {
        margin-bottom: 0.25rem;
    }

    .project-details {
        padding-top: 0.75rem;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* ==========================================================================
   PAGE INFOS
   ========================================================================== */

.infos-main {
    min-height: 100vh;
    padding-top: clamp(20px, 17vh, 200px);
}

.infos-content {
    max-width: 700px;
    margin: 0 auto; /* centrage horizontal */
    padding: 4rem 2rem 4rem 2rem;
}

.infos-content p {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.2rem 0;
}

/* ==========================================================================
   PAGE CONTACT
   ========================================================================== */

.contact-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    text-align: center;
    line-height: 1.1;
}

.contact-link {
    color: var(--color-black);
    text-decoration: none;
    font-size: 1.7rem;
    font-weight: 450;
    letter-spacing: -0.01em;
}

.contact-link:hover {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .infos-content {
        padding: 2rem 1rem;
    }

    .infos-content p {
        font-size: 1rem;
    }

    .contact-info {
        padding: 0 1rem;
    }
}

/* Page Infos/Contact : réduire l'espace sous le header en paysage mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .infos-main,
    .contact-main {
        padding-top: 10px;
    }
}
