/* ========================================
   NOUVEAU: SECTION BILLETS DE TRAIN (PHASE 2)
   ======================================== */

.billets-section {
    background: var(--blanc);
    border-radius: 8px;
    box-shadow: var(--shadow-subtile);
    padding: 1.5rem;
    margin-bottom: 3rem;
}

.billets-section h2 {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: var(--gris-texte);
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin: 0 0 1rem 0;
}

/* Conteneur des cartes de billets */
.container-cards-ticket {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

/* État caché des billets */
.ticket-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.8s ease-out;
}

/* État révélé des billets */
.ticket-revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Animation de révélation */
@keyframes ticketReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Effet de flip 3D pour les billets */
.ticket-flip-container {
    perspective: 1500px;
    width: 100%;
    height: 260px;
}

.ticket-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.ticket-flipper.flipped {
    transform: rotateY(180deg);
}

.ticket-front,
.ticket-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* MODIFIÉ: Look papier */
    border-radius: 8px; /* Moins arrondi */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #e0d8c0; /* Bordure couleur papier */
}

.ticket-front {
    /* MODIFIÉ: Fond papier crème */
    background: #fffbef;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0,0,0,0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,0,0,0.01) 0%, transparent 50%);
}

.ticket-back {
    /* MODIFIÉ: Fond papier crème */
    background: #fffbef;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0,0,0,0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,0,0,0.01) 0%, transparent 50%);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    box-sizing: border-box;
    font-size: 0.85rem;
    color: #333;
}

.ticket-back-content {
    font-family: var(--font-principale); /* Ajouté pour lisibilité */
    font-size: 1rem; /* Augmenté */
    line-height: 1.6; /* Augmenté */
    color: #333;
    text-align: left;
    padding: 1rem; /* Augmenté */
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex: 1;
    /* display: flex; <- Supprimé */
    /* align-items: center; <- Supprimé */
    /* justify-content: center; <- Supprimé */
    overflow-y: auto; /* Ajouté pour défilement */
    white-space: pre-line; /* Ajouté pour les retours à la ligne */

    /* Masquer la scrollbar pour Firefox */
    scrollbar-width: none;
    /* Masquer la scrollbar pour IE/Edge */
    -ms-overflow-style: none;
}

/* Masquer la scrollbar pour Chrome, Safari et mobile */
.ticket-back-content::-webkit-scrollbar {
    display: none;
}


/* Bouton explication */
.explanation-btn {
    /* MODIFIÉ: Style de bouton plus petit, plus "ticket" */
    background-color: #444;
    color: var(--blanc);
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-principale); /* Bouton en police normale */
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.explanation-btn:hover {
    background-color: #000;
    transform: translateY(0); /* Pas de mouvement */
    box-shadow: none;
}

/* Bouton retour au recto */
.back-btn {
    background-color: var(--gris-texte);
    color: var(--blanc);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-family: var(--font-principale);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    align-self: center;
}

.back-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Styles spécifiques pour ressembler à un billet de train */
.card-ticket {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #333;
    box-sizing: border-box;
}

.separator {
    position: relative;
    height: auto;
    /* MODIFIÉ: Ligne de perforation plus visible */
    border-bottom: 2px dashed #bba;
    background: none;
    margin: 0.5rem 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.span-lines {
    display: none; /* Masquer l'ancien élément */
}

.content-ticket {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0.25rem 0;
}

.content-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Plus d'espace */
    padding-right: 1rem; /* Espace avant la souche */
}

.data-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-flex-col {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.data {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.data .title {
    /* MODIFIÉ: Style de titre de champ */
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.8px;
}

.data .subtitle {
    /* MODIFIÉ: Données plus grasses */
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
}

.container-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* Espace entre QR et bouton */
    min-width: 90px; /* Taille de la souche */
    /* MODIFIÉ: Perforation verticale */
    border-left: 2px dashed #bba;
    padding-left: 1rem;
    justify-content: center; /* Centrer verticalement */
    align-self: stretch; /* Étirer sur toute la hauteur */
}

.icon {
    /* MODIFIÉ: Remplacement du QR code par un "tampon" emoji */
    font-size: 3rem; /* Rétablit la taille de l'emoji */
    line-height: 1;
    color: #000;
    opacity: 0.7;
    /* Suppression des styles du QR code */
    /* width: 50px; */
    /* height: 50px; */
    /* background: ... */
    /* border: ... */
}

/* .explanation-btn (déplacé plus haut) */