/* ============================================================================
   CEBTG – Compteur de Mantras Tchenrézi  |  style.css
   ============================================================================ */

/* ── Police tibétaine ──────────────────────────────────────────────────────── */
/* Fichier à placer dans : cebtg-compteur-mantra/fonts/Monlam Uni OuChan2.ttf  */
@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;
}

/* ── Conteneur principal ──────────────────────────────────────────────────── */
#cebtg-compteur-mantra {
    max-width: 640px;
    margin: 2rem auto;
    padding: 0;
    font-family: Georgia, 'Times New Roman', serif;
    color: #3a2a1a;
    line-height: 1.6;
}

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

.mantra-tibetan {
    font-family: 'Monlam Uni OuChan2', serif;
    font-size: 2.4rem;
    color: #8b5e2b;
    letter-spacing: .05em;
    margin-bottom: .6rem;
    line-height: 1.4;
}

.mantra-titre {
    font-size: 1.1rem;
    font-weight: normal;
    color: #5a3e1b;
    margin: 0;
}

/* ── Bloc total ───────────────────────────────────────────────────────────── */
.mantra-total-wrap {
    background: linear-gradient(135deg, #fdf6ec 0%, #f5e6cc 100%);
    border: 1px solid #c9a96e;
    border-radius: 8px;
    padding: 1.8rem 1.5rem 1.4rem;
    text-align: center;
    margin: 1.5rem 0;
}

.mantra-total-label {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #8b6a3a;
    margin-bottom: .4rem;
}

.mantra-total-number {
    font-size: 3rem;
    font-weight: bold;
    color: #6b3a0f;
    display: block;
    line-height: 1.1;
}

.mantra-contributions {
    font-size: .85rem;
    color: #8b7050;
    margin-top: .5rem;
}

/* Barre de progression */
.mantra-progress-wrap {
    margin-top: 1rem;
}

.mantra-progress-bar {
    height: 10px;
    background: #e8d5b0;
    border-radius: 5px;
    overflow: hidden;
}

.mantra-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b07a30, #d4a055);
    border-radius: 5px;
    transition: width .6s ease;
}

.mantra-progress-label {
    font-size: .78rem;
    color: #8b6a3a;
    margin-top: .4rem;
    text-align: right;
}

/* ── Formulaire ───────────────────────────────────────────────────────────── */
.mantra-form-wrap {
    background: #ffffff;
    border: 1px solid #d9c5a0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mantra-form-titre {
    font-size: 1rem;
    font-weight: bold;
    color: #5a3e1b;
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e8d5b0;
}

.mantra-field-wrap {
    margin-bottom: 1rem;
}

.mantra-label {
    display: block;
    font-size: .9rem;
    color: #5a3e1b;
    margin-bottom: .35rem;
}

.mantra-input {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid #c9a96e;
    border-radius: 5px;
    font-size: 1.1rem;
    color: #3a2a1a;
    background: #fffdf8;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.mantra-input:focus {
    outline: none;
    border-color: #8b5e2b;
    box-shadow: 0 0 0 3px rgba(139, 94, 43, .15);
}

/* Messages */
.mantra-message {
    display: none;
    padding: .7rem 1rem;
    border-radius: 5px;
    font-size: .9rem;
    margin-bottom: 1rem;
}

.mantra-message-success {
    background: #edf7ed;
    border: 1px solid #7ec47e;
    color: #2d5a2d;
}

.mantra-message-error {
    background: #fdf0ee;
    border: 1px solid #e0907a;
    color: #7a2010;
}

.mantra-message-info {
    background: #eef4fb;
    border: 1px solid #85b5d9;
    color: #1a3a5c;
}

/* Bouton */
.mantra-submit-btn {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, #8b5e2b, #a97030);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .03em;
    transition: opacity .2s, transform .1s;
}

.mantra-submit-btn:hover:not(:disabled) {
    opacity: .92;
}

.mantra-submit-btn:active:not(:disabled) {
    transform: scale(.99);
}

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

.mantra-confidentialite {
    font-size: .78rem;
    color: #9a8060;
    text-align: center;
    margin: .75rem 0 0;
}

/* ── Contributions récentes ───────────────────────────────────────────────── */
.mantra-recentes-wrap {
    border: 1px solid #d9c5a0;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
}

.mantra-recentes-titre {
    font-size: .95rem;
    font-weight: bold;
    color: #5a3e1b;
    margin: 0 0 .8rem;
}

.mantra-recentes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mantra-recente-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 0;
    border-bottom: 1px solid #f0e0c0;
    font-size: .88rem;
    flex-wrap: wrap;
}

.mantra-recente-item:last-child {
    border-bottom: none;
}

.mantra-recente-participant {
    color: #7a5520;
    font-family: monospace;
    font-size: .82rem;
    flex-shrink: 0;
}

.mantra-recente-nombre {
    font-weight: bold;
    color: #3a2a1a;
    margin-left: auto;
    flex-shrink: 0;
}

.mantra-recente-date {
    color: #9a8060;
    font-size: .78rem;
    margin-left: .5rem;
    flex-shrink: 0;
}

/* ── Pied ─────────────────────────────────────────────────────────────────── */
.mantra-footer {
    text-align: center;
    font-size: .85rem;
    color: #9a8060;
    padding: .5rem 0 1rem;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .mantra-tibetan      { font-size: 1.9rem; }
    .mantra-total-number { font-size: 2.2rem; }
    .mantra-recente-item { flex-direction: column; align-items: flex-start; }
    .mantra-recente-nombre { margin-left: 0; }
}
