#reservation{
    margin: auto;
    padding: 40px;
    max-width: 100vw;
}
#reservation h1, #reservation h2, #reservation h3, #reservation h4, #reservation label, #reservation input, #reservation a, #reservation th, #reservation td, #reservation p, #reservation select{
  font-family: 'Arial';
  text-decoration: none;
  text-transform: none;
}
#reservation h1 {
    display: inline-flex;
}
#reservation input, #reservation select {
    height: auto;
}
/* === LOGIN === */
#parent-login {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: "Segoe UI", sans-serif;
}

#login_form-resa h2 {
    text-align: center;
    margin-bottom: 29px;
    font-size: 30px;
    margin-top: 10px;
    font-weight: 600;
}

#login_form-resa form {
    display: flex;
    flex-direction: column;
}

#login_form-resa .login-rest {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

#login_form-resa label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

#login_form-resa input[type="text"],
#login_form-resa input[type="password"] {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#login_form-resa input[type="text"]:hover,
#login_form-resa input[type="password"]:hover {
    border-color: #38bdf8;
}

#login_form-resa input[type="text"]:focus,
#login_form-resa input[type="password"]:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
    outline: none;
}

#login_form-resa button[type="submit"] {
    padding: 14px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#login_form-resa button[type="submit"]:hover {
    background-color: #005bb5;
}

/* === Notification demandes de réservation === */
#notification-wrapper {
  max-width: 95%;
  margin: 0 auto 20px auto;
  text-align: center;
  position: relative;
}

#toggle-demandes {
  background-color: #f1f5f9;
  color: #1e40af;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

#toggle-demandes:hover {
  background-color: #e0f2fe;
}

#notification-count {
  background-color: #ef4444;
  color: white;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 12px;
  position: absolute;
  top: -6px;
  right: -6px;
}
/* === Zone affichage des demandes === */
#demandes-wrapper {
  max-width: none;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  margin: 10px auto 20px auto;
  padding: 20px 10px 20px 20px;
  animation: fadeInDown 0.3s ease;
}

#demandes-wrapper.hidden {
  display: none;
}
.tableau-resas {
  overflow-x: auto;
}
.tableau-resas table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 14px;
}

.tableau-resas th,
.tableau-resas td {
  padding: 8px;
  border: 1px solid #e5e7eb;
  text-align: left;
}
.tableau-resas textarea,
.tableau-resas select {
  width: 100%;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  background-color: #f9fafb;
}

.tableau-resas button.validate-reservation,
.tableau-resas button.refuse-reservation,
#cancel-refresh {
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 13px;
}

.tableau-resas button.validate-reservation {
  background-color: #10b981;
  color: white;
}

.tableau-resas button.validate-reservation:hover {
  background-color: #059669;
}

.tableau-resas button.refuse-reservation, #cancel-refresh {
  background-color: #ef4444;
  color: white;
}
#demandes-wrapper .action-resa {
    text-align: center;
}
.tableau-resas button.refuse-reservation:hover, #cancel-refresh:hover {
  background-color: #dc2626;
}
.button-list-resa {
    background-color: transparent !important;
    border: none !important;
    width: 1%;
}

#notification-wrapper .notification-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
#refresh-spinner {
  transition: transform 0.8s ease;
  stroke: #1e40af;
}
/* Refresh */
#refresh-message-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
#refresh-message {
  font-size:14px;
}

#refresh-demandes {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
#refresh-demandes:focus {
    outline: none;
}
/* Animation */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* --- TABLEAU --- */
#reservation .date-resa {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin: 0 auto 30px auto;
    max-width: 460px;
    flex-wrap: wrap;
}
/**** SELECTEUR SWITCH ****/
#reservation .switch {
      position: relative;
      display: inline-block;
      width: 60px;
      height: 34px;
    }
    #reservation .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }
    #reservation .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #4CAF50;
      transition: 0.4s;
      border-radius: 34px;
    }
    #reservation .slider:before {
      position: absolute;
      content: "";
      height: 26px;
      width: 26px;
      left: 4px;
      bottom: 4px;
      background-color: white;
      transition: 0.4s;
      border-radius: 50%;
    }
    #reservation input:checked + .slider {
      background-color: #c1442e;
    }
    #reservation input:checked + .slider:before {
      transform: translateX(26px);
    }
    #reservation .switch-label {
      margin-left: 10px;
      font-family: 'Arial';
    }
/**** FIN SWITCH ****/
#reservation .jour-travaille{
    display: inline-flex;
}
#reservation .jour-travaille .switch:before {
    content: '';
    cursor: pointer;
    background-color: #4caf50;
    opacity: 10%;
    border-radius: 100px;
    width: calc(33ch + 80px);
    height: 80px;
    display: block;
    position: absolute;
    z-index: 0;
    top: -22px;
    left: -40px;
}
#reservation .jour-travaille.non .switch:before {
    background-color: #c1442f;
    width: calc(29ch + 80px);
}
#reservation .header-table-resas {
    display: flex;
    align-items: center;
    gap: calc(30px + 40px);
}

#reservation .sort-header {
    cursor: pointer;
    position: relative;
}
#reservation .asc-desc-indicator {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-evenly;
}
#reservation .asc-indicator, #reservation .desc-indicator{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size:0.5em;
    line-height: 1;
}
#reservation  .resa-th-inner {
    display: flex;
    gap: 5px;
}
#reservation .asc-indicator:before{
    content: "▲";
}
#reservation .desc-indicator:before{
    content: "▼";
}
#reservation .asc-indicator:before, #reservation .desc-indicator:before{
    color:#a5a5a5;
}
#reservation th:hover .asc-indicator:before, #reservation th:hover .desc-indicator:before{
    color:black;
}
#reservation .sort-header .asc-indicator:before, #reservation .sort-header .desc-indicator:before{
    transition: 0.2s ease;
}
#reservation th.asc .asc-indicator:before, #reservation th.desc .desc-indicator:before{
    color:black;
}

#reservation input[type="checkbox"]{
    width:20px;
    height:20px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
    line-height:1;
    margin-left: 0;
    cursor: pointer;
}
#reservation input[type="checkbox"]:hover{
    border-color: #38bdf8;
}
#reservation input[type="checkbox"]:focus{
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
    outline: none;
}
#reservation input[type="checkbox"]:checked::before{
    width:20px;
    height:20px;
    margin: -1px 0px 0px -2px;
}


#reservation .date-resa input[type="date"] {
    font-size: 16px;
    font-weight: 500;
    padding: 10px 14px;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1 1 auto;
    min-width: 100px;
    width:auto;
}

#reservation .date-resa input[type="date"]:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

#reservation .date-resa button, #refresh-now {
    font-size: 16px;
    font-weight: 600;
    padding: 10px 16px;
    background-color: #0ea5e9;
    border-radius: 10px;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s, transform 0.2s;
}

#reservation .date-resa button:hover, #refresh-now:hover {
    background-color: #0284c7;
    transform: translateY(-1px);
}

/* --- Tabs --- */
#reservation .tabs {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #e5e7eb;
}

#reservation .tabs li {
    margin: 0;
}

#reservation .tabs a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    border-bottom: none;
    color: #1f2937;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    transition: background 0.3s;
}

#reservation .tabs a:hover,
#reservation .tabs a.active {
    background: #fff;
    color: #111827;
    font-weight: 600;
}

/* --- Contenu des Tabs --- */
#reservation .tab-content {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

/* --- Tableaux de réservation --- */
#reservation .table-resa {
    overflow-x: auto;
    margin-bottom: 20px;
    margin-top: 10px;
}

#reservation table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 600px;
}

#reservation th, 
#reservation td {
    padding: 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

#reservation th, #reservation select.filter-room {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #374151;
}
#reservation select.filter-room {
    font-size:20px;
    padding:0;
    border:none;
    padding-right: 5px;
    cursor: pointer;
}

#reservation td input,
#reservation td select,
#reservation td textarea {
    box-sizing: border-box;
    font-size: 14px;
    max-width: 100%;
}
#demandes-wrapper .reservation-count, #demandes-wrapper .reservation-time {
    max-width: 9ch;
}

/* Colonnes ajustées */

#reservation .table-content th {
    width:calc(1% + 6%);
}
#reservation .table-content td {
    width:auto;
}
#reservation .reservation-count, #reservation .reservation-time {
    width: 12ch;
}
#reservation .reservation-phone {
    min-width: 15ch;
}
#reservation .reservation-name{
	min-width:22ch;
}
#reservation .reservation-room{
	min-width:auto;
}
#reservation .com-resa, #reservation .reservation-com {
    width:100% !important;
    min-width: 22ch;
}
#reservation .impair {
    background-color: #fcfcfc;
}
/* Flèches plus visibles dans les nombres */
#reservation input[type="number"]::-webkit-inner-spin-button,
#reservation input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 1.5em;
    transform: scale(1.2);
}

/* Icônes time/date plus intuitifs */
#reservation input[type="time"],
#reservation input[type="date"],
#reservation tbody tr select {
    cursor: pointer;
}

#reservation tbody tr input:hover, #reservation tbody tr select:hover, #reservation tbody tr textarea:hover {
    background-color: #f0f9ff;
    border-color: #38bdf8;
}
#reservation input[type="date"]::-webkit-calendar-picker-indicator, 
#reservation input[type="time"]::-webkit-calendar-picker-indicator {
    transition: 0.2s ease;
    cursor:pointer;
}
#reservation input[type="date"]::-webkit-calendar-picker-indicator:hover, 
#reservation input[type="time"]::-webkit-calendar-picker-indicator:hover {
    transform:scale(1.1);
    cursor:pointer;
    opacity:0.7;
}
/* Champs standards */
#reservation input[type="text"],
#reservation input[type="tel"],
#reservation input[type="number"],
#reservation input[type="time"],
#reservation textarea,
#reservation select {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f9fafb;
}

#reservation textarea {
    resize: vertical;
}
.nbr-th-label::before {
  content: "Nombre";
}
/* --- Boutons ligne --- */
#reservation .action-resa {
    background-color: white;
    border: none;
}
#reservation button.remove-row {
    background-color: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: bold;
}

#reservation button.remove-row:hover {
    background-color: #dc2626;
}

#reservation button.add-row {
    background-color: #36a5e9;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

#reservation button.add-row:hover {
    background-color: #0284c7;
}

/* --- Tableau total --- */
#reservation .table-total {
    width: auto;
    margin: 0 auto 20px auto;
    border: 1px dashed #cbd5e1;
    background-color: #f9fafb;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    min-width: 500px;
}
#reservation .table-resa h4, 
#reservation .table-resa h3 {
    font-weight: 600;
    display: block;
    margin-top: 0;
    margin-bottom: 15px;
}
#reservation .table-resa h4 {
    font-size: 16px;
    text-align: center;
}
#reservation .table-resa h3 {
    padding-left: 10px;
    font-size:24px;
}

#reservation .table-total td, 
#reservation .table-total th {
    padding: 6px 10px;
    border: border: 1px solid #e5e7eb;
    width: 33%;
}
#reservation .table-total tr {
    background-color: white;
}


/* --- Bouton enregistrer --- */
#reservation #save_reservation {
    display: block;
    margin: 0 auto 50px auto;
    background-color: #3b82f6;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#reservation #save_reservation:hover {
    background-color: #2563eb;
}
/*** RESPONSIVE TABLETTE ***/
@media only screen and (max-width: 1100px) {
  #reservation{
      padding: 20px;
  }
  #reservation .jour-travaille .switch:before{
      width: calc(33ch + 60px);
      left:-30px;
      height:60px;
      top: -15px;
  }
  #reservation .jour-travaille.non .switch:before{
      width: calc(29ch + 60px);
  }
	#reservation .reservation-room, #reservation .reservation-name, #reservation .reservation-phone {
	    min-width: auto;
	}
	#reservation .reservation-com {
	    min-width: 30ch;
	}
	#reservation .tableau-resas select{
		min-width:20ch;
	}
  #reservation .reservation-count, #reservation .reservation-time {
      width: 10ch;
  }
  #reservation .reservation-phone {
      width: 14ch;
  }
  #reservation .reservation-name {
      width: 18ch;
  }
  #reservation select.reservation-table{
      max-width: 10ch;
  }
}
/*** RESPONSIVE TEL ***/
@media only screen and (max-width: 800px) {
    #reservation{
        padding: 10px;
    }
    #reservation .header-table-resas {
        flex-wrap: wrap;
        margin-bottom: 30px;
        gap: 0;
    }
    #reservation h1 {
        margin-bottom: 10px;
        margin-top: 10px;
    }
    #reservation .jour-travaille .switch:before {
        height: 100%;
        opacity:0;
        top: 0;
        left: 0;
    }
    #reservation .table-total {
        max-width: 90%;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        font-size: 13px;
        min-width:auto;
    }
    #reservation .reservation-count{
       width: 8ch;
    }
    #reservation .reservation-room {
        max-width: 16ch;
    }
    .nbr-th-label::before {
      content: "Nbr";
    }
    #reservation input[type="number"]::-webkit-inner-spin-button,
    #reservation input[type="number"]::-webkit-outer-spin-button {
        width:15px;
    }
}
/**** NOTIF CONFLIT ****/
.alert-conflit {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    color: black;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}
