/* Styles spécifiques à la page association */
/* Animations du rouleau */
@keyframes rotateCubeVerticalPause {
    0% { transform: rotateX(0deg); }
    12.5% { transform: rotateX(0deg); }
    25% { transform: rotateX(-90deg); }
    37.5% { transform: rotateX(-90deg); }
    50% { transform: rotateX(-180deg); }
    62.5% { transform: rotateX(-180deg); }
    75% { transform: rotateX(-270deg); }
    87.5% { transform: rotateX(-270deg); }
    100% { transform: rotateX(-360deg); }
}

.association-text p {
    margin-bottom: 1.5rem;
}

.association-text p:last-child {
    margin-bottom: 0;
}

/* Cube 3D */
.cube-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    height: clamp(80px, 15vw, 200px);
    width: 100%;
}

.cube {
    position: relative;
    width: clamp(320px, 60vw, 800px);
    height: calc(clamp(320px, 60vw, 800px) / 4.83);
    transform-style: preserve-3d;
    animation: rotateCubeVerticalPause 16s infinite linear;
    transform-origin: center center;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--black-color-30);
    display: flex;
    align-items: center;
    justify-content: center;
}

.face img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Positionnement des faces */
.front { transform: rotateX(0deg) translateZ(calc(clamp(320px, 60vw, 800px) / 4.83 / 2)); }
.right { transform: rotateX(90deg) translateZ(calc(clamp(320px, 60vw, 800px) / 4.83 / 2)); }
.back { transform: rotateX(180deg) translateZ(calc(clamp(320px, 60vw, 800px) / 4.83 / 2)); }
.left { transform: rotateX(270deg) translateZ(calc(clamp(320px, 60vw, 800px) / 4.83 / 2)); }

.bd-tooltip {
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.bd-tooltip::after {
    content: attr(data-tooltip); /* Utilise data-tooltip au lieu de title */
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: black;
    padding: 8px 12px;
    border-radius: 15px;
    border: 2px solid black;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
    margin-bottom: 10px;
    text-shadow: none;
}

.bd-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent black transparent;
    border-top: 8px solid white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-bottom: 2px;
}

.bd-tooltip:hover::after,
.bd-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

