* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family:Montserrat, sans-serif;
  background: #f4f3f1;
  color: #222;
  padding-bottom: 100px;
}

header {
  background: #2d2a26;
  color: white;
  padding: 20px;
  position: sticky;
  display: flex;
  flex-direction: column;
  align-items: center;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 24px;
  margin-bottom: 12px;
  font-weight: 600;
  text-align:center;
}

header img{
  width : 60%
}

#cours-select {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  border-radius: 10px;
  border: none;
}

.hidden { display: none !important; }

main {
  padding: 16px;
}

.cours-info {
  background: white;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 20px;
  border: 2px solid #ddd;
  background: white;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.filter-toggle.active {
  background: #c9971c;
  border-color: #c9971c;
  color: white;
}

#search {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
}

#client-list {
  list-style: none;
}

#client-list li {
  background: white;
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.client-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  cursor: pointer;
  border-radius: 8px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.checkbox {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid #ccc;
  margin-right: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.client-row.present .checkbox {
  background: #3a7d44;
  border-color: #3a7d44;
}

.checkbox::after {
  content: '';
  width: 14px;
  height: 8px;
  border-left: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.client-row.present .checkbox::after {
  opacity: 1;
}

.client-name {
  font-size: 18px;
  font-weight: 500;
}

.client-row.present .client-name {
  color: #3a7d44;
}

.client-row.creneau-habituel .client-name {
  font-weight: 700;
}

.client-row.creneau-habituel .client-name::before {
  content: '\2605\0020';
  color: #c9971c;
}

.btn-add {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: 16px;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
  background: #2d2a26;
  color: white;
  border: none;
  border-radius: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-content {
  background: white;
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
}

.modal-content h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.modal-content input {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.modal-actions button {
  flex: 1;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-weight: 600;
}

#btn-cancel-add {
  background: #eee;
  color: #333;
}

.btn-primary {
  background: #3a7d44;
  color: white;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #2d2a26;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  z-index: 200;
}

.toast.error {
  background: #b23a3a;
}
