/* =========================================================================
   Module Tâches — NOTIFICATIONS & CALENDRIER (Lot F) : styles
   -------------------------------------------------------------------------
   Tout est préfixé `.tkn-` pour ne jamais entrer en collision avec
   tablette.css ni avec le `.tk-` du Lot A. On n'utilise QUE les variables de
   tablette.css (--card, --txt, --txt2, --sep, --blue, --green, --red…) : le
   mode sombre suit donc automatiquement, sans média-requête dédiée.
   ========================================================================= */

/* ------------------------------- états ---------------------------------- */
.tkn-load,
.tkn-vide {
  padding: 12px 2px;
  font-size: 14px;
  color: var(--txt2);
}
.tkn-load { opacity: .7; }

.tkn-note {
  margin: 8px 0;
  padding: 9px 12px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  background: rgba(255, 149, 0, .14);
  color: var(--warn);
}
.tkn-hint {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--txt2);
}
.tkn-sslb {
  margin: 2px 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--txt2);
}
.tkn-sslb b { color: var(--txt); }

/* --------------------------- liste des rappels -------------------------- */
.tkn-list {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.tkn-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sep);
  transition: background .18s ease, opacity .18s ease;
}
.tkn-item:last-child { border-bottom: 0; }
.tkn-item:hover { background: var(--fill-3); }
.tkn-item.tkn-done { opacity: .55; }

.tkn-ico { font-size: 17px; flex: 0 0 auto; line-height: 1; }
.tkn-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tkn-txt b { font-size: 15px; font-weight: 600; color: var(--txt); }
.tkn-txt small { font-size: 12.5px; color: var(--txt2); }

.tkn-x {
  margin-left: auto;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--red);
  background: var(--fill);
  transition: background .18s ease, transform .18s ease;
}
.tkn-x:hover { background: rgba(255, 59, 48, .16); }
.tkn-x:active { transform: scale(.94); }

/* ----------------------------- ajout rapide ----------------------------- */
.tkn-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tkn-chip {
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  background: rgba(0, 122, 255, .12);
  border: 1.5px solid transparent;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.tkn-chip:hover { border-color: var(--blue); }
.tkn-chip:active { transform: scale(.97); }

.tkn-addrow { margin-top: 10px; gap: 8px; }
.tkn-addrow input[type="number"] { max-width: 160px; }

/* ------------------------------ calendrier ------------------------------ */
.tkn-url {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.tkn-url input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--txt);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--sep);
  outline: none;
}
.tkn-url .btn { flex: 0 0 auto; }

.tkn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.tkn-actions .btn { flex: 0 0 auto; }
.tkn-actions a.btn { display: inline-flex; align-items: center; }

/* ------------------------- options / interrupteurs ---------------------- */
.tkn-opts {
  margin: 12px 0 4px;
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.tkn-sw {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--sep);
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease;
}
.tkn-sw:last-child { border-bottom: 0; }
.tkn-sw:hover { background: var(--fill-3); }
.tkn-sw > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--txt);
}
.tkn-sw > span small {
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--txt2);
}
.tkn-sw input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}
.tkn-sw select {
  flex: 0 0 auto;
  max-width: 55%;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--txt);
  background: var(--fill);
  outline: none;
}
.tkn-sw-fort > span { font-weight: 700; }

.tkn-duo { gap: 10px; margin-top: 12px; }
.tkn-duo input {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 16px;
  color: var(--txt);
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--sep);
  outline: none;
}

/* --------------------------------- aide --------------------------------- */
.tkn-aide {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--fill-3);
}
.tkn-aide > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
}
.tkn-aide > summary::-webkit-details-marker { display: none; }
.tkn-aide > summary::before { content: "▸ "; }
.tkn-aide[open] > summary::before { content: "▾ "; }
.tkn-aide-b { margin-top: 12px; }
.tkn-aide-b b { font-size: 13.5px; color: var(--txt); }
.tkn-aide-b p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--txt2);
}
.tkn-aide .tkn-note { margin-bottom: 0; }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 699px) {
  .tkn-url { flex-direction: column; align-items: stretch; }
  .tkn-url .btn { width: 100%; }
  .tkn-actions .btn,
  .tkn-actions a.btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .tkn-sw { flex-wrap: wrap; }
  .tkn-sw select { max-width: 100%; width: 100%; }
  .tkn-addrow { flex-wrap: wrap; }
  .tkn-addrow input[type="number"] { max-width: none; flex: 1 1 100%; }
  .tkn-addrow .btn { flex: 1 1 100%; }
}

/* Mode sombre : toutes les couleurs viennent des variables de tablette.css,
   il n'y a donc rien à redéfinir. Seules les deux teintes « en dur » (le
   bandeau d'avertissement et son texte orange) manquent de contraste sur fond
   sombre : on les rattrape ici. */
@media (prefers-color-scheme: dark) {
  .tkn-note { background: rgba(255, 149, 0, .18); color: #ffb340; }
  .tkn-item:hover,
  .tkn-sw:hover { background: var(--fill); }
  .tkn-aide { background: var(--fill); }
}
