/**
 * components.css
 * Composants r�utilisables sur toutes les pages loteries
 * Emplacement: css/components.css
 */

/* ============================================
   CONTAINER
   ============================================ */
.container {
    max-width: calc(1300px + 4rem);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   FIL D'ARIANE (BREADCRUMB)
   ============================================ */
.breadcrumb-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
    margin-bottom: 0;
    position: relative;
    z-index: 1; /* Sous le menu dropdown */
}

.breadcrumb-nav > .container {
    max-width: calc(1300px + 4rem);
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '\203A';
    margin: 0 10px;
    color: #6c757d;
    font-size: 16px;
    font-weight: 400;
}

.breadcrumb-item a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: #6c757d;
}

/* ============================================
   BOULES - TOUTES TAILLES
   ============================================ */

/* Boules standard (pages tirage) */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Boules bleues - Tirage principal Loto */
.ball.loto-blue {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
    border: 3px solid #1e40af;
}

/* Boule rouge - Num�ro Chance */
.ball.loto-red {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 50%, #b91c1c 100%);
    border: 3px solid #991b1b;
}

/* Boules violettes - Second tirage */
.ball.loto-purple {
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 50%, #6d28d9 100%);
    border: 3px solid #5b21b6;
}

/* Boules EuroMillions */
.ball.euro-yellow {
    background: linear-gradient(180deg, #fde047 0%, #facc15 50%, #eab308 100%);
    border: 3px solid #ca8a04;
    color: #1e293b;
}

.ball.euro-star {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 50%, #475569 100%);
    border: 3px solid #334155;
}

/* Mini boules (tableaux, accord�ons) */
.mini-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.mini-ball.blue {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%);
    border: 2px solid #1e40af;
}

.mini-ball.red {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 50%, #b91c1c 100%);
    border: 2px solid #991b1b;
}

.mini-ball.purple {
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 50%, #6d28d9 100%);
    border: 2px solid #5b21b6;
}

.mini-ball.yellow {
    background: linear-gradient(180deg, #fde047 0%, #facc15 50%, #eab308 100%);
    border: 2px solid #ca8a04;
    color: #1e293b;
}

/* S�parateur entre boules */
.ball-separator {
    font-size: 20px;
    font-weight: bold;
    color: #64748b;
}

/* L�gende des boules */
.numbers-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 13px;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-dot.blue { background: #2563eb; }
.legend-dot.red { background: #dc2626; }
.legend-dot.purple { background: #7c3aed; }
.legend-dot.yellow { background: #facc15; }

/* ============================================
   BADGES
   ============================================ */
.tirage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.tirage-badge.second {
    background: #7c3aed;
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.widget-header {
    padding: 14px 16px;
    color: #fff;
}

.widget-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

/* Couleurs des widgets */
.widget-header.loto {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

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

.widget-header.jackpot {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.widget-header.tools {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.widget-header.other {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.widget-body {
    padding: 16px;
}

.widget-body p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #64748b;
}

/* Boutons widgets */
.btn-widget-cta {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-widget-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-widget-cta.loto {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

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

.btn-widget-link {
    display: block;
    color: #1e40af;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.btn-widget-link:hover {
    text-decoration: underline;
}

/* Jackpot widget */
.jackpot-amount {
    font-size: 28px;
    font-weight: 700;
    color: #b45309;
    margin-bottom: 5px;
}

.jackpot-subtext {
    font-size: 13px !important;
    color: #94a3b8 !important;
}

/* Listes widgets */
.tools-list,
.other-games-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tools-list li {
    margin-bottom: 8px;
}

.tools-list li:last-child {
    margin-bottom: 0;
}

.tools-list a {
    display: block;
    padding: 10px 12px;
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.tools-list a:hover {
    background: #e2e8f0;
    color: #1e40af;
}

.other-games-list li {
    border-bottom: 1px solid #e2e8f0;
}

.other-games-list li:last-child {
    border-bottom: none;
}

.other-games-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: #1e3a5f;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.other-games-list a:hover {
    color: #1e40af;
}

.other-games-list a:hover .game-arrow {
    transform: translateX(4px);
}

.game-name {
    font-weight: 500;
}

.game-arrow {
    color: #94a3b8;
    transition: transform 0.2s;
}

/* Widget publicit� */
.widget-ad {
    background: #f1f5f9;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    color: #94a3b8;
    font-size: 13px;
}

/* ============================================
   TABLEAUX DE GAINS
   ============================================ */
.gains-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gains-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f1f5f9;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}

.gains-table th:last-child {
    text-align: right;
}

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

.gains-table td:last-child {
    text-align: right;
}

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

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

.gains-table .jackpot-row td {
    border-bottom-color: #fcd34d;
}

.gains-table .jackpot {
    color: #b45309;
    font-weight: 700;
    font-size: 16px;
}

.gagnants-cell {
    font-weight: 500;
    color: #1e3a5f;
}

.gains-cell {
    font-weight: 600;
    color: #059669;
}

/* Mini tableau (accord�on) */
.gains-table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

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

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

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

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

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

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

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

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

/* Combo boules dans tableaux */
.combo-balls {
    display: inline-flex;
    gap: 3px;
    margin-right: 10px;
    vertical-align: middle;
}

.combo-balls .mini-ball {
    width: 20px;
    height: 20px;
    font-size: 10px;
    border-width: 1px;
}

.combo-label {
    vertical-align: middle;
}

/* ============================================
   ONGLETS (TABS)
   ============================================ */
.gains-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e2e8f0;
}

.gains-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.gains-tab:hover {
    color: #1e40af;
}

.gains-tab.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

/* ============================================
   BOUTONS
   ============================================ */

/* Bouton calculer */
.btn-calculer-gains {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    color: #1e293b;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-calculer-gains:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

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

/* Bouton CTA jouer */
.btn-cta-play {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-cta-play.loto {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

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

.btn-cta-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.cta-content strong {
    display: block;
    font-size: 16px;
}

.cta-content small {
    font-size: 13px;
    opacity: 0.9;
}

.cta-arrow {
    font-size: 24px;
}

/* Bouton voir plus */
.btn-voir-plus {
    display: inline-flex;
    padding: 10px 20px;
    background: #f1f5f9;
    color: #1e40af;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-voir-plus:hover {
    background: #e2e8f0;
}

/* ============================================
   JOKER+
   ============================================ */
.joker-logo {
    height: 32px;
    width: auto;
}

.joker-logo-text {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.joker-code {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 6px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.3);
}

.joker-code-small {
    display: inline-block;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-nav {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    flex-wrap: wrap;
}

.page-item {
    display: flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-color: #1e40af;
    color: #fff;
}

.page-item.ellipsis span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #94a3b8;
}

.page-link.prev,
.page-link.next {
    padding: 0 16px;
    font-weight: 600;
}

.pagination-info {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title-page {
    font-size: 20px;
    font-weight: 600;
    color: #1e3a5f;
    margin: 0 0 20px 0;
}

/* ============================================
   RESPONSIVE COMPONENTS
   ============================================ */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 12px;
    }
    
    .ball {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .mini-ball {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .gains-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 8px;
    }
    
    .gains-tab {
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 0;
    }
    
    .gains-tab.active {
        background: #1e40af;
        color: #fff;
        border-color: #1e40af;
    }
    
    .gains-table th,
    .gains-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .combo-balls {
        display: none;
    }
    
    .btn-calculer-gains {
        width: 100%;
        justify-content: center;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .page-link.prev,
    .page-link.next {
        padding: 0 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ball {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .joker-code {
        font-size: 22px;
        padding: 12px 24px;
        letter-spacing: 4px;
    }
}