/* Fond lumineux en blanc, noir et ï¿½cru */
body {
    
    margin: 0;
    font-family: 'Merriweather', serif;
    line-height: 1.0;
    text-align: justify;
    background-color: #F5F5F5;
    color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Conteneur principal pour le titre et le sous-texte */
.title-header, .subtitle-container {
    text-align: right;
    width: calc(100% - 5vw); /* Assure que le contenu ne dépasse pas */
    max-width: 60vw; /* Évite que le texte touche le triangle */
    margin-left: auto; /* Pousse tout vers la droite */
    padding-right: 5vw; /* Assure une marge identique */
    box-sizing: border-box; /* Empêche tout dépassement */
    overflow: hidden; /* Cache les débordements */
}

/* Effet d'inversion sur la partie qui chevauche le triangle */
.title-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Taille du texte réduite progressivement */
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
    color: black;
    position: relative;
    display: inline-block;
    padding: 10px 20px;
    max-width: 100%; /* Assure que le titre ne dépasse jamais */
    white-space: nowrap; /* Empêche le retour à la ligne */
    overflow: hidden; /* Cache tout débordement */
    text-overflow: ellipsis; /* Ajoute des points de suspension si le texte est trop long */
}

/* Sous-texte aligné et positionné exactement comme le titre */
.subtitle-container {
    text-align: right;
    width: calc(100% - 5vw); /* Alignement parfait avec le titre */
    max-width: 60vw;
    padding-right: 5vw; /* Marge identique au titre */
    box-sizing: border-box;
    overflow: hidden;
    white-space: normal; /* Autorise les retours à la ligne */
}

/* Style du sous-texte */
.subtitle-text {
    font-size: 1.2rem;
    color: #777;
    line-height: 1.6;
    text-align: right; /* Alignement parfait avec le titre */
}

/* Popup en triangle noir avec flou sur la partie visible */
.popup-triangle {
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    background: black;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    z-index: 10;
    overflow: visible; /* Permet aux éléments de dépasser sans être masqués */
}

/* Permet aux cartes de dépasser le triangle */
.popup-triangle::after {
    content: "";
    position: absolute;
    right: -50px; /* Augmente la zone du flou pour éviter une coupure nette */
    top: 0;
    width: 100px;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.3) 10%, rgba(0,0,0,0) 90%);
    filter: blur(15px);
    pointer-events: none;
}

/* Positionnement des cartes des Dolls dans le triangle */
.doll-container {
    position: fixed; /* Fixé pour ignorer le scroll */
    left: 5vw; /* 5% de la largeur de l'écran à gauche */
    bottom: 5vh; /* 5% de la hauteur de l'écran en bas */
    width: 40vw; /* Largeur relative */
    text-align: left;
    z-index: 110;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.5vw, 15px); /* Gap relatif avec limites */
    overflow: visible;
}

/* Style des cartes individuelles */
.doll-card {
    background: white;
    border-radius: 10px;
    padding: clamp(0.5rem, 1vw, 10px); /* Padding relatif avec limites */
    width: clamp(100px, 10vw, 150px); /* Largeur relative entre 100px et 150px */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    text-align: center;
    position: relative;
    overflow: visible;
    z-index: 110;
    display: none; /* Cachées par défaut */
}

/* Première carte visible */
.doll-card:first-child {
    display: block; /* Par défaut avant JS */
}

/* Ajustement de l'image pour les cartes */
.doll-card img {
    max -webkit-max-width: clamp(60px, 7vw, 100px); /* Largeur max relative entre 60px et 100px */
    max-width: clamp(60px, 7vw, 100px); /* Largeur max relative entre 60px et 100px */
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
    z-index: 110;
}

/* Ajustement du titre des Dolls */
.doll-card h2 {
    margin-top: clamp(0.4rem, 0.8vw, 8px); /* Marge relative */
    font-size: clamp(0.9rem, 1.2vw, 1.2rem); /* Taille relative */
    color: black;
    z-index: 110;
}

/* Ajustement de la description des Dolls */
.doll-card p {
    font-size: clamp(0.7rem, 0.9vw, 0.9rem); /* Taille relative */
    color: #666;
    margin: 5px 0 0;
    z-index: 110;
}

/* Style des flèches */
.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: clamp(1rem, 1.5vw, 1.5rem); /* Taille relative */
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 120;
    height: clamp(15px, 2vw, 20px); /* Hauteur relative */
    line-height: clamp(15px, 2vw, 20px);
    padding: 0;
}

/* Flèche gauche */
.nav.left {
    left: clamp(-1rem, -1.5vw, -15px); /* Décalage relatif */
}

/* Flèche droite */
.nav.right {
    left: clamp(7.65rem, 12.5vw, calc(150px + 21px)); /* Décalage relatif basé sur la taille max */
}



/* Effet au survol des flèches */
.nav:hover {
    transform: translateY(-50%) scale(1.2); /* Légère augmentation de taille */
}

/* Deuxième canvas en dessous de la page */
.details-canvas {
    width: 100%;
    height: 150vh; /* Hauteur ajustable */
    background: white;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 100vh; /* Pousse sous la page principale */
}

/* Contenu interne du canvas */
.details-content {
    display: flex;
    width: 80%;
    max-width: 1200px;
    padding: 20px;
    position: relative;
}

/* Partie gauche pour l'image render */
.details-left {
    width: 50%;
    padding-right: 20px;
}

/* Image render */
.render-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Partie droite pour la grille d'images */
.details-right {
    width: 50%;
    padding-left: 20px;
    overflow-y: auto; /* Scroll vertical interne si besoin */
}

/* Grille d'images */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

/* Images dans la grille */
.grid-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
