/* FlipCard Component Styles - Version simplifiée */

/* Styles de base pour le FlipCard */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    position: relative;
    border-radius: 12px;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);*/
    transition: box-shadow 0.3s ease;
}

.flip-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: inherit;
}

.flip-card[data-flip-card-is-flipped-value="true"] .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: inherit;
    overflow: hidden;
}

.flip-card-front {
    background-color: #fff;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.flip-card-back {
    background-color: #f8f9fa;
    color: #333;
    transform: rotateY(180deg);
}

/* Zone de flip au centre (évite les conflits avec les composants) */
.flip-trigger-center {
    position: absolute;
    top: 10px;
    left: 60px;
    right: 60px;
    bottom: 25%;
    z-index: 5;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Contenu par défaut si aucun composant n'est fourni */
.flip-card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
}

.flip-card-content.front-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flip-card-content.back-content {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.flip-card-content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.flip-card-content p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Amélioration responsive */
@media (max-width: 768px) {
    .flip-card {
        height: auto;
        min-height: 250px;
    }

    .flip-trigger-center {
        width: 80%;
        height: 80%;
    }
}

/* Animation d'entrée */
.flip-card {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flip-card-content small,
.front-content small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Styles responsifs pour le contenu des flip cards */
@media (max-width: 640px) {

    .flip-card-content,
    .front-content {
        padding: 12px;
    }

    .flip-card-content h3,
    .front-content h3 {
        font-size: 16px;
    }

    .flip-card-content p,
    .front-content p {
        font-size: 13px;
    }

    .flip-card-content small,
    .front-content small {
        font-size: 11px;
    }
}

@media (max-width: 480px) {

    .flip-card-content,
    .front-content {
        padding: 10px;
    }

    .flip-card-content h3,
    .front-content h3 {
        font-size: 14px;
    }

    .flip-card-content p,
    .front-content p {
        font-size: 12px;
    }

    .flip-card-content small,
    .front-content small {
        font-size: 10px;
    }
}


/* Flip Card Styles */
.flip-card {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.flip-card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotateY(180deg);
}

/* Zone de clic pour flip - seulement dans le contenu principal */
.flip-click-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    cursor: pointer;
    /* Debug: fond rouge semi-transparent */
}

/* Zone de flip avec styles inline */
.flip-click-zone[style*="position: absolute"] {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Styles pour la face arrière */
.flip-card-back {
    background: white;
    padding: 0;
}

/* Fix pour flip-card-back utilisée en standalone (sans flip-card-inner parent) */
.flip-card-back:not(.flip-card-inner .flip-card-back) {
    transform: none !important;
    position: relative !important;
}

.card-back-standalone {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: white;
    display: flex;
    flex-direction: column;
}


/* Styles pour la face avant */
.flip-card-front {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* S'assurer que la hauteur est définie */
}

/* Zone de protection pour empêcher le flip sur les boutons */
.button-protection-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 50;
    pointer-events: auto;
    background: rgba(0, 0, 255, 0.05);
    /* Debug: fond bleu semi-transparent */
}