* {

    user-select:none;

    -webkit-user-select:none;

    -moz-user-select:none;

    -ms-user-select:none;

}



body {

    font-family: Arial, sans-serif;

    color:white;

    margin:0;

    padding:40px;

    min-height:100vh;

    box-sizing:border-box;

    background:#20242c;

    position:relative;

    overflow-x:hidden;

    transition:
        opacity .6s ease;

}

/*
========================
    LOGO
========================
*/


.logo-container {

    display:flex;

    justify-content:center;

    align-items:center;

    margin-bottom:20px;

}



.logo {

    width:96px;

    height:auto;

    object-fit:contain;

    user-select:none;

    pointer-events:none;


    animation:

        logoAppear .8s ease forwards;

}





@keyframes logoAppear {


    from {

        opacity:0;

        transform:

            translateY(-20px)

            scale(.9);

    }


    to {

        opacity:1;

        transform:

            translateY(0)

            scale(1);

    }

}

body.weather-transition {

    opacity:.7;

}



h1 {

    text-align:center;

}



#weatherContainer {

    display:flex;

    flex-direction:column;

    gap:15px;

    max-width:100%;

    margin:auto;

}



/*
========================
    CARTES
========================
*/


.card {

    position:relative;

    overflow:hidden;

    display:flex;

    align-items:center;

    gap:20px;

    padding:15px;

    border-radius:10px;


    box-shadow:

        0 0 10px rgba(0,0,0,.3);



    transition:

        transform .5s ease,

        opacity .5s ease,

        box-shadow .5s ease;



    animation:

        cardAppear .8s ease forwards;

}



.card:hover {

    transform:scale(1.03);

}



.current {

    min-height:120px;

}



.weather-icon {

    width:80px;

    height:80px;

    object-fit:contain;

    z-index:2;

}



.infos {

    display:flex;

    flex-direction:column;

    justify-content:center;

    gap:8px;

    z-index:2;

}



.infos > div {

    display:block;

    line-height:1.4;

}



.weather {

    font-size:26px;

    font-weight:bold;

    margin-bottom:5px;

}

.duration-value {

    font-weight:bold;

}



/*
========================
 ANIMATIONS CARTES
========================
*/


@keyframes cardAppear {


    from {

        opacity:0;

        transform:

            translateY(30px)

            scale(.95);

    }


    to {

        opacity:1;

        transform:

            translateY(0)

            scale(1);

    }

}



.weather-update {

    animation:

        weatherChange .8s ease;

}



@keyframes weatherChange {


    0% {

        opacity:.3;

        transform:scale(.95);

    }


    50% {

        transform:scale(1.03);

    }


    100% {

        opacity:1;

        transform:scale(1);

    }

}



.card.removing {

    opacity:0;

    transform:

        translateY(-30px)

        scale(.9);

}



#weatherContainer .card:nth-child(2) {

    animation-delay:.15s;

}


#weatherContainer .card:nth-child(3) {

    animation-delay:.3s;

}


#weatherContainer .card:nth-child(4) {

    animation-delay:.45s;

}


#weatherContainer .card:nth-child(5) {

    animation-delay:.6s;

}





/*
========================
    FONDS DES CARTES
========================
*/


.sunny {

    background:

    linear-gradient(
        135deg,
        #006b9d,
        #f6bb53
    );

}

.clearing {
    background:

        radial-gradient(
            circle at 30% 20%,
            rgba(255,220,80,.65),
            rgba(255,180,0,.15),
            transparent 65%
        ),

        linear-gradient(
            180deg,
            rgba(80,150,220,.25),
            rgba(20,40,70,.55)
        );
}

.clear {

    background:

    linear-gradient(
        135deg,
        #006b9d,
        #deddaf
    );

}



.rainy {

    background:

    linear-gradient(
        135deg,
        #406a8d,
        #4582b7
    );

}

.thunder {
    background:

    linear-gradient(
        135deg,
        #303940,
        #1f2e3c
    );
}


.cloudy {

    background:

    linear-gradient(
        135deg,
        #bdc3c7,
        #6a90b6
    );

}



.overcast {

    background:

    linear-gradient(
        135deg,
        #757f9a,
        #d7dde8
    );

}



.polluted {

    background:

    linear-gradient(
        135deg,
        #6b6f73,
        #2f3133
    );


    box-shadow:

        0 0 30px rgba(180,180,180,.35);

}

.foggy {
    background:

    linear-gradient(
        135deg,
        #8eaeb1,
        #b2c0ce
    );
}

/*
========================
    FOND GLOBAL METEO
========================
*/

body::before {

    content:"";

    position:fixed;

    inset:0;

    z-index:-2;

    pointer-events:none;

    opacity:.65;

    transition:

        opacity 2s ease,

        background 2s ease,

        transform 2s ease;

}



body::after {

    content:"";

    position:fixed;

    inset:0;

    z-index:-1;

    pointer-events:none;

}



/*
========================
    ENSOLEILLÉ
========================
*/

body.sunny::before {

    background:

        radial-gradient(
            circle at center,
            rgba(255,220,80,.9),
            rgba(255,170,0,.25),
            transparent 70%
        );

    animation:

        sunnyGlow 8s ease-in-out infinite alternate;

}



@keyframes sunnyGlow {

    from {

        transform:scale(1);

        opacity:.55;

    }

    to {

        transform:scale(1.25);

        opacity:.8;

    }

}



/*
========================
    DÉGAGÉ
========================
*/

body.clear::before {

    background:

        radial-gradient(
            circle,
            rgba(120,200,255,.45),
            rgba(0,120,255,.15),
            transparent 75%
        );

    animation:

        clearSky 12s ease-in-out infinite alternate;

}



@keyframes clearSky {

    from {

        transform:scale(1);

    }

    to {

        transform:scale(1.15);

    }

}



/*
========================
    PLUVIEUX
========================
*/

body.rainy::before {

    background:

        linear-gradient(
            180deg,
            rgba(45,75,120,.85),
            rgba(15,25,45,.95)
        );

}



body.rainy::after {

    background:

        repeating-linear-gradient(
            120deg,
            transparent 0px,
            transparent 18px,
            rgba(255,255,255,.08) 20px,
            transparent 22px
        );

    animation:

        rainMove .7s linear infinite;

}



@keyframes rainMove {

    from {

        background-position:0 0;

    }

    to {

        background-position:0 90px;

    }

}



/*
========================
    ORAGE
========================
*/

body.thunder::before {

    background:

        linear-gradient(
            180deg,
            #1b1d25,
            #050608
        );

}



body.thunder::after {

    background:

        rgba(255,255,255,0);

    animation:

        lightning 8s infinite;

}



@keyframes lightning {

    0%,92%,100% {

        background:rgba(255,255,255,0);

    }

    93% {

        background:rgba(255,255,255,.6);

    }

    94% {

        background:rgba(255,255,255,0);

    }

    95% {

        background:rgba(255,255,255,.35);

    }

}



/*
========================
    NUAGEUX
========================
*/

body.cloudy::before {

    background:

        radial-gradient(
            circle,
            rgba(255,255,255,.35),
            rgba(90,100,120,.75)
        );

    animation:

        cloudyZoom 12s ease-in-out infinite alternate;

}



@keyframes cloudyZoom {

    from {

        transform:scale(1);

        opacity:.45;

    }

    to {

        transform:scale(1.25);

        opacity:.7;

    }

}



/*
========================
    COUVERT
========================
*/

body.overcast::before {

    background:

        linear-gradient(
            180deg,
            rgba(170,180,190,.45),
            rgba(60,70,80,.9)
        );

    animation:

        overcastMove 10s ease-in-out infinite alternate;

}



@keyframes overcastMove {

    from {

        opacity:.45;

    }

    to {

        opacity:.7;

    }

}



/*
========================
    BROUILLARD
========================
*/

body.foggy::before {

    background:

        radial-gradient(
            circle,
            rgba(220,230,235,.5),
            rgba(120,130,140,.55),
            rgba(70,80,90,.8)
        );

    animation:

        fogMove 10s ease-in-out infinite alternate;

}



@keyframes fogMove {

    from {

        transform:

            scale(1)

            translateX(-20px);

        opacity:.45;

    }

    to {

        transform:

            scale(1.15)

            translateX(20px);

        opacity:.75;

    }

}



/*
========================
    POLLUÉ
========================
*/

body.polluted::before {

    background:

        radial-gradient(
            circle,
            rgba(180,180,180,.25),
            rgba(90,90,90,.6),
            rgba(30,30,30,.95)
        );

    animation:

        pollutionPulse 7s ease-in-out infinite alternate;

}



body.polluted::after {

    background:

        radial-gradient(
            ellipse,
            rgba(220,220,220,.08),
            transparent 70%
        );

    animation:

        smogDrift 14s ease-in-out infinite alternate;

}



@keyframes pollutionPulse {

    from {

        transform:scale(1);

        opacity:.4;

    }

    to {

        transform:scale(1.2);

        opacity:.75;

    }

}



@keyframes smogDrift {

    from {

        transform:

            translateX(-40px)

            scale(1);

    }

    to {

        transform:

            translateX(40px)

            scale(1.15);

    }

}

/*
========================
    CLEARING
========================
*/

body.clearing::before {

    background:

        radial-gradient(
            circle at 30% 20%,
            rgba(255,220,80,.65),
            rgba(255,180,0,.15),
            transparent 65%
        ),

        linear-gradient(
            180deg,
            rgba(80,150,220,.25),
            rgba(20,40,70,.55)
        );

    animation:

        clearingGlow 8s ease-in-out infinite alternate;

}

body.clear::after {

    background:

        repeating-linear-gradient(
            120deg,
            transparent 0,
            transparent 22px,
            rgba(255,255,255,.08) 24px
        );

    animation:

        clearingRain .9s linear infinite;

}

@keyframes clearingGlow {

    from {

        transform: scale(1);

        opacity: .55;

    }

    to {

        transform: scale(1.15);

        opacity: .8;

    }

}

@keyframes clearingRain {

    from {

        background-position: 0 0;

    }

    to {

        background-position: 0 80px;

    }

}

/*
========================
    RESPONSIVE MOBILE
========================
*/

@media (max-width: 768px) {

    body {

        padding:20px;

    }

    h1 {

        font-size:1.6rem;

    }

    #weatherContainer {

        gap:12px;

    }

    .card {

        flex-direction:column;

        align-items:center;

        text-align:center;

        gap:15px;

        padding:20px;

    }

    .weather-icon {

        width:64px;

        height:64px;

    }

    .infos {

        align-items:center;

        text-align:center;

        gap:6px;

    }

    .weather {

        font-size:22px;

    }

    .current {

        min-height:auto;

    }

}

@media (max-width: 480px) {

    body {

        padding:15px;

    }

    .logo {

        width:72px;

    }

    h1 {

        font-size:1.4rem;

    }

    .card {

        padding:15px;

        border-radius:8px;

    }

    .weather {

        font-size:20px;

    }

    .weather-icon {

        width:56px;

        height:56px;

    }

}