/**** Importation des polices ****/

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Pacifico&display=swap');

/**** Reset ****/

*,
::before,
::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul {
    list-style-type: none;
}

button {
    border: none;
    outline: none;
}

h1,
h2,
h3 {
    font-family: "Pacifico", sans-serif;
}

/**** body ****/

body {
    background-color: #d4d8f0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-inline: 12px;
    font-family: "Figtree", sans-serif;
}

/**** loader ****/

.loader-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background-color: #000000;
    animation: display-loader 3s linear;
}

/**** Animation display-loader ****/

@keyframes display-loader {
    0% {
        visibility: visible;
        opacity: 1;
    }

    70% {
        opacity: 0.7;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.loader-container,
.sun {
    position: fixed;
    margin: auto;
    visibility: hidden;
}

.loader-container,
.sun,
.sun::before,
.sun::after,
.sun-core {
    inset: 0;
}

.sun::before,
.sun::after,
.sun-core,
.text {
    position: absolute;
}

.sun {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #f59e0b;
    box-shadow: 0 0 25px#f59e0b;
    z-index: 50;
    animation: rotateSun 3s linear;
}

/**** Animation rotateSun ****/

@keyframes rotateSun {
    0% {
        visibility: visible;
        opacity: 0.7;
        transform: rotate(0deg);
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
        transform: rotate(360deg);
    }
}

.sun::before,
.sun::after {
    content: "";
    background-color: #f59e0b;
    border-radius: 20px;
    z-index: -1;
}

.sun::before {
    transform: rotate(30deg);
}

.sun::after {
    transform: rotate(60deg);
}

.sun-core {
    background-color: #facc15;
    border-radius: 50%;
    z-index: 70;
}

.text {
    bottom: 10%;
    color: #fffffe;
    font-size: 1.5rem;
    text-align: center;
    font-family: "Pacifico", sans-serif;
    text-transform: uppercase;
    animation: pulseText 3s ease-in-out;
}

/**** Animation pulseText ****/

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/**** header, footer,
main ****/

header,
footer,
main {
    display: flex;
    justify-content: center;
    align-items: center;
}

/**** header, footer ****/

header,
footer {
    padding: 40px 12px;
}

/**** h1, .copyright ****/
h1,
.copyright {
    text-align: center;
}

/**** h1 ****/

h1 {
    font-size: 2.2rem;
    margin: 0;
}

h1 i {
    padding-left: 6px;
}

/**** main ****/

main {
    flex-grow: 1;
}

/**** container principal ****/

.container {
    height: 400px;
    background-color: #232946;
    color: #fffffe;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}

/**** left side ****/

.left-info {
    position: relative;
    width: 260px;
    height: 100%;
    float: left;
    display: flex;
    border-radius: 25px;
    justify-content: center;
    background: url("img/background-meteo.jpg");
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    box-shadow: 0 0 20px -10px rgba(0, 0, 0, 0.2);
    text-transform: capitalize;
    transition: background-image 0.2s ease-in-out;
}

.pic-gradient {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #5c6bc0 10%, #0d47a1 100%);
    border-radius: 25px;
    opacity: 0.5;
}

.pic-gradient,
.today-info,
.today-weather {
    position: absolute;
}

.today-info {
    margin-top: 20px;
}

.today-info,
.today-weather {
    display: flex;
    flex-direction: column;
}

.today-info h2 {
    text-transform: uppercase;
}

.today-info h2,
.today-info span,
.taday-info div {
    padding-bottom: 8px;
}

.today-weather {
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    margin-top: 30px;
}

.today-weather .bx {
    font-size: 6rem;
    margin-bottom: 20px;
}

.today-info,
.today-weather .bx,
.weather-temp,
.today-weather h3 {
    text-align: center;
}

.weather-temp {
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 20px;
}

.today-weather h3 {
    line-height: 1.5;
}

/**** right side ****/

.right-info {
    float: right;
    position: relative;
    height: 100%;
    padding-top: 25px;
}

.day-info {
    padding: 25px 35px;
}

.day-info,
.days-list li {
    display: flex;
    flex-direction: column;
}

.day-info div:not(:last-child) {
    margin-bottom: 6px;
}

.day-info div .title {
    text-transform: uppercase;
    font-weight: 700;
}

.day-info div .value {
    float: right;
}

.days-list {
    display: flex;
    margin: 10px 35px;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.35);
    border-radius: 10px;
}

.days-list li {
    padding: 15px;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
}

.days-list li:hover {
    transform: scale(1.1);
    background-color: #fffffe;
    color: #222831;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
}

.days-list li .bx {
    margin-bottom: 5px;
    font-size: 2rem;
}

.days-list li .day-temp {
    margin-top: 6px;
    font-weight: 700;
}

/**** bouton ****/

.btn-container {
    padding: 25px 35px;
}

.loc-button {
    width: 100%;
    font-weight: 700;
    border-radius: 6px;
    padding: 10px;
    background-color: #d4d8f0;
    color: #232946;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    transition: background-color 0.3s ease-in-out,
        border-radius 0.3s ease-in-out;
}

.loc-button:hover {
    background-color: #b8c1ec;
    border-radius: 25px;
}

/**** footer ****/

.copyright {
    font-size: 1.2rem;
    font-weight: 500;
}

/**** Responsive design version mobile ****/

@media screen and (max-width: 767px) {
    h1 {
        font-size: 2rem;
    }

    .container {
        display: flex;
        flex-direction: column;
        width: 95%;
        height: 100%;
    }

    .left-info,
    .right-info {
        width: 100%;
        height: 380px;
    }

    .today-info {
        top: 0;
    }

    .today-weather .bx {
        margin-top: 20px;
    }

    .day-info,
    .btn-container {
        padding: 20px;
    }

    .days-list {
        margin: 10px 20px;
    }

    .days-list li {
        width: 25%;
    }

    .copyright {
        line-height: 1.5;
    }
}