:root {
  --accent-color: #2563eb;
  --accent-color-hover: #1e4fcc;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  margin: 0;
  gap: 20px;
}

.accent-selector {
  margin-top: 20px;
  font-size: 14px;
}

.calculator {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 25px;
  width: 380px;
}

.display {
  width: 100%;
  height: 60px;
  font-size: 26px;
  text-align: right;
  padding: 12px 0px;
  margin-bottom: 20px;
  border: none;
  border-radius: 12px;
  background-color: #f1f3f9;
  color: #1a1a1a;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.buttons button {
  padding: 18px;
  font-size: 16px;
  border: none;
  border-radius: 12px;
  background: #e5e8f0;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buttons button:hover {
  background: #d9dce3;
}

.buttons button:active {
  transform: scale(0.97);
  background: #cfd2da;
}

.equal {
  background: var(--accent-color);
  color: white;
}

.equal:hover {
  background: var(--accent-color-hover);
}

.clear {
  background: #d92c2c;
  color: white;
}

.clear:hover {
  background: #b32121;
}

.func {
  background: #edf4ff;
  color: var(--accent-color);
}

.func:hover {
  background: #dbe9ff;
}
.settings {
  margin-top: 20px;
  font-size: 14px;
  display: flex;
  align-items: center; /* Aligne verticalement le texte et le toggle */
  gap: 12px;
}

/* Style du toggle switch */
#notificationToggle {
  position: relative;
  width: 48px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background-color: #ccc;
  border-radius: 34px;
  outline: none;
  cursor: pointer;
  transition: background-color 0.3s;
  flex-shrink: 0;
  vertical-align: middle;
}

#notificationToggle:checked {
  background-color: #4CAF50;
}

#notificationToggle::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background-color: white;
  transition: transform 0.3s;
}

#notificationToggle:checked::before {
  transform: translateX(24px);
}
.pip-btn {
  margin-left: auto;
  padding: 8px 12px;
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pip-btn:hover {
  background-color: var(--accent-color-hover);
}

/* Mode mini (picture-in-picture simulé) */
.calculator.pip-mode {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  height: auto;
  z-index: 9999;
  padding: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
}

.calculator.pip-mode .settings {
  display: none; /* Optionnel : cacher les réglages dans le mode réduit */
}
.drag-bar {
  width: 100%;
  padding: 10px;
  border-radius: 12px 12px 0 0;
  cursor: move;
  text-align: center;
  font-weight: 600;
  color: #333;
  user-select: none;
}

/* En mode pip, on rend la barre visible comme une vraie fenêtre */
.calculator.pip-mode .drag-bar {
  background-color: #d1d5db;
  border-radius: 12px 12px 0 0;
  cursor: grab;
}
.site-logo {
  font-size: 48px;
  margin-top: 20px;
  text-align: center;
  user-select: none;
}
