/* ═══════════════ Djouney v3 — « Nous deux » (v3-008) ═══════════════
   Attentions & Envies (screens/nous.js), la soirée à deux (screens/soiree.js), l'encart d'une date et le
   lanceur dans le carnet (components/nous-carnet.js). Classes préfixées .ns-, sur les jetons Encre & Cire.
   Intime, jamais marchand : pas de bannière, pas de prix en gros, des liens discrets et signalés. */

.ns {
  --ns-soft: rgba(var(--ink-rgb), .82);
  --ns-faint: rgba(var(--ink-rgb), .58);
}

/* ─── Écran ─── */
.ns-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(6px + var(--safe-top)) 16px calc(40px + var(--safe-bottom));
}
.ns-inner { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.ns-head { display: flex; align-items: center; min-height: 52px; margin-left: -8px; }
.ns-back { color: var(--stem); }
.ns-title { margin: 0; font-family: var(--font-hand); font-weight: 500; font-size: clamp(44px, 12vw, 56px); line-height: 1.02; color: var(--ink); outline: none; }
.ns-title--soiree { font-size: clamp(40px, 11vw, 52px); }
.ns-sub { margin: 6px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 15.5px; line-height: 1.45; color: var(--ns-soft); }
.ns-etat { margin: 0; padding: 18px 4px; font-family: var(--font-serif); font-style: italic; color: var(--ns-soft); }
.ns-aide { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(var(--ink-rgb), .8); }
.ns-aide--bas { margin-top: 6px; }
.ns-vide { margin: 0; padding: 18px; border-radius: 18px; border: 1.5px dashed var(--relief); font-family: var(--font-serif); font-style: italic; line-height: 1.5; color: var(--ns-soft, rgba(var(--ink-rgb), .82)); }
.ns-mention { margin: 4px 2px 0; font-size: 12.5px; line-height: 1.45; color: rgba(var(--ink-rgb), .78); }
.ns-erreur { margin: 0; min-height: 0; font-size: 14px; color: var(--carmine); }
.ns-erreur:empty { display: none; }
.ns-pile { display: flex; flex-direction: column; gap: 10px; }

/* ─── Onglets ─── */
.ns-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--porcelain); box-shadow: var(--deboss); }
.ns-tab {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 500;
  color: rgba(var(--ink-rgb), .8);
  transition: background-color var(--mid) var(--ease), box-shadow var(--mid) var(--ease), color var(--mid) var(--ease);
}
.ns-tab[aria-selected="true"] { background: var(--milk); color: var(--ink); box-shadow: var(--emboss-sm); }
.ns-panel { display: flex; flex-direction: column; gap: 16px; }
.ns-panel[hidden] { display: none; }

/* ─── Filtres ─── */
.ns-filtres { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-filtre {
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--relief);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.ns-filtre[aria-pressed="true"], .ns-filtre[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--milk); }

/* ─── Envies ─── */
.ns-groupe { display: flex; flex-direction: column; gap: 10px; }
.ns-groupe__titre { margin: 0; padding-left: 4px; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 16px; color: rgba(var(--ink-rgb), .84); }
.ns-cartes { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ns-carte {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background-color: var(--milk);
  background-image: var(--grain);
  background-size: 180px 180px;
  box-shadow: var(--emboss-sm);
}
.ns-carte.est-faite { opacity: .78; box-shadow: none; border: 1.5px dashed var(--relief); background: transparent; }
.ns-carte__visuel { flex: none; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--porcelain); box-shadow: var(--deboss); color: var(--flower); }
.ns-carte__img { width: 100%; height: 100%; object-fit: cover; }
.ns-glyphe { display: inline-flex; }
.ns-glyphe svg { width: 28px; height: 28px; }
.ns-carte__corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ns-carte__titre { margin: 0; font-family: var(--font-hand); font-weight: 500; font-size: 23px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.ns-carte__meta { margin: 0; font-size: 13px; color: rgba(var(--ink-rgb), .8); }
.ns-carte__note { margin: 2px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 14px; line-height: 1.45; color: rgba(var(--ink-rgb), .84); }
.ns-carte__statut { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.ns-carte__statut svg { width: 16px; height: 16px; flex: none; }
.ns-carte__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ns-carte__actions .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.ns-carte__actions .btn--quiet { padding: 0 6px; }
.ns-lien { text-decoration: underline; text-underline-offset: 4px; }
.ns-faites summary { min-height: 44px; display: flex; align-items: center; padding: 0 4px; font-family: var(--font-serif); font-style: italic; color: rgba(var(--ink-rgb), .84); cursor: pointer; }
.ns-faites .ns-cartes { margin-top: 8px; }
.ns-ajouter, .ns-raccourci { min-height: 52px; }

/* ─── Formulaires (dans des feuilles) ─── */
.ns-form { display: flex; flex-direction: column; gap: 14px; }
.ns-champ { display: flex; flex-direction: column; gap: 6px; }
.ns-champ[hidden] { display: none; }
.ns-champ .field-label { margin: 0; }
.ns-rangee { display: flex; gap: 8px; }
.ns-rangee > * { min-width: 0; }
.ns-prix { flex: 1; }
.ns-devise { flex: none; width: 96px; }
.ns-rangee--date > select:first-child { flex: none; width: 76px; }
.ns-rangee--date > select:nth-child(2) { flex: 1; }
.ns-annee { flex: none; width: 92px; }
.ns-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.ns-puce { position: relative; }
.ns-puce input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ns-puce span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--relief);
  background: var(--milk);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.ns-puce input:checked + span { background: var(--flower); border-color: var(--flower); color: var(--flower-ink, #fff); }
.ns-puce input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ns-case { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 4px; font-size: 15px; cursor: pointer; }
.ns-case input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--flower); }
.ns-retirer { color: var(--carmine); align-self: center; }
.ns-attention { display: flex; flex-direction: column; gap: 14px; }

/* ─── Nos dates ─── */
.ns-dates { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ns-date {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  border-radius: 20px;
  background: var(--milk);
  box-shadow: var(--emboss-sm);
}
.ns-date.est-proche { box-shadow: var(--emboss-sm), inset 4px 0 0 var(--flower); }
.ns-date__texte { flex: 1; min-width: 0; }
.ns-date__nom { margin: 0; font-family: var(--font-hand); font-weight: 500; font-size: 24px; line-height: 1.1; color: var(--ink); }
.ns-date__quand { margin: 2px 0 0; font-size: 14px; color: var(--ink); }
.ns-date__rappel { margin: 2px 0 0; font-size: 13px; color: rgba(var(--ink-rgb), .78); }
.ns-modifier { flex: none; min-height: 40px; padding: 0 14px; font-size: 14px; }

/* ─── L'encart d'une date, dans le carnet ─── */
.cn-nous-slot:empty { display: none; }
.ns-encart {
  margin: 8px 0 14px;
  padding: 18px 18px 14px;
  border-radius: 22px;
  background-color: var(--milk);
  background-image: var(--grain);
  background-size: 180px 180px;
  box-shadow: var(--emboss-sm), inset 0 3px 0 var(--flower);
}
.ns-encart__sur { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(var(--ink-rgb), .78); }
.ns-encart__titre { margin: 4px 0 0; font-family: var(--font-hand); font-weight: 500; font-size: 30px; line-height: 1.08; color: var(--ink); }
.ns-encart__texte { margin: 6px 0 12px; font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.45; color: rgba(var(--ink-rgb), .84); }
.ns-encart__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ns-encart__actions .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.ns-idees { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ns-idee { padding: 12px 14px; border-radius: 16px; background: var(--porcelain); }
.ns-idee__cat { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(var(--ink-rgb), .78); }
.ns-idee__titre { margin: 2px 0 0; font-weight: 600; font-size: 15px; color: var(--ink); }
.ns-idee__texte { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: rgba(var(--ink-rgb), .84); }
.ns-idee .btn { min-height: 40px; margin: 4px 0 -6px -6px; padding: 0 6px; font-size: 14px; }

/* ─── Le lanceur de la soirée (feuille du carnet) ─── */
.ns-lanceur { display: flex; flex-direction: column; gap: 12px; }
.ns-activites { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ns-activite {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border: 0;
  border-radius: 20px;
  background: var(--porcelain);
  box-shadow: var(--emboss-sm);
  text-align: left;
  color: var(--ink);
}
.ns-activite:active { box-shadow: var(--deboss); }
.ns-activite__titre { font-family: var(--font-hand); font-weight: 500; font-size: 25px; line-height: 1.1; }
.ns-activite__texte { font-size: 14px; line-height: 1.4; color: rgba(var(--ink-rgb), .84); }
.ns-activite__duree { font-size: 12.5px; color: rgba(var(--ink-rgb), .78); }

/* ─── La soirée ─── */
.ns-scene { display: flex; flex-direction: column; gap: 14px; }
.ns-grande-carte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 230px;
  padding: 26px 22px;
  border-radius: 26px;
  background-color: var(--milk);
  background-image: var(--grain);
  background-size: 180px 180px;
  box-shadow: var(--emboss), inset 0 3px 0 var(--flower);
  text-align: center;
  animation: nsCarte .45s var(--ease);
}
.ns-grande-carte--fin { min-height: 160px; }
.ns-grande-carte__theme { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(var(--ink-rgb), .78); }
.ns-grande-carte__texte { margin: 0; font-family: var(--font-hand); font-weight: 500; font-size: clamp(30px, 8.5vw, 38px); line-height: 1.15; color: var(--ink); }
.ns-grande-carte__de { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 14.5px; color: rgba(var(--ink-rgb), .84); }
@keyframes nsCarte { from { opacity: 0; transform: translateY(8px) rotate(-.6deg); } }
.ns-votes { display: flex; gap: 10px; }
.ns-vote { flex: 1; min-height: 64px; font-family: var(--font-hand); font-size: 26px; font-weight: 500; }
.ns-attente, .ns-reveal { margin: 0; text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--ink); }
.ns-reveal { font-family: var(--font-hand); font-style: normal; font-size: 30px; }
.ns-reveal.est-accord { color: var(--flower); }
.ns-finir { align-self: center; }

/* ─── Dans le tiroir : la pastille d'une date qui approche ─── */
.dr-moment {
  flex: none;
  align-self: center;
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--flower) 14%, var(--milk));
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  white-space: nowrap;
}
.dr-moment[hidden] { display: none; }

/* ─── Dans le carnet : la lune et « Pour vous deux » ─── */
.cn-soiree { color: var(--cn-soft, rgba(var(--ink-rgb), .84)); }
.cn-soiree svg { width: 21px; height: 21px; }
.cn-nous-liens { display: flex; flex-direction: column; gap: 8px; }
.cn-nous-lien { flex-direction: column; align-items: flex-start; gap: 0; min-height: 60px; padding: 10px 18px; text-align: left; border-radius: 18px; }
.cn-nous-lien__titre { font-weight: 600; font-size: 15px; }
.cn-nous-lien__texte { font-size: 13px; font-weight: 400; color: rgba(var(--ink-rgb), .8); }

@media (prefers-reduced-motion: reduce) {
  .ns-grande-carte { animation: none; }
}
