/* Container principal */
.race-tabs-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Conteneur des tabs */
.race-tabs {
    width: 100%;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Container des onglets */
/* On enlève la bordure du bas pour éviter une ligne séparatrice gênante */
.tabs-nav {
    display: flex;
    padding: 0;
    background: #f1f1f1; /* Fond gris clair pour contraster avec le blanc du contenu */
    border: none;
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 -1px 0 #ddd; /* Petite ligne de séparation en bas de la nav */
}

/* Boutons des onglets */
.tab-button {
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-top-left-radius: 8px;
    font-weight: bold;
    border-top-right-radius: 8px;
    margin-right: 0.25rem;
    flex: 1;
    text-align: center;
    color: #336699;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Pour le dernier bouton, on supprime la marge droite */
.tab-button:last-child {
    margin-right: 0;
}

/* Effet au survol sur tous les onglets */
.tab-button:hover {
    background: #fff; /* Passage à un fond blanc pour simuler un "bouton en relief" */
    border-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Onglet actif : le bouton semble "relevé" et rejoint le contenu blanc en dessous */
.tab-button.active {
    background: #fff;
    border: 1px solid #ddd;
    /* Pour "fusionner" visuellement avec le contenu blanc, on laisse le bas sans bordure */
    border-bottom: 1px solid #fff;
    color: #00504B;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Optionnel : style de focus pour l’accessibilité */
.tab-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 80, 75, 0.5);
}

.tab-button i {
    font-size: 1.1rem;
}

/* Contenu des tabs */
.tab-content {
    display: none;
    padding: 1.5rem;
    background: #fff;
    width: 100%;
    margin: 0;
}

.tab-content.active {
    display: block !important;
}

/* Style pour le message Quinté */
.quinte-message {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 1rem;
    text-align: center;
    margin: 0;
    font-weight: 600;
}

.quinte-message a {
    color: #00504B;
    text-decoration: none;
    font-weight: 700;
}

.quinte-message a:hover {
    text-decoration: underline;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-button {
        padding: 0.75rem;
        font-size: 0.9rem;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .tab-content {
        padding: 1rem;
    }

    .race-tabs-container {
        padding: 0 0.5rem;
    }
}

/* Styles pour les onglets IA */

/* Onglet IA avec un fond pastel et un style de contour différent */
.tab-button-ia {
    background: #eaf6f6; /* Fond pastel */
    color: #00504B;
    font-weight: bold;
    border: 1px solid #9dd8d8;
    margin-right: 0.25rem;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-button-ia:hover {
    background: #dff0f0; /* Survol */
    border-color: #85c8c8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-button-ia.active {
    background: #fff;
    border-color: #85c8c8;
    border-bottom: 1px solid #fff;
    color: #00504B;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Petit badge IA à côté du texte */
.ia-badge {
    background: #00504B;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* Styles pour le contenu Recommandations IA */
.recommendations-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

.recommendations-header {
    font-size: 1.5rem;
    color: #00504B;
    margin-bottom: 1rem;
}

.recommendations-section {
    margin-bottom: 1rem;
}

.recommendations-section h4 {
    font-size: 1.2rem;
    color: #336699;
    margin-bottom: 0.5rem;
}

.recommendations-list {
    list-style: none;
    padding-left: 0;
}

.recommendations-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.recommendations-list li::before {
    content: "👉";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1rem;
}

.legal-note {
    font-size: 0.85rem;
    color: #666;
    border-top: 1px dashed #ccc;
    padding-top: 0.5rem;
    margin-top: 1rem;
}

/* Styles pour le bloc Conseils de turf.bzh */
.turf-advice {
    background: #eef7fb;
    border: 1px solid #c3e0f7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.turf-advice-header {
    font-size: 1.3rem;
    color: #00504B;
    margin-bottom: 0.5rem;
}
