@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body{
  background: #ece4de;
  color: #351c19;
}

/* Scrollbar (Chrome / Edge / Safari) */
body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-thumb {
  background: #351c19;
  border-radius: 10px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

.navbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 1rem;
  background: #e0d0c1;
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Menus gauche et droite */
.nav-left,
.nav-right {
  display: flex;
  gap: 10rem;
  list-style: none;
  padding: 0rem;
}

.nav-left {
  justify-content: center;
}

.nav-right {
  justify-content: center;
}

/* Liens */
.nav-left a,
.nav-right a {
  color: #351c19;
  text-decoration: none;
  font-weight: 500;
}

.user-greeting{
  position: relative;
  display: inline-block;
  text-align: center;
  color: #351c19;
  font-weight: 500;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: #e0d0c1;
  left: 50%; 
  transform: translateX(-50%); 
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 5px;
  right: 0;
}

.dropdown-menu a {
  color: #351c19;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-menu a:hover {
  background-color: #ece4de;
  border-radius: 5px;
}

.user-greeting:hover .dropdown-menu {
  display: block;
}

/* Logo centré */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
}

.intro{
  margin-top: 1rem;
  padding: 1rem;
}

.presta{
  background: #e0d0c1;
  border-radius: 5px;
  margin-top: 1rem;
  padding: 1rem;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.presta-lines {
  display: grid;
  grid-template-lines: 1fr 1fr;
  align-items: center;
  padding: 1rem;
  border-radius: 5px;
  border: 2px solid #351c19;
}

.presta-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 1rem;
}

.presta-columns > div {
  padding: 1.5rem;
  text-align: center;
}

.presta-columns  > div:not(:last-child) {
  border-right: 2px solid #351c19;
}

.presta-sourcil{
  text-align: center;
  border-radius: 5px;
  border: 2px solid #351c19;
}

h1{
    font-size: 1rem;
    color: #351c19;
}

.presta-resa {
    color: #351c19;
}

.presta-resa-lines {
  max-height: 345px;
  overflow-y: auto;
  display: grid;
  grid-template-lines: repeat(4, 1fr);
  gap: 1rem;
  padding: 0.2rem;
}

.presta-resa-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.presta-resa-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem;
  border: 2px solid #351c19;
  border-radius: 5px;
  cursor: pointer;
}

.presta-resa-item > div {
  flex: 1;
}

.presta-resa-item input[type="checkbox"] {
  margin: 0;
  accent-color: #351c19;
  transform: scale(1.2);
}

.presta-resa-item:hover {
  background: rgba(53, 28, 25, 0.05);
}

.presta-resa-item input[type="checkbox"]:checked + div {
  font-weight: 600;
}

/* Scrollbar (Chrome / Edge / Safari) */
.presta-resa-lines::-webkit-scrollbar {
  width: 8px;
}

.presta-resa-lines::-webkit-scrollbar-thumb {
  background: #351c19;
  border-radius: 10px;
}

.presta-resa-lines::-webkit-scrollbar-track {
  background: transparent;
}

.calendar {
  color: #351c19;
  max-width: 350px;
  margin: 2rem auto;
  font-family: Poppins, sans-serif;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-header button {
  color: #351c19;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.calendar-days,
#calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.calendar-days div {
  font-weight: 600;
  padding: 0.5rem 0;
}

.day {
  color: #351c19;
  padding: 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}

.day:hover {
  background: #e0d0c1;
}

.day.today {
  border: 2px solid #1e293b;
}

.day.selected {
  background: #351c19;
  color: #ece4de;
}

.empty {
  pointer-events: none;
}

.day.past {
  background: #f1f5f9;
  color: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}

.day.sunday {
  background: #f1f5f9;
  color: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}

.time-slots {
  color: #351c19;
  max-width: 350px;
  margin: 2rem auto;
}

#slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.slot {
  padding: 0.6rem;
  text-align: center;
  border-radius: 8px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 0.9rem;
}

.slot:hover {
  background: #e0d0c1;
}

.slot.selected {
  background: #351c19;
  color: #ece4de;
}

#slots {
  max-height: 180px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Scrollbar (Chrome / Edge / Safari) */
#slots::-webkit-scrollbar {
  width: 6px;
}

#slots::-webkit-scrollbar-thumb {
  background: #351c19;
  border-radius: 10px;
}

#slots::-webkit-scrollbar-track {
  background: transparent;
}

.hidden {
  display: none;
}

/* Instagram fixé en bas à gauche */
.instagram-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

.instagram-fixed img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.instagram-fixed img:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

/* Tablettes */
@media (max-width: 1024px) {
  .nav-left,
  .nav-right {
    gap: 3rem;
  }

  .logo img {
    height: 50px;
  }
}


/* Mobiles */
@media (max-width: 768px) {
  .navbar {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    text-align: center;
  }

  .nav-left,
  .nav-right {
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .logo {
    order: -1;
  }

  .presta-columns {
    grid-template-columns: 1fr;
  }

  .presta-columns > div:not(:last-child) {
    border-right: none;
    border-bottom: 2px solid #351c19;
  }

  .presta-resa-lines {
    max-height: 340px;
  }

  .presta-resa-columns {
    grid-template-columns: 1fr;
  }

  .calendar,
  .time-slots {
    max-width: 95%;
  }
  
  .dropdown-menu {
    margin-top: 1rem;
  }

  #slots {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Très petits écrans */
@media (max-width: 480px) {
  h1 {
    font-size: 0.9rem;
  }

  .logo img {
    height: 50px;
  }

  .dropdown-menu {
    margin-top: 1rem;
  }

  #slots {
    grid-template-columns: 1fr;
  }
}