/*
Theme Name: SangMeLima Évangélisation
Theme URI: https://sangmelima.org
Author: Xavier Soh
Author URI: https://xaviersoh.com
Description: Thème PWA pour application d'évangélisation avec ressources spirituelles, groupes de prière et dons
Version: 1.0.0
License: GPL v2 or later
Text Domain: sangmelima
*/

/* ========================================
   RESET & BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D4AF37;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #FFF8F0;
    --bg-white: #FFFFFF;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

/* Garde-fou : empêche tout débordement horizontal (bande blanche à droite sur mobile,
   footer qui ne prend pas toute la largeur, scroll latéral parasite). */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ========================================
   MOBILE FIRST LAYOUT
======================================== */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* ========================================
   HEADER & NAVIGATION
======================================== */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ========================================
   CARDS & COMPONENTS
======================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.prayer-card {
    border-left: 4px solid var(--secondary-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #7A3D0F;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary-color);
}

/* ========================================
   SKELETON LOADERS
======================================== */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% { background-color: #E2E5E7; }
    100% { background-color: #F0F3F5; }
}

.skeleton-text {
    width: 100%;
    height: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.skeleton-title {
    width: 60%;
    height: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* ========================================
   LECTURES AELF
======================================== */
.daily-content-body {
    padding: 15px 0;
    min-height: 120px;
}

.daily-content-body h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.daily-content-body .reference {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.lecture-content {
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 0.95rem;
    text-align: justify;
}

.info-text {
    color: var(--text-light);
    font-style: italic;
}

.date-liturgique {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Sélecteur de date AELF */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.card-header h3 {
    margin: 0;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.aelf-date-input {
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.btn-icon:hover {
    transform: rotate(360deg);
    background: var(--secondary-color);
}

.card-footer {
    margin-top: 15px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }

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

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Sélecteur de date sur mobile */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .date-selector {
        width: 100%;
        justify-content: flex-end;
    }

    .aelf-date-input {
        flex: 1;
        max-width: calc(100% - 40px);
    }
}

/* ========================================
   PWA SPECIFIC
======================================== */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    display: none;
    z-index: 9999;
}

.offline-indicator {
    background: #FFA500;
    color: white;
    padding: 10px;
    text-align: center;
    display: none;
}

body.offline .offline-indicator {
    display: block;
}