/* ALL -------------------------------------------------------- */

*{
  margin: 0;
  font-family: "Helvetica", serif;
  padding: 0;
  box-sizing: border-box;
  color: #121212;
}

::selection{
    color: #fff;
    background-color: #dcd1e2;
}

body {
    background-color: #cec7d061;
    background-size: 4%;
}

.rubik-bubbles-regular {
  font-family: "Rubik Bubbles", system-ui;
  font-weight: 400;
  font-style: normal;
}


.jura-uniquifier {
  font-family: "Jura", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

#cloud_back{
    background-image: url(../image/cloud.png);
    background-clip: padding-box;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: -20vh;
}

.gap {
    height: 100px;
}



/* STYLES DESKTOP ----------------------------------------------------------------- /

/ HEADER */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    transition: top 0.3s;
}

#header_hidden {
    visibility: hidden;
}

.logo_nav {
  /* make the logo + text a centered inline block inside the nav */
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.logo_nav img {
  /* constrain the logo height so it fits the nav and centers with the text */
  height: 2.5rem;
  width: auto;
  display: block;
}

nav {
    width: 100%;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 10px 20px;
    
}


nav ul, nav a {
    display: flex;
    font-weight: bold;
    gap: 15px;
    border-radius: 15px;
    padding: 10px 15px;
    
}
@media screen and (min-width: 576px) {
nav ul, .logo_nav{
    /* From https://css.glass */
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(3.4px);
    -webkit-backdrop-filter: blur(3.4px);
    border: 1px solid rgba(255, 255, 255, 0.26);
}
}
@media screen and (max-width: 575px) {
nav ul, .logo_nav{
    /* From https://css.glass */
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.26);
}
}

ul{
    display: flex;
    flex-direction: column;
    margin-top: 30vh;
}

#accueil_ul{
    display: flex;
    flex-direction: row;
    margin-top: 3vh;
}

nav li {
    display: flex;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    position: relative;
}

nav ul li.active a {
    font-weight: bold;
    color: #121212;
}

nav ul li.active a::after {
    content: "";
    position: absolute;
    border-radius: 20px;
    left: 0;
    bottom: 0px;
    width: 100%;
    height: 2px;
    background-color: #121212;
}

nav ul li a::after {
    content: ""; 
    position: absolute;
    right: 100%;
    bottom: 0px;
    width: 0;
    height: 2px;
    background-color: #121212;
    transition: all 0.3s ease;
}

nav ul li a:hover::after {
    right: 0;
    width: 100%; 
}

/* Bouton menu (hidden) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    position: relative; 
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #121212;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

main{
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.title_index{
  /* ensure the title is centered on the page */
  display: block;
  margin: 10% auto 0 auto;
  color: #fff;
  font-size: 8vh;
  text-align: center;
}

h2{
    display: flex;
    justify-content: center;
    margin: 6vh;
    margin-left: 15vw;
    margin-right: 15vw;
    text-align: center;
}

#direct_carte{
  /* center the button horizontally and make padding symmetric/responsive */
  display: block;
  margin: 5vh auto;
  padding: 1rem 2.5rem;
  border-radius: 40px;
  background-color: #B4D6F1;
  border: none;
  box-shadow: #2f2e2e 2px 2px 2px;
  text-align: center;
  width: fit-content;
}

#direct_carte a{
    text-decoration: none;
    font-size: x-large;
    color: #fff;
    font-family: 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}

/* CARTE FRANCE */

#map { 
    grid-column: 1/2;
    height: 100vh; 
    width: 100%;
    transition: all 0.7s ease;
    position: relative;
}

#sliderContainer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    z-index: 999;
}


#monthLabel {
    font-weight: bold;
    font-family: sans-serif;
    margin-top: 8px;
}

.side_volet{
    display: grid;
    grid-template-columns: 3fr 5fr 1fr;
    grid-template-rows: 3fr 2fr 2fr;
    background-color: #dcd1e2;
    grid-column: 2/3;
    box-shadow: 0 6px 500px rgba(0, 0, 0, 0.1);
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
}

.graph{
    background-color: #9d98a0;
    border-radius: 40px;
    grid-column: 1/2;
    margin: 1vw;
}

.text_graph{
    background-color: #dcd1e2;
    grid-column: 2/3;
    margin: 1vw;
    font-size: x-small;
    padding: 4%;
}

#cross{
    display: flex;  
    grid-column: 3/4;
    grid-row: 1/2;
    margin: 20%;
}

#cross1{
    position: absolute;
    rotate: 45deg;
    color: #848086;
}

#cross2{
    position: absolute;
    rotate: -45deg;
    color: #848086;
}

/* SIDEBAR */

.sidebar {
  position: fixed;
  right: -66.67%;
  top: 0;
  width: 66.67%;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.7s ease;
  z-index: 1000;
  padding: 0px;
  padding-left: 5px;
  box-sizing: border-box;
  border-radius: 20px 0px 0px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar.open {
  right: 0;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

#map.sidebar-open {
    width: 33.33%;
    margin-left: 0;
}

/* Page membres et tout */

#info_page{
    background-image: url(../image/clouds_again.jpg);
    background-clip: content-box;
    background-repeat: no-repeat;
    background-size: 100%;
    background-position-y: -1vh;
    background-attachment: fixed;
}

.membres{
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 2fr 1fr;
    margin-top: 25vh;
}

.blue_contener{
    display: flex;
    justify-content: center;
    text-align: center;
    border-radius: 30px;
    padding: 10px;
}

.white_contener{
    display: flex;
    text-align: start;
    border-radius: 30px;
    padding: 10px;
    flex-direction: column;
}

.mb_image{
    display: flex;
    justify-content: center;
    border-radius: 30px;
}

.no_contener{
    display: flex;
    justify-content: center;
}

#bl1{
    grid-column: 3/6;
}

#bl2{
    background-image: url(../image/paint.png);
    background-repeat: no-repeat;
    background-size: 88%;
    background-position: center;
    padding: 2vw;
    grid-column: 2/7;
    margin-top: 5vh;
    margin-left: 7vw;
    margin-right: 7vw;
    padding-left: 22vw;
    padding-right: 22vw;
}

#mb_im2{
    grid-column: 3/4;
    width: 160%;
    margin-top: 10vh;
}

#wh1{
    background-image: url(../image/paint.png);
    background-repeat: no-repeat;
    background-size: 120%;
    background-position: center;
    grid-column: 4/7;
    margin-top: 5vh;
    margin-left: 12vw;
    padding: 15vh;
}

#bl3{
    grid-column: 3/6;
    margin-top: 5vh;
}

#bl4{
    grid-column: 2/3;
    margin-top: 5vh;
    width: 100%;
}

#bl5{
    grid-column: 4/5;
    margin-top: 5vh;
    width: 100%;
}

#bl6{
    grid-column: 6/7;
    margin-top: 5vh;
    width: 100%;
}

#nc1{
    grid-column: 2/3;
    margin-top: 5vh;
    width: 100%;
    height: 35%;
}

#nc2{
    grid-column: 4/5;
    margin-top: 5vh;
    width: 100%;
    height: 35%;
}

#nc3{
    grid-column: 6/7;
    margin-top: 5vh;
    width: 100%;
    height: 35%;
}

#nc4{
    display: flex;
    justify-content: space-between;
    grid-column: 2/7;
    margin-top: -2vh;
    width: 96%;
    margin-left: 4vw;
}

#nc5{ 
    grid-column: 2/7;
    display: flex;
    justify-content: space-around;
    margin-top: 5vh;
}

#nc6{    
    grid-column: 2/7;
    display: flex;
    justify-content: space-around;
    margin-top: 5vh;
}

#p_fin{
    display: flex;
    justify-self: flex-end;
    font-size: large;
    margin: 3vw;
}

#bl4 img, #bl5 img, #bl6 img{
    border-radius: 30px;
    object-fit: cover;
    width: 25vw;
}

#nc5 img, #nc6 img{
    width: 40vw;
}

.blue_contener h1{
    font-size: 4vw;
    font-weight: 100;
    color: #fff;
    font-family: Rubik Bubbles;
}

.blue_contener h2{
    font-size: large;
    margin: 1vw;
    font-family: Jura;
}

.white_contener h1{
    font-size: large;
    padding: 2%;
    font-family: Jura;
}

.white_contener h2{
    font-size: small;
    margin: 1vw;
    text-align: left;
    font-family: Jura;
}

.no_contener h1{
    font-size: xx-large;
    margin: 2vw;
    font-family: Jura;
}

.no_contener p {
    font-size: x-large;
    font-family: Jura;
}

hr{
    grid-column: 1/8;
    margin-top: 3vh;
    margin-bottom: 4vh;
    color: #000000;
    border-width: 1vh;
}

/* Styles spécifiques pour la page carte */
.carte-page nav {
    width: auto;
    padding: 10px;
}

.carte-page .menu-toggle,
.carte-page nav ul {
    display: none;
}

.carte-page .info-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    transition: right 0.3s ease;
}

.carte-page .circle-button {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-weight: bold;
}

/* Style des contrôles de zoom */
.carte-page .leaflet-control-zoom {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    transition: right 0.3s ease;
}

.carte-page .leaflet-control-zoom a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    background-color: white !important;
    border-radius: 50% !important;
    margin-bottom: 10px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    border: none !important;
    outline: none !important;
}

/* Ajustement lors de l'ouverture du panneau */
.carte-page .sidebar.active ~ .info-button,
.carte-page #sidebar.active ~ * .leaflet-control-zoom {
    right: 420px;
}

/* --- Sidebar content for map details --- */
.sidebar__header {
  padding: 24px 24px 12px 24px;
  border-bottom: 1px solid #eee;
  background: #f7f7f7;
  border-radius: 20px 0 0 0;
}
.sidebar__dept-name {
  margin: 0;
  font-size: 1.6em;
  font-weight: 700;
  color: #2d7cb0;
}

.sidebar__info {
  padding: 18px 24px 12px 24px;
  font-size: 1.08em;
  color: #333;
}
.sidebar__info p {
  margin: 0 0 8px 0;
}

.sidebar__charts {
  padding: 12px 24px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chart-card {
  background: #f9fafb;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(44, 62, 80, 0.06);
  padding: 18px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chart-card__title {
  margin: 0 0 6px 0;
  font-size: 1.13em;
  color: #2d7cb0;
  font-weight: 600;
}
.chart-card__placeholder {
  height: 90px;
  background: #ffffff; /* fond uni, plus de rayures */
  border-radius: 6px;
  margin-bottom: 6px;
  border: 1px solid rgba(0,0,0,0.08); /* bord fin et discret */
  box-shadow: none;
  padding: 6px; /* petit padding pour le canvas */
}
.chart-card__text {
  font-size: 0.98em;
  color: #555;
  margin: 0;
}

/* --- RESPONSIVE DESIGN --- */

/* General responsive layout for main grid and typography */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }
  .title_index {
    font-size: 7vw;
    margin-top: 16vw;
  }
  h2 {
    margin: 4vw 4vw 4vw 4vw;
    font-size: 1.3em;
  }
  #direct_carte {
    padding: 4vw 4vw;
    font-size: 1em;
    border-radius: 24px;
  }
  .membres {
    grid-template-columns: 1fr;
    margin-top: 10vw;
  }
  .blue_contener, .white_contener {
    border-radius: 18px;
    padding: 4vw;
    font-size: 1em;
  }
  #nc5 img, #nc6 img {
    width: 90vw;
  }
}

/* Responsive navigation: hamburger menu */
@media (max-width: 900px) {
  nav ul {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 5rem;
    left: 0;
    width: 100vw;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 2000;
    padding: 2vw 0;
  }
  nav ul.open {
    display: flex !important;
  }
  .menu-toggle {
    display: block !important;
  }
}

/* Responsive map and sidebar */
@media (max-width: 900px) {
  #map {
    height: 60vh;
    min-height: 320px;
    width: 100vw !important;
    grid-column: 1/2;
  }
  #map.sidebar-open {
    width: 100vw !important;
  }
}

/* --- SIDEBAR: slide from bottom on mobile --- */
@media (max-width: 900px) {
  .sidebar {
    width: 100vw !important;
    max-width: 100vw;
    left: 0;
    right: 0 !important;
    top: auto;
    bottom: -100vh;
    height: 60vh;
    min-height: 320px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
    transition: bottom 0.5s cubic-bezier(.77,0,.18,1);
    padding-left: 0;
    padding-right: 0;
  }
  .sidebar.open {
    bottom: 0;
    right: 0 !important;
  }
  .close-button {
    top: 12px;
    right: 16px;
  }
}

/* Hide sidebar from right on mobile */
@media (max-width: 900px) {
  .sidebar {
    right: auto;
  }
}

/* Adjust sidebar content for mobile */
@media (max-width: 900px) {
  .sidebar__header, .sidebar__info, .sidebar__charts {
    padding-left: 6vw;
    padding-right: 6vw;
  }
  .sidebar__charts {
    padding-bottom: 4vw;
  }
}

/* Responsive adjustments for map controls/buttons */
@media (max-width: 900px) {
  .carte-page .info-button {
    bottom: 16px;
    right: 16px;
  }
  .carte-page .leaflet-control-zoom {
    top: 12px !important;
    right: 12px !important;
  }
}

/* --- RESPONSIVE DESIGN FIXES --- */

/* Make map fullscreen in responsive */
@media (max-width: 900px) {
  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  #map {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    z-index: 1;
    grid-column: 1/2;
  }
  #map.sidebar-open {
    width: 100vw !important;
  }
  main {
    display: block;
    padding: 0;
    margin: 0;
  }
}

/* Sidebar slides from bottom and is scrollable in responsive */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    width: 100vw !important;
    max-width: 100vw;
    left: 0;
    right: 0 !important;
    top: auto;
    bottom: -100vh;
    height: 60vh;
    min-height: 320px;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
    transition: bottom 0.5s cubic-bezier(.77,0,.18,1);
    padding-left: 0;
    padding-right: 0;
    overflow-y: auto;
    z-index: 2000;
    background: #fff;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.open {
    bottom: 0;
    right: 0 !important;
  }
  .close-button {
    top: 12px;
    right: 16px;
    z-index: 10;
  }
}

/* Prevent background scroll when sidebar is open on mobile */
@media (max-width: 900px) {
  body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100vw;
  }
}

