@font-face {
    font-family: 'Aspekta';
    src: url('./fonts/AspektaVF.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Aspekta', sans-serif;
    color: #000;
    font-size: 12pt;
    line-height: 1.1; /* Augmentation légère pour laisser respirer les jambages des lettres */
    font-weight: 700;
    background-color: #fff;
    text-decoration: none;
    overflow: hidden; /* Verrouille le scroll global entre les pages */
}

/* INTRO LOADER */
#page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000; /* Toujours au dessus de tout */
    transition: opacity 0.5s ease, visibility 0.5s;
}

#page-loader img {
    width: 120px; /* Encore plus petit pour la discrétion */
    height: auto;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.main-container {
    display: none; /* Cache les sections par défaut */
    height: 100dvh; /* Utilise la hauteur dynamique pour éviter les décalages sur mobile */
    width: 100vw;
    flex-shrink: 0;
}

.main-container.active {
    display: flex; /* Affiche uniquement la section active */
}

/* Assure la visibilité sur les pages indépendantes */
.product-page .main-container,
.cart-page .main-container {
    display: flex;
}

/* GAUCHE : CARROUSEL */
.left-pane {
    flex: 0 0 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: none; /* Cache le curseur par défaut pour le "see more" */
}

.scrollable-pane {
    overflow-y: auto;
    cursor: auto; /* Curseur normal pour le shop */
    scrollbar-width: none; /* Cache la scrollbar sur Firefox */
    -ms-overflow-style: none; /* Cache la scrollbar sur IE/Edge */
}

.scrollable-pane::-webkit-scrollbar {
    display: none; /* Cache la scrollbar sur Chrome, Safari et Opera */
}

/* GRILLE PRODUITS */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
    column-gap: 10px; /* Espace de 20px entre les colonnes */
    padding: 20px;
}

.product-item {
    display: flex;
    flex-direction: column;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 5; /* Format portrait pour un crop en hauteur */
    object-fit: cover;
}

.product-info {
    margin-top: 10px;
}

/* Reset liens */
a.btn-nav {
    text-decoration: none;
    display: inline-block;
}

#cursor-follower {
    position: fixed;
    pointer-events: none;
    color: #ffffff;
    font-size: 10pt;
    font-weight: 700;
    z-index: 1000;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: difference;
}

.carousel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 1s ease-in-out;
    transform: translateX(100%); /* Par défaut à droite */
    opacity: 1; /* On utilise transform maintenant, pas opacity */
}

.carousel-img.active {
    transform: translateX(0);
}

.carousel-img.exit {
    transform: translateX(-100%);
}

.carousel-img.exit-right {
    transform: translateX(100%);
}

/* DROITE : CONTENU */
.right-pane {
    flex: 0 0 50%;
    height: 100%;
    padding: 20px 20px 0px 20px; /* Haut, Droite, Bas, Gauche */
    display: flex;
    flex-direction: column;
    gap: 40px; /* Espace constant entre le header et le sommaire */
    position: relative;
    background-color: #000;
    color: #fff;
    scrollbar-width: none; /* Cache la scrollbar sur Firefox */
    -ms-overflow-style: none; /* Cache la scrollbar sur IE/Edge */
}

/* Cache le bouton Cart par défaut pour éviter le flash au chargement avant l'exécution du JS */
a[href="cart.html"].btn-nav:not(.active) {
    display: none;
    opacity: 0;
    transform: translateX(40px);
}

.header-grid .col-2 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px; /* 10px entre Cart et Shop */
}

.right-pane::-webkit-scrollbar {
    display: none; /* Cache la scrollbar sur Chrome, Safari et Opera */
}

.header-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* Donne plus de place à la col 1 */
    gap: 20px;
}

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

/* BOUTONS */
.btn-nav {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit; /* Hérite de la taille du body (12pt desktop / 9pt mobile) */
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    opacity: 0.2;
    transition: opacity 0.2s ease;
    padding: 0;
}

.btn-nav-cart {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit; /* Taille par défaut du body */
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.2s ease;
    padding: 0;
}

/* Boutons spécifiques à agrandir (20pt Desktop / 15pt Mobile) */
.btn-nav-cart,
#lang-selector,
.btn-checkout {
    font-size: 15pt !important;
    font-weight: 700;
}

#lang-selector .btn-nav {
    font-size: inherit; /* Pour que FR/EN suivent la taille du parent #lang-selector */
}

.btn-nav:hover, .btn-nav.active {
    opacity: 1;
}

.right-pane .btn-nav {
    color: #fff;
    opacity: 0.4; /* Opacité augmentée sur noir pour la lisibilité */
}

.right-pane .btn-nav:hover, .right-pane .btn-nav.active {
    opacity: 1;
}

.btn-nav.active { cursor: default; }

.btn-nav-cart:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* DETAILS ACCORDEON */
.details-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
}

.details-hidden.open {
    max-height: 400px;
    margin-top: 0px;
    padding-bottom: 4px; /* Crée une marge de sécurité en bas pour ne pas couper le 'g' de pages */
}

.details-row {
    display: flex;
    gap: 3px;
    align-items: baseline; /* Aligne parfaitement le texte et le bouton */
}

/* SOMMAIRE STICKY */
.summary-container {
    margin-top: auto; /* Pousse vers le bas */
    padding-bottom: 40px; /* Marge plus importante en bas de page */
}

.summary-grid {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Correspond grossièrement aux colonnes 1 & 2/3 */
    gap: 20px; 
}

.summary-row span {
    display: inline-block;
}

.summary-row-2 {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Correspond grossièrement aux colonnes 1 & 2/3 */
    gap: 20px; 
}

.summary-row-2 span {
    display: inline-block;
}

.word-wrap {
    display: inline-block;
    white-space: nowrap; /* Empêche le saut de ligne à l'intérieur d'un mot */
}

.char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* PRODUCT PAGE */
.product-left {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.product-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 150;
    mix-blend-mode: difference;
    color: #fff; /* Requis pour que le mode difference fonctionne sur les couleurs sombres */
}
.product-nav .btn-nav {
    opacity: 1;
}

.product-carousel {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-details {
    margin: auto 0;
    padding-left: 0;
    display: flex;
    flex-direction: column;
}

.product-header h1 {
    font-size: inherit;
    font-weight: inherit;
}

.product-description {
    margin-top: 40px;
}

.product-content-toggle {
    margin-top: 20px;
}

#magazine-content {
    margin-top: 40px;
}

.product-footer-info {
    margin-top: 40px;
}

.col-2-3 {
    grid-column: 2 / span 2;
}

.product-page .right-pane {
    gap: 0; /* On gère le centrage manuellement via margin: auto */
}

/* CART PAGE COMPONENTS */
.cart-items-container {
    margin-top: 10px;
    padding-left: 20px; /* Aligne avec le bouton back to shop */
}

.cart-line {
    border: none;
    border-top: 1px solid #dadada;
    margin-right: 10px;
}

.item-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    grid-template-rows: auto auto;
    gap: 10px 20px;
    padding: 10px 10px 10px 0;
}

.item-img {
    grid-row: 1 / span 2;
    width: 130px;
    height: 130px;
    object-fit: cover;
}

.item-top, .item-bottom {
    display: flex;
    justify-content: space-between;
}

.item-top {
    align-items: flex-start;
}

.item-bottom {
    align-items: flex-end;
}

.item-price, .item-quantity button, .item-quantity span {
    margin-left: 10px;
}

.recap-section {
    margin-top: auto; /* Pousse le bloc vers le bas sur desktop */
    padding-bottom: 20px;
}

.recap-section .cart-line {
    margin-right: 0;
}

.recap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 0px;
    padding: 10px 0;
}

.recap-footer {
    margin-top: 10px;
}

.recap-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-page .right-pane {
    overflow-y: auto;
    gap: 20px;
}

.cart-right-pane {
    justify-content: flex-start; /* Garde le header en haut */
    display: flex;
}
/* ABOUT */
.about-left {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: auto;
}

.about-right .about-content {
    padding: 0 0px;
    margin: auto 0; /* Centrage vertical du contenu */
}

.animate-text {
    font-size: 18px;
    line-height: 18px;
}
/* POP-UP CONFIRMATION DE COMMANDE */
.order-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.order-overlay.visible {
    display: flex;
    opacity: 1;
}

.order-modal {
    width: 40vw; /* Largeur Desktop : 40% de l'écran */
    aspect-ratio: 5 / 3;
    height: auto;
    background: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

.order-modal .modal-top {
    font-size: 12pt; /* Légèrement agrandi pour suivre l'échelle */
}

.order-modal .modal-center {
    font-size: 50px; /* Doublé pour correspondre à la nouvelle taille du pop-up */
    line-height: 42px;
    font-weight: 700;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
}

.order-modal .modal-bottom {
    font-size: 12pt; /* Légèrement agrandi */
}




/* RESPONSIVE */
@media (max-width: 1100px) {
    .main-container {
        flex-direction: column;
        overflow-y: hidden; /* On laisse le body gérer le scroll pour la navigation entre sections */
        height: 100dvh;
    }
    .left-pane, .right-pane {
        flex: 0 0 auto;
        height: 50dvh !important; /* Force la moitié exacte de l'espace visible sur toutes les pages */
        width: 100%;
        position: relative;
    }

    body {
        overflow-y: hidden; /* Autorise le scroll entre les conteneurs main sur mobile */
        font-size: 9pt;
        line-height: 10pt;
    }

    /* Correction du bouton Back to Shop pour ne pas décaler le reste */
    .product-nav {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 100;
        padding: 0 !important;
        mix-blend-mode: difference;
        color: #fff;
    }

    /* GESTION COMMUNE DES PANNEAUX */
    .left-pane {
        background-color: #fff;
        height: 50dvh;
        z-index: 1;
        padding: 0;
        cursor: auto; /* Réactive le curseur par défaut sur mobile */
    }

    #cursor-follower {
        display: none; /* Désactive le "See more" sur mobile */
    }

    .right-pane {
        background-color: #000;
        color: #fff;
        padding: 0 10px 10px 10px; /* Suppression du padding top pour coller au carrousel */
        z-index: 2;
        box-shadow: 0 -2px 10px rgba(255,255,255,0.4); /* Lueur très fine de ~10-20px */
        overflow-y: auto; /* Permet de scroller le contenu interne (sommaire, etc.) */
        gap: 20px; /* Réduction de l'espace global (était à 40px) */
    }

    .btn-nav-cart {
        font-weight: 700;
    }

    .btn-nav-cart,
    #lang-selector,
    .btn-checkout {
        font-size: 12pt !important; /* Taille "affirmée" pour mobile (plus gros que le 9pt) */
    }

    .header-grid {
        position: sticky; /* Fixe la barre au "centre" (sommet du panneau du bas) */
        top: 0;
        background: #000; /* Fond noir pour matcher le panneau du bas */
        z-index: 110;
        padding-top: 10px; /* On remet le padding ici pour que le fond blanc couvre tout */
        padding-bottom: 5px;
        margin-bottom: 0px;
    }

    /* LANDING PAGE MOBILE */
    .carousel {
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%;
    }

    /* PRODUCT PAGE MOBILE */
    .product-page .product-left {
        height: 50dvh;
        position: relative;
    }

    .product-page .carousel {
        top: 0; /* Suppression du décalage pour coller au bord haut */
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }

    /* Réactivation de la scrollbar pour le Shop en mobile */
    .shop-page .scrollable-pane {
        scrollbar-width: thin !important;
        -ms-overflow-style: auto !important;
    }
    .shop-page .scrollable-pane::-webkit-scrollbar {
        display: block !important;
        width: 3px;
    }
    .shop-page .scrollable-pane::-webkit-scrollbar-thumb {
        background: #000;
    }

    .product-grid {
        padding: 10px;
    }

    .cart-items-container {
        padding-left: 10px;
    }

    .product-details {
        margin: 20px 0;
        padding-left: 0;
    }

    .recap-section {
        margin-top: 40px; /* Espace simple après les articles sur mobile */
        padding-bottom: 20px;
    }

    .about-right .about-content {
        font-size: 13px;
        line-height: 13px;
        padding: 0px;
    }

    .about-left{
        font-size: 13px;
        line-height: 13px;
        padding: 10px;
    }

    /* --- ADAPTATION MOBILE DU POP-UP --- */
    .order-modal {
        width: 90vw; /* Presque toute la largeur sur mobile */
        padding: 20px; /* Moins de marge interne */
    }

    .order-modal .modal-top, 
    .order-modal .modal-bottom {
        font-size: 10pt; /* Texte plus petit */
    }

    .order-modal .modal-center {
        font-size: 30px; /* Texte "Thank you" réduit pour mobile */
        line-height: 30px;
    }
}

/* FLÈCHES CARROUSEL */
.carousel-arrow {
    display: block; /* Visible sur mobile */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    mix-blend-mode: difference;
    padding: 20px;
}
.carousel-arrow.prev { left: 0; }
.carousel-arrow.next { right: 0; }

@media (min-width: 1101px) {

     .carousel-arrow {
        display: none; /* Masqué sur desktop */
    }
    .about-right {
        justify-content: center;
    }
    .about-right .header-grid {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 20px;
    }
    .about-right .about-content {
        margin: 0;
    }
}