/* ============================================
   Tunisia Weather 14 Days — LeManager.tn
   Design : conforme au style editorial du site
   Couleur principale : #CC0000 (rouge LeManager)
   ============================================ */

/* ── Conteneur principal ─────────────────────────────── */
.tw14-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    color: #222;
    width: 100%;
    margin: 0 0 24px;
}

/* ── Barre sélecteur ─────────────────────────────────── */
.tw14-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #CC0000;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px 4px 0 0;
}

.tw14-section-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
}

.tw14-icon-weather {
    font-size: 18px;
}

.tw14-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tw14-select-group label {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
}

.tw14-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tw14-city-select {
    appearance: none;
    background: #fff;
    border: none;
    border-radius: 3px;
    padding: 6px 30px 6px 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #CC0000;
    cursor: pointer;
    min-width: 140px;
    outline: none;
}

.tw14-city-select:focus {
    box-shadow: 0 0 0 2px rgba(255,255,255,.5);
}

.tw14-select-arrow {
    position: absolute;
    right: 8px;
    pointer-events: none;
    color: #CC0000;
    font-size: 10px;
}

/* ── Cartes résumé ───────────────────────────────────── */
.tw14-summary {
    display: flex;
    gap: 0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
}

.tw14-summary-card {
    flex: 1;
    padding: 12px 14px;
    border-right: 1px solid #e0e0e0;
    text-align: center;
}

.tw14-summary-card:last-child {
    border-right: none;
}

.tw14-sum-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
}

.tw14-sum-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    line-height: 1;
}

.tw14-red  { color: #CC0000; }
.tw14-blue { color: #1a5fa8; }

/* ── Conteneur tableau ───────────────────────────────── */
.tw14-table-container {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow-x: auto;
    background: #fff;
}

/* ── Tableau ─────────────────────────────────────────── */
.tw14-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tw14-table thead tr {
    background: #f4f4f4;
    border-bottom: 2px solid #e0e0e0;
}

.tw14-table th {
    padding: 9px 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.tw14-th-date { text-align: left; min-width: 130px; }
.tw14-th-cond { text-align: left; }
.tw14-th-icon { width: 40px; }

.tw14-table td {
    padding: 9px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.tw14-table td.tw14-td-date { text-align: left; }
.tw14-table td.tw14-td-cond { text-align: left; font-size: 13px; color: #555; }
.tw14-table td.tw14-td-icon { text-align: center; font-size: 20px; padding: 6px 8px; }

.tw14-table tbody tr:last-child td { border-bottom: none; }

.tw14-table tbody tr:hover td {
    background: #fff8f8;
}

/* Ligne aujourd'hui */
.tw14-today td {
    background: #fff3f3;
    font-weight: 600;
}

.tw14-today:hover td {
    background: #ffe8e8;
}

/* Badge aujourd'hui */
.tw14-today-badge {
    display: inline-block;
    background: #CC0000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 7px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Date */
.tw14-day-name {
    font-weight: 700;
    color: #222;
}

.tw14-day-date {
    font-size: 12px;
    color: #888;
    margin-left: 4px;
}

/* Températures */
.tw14-temp-max { color: #CC0000; font-weight: 700; }
.tw14-temp-min { color: #1a5fa8; font-weight: 700; }

/* Badge pluie */
.tw14-rain-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tw14-rain-0   { color: #bbb; background: transparent; }
.tw14-rain-low { color: #1a5fa8; background: #e6f0fb; }
.tw14-rain-med { color: #0c3d78; background: #b5d0f4; }
.tw14-rain-hi  { color: #fff; background: #1a5fa8; }

/* Vent & UV */
.tw14-wind { color: #666; font-size: 13px; }
.tw14-uv   { color: #666; font-size: 13px; }

/* ── Loading ─────────────────────────────────────────── */
.tw14-loading {
    text-align: center;
    padding: 48px 20px;
    color: #999;
}

.tw14-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eee;
    border-top-color: #CC0000;
    border-radius: 50%;
    animation: tw14-spin .7s linear infinite;
    margin: 0 auto 12px;
}

@keyframes tw14-spin { to { transform: rotate(360deg); } }

/* ── Erreur ──────────────────────────────────────────── */
.tw14-error {
    padding: 18px 20px;
    background: #fff8f8;
    color: #CC0000;
    font-size: 13px;
    text-align: center;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .tw14-selector-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .tw14-hide-sm { display: none; }
    .tw14-summary { flex-wrap: wrap; }
    .tw14-summary-card { flex: 1 1 45%; border-bottom: 1px solid #e0e0e0; }
}
