/**
 * Styles pour le Compteur de Mantras Tchenrézi
 * Design accordé au site CEBTG (cebtg.ch)
 * Palette : tons ocre, marron, beige
 */

/* ═══════════════════════════════════════════════════════════════
   POLICE TIBÉTAINE
   ═══════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Monlam Uni OuChan2';
    src: url('fonts/Monlam Uni OuChan2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Container principal */
.compteur-mantra-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* En-tête */
.mantra-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #DEB887;
}

.mantra-title {
    font-size: 2rem;
    color: #8B4513;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.mantra-subtitle {
    font-size: 1.8rem;
    color: #A0522D;
    margin: 0;
    font-weight: 400;
    font-family: 'Monlam Uni OuChan2', sans-serif;
    line-height: 1.4;
}

/* Statistiques principales */
.mantra-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.mantra-stat-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #F5DEB3 0%, #DEB887 100%);
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mantra-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2);
}

.mantra-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8B4513;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.mantra-stat-label {
    font-size: 1rem;
    color: #A0522D;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Objectif et barre de progression */
.mantra-objectif {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #FFF8DC;
    border-radius: 8px;
    border: 2px solid #DEB887;
}

.mantra-objectif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #8B4513;
}

.mantra-pourcentage {
    font-size: 1.25rem;
    color: #A0522D;
}

.mantra-progress-bar {
    height: 30px;
    background: #F5F5DC;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mantra-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #CD853F 0%, #D2691E 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
}

/* Section formulaire */
.mantra-form-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #FAFAF8;
    border-radius: 8px;
    border-left: 4px solid #CD853F;
}

.mantra-form-title {
    font-size: 1.5rem;
    color: #8B4513;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.mantra-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mantra-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mantra-form-group label {
    font-weight: 600;
    color: #5D4037;
    font-size: 0.95rem;
}

.mantra-input {
    padding: 0.75rem 1rem;
    border: 2px solid #DEB887;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.mantra-input:focus {
    outline: none;
    border-color: #CD853F;
    box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.1);
}

.mantra-form-help {
    font-size: 0.85rem;
    color: #8B4513;
    font-style: italic;
}

.mantra-email-memorise {
    padding: 0.75rem;
    background: #E8F5E9;
    border-radius: 6px;
    color: #2E7D32;
    font-size: 0.95rem;
    margin: 0;
}

.mantra-reset-link {
    color: #1976D2;
    text-decoration: underline;
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

.mantra-reset-link:hover {
    color: #1565C0;
}

.mantra-submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #CD853F 0%, #D2691E 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.3);
}

.mantra-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.4);
}

.mantra-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.mantra-message {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 500;
}

.mantra-message-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #81C784;
}

.mantra-message-error {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #E57373;
}

/* Dernières contributions */
.mantra-dernieres {
    margin: 2rem 0;
}

.mantra-dernieres-title {
    font-size: 1.5rem;
    color: #8B4513;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.mantra-dernieres-liste {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mantra-contribution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #FFF8DC;
    border-radius: 6px;
    border-left: 4px solid #CD853F;
    transition: background-color 0.2s ease;
}

.mantra-contribution-item:hover {
    background: #F5DEB3;
}

.mantra-contribution-participant {
    font-weight: 600;
    color: #8B4513;
    font-family: monospace;
    font-size: 0.95rem;
}

.mantra-contribution-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.mantra-contribution-nombre {
    font-weight: 600;
    color: #A0522D;
    font-size: 1rem;
}

.mantra-contribution-date {
    font-size: 0.85rem;
    color: #8B4513;
}

/* Footer */
.mantra-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #DEB887;
    text-align: center;
}

.mantra-footer p {
    color: #8B4513;
    font-style: italic;
    font-size: 0.95rem;
    margin: 0;
}

/* Erreur générale */
.mantra-error {
    padding: 1rem;
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #E57373;
    border-radius: 6px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .compteur-mantra-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .mantra-title {
        font-size: 1.5rem;
    }
    
    .mantra-subtitle {
        font-size: 1.4rem;
    }
    
    .mantra-stat-number {
        font-size: 2rem;
    }
    
    .mantra-stats {
        grid-template-columns: 1fr;
    }
    
    .mantra-objectif-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .mantra-contribution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mantra-contribution-details {
        align-items: flex-start;
    }
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.compteur-mantra-container {
    animation: fadeInUp 0.5s ease;
}

/* Impression */
@media print {
    .mantra-form-section {
        display: none;
    }
    
    .compteur-mantra-container {
        box-shadow: none;
    }
}