* {
    box-sizing: border-box;
}

html {
    font-size: 28px;
}

.navbar {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 1%;
    width: 90%;
    margin: 2% auto 0;
    padding: 0.5% 1% 0;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #95b85e;
    box-shadow: 0px 3px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
    overflow-y: hidden;
}

.nav-links a {
    text-decoration: none;
    font-size: clamp(0.8em, 1.1vw, 1.2rem);
    padding: 1% 1%;
    color: #3f6ea4;
    background: #f5f7fa;
    border: 1px solid #ccd6e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    text-align: center;
}

.logo_Uniclima {
    height: clamp(45px, 5vw, 65px);
}

.nav-links a:hover {
    background-color: #3f6ea4;
    color: #ffffff;
    box-shadow: 0px 3px 5px rgba(0,0,0,0.1);
}

.nav-links a.actif {
    background-color: #95b85e;
    color: #ffffff;
    border-color: #95b85e;
    box-shadow: 0px 3px 5px rgba(149,184,94,0.4);
}

.burger {
    display: none;
    order: 1;
    font-size: clamp(1.5em, 1.7vw, 2rem);
    background: none;
    border: none;
    cursor: pointer;
    color: #3f6ea4;
}

.nav-links {
    display: flex;
    order: 2;
    gap: 1%;
}

.nav-logo {
    order: 3;
}

body {
    font-family: cambria, arial, sans-serif;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    flex-wrap: wrap;
}

.container, .container_collapsible, .collapsible {
    background: #ffffff;
    margin: 2% auto 0;
    padding: 2%;
    border-radius: 12px;
    box-shadow: 0px 3px 5px rgba(0,0,0,0.1);
    width: 90%;
    height: 100%;
    text-align: start;
    box-sizing: border-box;
}

.container:first-of-type {
    margin-top: 0;
    border-radius: 0px 0px 12px 12px;
}

.container {
    margin-bottom: 0;
}

.container_collapsible {
    display: none;
    overflow: hidden;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 0;
}

.collapsible {
    margin-left: 5%;
    margin-right: 5%;
    color: #95b85e;
    font-family: cambria, arial, sans-serif;
    cursor: pointer;
    margin-bottom: 0;
    border: none;
    outline: none;
    font-size: clamp(1em, 1.1vw, 1.2rem);
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.collapsible:hover {
    background-color: #3f6ea4;
    color: #ffffff;
    box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
}

.collapsible.active {
    background-color: #3f6ea4;
    color: #ffffff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.collapsible.active::after {
    transform: rotate(180deg);
}

#conteneur-creneaux {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

#conteneur-occupants {
    display: flex;
    flex-direction: row;
    align-items: center;
}

h1 {
    display: flex;
    justify-content: space-between;
    text-align: start;
    align-items: center;
    color: #95b85e;
    margin-bottom: 1%;
    font-size: clamp(1em, 1.1vw, 1.2rem);
}

h2 {
    font-size: clamp(0.9em, 1.05vw, 1.1rem);
    color: #000000;
    margin-top: 0px;
    margin-bottom: 0px;
}

h3{
    font-size: clamp(0.8em, 1vw, 1rem);
    color: #3f6ea4;
    margin-bottom: none;
}

.openModalQ, .openModalRev, .help_button, .add_button {
    height: clamp(20px, 30px, 40px);
    width: clamp(20px, 30px, 40px);
    border: none;
    cursor: pointer;
    vertical-align: middle;
    padding: 10%;
}

.mesure_Lp {
    max-width: 40%;
    height: auto;
}

.ponderation_A {
    max-width: 60%;
    height: auto;
}

.spectre_acoustique {
    max-width: 20%;
    height: auto;
}

p {
    margin-bottom: none;
    text-align: start;
    font-size: clamp(0.7em, 0.9vw, 1rem);
}

em {
    color: #7ca04c;
}

strong {
    color: #3f6ea4;
}

ul {
    padding: 0px 0px 0px 1%;
    list-style-type: none;
    text-align: start;
    font-size: clamp(0.7em, 0.9vw, 1rem);
}

.form-group {
    margin-bottom: 1%;
}

label {
    display: inline-block;
    font-weight: bold;
    color: #3f6ea4;
    font-size: clamp(0.8em, 1vw, 1rem);
}

.logement_type, .chauffage_type {
    font-size: clamp(1.5em, 2vw, 2.5rem);
    cursor: pointer;
    transition: 0.2s;
}

input[class="type_logement"], input[class="type_chauffage"] {
    display: none;
}

input[class="type_logement"]:checked + .logement_type, input[class="type_chauffage"]:checked + .chauffage_type {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px #3b82f6);
}

input[type="number"], select, input[type="time"] {
    width: 96.5%;
    padding: 1%;
    height: 3em;
    border: 1px solid #ccd6e0;
    border-radius: 8px;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    font-size: clamp(0.7em, 0.9vw, 1rem);
}

input[type="number"]:focus, select:focus, input[type="time"]:focus {
    border-color: #95b85e;
    box-shadow: 0 0 5px rgba(149,184,94,0.5);
    outline: none;
}

input[type="checkbox"] {
    transform: scale(1.5);
}

button[type="submit"] {
    background: #95b85e;
    color: #ffffff;
    border: none;
    padding: 1%;
    height: 3em;
    border-radius: 8px;
    font-size: clamp(0.8em, 1vw, 1rem);
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    margin-top: 1%;
}

button[type="submit"]:hover {
    background: #7ca04c;
}

.result {
    margin-top: 2%;
    font-weight: bold;
    color: #3f6ea4;
    text-align: center;
    font-size: clamp(0.8em, 1vw, 1rem);
}

.error {
    margin-top: 2%;
    color: #ffffff;
    font-weight: bold;
    text-align: left;
    background: #e74c3c;
    border: 1px solid #c0392b;
    padding: 1%;
    border-radius: 8px;
}

.q-block {
    display: flex;
    align-items: flex-start;
}

.q-block img {
    border-radius: 8px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    width: 60%;
    background: #fff;
    padding: 1em;
    margin: 2% auto 0;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: clamp(1.5em, 1.7vw, 2rem);
    font-weight: bold;
    cursor: pointer;
}
.close:hover {
    color: black;
}

.modal-content img {
    margin: 2% auto 0;
    border-radius: 6px;
}

.temps_réverbération {
    border: none;
    width: 100%;
    height: auto;
}

.coefficient_directivité {
    border: none;
    width: 40%;
    height: auto;
}

.distance_parois {
    border: none;
    width: 60%;
    height: auto;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    padding: 0.6em;
    background-color: #3f6ea4;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: clamp(0.7em, 0.9vw, 1rem);
    line-height: 1.3em;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #3f6ea4 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.modal-table {
    border-collapse: collapse;
    border: 1px solid #7ca04c;
}

.modal-table thead th {
    background-color: #7ca04c;
    font-style: bold;
    font-size: clamp(0.7em, 0.9vw, 1rem);
    border-collapse: collapse;
    border: 1px solid #7ca04c;
}

.modal-table tbody th {
    font-size: clamp(0.7em, 0.9vw, 1rem);
    border-collapse: collapse;
    border: 1px solid #7ca04c;
}

.form-table {
    width: 90%;
    align-items: center;
    table-layout: auto;
}

.form-title {
    text-align: start;
}

#form-table-head {
    font-weight: bold;
    color: #3f6ea4;
    font-size: clamp(0.8em, 1vw, 1rem);
}

.data_col {
    width: auto;
    border-right: 1px dotted #3f6ea4;
}

.form-table th:last-of-type {
    border-right: none;
}

.result-table {
    width: 100%;
}

.result-table th {
    width: 50%;
    border-right: 1px dotted #3f6ea4;
}

.result-table th:last-of-type {
    border-right: none;
}

.graphique {
    width: 100%;
    height: 500px;
}

footer {
    position: relative;
    width: 90%;
    padding-bottom: 1%;
}

footer {
    text-align: center;
    margin-top: 0;
    padding: 10px;
}

.droits_reserves {
    text-align: center;
}

@media (max-width: 1024px) {
    .navbar {
        width: 95%;
    }

    .container, .container_collapsible, .collapsible {
        width: 95%;
    }

    .collapsible {
        margin-left: 2.5%;
        margin-right: 2.5%;
    }

    .container {
        margin-bottom: 0;
    }

    h1 {
        flex-direction: column;
    }

    .mesure_Lp {
        max-width: 60%;
        height: auto;
    }

    .ponderation_A {
        max-width: 90%;
        height: auto;
    }

    .spectre_acoustique {
        max-width: 30%;
        height: auto;
    }

    .modal-content {
        width: 80%;
    }

    .coefficient_directivité {
        width: 90%;
        height: auto;
    }

    .distance_parois {
        width: 90%;
        height: auto;
    }
}

@media (max-width: 600px) {
    body {
        align-items: stretch;
    }

    .navbar {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        overflow: visible;
    }

    .nav-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        flex-direction: row;
    }

    .burger {
        display: flex;
        order: 1;
    }

    .nav-logo {
        order: 2;
    }

    .nav-links {
        display: none;
        order: 3;
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding-left: 0.5em;
        text-wrap: wrap;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        border-radius: 8px;
        text-align: start;
        border-bottom: 1px solid #ccd6e0;
    }

    .nav-links a:last-child {
        margin-bottom: 0.2em;
    }

    .container, .container_collapsible, .collapsible {
        width: 100%;
    }

    .collapsible {
        margin-left: 0%;
        margin-right: 0%;
    }

    .container {
        margin-bottom: 0;
    }

    h1 {
        flex-direction: column;
    }
    
    .mesure_Lp {
        max-width: 100%;
        height: auto;
    }

    .ponderation_A {
        max-width: 100%;
        height: auto;
    }

    .spectre_acoustique {
        max-width: 70%;
        height: auto;
    }

    input[type="number"], select, input[type="time"] {
        padding: 1%;
    }

    button[type="submit"] {
        padding: 1%;
    }

    .modal-content {
        width: 90%;
    }

    .coefficient_directivité {
        width: 100%;
        height: auto;
    }

    .distance_parois {
        width: 100%;
        height: auto;
    }

    footer {
        width: 100%;
    }
}