html {
    scroll-behavior: smooth;
}

body {
    background: white;
}

main#wrapper {
    width: 100%;
    min-height: 100vh;

    background: white;

    padding: var(--gutter) var(--margin);
    box-sizing: border-box;
}

#site-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: var(--gutter);
}

#site-header h1 {
    flex-basis: 100%;
}

/* ====================================================== */
/* WEATHER CARD */
/* ====================================================== */

.weather-card {
    background: white;
    color: var(--color-black);
    border-radius: 24px;
    padding: var(--margin);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: var(--margin);
    flex-basis: calc(50% - var(--margin));
    height: 180px;
    max-width: 350px;
    min-width: 350px;
    position: relative;
}

#weather-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--margin);
    width: 100%;

}

#weather-title {
    display: flex;
    width: 100%;
    justify-content: center;
}

.weather-img {
    width: 100px;
}

.weather-img figure {
    width: 100%;
}

.weather-info {
    display: flex;
    gap: var(--gutter);
    justify-content: space-between;
    align-items: center;
}

.temperature-section {
    display: flex;
    flex-direction: column;
    gap: calc(var(--margin) / 2);
}

.wind-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.direction {
    display: flex;
    justify-content: space-between;
}

.wind-label {
    font-size: 13px;
    display: flex;
    align-items: center;
}

.wind-speed {
    font-size: 13px;
}

.wind-details {
    display: flex;
    align-items: center;
    gap: var(--margin);
}

.wind-details figure img {
    vertical-align: bottom;
}

.direction {
    position: relative;
}

.wind-arrow {
    position: absolute;
    right: -16px;
    top: -12px;
    transform-origin: center;
    transition: transform 0.3s ease;
    width: 16px;
}


.weather-card cite {
    position: absolute;
    bottom: 4px;
    right: 16px;
    font-size: 10px;
    color: #667eea;
    text-decoration: underline;
}

.weather-card cite a {
    color: #667eea;
    text-decoration: underline;
}

/* @media screen and (max-width: 1600px) {

    .weather-card {
        width: 250px;
    }

    .weather-info {
        flex-direction: column;
        flex-wrap: wrap;
        gap: calc(var(--margin)/2);
    }

    .temperature-section {
        flex-basis: 100%;
    }

} */

/* @media screen and (max-width: 1350px) {

    .weather-card {
        flex-direction: column;
        width: 130px;
        height: 220px;
        padding: 8px;
    }

    .temperature-section {
        gap: 4px;
    }

    .temperature-section p {
        font-size: 20px;
    }

    .wind-section {
        display: none;
    }

} */

@media screen and (max-width: 1000px) {
    .section {
        flex-direction: column;
    }

    main section#infos-section article.infos-card {
        flex-basis: 100%;
        max-width: 100%;
    }

    .weather-card {
        max-width: 250px;
        min-width: 250px;
        height: 190px;
        flex-direction: row;
    }

    .weather-info {
        flex-direction: column;
        flex-wrap: wrap;
        gap: calc(var(--margin)/2);
        max-width: 300px;
    }

    .temperature-section {
        flex-basis: 100%;
    }

    .wind-section {
        display: flex;
    }

}

@media screen and (max-width: 760px) {

    .card-content {
        flex-wrap: wrap;
        flex-direction: column;
    }

    #site-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--margin);
    }


    .weather-card {
        max-width: 350px;
        min-width: 350px;
        height: 160px;
        flex-direction: row;
        justify-content: space-around;
    }

    .weather-info {
        flex-wrap: nowrap;
        flex-direction: row;
    }

    .temperature-section {
        flex-basis: 50%;
    }

    .wind-section {
        display: flex;
        flex-direction: column;
        width: 120px;
    }

    .wind-arrow {
        right: 30px;
    }

    .info {
        width: 100%;
    }

}

.onglets-container {
    display: flex;
    align-items: center;

    width: 100%;
    justify-content: center;
}

.onglets-container:first-of-type {
    margin-bottom: var(--gutter);
}

.onglets-container ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gutter);
    align-items: center;
    justify-content: center;
    width: 100%;
}

.onglets-container ul li a,
.onglets-container ul li,
a#back {
    transition: all .3s ease-in;
}

.onglets-container ul li a,
a#back {
    border-bottom: 3px solid var(--color-black);
    padding: 2px;
}

.onglets-container ul a:hover,
a#back:hover {
    color: var(--color-secondary);
    border-bottom: 3px solid var(--color-secondary);
}

.onglets-container .active {
    color: var(--color-secondary) !important;
    border-bottom: 3px solid var(--color-secondary) !important;
}

#back-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: var(--gutter);
}

/* ------------------------------------------------------------------------------ */
/* INFOS SECTION + CARD STYLE */
/* ------------------------------------------------------------------------------ */

section#infos-section {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gutter);
    align-items: start;
    width: 100%;
}

.section {
    display: flex;
    width: 100%;
    gap: var(--gutter);
}

section#infos-section article.infos-card {
    position: relative;
    flex-basis: calc((100% - var(--gutter))/2);
    max-width: calc((100% - var(--gutter))/2);

    background: var(--color-white);
    border-radius: 25px;
    -webkit-box-shadow: 0px 0px 15px 3px rgba(27, 38, 59, 0.25);
    box-shadow: 0px 0px 15px 3px rgba(27, 38, 59, 0.25);
}

section#infos-section article.graphique {
    max-width: calc((100% - 2 * var(--gutter))/2);
}

#graphique-section {
    flex-wrap: wrap;
    justify-content: center;
}



section#infos-section article.graphique .card-content {
    flex-direction: column;
    align-items: center;
    max-height: 500px;
}

section#infos-section article.infos-card .card-head {
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--margin);

    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

section#infos-section article.infos-card .card-content {
    padding: var(--margin);
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


#description-container {
    width: 100%;
    text-align: center;
}

section#infos-section article.infos-card .card-content .info {
    display: flex;
    gap: 1rem;
    margin: var(--margin) 0;
}

.info p {
    display: flex;
    align-items: center;
}

section#infos-section article#infos-base .card-content {
    flex-wrap: wrap;
}

#infos-container {
    width: 100%;
}

li.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

li.info-item img {
    width: 50px;
}


#infos-container .info ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: calc(var(--margin) / 2);
}

#more-info {
    display: flex;
    gap: var(--margin);
    width: 100%;
}

.map-container {
    width: 100%;
    height: 500px;
    position: relative;
}


/* ------------------------------------------------------------------------------ */
/* CARROUSEL */
/* ------------------------------------------------------------------------------ */

.carousel-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    min-width: 100%;
    max-width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    width: 100%;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-slide img {
    width: 100%;
    min-width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-caption {
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    padding: 0 20px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-orange);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(27, 38, 59, 0.25);
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: calc(24px * 1.1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(27, 38, 59, 0.35);
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #667eea;
    transform: scale(1.2);
}


/* ------------------------------------------------------------------------------ */
/* CARTE CARD */
/* ------------------------------------------------------------------------------ */


#comboD {
    width: 100%;
    min-height: 50%;
}

#comboM {
    width: 100%;
    height: 50%;
}

#map {
    width: 100%;
    height: 100%;
}



/* ------------------------------------------------------------------------------ */
/* CARTE GRAPHIQUE */
/* ------------------------------------------------------------------------------ */

.chart-container {
    max-width: 750px;
    width: 100%;
    height: 500px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
}

/* ------------------------------------------------------------------------------ */
/* CARTE 3D MAP */
/* ------------------------------------------------------------------------------ */

section#infos-section article.map3D {
    flex-basis: 100% !important;
}

.map3D-container {
    width: 100%;
    height: 500px;
}

.map3D-container iframe {
    height: 100%;
    width: 100%;

    border-radius: 12px;
    overflow: hidden;
}

/* ------------------------------------------------------------------------------ */
/* FRISE */
/* ------------------------------------------------------------------------------ */

section#infos-section article.frise {
    flex-basis: 100%;
    max-width: 100%;
}

section#infos-section article.frise .card-content,
section#infos-section article.carrousel .card-content {
    min-height: 200px;
    height: calc(100% - 70px);
    align-items: center;
}

#svg-container svg {
    display: block;
    border: 0px solid black;
}

#svg-container {
    width: 100%;
    transition: width 0.5s ease;
    overflow-x: auto;
    overflow-y: auto;

    max-height: 100vh;
    resize: vertical;
    padding: 0 var(--margin);
    margin: 0 var(--gutter);
}

.tooltip {
    position: absolute;
    background: rgba(200, 200, 200, 0.7);
    color: rgb(0, 0, 0);
    padding: 5px;
    border-radius: 3px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    display: none;
}

/* HELP */


.help-wrapper {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
}

#infos-section .help-wrapper {
    background-color: rgb(7, 50, 45, .4);
}

.help-wrapper svg {
    margin-right: var(--margin);
}

.help-wrapper figure {
    margin-right: var(--margin);
}

.service-fig {
    width: 32px;
    height: 32px;
}

.service-icon {
    width: 100%;
    height: 100%;
}


.help-icon {
    background: var(--color-secondary);
    color: var(--color-white);
    font-size: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.help-container {
    position: absolute;
    top: 40px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: none;
    z-index: 1001;
    font-family: Arial, sans-serif;
}

.help-header {
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.help-header button {
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.help-header .help-close {
    background: rgb(255, 104, 104);
    padding: 2px 4px;
}

.help-content {
    padding: 15px;
}

.help-content h2,
.help-content h3 {
    margin-top: 10px;
    margin-bottom: 8px;
}

.help-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-content a {
    text-decoration: underline;
    color: steelblue;

    display: flex;
    align-items: center;
    margin: 4px 0;
}

#biblio-list {
    display: block;
    padding: var(--gutter);
    list-style-type: disc;
}

#biblio-list a {
    text-decoration: underline;
    /* color: steelblue; */
}