/**
 * KS - Météo Circuits
 * Styles pour l'affichage de la météo
 * Compatible avec le thème karting-sud.com
 */

/* Container principal */
.ks-meteo-container {
    max-width: 100%;
    margin: 15px 0;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
}

/* Header */
.ks-meteo-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ffffff;
    padding: 10px 15px;
    text-align: center;
}

.ks-meteo-titre {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* Styles pour location supprimés car non utilisés */

.ks-meteo-city {
    font-weight: bold;
}

/* Conteneur des jours */
.ks-meteo-days {
    padding: 0;
}

/* Jour individuel */
.ks-meteo-day {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.ks-meteo-day:last-child {
    border-bottom: none;
}

.ks-meteo-day:hover {
    background-color: #f8f9fa;
}

/* Header du jour */
.ks-meteo-day-header {
    display: grid;
    grid-template-columns: 1fr auto auto 40px;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    min-height: 50px;
}

.ks-meteo-day-date {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.ks-meteo-day-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ks-meteo-icon {
    width: 35px;
    height: 35px;
}

.ks-meteo-icon-wrapper {
    display: inline-block;
    position: relative;
}

.ks-meteo-icon-wrapper img {
    display: block;
}

.ks-meteo-temps {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ks-meteo-temp-max {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
}

.ks-meteo-temp-min {
    font-size: 14px;
    color: #3498db;
}

.ks-meteo-day-description {
    font-size: 13px;
    color: #7f8c8d;
    text-transform: capitalize;
}

/* Bouton toggle */
.ks-meteo-toggle {
    background: none;
    border: 2px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #3498db;
    font-size: 14px;
}

.ks-meteo-toggle:hover {
    background-color: #3498db;
    color: white;
    transform: scale(1.1);
}

.ks-meteo-day.open .ks-meteo-toggle {
    background-color: #3498db;
    color: white;
}

.ks-meteo-toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

.ks-meteo-day.open .ks-meteo-toggle-icon {
    transform: rotate(180deg);
}

/* Détails du jour (accordéon) */
.ks-meteo-day-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.3s ease;
    background-color: #f8f9fa;
    padding: 0 20px;
}

.ks-meteo-day.open .ks-meteo-day-details {
    max-height: 5000px;
    padding: 20px;
    border-top: 2px solid #e0e0e0;
}

/* Prévisions horaires */
.ks-meteo-hourly {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.ks-meteo-hour {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.ks-meteo-hour:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    border-color: #3498db;
}

.ks-meteo-hour-time {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.ks-meteo-hour-icon {
    width: 40px;
    height: 40px;
    margin: 8px auto;
}

.ks-meteo-hour-temp {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin: 8px 0;
}

.ks-meteo-hour-desc {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 8px;
    text-transform: capitalize;
    min-height: 32px;
}

/* Informations détaillées */
.ks-meteo-hour-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    text-align: left;
}

.ks-meteo-info-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.ks-meteo-info-label {
    color: #7f8c8d;
    font-weight: 500;
}

.ks-meteo-info-value {
    color: #2c3e50;
    font-weight: bold;
}

/* Footer */
.ks-meteo-footer {
    background-color: #ecf0f1;
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.ks-meteo-credits {
    margin: 0;
    font-size: 11px;
    color: #7f8c8d;
}

.ks-meteo-credits a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.ks-meteo-credits a:hover {
    text-decoration: underline;
}

/* Messages d'erreur */
.ks-meteo-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
    padding: 15px;
    margin: 20px 0;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ks-meteo-day-header {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
        padding: 8px 10px;
    }
    
    .ks-meteo-day-summary {
        justify-content: center;
    }
    
    .ks-meteo-toggle {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ks-meteo-hourly {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .ks-meteo-titre {
        font-size: 16px;
    }
    
    .ks-meteo-day-date {
        font-size: 14px;
    }
    
    .ks-meteo-header {
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .ks-meteo-hourly {
        grid-template-columns: 1fr;
    }
    
    .ks-meteo-hour {
        padding: 12px;
    }
    
    .ks-meteo-container {
        border-radius: 5px;
    }
    
    .ks-meteo-header {
        padding: 15px;
    }
    
    .ks-meteo-day-header {
        padding: 15px;
    }
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ks-meteo-day-details {
    animation: fadeIn 0.5s ease-out;
}

/* Style pour l'impression */
@media print {
    .ks-meteo-toggle {
        display: none;
    }
    
    .ks-meteo-day-details {
        max-height: none !important;
        overflow: visible !important;
        padding: 20px !important;
    }
    
    .ks-meteo-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}
