.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.auth-modal {
  background: white;
  padding: 30px;
  width: 320px;
  border: 1px solid #000;
  position: relative;
}

.auth-modal h2 {
  margin-top: 0;
}

.auth-modal input {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
}

.auth-modal button {
  width: 100%;
  padding: 8px;
  cursor: pointer;
}

.auth-close {
  position: absolute;
  top: 5px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.auth-switch {
  margin-top: 10px;
  font-size: 14px;
}

/* OVERLAY SAUVEGARDE */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;           /* IMPORTANT */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-box{
  background: white;
  padding: 30px;
  width: 320px;
  border: 1px solid #000;
  position: relative;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.modal-box input,
.modal-box textarea{
  width:100%;
  padding:8px;
}


body {
    font-family: Helvetica, serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #ffff;
}

.header {
    background-color: black; /* Vert */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5% 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-section {
    margin: 0 13%;
}

.header-section a {
    text-decoration: none;
    color: #fff; /* Police noire */
    font-size: 0.8rem;
    font-weight: bold;
    position: relative; /* Pour positionner le soulignement */
}

.header-section a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #fff;
}

/* Lors du survol, le soulignement apparaît */
.header-section a:hover::after {
    width: 100%; /* Étendre le soulignement */
    transition: width 0.1s ease-in-out; /* Lors du survol, le soulignement apparaît rapidement */
}

/* Quand on quitte le survol, garder le soulignement pendant 1 seconde */
.header-section a::after {
    transition: width 0.2s ease-in-out, width 0.2s ease-out 0.2s; /* Maintenir pendant 1 seconde */
}




.barre-droite-2 {
  position: fixed;
  bottom: 0; /* base de la fenêtre */
  right: 2.15%;
  width: 0.6px;
  height: 3.5%; /* hauteur en % de la fenêtre */
  background-color: black;
}




.content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0%;
    height: 96.5%;
    box-sizing: border-box;
    padding: 3% 3% 0% 3%;
    background-color: #f0f0f0;
}

.column-container {
    display: flex;
    flex-direction: column;
    margin: 0% 0.5% 3.5%;
    box-sizing: border-box;
    width: 100%;
}

.column-container-results {
    display: flex;
    flex-direction: column;
    margin: 0% 0.5% 0.5%;
    box-sizing: border-box;
    width: 100%;
}

.column-container-hide {
    display: flex;
    flex-direction: column;
    margin: 0% 0.25% 3.5%;
    box-sizing: border-box;
    width: 100%;
}

.hidden {
    display: none;
}

/* Styles pour le titre de chaque colonne */
.column-title {
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    margin-left: 0px;
}

/* Styles pour le contenu des colonnes */
.column, .input-section {
    margin-top: 0.5em;
    display: flex;
    flex-direction: column;
    border: 0px solid #000;
    border-bottom: 0px solid #fff;;
    padding: 0px;
    box-sizing: border-box;
    overflow-y: auto;
    flex: 1;
    position: relative;
    background-color: #f0f0f0;
}

.columnButton {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid black;
    background-color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    margin-top: 0em;
}

.columnButton:hover {
    color: #fff;
    background-color: black;
    border-color: #fff;
}

/* Styles pour les éléments numériques */
.number {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1%;
    margin-bottom: 1%;
    cursor: pointer;
    background-color: #fff;
    border: 1.5px solid #000;
    position: relative;
}

/* Styles pour les images dans les éléments numériques */
.number img {
    width: calc(100% - 20px);
    height: auto;
    margin-bottom: 5px;
    margin-top: 2.5px;
}

.image-title-container {
    display: flex;
    justify-content: space-between;
    padding: 0 10px; /* marge gauche et droite identique */
    width: 100%;
    box-sizing: border-box; /* inclut le padding dans la largeur */
    margin-top: 1%;
}

.image-title,
.image-title2 {
    font-size: 0.7em;
}


/* Styles pour les titres et valeurs dans les éléments numériques */
.title-number, .more-number {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.6em; /* Réduit la taille de la police */
    margin-bottom: 3.5px;
}

.title {
    font-weight: normal; /* Retire le gras */
    text-align: left;
    margin-left: 10px;
}

.value {
    font-weight: normal; /* Retire le gras */
    text-align: right;
    margin-right: 10px;
}

/* Styles pour les boutons de plus et de calcul */

.more {
    display: block;
    width: calc(100% - 20px);
    padding: 5px 0;
    margin: 5px 0;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: black;
    border: 1px solid black;
    border-radius: 0px;
    font-size: 0.7em; /* Réduit la taille de la police */
}

#calculs {
    display: block;
    width: 100%;
    padding: 5px 0;
    margin: 5px 0;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: black;
    border: 1px solid black;
    border-radius: 0px;
    font-size: 0.7em; /* Réduit la taille de la police */
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 5px 0;
    margin: 5px 0;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: black;
    border: 1px solid black;
    border-radius: 0px;
    font-size: 0.7em; /* Réduit la taille de la police */
}

.more:hover, .calculate-btn:hover {
    color: #fff; /* Change la couleur du texte en rouge */
    background-color: black;
    border-color: #fff;
}

/* Styles pour les données supplémentaires */
.more-data {
    display: none;
    width: 100%;
    margin-top: 3.5px;
    margin-bottom: 3.5px;
}

#calculateMoreData {
    display: block;
    width: 100%;
    padding: 5px 0;
    margin: 5px 0;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: black;
    border: 1px solid black;
    border-radius: 0px;
    font-size: 0.7em; /* Réduit la taille de la police */
}

#calculateMoreData:hover {
    color: #fff; /* Change la couleur du texte en rouge */
    background-color: black;
    border-color: #fff;
}


.button-container {
    margin-top: auto; /* Ce qui pousse le bouton vers le bas */

}

#downloadPDF {
    margin-bottom: 0%;
}




/* Style pour les éléments sélectionnés */
.selected {
    border: 3px solid black;
}






/* Styles pour les champs de saisie de nombres */
input[type="number"] {
    width: 100%;
    padding: 5px;
    margin: 5px 0;
    box-sizing: border-box;
    border: 1px solid #ddd;
    outline: none; /* Supprime le contour bleu */
}

/* Styles pour le titre "Nombre de mètres carrés" */
label {
    font-size: 0.8rem;
}






/* Styles pour le bouton de bascule des images */
#toggleImages {
    position: absolute;
    bottom: 5.25%;
    left: 3.5%;
    width: 7%;
    padding: 5px 0%;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    border-radius: ;
    font-size: 0.7em; /* Réduit la taille de la police */
}

#toggleImages:hover{
    color: #fff; /* Change la couleur du texte en rouge */
    background-color: black;
    border-color: #fff;
}

#toggleImages:focus {
    outline: none; /* Enlève le cadre par défaut lorsqu'il est sélectionné */
}



#toggleBandes {
    position: absolute;
    bottom: 5.25%;
    left: 14%;
    width: 7%;
    padding: 5px 0%;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    cursor: pointer;
    border-radius: ;
    font-size: 0.7em; /* Réduit la taille de la police */
}

#toggleBandes:hover{
    color: #fff; /* Change la couleur du texte en rouge */
    background-color: black;
    border-color: #fff;
}

#toggleBandess:focus {
    outline: none; /* Enlève le cadre par défaut lorsqu'il est sélectionné */
}



.help {
    position: absolute;
    width: 1.3em;
    height: 1.3em;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #000;
    border-radius: 50%;
    background: #fff;
    color: #000;

    font-size: 0.7em;
    font-weight: bold;

    cursor: pointer; /* 👈 main au survol */
}


/* Inversion couleurs au survol */
.help:hover {
    background: #000;
    color: #fff;
}

/* Tooltip */
.tooltip {
    position: absolute;

    bottom: 100%;              /* AU-DESSUS du ? */
    left: 100%;                /* À DROITE du ? */
    margin-bottom: 6px;
    margin-left: 6px;

    max-width: 320px;
    width: 320px;

    background: #000;
    color: #fff;

    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    line-height: 1.4;

    white-space: normal;
    overflow-wrap: break-word;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}



.help:hover .tooltip {
    opacity: 1;
}



/* ? pour DÉTAILS */
#helpImages {
    bottom: 5.25%;     /* même valeur que #toggleImages */
    left: 11%;         /* juste à droite du bouton */
}

/* ? pour LOTS */
#helpBandes {
    bottom: 5.25%;     /* même valeur que #toggleBandes */
    left: 21.5%;       /* juste à droite du bouton */
}




.helpResults {
    position: absolute;
    width: 1.3em;
    height: 1.3em;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #000;
    border-radius: 50%;
    background: #fff;
    color: #000;

    font-size: 0.7em;
    font-weight: bold;

    margin: 0% 3.5% 3.5%;

    cursor: pointer; /* 👈 main au survol */
}


/* Inversion couleurs au survol */
.helpResults:hover {
    background: #000;
    color: #fff;
}

/* Tooltip */
.tooltipResults {
    position: absolute;
    top: 130%;                 /* sous le ? (plus lisible pour long texte) */
    right: 0;

    max-width: 320px;          /* largeur max du bloc */
    width: max-content;
    width: 320px;

    background: #000;
    color: #fff;

    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    line-height: 1.4;

    white-space: normal;       /* ✅ autorise les retours à la ligne */
    word-wrap: break-word;     /* coupe les mots trop longs */
    overflow-wrap: break-word;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;

    z-index: 1000;
}


.helpResults:hover .tooltipResults {
    opacity: 1;
}


/* ? pour LOTS */
#helpResults {
    position: absolute;
    margin-top: 1.1em;
    right: 0%;       /* juste à droite du bouton */
}














/* Styles pour le bouton de la carte */
#carte {
    display: block;
    width: 100%;
    padding: 5px 0;
    margin: 5px 0;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    color: black;
    border: 1px solid black;
    border-radius: 0px;
    font-size: 0.7em; /* Réduit la taille de la police */
}

#carte:hover{
    color: #fff;
    background-color: black;
    border-color: #fff;
}








/* Style pour la bande en bas à gauche matériaux */
#summaryBar, #materialSummaryBar {
    display: flex;
    position: absolute;
    bottom: 5.25%;
    left: 66.66%;
    transform: translateX(-100%);
    width: 40%;
    height: 2%;
    border: 1px solid #000; /* Bordure autour de la bande */
    box-sizing: border-box;
    background-color: #fff; /* Couleur de fond de la bande */
    font-size: 0.8rem; /* Taille du texte pour les noms */
    color: #000; /* Couleur du texte */
    z-index: 1000; /* S'assure que la barre reste au-dessus des autres éléments */
}

/* Style pour chaque section dans la bande */
#summaryBar .section, #materialSummaryBar .material-section {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Appliquer le border-radius aux sections aux extrémités */
#summaryBar .section:first-child {
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
}

#summaryBar .section:last-child {
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

#materialSummaryBar .material-section:first-child {
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
}

#materialSummaryBar .material-section:last-child {
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

















.result-cloud {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;  /* Force le carré */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  padding: 3%;
  margin-top: 0.5em;
  box-sizing: border-box;
  border: 1.5px solid #000;;
}

.result-cloud canvas {
  width: 100%;
  height: 100%;
}

.result-cloud .controls {
  width: 95%;
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}


.indicator-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.indicator-box {
    width: 10px;
    height: 10px;
    border: 1px solid black;
    background: #fff;
    cursor: pointer;
}

.indicator-box.active {
    background: #000;
}

.indicator-label {
    font-size: 0.7em;
    color: black;
    margin-right: 0.7em;
}

















/* Style pour la bande inférieure */
.footer {
    display: flex;
    width: 100%;
    height: 3.5%;
    background-color: #fff;
    border-top: 1px solid black;
}

/* Première partie : Cases à cocher */
.checkboxes {
    width: 66.66%;
    display: flex;
    flex-wrap: wrap; /* Permet à la légende de passer à la ligne si besoin */
    justify-content: space-around;
    align-items: center;
    color: black;
    border-right: 1px solid black;
    margin-bottom: 0%;
    overflow: hidden; /* Important pour que rien ne dépasse */
    position: relative;
}


/* Style pour la légende sous la bande */
#legend, #materialLegend {
    display: flex;
    align-items: center;
    margin-top: 0%; /* Espace entre la bande et la légende */
    margin-left: 3vw; /* Espace entre la bande et le bord gauche de la page */
    font-size: 0.6rem; /* Taille du texte de la légende */
     z-index: 1000; /* S'assure que la barre reste au-dessus des autres éléments */
}

/* Style pour chaque item de la légende */
#legend .legend-item, #materialLegend .legend-item {
    display: flex;
    align-items: center;
    margin-right: 2rem; /* Espace entre les items de la légende */
}

/* Style pour les petits carrés colorés */
#legend .legend-item .color-box, #materialLegend .legend-item .color-box {
    width: 0.65rem;
    height: 0.65rem;
    margin-right: 0.35rem;
}

/* Couleurs spécifiques pour chaque section */
#foundation {
    background-color: #C76758; /* Couleur pour Fondation */
}

#structure {
    background-color: #7A99AC; /* Couleur pour Structure */
}

#envelope {
    background-color: #DB9CAB; /* Couleur pour Enveloppe */
}

#joinery {
    background-color: #D6B874; /* Couleur pour Menuiserie */
}

#finishes {
    background-color: #A582A5; /* Couleur pour Second oeuvre */
}



/* Couleurs spécifiques pour chaque section des matériaux */
#stone {
    background-color: #c0c0c0; /* Couleur pour Pierre */
}

#rawEarth {
    background-color: #e0a9a9; /* Couleur pour Terre crue */
}

#firedClay {
    background-color: #f5c6c6; /* Couleur pour Terre cuite */
}

#biobased {
    background-color: #c1e1c1; /* Couleur pour Biosourcé */
}

#concrete {
    background-color: #d4e0d4; /* Couleur pour Béton */
}

#geopolymer {
    background-color: #b3c0b3; /* Couleur pour Géopolymère */
}

#metal {
    background-color: #a6a6a6; /* Couleur pour Métallique */
}

#glass {
    background-color: #e0e0e0; /* Couleur pour Verre */
}

#plastic {
    background-color: #d0d0d0; /* Couleur pour Plastique */
}

#recycled {
    background-color: #a0a0a0; /* Couleur pour Recyclé */
}

/* S'assurer que les bandes elles-mêmes aient un overflow caché */
#summaryBar, #materialSummaryBar {
    overflow: hidden;
}

/* Style pour les bandes (masquées par défaut) */
.band {
    transition: opacity 0.5s ease;
}

/* Style pour masquer les bandes */
.band.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Style pour afficher les bandes */
.band.visible {
    opacity: 1;
    visibility: visible;
}











/* Deuxième partie : Titres cliquables */
.links {
    width: 33.33%; /* 1/3 de la bande */
    display: flex;
    justify-content: center; /* Centre les éléments */
    gap: 10vw; /* Espace précis entre les titres */
    align-items: center;
    font-size: 0.7rem;
    color: black;
    margin-bottom: 0%;
}

.links a {
    text-decoration: none;
    color: black !important;
    position: relative;
    z-index: 1; /*  S’assure que le lien (et son ::after) est au-dessus */
    line-height: 1.2; /*  Garde de l’espace vertical sous le texte */
}

.links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px; /*  Léger espace pour qu’il ne touche pas le texte */
    width: 0;
    height: 1px;
    background-color: black;
    z-index: 2; /*  Met le soulignement devant tout */
    transition: width 0.2s ease-in-out;
}

.links a:hover::after {
    width: 100%;
    transition: width 0.1s ease-in-out;
}


/* Quand on quitte le survol, garder le soulignement pendant 1 seconde */
.links a::after {
    transition: width 0.2s ease-in-out, width 0.2s ease-out 0.2s; /* Maintenir pendant 1 seconde */
}




/* Conteneur modale */
.contact-container {
  display: none; /* Cacher par défaut */
  position: fixed;
  top: 7%; /* Place à 10% du haut de l'écran */
  right: 3%; /* Marge de 2% à droite */
  width: 26.8%; /* Largeur égale à celle de la colonne droite */
  background-color: white; /* Fond blanc */
  border: 1px solid black; /* Bordure noire */
  z-index: 1001; /* Au-dessus du contenu */
  padding: 20px; /* Espacement interne */
  overflow: hidden;
  height: 79%;
  justify-content: center;
  align-items: center;
}

/* Bouton de fermeture */
.close-btn {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  background: transparent;
  border: none;
  color: #DDDCDA;
  cursor: pointer;
}

.close-btn:hover {
  transition: color 0.3s ease;
  color: black;
}

.contact-content {
  text-align: center; /* Centre le texte */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px; /* Ajoute de l'espace sous le bouton */
}

/* Contenu de la section contact */
.contact-content h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: ;
}

.contact-content p {
  margin-top: 10px;
  font-size: 1rem;
  color: #333;
}




/* Bouton fixe en bas à gauche */
#mentionsBtn {
  position: fixed;
  right: 0%;
  width: 2.1vw;
  height: auto;
  padding: 0.2vw;
  background: white;
  border: 0px solid black;
  font-size: 0.5rem;
  cursor: pointer;
  z-index: 999;
  line-height: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Conteneur popup */
#mentionsPopup {
  display: none;
  position: fixed;
  top: 7%;
  right: 3%;
  width: 26.8%;
  height: 79%;
  background: white;
  border: 1px solid black;
  padding: 20px;
  z-index: 1001;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

/* Bouton de fermeture */
#closeMentions {
  position: absolute;
  top: 5px;
  left: 50%;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #DDDCDA;
  transform: translateX(-50%);
}

#closeMentions:hover {
  transition: color 0.3s ease;
  color: black;
}


/* Rendre le contenu scrollable */
.mentions-content {
  margin-top: 20px;
  font-size: 0.75rem;
  color: #333;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  padding-right: 7%; /* pour que le texte ne soit pas caché par la scrollbar */
  box-sizing: border-box;
}