/* -------------------------- */
/* Global / Container */
/* -------------------------- */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

body {
  background: #f4f6f8;
  margin: 0;
  padding: 20px;
  color: #333;
}

.container {
  background: #fff;
  max-width: 900px;
  margin: auto;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* -------------------------- */
/* Header */
/* -------------------------- */
header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

header img {
  width: 60px;
  height: auto;
}

header h1 {
  margin: 0;
  font-size: 22px;
  color: #1976d2;
}

/* -------------------------- */
/* Messages */
/* -------------------------- */
.message {
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
}

.message.success { background: #e8f5e9; color: #2e7d32; }
.message.error   { background: #ffebee; color: #c62828; }

/* -------------------------- */
/* Form */
/* -------------------------- */
form {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 10px;
  margin-bottom: 25px;
}

form input, form button {
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

form input:focus {
  outline: none;
  border-color: #1976d2;
}

form button {
  background: #1976d2;
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

form button:hover { background: #0d47a1; }

/* -------------------------- */
/* Calendar */
/* -------------------------- */
.calendar-wrapper {
  margin-top: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-header button {
  background: #1976d2;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.calendar-header span {
  font-size: 16px;
  font-weight: bold;
  color: #0d47a1;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 5px;
}

.day-name {
  font-weight: bold;
  text-align: center;
  padding: 6px 0;
  background: #e3f2fd;
  border-radius: 6px;
}

.day {
  padding: 8px 0;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  background: #f5f5f5;
  transition: 0.2s;
}

.day:hover { background: #bbdefb; }
.day.today { border: 2px solid #1976d2; font-weight: bold; }

/* Time slots */
.slot {
  padding: 5px;
  border-radius: 6px;
  margin: 2px 0;
  font-size: 13px;
  cursor: pointer;
  transition: 0.2s;
}

.slot.free    { background: #e3f2fd; color: #0d47a1; }
.slot.pending { background: #fff3e0; color: #ef6c00; }
.slot.booked  { background: #ffebee; color: #c62828; cursor: not-allowed; }

.slot.past {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

.slot.booked {
  background: linear-gradient(135deg,#ff6b6b,#ff4757);
  box-shadow: 0 4px 8px rgba(0,0,0,.15);
  border-radius: 10px;
  color: #fff;
}


.slot.pending {
  background: linear-gradient(135deg,#feca57,#ff9f43);
  color: black;
  font-weight: bold;
}

.slot {
  display: flex;
  align-items: center;     /* centrage vertical */
  justify-content: center; /* centrage horizontal */
  text-align: center;
  white-space: pre-line;
  font-weight: bold;
}
.calendar-grid {
  display: grid;
  grid-template-columns: 60px 1fr;
}

.hours {
  display: flex;
  flex-direction: column;
  margin-top: 34px;
}

.hour {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #555;
  border-bottom: 1px solid #ddd;
}


.lang-switch {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.switch-pill {
    position: relative;
    display: flex;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 4px;
    width: 140px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.switch-pill button {
    flex: 1;
    border: none;
    background: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
    color: #555;
    transition: 0.3s;
}

.switch-pill button.active {
    color: #fff;
}

/* Slider qui change selon le bouton actif */
.switch-slider {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #4CAF50, #2E7D32); /* vert par défaut */
    border-radius: 30px;
    top: 0;
    left: 0;
    transition: 0.3s ease;
}

/* Animation selon le bouton actif */
.switch-pill button#btn-ar.active ~ .switch-slider {
    left: 50%; /* déplace le slider vers le bouton AR */
}

.switch-pill button#btn-en.active ~ .switch-slider {
    left: 0; /* slider sur EN */
}

/* ===== Modal Premium ===== */
.modal {
    display: none; /* caché par défaut */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* fond sombre semi-transparent */
    backdrop-filter: blur(6px); /* effet flou derrière le modal */
    
    justify-content: center; /* centrage horizontal */
    align-items: center;     /* centrage vertical */
}

.modal-content {
    background: #fff;
    padding: 25px 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

/* Animation pour ouverture */
.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Bouton de fermeture */
.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}
.close-btn:hover { color: #000; }

/* Contenu scrollable si nécessaire */
#modalBody {
    max-height: 60vh;
    overflow-y: auto;
    padding-top: 10px;
    text-align: center;
}

/* style du texte dans le modal */
#modalBody h3 {
    margin-top: 0;
    color: #1976d2;
    font-size: 18px;
    text-align: center;
}

#modalBody ul {
    list-style-type: none;
    padding: 0;
}

#modalBody li {
    padding: 8px 6px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

