/**
 * Styles pour la page Météo
 * Projet: Le Tour de Moi
 */

.weather-page {
    background-color: var(--clr-bg-main);
}

/* --- HERO --- */
.weather-hero {
    position: relative;
    width: 100%;
    min-height: 600px;
    height: calc(100vh - 140px);
    background-image: url("../../images/weather/weather-hero.webp");
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.weather-hero .container {
    position: relative;
    z-index: 2;
}

.weather-hero-content {
    max-width: 800px;
}

.weather-hero-label {
    display: block;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: var(--fw-extrabold);
    letter-spacing: 0.15em;
    color: var(--clr-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.weather-hero-title {
    font-size: clamp(42px, 7vw, 76px);
    font-weight: var(--fw-extrabold);
    line-height: 1.05;
    color: white;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.weather-hero-lead {
    font-size: clamp(18px, 2.5vw, 22px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
}

/* --- SECTION PRINCIPALE --- */
.weather-section {
    padding: 100px 0;
}

.weather-layout {
    display: grid;
    grid-template-columns: minmax(240px, 22%) 1px 1fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}

.weather-intro {
    position: sticky;
    top: 120px;
}

.weather-label {
    display: block;
    font-size: 11px;
    font-weight: var(--fw-extrabold);
    letter-spacing: 0.25em;
    color: #aaa;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.weather-title-lg {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: var(--fw-extrabold);
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--clr-text-main);
}

.weather-intro p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--clr-text-secondary);
}

.weather-partner-credit {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-partner-credit--mobile {
    display: none;
}

.weather-partner-credit__label {
    font-size: 12px;
    color: #bbb;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.weather-partner-credit__link {
    font-size: 16px;
    color: var(--clr-text-main);
    font-weight: var(--fw-extrabold);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.weather-partner-credit__link:hover {
    color: var(--clr-primary);
}

.weather-partner-credit__link::after {
    content: '→';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.weather-partner-credit__link:hover::after {
    transform: translateX(4px);
}

.weather-separator {
    background-color: var(--clr-border);
    height: 100%;
    min-height: 300px;
}

/* --- ZONE CONTENU --- */
.weather-content {
    min-width: 0; /* Évite le débordement grid */
}

.weather-status-notice {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    background-color: var(--clr-bg-card);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    color: var(--clr-text-secondary);
    margin-bottom: 50px;
    font-size: 15px;
    font-weight: var(--fw-medium);
    box-shadow: var(--shadow-sm);
}

.weather-status-notice i {
    color: #ccc;
    font-size: 18px;
}

/* --- TIMELINE --- */
.weather-timeline {
    width: 100%;
    padding: 10px 0;
}

.weather-timeline-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- CARD --- */
.weather-day-card {
    width: 100%;
    background: var(--clr-bg-card);
    border-radius: 24px;
    padding: 32px 24px;
    border: 1px solid var(--clr-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
}

.weather-day-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--clr-border-dark);
}

.weather-day-card--today {
    border-color: rgba(198, 106, 26, 0.2);
    background: linear-gradient(to bottom, #fff, #fffaf5);
}

.weather-day-card--today::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 24px;
    border: 2px solid var(--clr-primary);
    pointer-events: none;
    opacity: 0.4;
}

.weather-day-card__header {
    display: flex;
    flex-direction: column;
    margin-bottom: 28px;
}

.weather-day-card__day {
    font-weight: var(--fw-extrabold);
    font-size: 20px;
    color: var(--clr-text-main);
    margin-bottom: 4px;
}

.weather-day-card__date {
    font-size: 14px;
    color: var(--clr-text-secondary);
    font-weight: var(--fw-medium);
}

.weather-day-card__location {
    font-size: 13px;
    color: var(--clr-text-secondary);
    font-weight: var(--fw-medium);
    margin-top: 8px;
    line-height: 1.4;
}

.weather-day-card__location i {
    font-size: 11px;
    color: #ccc;
    margin-right: 4px;
}

.weather-day-card__today-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 8px;
    font-weight: var(--fw-extrabold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background-color: var(--clr-primary);
    color: #fff;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(198, 106, 26, 0.2);
}

.weather-day-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
}

.weather-day-card__image {
    width: clamp(64px, 8vw, 88px);
    height: clamp(64px, 8vw, 88px);
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.weather-day-card__image-placeholder {
    width: 96px;
    height: 96px;
    background-color: #fcfcfc;
    border-radius: 50%;
}

.weather-day-card__temperatures {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
}

.weather-day-card__main-row {
    display: contents;
}

.weather-day-card__temperatures-compact {
    display: none;
}

.weather-day-card__temperatures-desktop {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
}

.weather-temp {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-temp__value {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.weather-temp__label {
    font-size: 10px;
    color: #bbb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.weather-day-card__comment {
    font-size: 14px;
    line-height: 1.6;
    color: var(--clr-text-secondary);
    text-align: center;
    border-top: 1px solid var(--clr-border);
    padding-top: 20px;
    flex-grow: 1;
    font-weight: var(--fw-normal);
}

.weather-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border-radius: 24px;
    border: 1px dashed #eee;
    color: #999;
    font-size: 16px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
    .weather-layout {
        gap: 40px;
        grid-template-columns: 220px 1px 1fr;
    }
}

@media (max-width: 1024px) {
    .weather-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .weather-separator {
        display: none;
    }
    
    .weather-intro {
        position: static;
        max-width: 100%;
        text-align: center;
    }

    .weather-partner-credit {
        align-items: center;
    }

    .weather-timeline-track {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .weather-timeline-track {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* La 3ème carte s'aligne à gauche par défaut dans la grille */
}

@media (max-width: 768px) {
    .weather-section,
    .weather-content,
    .weather-timeline,
    .weather-timeline-track {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .weather-timeline-track {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
    
    .weather-hero {
        height: auto;
        min-height: auto;
        padding: 60px 0;
        background-position: center;
    }

    .weather-hero .hero-overlay {
        background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%);
    }

    .weather-hero-title {
        font-size: 2.25rem;
        margin-bottom: 20px;
    }

    .weather-hero-lead {
        font-size: 1rem;
    }
    
    .weather-section {
        padding: 40px 0;
    }
    
    .weather-status-notice {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 30px;
        justify-content: center;
    }

    .weather-partner-credit--desktop {
        display: none;
    }

    .weather-partner-credit--mobile {
        display: flex;
        margin-top: 40px;
        padding-top: 30px;
        border-top: 1px dashed var(--clr-border);
        align-items: center;
        text-align: center;
    }

    /* --- NOUVELLE DISPOSITION MOBILE CARTES --- */
    .weather-day-card {
        position: relative;
        width: 100%;
        min-width: 0;
        max-width: none;
        padding: 20px;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Ligne principale en 3 colonnes */
    .weather-day-card__main-row {
        display: grid;
        grid-template-columns: 72px 1fr auto;
        align-items: center;
        gap: 16px;
        width: 100%;
    }

    /* Colonne Gauche : Icône */
    .weather-day-card__body {
        margin-bottom: 0;
        gap: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .weather-day-card__image {
        width: 68px;
        height: 68px;
        margin: 0;
    }

    /* Colonne Centrale : Infos */
    .weather-day-card__header {
        margin-bottom: 0;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-right: 40px; /* Espace pour le badge en absolute */
    }

    .weather-day-card__day {
        font-size: 18px;
        line-height: 1.2;
    }

    .weather-day-card__date {
        font-size: 13px;
    }

    .weather-day-card__location {
        margin-top: 4px;
        font-size: 12px;
    }

    .weather-day-card__today-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        margin-top: 0;
        padding: 4px 10px;
        font-size: 8px;
        box-shadow: var(--shadow-sm);
    }

    /* Colonne Droite : Températures */
    .weather-day-card__temperatures {
        flex-direction: column;
        align-items: flex-end;
        gap: 2px;
        width: auto;
    }

    .weather-day-card__temperatures-desktop {
        display: none;
    }

    .weather-day-card__temperatures-compact {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .weather-temp {
        flex-direction: row;
        align-items: baseline;
        gap: 4px;
    }

    .weather-temp__value {
        font-size: 18px;
    }

    .weather-temp__label {
        font-size: 9px;
    }

    /* Format spécial souhaité : 17° / 25° */
    /* On va plutôt empiler pour rester compact ou mettre sur une ligne si possible */
    .weather-day-card__temperatures-compact {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .weather-temp-row {
        font-size: 18px;
        font-weight: 800;
        color: var(--clr-text-main);
    }

    .weather-temp-row .sep {
        color: #eee;
        margin: 0 4px;
        font-weight: 400;
    }

    .weather-temp-labels {
        display: flex;
        gap: 8px;
        font-size: 9px;
        color: #bbb;
        font-weight: 700;
        text-transform: uppercase;
    }

    /* Ligne Secondaire : Commentaire */
    .weather-day-card__comment {
        text-align: left;
        padding-top: 12px;
        font-size: 13px;
        border-top: 1px solid rgba(0,0,0,0.04);
    }
}

