
/* Variables de couleurs pour faciliter les modifications */
:root {
    --color-primary: #7091ff;
    --color-secondary: #6c757d;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-dark: #343a40;
    --color-light: #f8f9fa;
    --color-background: #f4f7f9;
    --color-card-background: #ffffff;
    --color-border: #e0e6ed;
    --color-text-primary: #333333;
    --color-text-secondary: #6c757d;
    --color-shadow: rgba(0, 0, 0, 0.02);
    --color-voeux: #0a31ce;
    --color-acces: #00E396;
    --color-filles: #577EFF;
    --color-boursiers: #577EFF;
    --color-academie: #0A31CE;
}

/* Réinitialisation de base */
* {
    box-sizing: border-box;
    font-family: 'Geomanist', Arial, sans-serif;
}

/* Styles généraux du corps */
body {
    font-family: sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
}

.chapeau {
    width: calc(100vw - 50px);
    margin: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}

.chapeau H1 {
    margin:30px;
    margin-top: 10px;
    font-size: 3rem;
    line-height: 1;
    text-decoration: underline;
}

.chapeau p {
    color: #555;
    font-weight: 400;
    font-size: 1.2rem;
    width: 70vw;
}

.chapeau p b{
    color: black;
    font-weight: 500;

}

.chapeau p a{
    color: #66a;
    text-decoration-style: dotted;
}


.graphique-integre-ecoles {
    width: 70vw;
    margin: 30px 0;
}

        #school-tags {max-height: 200px; overflow-y: auto; padding: 10px; }
        .tag-graphiques { display: inline-block; margin: 3px; padding: 8px 12px; border-radius: 10px; border: 1px dashed #c0c0c0; background-color: #f1f1f1; cursor: pointer; }
        .tag-graphiques:hover { background-color: #e1e1e1; }
        .tag-graphiques.active { background-color: #d2d8df; color: black; border: 1px solid #a2a8af;}
        .tag-graphiques.active:hover { background-color: #c3c8cf;}
        .chapeau .chart-container { margin: 30px;width: 70vw; }

.chapeau #select-all-schools {
    display: inline-block;
    margin: 3px; padding: 8px 12px; 
    border-radius: 10px;
    border: 1px solid #c0c0c0;
    background-color: #f1f1f1;
    cursor: pointer;
    transition: all 0.3s;
}

.chapeau #select-all-schools:hover {
    opacity: .8;
    background-color: #e1e1e1;
}

.chapeau .row {
    width: 70vw;
    margin: 50px 0;

}

.chapeau .row {
    text-align: center;
}


/* Styles pour la carte de la France */
.france-map {
    width: calc(100vw - 50px);
    background-color: #ddd;
    box-sizing: border-box !important;
    height: 500px; /* Hauteur fixe pour un affichage clair */
    margin: 0px 25px; /* Marge supérieure pour la séparer de la navbar */
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
}
.maplibregl-map {
    width: calc(100vw - 50px);
}

.mapboxgl-map{
width: calc(100vw - 50px);

}
/* Conteneur principal */
#main-container {
    display: flex;
    width: calc(100vw - 50px);
    margin: 0px 25px;
    padding: 20px 0;
    gap: 20px;
    margin-bottom: 20px;
}

/* Conteneur du contenu qui défile */
.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Styles de la barre latérale */
.sidebar {
    width: 500px;
    background-color: var(--color-card-background);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
    flex-shrink: 0;


}

.sidebar h2 {
    margin-top: 0;
    font-size: 1.5em;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border);
}

.school-list, .anchors-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.school-item, .nav-link {
    padding: 12px 15px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: block;
    text-decoration: none;
    color: var(--color-text-primary);
}

.school-item:last-child { margin-bottom: 0; }
.school-item:hover, .school-item.active {
    background-color: var(--color-primary);
    color: var(--color-light);
    box-shadow: 0 2px 4px rgba(10, 49, 206, 0.2);
}

.sidebar-extra {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
    gap: 20px;
}

 .sidebar .ecole-image { flex: 1; width: 100%; border-radius: 8px; display:flex; align-items: start; justify-content: center; overflow: hidden;}
 .sidebar .ecole-image img {   height:100%; object-fit:cover; filter: saturate(0%) sepia(30%) hue-rotate(170deg);}

.sidebar .map-container { height: 200px; width: 100%; border-radius:8px; overflow:hidden;}

.school-main-block h1 { margin: 0 0 12px 0; font-size: 1.6rem; }
.school-main-block .parcoursup-background { margin-top: 8px; }
/* Ajustement responsive rapide */
@media (max-width: 900px) {
    .sidebar .map-container { height:200px; }
}



/* Styles spécifiques aux ancres */
.anchors-list {
    margin-top: 20px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}
.nav-link.active-anchor {
    font-weight: bold;
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
    padding-left: 12px;
    background-color: var(--color-background);
}
.nav-link:not(.active-anchor):hover {
    color: var(--color-primary);
    background-color: var(--color-background);
}

/* En-tête du contenu principal */
.content-header {
    background-color: var(--color-card-background);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--color-shadow);
    text-align: center;
    margin-bottom: 20px;
    z-index: 200;
}

.content-header h1 {
    margin: 0;
    font-size: 2.5em;
}

.content-area {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px var(--color-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex:1;
}

#entityZone-ecoles {
    display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-y: scroll;
  flex-direction: row;
  width: auto;
  justify-content: start;
  align-content: ;
  align-items: start;
  gap: 5px;
}

.entityLink {
  text-decoration: none;
  margin:0 !important;

  flex-grow: 1;
  flex-shrink: 1;
}

.entity {
    border:none !important;
    box-shadow: 0px 3px 7px 2px rgb(0,0,0,0.02) !important;
}



/* Style du bouton du menu déroulant */



.dropdown {
    margin-top: 20px;
    background-color: #f4f0ff;
  border: 1px solid #d8c9ff;
    border-radius: 10px;
}
.dropbtn, .dropbtn2 {
    display: flex;
    font-weight: 500;
    justify-content: space-between;
    color: black;
    padding: 12px;
    font-size: 18px;
    border: none;
    cursor: pointer;

    background-color: transparent;
    width: 100%;
    text-align: left;
}

.dropbtn  img, .dropbtn2  img{
    height: 19px;
    margin-right: 10px;
    margin-bottom: -3px;
}
/* Conteneur du menu déroulant */
.dropdown-content {
    overflow: hidden;
    transition: max-height 0.5s, padding 0.4s;
        max-height: 0;
}

/* Liens à l'intérieur du menu déroulant */
.dropdown-content a {
    color: black;
    padding: 0px 10px;
    text-decoration: none;
    display: block;
}

.droptext {
    padding: 10px 20px;
}

.droptext a {
    padding: 0;
    display: contents;
    word-wrap: break-word !important;
    color: #7900cF;
    font-style: italic;
}

/* Style des tags */
.tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: white;
}

/* Style du conteneur du menu déroulant quand il est ouvert */
.dropdown.active .dropdown-content {
    scrollbar-width: thin;
        scrollbar-color: red;
    max-height: 1000px; /* Ajustez cette valeur en fonction du contenu */
    padding-bottom: 10px;
    transition: max-height 0.5s, padding 0s;
}


/* Sections de données (cartes) */
.data-card {
    margin-top: 20px;
    border-radius: 10px;
}

.data-card h2 {
    font-size: 2em;
    margin: 0;
}
.data-card h3 {
    font-size: 1.5em;
    margin: 0;
    color: var(--color-primary);
}

.data-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.data-stats {
    flex: 1;
    min-width: 300px;
}

.stat-voeux {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 140%;
}

.stat-admis {
    color: black;
    font-size: 180%;
    font-weight: 700;
}

.map-container {
    width: 400px;
    height: 300px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gauge-group {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    margin-top: 0px;
    flex-wrap: wrap;
    gap: 10px;
}

.gauge-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.chart-title {
    font-size: 0.9em;
    font-weight: bold;
    color: black;
    margin-bottom: -10px;
    margin-top: 20px;
}

.lien-suptracker {
    margin-top: 20px;
    text-align: right;
}

.lien-suptracker a {
    color:#0ab6c2;
}
/* Sous-formations */
.sub-formation-container {
    border: 1px dashed #c9d8ff;
    padding: 15px;
    background-color: #e5ebff;
    margin-top: 15px;
}

.sub-formation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    color: black;
    cursor: pointer;
}

.sub-formation-details {
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 15px;
    padding-left: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.sub-formation-details.visible {
    display: flex;
}

/* Styles pour la section Parcoursup avec le logo */
.parcoursup-background {
    background-color: #f0f4ff; /* Un fond bleu très clair pour la distinguer */
    border: 1px solid #c9d8ff;
    padding: 20px;
    border-radius: 10px;
}

.section-header-with-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.parcoursup-logo {
    width: 34px; /* Taille du logo */
    height: auto;
}

.archiverse-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.ecole-image-container {
    width: 100%;
    height: auto;
}

.archiverse-image {
    width: 100%;
    max-width: 100%; /* Assure que l'image ne dépasse pas la largeur de son conteneur */
    height: auto; /* La hauteur s'ajuste automatiquement en fonction de la largeur */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.archiverse-text {
    flex-grow: 1;
}

.content-header h1 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}





/*/* POPUP MAP FRANCE -------------------------------------------------------- */
/*/* POPUP MAP FRANCE -------------------------------------------------------- */
/*/* POPUP MAP FRANCE -------------------------------------------------------- */
/*/* POPUP MAP FRANCE -------------------------------------------------------- */

/* Styles pour personnaliser le popup de la carte */
.maplibregl-popup {
    /* Retirer l'ombre par défaut si souhaité */
    box-shadow: none;
    transition: opacity 4s ease-in;
    /* Cache le popup au départ */
    opacity: 0 !important;

}

/* Cible le conteneur du popup pour les bords arrondis */
.mapboxgl-popup-content, .maplibregl-popup-content {
    padding: 0 !important; /* Supprime le padding par défaut */
    border-radius: 10px !important;
    margin-bottom: 10px;
    background-color: white !important;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1) !important;
     /* Ajoute une ombre plus douce */
}

/* Cible l'en-tête (votre h3) pour un style plus propre */
.maplibregl-popup-content h3 {
    margin: 0;
    padding: 10px 10px; /* Ajoute un padding pour le texte à l'intérieur */
    padding-bottom: 7px;
    font-size: 1.1em;
    line-height: 1;
    font-weight: bold;
    color: black; /* Utilise la couleur principale */
}

/* Cible le "bec" du popup pour l'harmoniser avec le reste */
.maplibregl-popup-tip {
    border-color: var(--color-card-background);
    display: none;
}

.maplibregl-popup.animated-popup {
    /* Le popup devient visible et s'anime */
    opacity: 1 !important;
}

.cache-ordi {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {

.cache-ordi {
    display: block !important;
}
    .chapeau p {
    width: 80vw;
}

.chapeau .row {
    width: 60vw;
}

.graphique-integre-ecoles {
  width: 100vw;
  padding: 20px;
  background-color: #eee;
}

.chapeau  .chart-container {
margin-bottom: 30px;  width: 100vw;
  padding: 20px;
  background-color: #eee;
}


    #main-container {
        flex-direction: column;
    }


    .sidebar {
        width: 100%;
        position: static;
    }

    .sidebar .ecole-image {
        height: 20vh;
    }

    .sidebar .ecole-image img {
      object-fit: cover;
      max-height: 20vh;
      width: 100%;
    }


.gauge-group {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-end;
    margin-top: 0px;
    flex-wrap: wrap;
    gap: 10px;
}

.gauge-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}


    .content-wrapper {
        padding-right: 0;
    }
    .data-summary {
        flex-direction: column;
    }
    .map-container {
        width: 100%;
    }

  .mapboxgl-ctrl-attrib.mapboxgl-compact-show, .maplibregl-ctrl-attrib.maplibregl-compact-show {
    padding: 2px 28px 2px 8px;
    visibility: hidden;
}


}


@media (max-width: 524px) {
.gauge-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 0px;
    flex-wrap: wrap;
    gap: 10px;
}
}
