/*
 Theme Name:   Astra Child — Météo Gimel
 Theme URI:    https://meteo.bussard.info
 Description:  Child theme Astra pour la station météo de Gimel
 Author:       bussard.info
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/


/* ══ VARIABLE ASTRA LARGEUR — forcer identique partout ══════════════════════ */
:root {
    --ast-content-width-size: 1200px;
}

/* ══ WRAPPER LARGEUR — source unique de vérité (override body.home Astra) ═══ */
/* .meteo-wrap est injecté par meteo_open() dans chaque template               */
/* Il contraint le contenu à 1200px quelle que soit la largeur du container    */
/* Astra parent — inutile de cibler .ast-container qui varie selon body.home   */
.meteo-wrap {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}


/* ══ FOND SAISONNIER ═════════════════════════════════════════════════════════ */
body { background: var(--bg, #e8f0f8) !important; }
.site-main, #main { padding: 0 !important; }
.meteo-main { padding: 24px 0; }

/* ══ CARTES ══════════════════════════════════════════════════════════════════ */
.card {
    background: #fff !important;
    border: 1px solid var(--border, #b8d880) !important;
    border-radius: 10px !important;
    padding: 20px 24px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    box-sizing: border-box !important;
}
.card__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--title, #0a2040) !important;
    margin: 0 0 14px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid var(--accent, #507898) !important;
}

/* ══ STATS GRILLE ════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 14px !important;
}
.stat-item {
    background: var(--bg, #e8f0f8) !important;
    border: 1px solid var(--border, #b8d880) !important;
    border-radius: 8px !important;
    padding: 14px 10px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
.stat-item__val  { font-size: 26px !important; font-weight: 700 !important; color: var(--title) !important; line-height: 1.1 !important; display: block !important; }
.stat-item__unit { font-size: 13px !important; color: var(--text-muted) !important; font-weight: 400 !important; }
.stat-item__lbl  { font-size: 11px !important; color: var(--text-muted) !important; margin-top: 4px !important; display: block !important; }

/* ══ BOUTONS ═════════════════════════════════════════════════════════════════ */
.btn-meteo {
    display: inline-block !important;
    background: var(--btn-bg, #406888) !important;
    color: #fff !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    margin: 4px !important;
    transition: opacity .15s !important;
}
.btn-meteo:hover, .btn-meteo:visited { color: #fff !important; opacity: .85 !important; }
.btn-meteo--historique {
    background: var(--accent2, #90b8d8) !important;
    color: var(--title, #0a2040) !important;
}
.btn-meteo--historique:hover, .btn-meteo--historique:visited { color: var(--title, #0a2040) !important; }

/* ══ FOOTER ══════════════════════════════════════════════════════════════════ */
.site-footer, .ast-small-footer { background: var(--nav-bg, #a0b8d0) !important; }
.ast-footer-copyright { color: var(--nav-text, #1a3050) !important; font-size: 12px !important; }

/* ══ RESPONSIVE ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    /* Grilles 2 colonnes → 1 colonne */
    div[style*="grid-template-columns:1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 768px) {
    .ast-container,
    .site-content > .ast-container { padding-left: 12px !important; padding-right: 12px !important; }
    .card { padding: 14px 16px !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .btn-meteo { font-size: 13px !important; padding: 8px 14px !important; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
}
/* ── Tendance météo ── */
.tendance-meteo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--bg-card, #f4f8fc);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 12px 0 4px;
}
.tendance-icone {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1.3;
}
.tendance-phrase {
    font-size: 14px;
    font-weight: 600;
    color: var(--title);
    line-height: 1.4;
}
.tendance-detail {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

/* Responsive : empiler sur mobile */
@media (max-width: 480px) {
    .tendance-meteo {
        flex-direction: column;
        gap: 6px;
    }
}