/* =========================================
   1. RESET & FONTS
   ========================================= */
.ufc-events-list {
    max-width: 100%;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.ufc-events-list * {
    box-sizing: border-box;
}

/* =========================================
   2. CARTE STYLE GOATAFIGHT (LISTE)
   ========================================= */
.ufc-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ufc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #d00000;
}

/* HEADER : DATE */
.ufc-card-header {
    background: #f9f9f9;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ufc-badge-predicted {
    background: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* CORPS DE LA CARTE */
.ufc-card-body {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.ufc-card-info {
    flex: 1;
    min-width: 250px;
}

.ufc-card-title {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #111;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ZONE VERSUS */
.ufc-versus-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
}

.ufc-fighter-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #333;
    font-size: 1.25em;
}

.ufc-fighter-pill img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

.ufc-vs-text {
    font-weight: 900;
    color: #d00000;
    font-style: italic;
    font-size: 1.2em;
    padding: 0 10px;
}

/* FOOTER & BOUTONS */
.ufc-card-actions {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fff;
    text-align: right;
}

.ufc-btn-main {
    display: inline-block;
    background-color: #d00000;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9em;
    transition: background 0.3s;
}

.ufc-btn-main:hover {
    background-color: #a00000;
    color: white;
}

.ufc-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: default;
}

.ufc-btn-disabled {
    background: #eee;
    color: #999;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: not-allowed;
}

.ufc-user-choice {
    margin-top: 10px;
    background: #fff9db;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #f1c40f;
    color: #555;
    font-size: 0.9em;
}

.ufc-user-choice strong {
    color: #d00000;
}

/* =========================================
   3. LE POPUP (MODAL) - LA CORRECTION EST ICI
   ========================================= */
.ufc-modal {
    display: none; /* Caché par défaut */
    position: fixed; /* Fixe par rapport à l'écran */
    z-index: 99999; /* Au-dessus de tout */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7); /* Fond noir semi-transparent */
    backdrop-filter: blur(2px); /* Petit effet de flou moderne */
}

.ufc-modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% du haut, centré horizontalement */
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px; /* Largeur max du popup */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    animation: ufcFadeIn 0.3s;
}

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

.ufc-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
}

.ufc-close:hover,
.ufc-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* =========================================
   4. DESIGN DU FORMULAIRE (DANS LE POPUP)
   ========================================= */
#ufc-prediction-form-container {
    padding: 25px;
}

#ufc-prediction-form-container h3 {
    margin-top: 0;
    color: #d00000;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* Style des labels et inputs */
.ufc-form-group {
    margin-bottom: 15px;
}

.ufc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ufc-form-group select, 
.ufc-form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* Taille lisible mobile */
    background: #fafafa;
}

.ufc-form-group select:focus {
    border-color: #d00000;
    outline: none;
    background: #fff;
}

/* Bouton de validation du formulaire */
.ufc-submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #d00000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.ufc-submit-btn:hover {
    background-color: #a00000;
}



/* Responsive Mobile */
@media (max-width: 768px) {
    .ufc-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ufc-versus-container {
        width: 100%;
        justify-content: space-between;
        background: #f9f9f9;
        padding: 10px;
        border-radius: 6px;
    }
    
    .ufc-card-actions {
        text-align: center;
    }
    
    .ufc-btn-main {
        width: 100%;
        display: block;
        text-align: center;
    }
}