/* =============================================
   VARIABLES & RESET
   ============================================= */
*
{
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: rgb(var(--bg-r), var(--bg-g), var(--bg-b));
    color: #e0e0e0;
}

/* =============================================
   ANIMATIONS MÉTÉO (JOUR / NUIT)
   ============================================= */
@keyframes sunnyPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.9;
    }
}

@keyframes rainyFall {
    0% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0%) scale(1.2);
        opacity: 0.8;
    }
}

@keyframes cloudyMove {
    0% {
        transform: translate(-100%, -50%);
    }
    100% {
        transform: translate(100%, -50%);
    }
}

@keyframes stormyFlash {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.9;
    }
}

@keyframes snowyFall {
    0% {
        transform: translate(-50%, -100%) scale(1);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0%) scale(1.2);
        opacity: 0.7;
    }
}

@keyframes nightClear {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes nightCloudy {
    0% {
        transform: translate(-100%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: translate(100%, -50%);
        opacity: 0.7;
    }
}

@keyframes nightRainy {
    0% {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0%);
        opacity: 0.6;
    }
}

/* =============================================
   FONDS ANIMÉS (JOUR)
   ============================================= */
body.sunny::before {
    content: "";
    position: fixed;
    top: 30%;
    left: 70%;
    width: 150px;
    height: 150px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 0, 0.8) 0%,
        rgba(255, 165, 0, 0.3) 70%,
        transparent 100%
    );
    border-radius: 50%;
    animation: sunnyPulse 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body.rainy::before {
    content: "";
    position: fixed;
    top: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(100, 100, 255, 0.4) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: rainyFall 2s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body.cloudy::before {
    content: "";
    position: fixed;
    top: 40%;
    left: 30%;
    width: 300px;
    height: 100px;
    background: rgba(200, 200, 200, 0.3);
    border-radius: 50px;
    animation: cloudyMove 10s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body.stormy::before {
    content: "";
    position: fixed;
    top: 25%;
    left: 60%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(150, 150, 255, 0.5) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: stormyFlash 1s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body.snowy::before {
    content: "";
    position: fixed;
    top: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.6) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: snowyFall 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* =============================================
   FONDS ANIMÉS (NUIT)
   ============================================= */
body.night-clear::before {
    content: "";
    position: fixed;
    top: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(200, 200, 255, 0.3) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: nightClear 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body.night-cloudy::before {
    content: "";
    position: fixed;
    top: 40%;
    left: 30%;
    width: 300px;
    height: 100px;
    background: rgba(100, 100, 100, 0.2);
    border-radius: 50px;
    animation: nightCloudy 10s linear infinite;
    z-index: 0;
    pointer-events: none;
}

body.night-rainy::before {
    content: "";
    position: fixed;
    top: 20%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(50, 50, 150, 0.4) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: nightRainy 2s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body.night-stormy::before {
    content: "";
    position: fixed;
    top: 25%;
    left: 60%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(100, 100, 200, 0.5) 0%,
        transparent 70%
    );
    border-radius: 50%;
    animation: stormyFlash 1s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */
.container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    position: relative;
}

/* =============================================
   BLOCS PRINCIPAUX
   ============================================= */
.card-block {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    overflow: hidden;
    height: 100%;
    z-index: 1;
    position: relative;
}

.current-weather {
    flex: 0 0 24%;
    min-width: 140px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.forecast-container {
    flex: 1 1 50%;
    min-width: 250px;
}

.temp-table {
    flex: 0 0 24%;
    min-width: 140px;
}

/* =============================================
   TYPOGRAPHIE
   ============================================= */
.header-title {
    margin: 0 0 4px 0;
    font-size: 2.4rem;
    color: #fff;
    text-align: center;
    line-height: 1.2;
}

.card-block h2 {
    font-size: 2.4rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.2;
}

/* =============================================
   MÉTÉO ACTUELLE
   ============================================= */
.current-weather .day {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: capitalize;
    color: #cbd5e0;
    margin: 2px 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.current-weather .clock {
    font-size: 2.8rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #f6ad55;
    width: auto;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

/* Bouton Radar */
.btn-radar {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    height: 40px;
}

.btn-radar:hover {
    background: linear-gradient(135deg, #29b6f6, #039be5);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.btn-radar:active {
    transform: scale(0.95);
}

.current-weather .temp {
    font-size: 4.2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 4px 0;
    line-height: 1;
}

.current-weather .description {
    width: 100%;
    text-align: center;
    margin: 4px 0;
    font-size: 2.4rem;
}

.current-weather .description img,
.current-weather .description svg {
    vertical-align: middle;
    margin-right: 6px;
    max-width: 162px;
}

.current-weather .description p {
    display: inline;
    text-transform: capitalize;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.current-weather .details {
    width: 95%;
    background: rgba(0, 0, 0, 0.15);
    padding: 10px;
    border-radius: 8px;
    margin: 4px auto 0;
    font-size: 1.2rem;
}

.current-weather .detail-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 6px;
    gap: 6px;
}

.current-weather .detail-item {
    flex: 1;
    text-align: center;
    line-height: 1.2;
}

.current-weather .detail-item p {
    margin: 0;
    font-size: 1.2rem;
}

.current-weather .details .sep {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 4px;
    margin-top: 4px;
}

/* =============================================
   BOUTON GRAPHIQUES
   ============================================= */
.btn-graphiques {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4fc3f7, #1e88e5);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    cursor: pointer;
    margin-top: 6px;
    z-index: 2;
    position: relative;
}

.btn-graphiques:active {
    transform: scale(0.97);
}

/* =============================================
   CARROUSEL DES PRÉVISIONS
   ============================================= */
.carousel-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: calc(100% - 28px);
    z-index: 1;
}

.carousel-track {
    width: 500%;
    height: 100%;
    transition: transform 0.7s ease-in-out;
    display: flex;
}

.period-slide {
    width: 20%;
    height: 100%;
    box-sizing: border-box;
    padding: 0 2px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.period-slide-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 2px;
    flex-shrink: 0;
    line-height: 1.1;
    padding: 2px 0;
}

/* =============================================
   CARTES DES JOURS
   ============================================= */
.day-cards-row {
    display: flex;
    gap: 2px;
    flex: 1;
    overflow: hidden;
    align-items: stretch;
}

.day-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    justify-content: space-between;
    z-index: 1;
}

.day-card-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2px;
    gap: 4px;
    flex-shrink: 0;
}

.day-card-label {
    font-size: 2.4rem;
    font-weight: bold;
    color: #fff;
    text-transform: capitalize;
    line-height: 1.1;
    flex: 0 0 auto;
}

.day-card-icon {
    width: 162px;
    height: 162px;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.4));
    object-fit: contain;
    flex-shrink: 0;
}

.day-card-temp {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1.1;
    flex-shrink: 0;
}

.day-card-feels {
    font-size: 1.4rem;
    font-weight: normal;
    color: #a0c4ff;
    line-height: 1.1;
    margin-top: 1px;
    flex-shrink: 0;
}

.day-card-desc {
    font-size: 1.4rem;
    color: #cbd5e0;
    text-transform: capitalize;
    margin-top: auto;
    padding-top: 4px;
    line-height: 1.1;
    flex-shrink: 1;
    word-break: break-word;
}

/* =============================================
   STATS DES CARTES
   ============================================= */
.day-card-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 4px;
    margin-top: 2px;
    padding: 4px 2px;
    font-size: 1.4rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 45%;
    text-align: center;
    justify-content: center;
}

.stat-ico {
    font-size: 1.6rem;
    line-height: 1;
}

.stat-val {
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
}

.day-card-cumul {
    text-align: center;
    margin-top: 2px;
    font-size: 1.4rem;
    color: #a0c4ff;
    padding: 2px 0;
}

.day-card-cumul strong {
    color: #fff;
    font-weight: bold;
}

.day-card-graph {
    width: 100%;
    height: 35px;
    margin-top: auto;
    flex-shrink: 0;
    opacity: 0.7;
}

/* =============================================
   TODAY-SLIDE
   ============================================= */
.today-slide {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 6px 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    justify-content: space-between;
}

/* En-tête */
.today-slide-header {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: capitalize;
    line-height: 1.1;
    padding: 2px 0;
    margin-bottom: 2px;
    flex-shrink: 0;
}

/* Icône */
.today-slide-icon {
    width: 85px;
    height: 85px;
    margin: 0 auto;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.4));
    flex-shrink: 0;
}

/* Température */
.today-slide-temp {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin: 2px 0;
    line-height: 1.1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

/* Description */
.today-slide-desc {
    font-size: 1.4rem;
    font-weight: bold;
    color: #cbd5e0;
    text-transform: capitalize;
    line-height: 1.1;
    margin: 2px 0;
    padding: 2px 0;
    flex-shrink: 0;
    word-break: break-word;
}

/* Bloc statistiques */
.today-slide-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding: 5px 3px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

/* Lignes statistiques */
.today-slide-stats .stat-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}

/* Valeurs statistiques */
.today-slide-stats .stat-row span {
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* =============================================
   TABLEAU DES TEMPÉRATURES (BLOC DROIT)
   ============================================= */
.temp-table {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Fond gris foncé opaque pour le tableau */
.temp-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.6rem;
    table-layout: fixed;
    background: rgba(50, 50, 50, 0.9);
    border-radius: 8px;
}

.temp-table h2 {
    flex-shrink: 0;
}

/* Couleurs pour les noms des zones dans le tableau */
.temp-table td:first-child {
    font-weight: bold;
}

/* Couleurs spécifiques pour chaque zone */
.temp-table tr:nth-child(1) td:first-child { color: #9b59b6; } /* Violet */
.temp-table tr:nth-child(2) td:first-child { color: #f1c40f; } /* Jaune */
.temp-table tr:nth-child(3) td:first-child { color: #1e3a8a; } /* Bleu foncé */
.temp-table tr:nth-child(4) td:first-child { color: #ff69b4; } /* Rose */
.temp-table tr:nth-child(5) td:first-child { color: #2ecc71; } /* Vert */
.temp-table tr:nth-child(6) td:first-child { color: #ffffff; } /* Blanc */
.temp-table tr:nth-child(7) td:first-child { color: #8b4513; } /* Marron */

/* =============================================
   CARROUSEL VERTICAL (bloc droite)
   ============================================= */
.v-carousel-viewport {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.v-carousel-track {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.v-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Les blocs collés en haut de leur volet */
.v-slide .details,
.v-slide .ephemeride {
    margin-top: 0;
}

.temp-table th,
.temp-table td {
    padding: 12px 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.temp-table th {
    background: linear-gradient(180deg, rgba(79, 195, 247, 0.18), rgba(30, 136, 229, 0.08));
    font-weight: bold;
    color: #fff;
    border-bottom: 2px solid rgba(79, 195, 247, 0.35);
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.temp-table td {
    color: #eaf2ff;
}

.temp-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.temp-table tr:hover {
    background: rgba(79, 195, 247, 0.08);
}

/* =============================================
   DÉTAILS (REDESIGNÉS)
   ============================================= */
.temp-table .details {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.temp-table .details .detail-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.temp-table .details .detail-row:last-child {
    margin-bottom: 0;
}

.temp-table .details .detail-item {
    flex: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 6px 4px;
}

.temp-table .details .detail-item p {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}

.temp-table .details .detail-item .detail-label {
    display: block;
    font-size: 1.15rem;
    font-weight: normal;
    color: #a0c4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.temp-table .details .sep {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 6px;
    margin-top: 6px;
}

/* =============================================
   ÉPHÉMÉRIDE DU JOUR (SAINT + LUNE)
   ============================================= */
.ephemeride {
    margin-top: 10px;
    background: linear-gradient(135deg,
        rgba(79, 195, 247, 0.14),
        rgba(30, 136, 229, 0.06));
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 10px;
    padding: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ephemeride h3 {
    font-size: 1.7rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

/* --- Saint du jour --- */
.ephemeride .saint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.ephemeride .saint-ico {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.ephemeride .saint-label {
    display: block;
    font-size: 1.15rem;
    color: #a0c4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ephemeride .saint-val {
    display: block;
    font-size: 1.9rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Cycle de la lune --- */
.ephemeride .moon {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 8px;
    padding: 8px 10px;
}

.ephemeride .moon-ico {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(200, 200, 255, 0.6));
}

.ephemeride .moon-label {
    display: block;
    font-size: 1.15rem;
    color: #a0c4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ephemeride .moon-val {
    display: block;
    font-size: 1.7rem;
    font-weight: bold;
    color: #fff;
    line-height: 1.15;
}

.ephemeride .moon-info {
    display: block;
    font-size: 1.25rem;
    color: #cbd5e0;
    line-height: 1.2;
    margin-top: 2px;
}

/* =============================================
   OVERRIDE POUR Z-INDEX DES ÉLÉMENTS INTERNES
   ============================================= */
.carousel-track,
.v-carousel-track,
.temp-table table,
.container {
    position: relative;
    z-index: 1;
}

/* =============================================
   RESPONSIVE : DESKTOP (> 1200px)
   ============================================= */
@media (min-width: 1200px) {
    .container {
        gap: 8px;
        padding: 8px;
    }

    .card-block {
        border-radius: 12px;
        padding: 12px;
    }

    .current-weather {
        flex: 0 0 25%;
    }

    .forecast-container {
        flex: 1 1 48%;
    }

    .temp-table {
        flex: 0 0 25%;
    }

    .header-title {
        font-size: 2.6rem;
        margin-bottom: 6px;
    }

    .card-block h2 {
        font-size: 1.6rem;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    /* MÉTÉO ACTUELLE */
    .current-weather .day {
        font-size: 1.5rem;
        margin: 4px 0;
    }

    .current-weather .clock {
        font-size: 2.8rem;
    }

    .btn-radar {
        font-size: 1.1rem;
        padding: 8px 14px;
    }

    .current-weather .temp {
        font-size: 4.4rem;
        margin: 6px 0;
    }

    .current-weather .description {
        margin: 6px 0;
        font-size: 2.5rem;
    }

    .current-weather .description img,
    .current-weather .description svg {
        max-width: 40px;
        margin-right: 8px;
    }

    .current-weather .details {
        padding: 12px;
        margin: 8px auto 0;
        font-size: 1.4rem;
    }

    .current-weather .detail-row {
        margin-bottom: 8px;
    }

    .current-weather .detail-item p {
        font-size: 1.4rem;
    }

    .btn-graphiques {
        padding: 10px 18px;
        border-radius: 10px;
        font-size: 1.2rem;
        margin-top: 8px;
    }

    /* CARROUSEL */
    .period-slide-header {
        font-size: 2.4rem;
        margin-bottom: 4px;
    }

    /* DAY CARD */
    .day-card {
        border-radius: 10px;
        padding: 8px;
    }

    .day-card-top {
        gap: 8px;
    }

    .day-card-label {
        font-size: 2.6rem;
    }

    .day-card-temp {
        font-size: 3.2rem;
        margin: 2px 0 0 0;
    }

    .day-card-feels {
        font-size: 2.4rem;
    }

    .day-card-desc {
        font-size: 1.4rem;
        padding-top: 6px;
    }

    .day-card-stats {
        gap: 6px;
        margin-top: 4px;
        font-size: 1.6rem;
    }

    .stat-ico {
        font-size: 1.8rem;
    }

    .stat-val {
        font-size: 1.8rem;
    }

    .day-card-cumul {
        font-size: 1.6rem;
        margin-top: 4px;
    }

    .day-card-graph {
        height: 40px;
    }

    /* TODAY SLIDE */
    .today-slide {
        border-radius: 10px;
        padding: 8px;
    }

    .today-slide-header {
        font-size: 1.5rem;
    }

    .today-slide-icon {
        width: 85px;
        height: 85px;
    }

    .today-slide-temp {
        font-size: 1.5rem;
    }

    .today-slide-desc {
        font-size: 1.4rem;
    }

    .today-slide-stats {
        gap: 5px;
        margin-top: 4px;
        padding: 6px 3px;
        font-size: 1.5rem;
    }

    /* TABLEAU (AGRANDI) */
    .temp-table table {
        font-size: 1.8rem;
    }

    .temp-table th {
        font-size: 1rem;
    }

    .temp-table th,
    .temp-table td {
        padding: 12px 10px;
    }

    /* DÉTAILS SOUS LE TABLEAU */
    .temp-table .details {
        padding: 12px;
        font-size: 1.7rem;
        margin-top: 12px;
    }

    .temp-table .details .detail-item {
        padding: 8px 6px;
    }

    .temp-table .details .detail-item p {
        font-size: 1.7rem;
    }

    .temp-table .details .detail-item .detail-label {
        font-size: 1.25rem;
    }

    /* ÉPHÉMÉRIDE */
    .ephemeride {
        padding: 12px;
        margin-top: 12px;
        border-radius: 12px;
    }

    .ephemeride h3 {
        font-size: 2rem;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .ephemeride .saint,
    .ephemeride .moon {
        padding: 10px 12px;
        gap: 12px;
        margin-bottom: 10px;
    }

    .ephemeride .moon {
        margin-bottom: 0;
    }

    .ephemeride .saint-ico {
        font-size: 2.6rem;
    }

    .ephemeride .saint-label,
    .ephemeride .moon-label {
        font-size: 1.3rem;
    }

    .ephemeride .saint-val {
        font-size: 2.2rem;
    }

    .ephemeride .moon-ico {
        width: 78px;
        height: 78px;
    }

    .ephemeride .moon-val {
        font-size: 2rem;
    }

    .ephemeride .moon-info {
        font-size: 1.4rem;
    }
}

/* =============================================
   RESPONSIVE : TABLETTE (768px - 1199px)
   ============================================= */
@media (max-width: 1199px) and (min-width: 768px) {
    .current-weather {
        flex: 0 0 23%;
    }

    .forecast-container {
        flex: 1 1 52%;
    }

    .temp-table {
        flex: 0 0 23%;
    }

    .day-card {
        padding: 6px;
    }

    .day-card-temp {
        font-size: 2.8rem;
    }

    /* STATS */
    .day-card-stats {
        gap: 5px;
        margin-top: 3px;
        font-size: 1.5rem;
    }

    .stat-ico {
        font-size: 1.7rem;
    }

    .stat-val {
        font-size: 1.7rem;
    }

    .day-card-cumul {
        font-size: 1.5rem;
        margin-top: 3px;
    }

    .day-card-graph {
        height: 32px;
    }

    /* TODAY SLIDE */
    .today-slide {
        padding: 6px;
    }

    .today-slide-header {
        font-size: 1.5rem;
    }

    .today-slide-icon {
        width: 85px;
        height: 85px;
    }

    .today-slide-temp {
        font-size: 1.5rem;
    }

    .today-slide-desc {
        font-size: 1.2rem;
    }

    .today-slide-stats {
        gap: 4px;
        font-size: 1.4rem;
    }

    /* TABLEAU (AGRANDI) */
    .temp-table table {
        font-size: 1.7rem;
    }

    .temp-table th {
        font-size: 1rem;
    }

    .temp-table th,
    .temp-table td {
        padding: 11px 8px;
    }

    /* DÉTAILS + ÉPHÉMÉRIDE */
    .temp-table .details {
        font-size: 1.6rem;
    }

    .temp-table .details .detail-item p {
        font-size: 1.6rem;
    }

    .ephemeride h3 {
        font-size: 1.9rem;
    }

    .ephemeride .saint-val {
        font-size: 2rem;
    }

    .ephemeride .moon-ico {
        width: 70px;
        height: 70px;
    }

    .ephemeride .moon-val {
        font-size: 1.9rem;
    }
}

/* =============================================
   RESPONSIVE : MOBILE PORTRAIT (< 768px)
   ============================================= */
@media (max-width: 767px) {
    .container {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .card-block {
        width: 100%;
        height: auto;
    }

    .current-weather,
    .forecast-container,
    .temp-table {
        flex: 0 0 100%;
        min-width: 0;
    }

    .current-weather .day {
        font-size: 1.5rem;
    }

    .current-weather .clock {
        font-size: 2.4rem;
    }

    .btn-radar {
        font-size: 0.9rem;
        padding: 4px 8px;
        height: 32px;
    }

    .current-weather .temp {
        font-size: 4.8rem;
    }

    .day-cards-row {
        flex-direction: column;
        gap: 4px;
    }

    .day-card {
        width: 100%;
        padding: 6px;
    }

    .day-card-temp {
        font-size: 2rem;
    }

    /* STATS DAY CARD */
    .day-card-stats {
        gap: 3px;
        margin-top: 2px;
        font-size: 1.8rem;
    }

    .stat {
        min-width: 48%;
    }

    .stat-ico {
        font-size: 2rem;
    }

    .stat-val {
        font-size: 2rem;
    }

    .day-card-cumul {
        font-size: 1.8rem;
        margin-top: 2px;
    }

    .day-card-graph {
        height: 30px;
    }

    /* TODAY SLIDE */
    .today-slide {
        width: 100%;
        padding: 6px;
    }

    .today-slide-header {
        font-size: 1.5rem;
    }

    .today-slide-icon {
        width: 85px;
        height: 85px;
    }

    .today-slide-temp {
        font-size: 1.5rem;
    }

    .today-slide-desc {
        font-size: 1.2rem;
    }

    .today-slide-stats {
        gap: 3px;
        margin-top: 2px;
        padding: 4px 2px;
        font-size: 1.5rem;
    }

    .today-slide-stats .stat-row {
        gap: 3px;
    }

    /* TABLEAU (AGRANDI) */
    .temp-table table {
        font-size: 2.6rem;
    }

    .temp-table th {
        font-size: 1rem;
    }

    .temp-table th,
    .temp-table td {
        padding: 14px 10px;
    }

    /* DÉTAILS + ÉPHÉMÉRIDE */
    .temp-table .details {
        font-size: 2rem;
    }

    .temp-table .details .detail-item p {
        font-size: 2rem;
    }

    .temp-table .details .detail-item .detail-label {
        font-size: 1.5rem;
    }

    .ephemeride h3 {
        font-size: 2.2rem;
    }

    .ephemeride .saint-ico {
        font-size: 2.8rem;
    }

    .ephemeride .saint-label,
    .ephemeride .moon-label {
        font-size: 1.5rem;
    }

    .ephemeride .saint-val {
        font-size: 2.4rem;
    }

    .ephemeride .moon-ico {
        width: 90px;
        height: 90px;
    }

    .ephemeride .moon-val {
        font-size: 2.2rem;
    }

    .ephemeride .moon-info {
        font-size: 1.6rem;
    }
}

/* =============================================
   RESPONSIVE : MOBILE PAYSAGE
   ============================================= */
@media (orientation: landscape) and (max-height: 550px) {
    .container {
        flex-direction: row;
        gap: 4px;
        padding: 4px;
        height: 100vh;
    }

    .card-block {
        border-radius: 8px;
        padding: 6px;
        gap: 4px;
        overflow: hidden;
    }

    .current-weather {
        flex: 0 0 22%;
    }

    .forecast-container {
        flex: 1 1 auto;
        min-width: 200px;
    }

    .temp-table {
        flex: 0 0 22%;
    }

    .card-block h2 {
        font-size: 1.4rem;
        padding-bottom: 4px;
        margin-bottom: 6px;
    }

    /* MÉTÉO ACTUELLE */
    .current-weather .day {
        font-size: 1.5rem;
        margin: 2px 0;
    }

    .current-weather .clock {
        font-size: 2.2rem;
    }

    .btn-radar {
        font-size: 0.8rem;
        padding: 4px 8px;
        height: 30px;
    }

    .current-weather .temp {
        font-size: 4.4rem;
        margin: 4px 0;
    }

    .current-weather .description {
        margin: 4px 0;
        font-size: 2rem;
    }

    .current-weather .description img,
    .current-weather .description svg {
        max-width: 28px;
        margin-right: 4px;
    }

    .current-weather .details {
        padding: 6px;
        margin: 4px auto 0;
        font-size: 1.4rem;
    }

    .current-weather .detail-row {
        margin-bottom: 4px;
        gap: 4px;
    }

    /* BOUTON */
    .btn-graphiques {
        padding: 5px 10px;
        font-size: 0.9rem;
        margin-top: 4px;
    }

    /* CARROUSEL */
    .carousel-viewport {
        height: calc(100% - 20px);
    }

    .period-slide-header {
        font-size: 1.8rem;
        margin-bottom: 2px;
    }

    .day-cards-row {
        gap: 2px;
    }

    /* DAY CARD */
    .day-card {
        border-radius: 8px;
        padding: 4px;
    }

    .day-card-top {
        margin-bottom: 2px;
        gap: 2px;
    }

    .day-card-label {
        font-size: 2rem;
    }

    .day-card-temp {
        font-size: 2.4rem;
    }

    .day-card-feels {
        font-size: 0.9rem;
    }

    .day-card-desc {
        font-size: 0.9rem;
        padding-top: 2px;
    }

    /* STATS DAY CARD */
    .day-card-stats {
        gap: 2px;
        margin-top: 1px;
        font-size: 1.1rem;
    }

    .stat {
        min-width: 47%;
    }

    .stat-ico {
        font-size: 1.2rem;
    }

    .stat-val {
        font-size: 1.2rem;
    }

    .day-card-cumul {
        font-size: 1.4rem;
        margin-top: 1px;
        padding: 1px 0;
    }

    .day-card-graph {
        height: 24px;
    }

    /* TODAY SLIDE */
    .today-slide {
        border-radius: 8px;
        padding: 4px;
    }

    .today-slide-header {
        font-size: 1.3rem;
        line-height: 1;
        padding: 1px 0;
        margin-bottom: 1px;
    }

    .today-slide-icon {
        width: 70px;
        height: 70px;
    }

    .today-slide-temp {
        font-size: 1.3rem;
        margin: 1px 0;
    }

    .today-slide-desc {
        font-size: 0.9rem;
        padding: 1px 0;
        margin: 1px 0;
    }

    .today-slide-stats {
        gap: 2px;
        margin-top: 1px;
        padding: 3px 2px;
        font-size: 1.1rem;
    }

    .today-slide-stats .stat-row {
        gap: 2px;
        line-height: 1.1;
    }

    .today-slide-stats .stat-row span {
        white-space: nowrap;
    }

    /* TABLEAU (compact en paysage mais lisible) */
    .temp-table table {
        font-size: 2rem;
    }

    .temp-table th {
        font-size: 1rem;
    }

    .temp-table th,
    .temp-table td {
        padding: 8px 6px;
    }

    /* DÉTAILS + ÉPHÉMÉRIDE (compacts) */
    .temp-table .details {
        margin-top: 6px;
        padding: 6px;
        font-size: 1.4rem;
        border-radius: 8px;
    }

    .temp-table .details .detail-item {
        padding: 4px 3px;
        border-radius: 6px;
    }

    .temp-table .details .detail-item p {
        font-size: 1.4rem;
    }

    .temp-table .details .detail-item .detail-label {
        font-size: 1rem;
    }

    .ephemeride {
        margin-top: 6px;
        padding: 6px;
        border-radius: 8px;
    }

    .ephemeride h3 {
        font-size: 1.4rem;
        padding-bottom: 3px;
        margin-bottom: 4px;
    }

    .ephemeride .saint,
    .ephemeride .moon {
        padding: 5px 8px;
        gap: 8px;
        margin-bottom: 5px;
        border-radius: 6px;
    }

    .ephemeride .moon {
        margin-bottom: 0;
    }

    .ephemeride .saint-ico {
        font-size: 1.6rem;
    }

    .ephemeride .saint-label,
    .ephemeride .moon-label {
        font-size: 0.9rem;
    }

    .ephemeride .saint-val {
        font-size: 1.5rem;
    }

    .ephemeride .moon-ico {
        width: 50px;
        height: 50px;
    }

    .ephemeride .moon-val {
        font-size: 1.3rem;
    }

    .ephemeride .moon-info {
        font-size: 1.1rem;
        margin-top: 1px;
    }
}

/* =============================================
   SCROLLBAR PERSONNALISÉ
   ============================================= */
.card-block::-webkit-scrollbar {
    width: 4px;
}

.card-block::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.card-block::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.card-block::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}