/* --- SECTION HORAIRES DE PRIÈRE --- */

/* Conteneur principal "Aujourd'hui" (Optionnel si tu gardes le dégradé) */
.prayer-today-container {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c3e50 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius-card);
    margin-bottom: 40px;
}

/* Grille adaptative */
.prayer-grid {
    display: grid;
    /* Gère automatiquement le nombre de colonnes selon la largeur */
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); 
    gap: 15px;
}

/* Carte de prière individuelle */
.prayer-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #eeeeee);
    padding: 20px 10px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

/* Version "Hors container" (si tes cartes sont sur fond blanc) */
.light-mode .prayer-card {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}

/* État Actif / Prochaine prière */
.prayer-card.active {
    background: var(--secondary-color);
    border-color: var(--tertiary-orange);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    color: white;
}


.prayer-card.active .next-label{
    background-color: var(--tertiary-orange);
}


/* Typographie à l'intérieur des cartes */
.prayer-card .name {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0.8;
    font-weight: 600;
}

.prayer-card .time {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

/* Badge "Prochaine" */
.next-label {
    display: inline-block;
    margin-top: 10px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- TABLEAU MENSUEL --- */

/* Style général du tableau mensuel */
.table.table-hover {
    border-collapse: separate;
    border-spacing: 0;
}

/* En-tête : centré et stylisé */
.table thead th {
    background-color: #f8f9fa;
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
    color: var(--secondary-color, #2c3e50);
    border-bottom: 2px solid #dee2e6;
    padding: 12px 8px;
    white-space: nowrap;
}

/* Cellules du corps */
.table tbody td {
    text-align: center;
    vertical-align: middle;
    padding: 10px 8px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f2f2f2;
}

/* Colonnes des dates (Première et Dernière) */
/* On aligne à gauche pour la date FR et à droite pour la date AR */
.table tbody td:first-child, 
.table tbody td:last-child {
    font-size: 0.8rem;
    line-height: 1.4;
    min-width: 130px;
    background-color: rgba(248, 249, 250, 0.5);
}

/* Mise en évidence de la ligne "Aujourd'hui" */
.table tr.table-primary {
    background-color: rgba(var(--primary-rgb, 44, 62, 80), 0.08) !important;
    border-left: 4px solid var(--tertiary-orange, #ff9800);
}

.table tr.table-primary td {
    color: var(--secondary-color, #2c3e50);
    font-weight: 700;
}

/* Heures : Utilisation de polices à largeur fixe pour un alignement parfait */
.table tbody td:not(:first-child):not(:last-child) {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Gestion du Responsive (Crucial pour 8 colonnes) */
@media (max-width: 992px) {
    .table-responsive {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    
    /* On réduit un peu la taille de police sur tablette/mobile */
    .table thead th, .table tbody td {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
}

/* --- RESPONSIVE --- */

@media (max-width: 576px) {
    .prayer-grid {
        /* 2 colonnes minimum sur très petit mobile */
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .prayer-card .time {
        font-size: 1.25rem;
    }
    
    .prayer-today-container {
        padding: 20px 15px;
    }
}