/* Fichier: style_main.css */

/* --- 1. Variables et Reset Global --- */
:root {
    --bleu-nuit: #1B263B;
    --bleu-moyen: #415A77;
    --gris-acier: #F4F7F9;
    --vert-turf: #2ECC71;
    --vert-fonce: #27AE60;
    --texte-principal: #4A4A4A;
    --texte-secondaire: #777;
    --bordure: #E0E0E0;
    --ombre: 0 4px 15px rgba(0, 0, 0, 0.07);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--gris-acier);
    color: var(--texte-principal);
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 20px;
}

/* --- 2. Header --- */
header {
    background-color: white;
    box-shadow: var(--ombre);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav .nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav .nav-link {
    text-decoration: none;
    color: var(--bleu-moyen);
    font-weight: 600;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.main-nav .nav-link:hover, .main-nav .nav-link.active {
    color: white;
    background-color: var(--bleu-nuit);
}

.user-panel .auth-links a {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-panel .login-btn {
    color: var(--bleu-nuit);
    border: 1px solid var(--bleu-nuit);
}
.user-panel .login-btn:hover {
    background-color: var(--bleu-nuit);
    color: white;
}

.user-panel .register-btn {
    background-color: var(--vert-turf);
    color: white;
    border: 1px solid var(--vert-turf);
}
.user-panel .register-btn:hover {
    background-color: var(--vert-fonce);
    border-color: var(--vert-fonce);
}

/* --- 3. Structure du Contenu --- */
.main-content {
    flex: 3;
}

.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- 4. Éléments Communs (Cartes, Boutons, Titres) --- */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--ombre);
    margin-bottom: 20px;
}

h1, h2, h3 {
    color: var(--bleu-nuit);
    margin-bottom: 15px;
}

h1 {
    font-size: 28px;
    border-bottom: 2px solid var(--bordure);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

h2 { font-size: 22px; }
h3 { font-size: 18px; }

/* --- 5. Footer --- */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--bordure);
    color: var(--texte-secondaire);
    font-size: 14px;
}
/* --- 6. Styles Spécifiques à la Page d'Accueil (index.php) --- */

/* Sélecteur de date */
.date-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.date-selector .date-link {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--bleu-moyen);
    background-color: var(--gris-acier);
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}
.date-selector .date-link.active, .date-selector .date-link:hover {
    background-color: var(--bleu-nuit);
    color: white;
}
.date-selector input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    font-size: 14px;
}
.date-selector button {
    padding: 8px 15px;
    background-color: var(--vert-turf);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.date-selector button:hover {
    background-color: var(--vert-fonce);
}

/* Grille d'infos de la course */
.race-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid var(--bordure);
    border-bottom: 1px solid var(--bordure);
    margin: 15px 0;
}
.race-info-grid div {
    font-size: 15px;
}
.race-info-grid span {
    font-weight: 600;
    color: var(--bleu-moyen);
    margin-right: 8px;
}

/* Boutons d'action sous les infos */
.race-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.race-actions .action-btn {
    padding: 8px 15px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
}
.race-actions .action-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.action-btn.pronostics { background-color: #3498DB; }
.action-btn.synthese { background-color: #9B59B6; }
.action-btn.ia { background-color: #E67E22; }
.action-btn.resultats { background-color: var(--vert-turf); }

/* Tableau des partants */
.partants-table {
    width: 100%;
    border-collapse: collapse;
}
.partants-table th {
    text-align: left;
    padding: 12px;
    background-color: var(--gris-acier);
    font-size: 14px;
    color: var(--bleu-moyen);
}
.partants-table td {
    padding: 12px;
    border-bottom: 1px solid var(--bordure);
}
.partants-table .num-pmu {
    font-weight: 700;
    font-size: 16px;
    color: var(--bleu-nuit);
}
.partants-table .cheval-nom {
    font-weight: 600;
}
.partants-table .cote {
    font-weight: 700;
    text-align: center;
}
.partants-table .favori { color: var(--vert-turf); }
.partants-table .outsider { color: #F39C12; }
.partants-table .tocard { color: #E74C3C; }
.partants-table .non-partant {
    background-color: #FEF2F2;
    opacity: 0.7;
}
.partants-table .np-badge {
    display: inline-block;
    background-color: #E74C3C;
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
}

/* --- 7. Responsive --- */
.mobile-only { display: none; }

@media (max-width: 768px) {
    .container { flex-direction: column; }
    .desktop-only { display: none; }
    .mobile-only { display: block; }
    .partants-table .jockey-details { font-size: 13px; color: var(--texte-secondaire); }
}

/* --- 8. Styles Spécifiques à la Sidebar --- */

.sidebar .card h2 {
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bordure);
}

/* Menu rapide */
.sidebar-menu {
    list-style: none;
    margin-top: 15px;
}
.sidebar-menu li a {
    text-decoration: none;
    color: var(--bleu-moyen);
    font-weight: 500;
    display: block;
    padding: 8px 0;
    transition: color 0.2s;
}
.sidebar-menu li a:hover {
    color: var(--bleu-nuit);
}

/* Dernières nouvelles */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}
.news-item {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
}
.news-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.news-item-info h4 {
    font-size: 15px;
    color: var(--texte-principal);
    margin: 0 0 5px 0;
    line-height: 1.3;
    transition: color 0.2s;
}
.news-item:hover .news-item-info h4 {
    color: var(--bleu-nuit);
}
.news-item-info small {
    font-size: 12px;
    color: var(--texte-secondaire);
}

/* Formulaire */
.sidebar-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.form-input {
    padding: 10px 12px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    font-size: 14px;
}
.form-button {
    padding: 10px 12px;
    background-color: var(--bleu-nuit);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.form-button:hover {
    background-color: var(--bleu-moyen);
}

/* Liens sociaux */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}
.social-link {
    text-decoration: none;
    color: white;
    padding: 10px 15px;
    border-radius: var(--radius);
    transition: opacity 0.2s;
    font-weight: 500;
}
.social-link:hover {
    opacity: 0.9;
}
.social-link .fab {
    margin-right: 10px;
    width: 20px; /* Pour un alignement parfait */
}
.social-link.facebook { background-color: #3b5998; }
.social-link.twitter { background-color: #1da1f2; }
.social-link.instagram { background-color: #e1306c; }

/* --- 9. Styles pour le Menu Déroulant Utilisateur --- */

.user-dropdown {
    position: relative; /* Contexte pour le positionnement du menu */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.user-info:hover {
    background-color: var(--gris-acier);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bordure);
}

.default-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bleu-moyen);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.username {
    font-weight: 600;
    color: var(--bleu-nuit);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--texte-secondaire);
    transition: transform 0.3s;
}

/* Le menu qui apparaît */
.dropdown-content {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 110%; /* Juste en dessous du nom */
    right: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: var(--ombre);
    border-radius: var(--radius);
    z-index: 1001;
    overflow: hidden; /* Pour que le radius s'applique aux liens */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Affichage au survol */
.user-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--texte-principal);
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--bleu-nuit);
    color: white;
}

.dropdown-content a .fas {
    width: 20px; /* Alignement parfait des icônes */
    text-align: center;
    color: var(--bleu-moyen);
    transition: color 0.2s;
}

.dropdown-content a:hover .fas {
    color: white;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--bordure);
    margin: 5px 0;
}

.logout-link {
    color: var(--danger-color) !important; /* Important pour surcharger la couleur de base */
}
.logout-link .fas {
    color: var(--danger-color) !important;
}
.logout-link:hover {
    background-color: var(--danger-color) !important;
    color: white !important;
}
.logout-link:hover .fas {
    color: white !important;
}

/* --- 10. Styles pour la Page d'Actualités --- */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--ombre);
    display: flex;
    flex-direction: column;
    height: 100%; /* Pour que toutes les cartes aient la même hauteur */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.article-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gris-acier);
    font-size: 50px;
    color: var(--bordure);
}

.article-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet au footer de se coller en bas */
}

.article-body h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: var(--bleu-nuit);
}

.article-body .excerpt {
    font-size: 15px;
    color: var(--texte-principal);
    margin-bottom: 15px;
    flex-grow: 1; /* Pousse le meta-footer en bas */
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--texte-secondaire);
    border-top: 1px solid var(--bordure);
    padding-top: 10px;
}

.read-more {
    font-weight: 600;
    color: var(--vert-turf);
}

/* Pagination */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination a {
    padding: 8px 15px;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    color: var(--bleu-moyen);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: var(--vert-fonce);
    border-color: var(--vert-fonce);
    color: white;
}

.pagination a.active {
    background: var(--vert-turf);
    border-color: var(--vert-turf);
    color: white;
    cursor: default;
}

/* --- 11. Styles pour la Page de Contact --- */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--bleu-moyen);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bleu-nuit);
    box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.1);
}

.submit-btn {
    padding: 12px 20px;
    background-color: var(--vert-turf);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover {
    background-color: var(--vert-fonce);
    transform: translateY(-2px);
}

/* Messages de succès ou d'erreur */
.form-message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-message.success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}
.form-message.error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* --- 12. Styles pour la Page de Concours --- */

.concours-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.concours-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.concours-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.concours-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--bordure);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.concours-card-header h3 {
    margin: 0;
    color: var(--bleu-nuit);
    font-size: 20px;
}

.race-tag {
    background-color: var(--bleu-moyen);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 15px;
}

.concours-card-body {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.info-item .fas {
    color: var(--bleu-moyen);
    width: 20px;
    text-align: center;
}

.concours-card-footer {
    padding: 20px;
    background-color: var(--gris-acier);
    text-align: right;
    border-top: 1px solid var(--bordure);
}

.pronostic-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--vert-turf);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.pronostic-btn:hover {
    background-color: var(--vert-fonce);
}

.no-races {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--texte-secondaire);
}

/* --- 13. Styles pour la Page de Pronostic --- */

/* Grille des partants */
.partants-pronostic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.partant-card {
    background: var(--gris-acier);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    overflow: hidden;
}
.partant-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-bottom: 1px solid var(--bordure);
}
.partant-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background-color: var(--bleu-nuit);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.partant-nom {
    font-weight: 600;
    color: var(--bleu-nuit);
}
.np-tag {
    background-color: #E74C3C;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}
.partant-details {
    padding: 10px;
    font-size: 13px;
    color: var(--texte-secondaire);
}
.partant-card.is-np {
    background-color: #FEF2F2;
    opacity: 0.7;
}

/* Formulaire de saisie */
.pronostic-saisie-form {
    margin-top: 20px;
}

.pronostic-saisie-wrapper {
    display: flex;
    flex-wrap: wrap; /* Permet de passer à la ligne sur petits écrans */
    align-items: flex-end; /* Aligne les labels et les inputs en bas */
    gap: 10px;
    margin-top: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet aux champs de prendre la place disponible */
}

.input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--bleu-moyen);
    font-size: 14px;
}

.input-group input {
    width: 100%;
    min-width: 45px; /* Largeur minimale pour chaque champ */
    max-width: 70px; /* Largeur maximale pour chaque champ */
    padding: 10px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.input-group input:focus {
    outline: none;
    border-color: var(--bleu-nuit);
    box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.1);
}

/* On adapte le bouton pour qu'il s'aligne bien */
.pronostic-saisie-wrapper .submit-btn {
    height: 45px; /* Même hauteur que les inputs */
    flex-shrink: 0; /* Empêche le bouton de rétrécir */
    padding: 10px 20px; /* Ajustement du padding */
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.input-group {
    display: flex;
    flex-direction: column;
}
.input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--bleu-moyen);
    font-size: 14px;
}
.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}
.input-group input:focus {
    outline: none;
    border-color: var(--bleu-nuit);
    box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.1);
}

/* Overlay pour les non-connectés */
.blur-content {
    filter: blur(5px);
    pointer-events: none;
}
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 38, 59, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.auth-message {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.auth-message h2 { margin-top: 0; }
.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.auth-btn {
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.auth-btn.login { background-color: var(--vert-turf); color: white; }
.auth-btn.login:hover { background-color: var(--vert-fonce); }
.auth-btn.register { background-color: var(--bleu-nuit); color: white; }
.auth-btn.register:hover { background-color: var(--bleu-moyen); }

/* Message de warning (pronos fermés) */
.form-message.warning {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEEBA;
}

/* --- 14. Styles pour le Calculateur de Système Réduit --- */

.form-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--bordure);
}
form.card .form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 16px;
    color: var(--bleu-nuit);
    margin-bottom: 5px;
}

.info-text {
    font-size: 14px;
    color: var(--texte-secondaire);
    margin-bottom: 15px;
}

.input-grid {
    display: grid;
    gap: 10px;
}
.base-inputs {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
.selection-inputs {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
}

.input-grid input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}
.input-grid input[type="number"]:focus {
    outline: none;
    border-color: var(--bleu-nuit);
    box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.1);
}
/* Cacher les flèches des inputs number */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.radio-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 500;
}
.radio-group input[type="radio"] {
    margin-right: 8px;
}

/* Résultats */
.results-container h2 {
    font-size: 20px;
}
.ticket-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}
.ticket-list li {
    background-color: var(--gris-acier);
    padding: 10px 15px;
    border-radius: var(--radius);
    font-size: 15px;
}
.ticket-list .fa-ticket-alt {
    color: var(--vert-turf);
    margin-right: 8px;
}

/* --- 15. Styles pour la Page des Pronostics de la Presse --- */

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto; /* Ajoute un scroll horizontal si nécessaire sur petits écrans */
}

.pronostics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pronostics-table thead {
    background-color: var(--bleu-nuit);
    color: white;
}

.pronostics-table th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.pronostics-table th:first-child {
    text-align: left;
}

.pronostics-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--bordure);
}

.pronostics-table tbody tr:nth-child(even) {
    background-color: var(--gris-acier);
}

.pronostics-table tbody tr:hover {
    background-color: #E3F2FD; /* Un bleu très clair au survol */
}

.pronostics-table .source-cell {
    text-align: left;
    font-weight: 600;
    color: var(--bleu-moyen);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--bleu-nuit);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    margin-top: 20px;
    transition: background-color 0.2s;
}
.back-btn:hover {
    background-color: var(--bleu-moyen);
}

/* --- 16. Styles pour la Page de Synthèse --- */

.info-card {
    margin-bottom: 20px;
    background-color: var(--bleu-nuit);
    color: white;
}
.info-card-header h3 {
    color: white;
    margin: 0;
    font-size: 20px;
}
.info-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.info-card .info-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
}
.info-card .info-item .fas {
    opacity: 0.7;
}

.synthese-table {
    width: 100%;
    border-collapse: collapse;
}
.synthese-table thead {
    background-color: var(--gris-acier);
}
.synthese-table th {
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    color: var(--bleu-nuit);
}
.synthese-table th:nth-child(3) { text-align: left; } /* Colonne Cheval */

.synthese-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--bordure);
}
.synthese-table tbody tr:hover {
    background-color: #E3F2FD;
}

.synthese-table .cell-classement {
    font-weight: 700;
    font-size: 16px;
}
.synthese-table .cell-numero {
    font-weight: 700;
}
.synthese-table .cell-cheval {
    text-align: left;
    font-weight: 600;
}
.synthese-table .cell-points {
    font-weight: 700;
    color: var(--vert-turf);
}

.synthese-table tr.is-np {
    opacity: 0.6;
    background-color: #FEF2F2;
}
.np-tag-synthese {
    background-color: #E74C3C;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.synthese-legend {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--bordure);
    font-size: 13px;
    color: var(--texte-secondaire);
}

/* --- 17. Styles pour la Page d'Analyse IA --- */

.ia-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ia-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    border-top: 4px solid var(--card-color, var(--bleu-nuit));
    display: flex;
    flex-direction: column;
}

.ia-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 10px 20px;
}
.ia-card-header .fas {
    font-size: 24px;
    color: var(--card-color, var(--bleu-nuit));
}
.ia-card-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--bleu-nuit);
}

.ia-card-description {
    font-size: 14px;
    color: var(--texte-secondaire);
    padding: 0 20px 15px 20px;
    margin: 0;
    border-bottom: 1px solid var(--bordure);
}

.ia-card-section {
    padding: 15px 20px;
}
.ia-card-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--bleu-moyen);
}

.horse-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.horse-list li {
    display: flex;
    align-items: center;
    font-size: 15px;
}
.horse-list .num {
    font-weight: 700;
    width: 30px;
    flex-shrink: 0;
}
.horse-list .score {
    margin-left: auto;
    background-color: var(--gris-acier);
    color: var(--texte-secondaire);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

.ia-card-footer {
    margin-top: auto; /* Pousse le footer en bas */
    padding: 15px 20px;
    background-color: var(--bleu-nuit);
    color: white;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 16px;
    text-align: center;
}
.ia-card-footer span {
    font-weight: 700;
    letter-spacing: 1px;
}

/* --- 18. Styles pour la Page d'Analyse Complète --- */

.tabs-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--bordure);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.tab-link {
    padding: 10px 18px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--bleu-moyen);
    border-radius: var(--radius);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-link:hover {
    background-color: var(--gris-acier);
    color: var(--bleu-nuit);
}

.tab-link.active {
    background-color: var(--bleu-nuit);
    color: white;
}

.tab-content {
    display: none; /* Caché par défaut */
}

.tab-content.active {
    display: block; /* Affiché si actif */
    animation: fadeIn 0.4s;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 20px;
    color: var(--bleu-moyen);
}

/* Styles pour les tableaux générés par AJAX */
.tab-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.tab-content th {
    background-color: var(--gris-acier);
    padding: 12px;
    text-align: center;
    font-weight: 600;
}
.tab-content td {
    padding: 10px;
    border-bottom: 1px solid var(--bordure);
    text-align: center;
}
.tab-content tr:hover {
    background-color: #E3F2FD;
}
.tab-content td:nth-child(2) { /* Colonne "Nom" */
    text-align: left;
    font-weight: 500;
}
.action-btn.analyse {
    background-color: #9b59b6; /* Violet, ou la couleur de votre choix */
    color: white;
}

/* --- 19. Styles pour le Tableau Comparatif Compact --- */

.compact-table {
    font-size: 13px; /* On réduit la taille de la police pour tout le tableau */
    width: 100%;
    border-collapse: collapse;
}

.compact-table th {
    background-color: var(--gris-acier);
    padding: 10px 6px; /* Moins de padding horizontal */
    text-align: center;
    font-weight: 600;
    color: var(--bleu-nuit);
    white-space: nowrap; /* Empêche le retour à la ligne */
}

.compact-table td {
    padding: 8px 6px; /* Moins de padding */
    border-bottom: 1px solid var(--bordure);
    text-align: center;
}

.compact-table .cell-cheval {
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

/* Style pour les infobulles (tooltips) sur les en-têtes */
.compact-table th[title] {
    cursor: help; /* Change le curseur pour indiquer qu'il y a une info */
    text-decoration: underline dotted;
    text-decoration-color: var(--bleu-moyen);
}


/* --- 20. Ajustements finaux pour la Page d'Accueil --- */

/* Espacement entre les cartes */
.main-content .card {
    margin-bottom: 20px;
}

/* Grille des boutons d'action */
.action-buttons {
    display: flex;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne si besoin */
    gap: 10px; /* Espace entre les boutons */
}

.action-btn {
    flex-grow: 1; /* Fait en sorte que les boutons s'étirent pour remplir l'espace */
    text-decoration: none;
    color: white;
    padding: 12px 15px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.action-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Couleurs spécifiques des boutons */
.pronostic-btn { background-color: var(--vert-turf); }
.synthese-btn  { background-color: var(--bleu-moyen); }
.ia-btn        { background-color: #6a11cb; } /* Violet IA */
.analyse-btn   { background-color: #9b59b6; } /* Violet plus clair */
.results-btn   { background-color: #e67e22; } /* Orange pour les résultats */

/* --- 20. Styles pour l'onglet Duels & Matchs --- */

.duels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.duel-card {
    background-color: white;
    border-radius: var(--radius);
    border: 1px solid var(--bordure);
    box-shadow: var(--shadow-sm);
}

.duel-header {
    padding: 12px 15px;
    font-weight: 700;
    font-size: 16px;
    color: var(--bleu-nuit);
    border-bottom: 1px solid var(--bordure);
    display: flex;
    align-items: center;
    gap: 10px;
}

.duel-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.competitor {
    background-color: var(--gris-acier);
    padding: 10px;
    border-radius: 6px;
}

.competitor-name {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.competitor-name .num-pmu {
    background-color: var(--bleu-nuit);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.competitor-stats {
    font-size: 13px;
    color: var(--texte-secondaire);
    display: flex;
    justify-content: space-between;
}

.vs {
    text-align: center;
    font-weight: 700;
    color: var(--bleu-moyen);
}

/* Style pour les cartes avec un seul focus */
.duel-body.single-focus p {
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0 0 0;
    color: var(--texte-principal);
}

/* --- Styles pour la Page "Analyse Complète" --- */

/* Conteneur principal des onglets */
.analyse-tabs-container {
    background-color: white;
    border-radius: var(--radius, 8px);
    box-shadow: var(--ombre, 0 4px 15px rgba(0, 0, 0, 0.07));
    overflow: hidden; /* Pour que les coins arrondis s'appliquent bien */
}

/* Barre des boutons d'onglets */
.analyse-tab-buttons {
    display: flex;
    flex-wrap: wrap; /* Pour les petits écrans */
    background-color: var(--gris-acier, #F4F7F9);
    padding: 10px;
    gap: 10px;
}

.analyse-tab-link {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--bleu-moyen, #415A77);
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analyse-tab-link:hover {
    background-color: rgba(65, 90, 119, 0.1); /* bleu moyen transparent */
    color: var(--bleu-nuit, #1B263B);
}

.analyse-tab-link.active {
    background-color: var(--bleu-nuit, #1B263B);
    color: white;
    box-shadow: 0 2px 8px rgba(27, 38, 59, 0.3);
}

/* Conteneur du contenu des onglets */
.analyse-tab-content-wrapper {
    padding: 25px;
}

/* Loader (pendant le chargement AJAX) */
.analyse-loader {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--texte-secondaire, #777);
    font-style: italic;
}

/* Styles pour les tableaux dans les onglets (générique) */
.analyse-tab-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.analyse-tab-content-wrapper th {
    background-color: var(--gris-acier, #F4F7F9);
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--bleu-nuit, #1B263B);
}
.analyse-tab-content-wrapper td {
    padding: 10px;
    border-bottom: 1px solid var(--bordure, #E0E0E0);
    text-align: center;
}
.analyse-tab-content-wrapper tr:hover {
    background-color: #E3F2FD;
}
.analyse-tab-content-wrapper td:nth-child(2) { /* Colonne "Nom" */
    text-align: left;
    font-weight: 500;
}

/* Styles spécifiques pour les duels (déjà ajoutés, mais on vérifie) */
.duels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}
.duel-card {
    background-color: white;
    border-radius: var(--radius, 8px);
    border: 1px solid var(--bordure, #E0E0E0);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}
.duel-header {
    padding: 12px 15px;
    font-weight: 700;
    font-size: 16px;
    color: var(--bleu-nuit, #1B263B);
    border-bottom: 1px solid var(--bordure, #E0E0E0);
    display: flex;
    align-items: center;
    gap: 10px;
}
.duel-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.competitor {
    background-color: var(--gris-acier, #F4F7F9);
    padding: 10px;
    border-radius: 6px;
}
.competitor-name {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.competitor-name .num-pmu {
    background-color: var(--bleu-nuit, #1B263B);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.competitor-stats {
    font-size: 13px;
    color: var(--texte-secondaire, #777);
    display: flex;
    justify-content: space-between;
}
.vs {
    text-align: center;
    font-weight: 700;
    color: var(--bleu-moyen, #415A77);
}
.duel-body.single-focus p {
    font-size: 14px;
    line-height: 1.6;
    margin: 5px 0 0 0;
    color: var(--texte-principal, #4A4A4A);
}

/* --- Styles FINAUX pour la Page "Analyse Complète" --- */

/* On donne un peu plus d'air au titre principal */
.main-content h1 .fas {
    margin-right: 10px;
}

/* Conteneur principal des onglets */
.analyse-tabs-container {
    background-color: white;
    border-radius: var(--radius, 8px);
    box-shadow: var(--ombre, 0 4px 15px rgba(0, 0, 0, 0.07));
    margin-top: 20px; /* Espace après le titre */
}

/* Barre des boutons d'onglets améliorée */
.analyse-tab-buttons {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    gap: 10px;
    background-color: white;
    border-bottom: 1px solid var(--bordure, #E0E0E0);
}

.analyse-tab-link {
    padding: 10px 18px; /* Un peu plus de padding */
    border: 1px solid transparent; /* Bordure transparente par défaut */
    background-color: var(--gris-acier, #F4F7F9);
    cursor: pointer;
    font-size: 14px; /* Un peu plus petit pour la lisibilité */
    font-weight: 600;
    color: var(--bleu-moyen, #415A77);
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analyse-tab-link:hover {
    border-color: var(--bleu-moyen, #415A77);
    color: var(--bleu-nuit, #1B263B);
}

.analyse-tab-link.active {
    background-color: var(--bleu-nuit, #1B263B);
    color: white;
    border-color: var(--bleu-nuit, #1B263B);
    transform: translateY(-2px); /* Effet de "pop" */
    box-shadow: 0 4px 10px rgba(27, 38, 59, 0.2);
}

/* Conteneur du contenu des onglets */
.analyse-tab-content-wrapper {
    padding: 20px;
    min-height: 300px; /* Hauteur minimale pour éviter les sauts de page */
}

/* --- Correction pour les tableaux trop larges --- */
/* On applique le wrapper de scroll uniquement aux tableaux dans les onglets */
.analyse-tab-content-wrapper .table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--bordure, #E0E0E0);
    border-radius: var(--radius, 8px);
}

.analyse-tab-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.analyse-tab-content-wrapper th {
    background-color: var(--gris-acier, #F4F7F9);
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    color: var(--bleu-nuit, #1B263B);
    white-space: nowrap; /* Empêche le texte des en-têtes de se casser */
}

.analyse-tab-content-wrapper td {
    padding: 10px;
    border-bottom: 1px solid var(--bordure, #E0E0E0);
    text-align: center;
    white-space: nowrap;
}

.analyse-tab-content-wrapper tr:last-child td {
    border-bottom: none;
}

.analyse-tab-content-wrapper tr:hover {
    background-color: #E3F2FD;
}

/* On s'assure que la colonne "Nom" reste à gauche */
.analyse-tab-content-wrapper td:nth-child(2) {
    text-align: left;
    font-weight: 500;
}


/* ===========================
   CLASSEMENT DU MOIS
   =========================== */
.classement-section {
    margin-top: 40px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.classement-section h2 {
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--dash-bleu-nuit);
}

.table-classement {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.table-classement th, 
.table-classement td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.table-classement th {
    background: var(--dash-bleu-nuit);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}

.table-classement tr:nth-child(even) {
    background: #f9f9f9;
}

.table-classement tr:hover {
    background: #f1f7ff;
}

.voir-tout {
    margin-top: 12px;
    text-align: right;
}

.voir-tout a {
    color: var(--dash-bleu-nuit);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.voir-tout a:hover {
    color: var(--dash-bleu-moyen);
}

/* Mise en valeur TOP 3 */
.table-classement tr.gold td {
    font-weight: 700;
    color: #d4af37; /* or */
    background: #fffbea;
}

.table-classement tr.silver td {
    font-weight: 700;
    color: #c0c0c0; /* argent */
    background: #f9f9f9;
}

.table-classement tr.bronze td {
    font-weight: 700;
    color: #cd7f32; /* bronze */
    background: #fff8f0;
}

/* Lien pseudo dans le classement */
.table-classement .link-pseudo {
    color: var(--dash-bleu-nuit);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-classement .link-pseudo:hover {
    color: var(--dash-bleu-moyen);
    text-decoration: underline;
}




/* Carte vidéo TV */
.video-card {
    background: #111;
    color: #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Wrapper pour bien centrer la vidéo */
.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
}

/* Video.js custom skin */
.video-js {
    font-size: 1rem;
    color: #fff;
}

/* Bouton lecture centré */
.vjs-big-play-button {
    background-color: rgba(0,0,0,0.6) !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    width: 80px !important;
    height: 80px !important;
    font-size: 2rem !important;
    transition: transform 0.2s ease;
}
.vjs-big-play-button:hover {
    transform: scale(1.1);
    background-color: rgba(255,255,255,0.2) !important;
}

.video-card {
    background: #111;
    color: #eee;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
}

.video-wrapper video,
.video-wrapper .video-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.casaque-img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.desktop-only { display: table-cell; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; font-size: 0.9em; color: #555; }
}

/* ==========================
   ONGLET PRONOSTICS / CLASSEMENT
   ========================== */
.classement-tabs {
  margin-top: 20px;
}

.classement-tabs .tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 2px solid var(--bordure);
  margin-bottom: 20px;
  list-style: none;
  padding: 0;
}

.classement-tabs .tabs-nav li {
  margin: 0;
}

.classement-tabs .tabs-nav a {
  display: block;
  padding: 10px 18px;
  background: var(--gris-acier);
  color: var(--bleu-moyen);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px 6px 0 0;
  transition: all 0.3s;
}

.classement-tabs .tabs-nav a:hover {
  background: var(--bleu-moyen);
  color: #fff;
}

.classement-tabs .tabs-nav a.active {
  background: var(--bleu-nuit);
  color: #fff;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1) inset;
}

.classement-tabs .tab-content {
  display: none;
}

.classement-tabs .tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================
   TABLEAU DE CLASSEMENT
   ========================== */
.table-classement {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 10px;
}

.table-classement th {
  background: var(--bleu-nuit);
  color: #fff;
  font-weight: 600;
  padding: 12px;
  text-align: center;
}

.table-classement td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid var(--bordure);
}

.table-classement tbody tr:nth-child(even) {
  background-color: var(--gris-acier);
}

.table-classement tbody tr:hover {
  background-color: #E3F2FD;
}

/* TOP 3 en couleur */
.table-classement tr.gold td {
  font-weight: 700;
  color: #d4af37;
  background: #fffbea;
}
.table-classement tr.silver td {
  font-weight: 700;
  color: #c0c0c0;
  background: #f9f9f9;
}
.table-classement tr.bronze td {
  font-weight: 700;
  color: #cd7f32;
  background: #fff8f0;
}

/* ==========================
   TABLEAU DES PRONOSTICS PRESSE
   ========================== */
.pronostics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pronostics-table thead {
  background: var(--bleu-nuit);
  color: #fff;
}

.pronostics-table th {
  padding: 12px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

.pronostics-table th:first-child {
  text-align: left;
}

.pronostics-table td {
  padding: 10px;
  border-bottom: 1px solid var(--bordure);
  text-align: center;
}

.pronostics-table tbody tr:nth-child(even) {
  background-color: var(--gris-acier);
}

.pronostics-table tbody tr:hover {
  background-color: #E3F2FD;
}

.pronostics-table .source-cell {
  font-weight: 600;
  color: var(--bleu-moyen);
  text-align: left;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 768px) {
  .classement-tabs .tabs-nav {
    flex-direction: column;
    border-bottom: none;
  }
  .classement-tabs .tabs-nav a {
    border-radius: 6px;
  }

  .table-classement th,
  .table-classement td,
  .pronostics-table th,
  .pronostics-table td {
    padding: 8px;
    font-size: 13px;
  }
}

/* --- Onglets de navigation (Jour / Mois / Année / Source) --- */
.date-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.date-selector a {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--gris-acier);
  color: var(--bleu-moyen);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s;
}

.date-selector a:hover {
  background: var(--bleu-moyen);
  color: white;
}

.date-selector a.active {
  background: var(--bleu-nuit);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Bouton "Afficher" --- */
.date-selector button {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--vert-turf);
  color: white;
  transition: background 0.2s ease;
}

.date-selector button:hover {
  background: var(--vert-fonce);
}

/* --- Carte infos course (titre + arrivée) --- */
.course-info-card {
  background: #fafafa;
  padding: 15px;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 15px;
}

.course-info-card strong {
  color: var(--bleu-nuit);
}

/* --- Scores en couleur --- */
.score-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
}

.badge-high { background: #2ecc71; color: white; }   /* Vert */
.badge-medium { background: #f39c12; color: white; } /* Orange */
.badge-low { background: #e74c3c; color: white; }    /* Rouge */

/* --- Onglets de navigation --- */
.date-selector a {
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--gris-acier);
  color: var(--bleu-moyen);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.date-selector a:hover {
  background: var(--bleu-moyen);
  color: #fff;
}

.date-selector a.active {
  background: var(--bleu-nuit);
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* --- Bouton afficher --- */
.date-selector button {
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  background: var(--vert-turf);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.date-selector button:hover {
  background: var(--vert-fonce);
}

/* --- Carte infos course --- */
.course-info-card {
  background: #fff;
  padding: 15px;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* --- Score badges --- */
.score-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  min-width: 60px;
  text-align: center;
}

.badge-high   { background: #2ecc71; color: white; }
.badge-medium { background: #f39c12; color: white; }
.badge-low    { background: #e74c3c; color: white; }
.badge-none   { background: #bdc3c7; color: white; }

/* --- Tableau classement --- */
.users-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}
/*//////////////////
/* ===== Onglets (Pronostics & Classement, Jour/Mois/Année/Source) ===== */
.date-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.date-selector li {
    margin: 0;
}

.date-selector a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #444;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
}

.date-selector a:hover {
    background-color: #eee;
    border-color: #bbb;
    color: #000;
}

.date-selector a.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: 600;
}

/* Formulaires des filtres (date / mois / année / source) */
.date-selector input[type="date"],
.date-selector input[type="month"],
.date-selector input[type="number"],
.date-selector select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.date-selector button {
    padding: 7px 14px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.date-selector button:hover {
    background-color: #0056b3;
}

/* Uniformiser les onglets */
.date-selector {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.date-selector li a {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9fafb;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.date-selector li a:hover {
    background: #eef2f7;
    border-color: #ccc;
}

.date-selector li a.active {
    background: #2563eb; /* bleu */
    color: #fff;
    border-color: #2563eb;
}

/* Tableaux pour Classement */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.users-table thead th {
    background: #1f2937; /* gris foncé comme Pronostics */
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #ddd;
}

.users-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* Numéros stylés */
.num {
    display: inline-block;
    padding: 4px 7px;
    margin: 2px;
    border-radius: 4px;
    background: #f3f4f6;
    font-weight: 600;
}

.num.vert {
    background: #16a34a;
    color: #fff;
}

/* Scores badges */
.score-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge-high {
    background: #16a34a;
    color: #fff;
}
.badge-medium {
    background: #fbbf24;
    color: #fff;
}
.badge-low {
    background: #ef4444;
    color: #fff;
}

/****************************
/* ==========================
   ONGLETS JOUR / MOIS / ANNÉE / SOURCE
   ========================== */
.date-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  list-style: none;
  padding: 0;
}

.date-selector a {
  padding: 7px 14px;
  border: 1px solid var(--bordure);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--bleu-moyen);
  background: var(--gris-acier);
  transition: all 0.25s ease;
}

.date-selector a:hover {
  background: var(--bleu-moyen);
  color: white;
}

.date-selector a.active {
  background: var(--bleu-nuit);
  border-color: var(--bleu-nuit);
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.date-selector button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  background: var(--vert-turf);
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.date-selector button:hover {
  background: var(--vert-fonce);
}

/* ==========================
   TABLEAU CLASSEMENT
   ========================== */
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 10px;
}

.users-table thead th {
  background: var(--bleu-nuit);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 10px;
}

.users-table tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--bordure);
}

.users-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.users-table tbody tr:hover {
  background-color: #E3F2FD;
}

/* ==========================
   NUMÉROS PRONOS
   ========================== */
.num {
  display: inline-block;
  padding: 4px 7px;
  margin: 2px;
  border-radius: 4px;
  background: #f3f4f6;
  font-weight: 600;
}

.num.vert {
  background: var(--vert-turf);
  color: white;
}

/* ==========================
   SCORE BADGES
   ========================== */
.score-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  min-width: 60px;
}

.badge-high   { background: #2ecc71; color: white; }
.badge-medium { background: #f39c12; color: white; }
.badge-low    { background: #e74c3c; color: white; }
.badge-none   { background: #bdc3c7; color: white; }

/* ==========================
   votes
  ========================== */


.comment-votes {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 5px;
}
.comment-votes button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
}
.reply-form {
    margin-top: 8px;
}
.reply-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 6px;
}
.reply-form button {
    padding: 6px 12px;
    background: #007bff;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}
.reply-form button:hover {
    background: #0056b3;
}


/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: #1B263B;
  color: #fff;
  margin-top: 40px;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 20px;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-col p {
  color: #ccc;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.footer-socials a {
  color: white;
  font-size: 18px;
  transition: transform 0.2s, opacity 0.2s;
}

.footer-socials a:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

.footer-newsletter {
  display: flex;
  gap: 8px;
}

.footer-newsletter input {
  flex: 1;
  padding: 8px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
}

.footer-newsletter button {
  background: #f59e0b;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}

.footer-newsletter button:hover {
  background: #d97706;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #aaa;
}

.footer-bottom a {
  color: #aaa;
  margin: 0 5px;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #fff;
}

.ia-top3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 15px;
}
.ia-top-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.rank-badge {
    background: #2563eb;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ia-horse-info { text-align: left; font-size: 0.9rem; }
.ia-score {
    font-weight: 700;
    color: #16a34a;
    font-size: 1rem;
}






.race-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    justify-content: center;
}

.action-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    font-size: 14px;
}

.action-btn.pronostics { background-color: #2563eb; }
.action-btn.synthese { background-color: #9333ea; }
.action-btn.ia { background-color: #f97316; }
.action-btn.analyse { background-color: #16a34a; }
.action-btn.resultats { background-color: #dc2626; }

.action-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: 0.2s ease-in-out;
}

/* ==========================
   PAGE PRONOSTIC - AMÉLIORATION VISUELLE
   ========================== */

/* Titres des sections */
.main-content h1 {
  font-size: 26px;
  color: var(--bleu-nuit);
  border-bottom: 2px solid var(--bordure);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 20px;
  color: var(--bleu-moyen);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Cartes des chevaux */
.partant-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
}
.partant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}
.partant-card.is-np {
  background-color: #fef2f2;
  opacity: 0.7;
  border-color: #fca5a5;
}
.partant-header {
  background: var(--gris-acier);
  border-bottom: 1px solid var(--bordure);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.partant-num {
  width: 32px;
  height: 32px;
  background: var(--bleu-nuit);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
}
.partant-nom {
  font-weight: 600;
  color: var(--bleu-nuit);
  flex-grow: 1;
}
.np-tag {
  background: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
}

/* Détails sous le nom du cheval */
.partant-details {
  padding: 10px;
  font-size: 13px;
  color: var(--texte-secondaire);
  line-height: 1.4;
}

/* Formulaire de pronostic */
.pronostic-saisie-form {
  margin-top: 20px;
  background: #f9fafb;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  padding: 20px;
}
.pronostic-saisie-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
}
.input-group {
  flex: 1;
  min-width: 70px;
}
.input-group input {
  background: white;
  border: 1px solid var(--bordure);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  padding: 10px;
}
.input-group input:focus {
  outline: none;
  border-color: var(--bleu-nuit);
  box-shadow: 0 0 0 3px rgba(27, 38, 59, 0.1);
}
.submit-btn {
  background-color: var(--vert-turf);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 12px 25px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.submit-btn:hover {
  background-color: var(--vert-fonce);
  transform: translateY(-2px);
}

/* Messages */
.form-message {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.form-message.success i {
  color: #16a34a;
}
.form-message.error i {
  color: #dc2626;
}
.form-message.warning i {
  color: #d97706;
}

/* ==========================
   📱 RESPONSIVE (max-width: 768px)
   ========================== */
@media (max-width: 768px) {
    
    /* Ajustement du conteneur principal */
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .main-content {
        width: 100%;
    }

    /* Titres */
    h1 {
        font-size: 22px;
        text-align: center;
    }

    h2 {
        font-size: 18px;
        text-align: center;
    }

    /* Grille des partants */
    .partants-pronostic-grid {
        grid-template-columns: 1fr; /* 1 cheval par ligne */
        gap: 12px;
    }

    .partant-card {
        border-radius: 10px;
        overflow: hidden;
    }

    .partant-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }

    .partant-num {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .partant-nom {
        font-size: 15px;
        font-weight: 600;
    }

    .partant-details {
        font-size: 13px;
        text-align: center;
        line-height: 1.4;
    }

    /* Formulaire CH1 à CH8 */
    .pronostic-saisie-wrapper {
        flex-direction: column; /* Empile les champs verticalement */
        align-items: stretch;
    }

    .input-group {
        width: 100%;
    }

    .input-group label {
        font-size: 13px;
        text-align: left;
        margin-bottom: 3px;
    }

    .input-group input {
        font-size: 16px;
        padding: 10px;
        max-width: 100%;
        width: 100%;
    }

    .pronostic-saisie-wrapper .submit-btn {
        width: 100%;
        height: auto;
        margin-top: 10px;
        font-size: 16px;
        padding: 12px;
    }

    /* Messages d'information */
    .form-message {
        font-size: 14px;
        padding: 10px;
        flex-direction: column;
        text-align: center;
    }

    /* Overlay connexion */
    .auth-message {
        width: 90%;
        padding: 25px;
    }

    .auth-message h2 {
        font-size: 18px;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 10px;
    }

    /* Sidebar repositionnée */
    .sidebar {
        width: 100%;
        order: 2;
    }

    .sidebar .card {
        margin-top: 15px;
    }
}

