/* ==========================================================================
   STYLE GLOBAL UNIQUE - FARANDOLE INFINIE & VAGUE INTERACTIVE (4200px)
   ========================================================================== */

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

body.carrefour-body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carrefour-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

/* Titre d'identité dynamique aimanté */
.identity-title-box {
    position: absolute;
    height: 40px;
    font-size: 1.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.35s ease;
}

.identity-title-box.hidden {
    opacity: 0;
    transform: scale(0.9);
}

/* Fenêtre d'affichage pleine largeur */
.line-scroll-container {
    width: 100vw;
    max-width: 100vw;
    height: 280px;
    overflow: hidden;
    position: relative;
    user-select: none;
}

.interactive-line-wrapper {
    display: flex;
    height: 100%;
    width: max-content;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.interactive-line-wrapper.no-transition {
    transition: none !important;
}

/* Segment de 4200px pour aérer le positionnement (600px par artefact) */
.line-segment {
    position: relative;
    width: 4200px;
    min-width: 4200px;
    height: 280px;
    flex-shrink: 0;
}

.wave-line-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.artifacts-group {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
}

/* ARTEFACTS GENERALS (Centrés) */
.artifact {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

/* ANCRAGE STRICT DES FORMES SPÉCIFIQUES SUR LA LIGNE */
.artifact.artifact-on-top {
    transform: translate(-50%, -100%) !important;
}

.artifact.artifact-below {
    transform: translate(-50%, 0%) !important;
}

.artifact.artifact-diamond {
    transform: translate(-50%, -35%) !important;
}

.artifact svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Disparition des autres artefacts au survol */
.artifacts-group.has-hover .artifact {
    opacity: 0 !important;
    pointer-events: none;
}

.artifacts-group.has-hover .artifact:hover {
    opacity: 1 !important;
    pointer-events: auto;
    filter: drop-shadow(0 0 14px #ffffff) !important;
}

.artifacts-group.has-hover .artifact:hover {
    transform: translate(-50%, -50%) scale(1.3) !important;
}

.artifacts-group.has-hover .artifact.artifact-on-top:hover {
    transform: translate(-50%, -100%) scale(1.3) !important;
}

.artifacts-group.has-hover .artifact.artifact-below:hover {
    transform: translate(-50%, 0%) scale(1.3) !important;
}

.artifacts-group.has-hover .artifact.artifact-diamond:hover {
    transform: translate(-50%, -35%) scale(1.3) !important;
}

/* SILHOUETTES DE L'IDENTITÉ 1 */
.silhouettes-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.silhouettes-layer.visible {
    opacity: 1;
}

.silhouette-item {
    position: absolute;
    transform: translate(-50%, -100%);
    width: 55px;
    height: 55px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Orientation du Van vers le haut de la côte */
.silhouette-item.van-item {
    transform: translate(-50%, -100%) rotate(-10.3deg) !important;
    transform-origin: bottom center;
}

.silhouette-item svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* CADRE D'APERÇU DYNAMIQUE AIMANTÉ */
.preview-card {
    position: absolute;
    width: 320px;
    height: 150px;
    border: 1px solid #ffffff;
    background-color: #000000;
    display: flex;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.preview-card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
}

.preview-photo {
    width: 130px;
    height: 100%;
    border-right: 1px solid #333333;
    overflow: hidden;
}

.preview-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-text {
    flex: 1;
    padding: 12px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #cccccc;
    display: flex;
    align-items: center;
}

/* BOUTONS CUE FLUIDES SUR BORD D'ÉCRAN */
.edge-scroll-cue {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    user-select: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.edge-scroll-cue:hover {
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.cue-left { left: 25px; }
.cue-right { right: 25px; }
.cue-icon { font-size: 1.4rem; }

/* FOOTER */
footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    border-top: 1px solid #222222;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.8);
}

footer a {
    color: #888888;
    text-decoration: none;
    font-size: 0.85rem;
}

footer a:hover, footer a.active {
    color: #ffffff;
}

.btn-footer {
    border: 1px solid #555555;
    padding: 5px 12px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    body.carrefour-body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
}
