/* ---- Variables ---- */

:root {
  --bleu-locmat: #0068B0;
  --indisponible: #AA0D9E;
  --indisponible2: #aa0d9d27;
  --confirme: #27C100;
  --en-attente: #FF8A02;
  --accepte: #CCCC33;
  --refuse: #E81417;
  --absent: #336666;
  --gris-annule: #C0C0C0;
  --signe: #27C100;
  --blanc: #fff;
  --gris-leger: #f5f5f5;
  --bleu-footer: #0a3866;
  --bleu-ciel-dropdown-menu: #36b9cc;
  --conflit: #FFCC00;
  --gris-indispo: #d0d0d0;
  --gris: #bdbdbd;
  --noir: #333333;
  --warning-background: #fff8e1;
  --warning-border: #f1c40f;
  --warning-text: #a87f00;
  --blocked-background: #fff1f0;
  --blocked-border: #ff4d4f;
  --blocked-text: #a8071a;
  --type_aff_1: #72C100;
  --type_aff_2: #0869B0;
  --type_aff_3: #30BEF0;
  --type_aff_4: #AA0D9E;
  --type_aff_5: #FFCC00;
  --type_aff_6: #FF86E8;
}

/* ---- Fin variables ---- */

/* ---- Boutons ---- */
.bouton,
.bouton a {
  text-decoration: none;
  color: var(--blanc);
  padding: 15px;
  border-radius: 10px;
  background-color: var(--bleu-locmat);
  width: fit-content;
  height: fit-content;
  font-size: 15px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.bouton_retour {
  margin-top: 20px;
  margin-bottom: 20px;
}

.calendar_date,
.ampm_select {
  margin-bottom: 10px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 5px 10px;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease;
}

#btnScrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;

  width: 45px;
  height: 45px;

  border: none;
  border-radius: 50%;
  background-color: var(--bleu-locmat);
  color: var(--blanc);
  font-size: 22px;
  cursor: pointer;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);

  /* état caché */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* état visible */
#btnScrollTop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#btnScrollTop:hover {
  background-color: #004f86;
}


/* ---- Fin Boutons ---- */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  margin: 0;
  min-height: 100vh;
  height: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--gris-leger);
}

.body_index {
  background-image: url('../img/wallpaper_photo_tournage.jpg');
  background-size: cover;
  background-position: bottom;
}

.contenu {
  padding-top: 80px;
  padding-bottom: 50px;
  width: 93%;
  margin-left: auto;
  margin-right: auto;
  flex: 1 0 auto;
  transition: 0.5s;
  min-height: 0;
}

.contenu_login {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bleu-locmat);
}

.loader {
  position: fixed;
  width: 100%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
}

.loader::after {
  content: "";
  width: 75px;
  height: 75px;
  border: 5px solid #dddddd;
  border-top-color: var(--bleu-locmat);
  border-radius: 50%;
  animation: loading 0.75s ease infinite;
}

.loadermdp {
  position: fixed;
  width: 100%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11;
}

.loadermdp::after {
  content: "";
  width: 75px;
  height: 75px;
  border: 5px solid #dddddd;
  border-top-color: var(--bleu-locmat);
  border-radius: 50%;
  animation: loading 0.75s ease infinite;
}

.aucun-element {
  text-align: center;
  font-weight: 600;
  border: 1px solid var(--warning-border);
  background-color: var(--warning-background);
  color: var(--warning-text);
  padding: 10px;
  border-radius: 10px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

@keyframes loading {
  from {
    transform: rotate(0turn);
  }

  to {
    transform: rotate(1turn);
  }
}

/* ---- page 404 ---- */

.actions-404 {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.details-404 {
  margin-top: 24px;
}

/* ---- fin page 404 ---- */


/* ---- page de login ---- */

.login {
  position: absolute;
  justify-content: center;
  background-color: var(--blanc);
  width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
}

.logo_login img {
  max-width: 300px;
  max-height: 150px;
}

.champs_login {
  margin-top: 50px;
  display: flex;
  flex-direction: column;
}

.champs_connexion {
  padding: 10px;
  background-color: var(--blanc);
  border: none;
  border-bottom: 1.5px solid var(--bleu-locmat);
  outline: none;
}

.error_message {
  color: var(--refuse);
  font-weight: bolder;
}

.mdp_oublie {
  margin-top: 30px;
}

#oublie {
  color: var(--bleu-locmat);
}

.password_wrapper {
  position: relative;
  display: flex;
  margin-top: 10px;
  align-items: center;
}

.password_wrapper input {
  width: 100%;
}

.password_wrapper img {
  position: absolute;
  right: 10px;
  cursor: pointer;
}

/* ---- fin page de login ---- */

/* ---- page d'accueil ---- */

.accueil {
  position: relative;
  width: 50%;
  padding: 20px;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border-radius: 20px;
  font-size: larger;
  font-weight: bold;
  color: var(--gris-leger);
  background: transparent;
  backdrop-filter: blur(8px) brightness(1.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 8px 1px hsl(0, 0%, 100%, 0.2);
}

.accueil label {
  font-size: 2em;
}

.grid-container {
  display: grid;
  grid-template-columns: 35% 65%;
  gap: 0;
  align-items: center;
  margin-top: 10px;
}

.grid-container div {
  padding: 10px;
}

.item1,
.item3,
.item5 {
  text-align: right;
  height: 100%;
}

.item2,
.item4,
.item6 {
  text-align: left;
}

a.mail_accueil,
a.mail_accueil:visited,
a.mail_accueil:hover,
a.mail_accueil:active {
  color: #ffffff;
}


/* ---- fin page d'accueil ---- */

/* ---- navbar ---- */

.sidebar,
#sidebar-menu-plannings {
  display: none;
}

.navbar {
  width: 100%;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
  height: 80px;
  background-color: var(--blanc);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  position: fixed;
  padding: 0 35px;
  left: 0%;
  border-top: none;
}

.navbar_btn {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar_btn a {
  text-decoration: none;
  color: var(--bleu-locmat);
  font-weight: 600;
  cursor: pointer;
}

.navbar_btn a:hover {
  transition: 0.2s;
  transform: scale(1.1);
}

.burger {
  display: none;
}

.logo_navbar img {
  max-width: 200px;
  height: 75px;
}

/* ---- fin navbar ---- */

/* ---- sous menu planning / logistique ----  */

.dropdown-menu-nav {
  position: fixed;
  display: block;
  opacity: 0;
  transform: translateY(-100%);
  background-color: var(--blanc);
  border: solid 1px var(--bleu-locmat);
  border-top: none;
  width: auto;
  height: auto;
  z-index: 9;
  transition: 0.2s ease-in-out;
}

.dropdown-menu-nav a {
  display: block;
  color: var(--noir);
  text-decoration: none;
  padding: 10px;
  padding-right: 30px;
  border-bottom: 1px solid var(--gris);
}

.dropdown-menu-nav a:last-of-type {
  border-bottom: none;
}

.dropdown-menu-items a:hover {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
}


/* lien désactivé */
.lien-bientot {
  pointer-events: none;
  /* désactive complètement le clic */
  opacity: 0.6;
  /* visuel "pas actif" */
  cursor: not-allowed;
}

/* badge "bientôt" */
.badge-bientot {
  margin-left: 6px;
  color: #ff2a2a;
  /* rouge vif (change si besoin) */
  font-weight: 600;
  font-size: 0.85em;
}



/* ---- fin sous menu planning / logistique ----  */

/* ---- champ recherche ----  */

.zone_recherche {
  width: 100%;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.input-search {
  padding: 10px;
  width: 40%;
  outline: none;
  border-radius: 10px;
  border: 1px solid var(--bleu-locmat);
}

.zone_recherche div {
  display: flex;
  gap: 10px;
}

/* ---- fin champ recherche ----  */

/* ---- Filtres ---- */

.filtre {
  display: flex;
  background-color: var(--blanc);
  flex-direction: column;
  position: fixed;
  right: 0px;
  top: 80px;
  width: 300px;
  transition: 0.3s;
  transition-delay: 0s;
  z-index: 9;
  border: 1px solid var(--gris);
  border-top: none;
  overflow-y: auto;
  max-height: 600px;
  transform: translateX(100%);
}

.filtre label {
  font-weight: 600;
  padding-left: 10px;
  margin-bottom: 5px;
}

#gest_name,
#pers_name,
#affaire_name {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid var(--bleu-locmat);
  outline: none;
}

.plan_filtre_section {
  margin-bottom: 20px;
  padding: 0 10px;
}

.plan_filtre_section div {
  margin-bottom: 5px;
}

.plan_filtre_section label {
  font-weight: unset;
  padding-left: 5px;
}

.plan_filtre_section .calendar_date {
  margin-bottom: 0px;
}

.planning_filtre {
  width: 100%;
  display: flex;
  justify-content: end;
}

.planning_filtre_devis {
  justify-content: space-between;
}

.filtre select {
  width: 50%;
  background-color: var(--blanc);
  border: 1px solid var(--gris);
  border-radius: 8px;
  padding: 5px;
  color: var(--noir);
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s ease;
}

.filtre span,
.filtre .close {
  padding: 10px;
}

.filtre span:hover,
.filtre .close:hover {
  cursor: pointer;
}

.filtre .statut {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 35px;
}

.filtre #aucun::before {
  content: url('../img/none.svg');
  position: absolute;
  left: 5px;
}

.filtre #accepte::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--accepte);
}

.filtre #confirme::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--confirme);
}

.filtre #indisponible::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--indisponible)
}

.filtre #refuse::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--refuse);
}

.filtre #en-attente::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--en-attente);
}

.filtre #absent::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--absent);
}

.filtre #annule::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--gris-annule);
}

/* ---- début lauren ---- */
.filtre .type_affaire {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 35px;
}

.filtre #aucun::before {
  content: url('../img/none.svg');
  position: absolute;
  left: 5px;
}

.filtre #type_1::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_1);
}

.filtre #type_2::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_2);
}

.filtre #type_3::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_3)
}

.filtre #type_4::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_4);
}

.filtre #type_5::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_5);
}

.filtre #type_6::before {
  content: "";
  position: absolute;
  left: 5px;
  height: 55%;
  border-radius: 50%;
  aspect-ratio: 1/1;
  background-color: var(--type_aff_6);
}

/* ---- fin lauren ---- */

.statut-actif {
  background-color: var(--gris-leger);
  border: 1px solid var(--bleu-locmat);
  font-weight: bold;
}

.statut_btn_rech {
  background-color: var(--blanc);
  position: sticky;
  bottom: 0px;
  display: flex;
  justify-content: center;
  padding: 10px !important;
  border-top: 1px solid var(--bleu-locmat);
}

.couleurStatut,
.couleurEtape {
  height: 20px;
  aspect-ratio: 1/1;
  margin-left: 5px;
  margin-right: 5px;
  border: 0.5px solid var(--gris);
}

/*==== parties contrats ====*/

#contrat_signe::before {
  content: url('../img/check-full.svg');
  position: absolute;
  left: 5px;
}

#contrat_attente::before {
  content: url('../img/sablier-orange.svg');
  position: absolute;
  left: 5px;
}

#contrat_annule::before {
  content: url('../img/cancel-full.svg');
  position: absolute;
  left: 5px;
}

/* ---- fin Filtres ---- */

/* ---- tableaux ----  */

table {
  border-collapse: collapse;
  border: 2px solid var(--bleu-locmat);
  margin-bottom: 30px;
  table-layout: auto;
  width: 100%;
  background-color: var(--blanc);
}

.table_container {
  overflow-x: auto;

}

thead tr {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
  text-align: left;
}

th {
  padding: 10px;
  border: 1px solid var(--gris-annule);
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background-color: #eeeeee;
}

td {
  position: relative;
  padding: 10px;
  border: 1px solid var(--gris-annule);
}

.tableau_propositions td:first-child,
.tableau_avec_puce tr td:first-child {
  width: 0;
}

.tableau_affaires td:first-child,
.table_affaires tr td:first-child {
  width: 0;
}

.puce {
  height: 20px;
  width: 20px;
  border-radius: 30px;
  margin-left: auto;
  margin-right: auto;
}

.td_centrer {
  text-align: center;
}

.tr_none {
  text-align: center;
  padding: 20px 0;
  cursor: default;
}

.tr_none:hover {
  background-color: transparent;
}

/* ---- fin tableaux ----  */

/* ---- page proposition détail ---- */

.statut-detail {
  display: flex;
  margin-bottom: 30px;
  align-items: center;
}

.statut-detail span {
  height: fit-content;
  padding: 8px;
  margin-left: 10px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: bolder;
}

#chef {
  height: fit-content;
  padding: 8px;
  border-radius: 10px;
  white-space: nowrap;
  background-color: orange;
  font-weight: bolder;
}

.section {
  position: relative;
  border: 1px solid var(--bleu-locmat);
  border-radius: 10px;
  margin-bottom: 30px;
  padding: 15px;
  background-color: var(--blanc);
}

.section legend {
  padding: 0 6px;
  color: var(--bleu-locmat);
  font-weight: bold;
  font-size: larger;
}

.section textarea {
  width: 100%;
  height: 100px;
  resize: none;
  outline: none;
  margin-bottom: 20px;
  margin-top: 10px;
}

.section_declaration {
  display: flex;
  flex-direction: column;
}

.section_declaration span {
  margin-bottom: 20px;
}

.section__legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;

  border-radius: 6px;

  color: var(--bleu-locmat);
  border: 1px solid var(--bleu-locmat);
  text-decoration: none;
  font-weight: bold;
}

.section__edit:hover {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
}

/* ---- fin page proposition détail ---- */

/* ---- bouton accepter et refuser proposition ---- */

.section_boutons_accepter_refuser {
  display: flex;
  gap: 10px;
}

.btn-accepter {
  border: 1px solid var(--confirme);
  background-color: #E8FBE6;
  color: #1B6600;
}

.btn-refuser {
  border: 1px solid var(--refuse);
  background-color: #FDEAEA;
  color: #A30000;
}

/* ---- fin bouton accepter et refuser proposition ---- */

/* ---- page profil ---- */

.profil_mobile_container {
  display: none;
}

.profil {
  width: 60%;
  height: auto;
  padding: 25px;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--blanc);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
  border-radius: 10px;
  border: solid 1px var(--bleu-locmat);
  position: relative;
}

/* ⬇️ décommenter ce qui suit si ajout photo de profil ⬇️ */

/* .img_profil{
  position: absolute;
  display: flex;
  justify-content: center;
  top: 0%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 135px;
  height: 135px;
  border-radius: 50%;
  border: 1px solid var(--bleu-locmat);
  background-color: var(--blanc);
  overflow: hidden;
}

.img_profil img {
  object-fit: cover;
  transition: transform 0.3s ease;
} */

.profils_left_et_right {
  height: auto;
  display: flex;
  justify-content: space-between;
}

.profil_left,
.profil_right {
  width: 40%;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profil_right div:first-of-type {
  margin-bottom: 20px;
}

.profil input {
  width: 100%;
  padding: 15px;
  margin-top: 5px;
  border: 1px solid var(--gris-leger);
  border-radius: 5px;
  background-color: var(--blanc);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
  outline: none;
}

.profil_left div:nth-child(2) div {
  margin-top: 10px;
}

#cochetel {
  width: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.mdp {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 10px;
}

/* ---- fin page profil ---- */

/* ---- mon planning ----  */

.tooltip {
  white-space: nowrap;
  position: absolute;
  display: none;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  z-index: 1000;
}

.tooltip button:nth-of-type(1) {
  background-color: var(--bleu-locmat);
}

.tooltip button {
  background-color: var(--refuse);
  padding: 10px;
  border: none;
  border-radius: 10px;
  color: var(--blanc);
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  font-weight: bold;
}

#tooltip_indispo div:nth-of-type(1) {
  margin-top: 10px;
}

#tooltip_indispo div {
  padding: 3px 0;
}

#tooltip_mesindispos div {
  padding: 5px 5px;
  cursor: pointer;
  border-top: 1px solid var(--gris-annule);
}

#tooltip_mesindispos div:nth-of-type(1) {
  margin-top: 10px;
}

#tooltip_mesindispos div:hover {
  background-color: #f0f0f0;
}

* {
  box-sizing: border-box;
}

.calendar {
  width: auto;
  margin-top: 20px;
  background-color: var(--blanc);
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 5px;
  border-bottom: none;
}

.month {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: var(--bleu-locmat);
  color: white;
  font-size: large;
}

.weekdays,
.days {
  display: flex;
  flex-wrap: wrap;
  text-decoration: none;
  color: black;
}

.weekday,
.day {
  width: 14.28%;
  text-align: center;
  padding: 10px 0;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.weekday {
  font-weight: bold;
}

.weekdays {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
  border-top: 1px solid #ccc;
  font-weight: bold;
}

.day {
  background-color: var(--blanc);
  position: relative;
}

#table_planning {
  margin-top: 20px;
  display: none;
}

#table_planning td:nth-child(3),
#table_planning td:nth-child(3) {
  width: 0;
  text-align: left;
  white-space: nowrap;
}

.current-day {
  color: red;
  font-weight: bold;
}

#indisponibilites-day {
  background: repeating-linear-gradient(-30deg,
      var(--blanc),
      var(--blanc) 10px,
      var(--indisponible2) 10px,
      var(--indisponible2) 20px);
  cursor: pointer;
  font-weight: bold;
}

#conflit {
  background-color: var(--conflit);
  cursor: pointer;
}

#confirme-day {
  background-color: var(--confirme);
}

#confirme-day a {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

#en-attente-day {
  background-color: var(--en-attente);
}

#en-attente-day a {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

#accepte-day {
  background-color: var(--accepte);
}

#accepte-day a {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.grayed {
  background-color: var(--gris-leger);
  color: #a0a0a0;
}

.weekdays div:last-child,
.days div:nth-child(7n) {
  border-right: none;
}

.prev,
.next {
  cursor: pointer;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.indisponibilites {
  display: flex;
  position: relative;
  width: 100%;
  border: 1px solid var(--bleu-locmat);
  border-radius: 10px;
  margin-top: 40px;
  padding: 10px;
  padding-top: 30px;
  justify-content: space-between;
}

.indisponibilites input {
  height: min-content;
  margin-left: 5px;
}

.indisponibilites input[type="text"] {
  padding: 8px;
  border-radius: 5px;
  border: 1px solid var(--bleu-locmat);
  outline: none;
}

.indisponibilites h2 {
  position: absolute;
  top: -38px;
  background-color: var(--blanc);
  color: var(--bleu-locmat);
  padding: 0 10px 0 10px;
}

.indisponibilites select {
  margin-bottom: 10px;
}

.indisponibilites>div:last-child {
  height: min-content;
  display: flex;
  margin-left: 10px;
}

.indisponibilites button {
  display: flex;
  margin-left: 10px;
}

.indisponibilites span:last-child {
  display: none;
  color: var(--refuse);
  font-weight: bold;
  margin-top: 10px;
  justify-content: center;
  max-width: 100%;
  overflow-wrap: break-word
}

/* ---- fin mon planning ----  */

/* ---- footer ---- */

footer {
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  background-color: var(--bleu-footer);
  flex-shrink: 0;
  font-size: 12px;
  color: var(--blanc);
}

footer a {
  text-decoration: none;
  color: var(--blanc);
}

.footer-copyright {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: right;
  justify-content: center;
}

.footer-copyright span {
  margin-bottom: 5px;
}

.footer-logo {
  width: 60%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-logo img {
  width: 125px;
}

.footer-contact {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-contact img {
  width: 25px;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* ---- fin Footer ---- */

/* ---- Modification mot de passe ---- */

.mdp_box {
  width: 40%;
  height: auto;
  padding: 25px;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--blanc);
  border-radius: 10px;
  border: solid 1px var(--bleu-locmat);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
}

.mdp_box span {
  margin-bottom: 20px;
  font-size: 14px;
}

.modif_mdp {
  height: 100%;
  margin-bottom: 20px;
  position: relative;
}

.modif_mdp input,
.confirmer_mdp input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--gris-leger);
  border-radius: 5px;
  background-color: var(--blanc);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 4px;
  outline: none;
}

.mdp_box button {
  width: 30%;
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
}

.modif_mdp img {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translate(-50%, -50%);
}

#modifMdpOK {
  color: var(--confirme);
  font-weight: bolder;
  margin-left: auto;
  margin-right: auto;
}

/* ---- fin Modification mot de passe ---- */

/* ---- page dossiers ---- */

.folder {
  margin-bottom: 20px;
  width: fit-content;
}

.folder span {
  cursor: pointer;
  font-size: large;
  font-weight: bold;
}

.folder span img {
  margin-right: 5px;
  vertical-align: middle;
  margin-top: -5px;
}

.file {
  color: var(--bleu-locmat);
  font-weight: none;
  margin-bottom: 5px;
}

.file span {
  font-size: medium;
  font-weight: normal;
  cursor: default;
}

.file img {
  margin-left: 10px;
  cursor: pointer;
  vertical-align: middle;
  margin-top: -5px;
}

.children {
  border-left: 1px solid #9e9d9d;
  margin-left: 25px;
  margin-top: 5px;
  padding-left: 10px;
  display: none;
}

.children .folder {
  margin-bottom: 10px;
}

/* ---- fin page dossiers ---- */

/* -------- Contrats -------- */

#tableau-contrat th:nth-child(-n+3),
#tableau-contrat td:nth-child(-n+3) {
  width: 0;
  text-align: left;
  white-space: nowrap;
}

#tableau-contrat th:nth-child(-n+3) {
  text-align: center;
}

#tableau-contrat td:last-of-type {
  text-align: right;
}

/* -------- fin Contrats -------- */

/* ---- ContratSignature.shtml ---- */

#pdf_display {
  align-items: center;
  display: flex;
  flex-direction: column;
}

#pdf_display canvas {
  margin-top: 20px;
  width: 50%;
  height: 50%;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.container {
  display: flex;
}

.pdf {
  width: 150%;
  height: auto;
}

#pdfContainer {
  display: flex;
  flex-direction: column;
}

#pdfContainer canvas {
  width: 60%;
  margin-top: 20px;
  margin-bottom: 20px;
  border: solid 1px var(--bleu-locmat);
  margin-left: auto;
  margin-right: auto;
}

#pdfControls {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

#pageInfo {
  margin: 0 10px;
}

.sign {
  width: fit-content;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-left: auto;
  margin-right: auto;
  margin-top: 30px;
}

.sign canvas {
  border: 1px solid var(--bleu-locmat);
  margin-bottom: 20px;
  background-color: var(--blanc);
}

.sign div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

#prevPage,
#nextPage {
  padding: 10px;
}

/* ---- fin ContratSignature.shtml ---- */

/* ---- page gestion personnel ---- */

#tableau_gestionPersonnel td {
  width: 0;
  cursor: default;
}

#tableau_gestionPersonnel tbody tr:hover {
  background-color: transparent;
}

#tableau_gestionPersonnel td:last-of-type {
  text-align: right;
}

#tableau_gestionPersonnel td:nth-of-type(2),
#tableau_gestionPersonnel td:nth-of-type(4) {
  text-align: center;
}

/* ---- fin page gestion personnel ---- */

/* ---- Disponibilité article ---- */

.article_container {
  border: 1px solid var(--bleu-locmat);
  border-radius: 10px;
  position: relative;
  padding: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--blanc);
  box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
}

.article_container>div {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.article_container>.suggestions {
  width: calc(100% - 40px);
  max-height: calc(100% - 70px);
}

#articlenom {
  padding: 10px;
  width: 100%;
  outline: none;
  border-radius: 10px;
  border: 1px solid var(--bleu-locmat);
}

#articlelieu {
  margin-top: 20px;
}

.articledatedeb,
.article_btn {
  margin-top: 20px;
}

.articledatefin {
  margin-top: 10px;
}

#result_article {
  margin-top: 20px;
  font-weight: bold;
  text-align: center;
}

.suggestions {
  display: none;
  border: 1px solid var(--gris-annule);
  border-radius: 5px;
  background-color: var(--blanc);
  overflow-y: auto;
  position: absolute;
  z-index: 9;
}

.suggestions div {
  width: 100%;
  padding: 8px;
  cursor: pointer;
}

.suggestions div:hover {
  background-color: #f0f0f0;
}

/* ---- fin disponibilité article ---- */

/* ---- Planning Gestion / Personnel / Devis ---- */

.majauto {
  width: 60px;
}

#span_majauto {
  display: none;
}

.detail_gest,
.detail_pers {
  width: auto;
  max-height: 500px;
  padding: 10px;
  position: absolute;
  z-index: 11;
  display: none;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.detail_gest div,
.detail_pers div {
  margin-bottom: 5px;
}

.detail_tache {
  margin-top: 10px;
}

.detail_personnel {
  margin-left: 10px;
  line-height: 25px;
  padding-bottom: 15px;
}

.planning {
  width: auto;
  margin-top: 20px;
  background-color: var(--blanc);
  border: 1px solid #ccc;
  border-radius: 5px;
}

.plan_container_aff {
  display: flex;
}

.plan_semaine,
.plan_row {
  display: flex;
  width: 100%;
}

.plan_semaine {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
}

.plan_row {
  border-top: 0.5px solid #ccc;
}

.plan_row_aff {
  flex: 1;
  background-color: var(--gris-leger);
  border-right: 1px solid #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan_row_aff:last-of-type {
  border-right: none;
}

.plan_jour,
.plan_jour_affaires {
  flex: 1;
  text-align: center;
  padding: 10px 2px;
  border: 0.5px solid #ccc;
  background-color: var(--bleu-locmat);
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan_jour:first-child {
  flex: 1.5;
}

.plan_case {
  flex: 1;
  overflow: hidden;
  border-right: 1px solid #ccc;
  background-color: var(--blanc);
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan_case:last-of-type {
  border-right: none;
}

.plan_case_aff {
  overflow: hidden;
  min-height: 25px;
  padding: 2px;
}

.plan_col_aff {
  margin-bottom: 25px;
}

.plan_col_aff:last-of-type {
  margin-bottom: 0px;
}

.plan_case_devis {
  flex-direction: row;
}

.plan_case:first-child {
  flex: 1.5;
  display: flex;
  text-align: left;
  justify-content: center;
}

.bloc {
  height: 30px;
  border: 0.5px solid black;
  line-height: 25px;
  overflow-x: hidden;
  cursor: pointer;
}

.plan_header {
  width: 100%;
  height: 50px;
  background-color: var(--bleu-locmat);
  border-bottom: 0.5px solid #ccc;
  display: flex;
  justify-content: space-between;
  color: white;
  font-size: large;
  align-items: center;
  padding: 20px;
}

.plan_filtre_date {
  display: flex;
}

.plan_horaire {
  width: 100%;
  height: 30px;
  display: flex;
}

.plan_horaire_jour {
  flex: 1;
  width: 100%;
  height: auto;
  display: flex;
  background-color: var(--gris-leger);
}

.plan_horaire_jour:first-child {
  flex: 1.5;
}

.tranche_horaire {
  position: relative;
  flex: 1;
  width: 100%;
  height: auto;
  border: 0.5px solid #ccc;
}

.tranche_horaire span {
  position: absolute;
  background-color: var(--gris-leger);
  top: 0;
  right: -12%;
  z-index: 8;
  font-size: 12px;
  padding-top: 5px;
}

#detail_pers_qr img {
  height: 100px;
  aspect-ratio: 1/1;
}

.detail_horaire {
  line-height: 20px;
  padding-bottom: 5px;
  margin-left: 10px;
}

#devis_filtre_typeaffaire div,
#pers_filtre_statuts div,
#gest_filtre_etapes div {
  display: flex;
}

/* ---- fin Planning Gestion / Personnel / Devis ---- */

/* ---- Affaires / devis etc ---- */

.GP,
.SG {
  font-weight: bold;
}

.td_SG {
  padding-left: 20px;
}

.td_autre_type {
  padding-left: 40px;
}

.lignekit {
  padding-left: 60px;
}

.lignekit::before {
  content: "- ";
}

.td_numerique {
  text-align: right;
}

.lignedetail p {
  font-weight: bold;
}

.lignedetail span {
  font-weight: normal;
}

.lignedetail input {
  padding: 5px;
  margin-top: 5px;
  border: 1px solid var(--bleu-locmat);
  border-radius: 5px;
  background-color: var(--blanc);
}

.lignedetail div:last-of-type {
  margin-top: 40px;
}

.lignedetail div:last-of-type a {
  margin-right: 5px;
}

#lbl_dates select,
#lbp_dates select,
#ld_dates select {
  margin-left: 10px;
}

.ligne_modif_numerique {
  text-align: right;
}

#tbodybis td {
  text-align: right;
}

.btn_ld {
  display: flex;
  align-items: center;
}

.btn_ld span,
.blocked,
.warning {
  height: fit-content;
  width: fit-content;
  padding: 8px;
  margin-left: 10px;
  border-radius: 12px;
  white-space: nowrap;
  font-weight: bold;
}

.btn_ld span {
  border: 1px solid var(--warning-border);
  background-color: var(--warning-background);
  color: var(--warning-text);
}

.blocked {
  border: 1px solid var(--blocked-border);
  background-color: var(--blocked-background);
  color: var(--blocked-text);
}

.warning {
  border: 1px solid var(--warning-border);
  background-color: var(--warning-background);
  color: var(--warning-text);
}

.tr_client_blocked {
  background-color: var(--blocked-background);
  color: var(--blocked-text);
}

.tr_client_blocked:hover {
  background-color: var(--blocked-background);
}

.ligne-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.puce_encadre {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ---- fin Affaires / devis etc ---- */

/* ---- ajout ligne devis ---- */

.tooltip_ld {
  padding: 0;
  background-color: #eeeeee;
  z-index: 9;
}

.tooltip_ld div {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid var(--gris);
}

.tooltip_ld div:hover {
  background-color: var(--bleu-locmat);
  color: var(--blanc);
}

.tooltip_ld div:hover img {
  filter: brightness(0) invert(1);
}

.tooltip_ld div:last-of-type {
  border-bottom: unset;
}

.tooltip_ld div img {
  margin-right: 10px;
}

.section_ajoutligne {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section_ajoutligne .calendar_date {
  margin-bottom: unset;
}

.section_ajoutligne input {
  padding: 5px;
  border: 1px solid var(--bleu-locmat);
  border-radius: 5px;
}

.ajoutligne_codelibre {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ajoutligne_codelibre>div {
  position: relative;
  width: 25%;
}

.ajoutligne_codelibre>div>input {
  width: 100%;
}

.sugg_ajoutligne {
  margin-top: 1px;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

#ajoutligne_error {
  display: none;
  color: var(--refuse);
  margin-bottom: 20px;
}

.montant {
  text-align: end;
}


/* ---- fin ajout ligne devis ---- */

/* ---- Articles à cocher ---- */

.cocher_kit {
  margin-bottom: 10px;
}

.container_articles_a_cocher {
  width: 100%;
  border: 1px solid var(--bleu-locmat);
  background-color: var(--blanc);
  margin-bottom: 50px;
}

.article_a_cocher {
  width: 100%;
  height: 100px;
  display: flex;
  cursor: pointer;
  font-size: 16pt;
  border-bottom: 1px solid var(--gris-annule);
}

.article_a_cocher:last-of-type {
  border-bottom: none;
}

.lignedekit span,
.lignedekit label {
  margin-left: 60px;
}

.aac1 {
  width: 100%;
  padding: 5px;
  display: block;
  align-items: center;
  justify-content: center;
}

.aac1 span {
  font-weight: bold;
  display: block;
}

.aac2 {
  width: 30%;
  height: 100%;
  display: flex;
}

.aac2 div {
  width: 100%;
  height: 100%;
  border-left: 1px solid var(--gris-annule);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
}

.popup_comment,
.popup_picture,
.popup_confirm {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  z-index: 1000;
  width: fit-content;
  min-width: 250px;
}

.popup_comment span,
.popup_picture span,
.popup_confirm span {
  font-weight: bold;
}

.popup_comment div,
.popup_picture div,
.popup_confirm div {
  margin-top: 10px;
}

.popup_comment div:last-child,
.popup_picture div:last-child,
.popup_confirm div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.popup_comment button,
.popup_picture button,
.popup_confirm button {
  padding: 10px;
  margin-top: 20px;
  justify-content: right;
}

.aac2 div.article_photo_value {
  display: none !important;
}

#popup_picture_container img {
  max-width: min(90vw, 700px);
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
}

/* ---- fin Articles à cocher ---- */


/* ----------------------------------- format mobile --------------------------------  */

@media (max-width: 800px) {

  .contenu {
    padding-top: 60px;
    font-size: 14px;
    transition: 0.5s;
  }

  /* ---- Boutons ---- */
  .bouton,
  .bouton a {
    padding: 10px;
    font-size: unset;
    white-space: nowrap;
  }

  .bouton_retour {
    margin-top: 40px;
  }

  #btnScrollTop {
    bottom: 40px;
    right: 20px;
  }

  /* ---- Fin Boutons ---- */

  /* ---- page login pour mobile ---- */

  .login {
    width: 90%;
    max-width: 400px;
    padding: 20px;
  }

  .logo_login img {
    max-width: 250px;
    max-height: 150px;
  }

  /* ---- page d'accueil mobile ---- */

  .accueil {
    height: 60%;
    width: fit-content;
    font-size: large;
  }

  /* ---- navbar pour mobile ---- */

  .navbar {
    height: 60px;
    justify-content: center;
    width: 100%;
  }

  .navbar_btn {
    display: none;
  }

  .burger {
    display: block;
    position: absolute;
    width: 40px;
    left: 20px;
  }

  .logo_navbar {
    position: absolute;
  }

  .logo_navbar img {
    max-width: 120px;
    height: 55px;
  }

  .img_profil {
    display: none;
  }

  /* ---- sidebar ----  */

  .sidebar {
    display: block;
    position: fixed;
    background-color: var(--bleu-locmat);
    margin-top: 60px;
    width: auto;
    min-width: 60%;
    height: calc(100vh - 60px);
    transform: translateX(-100%);
    transition: 0.3s;
    transition-delay: 0s;
    z-index: 10;
    overflow-y: auto;
  }

  .sidebar a {
    display: block;
    color: var(--blanc);
    text-decoration: none;
    padding-left: 20px;
    padding: 10px;
    margin-top: 10px;
    text-align: right;
  }

  #sidebar-menu-plannings {
    display: block;
  }

  /* ------- Sous-menu animé ------- */
  .submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-in-out;
    background-color: var(--gris-leger);
    border-right: 1px solid var(--gris);
  }

  .submenu.open {
    max-height: 500px;
  }

  .submenu a {
    font-size: 15px;
    padding-left: 15px;
    color: var(--bleu-locmat);
    border-bottom: 1px solid var(--gris);
    margin-top: 0px;
  }

  .submenu a:first-of-type {
    border-top: 1px solid var(--gris);
  }

  /* ------- Flèche du bouton -------- */
  .submenu-btn::after {
    content: "▼";
    float: right;
    transition: transform 0.3s ease-in-out;
    margin-left: 10px;
  }

  .submenu-btn.active::after {
    transform: rotate(180deg);
  }

  /* ---- tableaux ----  */

  table {
    font-size: 12px;
  }

  th,
  td {
    padding: 5px;
  }

  tbody tr:nth-child(even) {
    background-color: var(--gris-leger);
  }

  td {
    min-width: 25px;
  }

  .puce {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    border-radius: 0;
  }

  .td_SG {
    padding-left: 15px;
  }

  .td_autre_type {
    padding-left: 20px;
  }

  /* ---- page proposition détail ---- */

  .section {
    margin-top: 25px;
  }

  .section textarea {
    width: 100%;
    height: 150px;
  }

  /* ---- bouton accepter et refuser proposition ---- */

  .section_boutons_accepter_refuser {
    display: flex;
    justify-content: center;
    gap: 10px;
  }

  .btn-accepter,
  .btn-refuser {
    font-size: 12px;
  }

  /* ---- page profil ---- */

  .profil {
    display: none;
  }

  .profil_mobile_container {
    display: block;
    width: 95%;
    max-width: 600px;
    height: min-content;
    padding: 10px;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    background-color: var(--gris-leger);
    border-radius: 10px;
    border: solid 1px var(--bleu-locmat);
  }

  .profil_mobile {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .profil_mobile input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--blanc);
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 4px;
  }

  .profil_mobile button {
    width: 100%;
    max-width: 250px;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .adresse {
    margin-bottom: 20px;
  }

  .adresse input {
    margin-bottom: 1px;
  }

  /* ---- champs recherche ----  */

  .input-search {
    padding: 10px;
  }

  .filtre {
    top: 60px;
    width: 60%;
    max-width: 250px;
    max-height: unset;
    height: calc(100% - 60px);
    border-right: none;
  }

  /* ---- footer ---- */

  footer {
    height: 60px;
    font-size: 10px;
  }

  .footer-copyright {
    text-align: center;
  }

  .footer-logo {
    padding: 5px;
  }

  .footer-logo img {
    width: 90px;
  }

  .footer-contact {
    text-align: center;
  }

  .footer-contact img {
    width: 20px;
  }

  /* ---- Modification mot de passe ---- */

  .mdp_box {
    width: 95%;
    padding: 10px;
  }

  .mdp_box button {
    width: 50%;
  }

  /* ---- Planning ---- */

  .month {
    padding: 10px;
  }

  .prev,
  .next {
    width: 30px;
    height: 30px;
  }

  #indisponibilites-day {
    background: repeating-linear-gradient(-30deg,
        var(--blanc),
        var(--blanc) 8px,
        var(--indisponible2) 8px,
        var(--indisponible2) 13px);
  }

  .indisponibilites {
    display: block;
    width: 100%;
  }

  .indisponibilites input {
    height: min-content;
    width: 100%;
    margin-left: 0px;
    margin-bottom: 10px;
  }

  .indisponibilites h2 {
    position: absolute;
    top: -38px;
    background-color: var(--blanc);
    color: var(--bleu-locmat);
    padding: 0 10px 0 10px;
  }

  .indisponibilites>div:first-of-type {
    margin-left: 0px;
  }

  .indisponibilites>div:nth-of-type(2) {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    border-bottom: 1px solid var(--bleu-locmat);
  }

  .indisponibilites>div:nth-of-type(3) {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
  }

  .indisponibilites select {
    margin-bottom: 10px;
  }

  .indisponibilites>div:last-child {
    margin-top: 20px;
    height: min-content;
    display: flex;
  }

  .indisponibilites button {
    display: flex;
    width: fit-content;
    height: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background-color: var(--bleu-locmat);
    color: var(--blanc);
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
  }

  .indisponibilites span:last-child {
    display: none;
    color: var(--refuse);
    font-weight: bold;
    margin-top: 10px;
    justify-content: center;
    max-width: 100%;
    overflow-wrap: break-word
  }

  /* ---- ContratSignature.shtml ---- */

  #chemin {
    display: flex;
    flex-direction: column;
  }

  .container {
    flex-direction: column;
  }

  .pdf {
    width: 100%;
  }

  #pdfContainer canvas {
    width: 100%;
  }

  .sign canvas {
    margin-bottom: 0px;
    margin-left: auto;
    margin-right: auto;
  }

  .sign button {
    margin-top: 10px;
  }

  /* ---- ContratDetail.shtml ---- */

  #pdf_display canvas {
    width: 100%;
    height: 100%;
  }

  /* ---- gestion personnel ----*/

  #tableau_gestionPersonnel td:nth-of-type(3) {
    white-space: nowrap;
  }

  .statut-detail {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    align-items: unset;
  }

  .statut-detail span {
    width: fit-content;
    margin-bottom: 5px;
    margin-left: 0px;
  }

  /* ---- Disponibilité article ---- */

  .article_container div {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }

  #articlenom {
    width: 100%;
  }

  #result_article {
    margin-left: auto;
    margin-right: auto;
  }

  .article_container .suggestions div {
    margin-left: 0;
  }

  /* ---- Planning Gestion / Personnel ---- */

  .planning {
    font-size: 10px;
  }

  .plan_jour {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .plan_case:first-child {
    max-height: 100px;
    overflow: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-size: 8pt;
  }

  .plan_horaire {
    height: 25px;
  }

  .tranche_horaire span {
    right: -30%;
    font-size: 8px;
    padding-top: 8px;
  }

  .detail_gest,
  .detail_pers {
    max-width: 300px;
  }

  .detail_personnel {
    line-height: 20px;
  }


  /* ---- menu déroulant ---- */

  #dropdown-menu,
  #dropdown-menu-planning,
  #dropdown-menu-logistique {
    display: none;
  }

  /* ---- PDF ---- */

  .sign div {
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
    gap: 20px;
  }

  /* ---- Articles à cocher ---- */

  .article_a_cocher {
    min-height: 60px;
    height: auto;
    font-size: unset;
  }

  .aac1 {
    width: 60%;
  }

  .aac1 span {
    font-weight: bold;
    display: block;
  }

  .aac2 {
    width: 40%;
    height: auto;
    display: flex;
  }

  .aac2 img {
    width: 18px;
  }

  .popup_comment,
  .popup_picture,
  .popup_confirm {
    max-width: 95%;
  }

  /* ---- fin Articles à cocher ---- */

  /* ---- ligne devis / bp / bl ---- */

  .lignedetail input {
    padding: 3px;
    margin-top: 5px;
    margin-bottom: 5px;
    display: flex;
  }

  #lbl_dates select,
  #lbp_dates select,
  #ld_dates select {
    margin-left: unset;
  }

  /* ---- fin ligne devis / bp / bl ---- */

  /* ---- ajout ligne ---- */

  .ajoutligne_codelibre>div {
    width: unset;
  }

  .section_ajoutligne input {
    padding: 3px;
  }

  /* ---- fin ajout ligne ---- */

}

/* ---- Listes des bons a cocher ---- */

.page-bp-liste-coche-prepa {
  --coche-main: #7A3F00;
  --coche-light: #FFF3E6;
  --coche-border: #D8A15D;
  --coche-text: #4A2600;
}

.page-bl-liste-coche-depart {
  --coche-main: #E02020;
  --coche-light: #FFF0F0;
  --coche-border: #E08B88;
  --coche-text: #6F1010;
}

.page-bl-liste-coche-retour {
  --coche-main: #28A857;
  --coche-light: #EEF9F1;
  --coche-border: #7FD09C;
  --coche-text: #166437;
}


:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-input-search {
  padding: 10px;
  width: 40%;
  outline: none;
  border-radius: 10px;
  border: 1px solid var(--coche-main);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) {
  --warning-bg: #FFF3CD;
  --warning-border: #E0A800;
  --warning-text: #5C3B00;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .contenu {
  padding: 104px 24px 24px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 16px 22px;
  border-left: 10px solid var(--coche-main);
  border-radius: 18px;
  background: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) .icone {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--coche-light);
  color: var(--coche-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) h1 {
  margin: 0;
  color: var(--coche-main);
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bons-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card {
  background: white;
  border: 2px solid var(--coche-border);
  border-left: 10px solid var(--coche-main);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card:hover {
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card:active {
  transform: scale(0.98);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card.bloque_client {
  opacity: 0.95;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-alerte {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  font-size: 0.92rem;
  font-weight: 700;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card.bloque_client .bon-alerte {
  display: flex;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-alerte-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-ref {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--coche-main);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-statut {
  background: var(--coche-light);
  color: var(--coche-text);
  border: 1px solid var(--coche-border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-nom_affaire {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #111;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-nom_client {
  font-size: 1.05rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-infos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.95rem;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-info {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 9px 10px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-info-label {
  display: block;
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 2px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-info-value {
  font-weight: 700;
  color: #222;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .aucun-element {
  padding: 20px;
  border-radius: 14px;
  background: #f3f3f3;
  text-align: center;
  font-weight: 600;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-coche {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-coche-puce {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-non-coche {
  background: #f7f7f7;
  border: 1px solid #d0d0d0;
  color: #555;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-non-coche .bon-coche-puce {
  background: #fff;
  border: 2px solid #bbb;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-partiel {
  background: var(--coche-light);
  border: 1px solid var(--coche-border);
  color: var(--coche-text);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-partiel .bon-coche-puce {
  background: #fff;
  border: 3px solid var(--coche-main);
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-complet {
  background: var(--coche-main);
  border: 1px solid var(--coche-main);
  color: #fff;
}

:is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .etat-complet .bon-coche-puce {
  background: #fff;
  border: 2px solid #fff;
  box-shadow: inset 0 0 0 8px var(--coche-main);
}


@media (max-width: 600px) {
  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .contenu {
    padding: 78px 18px 18px;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) .icone {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 27px;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) {
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) :is(.page-header-prepa, .page-header-depart, .page-header-retour) h1 {
    font-size: 1.9rem;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-card {
    padding: 14px;
    border-radius: 16px;
    display: block;
    text-decoration: none;
    color: inherit;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-nom_affaire {
    font-size: 1.15rem;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-infos {
    grid-template-columns: 1fr;
  }

  :is(.page-bp-liste-coche-prepa, .page-bl-liste-coche-depart, .page-bl-liste-coche-retour) .bon-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- fin listes des bons a cocher ---- */

/* ---- Detail bon de preparation a cocher ---- */

.page-bon-detail-prepa {
  --prepa-main: #C87932;
  --prepa-main-dark: #9C541D;
  --prepa-light: #FFF1E3;
  --prepa-light-2: #FFF8F1;
  --prepa-border: #E6B278;
  --prepa-text: #653500;
  --neutral-bg: #FFFFFF;
  --neutral-border: #E4E7EC;
  --neutral-text: #1F2937;
  --muted-text: #667085;
  --soft-bg: #F8FAFC;
  --danger-bg: #FFE8E8;
  --danger-text: #8A1F1F;
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);

  padding-top: 90px;
  padding-bottom: 50px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 14px 32px;
}

:is(.page-bon-detail-prepa, .page-bon-detail-depart, .page-bon-detail-retour) .qty-actions {
  margin-top: 5px;
  display: flex;
  justify-content: center;
}

:is(.page-bon-detail-prepa, .page-bon-detail-depart, .page-bon-detail-retour) .qty-action-button {
  border: none;
  background: transparent;
  color: var(--prepa-main);
  padding: 2px 4px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

:is(.page-bon-detail-prepa, .page-bon-detail-depart, .page-bon-detail-retour) .qty-action-button:active {
  transform: scale(0.97);
}

:is(.page-bon-detail-prepa, .page-bon-detail-depart, .page-bon-detail-retour) .qty-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #E5E7EB;
  margin-top: 6px;
}

:is(.page-bon-detail-prepa, .page-bon-detail-depart, .page-bon-detail-retour) .qty-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--prepa-main);
  border-radius: inherit;
  transition: width 0.2s ease;
}

.page-bon-detail-prepa .bon-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.page-bon-detail-prepa .bon-back-link,
.page-bon-detail-prepa .bon-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--neutral-border);
  white-space: nowrap;
}

.page-bon-detail-prepa .bon-back-link {
  background: #F2F4F7;
  color: #344054;
}

.page-bon-detail-prepa .bon-context-badge {
  background: var(--prepa-light);
  color: var(--prepa-text);
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .bon-header-card {
  background: linear-gradient(135deg, var(--prepa-light), #FFFFFF 72%);
  border: 1px solid var(--prepa-border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-bottom: 16px;
}

.page-bon-detail-prepa .bon-header-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.page-bon-detail-prepa .bon-title-block h1 {
  margin: 0 0 6px;
  color: var(--prepa-text);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.15;
}

.page-bon-detail-prepa .bon-subtitle {
  color: var(--neutral-text);
  font-size: 1rem;
  line-height: 1.4;
}

.page-bon-detail-prepa .bon-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--prepa-main);
  color: white;
  font-weight: 800;
  white-space: nowrap;
}

.page-bon-detail-prepa .bon-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.page-bon-detail-prepa .bon-info-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(230, 178, 120, 0.65);
  border-radius: 16px;
  padding: 12px;
  min-width: 0;
}

.page-bon-detail-prepa .bon-info-label {
  color: var(--muted-text);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.page-bon-detail-prepa .bon-info-value {
  color: var(--neutral-text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.page-bon-detail-prepa .blocked {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--danger-bg);
  color: var(--danger-text);
  font-size: 0.78rem;
  font-weight: 900;
  vertical-align: middle;
}

.page-bon-detail-prepa .bon-progress-card,
.page-bon-detail-prepa .prep-toolbar {
  background: var(--neutral-bg);
  border: 1px solid var(--neutral-border);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.page-bon-detail-prepa .bon-progress-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.page-bon-detail-prepa .progress-title {
  font-weight: 900;
  color: var(--neutral-text);
  margin-bottom: 7px;
}

.page-bon-detail-prepa .progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: #EAECF0;
  border-radius: 999px;
}

.page-bon-detail-prepa .progress-fill {
  height: 100%;
  width: 0%;
  background: var(--prepa-main);
  border-radius: 999px;
}

.page-bon-detail-prepa .progress-count {
  color: var(--prepa-text);
  font-weight: 900;
  font-size: 1.1rem;
  white-space: nowrap;
}

.page-bon-detail-prepa .prep-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-bon-detail-prepa .articles-section-title {
  margin: 0;
  color: var(--neutral-text);
  font-size: 1.15rem;
}

.page-bon-detail-prepa .view-note {
  color: var(--muted-text);
  font-size: 0.92rem;
  font-weight: 650;
}

.page-bon-detail-prepa .logistic-list {
  display: grid;
  gap: 16px;
}

.page-bon-detail-prepa .warehouse-section {
  background: #FFFFFF;
  border: 1px solid var(--neutral-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.page-bon-detail-prepa .warehouse-header,
.page-bon-detail-prepa .slot-header,
.page-bon-detail-prepa .family-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-bon-detail-prepa .warehouse-header {
  padding: 15px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--neutral-border);
}

.page-bon-detail-prepa .warehouse-title,
.page-bon-detail-prepa .slot-title,
.page-bon-detail-prepa .family-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--neutral-text);
  font-weight: 900;
}

.page-bon-detail-prepa .warehouse-title strong,
.page-bon-detail-prepa .slot-title strong,
.page-bon-detail-prepa .family-title strong {
  overflow-wrap: anywhere;
}

.page-bon-detail-prepa .section-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--neutral-border);
  color: var(--neutral-text);
  font-weight: 900;
  white-space: nowrap;
}

.page-bon-detail-prepa .slot-section {
  padding: 14px 16px 16px;
  border-bottom: 1px solid #F2F4F7;
}

.page-bon-detail-prepa .slot-section:last-child {
  border-bottom: none;
}

.page-bon-detail-prepa .slot-header {
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--prepa-light-2);
  border: 1px solid rgba(230, 178, 120, 0.55);
}

.page-bon-detail-prepa .family-group {
  margin-top: 10px;
}

.page-bon-detail-prepa .family-header {
  margin: 0 0 8px;
  padding: 0 2px;
}

.page-bon-detail-prepa .family-title {
  font-size: 0.95rem;
  color: #475467;
}

.page-bon-detail-prepa .family-path {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-bon-detail-prepa .path-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #F2F4F7;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 800;
}

.page-bon-detail-prepa .article-list {
  display: grid;
  gap: 10px;
}

.page-bon-detail-prepa .article-card,
.page-bon-detail-prepa .serial-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.page-bon-detail-prepa .article-card {
  background: #FFFFFF;
  border: 1px solid var(--neutral-border);
  padding: 13px 14px;
  min-height: 80px;
}

.page-bon-detail-prepa .article-card:hover,
.page-bon-detail-prepa .serial-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .article-card.is-partial {
  background: #FFF8F1;
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .article-card.is-complete {
  background: #FFE2C4;
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .article-card.is-kit-parent {
  border-width: 2px;
  background: linear-gradient(90deg, #FFF1E3, #FFFFFF 72%);
}

.page-bon-detail-prepa .article-card.is-kit-line {
  margin-left: 28px;
  position: relative;
}

.page-bon-detail-prepa .article-card.is-kit-line::before {
  content: "";
  position: absolute;
  left: -16px;
  top: -10px;
  bottom: 50%;
  width: 12px;
  border-left: 2px solid #E4E7EC;
  border-bottom: 2px solid #E4E7EC;
  border-bottom-left-radius: 8px;
}

.page-bon-detail-prepa .article-card.has-serial-children {
  margin-bottom: 0;
}

.page-bon-detail-prepa .serial-row.is-readonly {
  cursor: default;
  opacity: 0.55;
}

.page-bon-detail-prepa .serial-row.is-readonly:hover {
  background: #FCFCFD !important;
  border-color: #EAECF0 !important;
  transform: none !important;
  box-shadow: none !important;
}

.page-bon-detail-prepa .qty-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 62px;
  padding: 8px 9px;
  border-radius: 16px;
  background: #F9FAFB;
  border: 1px solid #EAECF0;
  color: var(--neutral-text);
  font-weight: 900;
  box-sizing: border-box;
}

.page-bon-detail-prepa .article-card.is-complete .qty-pill,
.page-bon-detail-prepa .serial-row.is-complete .qty-pill {
  background: #FFFFFF;
  border-color: var(--prepa-main);
  color: var(--prepa-text);
}

.page-bon-detail-prepa .article-card.is-partial .qty-pill,
.page-bon-detail-prepa .serial-row.is-partial .qty-pill {
  background: #FFFFFF;
  border-color: var(--prepa-border);
  color: var(--prepa-text);
}

.page-bon-detail-prepa .qty-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-size: 1.22rem;
  line-height: 1;
  white-space: nowrap;
}

.page-bon-detail-prepa .qty-total,
.page-bon-detail-prepa .qty-separator {
  font-size: 0.82rem;
  color: #667085;
}

.page-bon-detail-prepa .qty-label {
  margin-top: 5px;
  color: var(--muted-text);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.page-bon-detail-prepa .qty-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 92px;
  margin-top: 6px;
}

.page-bon-detail-prepa .qty-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid #D0D5DD;
  box-sizing: border-box;
}

.page-bon-detail-prepa .qty-dot.is-filled {
  background: var(--prepa-main);
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .article-card.is-complete .qty-dot.is-filled,
.page-bon-detail-prepa .article-card.is-partial .qty-dot.is-filled {
  background: var(--prepa-main);
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .qty-single-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #D0D5DD;
  color: #98A2B3;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
}

.page-bon-detail-prepa .article-card.is-complete .qty-single-state,
.page-bon-detail-prepa .serial-row.is-complete .qty-single-state {
  background: var(--prepa-main);
  border-color: var(--prepa-main);
  color: #FFFFFF;
}

.page-bon-detail-prepa .article-card.is-readonly {
  cursor: default;
}

.page-bon-detail-prepa .article-card.is-readonly:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--neutral-border);
}

.page-bon-detail-prepa .article-card.is-readonly.is-partial:hover,
.page-bon-detail-prepa .article-card.is-readonly.is-complete:hover {
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .serial-parent-note {
  color: var(--muted-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.page-bon-detail-prepa .article-main {
  min-width: 0;
}

.page-bon-detail-prepa .article-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.page-bon-detail-prepa .article-code {
  color: var(--prepa-text);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-bon-detail-prepa .article-name {
  color: var(--neutral-text);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.page-bon-detail-prepa .article-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 7px;
  color: var(--muted-text);
  font-size: 0.88rem;
}

.page-bon-detail-prepa .meta-chip,
.page-bon-detail-prepa .kit-badge,
.page-bon-detail-prepa .typeligne-badge,
.page-bon-detail-prepa .serial-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.page-bon-detail-prepa .meta-chip {
  background: #F2F4F7;
  color: #475467;
}

.page-bon-detail-prepa .kit-badge {
  background: #FFE6CC;
  color: #7A3D00;
}

.page-bon-detail-prepa .typeligne-badge {
  background: #FFF4E8;
  color: #C56A00;
}

.page-bon-detail-prepa .serial-badge {
  background: #EAF2FF;
  color: #175CD3;
}

.page-bon-detail-prepa .kit-reference {
  color: #667085;
  font-size: 0.86rem;
  font-weight: 750;
}

.page-bon-detail-prepa .article-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-bon-detail-prepa .article-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #EAECF0;
  background: #FFFFFF;
  cursor: pointer;
}

.page-bon-detail-prepa .article-icon-button img {
  max-width: 21px;
  max-height: 21px;
}

.page-bon-detail-prepa .article-photo-thumb {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: zoom-in;
  border: 1px solid #E4E7EC;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.page-bon-detail-prepa .article-photo-preview {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.page-bon-detail-prepa .article-photo-preview img,
.page-bon-detail-prepa .article-photo-preview picture,
.page-bon-detail-prepa .article-photo-preview canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-bon-detail-prepa .article_photo_value {
  display: none;
}

.page-bon-detail-prepa .check-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #F2F4F7;
  color: #98A2B3;
  font-size: 1.15rem;
  font-weight: 950;
  border: 1px solid #EAECF0;
}

.page-bon-detail-prepa .article-card.is-complete .check-state,
.page-bon-detail-prepa .serial-row.is-complete .check-state {
  background: var(--prepa-main);
  color: #FFFFFF;
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .article-card.is-partial .check-state,
.page-bon-detail-prepa .serial-row.is-partial .check-state {
  background: #FFFFFF;
  color: var(--prepa-main);
  border-color: var(--prepa-border);
}

/* ==========================================================
   Pop up saisie quantité
   ========================================================== */

.page-bon-detail-prepa .popup_quantite {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.38);
  padding: 20px;
}

.page-bon-detail-prepa .popup_quantite_card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
}

.page-bon-detail-prepa .popup_quantite_card h3 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1.45rem;
}

.page-bon-detail-prepa .popup_quantite_article {
  margin-bottom: 20px;
  color: #1f2937;
}

.page-bon-detail-prepa #popup_quantite_code {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--coche-main);
}

.page-bon-detail-prepa #popup_quantite_nom {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4b5563;
}

.page-bon-detail-prepa .popup_quantite_value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 1.8rem;
  font-weight: 900;
}

.page-bon-detail-prepa .popup_quantite_value input {
  width: 120px;
  padding: 10px 12px;
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  border: 2px solid var(--coche-main);
  border-radius: 18px;
  outline: none;
}

.page-bon-detail-prepa .popup_quantite_steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.page-bon-detail-prepa .popup_quantite_shortcuts,
.page-bon-detail-prepa .popup_quantite_footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.page-bon-detail-prepa .popup_quantite_shortcuts,
.page-bon-detail-prepa .popup_quantite_footer {
  grid-template-columns: 1fr 1fr;
}

.page-bon-detail-prepa .popup_quantite button {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 10px 12px;

  border-radius: 15px;
  border: 1px solid var(--coche-border);
  background: var(--coche-light);
  color: var(--coche-text);

  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.page-bon-detail-prepa .popup_quantite button:active {
  transform: scale(0.97);
}

.page-bon-detail-prepa .popup_quantite .btn-valider {
  background: var(--prepa-main);
  color: #fff;
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .popup_quantite .btn-reinitialiser,
.page-bon-detail-prepa .popup_quantite .btn-tout-preparer,
.page-bon-detail-prepa .popup_quantite .btn-annuler {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

.page-bon-detail-prepa .bon-line-filters {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);

  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-bon-detail-prepa .bon-line-filters label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b5a4a;
}

.page-bon-detail-prepa .bon-lieu-select {
  min-width: 220px;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 84, 55, 0.25);
  background: #fff;
  font-weight: 700;
  color: #4b3426;
}

#scan-message {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 50;

  display: none;
  min-width: 260px;
  max-width: 100%;

  padding: 10px 16px;
  border-radius: 12px;

  background: #FFF4D6;
  border: 2px solid #F0A020;
  color: #8A5200;

  font-weight: 700;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}

#scan-message.is-ok,
#scan-message.is-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#scan-message.is-error {
  animation: scanPulse 0.25s ease;
}

.scan-zone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

#scan-input {
  height: 42px;
  width: 100%;
  max-width: 360px;
  min-width: 0;

  box-sizing: border-box;

  padding: 0 14px;

  border: 2px solid #E7C28F;
  border-radius: 10px;

  background: #FFFFFF;
  color: #2B3445;

  font-size: 1rem;
  font-weight: 500;

  transition: all .15s ease;
}

@media (max-width: 700px) {
  .scan-zone {
    flex-direction: column;
    align-items: stretch;
  }

  #scan-input,
  #btn-camera-scan {
    width: 100%;
  }

  #scan-message {
    left: 0;
    right: 0;
    min-width: 0;
    max-width: none;
  }
}

#scan-input:focus {
  outline: none;

  border-color: #C77A2C;
  box-shadow: 0 0 0 3px rgba(199,122,44,.15);
}

#scan-input::placeholder {
  color: #8A8F9A;
}

#btn-camera-scan {
  white-space: nowrap;
  background: #C77A2C;
  color: white;
}

#btn-camera-scan:hover {
  background: #B56E28;
}

#btn-camera-scan:active {
  transform: translateY(1px);
}

@keyframes scanPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.popup-scan {
  position: fixed;
  inset: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, .45);
  padding: 16px;
}

.popup-scan-content {
  width: min(94vw, 480px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.popup-scan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;
  background: #FFF4D6;
  border-bottom: 1px solid #F0A020;
}

.popup-scan-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #8A5200;
}

.popup-scan-close {
  border: none;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #8A5200;
}

.popup-scan-body {
  padding: 16px;
}

#camera-reader {
  min-height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.popup-scan-help {
  margin: 12px 0 0;
  text-align: center;
  color: #5b6472;
  font-size: .95rem;
}

.popup-scan-footer {
  padding: 12px 16px 16px;
  display: flex;
  justify-content: center;
}





/* ==========================================================
   Lignes sérialisées
   ========================================================== */

.page-bon-detail-prepa .serial-list {
  margin: -2px 0 10px 42px;
  display: grid;
  gap: 8px;
  padding-left: 18px;
  border-left: 2px solid #E4E7EC;
}

.page-bon-detail-prepa .kit-serial-list {
  margin-left: 70px;
}

.page-bon-detail-prepa .serial-row {
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr auto;
  align-items: center;
  gap: 10px;

  min-height: 44px;
  padding: 7px 10px;
  border-radius: 18px;

  background: #FCFCFD;
  border: 1px solid #EAECF0;

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    background-color 0.12s ease;
}

.page-bon-detail-prepa .serial-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .serial-row.is-readonly:hover {
  background: #FCFCFD;
  border-color: #EAECF0;
  transform: none;
  box-shadow: none;
}

.page-bon-detail-prepa .serial-row.is-complete {
  background: #FFF1E3;
  border-color: var(--prepa-border);
}

.page-bon-detail-prepa .serial-row .qty-pill {
  min-width: 40px;
  min-height: 40px;
  padding: 4px;
  border-radius: 12px;
}

.page-bon-detail-prepa .serial-row.is-complete .qty-pill {
  background: #FFFFFF;
  border-color: var(--prepa-main);
  color: var(--prepa-text);
}

.page-bon-detail-prepa .serial-row .qty-label {
  display: none;
}

.page-bon-detail-prepa .serial-row .qty-dot {
  width: 9px;
  height: 9px;
}

.page-bon-detail-prepa .serial-row .check-state {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.page-bon-detail-prepa .serial-row.is-complete .check-state {
  background: var(--prepa-main);
  color: #FFFFFF;
  border-color: var(--prepa-main);
}

.page-bon-detail-prepa .serial-name {
  color: var(--neutral-text);
  font-weight: 800;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.2;
}

.page-bon-detail-prepa .popup_comment,
.page-bon-detail-prepa .popup_picture,
.page-bon-detail-prepa .popup_confirm {
  /* Conservé pour compatibilité avec le JS existant */
}

@media (max-width: 760px) {
  .page-bon-detail-prepa {
    padding-top: 60px;
    padding-inline: 10px;
  }

  .page-bon-detail-prepa .bon-header-main,
  .page-bon-detail-prepa .bon-progress-card {
    grid-template-columns: 1fr;
  }

  .page-bon-detail-prepa .bon-status-pill,
  .page-bon-detail-prepa .progress-count {
    justify-self: start;
  }

  .page-bon-detail-prepa .bon-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-bon-detail-prepa .article-card {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .page-bon-detail-prepa .serial-row {
    grid-template-columns: 40px 1fr auto;
    align-items: center;
  }

  .page-bon-detail-prepa .article-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    border-top: 1px solid #F2F4F7;
    padding-top: 10px;
  }

  .page-bon-detail-prepa .article-card.is-kit-line,
  .page-bon-detail-prepa .serial-list {
    margin-left: 14px;
  }

  .page-bon-detail-prepa .bon-line-filters {
    align-items: stretch;
    flex-direction: column;
  }

   .page-bon-detail-prepa .bon-lieu-select {
    width: 100%;
  }
}

.page-bon-detail-prepa .badge-fam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 22px;
  height: 22px;
  border-radius: 50%;

  background: var(--prepa-main-dark);
  color: #fff;

  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .page-bon-detail-prepa .bon-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-bon-detail-prepa .bon-context-badge,
  .page-bon-detail-prepa .bon-back-link {
    justify-content: center;
  }

  .page-bon-detail-prepa .bon-info-grid {
    grid-template-columns: 1fr;
  }

  .page-bon-detail-prepa .qty-pill {
    min-width: 64px;
  }

  .page-bon-detail-prepa .qty-dots {
    max-width: 78px;
    flex-wrap: nowrap;
  }

  .page-bon-detail-prepa .qty-dot {
    width: 9px;
    height: 9px;
  }
}

/* ---- fin detail bon de preparation a cocher ---- */