/* Empêche le comportement tactile par défaut (zoom, refresh) */
html, body {
    margin: 0;
    background: #000;
    overflow: hidden;
    touch-action: none; /* CRUCIAL pour mobile */
    width: 100%;
    height: 100%;
}

#canvas3d {
    display: block;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

.ui-container {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 50;
    pointer-events: none;
}

.cartel {
    position: absolute;
    
    /* ESTHÉTIQUE IDENTIQUE À .product-list-thumb */
    background: rgba(0, 0, 0, 0.60); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px; /* Arrondi comme les produits */
    
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    
    padding: 25px; /* Même padding que les produits */
    color: white;
    font-family: 'Helvetica', sans-serif;
    
    /* Configuration de position Desktop */
    width: 300px;
    top: 50%;
    right: 8%; 
    transform: translateY(-50%); 
    
    /* État initial (caché) */
    opacity: 0;
    pointer-events: auto; 
    visibility: hidden;
    z-index: 100;
    
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Typographie */
.cartel > h3 {
    font-size: 24px;
    margin: 0 0 10px 0; /* Espacement réduit légèrement */
    font-weight: 800; /* Plus gras pour ressortir sur le fond noir */
    text-transform: uppercase;
}

.cartel > p {
    font-size: 14px; /* Un peu plus petit pour l'élégance */
    margin: 0 0 20px 0;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8); /* Gris clair pour le texte secondaire */
}

/* Bouton */
.cartel > a {
    display: block; 
    text-align: center;
    color: #000;
    font-weight: 800; /* Extra bold */
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    background: white;
    padding: 15px 0;
    border-radius: 30px; /* Arrondi complet pour matcher vos autres boutons */
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.cartel > a:hover {
    background: black;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.cartel > a:active {
    transform: scale(0.98); 
}

/* --- NOUVEAU CSS FOOTER --- */
.footer-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espace un peu plus grand */
    pointer-events: none;
}

/* Conteneur pour les deux textes */
.footer-labels {
    display: flex;
    justify-content: space-between; /* Pousse les éléments aux extrémités */
    padding: 0 24px; /* Marges sur les côtés */
    width: 100%;
    box-sizing: border-box;
}

/* Style commun des labels */
.label-text {
    font-family: 'Helvetica', sans-serif;
    color: white;
    font-size: 12px; /* Un peu plus petit pour que ça rentre */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

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

.progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1); /* Plus subtil */
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: white;
}

/* --- CSS LOADER MODIFIÉ --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #080808; /* Noir très légèrement cassé, plus élégant */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 300px; /* Un peu plus large */
}

.loader-text {
    color: #fff;
    font-family: 'Helvetica', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: bold;
    text-transform: uppercase;
    /* On enlève l'animation pulse, le changement de chiffre suffit */
    opacity: 0.8;
}

.loader-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    /* --- IMPORTANT : ON SUPPRIME L'ANIMATION D'ATTENTE --- */
    /* animation: loading-indeterminate 1.5s infinite ease-in-out; */
    /* On initialise le scale à 0 pour que le JS le fasse grandir */
    transform: scaleX(0); 
    transform-origin: 0% 50%;
    transition: transform 0.1s linear; /* Petit lissage du mouvement */
}

/* --- VERSION MOBILE --- */
@media (max-width: 768px) {
    .cartel {
        width: 85%; 
        max-width: 350px;
        right: auto;
        left: 50%; 
        top: auto; 
        bottom: 60px; /* Un peu plus haut à cause du nouveau footer */
        transform: translate(-50%, 0);
        padding: 16px;
    }
    .cartel > h3 { font-size: 18px; margin: 0 0 8px 0; }
    .cartel > p { font-size: 13px; line-height: 1.4; margin: 0 0 16px 0; }
    .cartel > a { font-size: 14px; padding: 10px 0; }

    /* Ajustement des labels footer sur mobile */
    .footer-labels { padding: 0 15px; }
    .label-text { font-size: 10px; letter-spacing: 0.5px; }
    .footer-ui { gap: 10px;}
}