/* Carte de France et selection du syndrome */

.two-column {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 20px;
}

.drom {
    border-top: 1px dotted black;
}

.main-map {
    width: 100%;
}

.global-map-back {
    background-image: url(/fond-formation.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    /* background-color: var(--blue-light); */
    border-bottom: 25px solid #f35d19;
    color: #fff;
    z-index: 2;
    padding: 50px 0 6%;
    position: relative;
}

.global-map-title {
    color: var(--blue-dark);
}
.global-map-title h1 {
    font-size: 1.5rem;
}
.global-map-title span.subtitle {
    text-align: center;
    display: block;
    letter-spacing: 1px;
    font-size: 1.2rem;
    margin: 0 0 2px;
}
.switchMaps {
    --height: 1.3em;
    --border-width: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--height);
    width: max-content;
    margin-top: 1em;
    margin-inline: auto;
    padding: 0.2em;
    background-color: white;
    border: var(--border-width) solid #022c3c;
    border-radius: calc(var(--height) + var(--border-width) * 2);
    text-transform: uppercase;
}

.switchMaps p,
.switchMaps a {
    --padding: 0.8em;
    padding: 0.5em var(--padding);
    border: var(--border-width) solid transparent;
    border-radius: calc(var(--height) + var(--padding));
}

.switchMaps .activeMap {
    background-color: #022c3c;
    color: white;
}

.switchMaps a,
.switchMaps a:visited {
    color: inherit;
    text-decoration: none;
}

.switchMaps a:hover {
    border-color: #022c3c;
}

@media (max-width: 575px) {
    .switchMaps {
        flex-direction: column;
        gap: 0.3em;
    }
}

@media (min-width: 1200px) {
    .global-map-title h1:before {
        content: ' ';
        border-top: 1px solid var(--blue-dark);
        position: absolute;
        width: 60px;
        top: 26px;
        left: 55px;
    }
    .global-map-title h1:after {
        -webkit-transform: translateX(20px);
        transform: translateX(20px);
        content: ' ';
        border-top: 1px solid var(--blue-dark);
        position: absolute;
        width: 60px;
        top: 26px;
    }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .global-map-title h1 {
        font-size: 1.9rem;
    }
    .global-map-title h1:before {
        content: ' ';
        border-top: 1px solid var(--blue-dark);
        position: absolute;
        width: 30px;
        top: 23px;
        left: 15px;
    }
    .global-map-title h1:after {
        -webkit-transform: translateX(20px);
        transform: translateX(20px);
        content: ' ';
        border-top: 1px solid var(--blue-dark);
        position: absolute;
        width: 30px;
        top: 23px;
    }
}

.map-container {
    position: relative;
    width: 60%;
}

.map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-overlay p {
    position: relative;
    top: -8%;
    right: -2%;
    width: 50%;
    padding: 0.8em 0.9em;
    background-color: #022c3c;
    font-size: 1.2rem;
    text-align: center;
    box-shadow: 0 0 80px 80px rgba(60, 70, 73, 0.37);
}

@media (max-width: 991px) {
    .map-container {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .map-overlay p {
        font-size: 1rem;
        box-shadow: 0 0 50px 50px rgba(60, 70, 73, 0.37);
    }
}

@media (max-width: 575px) {
    .map-overlay p {
        width: 80%;
        box-shadow: 0 0 20px 20px rgba(60, 70, 73, 0.37);
    }
}

.legend {
    display: flex;
    flex-direction: row;
    color: var(--blue-dark);
    height: 20px;
    font-size: 0.7rem;
    justify-content: space-between;
    font-weight: bold;
}
.legend p {
    width: 30%;
    text-align: right;
    margin-right: 10%;
    margin-top: 10%;
}
.legend ul {
    list-style: none;
    width: 50%;
}
.legend-calculation-period {
    font-style: italic;
    font-size: 0.8em;
    color: #666;
    padding-left: 20px;
    width: 50px;
}
@media (min-width: 992px) {
    .legend {
        font-size: 0.9rem;
    }
}

#mapControlPanel {
    width: 40%;
    margin: 0 auto;
    font-size: 15px;
    list-style-type: none;
    padding-top: 20px;
}

.nota-bene {
    text-align: left;
    border-left: 5px solid var(--no-alert);
    background-color: #e6ecf3;
    color: var(--no-alert);
    padding: 1rem;
    margin-bottom: 1rem;
    margin-top: 5rem;
    font-weight: 500;
    font-size: 1rem;
    height: 120px;
}

.date-input-placeholder {
    height: 185px;
}

@media (max-width: 991px) {
    .date-input-placeholder {
        height: 105px;
    }
}

@media (max-width: 767px) {
    .date-input-placeholder {
        display: none;
    }
}

.nota-bene-disease {
    text-align: left;
    border-left: 5px solid var(--no-alert);
    background-color: #e6ecf3;
    color: var(--no-alert);
    padding: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    font-weight: 500;
    font-size: 1rem;
    height: 120px;
}

/* https://github.com/web-tiki/responsive-grid-of-hexagons */

#hexGrid,
#hexGridDiseases {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    padding-left: 0;
    overflow: hidden;
    font-size: 15px;
    list-style-type: none;
    padding-bottom: 10%;
}

#hexGrid {
    padding-top: 120px;
}

.hex {
    width: 30%;
    position: relative;
    visibility: hidden;
    outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hex::after {
    content: '';
    display: block;
    padding-bottom: 86.602%; /* =  100 / tan(60) * 1.5 */
}

.hexIn {
    position: absolute;
    width: 96%;
    padding-bottom: 110.851%; /* =  width / sin(60) */
    margin: 0 2%;
    overflow: hidden;
    visibility: hidden;
    outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
    -webkit-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
    -ms-transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
    transform: rotate3d(0, 0, 1, -60deg) skewY(30deg);
}

.hexIn h2,
.hexIn h3,
.hexIn svg,
.hexIn .hexLink,
.hexIn .hexDisease {
    position: absolute;
    visibility: visible;
    outline: 1px solid transparent; /* fix for jagged edges in FF on hover transition */
}
.hexLink {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    color: var(--blue-dark);
    overflow: hidden;
    -webkit-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
    -ms-transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
    transform: skewY(-30deg) rotate3d(0, 0, 1, 60deg);
    background-color: rgb(192, 190, 190);
}
.hexLink:hover,
.hexLinkSelected {
    background-color: white;
}
.hexLink svg {
    fill: var(--blue-light);
}
.hexLink svg:hover,
.hexLinkSelected svg {
    fill: var(--blue-dark) !important;
}

/*** HEX CONTENT **********************************************************************/
.hex h3 {
    font-size: 0.8em;
    z-index: 1;
    width: 100%;
    margin: 0 !important;
    word-wrap: normal;
}

.hex h3:not(.hexDisease) {
    bottom: 25%;
}
.hex h3.hexDisease {
    top: 50%;
    font-size: 1em;
    display: flex;
    padding: 5px;
    flex-direction: column;
    transform: translateY(-50%);
}
.hex h3.hexDiseaseSpinner {
    top: 37%;
    font-size: 0.7em;
    display: flex;
    flex-direction: row;
    justify-content: center;
}
.hex .allSyndromes h3 {
    top: 33%;
    font-size: 1.3em;
    z-index: 1;
    width: 100%;
    margin: 0 !important;
    font-weight: 700;
}

/*** HEXAGON SIZING AND EVEN ROW INDENTATION *****************************************************************/
@media (min-width: 992px) and (max-width: 1199px) {
    .hex .allSyndromes h3 {
        font-size: 1.1em;
    }
    .nota-bene,
    .nota-bene-disease {
        font-size: 0.8rem;
        height: 100px;
    }
    .hex h3.hexDisease {
        font-size: 0.8em;
    }
}
@media (max-width: 991px) {
    .two-column {
        flex-direction: column-reverse;
    }
    .main-map {
        width: 100%;
    }
    /* #hexGrid {
        width: 90%;
    } */
    /* <- 5-4  hexagons per row */
    #hexGrid,
    #hexGridDiseases {
        width: 100%;
        margin-top: 15px;
    }
    .hex {
        width: 25%; /* = 100 / 4 */
    }
    .hex:nth-child(7n + 5) {
        /* first hexagon of even rows */
        margin-left: 12.5%; /* = width of .hex / 2  to indent even rows */
    }
    .hex:last-of-type {
        /* first hexagon of even rows */
        margin-left: 25%; /* = width of .hex / 2  to indent even rows */
    }
    .nota-bene,
    .nota-bene-disease {
        font-size: 0.8rem;
        height: 75px;
    }
    #mapControlPanel {
        padding-top: 5px;
        width: 100%;
    }
}

@media (min-width: 993px) {
    /* <- 4-3  hexagons per row */
    .hex {
        width: 33.333%; /* = 100 / 3 */
    }
    .hex:nth-child(5n + 4) {
        /* first hexagon of even rows */
        margin-left: 16.666%; /* = width of .hex / 2  to indent even rows */
    }
    .legend ul {
        list-style: none;
        width: 60%;
        margin-left: -5%;
        margin-top: 10%;
    }
}
@media (max-width: 992px) {
    .legend ul {
        list-style: none;
        width: 60%;
        margin-top: 10%;
    }
}
@media (max-width: 767px) {
    .hexLink svg {
        display: none;
    }
    .hexLink h3.hexDiseaseSpinner svg {
        display: block;
    }
    #hexGrid,
    #hexGridDiseases {
        margin-bottom: 0;
    }
    .hex h3 {
        font-size: 0.9em;
        z-index: 1;
        width: 100%;
        margin: 0 !important;
        font-weight: 700;
        letter-spacing: 0 !important;
    }
    .hex h3 {
        top: 43%;
    }
    .hex h3.hexDisease {
        font-size: 0.8em;
    }
    .hex .allSyndromes h3 {
        top: 33%;
        font-size: 0.9em;
    }
    .legend ul {
        list-style: none;
        width: 60%;
        margin-left: -5%;
        margin-top: 10%;
    }
    .nota-bene {
        font-size: 0.8rem;
        height: 75px;
    }
}
@media (max-width: 575px) {
    .global-map-title h1 {
        font-size: 1.6rem;
    }
    .global-map-title span.subtitle {
        font-size: 1.2rem;
        margin: 0 0 5px;
    }
    .hex h3,
    .hex h3.hexDisease {
        font-size: 2.6vw;
        z-index: 1;
        width: 100%;
        margin: 0 !important;
        font-weight: 700;
        letter-spacing: 0 !important;
        top: 43%;
    }
    .hex h3.hexDisease {
        top: 50%;
        font-size: 2.5vw;
    }
    .hex h3.hexDiseaseSpinner {
        top: 25%;
    }
    .hex .allSyndromes h3 {
        font-size: 2.8vw;
    }
    .legend ul {
        list-style: none;
        width: 70%;
        margin-left: -5%;
        margin-top: 1%;
    }
    .legend p {
        width: 30%;
        text-align: right;
        margin-right: 10%;
        margin-top: 5%;
    }
    .nota-bene,
    .nota-bene-disease {
        font-size: 0.7rem;
        height: 75px;
        padding: 10px;
    }
}

.disease-message-selector {
    display: flex;
    justify-content: center;
    align-items: center;
}

.period-selector {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 185px;
    padding-inline: 10px;
    color: var(--blue-dark);
}

.period-selector .error-message {
    background-color: #9b1111;
    color: white;
    padding: 0.3em 0.6em;
    text-align: center;
}

.period-selector .date-inputs {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

@media (max-width: 991px) {
    .period-selector {
        min-height: 105px;
    }

    .period-selector .date-inputs {
        flex-direction: row;
        gap: 0.8em;
    }
}

@media (max-width: 767px) {
    .period-selector {
        min-height: 159px;
    }

    .period-selector .date-inputs {
        flex-direction: column;
        gap: 0;
    }
}

.period-selector .input-group {
    display: flex;
    align-items: center;
    margin-block: 0.3rem;
    white-space: nowrap;
}

.period-selector .year-input-group {
    justify-content: center;
    margin-inline: auto;
    white-space: nowrap;
}

.period-selector label {
    width: 50%;
    text-align: right;
    font-size: 1.1rem;
}

.period-selector .year-input-group label {
    width: auto;
}

.period-selector input[type="date"],
.period-selector select {
    height: 35px;
    background-color: #fff;
    border: 2px solid #2e4e61;
    border-radius: 4px;
    margin-left: 0.5rem;
    padding: 0 6px;
    font-size: 15px;
    -webkit-transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.period-selector button[type="submit"] {
    display: block;
    margin: 0.5rem auto;
    border-radius: 4px;
    border: 2px solid #2e4e61;
    text-align: center;
    color: #fff;
    /* text-decoration: none; */
    background-color: #022c3c;
    text-transform: uppercase;
    font-size: 1rem;
    /* height: unset; */
    font-weight: 700;
    /* position: relative; */
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    padding: 10px 30px;
}

.period-selector button[type="submit"]:hover {
    cursor: pointer;
}