#tableau_degagements {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

#tableau_degagements th {
    background-color: var(--main-color);
    color: var(--encre-sur-primaire);
    padding:5px;
    text-align: center;
    font-weight: normal;
    border:1px solid white;
}

#tableau_degagements td {
    text-align: center;
    padding: 5px;
}

#tableau_degagements td input {
    margin:0;
}

#checkbox-cumul {
    font-size: 0.85em;
}

/* Case d'angle vide : le fond de la carte, en clair comme en sombre (lot 4d ; elle restait blanche en sombre). */
#tableau_degagements th#suppression {
    background-color: transparent;
}

a#copier_tableau {
    color: var(--text-color-main);
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}
a#copier_tableau span {
    font-size: 1em;
    text-decoration: none;
}

#popup_copie_tableau {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    /* La fenêtre posée sur la page de la fiche, en clair comme en sombre (lot 4d ; elle restait blanche en sombre). */
    background-color: var(--panneau-fond);
    color: var(--ink);
    border: 1px solid var(--panneau-bord);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
#popup_copie_tableau p {
    padding:10px;
}
#popup_copie_tableau.show {
    display: flex;
}

.progress {
    width: 100%;
    height: 20px;
    background-color: #f3f3f3;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: black;
    width: 0;
    transition: width 3s linear;
}

#resultat, #majoration_effectif {
    display: none;
}

#resultat.show, #majoration_effectif.show {
    display: block;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
.form-row input {
    max-width: 150px;
}
#verification_sous_sol_form {
    width: 100%;
    max-width: 1200px;
    margin: 10px auto;
}
#verification_sous_sol_form .form-row {
    justify-content: flex-start;
}
#niveaux_seuils {
    border-collapse: collapse;
    border: 1px solid white;
    text-align: center;
    margin-bottom: 20px;
}
#niveaux_seuils th {
    background-color: var(--main-color);
    color: var(--encre-sur-primaire);
    padding: 5px 10px;
    border: 2px solid white;
}
#niveaux_seuils td {
    padding: 5px;
    border: 2px solid white;
}

#info_facade {
   margin-bottom: 40px;
}
#masse_combustible_form {
    width:100%;
    max-width: 1200px;
    margin: 10px 0;
}
#masse_combustible_form select {
    max-width: 200px;
}
#masse_combustible_form .form-row label {
    width: 150px;
}
#masse_combustible_form #info_facade .form-row label {
    width: 50px;
}
#masse_combustible_form .ts-wrapper.single .ts-control input, #masse_combustible_form .ts-wrapper.multi .ts-control input {
    width:250px !important;
}

#tableau_revetements {
    border-collapse: collapse;
    margin: 10px 0;
}
#tableau_revetements td {
    padding: 0 5px;
}
#tableau_revetements .revetement_select {
    margin-right: 20px;
}
#tableau_revetements .pcs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 210px;
}
#tableau_revetements .pcs p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
#tableau_revetements .pcs input {
    margin: 0;
    padding-right: 55px;
    width: 200px;
    text-align: right;
}
#tableau_revetements .pcs input.epaisseur {
    padding-right: 85px;
}
#tableau_revetements .pcs span {
    font-size: 0.85em;
    margin-left: -50px;
}
#tableau_revetements .pcs span.epaisseur {
    margin-left: -80px;
}
#revetement_facade {
    margin-bottom: 20px;
}
#masse_combustible_form #tableau_revetements select{
    width:300px;
}

/* CSS pour TomSelect */
.ts-wrapper .ts-control {
    width: 300px; /* Fixer la taille du select */
}

.ts-dropdown .optgroup-header {
    font-weight: bold; /* Titres des catégories en gras */
}

.ts-dropdown .option {
    margin-left: 10px; /* Margin-left pour les options sous les catégories */
}

#schema {
    display:grid;
    grid-template-columns:  200px minmax(400px, 800px);
    grid-template-areas: 
        "Href PH"
        "Href BaiePrincipale"
        "Href PI"
        ". LargeurTrumeau"
        ". PB";
    column-gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
    margin-right: 50px;
}
.plancher {
    height:20px;
    border: 1px solid black;
}
.plancher span {
    display: block;
    text-align: right;
    margin-top: -20px;
}
#plancher_haut {
    grid-area: PH;
}
#plancher_intermediaire {
    grid-area: PI;
    align-self: end;
}
#plancher_bas {
    grid-area: PB;
}
#largeur_trumeau {
    grid-area: LargeurTrumeau;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
}
.baie {
    height:150px;
    width:150px;
    border: 1px solid black;
}
.baie div {
    margin:5px;
    border: 1px solid black;
    height: calc(100% - 10px);
    width: calc(100% - 10px);
}
.baie div div {
    border:none;
    border-right: 1px solid black;
    margin: 0px;
    height: 100%;
    width: 50%;
}
#baie_principale {
    grid-area: BaiePrincipale;
    height:250px;
    align-self: center;
    justify-self: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto 1fr;
    grid-template-areas:
        "lb ."
        "baie hb";
    gap: 10px;
}
#lb_div {
    grid-area: lb;
    display: flex;
    align-items: center;
    align-self: end;
    gap: 5px;
}
#lb_div input {
    width: 100px;
    margin: 0;
}
#baie_principale .baie {
    grid-area: baie;
}
#hb_div {
    grid-area: hb;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 5px;
    height:100%;
}
#hb_div input {
    width: 100px;
}
#href_div {
    grid-area: Href;
    height:270px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 10px;
}
#href_div input {
    width:100px;
}
#lt1_div, #lt2_div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
#lt1_div input, #lt2_div input {
    width: 70px;
    margin: 0;
}
#lt1_div {
    width: 100px;
}
#lt2_div {
    width: 150px;
}
.cotation_horizontale_haut, .cotation_horizontale_bas, .cotation_horizontale_bas.focus, .cotation_horizontale_haut.focus , .cotation_verticale_gauche, .cotation_verticale_droite, .cotation_verticale_droite.focus, .cotation_verticale_gauche.focus {border:9px solid black;}
.cotation_horizontale_haut {border-image-source: url(../images/cotation_horizontale_haut.png);}
.cotation_horizontale_haut.focus {border-image-source: url(../images/cotation_horizontale_haut_focus.png);}
.cotation_horizontale_bas {border-image-source: url(../images/cotation_horizontale_bas.png);}
.cotation_horizontale_bas.focus {border-image-source: url(../images/cotation_horizontale_bas_focus.png);}
.cotation_verticale_gauche {border-image-source: url(../images/cotation_verticale_gauche.png);}
.cotation_verticale_gauche.focus {border-image-source: url(../images/cotation_verticale_gauche_focus.png);}
.cotation_verticale_droite {border-image-source: url(../images/cotation_verticale_droite.png);}
.cotation_verticale_droite.focus {border-image-source: url(../images/cotation_verticale_droite_focus.png);}
.cotation_horizontale_haut, .cotation_horizontale_bas, .cotation_horizontale_bas.focus, .cotation_horizontale_haut.focus , .cotation_verticale_gauche, .cotation_verticale_droite, .cotation_verticale_droite.focus, .cotation_verticale_gauche.focus {
    border-image-slice: 9;
    border-image-width: 7px;
    border-image-outset: 0px;
    border-image-repeat: stretch;
}

#eas_form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width:100%;
    margin:20px 0;
}
#eas_form .row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#eas_form input, #eas_form select {
    width: 100%;
    max-width: 700px;
}
#eas_form .row.boutons {
    flex-direction: row;
}
#resultat {
    width:100%;
    max-width:1200px;
    margin: 20px 0;
}
#resultat h2 {
    margin:10px 0;
    font-size: 1.2em;
    border-bottom: 1px dotted black;
}
#bouton_verifier.hide {
    display: none;
}

/* Alerte pour distance 25m */
select.alerte-distance {
    border: 2px solid #ff9800;
    background-color: #fff3e0;
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
}

#alerte_distance_25m {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    margin: 20px 0;
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #663c00;
    font-weight: 500;
}

#alerte_distance_25m .material-symbols-outlined {
    color: #ff9800;
    font-size: 24px;
}

/* Téléphone (harmonisation du 24/10/2026, lot 4d) : le schéma de la façade et le tableau des revêtements défilent dans
   leur carte au lieu d'élargir la page de 330 px à 390 px (sans largeur propre, ils imposaient leur largeur minimale). */
@media (max-width: 760px) {
    #info_facade, #revetement_facade {
        width: 0;
        min-width: 100%;
        overflow-x: auto;
    }
}
