:root {
  --deep: #0A3A38;
  --deep2: #0C4B47;
  --primary: #0E8F81;
  --bright: #1FC9B9;
  --mint: #E3F8F4;
  --cream: #FBFDFC;
  --coral: #FF8B67;
  --line: #C9EEE6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', system-ui, sans-serif;
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep2) 220px, var(--mint) 220px);
  color: var(--deep);
}

.header {
  padding: 48px 20px 28px;
  text-align: center;
  color: var(--cream);
}

.header h1 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.6rem;
  margin: 0;
}

.header h1 span { color: var(--bright); }

.header .tagline {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--line);
}

.install-btn {
  margin-top: 16px;
  background: var(--bright);
  color: var(--deep);
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
}

.install-btn:active { transform: scale(0.97); }

.ios-tip {
  margin: 14px auto 0;
  max-width: 300px;
  font-size: 0.8rem;
  color: var(--line);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
}

.app {
  max-width: 480px;
  margin: -10px auto 60px;
  padding: 0 18px;
}

.add-box {
  display: flex;
  gap: 8px;
  background: var(--cream);
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(10, 58, 56, 0.15);
}

.add-box input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  background: white;
}

.add-box input:focus { border-color: var(--primary); }

.add-box button {
  background: var(--primary);
  color: var(--cream);
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.add-box button:active { transform: scale(0.97); }

h2 {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1rem;
  margin: 28px 0 10px;
  color: var(--deep2);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  animation: appear 0.25s ease-out;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.item .check {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--primary);
  padding: 0;
}

.item .text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.35;
}

.item .share-btn {
  border: none;
  background: var(--coral);
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  min-width: 26px;
  cursor: pointer;
  font-size: 0.75rem;
}

.empty-msg {
  color: #6B948E;
  font-size: 0.88rem;
  text-align: center;
  padding: 14px 0;
}

.history-toggle {
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1rem;
  color: var(--deep2);
  padding: 6px 0;
  cursor: pointer;
  margin-top: 10px;
}

.list.history .item {
  background: var(--mint);
  border-color: transparent;
}

.list.history .item .text { text-decoration: line-through; opacity: 0.75; }

.list.history .date {
  font-size: 0.72rem;
  color: var(--primary);
  display: block;
  margin-top: 2px;
}

.hidden { display: none !important; }

/* Panneau de partage */
.share-sheet {
  position: fixed;
  inset: 0;
  background: rgba(10, 58, 56, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
}

.share-card {
  background: var(--cream);
  width: 100%;
  max-width: 480px;
  border-radius: 22px 22px 0 0;
  padding: 20px;
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  margin-bottom: 12px;
}

.share-header button {
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: var(--deep2);
}

.share-preview {
  background: var(--mint);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.share-native {
  width: 100%;
  background: var(--primary);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  margin-bottom: 12px;
  cursor: pointer;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.share-opt {
  background: var(--mint);
  border: none;
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--deep2);
  cursor: pointer;
}

.share-opt span { font-size: 0.72rem; font-family: 'Manrope', sans-serif; }
