/**
 * tirage-page.css
 * Styles sp�cifiques aux pages de tirage individuel
 * (Loto, EuroMillions, EuroDreams, Keno, Crescendo)
 * 
 * Note: Les composants r�utilisables sont dans components.css
 * Emplacement: css/tirage-page.css
 */

/* ============================================
   LAYOUT PAGE TIRAGE
   ============================================ */
.tirage-page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: calc(1300px + 4rem);
    margin: 0 auto;
    padding: 20px 2rem;
}

.tirage-main {
    min-width: 0;
}

.tirage-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   NAVIGATION ENTRE TIRAGES
   ============================================ */
.tirage-navigation {
    margin-bottom: 20px;
    padding-top: 20px;
}

.tirage-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tirage-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #1e293b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    max-width: 220px;
}

.tirage-nav-btn:hover:not(.disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.tirage-nav-btn.prev {
    justify-content: flex-start;
}

.tirage-nav-btn.next {
    justify-content: flex-end;
    text-align: right;
}

.tirage-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-arrow {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    flex-shrink: 0;
}

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Selects Ann�e et Tirage */
.tirage-nav-selects {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-annee,
.select-tirage {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.select-annee {
    width: 100px;
}

.select-tirage {
    min-width: 200px;
}

.select-annee:focus,
.select-tirage:focus {
    outline: none;
    border-color: #2563eb;
}

/* ============================================
   CARTE R�SULTATS
   ============================================ */
.tirage-results-section {
    margin-bottom: 30px;
}

.tirage-results-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Headers color�s par jeu */
.tirage-results-card.loto .tirage-results-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.tirage-results-card.euromillions .tirage-results-header {
    background: linear-gradient(135deg, #ca8a04 0%, #facc15 100%);
}

.tirage-results-card.eurodreams .tirage-results-header {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
}

.tirage-results-card.keno .tirage-results-header {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
}

.tirage-results-card.crescendo .tirage-results-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.tirage-results-header {
    padding: 24px;
    text-align: center;
}

.tirage-h1 {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.tirage-results-body {
    padding: 24px;
}

/* Sections dans la carte */
.tirage-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.tirage-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tirage-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.tirage-numbers {
    text-align: center;
}

.numbers-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tirage-actions {
    margin-top: 20px;
    text-align: center;
}

/* CTA box */
.tirage-cta-box {
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   JOKER SECTION
   ============================================ */
.joker-section {
    background: #fef2f2;
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
    border: none !important;
}

.joker-section .tirage-section-title {
    justify-content: center;
}

.joker-number {
    text-align: center;
    margin-top: 12px;
}

/* ============================================
   VID�O YOUTUBE
   ============================================ */
.tirage-video-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   SECTION GAINS
   ============================================ */
.tirage-gains-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gains-content {
    margin-top: 20px;
}

.gains-table-wrapper {
    overflow-x: auto;
}

.no-data-message {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-style: italic;
}

/* ============================================
   CODES LOTO
   ============================================ */
.tirage-codes-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.codes-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 15px;
    color: #64748b;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.code-item {
    padding: 12px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    letter-spacing: 1px;
}

/* ============================================
   CTA INTERM�DIAIRE
   ============================================ */
.cta-intermediate {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
}

.cta-intermediate-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cta-text {
    color: #fff;
}

.cta-text h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
}

.cta-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.btn-cta-intermediate {
    display: inline-flex;
    padding: 14px 28px;
    background: #fff;
    color: #1e3a5f;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cta-intermediate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   ARTICLE
   ============================================ */
.tirage-article-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tirage-article h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
}

.tirage-article h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 20px 0 10px 0;
}

.article-content {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

.article-content p {
    margin: 0 0 14px 0;
}

/* ============================================
   TIRAGES R�CENTS
   ============================================ */
.tirage-recents-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tirages-recents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.tirage-recent-card {
    display: block;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.tirage-recent-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.recent-card-header {
    margin-bottom: 10px;
}

.recent-date {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.recent-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.voir-plus-container {
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .tirage-page-container {
        grid-template-columns: 1fr;
    }
    
    .tirage-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .sidebar-widget.widget-ad {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .tirage-page-container {
        padding: 15px;
    }
    
    .tirage-nav-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .tirage-nav-btn {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
    
    .tirage-nav-selects {
        width: 100%;
        flex-direction: column;
    }
    
    .select-annee,
    .select-tirage {
        width: 100%;
    }
    
    .tirage-h1 {
        font-size: 20px;
    }
    
    .codes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tirages-recents-grid {
        grid-template-columns: 1fr;
    }
    
    .tirage-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-widget.widget-ad {
        grid-column: span 1;
    }
    
    .cta-intermediate-content {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-cta-intermediate {
        width: 100%;
        justify-content: center;
    }
    
    .video-container {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .numbers-row {
        gap: 6px;
    }
    
    .codes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .code-item {
        font-size: 12px;
        padding: 10px 8px;
    }
}