body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    /*background: #f7f8fc;*/
    color: #333;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.app {
    width: 100%; 
    max-width: 900px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /*background: #fff;*/
    overflow: hidden;
    position: relative;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, #0079aa, #043582);
    color: #fff;
    display: grid;
    grid-template-columns: 100px 1fr;
    height: 150px;
}
.header-content {
    text-align: left;
    line-height: 20px;
    margin-left: 30px;
    margin-top: 35px;
}
.header .img1 {
    height: 125px;
}
.header .header-content DIV:first-child {
    font-weight: 400;
    font-size: 16px;
}
.header .header-content SPAN {
    text-transform: uppercase;
    font-weight: bolder;
    color: #043582;
    text-shadow: 0 0 10px #FFFFFF;  
    font-size: 16px;
}
.header-content P {
    margin: 0;
    padding: 0;
    display: inline-block;
    width: 100px;
}
.header .balance {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    padding: 0;
}
.head {
    height: 50px;
    border-bottom: 1px solid #dedede;
    display: grid;
    align-content: center;
    padding-left: 10px;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #0079aa, #043582);
    color: #fff;
}



.last, #listeAjouts  {
    overflow-y: auto;
    margin: 0 20px;
    height: calc(100svh - 350px);       
    width: calc(100% - 40px);
    border-radius: 20px;
    box-shadow: 0 0 5px 5px #dedede;
}
#listeAjouts {
    height: calc(100svh - 590px);
}
.last.month {
    height: calc(100svh - 315px);
    padding: 10px 0 0 0;
}
.last.search {
    height: calc(100svh - 335px);
}
.last ::-webkit-scrollbar {
  display: none;
}

.last  {
  -ms-overflow-style: none;  
  scrollbar-width: none; 
}

.last ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.last li {
    background: #fff;
    height: 60px;
    display: grid;
    grid-template-columns: 60px 60px 1fr 100px 40px;
    align-content: center;
}
.last LI .date {
    text-align: center;
    color: #818181;
    display: grid;
    align-content: center;
    line-height: 15px;
    height: 60px;
}
.last LI .date SPAN {
    display: block;
}

.last li:not(:last-child) > DIV:not(.date) {
    border-bottom: 1px solid #a3a3a3;
}

.last li > DIV:not(.date) {
    height: 60px;
    display: grid;
    align-content: center;
}
.last LI .achat .magasin {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    color: #000;
}
.last LI .achat .localite {
    color: #5d5d5d;
    font-size: 12px;
    font-variant: small-caps;
}
.last LI .achat {
    text-align: left;
    padding-left: 5px;
}
.last LI .montant {
    text-align: right;
    padding-right: 20px;
}
.last LI .i, .last LI .prenom {
    text-align: center;
}
.last LI .i {
    cursor: pointer;
}
.last LI .prenom SPAN {
    border-radius: 10px;
    height: 40px;
    display: grid;
    align-content: center;
    color: #fff;
    font-weight: 600;
    width: 50px;
}
.last LI .prenom.colin SPAN {
    background-color: #3ea5fa;
}
.last LI .prenom.delphine SPAN {
    background-color: #fb60af;
}
li.updated {
    background: #dfe7ff !important;
    transition: background 1.5s ease;
}

.onglet {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    height: 40px;
    margin-bottom: 20px;
}
.onglet SPAN {
    background-color: #fff;
    width: 150px;
    border-radius: 10px;
    display: inline-block;
    color: #0072A6;
    padding: 10px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 05px 5px #cecece;
}
.onglet .active SPAN {
    background-color: #0072A6;
    color: #fff;
}

.add {
    /*display: grid;*/
    margin: -30px 20px 10px 20px;
    padding: 30px 20px;
    background-color: #fff;
    z-index: 10;
    border-radius: 10px;   
}
.add .deuxCol {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}
.field {
    position: relative;
    width: 100%;
}
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 50;
}
.suggestions div {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f3;
}
.suggestions div:hover {
  background: #f8f4ff;
}
.sugg SPAN {display: block;}
.sugg SPAN:first-child{
    font-weight: 500;
    color: #000;
    font-size: 14px;
}
.sugg SPAN:last-child{
    font-style: italic;
    color: #545454;
    font-size: 11px;
}
em.hl {
    color: #ce1111;
    font-style: normal;
    font-weight: bold;
}
.clear-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.clear-btn:hover {
    opacity: 1;
    color: #8e44ad;
}
.flatpickr-calendar {
    width: 300px !important; /* Adjust the overall calendar width */
}
.flatpickr-day {
    height: 30px !important;   /* Adjust the height of each day cell */
    line-height: 30px !important; /* Center the text vertically */
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-weekdays,
.flatpickr-days {
    width: 100%; 
}



.user-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: center;
    gap: 12px;
    width: 100%;
    text-align: center;
    height: 35px;    
}
.user {
    background: #f6f2fb;
    color: #8e44ad;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    user-select: none;
    width: 100%;
    text-align: center;
}
.user:hover {
    background: #ede0f9;
    transform: scale(1.05);
}
.user.active {
    background: linear-gradient(135deg, #8e44ad, #3498db);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: scale(1.08);
}
.button {
    width: 100%;
    background: linear-gradient(135deg, #8e44ad, #3498db);
    margin-top: 20px;
    line-height: 50px;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    border: 0;
}
#formAchat .input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border 0.2s, box-shadow 0.2s;
    font-size: 13px;
    padding: 10px;
    height: 40px;
    margin-bottom: 15px;
}
#formAchat .input:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 5px rgba(142,68,173,0.3);
    outline: none;
}
#formAchat .input.error,  .user-select.error{
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231,76,60,0.3);
}
#formAchat .errorr {
    color: #e74c3c;
    font-size: 14px;
    margin: 26px 0 12px;
    text-align: center;
}



/* FOOTER */
.footer {
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    height: 60px;
}
.footer a {
  text-decoration: none;
  color: #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
}
.footer i {
  font-size: 18px;
  margin-bottom: 2px;
  color: #000;
}
.footer a.active, .footer a.active i {
    color: #FB60AF;
    font-weight: bold;
}

.edit-inline {
    display: grid;
    grid-template-columns: 120px 90px 1fr 70px 40px 40px;
    gap: 6px;
    background: #f7f5fc;
    padding: 20px;
    margin: 0 0 10px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.25s ease;
}
.edit-inline.open {
   max-height: 200px;
    opacity: 1;
}
.edit-inline input,
.edit-inline select {
   /* width: 100%;*/
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}


/* 2 colonnes */
.recaps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: -30px 20px 10px 20px;
    padding-top: 30px;
    background-color: #fff;
    z-index: 10;
    border-radius: 10px;
    padding: 20px;
}
.recaps.GSM {
    display: none;
}

.recap {
    background: var(--blanc);
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.48);
    border-radius: 10px;
   
}
.recap P {
    display: grid;
    grid-template-columns: 100px 1fr;
    margin: 0;
    padding: 0;
}
.recap h2 {
  color: var(--mauve);
  margin: 0 0 8px 0;
    padding: 0;
  font-size: 1rem;
}


/* Solde */
.solde {
  background: linear-gradient(135deg, var(--mauve), var(--mauve-light));
  color: white;
  text-align: center;
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  font-size: 1.1rem;
}

.calendar-page {
  padding: 16px;
}
#titreMois {
    font-size: 26px;
}
#titreMois p {
    display: block;
    margin: 0 0 10px 0;
    padding: 0;
}
#titreMois p:last-child {
    font-size: 36px;
}

.ombre {
    background: white;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.48);
    margin: -30px 16px 10px 16px ;
    width: calc(100% - 60px);    
}
.recap-mois {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-content: center;
}
.recap-mois p {
    margin: 0;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.achats h3 {
  color: var(--mauve);
  margin-bottom: 10px;
}
.achats ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.achats li {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.achats li span.user {
  font-weight: 600;
}

.mois-selector {
    text-align: center;
}
.annee-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--mauve);
  font-size: 1.1rem;
}
.annee-nav button {
  background: none;
  border: none;
  color: var(--mauve);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 10px;
}

.mois-ligne {
    text-align: center;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 5px;
}
.mois-ligne div {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    border-radius: 8px;
    cursor: pointer;
    text-transform: capitalize;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.mois-ligne div:hover {
  background: rgba(142, 68, 173, 0.1);
}
.mois-ligne div.actif {
  background: #043985;
  color: white;
  font-weight: 600;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.auto-page {
  padding: 16px;
}

.auto-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  background: white;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}
.auto-form input,
.auto-form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.auto-form button {
  grid-column: 1 / -1;
  background: #015B98;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
}
table {
  border-collapse: collapse;
}
.table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
  background-color: transparent;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table tbody + tbody {
  border-top: 2px solid #dee2e6;
}

.table .table {
  background-color: #fff;
}

.table-sm th,
.table-sm td {
  padding: 0.3rem;
}

.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.075);
}

.table-primary,
.table-primary > th,
.table-primary > td {
  background-color: #b8daff;
}

.table-hover .table-primary:hover {
  background-color: #9fcdff;
}

.table-hover .table-primary:hover > td,
.table-hover .table-primary:hover > th {
  background-color: #9fcdff;
}

.table-secondary,
.table-secondary > th,
.table-secondary > td {
  background-color: #d6d8db;
}

.table-hover .table-secondary:hover {
  background-color: #c8cbcf;
}

.table-hover .table-secondary:hover > td,
.table-hover .table-secondary:hover > th {
  background-color: #c8cbcf;
}

.table-success,
.table-success > th,
.table-success > td {
  background-color: #c3e6cb;
}

.table-hover .table-success:hover {
  background-color: #b1dfbb;
}

.table-hover .table-success:hover > td,
.table-hover .table-success:hover > th {
  background-color: #b1dfbb;
}

.table-info,
.table-info > th,
.table-info > td {
  background-color: #bee5eb;
}

.table-hover .table-info:hover {
  background-color: #abdde5;
}

.table-hover .table-info:hover > td,
.table-hover .table-info:hover > th {
  background-color: #abdde5;
}

.table-warning,
.table-warning > th,
.table-warning > td {
  background-color: #ffeeba;
}

.table-hover .table-warning:hover {
  background-color: #ffe8a1;
}

.table-hover .table-warning:hover > td,
.table-hover .table-warning:hover > th {
  background-color: #ffe8a1;
}

.table-danger,
.table-danger > th,
.table-danger > td {
  background-color: #f5c6cb;
}

.table-hover .table-danger:hover {
  background-color: #f1b0b7;
}

.table-hover .table-danger:hover > td,
.table-hover .table-danger:hover > th {
  background-color: #f1b0b7;
}

.table-light,
.table-light > th,
.table-light > td {
  background-color: #fdfdfe;
}

.table-hover .table-light:hover {
  background-color: #ececf6;
}

.table-hover .table-light:hover > td,
.table-hover .table-light:hover > th {
  background-color: #ececf6;
}

.table-dark,
.table-dark > th,
.table-dark > td {
  background-color: #c6c8ca;
}

.table-hover .table-dark:hover {
  background-color: #b9bbbe;
}

.table-hover .table-dark:hover > td,
.table-hover .table-dark:hover > th {
  background-color: #b9bbbe;
}

.table-active,
.table-active > th,
.table-active > td {
  background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover {
  background-color: rgba(0, 0, 0, 0.075);
}

.table-hover .table-active:hover > td,
.table-hover .table-active:hover > th {
  background-color: rgba(0, 0, 0, 0.075);
}

.table .thead-dark th {
  color: #fff;
  background-color: #212529;
  border-color: #32383e;
}

.table .thead-light th {
  color: #495057;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.table-dark {
  color: #fff;
  background-color: #212529;
}

.table-dark th,
.table-dark td,
.table-dark thead th {
  border-color: #32383e;
}

.table-dark.table-bordered {
  border: 0;
}

.table-dark.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

.table-dark.table-hover tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.075);
}

@media (max-width: 575.98px) {
  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
  .table-responsive-sm > .table-bordered {
    border: 0;
  }
}

@media (max-width: 767.98px) {
  .table-responsive-md {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
  .table-responsive-md > .table-bordered {
    border: 0;
  }
}

@media (max-width: 991.98px) {
  .table-responsive-lg {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
  .table-responsive-lg > .table-bordered {
    border: 0;
  }
}

@media (max-width: 1199.98px) {
  .table-responsive-xl {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }
  .table-responsive-xl > .table-bordered {
    border: 0;
  }
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-responsive > .table-bordered {
  border: 0;
}
.table input {
    width: 100px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border 0.2s, box-shadow 0.2s;
    font-size: 13px;
    height: 20px;
    padding: 5px;
}
.table TR.barre TD {
    opacity: 0.3;
}


.button-2, .button-3 {
  appearance: none;
  background-color: #2ea44f;
  border: 1px solid rgba(27, 31, 35, .15);
  border-radius: 6px;
  box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: -apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 6px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
    width: 100px;
}
.button-3 {
    background-color: #6f61ef;
}



.search-page {
    padding: 12px;
}

#search {
    width: 100%;
    padding: 10px;
    font-size: 17px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.filters {
    margin: 10px 0;
    display: flex;
    gap: 10px;
}

.filters input,
.filters select {
    flex: 1;
    padding: 8px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #bbb;
}



