/* Reset global pour normaliser l'affichage sur tous les navigateurs */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* Styles pour le fond d'écran complet et fixe */
body {
    background-image: url('assets/Background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Maintient l'arrière-plan fixe pendant le défilement */
    margin: 0;
    padding: 0;
    height: 100vh; /* Hauteur plein écran */
    overflow: hidden;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    body {
        overflow-y: auto; /* Permet le défilement sur mobile */
        height: auto;
        min-height: 100vh;
    }
}

/* Conteneur principal pour l'ensemble de la page */
.main-container {
    display: flex;
    position: relative; /* Pour permettre le positionnement absolu des éléments enfants */
    justify-content: flex-start; /* Aligner le contenu à gauche */
    align-items: center;
    width: 100%;
    height: 100vh;
    padding: 0 5%;
    /* Sur mobile, on réorganise en colonne */
    flex-direction: row;
}

/* Media query pour les écrans de taille moyenne */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
        justify-content: center;
        padding: 20px;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    body {
        overflow: auto;
    }
    .main-container {
        flex-direction: column;
        justify-content: flex-start;
        padding: 10px;
        height: auto;
        min-height: 100vh;
    }
}

/* Conteneur pour les cartes */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45%;
    height: auto; /* La hauteur s'adapte au contenu */
    position: relative;
    margin-left: 5%;
    perspective: 1000px; /* Ajoute une perspective pour l'effet 3D */
}

/* Media query pour les écrans de taille moyenne */
@media (max-width: 992px) {
    .cards-container {
        width: 80%;
        margin-left: 0;
        margin-top: 20px;
    }
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .cards-container {
        width: 90%;
        margin-left: 0;
        height: auto;
        margin-top: -40px; /* Remonte la carte sur mobile */
        position: relative;
        z-index: 5;
    }
}

/* Formulaire pour saisir le nom de la carte (conteneur principal gauche) */
.card-form {
    background-image: url('assets/container.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 12px;
    padding: 2.5rem;
    width: 45%;
    min-width: 400px;
    height: 60%;
    min-height: 450px;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Media query pour les écrans de taille moyenne */
@media (max-width: 992px) {
    .card-form {
        width: 80%;
        min-width: 300px;
        height: auto;
        min-height: 300px;
        padding: 2rem 1.5rem;
        margin-bottom: 20px;
    }
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-form {
        width: 90%;
        min-width: 0;
        padding: 2rem 1rem;
        min-height: 250px;
        top: 15px;
    }
}

/* Style de base pour les cartes */
.card {
    width: 80%;
    max-width: 350px;
    height: 500px;
    position: relative;
    margin: 0 auto;
    transform-style: preserve-3d; /* Permet aux enfants de se positionner en 3D */
    transition: transform 1.5s ease-in-out;
    transform: rotateY(0deg);
    -webkit-transform-style: preserve-3d; /* Pour la compatibilité avec Safari */
}

/* Styles pour les cartes recto et verso */
.card-frame {
    width: auto;
    max-width: 350px;
    height: auto;
    position: relative;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    backface-visibility: hidden; /* Cache la face arrière pendant l'animation */
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-frame {
        max-width: 280px; /* Taille réduite pour mobile */
    }
}

/* Animation de retournement simplifiée */
@keyframes flip-out {
    0% { transform: rotateY(0); opacity: 1; }
    100% { transform: rotateY(90deg); opacity: 0; }
}

@keyframes flip-in {
    0% { transform: rotateY(-90deg); opacity: 0; }
    100% { transform: rotateY(0); opacity: 1; }
}

/* Classes pour déclencher les animations */
.flip-out {
    animation: flip-out 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
    transform-origin: center center;
}

.flip-in {
    animation: flip-in 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) forwards;
    transform-origin: center center;
}

/* Styles spécifiques pour le conteneur d'image de la carte */
.card-image-container {
    width: auto;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    display: flex; top: -10px;
    justify-content: center;
    align-items: center;
}

/* Animation de flottement léger pour la carte */
@keyframes flottement-carte {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(1deg); /* Monte avec légère rotation */
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(10px) rotate(-1deg); /* Descend avec légère rotation inverse */
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.card-image {
    width: auto;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; /* Assure que l'image est entièrement visible */
    /* Désactiver l'animation de flottement pendant le flip */
    animation: none;
    filter: none;
}

.card-front img {
    /* Ajustements pour l'image du recto */
    transform: scale(0.9); /* Légèrement plus petite si nécessaire */
}

.card-back img {
    /* Ajustements pour l'image du verso */
    transform: scale(1); /* Taille normale */
}

/* Conteneur pour le logo TACCA */
.logo-container {
    margin-bottom: 0;
    text-align: center;
    position: absolute;
    top: -40px; /* Positionné en haut et décalé pour dépasser du conteneur */
    left: 50%;
    transform: translateX(-50%); /* Centrage horizontal parfait */
    z-index: 10; /* S'assure qu'il reste au-dessus des autres éléments */
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .logo-container {
        top: -20px;
    }
}

@keyframes flottement {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Style pour le logo avec animation de flottement */
.logo {
    max-width: 250px;
    height: auto;
    animation: flottement 3s ease-in-out infinite; /* Animation perpétuelle de flottement */
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .logo {
        max-width: 160px;
    }
}

/* Style du titre principal avec police médiévale */
h1 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    padding-left: 15px;
    color: rgba(73, 44, 3, 0.95); /* Brun foncé transparent */
    font-family: 'MedievalSharp', cursive; /* Police médiévale décorative */
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: left;
    margin-left: 15px;
    align-self: flex-start;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Ombre pour améliorer la lisibilité */
    letter-spacing: 0.5px;
    transform: scale(1, 1.05); /* Légère transformation pour un effet d'étirement vertical */
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    h1 {
        font-size: 1.0rem;
        margin-top: 4.5rem;
        margin-bottom: 1rem;
        padding-left: -10px;
        margin-left: 10px;
        padding-right: 10px;
    }
}

/* Style pour les effets de la carte */
.card-effects {
    position: absolute;
    bottom: 21%;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    color: white;
    font-size: 25px;
    padding: 10px;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-effects {
        font-size: 20px;
        padding: 5px;
        bottom: 22%;
    }
}

/* Style pour la description de la carte */
.card-description {
    position: absolute;
    bottom: 4%;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    color: #e0e0e0;
    font-size: 13px;
    font-style: italic;
    padding: 10px;
    z-index: 5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-description {
        font-size: 12px;
        padding: 5px;
        bottom: 5%;
    }
}

/* Conteneur pour le champ de saisie */
.input-container {
    display: flex;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    width: 60%;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2)); /* Ombre portée légère */
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .input-container {
        width: 90%;
        padding-left: 10px;
        padding-right: 10px;
    }
}

input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(121, 85, 45, 0.5);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Cinzel Decorative', serif;
    outline: none;
    background-color: rgba(253, 248, 235, 0.9);
    color: #5a3b1a;
    box-shadow: inset 0 2px 4px rgba(139, 94, 40, 0.15);
    transition: all 0.3s ease;
    height: 24px;
}

input:focus {
    border-color: rgba(158, 108, 19, 0.8);
    box-shadow: inset 0 2px 4px rgba(139, 94, 40, 0.15), 0 0 8px rgba(184, 134, 46, 0.4);
    background-color: rgba(255, 252, 245, 0.95);
}

input::placeholder {
    color: rgba(121, 85, 45, 0.6);
    font-style: italic;
    font-weight: 400;
}

.button-container {
    width: 90%;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 1rem;
}

button {
    background: linear-gradient(to bottom, #b3770f, #7a4507);
    color: #f3e4be;
    border: 1px solid #5c3307;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-family: 'Cinzel Decorative', cursive;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    button {
        width: 30%;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

button:hover {
    background: linear-gradient(to bottom, #c98a1a, #8d5106);
    transform: translateY(-2px);
}

button:disabled, button.disabled {
    background: linear-gradient(to bottom, #9a8061, #6a5a47);
    color: #d0c0a0;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

button:disabled:hover, button.disabled:hover {
    background: linear-gradient(to bottom, #9a8061, #6a5a47);
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 10%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.3s;
}

button:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.result-container {
    padding: 0.5rem;
    min-height: 30px;
    text-align: left;
    position: relative;
    z-index: 2;
    color: rgba(158, 132, 91, 0.9);
    font-weight: normal;
    font-size: 0.9rem;
}

.social-media {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .social-media {
        bottom: 10px;
        left: 10px;
        gap: 10px;
    }
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(86, 33, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2c799;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 15px rgba(150, 100, 50, 0.2);
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .social-icon {
        width: 32px;
        height: 32px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
}

.social-icon:hover {
    transform: translateY(-5px);
    background-color: rgba(121, 46, 0, 0.9);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Styles pour le bouton Discord */
.discord-container {
    position: fixed; /* Position fixe par rapport à la fenêtre */
    top: 20px; /* Marge du haut */
    left: 20px; /* Marge de gauche */
    z-index: 100; /* S'assure qu'il reste au-dessus de tous les autres éléments */
    display: flex;
    flex-direction: column; /* Empile les éléments verticalement */
    align-items: flex-start; /* Aligne les éléments à gauche */
    gap: 5px; /* Espace entre le bouton et le statut */
}

.discord-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(to bottom, #7289da, #5865f2);
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid #4e5dd5;
    max-width: 180px;
}

.discord-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.3s;
}

.discord-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    background: linear-gradient(to bottom, #7e97f5, #6270f7);
}

.discord-button:hover::before {
    opacity: 0.8;
    transform: scale(1);
}

.discord-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.discord-button svg {
    width: 18px;
    height: 14px;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .discord-button {
        padding: 3px 6px;
        font-size: 0.6rem;
        max-width: 110px;
    }
    
    .discord-button svg {
        width: 12px;
        height: 10px;
        margin-right: -2px;
    }
    
    .discord-button span {
        font-size: 0.55rem;
    }
    
    .discord-container {
        top: 5px; /* Réduit davantage la marge du haut sur mobile */
        left: 5px; /* Réduit davantage la marge de gauche sur mobile */
        max-width: 110px;
    }
    
    .auth-status {
        font-size: 8px;
        padding: 2px 4px;
        max-width: 110px;
    }
}

/* Style pour le bouton Menu Carte */
.menu-carte-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.menu-carte-text {
    color: #fff;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: bold;
    font-size: 0.7rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.menu-carte-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 4px;    
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
}

.menu-carte-button:hover {
    transform: translateY(-4px);
}

.menu-carte-button:hover .menu-carte-icon {
    transform: scale(1.15);
}

.menu-carte-button:active {
    transform: translateY(4px);
}

.menu-carte-icon {
    width: 70px;
    height: 70px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .menu-carte-container {
        top: 10px;
        right: 10px;
    }
    .menu-carte-button {
        width: 50px;
        height: 50px;
    }
    .menu-carte-icon {
        width: 50px;
        height: 50px;
    }
    .menu-carte-text {
        display: none;
    }
}

/* Animation de chargement */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 150px;
    height: 150px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-star {
    width: 100%;
    height: 100%;
    animation: spin 2s linear infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.7));
}

/* Animation de scintillement pour l'étoile */
@keyframes glow {
    0% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.9)); }
    100% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)); }
}

/* Combiner rotation et scintillement */
.loader-star {
    animation: spin 4s linear infinite, glow 2s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    position: absolute;
    bottom: -40px;
    color: #fff;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(150, 100, 200, 0.8);
    letter-spacing: 2px;
}

/* Media query pour les très petits écrans */
@media (max-width: 380px) {
    .menu-carte-container {
        top: 5px;
        right: 5px;
    }
    .menu-carte-button {
        width: 40px;
        height: 40px;
    }
    .menu-carte-icon {
        width: 40px;
        height: 40px;
    }
    .menu-carte-text {
        display: none;
    }

    .discord-button {
        padding: 4px 8px;
        font-size: 0.65rem;
        max-width: 120px;
    }
    
    .discord-button svg {
        width: 14px;
        height: 10px;
    }
    
    .discord-button span {
        font-size: 0.6rem;
    }
    
    .discord-container {
        top: 5px;
        left: 5px;
        max-width: 120px;
    }
    
    .auth-status {
        font-size: 9px;
        padding: 2px 5px;
        max-width: 120px;
    }
}

/* Effets Holographiques - Inspirés de pokemon-cards-css */

/* Effets d'animation supplémentaires au survol */
.cosmos-holo:hover .holo-sparkle {
    opacity: 0.1;
    animation: sparkle 3s ease-in-out infinite; /* Animation de scintillement au survol */
}

.cosmos-holo:hover .holo-pattern {
    opacity: 0.1;
    animation: cosmos-pattern 8s linear infinite; /* Animation de motif cosmos plus lente au survol */
}

/* Nouveaux effets holographiques */

/* Styles pour la div carteverso-container */
/* Conteneur pour la carte verso (carte de droite) */
.carteverso-container {
    position: absolute;
    left: 65%; /* Position horizontale sur la droite de l'écran */
    top: 50%; /* Centre vertical */
    transform: translate(-50%, -50%); /* Centrage parfait */
    width: 350px;
    height: auto;
    z-index: 5; /* S'assure que la carte est au-dessus des autres éléments */
    perspective: 1000px; /* Ajoute de la profondeur pour l'effet 3D */
}

/* Cadre de la carte - inspiré du design des cartes Pokemon */
.card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 31px; /* Coins arrondis pour l'esthétique des cartes de jeu */
    transition: transform 0.6s ease-out; /* Animation fluide pour les effets de survol */
    transform-style: preserve-3d; /* Permet l'effet 3D */
    cursor: pointer; /* Indique que la carte est interactive */
    z-index: 1;
    background: transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8); /* Ombre prononcée pour l'effet de profondeur */
    overflow: hidden; /* Empêche les effets de déborder */
}

/* Pour la carte verso */
.card-frame.verso {
    background: transparent;
}

/* Conteneur pour l'image d'arrière-plan */
.card-background-container {
    position: absolute;
    top: 8%; /* Position ajustée pour agrandir l'image */
    left: 12%;
    width: 76%; /* Largeur augmentée */
    height: 47%; /* Hauteur augmentée */
    border-radius: 10px;
    z-index: 1; /* En dessous de l'image de la carte */
    overflow: hidden;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-background-container {
        top: 8.5%;
        left: 12.5%;
        width: 75%;
        height: 45%;
        border-radius: 8px;
    }
}

/* Image d'arrière-plan */
.card-background-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Couvre toute la zone */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1; /* Pleine opacité */
}

/* Conteneur pour le nom de la carte */
.card-name-container {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 3; /* Au-dessus de l'image mais sous les effets holographiques */
}

/* Style du nom de la carte */
.card-name {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: #b17419; /* Couleur dorée */
    text-shadow: 0 0 5px #000, 0 0 5px #632, 1px 1px 1px #000; /* Ombre pour meilleure lisibilité */
    letter-spacing: 1px;
    margin: 0;
    -webkit-text-stroke: 0.3px black;
    padding: 0;
    transform: translateY(-50%);
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-name {
        font-size: 1rem;
        letter-spacing: 0.5px;
    }
    .card-name-container {
        top: 10%;
    }
}

/* Style pour l'attaque */
.card-attack {
    position: absolute;
    top: 5.7%;
    left: 10.5%;
    width: 30px;
    height: 30px;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    /*text-shadow: 0 0 10px #000, 0 0 10px #000; */
    -webkit-text-stroke: 1px black; /* Bordure noire pour les navigateurs webkit */
    z-index: 3;
    text-align: center;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-attack {
        font-size: 1.5rem;
        top: 6%;
        left: 9.6%;
    }
}

/* Style pour la santé */
.card-health {
    position: absolute;
    top: 5.7%;
    right: 11.8%;
    width: 30px;
    height: 30px;
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    /*text-shadow: 0 0 10px #000, 0 0 10px #000; */
    -webkit-text-stroke: 1px black; /* Bordure noire pour les navigateurs webkit */
    z-index: 3;
    text-align: center;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-health {
        font-size: 1.5rem;
        top: 6%;
        right: 10.8%;
    }
}

/* Container de l'image */
.card-image-container {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 2;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .card-image-container {
        border-radius: 8px;
    }
}

/* Base card image */
.card-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    z-index: 2;
}

/* Effet holographique principal */
.holo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 3;
    pointer-events: none; /* L'effet ne bloque pas les interactions */
    mix-blend-mode: overlay; /* Fusion visuelle avec la carte */
    background-image: linear-gradient(
        var(--shine-angle, 120deg), /* Angle dynamique contrôlé par JavaScript */
        transparent 0%,
        rgba(255, 255, 255, 0.1) 10%,
        rgba(255, 255, 255, 0.3) 20%,
        rgba(255, 255, 255, 0.5) 30%, /* Point culminant de la brillance */
        rgba(255, 255, 255, 0.3) 40%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 200%; /* Taille augmentée pour l'animation */
    background-position: 0% 0%;
    filter: brightness(1.2) contrast(1.1); /* Valeurs identiques à cartes-svelte.html */
    opacity: 0.8; /* Augmenté pour plus de vivacité */
    transition: opacity 0.3s;
}

/* Effet galaxie/cosmos pour un aspect étoilé sur la carte */
.cosmos-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 4; /* Niveau au-dessus de l'effet holographique de base */
    pointer-events: none;
    mix-blend-mode: screen; /* Fusion lumineuse avec la carte */
    background-image:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0.5%, transparent 1%), /* Étoile centrale */
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.6) 0.25%, transparent 0.5%), /* Étoiles plus petites */
        radial-gradient(circle at 70% 75%, rgba(255, 255, 255, 0.7) 0.25%, transparent 0.5%),
        radial-gradient(circle at 20% 60%, rgba(255, 255, 255, 0.5) 0.5%, transparent 1%),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.6) 0.5%, transparent 1%);
    background-size: 120% 120%; /* Légèrement plus grand pour l'animation */
    opacity: 0.1;
    transition: opacity 0.3s;
}

/* Effet d'étincelles scintillantes sur la carte */
.sparkle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 5; /* Niveau le plus élevé pour les étincelles */
    pointer-events: none;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 1%), /* Étincelles */
        radial-gradient(circle at 70% 65%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 1%),
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 1%),
        radial-gradient(circle at 10% 60%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 1%);
    background-size: 150% 150%; /* Taille plus grande pour l'animation */
    opacity: 0.15;
    transition: opacity 0.3s;
}

/* Media query pour les téléphones */
@media (max-width: 576px) {
    .sparkle-overlay {
        background-size: 120% 120%; /* Taille légèrement réduite pour mobile */
        opacity: 0.2; /* Légèrement plus visible sur mobile */
    }
}

/* Animation pour les étincelles scintillantes */
@keyframes sparkle {
    0% { background-position: 0% 0%; opacity: 0.2; } /* Position initiale */
    25% { background-position: 50% 0%; opacity: 0.3; } /* Déplacement horizontal et augmentation d'opacité */
    50% { background-position: 100% 100%; opacity: 0.4; } /* Déplacement diagonal et opacité maximale comme dans svelte */
    75% { background-position: 0% 100%; opacity: 0.3; } /* Déplacement vertical et diminution d'opacité */
    100% { background-position: 0% 0%; opacity: 0.2; } /* Retour à la position initiale */
}

/* Animation pour l'effet holographique brillant */
@keyframes holo-shine {
    0% {
        background-position: 0% 0%; /* Position de départ du dégradé */
        filter: brightness(1.1) contrast(1.05); /* Luminosité de base */
    }
    50% {
        background-position: 100% 100%; /* Déplacement diagonal maximum */
        filter: brightness(1.5) contrast(1.3); /* Augmenté pour plus d'intensité */
    }
    100% {
        background-position: 0% 0%; /* Retour à la position initiale */
        filter: brightness(1.1) contrast(1.05); /* Retour à la luminosité de base */
    }
}

/* Animations activées lorsque la carte est en état 'active' (survol ou focus) */
.card-frame.active .holo-overlay {
    opacity: 0.8; /* Augmenté pour plus d'intensité */
    animation: holo-shine 3s ease-in-out infinite alternate; /* Animation perpétuelle avec alternance */
}

.card-frame.active .cosmos-overlay {
    opacity: 0.6; /* Augmenté pour plus d'intensité */
    animation: cosmos-pattern 6s linear infinite; /* Animation continue sans alternance */
}

.card-frame.active .sparkle-overlay {
    opacity: 0.5; /* Augmenté pour plus d'intensité */
    animation: sparkle 4s ease-in-out infinite; /* Scintillement continu */
}

.card-frame.active .border-glow {
    opacity: 0.7; /* Augmenté pour plus d'intensité */
}

/* Media query pour les téléphones - effets adaptés */
@media (max-width: 576px) {
    .card-frame.active .holo-overlay {
        opacity: 0.7;
        animation-duration: 2.5s;
    }

    .card-frame.active .cosmos-overlay {
        opacity: 0.5;
        animation-duration: 5s;
    }

    .card-frame.active .sparkle-overlay {
        opacity: 0.4;
        animation-duration: 3.5s;
    }

    .card-frame.active .border-glow {
        opacity: 0.6;
    }
}
