/**
 * resultats-page.css
 * Styles sp�cifiques aux pages d'archive/r�sultats
 * (resultats-loto, resultats-euromillions, etc.)
 * 
 * Note: Les composants r�utilisables sont dans components.css
 * Emplacement: css/resultats-page.css
 */

/* ============================================
   LAYOUT PAGE R�SULTATS
   ============================================ */
.resultats-page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: calc(1300px + 4rem);
    margin: 0 auto;
    padding: 20px 2rem;
    position: relative;
    z-index: 1; /* S'assurer que le contenu passe sous le menu */
}

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

.resultats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   HEADER PAGE
   ============================================ */
.resultats-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1; /* Sous le menu */
}

.resultats-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px 0;
}

.resultats-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* ============================================
   HERO TIRAGE (Dernier tirage mis en avant)
   ============================================ */
.hero-tirage {
    margin-bottom: 40px;
}

.hero-tirage-card {
    border-radius: 20px;
    padding: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Couleurs par jeu */
.hero-tirage-card.loto,
.hero-tirage-card:not([class*="euromillions"]):not([class*="eurodreams"]):not([class*="keno"]):not([class*="crescendo"]) {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.hero-tirage-card.euromillions {
    background: linear-gradient(135deg, #ca8a04 0%, #facc15 100%);
    color: #1e293b;
}

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

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

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

.hero-tirage-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.hero-date {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 25px 0;
}

.hero-numbers {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.hero-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.hero-balls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-balls .ball {
    width: 52px;
    height: 52px;
    font-size: 22px;
}

.hero-balls .ball-separator {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.7;
}

.hero-joker {
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.hero-joker .joker-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.hero-joker .joker-code {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    background: none;
    padding: 0;
    box-shadow: none;
}

/* Header section hero avec bouton gains */
.hero-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.hero-section-header .hero-label {
    margin: 0;
}

/* Bouton "Voir le rapport des gains" */
.btn-voir-gains {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-voir-gains:hover {
    background: rgba(255,255,255,0.3);
}

.gains-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

/* Panel des gains dans le Hero */
.hero-gains-panel {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tableau des gains Hero */
.gains-table-hero {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #1e293b;
}

.gains-table-hero th {
    text-align: left;
    padding: 10px 12px;
    background: #e2e8f0;
    font-weight: 600;
    color: #475569;
}

.gains-table-hero th:first-child {
    border-radius: 6px 0 0 6px;
}

.gains-table-hero th:last-child {
    border-radius: 0 6px 6px 0;
    text-align: right;
}

.gains-table-hero td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.gains-table-hero td:last-child {
    text-align: right;
    font-weight: 600;
}

.gains-table-hero tr:last-child td {
    border-bottom: none;
}

.gains-table-hero .jackpot-row {
    background: linear-gradient(90deg, #fef3c7 0%, #fef9c3 100%);
}

.gains-table-hero .jackpot {
    color: #b45309;
    font-weight: 700;
}

.no-gains-msg {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 10px;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-hero-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-hero-action.primary {
    background: #fff;
    color: #1e40af;
}

.btn-hero-action.primary:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.btn-hero-action.secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-hero-action.secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 20px;
}

/* ============================================
   TITRE ARCHIVE
   ============================================ */
.archive-title {
    font-size: 22px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

/* ============================================
   ACCORD�ON
   ============================================ */
.tirages-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.accordion-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.accordion-item.open {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    gap: 20px;
}

.accordion-date {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.date-jour {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.date-full {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
}

.accordion-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.accordion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.accordion-toggle:hover {
    background: #e2e8f0;
}

.accordion-item.open .accordion-toggle {
    background: #dbeafe;
    color: #1e40af;
}

.toggle-text {
    display: inline;
}

.toggle-icon {
    font-size: 10px;
    transition: transform 0.3s;
}

.accordion-item.open .toggle-icon {
    transform: rotate(180deg);
}

/* Contenu accord�on */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.open .accordion-content {
    max-height: 1000px;
}

.accordion-body {
    padding: 0 20px 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0 0 10px 0;
}

.detail-balls {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Section gains dans accord�on */
.gains-section {
    background: #f8fafc;
    margin: 0 -20px;
    padding: 20px;
}

/* Onglets 1er/2nd tirage */
.gains-tabs-mini {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.gains-tab-mini {
    padding: 8px 16px;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.gains-tab-mini:hover {
    background: #cbd5e1;
}

.gains-tab-mini.active {
    background: #1e40af;
    color: #fff;
}

.gains-panel-mini {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Actions dans accord�on */
.detail-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #f1f5f9;
    color: #1e40af;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: #dbeafe;
    transform: translateX(4px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .resultats-page-container {
        grid-template-columns: 1fr;
    }
    
    .resultats-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .resultats-page-container {
        padding: 15px;
    }
    
    .resultats-header h1 {
        font-size: 26px;
    }
    
    .hero-tirage-card {
        padding: 20px;
    }
    
    .hero-date {
        font-size: 22px;
    }
    
    .hero-balls .ball {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .hero-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-voir-gains {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn-hero-action {
        justify-content: center;
    }
    
    .accordion-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .accordion-date {
        min-width: auto;
        flex: 1;
    }
    
    .accordion-numbers {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .accordion-toggle {
        margin-left: auto;
    }
    
    .toggle-text {
        display: none;
    }
    
    .gains-tabs-mini {
        flex-direction: column;
        gap: 6px;
    }
    
    .gains-tab-mini {
        text-align: center;
    }
    
    .resultats-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .accordion-numbers .mini-ball {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}