/* =============================================
   NexaWeb – Carte de visite (recto / verso)
   ============================================= */

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 48px;
    background: #1a1a2e;
    background-image:
        radial-gradient(ellipse at 20% 30%, rgba(0, 180, 180, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 120, 200, 0.08) 0%, transparent 60%);
    font-family: sans-serif;
    padding: 40px 20px;
}

/* ============================================
   MOBILE & TABLETTE : affichage empilé
   ============================================ */
.card-scene {
    width: 95vw;
    max-width: 860px;
}

.card-flip {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.avant,
.arrière {
    width: 100%;
    height: auto;
    aspect-ratio: 860 / 460;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ============================================
   DESKTOP (>= 1024px avec souris) : flip 3D au survol
   ============================================ */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {

    .card-scene {
        width: min(860px, 90vw);
        aspect-ratio: 860 / 460;
        perspective: 1200px;
        position: relative;
    }

    .card-flip {
        display: block;
        width: 100%;
        height: 100%;
        position: relative;
        transform-style: preserve-3d;
        transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .card-scene:hover .card-flip {
        transform: rotateY(180deg);
    }

    .avant,
    .arrière {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .arrière {
        transform: rotateY(180deg);
    }

    .card-scene::after {
        content: "Survolez pour retourner la carte";
        display: block;
        position: absolute;
        bottom: -28px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        letter-spacing: 0.06em;
        color: rgba(255, 255, 255, 0.35);
        white-space: nowrap;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .card-scene:hover::after {
        opacity: 0;
    }
}