/* Polices hébergées ici (licence SIL Open Font License), aucune requête vers Google. */
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/hanken-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/hanken-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/hanken-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/hanken-grotesk-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/nunito-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/nunito-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/shippori-mincho-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Shippori Mincho'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/shippori-mincho-latin-600-normal.woff2') format('woff2'); }

/* Maison : seal point. Brun d'Azami, crème de son poitrail, bleu de ses yeux. */

:root {
  --seal: #2A1C15;
  --seal-2: #3A2A20;
  --seal-3: #4A372B;
  --creme: #F3EBDF;
  --fauve: #B8A48F;
  --bleu: #9CC4E4;
  --bleu-fonce: #1E3F5C;
  --rouge: #D94A3D;      /* ça attend : corail franc, lisible sur ciel */
  --jaune: #F2C14E;      /* récompense, chiffres qui comptent */
  --bleu-2: #5F93BF;
  --creme-2: #CDBFA8;    /* bord inférieur des boutons crème */
  --r: 16px;             /* rayon des cartes */
  --r-in: 10px;          /* rayon des éléments dans une carte */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;  /* échelle d'espacement */

  /* Jour : ciel. Azami, crème et brun, s'y détache ; le jaune porte l'action et la récompense. */
  --ciel: #53A5C7;
  --bg: var(--ciel);
  --surface: #DDF3FF;
  --surface-2: #FFFFFF;
  --text: #1E2F3F;
  --muted: #3E6680;
  --line: #A9DDF5;
  --shadow: #3C8BAB;     /* bord inférieur des cartes */
  --accent: #F2C14E;     /* action, récompense */
  --accent-edge: #C8951E;
  --accent-text: #1E2F3F;
  --num: #1E2F3F;        /* chiffres qui comptent */
  --ink: #2A1C15;        /* brun d'Azami : onglet actif, contours forts */
  --ink-edge: #15100C;
  --btn-bg: var(--accent);
  --btn-text: var(--accent-text);
  --toast-bg: #1E2F3F;
  --toast-text: #F3EBDF;
  --toast-edge: #0D1820;
  --lampe: #F0B65A;
  --gold-text: #8A6512;  /* « fait », aujourd'hui : doré lisible sur clair */

  --sans: "Nunito", "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;

  --gutter: 16px;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

/* Thème « Brun » : la première version, seal point d'Azami. Choisi par personne dans les réglages. */
html[data-theme="brun"] {
  --bg: #4A3627;            /* brun moyen : les oreilles, la queue et les pattes d'Azami s'en détachent */
  --surface: #5E4636;       /* cartes plus claires que le fond */
  --surface-2: #6A503E;
  --text: #FAF3E8;
  --muted: #E0CFB8;         /* texte secondaire, lisible sur les cartes */
  --line: #7A5F4A;          /* bord visible */
  --shadow: #2C1F16;
  --accent: var(--bleu);
  --accent-edge: var(--bleu-2);
  --accent-text: #1C120C;
  --num: var(--jaune);
  --ink: var(--creme);
  --ink-edge: var(--creme-2);
  --btn-bg: var(--bleu);
  --btn-text: #1C120C;
  --toast-bg: var(--creme);
  --toast-text: var(--seal);
  --toast-edge: var(--creme-2);
  --rouge: #F09A86;
  --gold-text: #F5CB5C;
  color-scheme: dark;
}
html[data-theme="brun"] .glance button { border-color: #7A5F4A; }
html[data-theme="brun"] .hd-kicker, html[data-theme="brun"] h2 { color: #E0CFB8; }
html[data-theme="brun"] .picker { background: var(--seal); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 600 16px/1.45 var(--sans);
    -webkit-font-smoothing: antialiased;
  transition: background-color .5s ease, color .5s ease;
  min-height: 100dvh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 18px) var(--gutter) calc(var(--nav-h) + var(--safe-b) + 28px);
}

/* Titres ---------------------------------------------------------------- */

.hd { margin: 0 0 var(--s4); }
.hd-kicker { margin: 0 0 2px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(30px, 9vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
body[data-time="nuit"] h1 {
  font-family: var(--mincho);
  font-weight: 600;
  letter-spacing: 0;
}
h2 {
  margin: var(--s5) 0 var(--s3);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Segments --------------------------------------------------------------- */

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: var(--s1);
  margin: var(--s2) 0 var(--s4);
  gap: var(--s1);
}
.seg button {
  border: 0;
  background: none;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 800;
  font-size: 15px;
  color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 3px 0 var(--ink-edge); }
body[data-time="nuit"] .seg button[aria-pressed="true"] { color: var(--seal); }

/* Champs et boutons ------------------------------------------------------ */

.field, .area {
  width: 100%;
  border: 2px solid var(--line);
  background: var(--surface-2);
  padding: 0 14px;
  height: 48px;
  font-size: 17px;   /* ≥ 16px : iOS ne zoome pas */
  border-radius: 14px;
  -webkit-appearance: none;
  font-weight: 700;
  line-height: 44px;
}
input.field[type="date"], input.field[type="time"] { line-height: normal; }
.field:focus, .area:focus { border-color: var(--ink); outline: none; }
.field::placeholder, .area::placeholder { color: var(--muted); }
.area {
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  height: auto;
  line-height: 1.5;
}
body[data-time="nuit"] .area { font-family: var(--mincho); }

.row { display: flex; gap: var(--s2); align-items: center; }
.row.mt, .mt { margin-top: var(--s3); }
.w-110 { width: 110px; flex: none; } .w-118 { width: 118px; flex: none; }
.chip-label.mb { margin: 0 0 var(--s2); }
h2.first { margin-top: var(--s1); }
.item-meta.late { color: var(--rouge); font-weight: 800; }
label.chip-label { display: block; }
.row > .grow { flex: 1; min-width: 0; }

.btn {
  --edge: var(--accent-edge);
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0 20px; height: 48px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--edge);
  transform: translateY(0);
}

.btn:disabled { opacity: .4; }
.btn.ghost { --edge: var(--line); background: var(--surface); color: var(--text); border: 2px solid var(--line); }
.btn.small { padding: 0 14px; height: 36px; font-size: 14px; box-shadow: 0 3px 0 var(--edge); }
.link {
  border: 0; background: none; padding: 12px 0;
  color: var(--ink); font-weight: 800; font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s2) 0 0; }
.chips button {
  border: 2px solid var(--line);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  box-shadow: 0 2px 0 var(--line);
}
.chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); box-shadow: 0 2px 0 var(--accent-edge); }
.chip-label { font-size: 12px; color: var(--muted); margin: var(--s3) 0 var(--s1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.form { margin: 0 0 var(--s2); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.check {
  display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 15px;
}
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Listes ----------------------------------------------------------------- */

.list-head { display: flex; align-items: center; gap: var(--s2); margin: var(--s5) 0 var(--s3); }
.list-head .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--jaune); color: #1C120C; font-size: 12px; letter-spacing: 0; }
.form.add { margin-top: var(--s4); }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
/* Une ligne = [case] [illustration] [texte] [actions], tout centré verticalement, sur une seule règle. */
.item, .chore {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--shadow);
  min-height: 64px;
}
.item-main { flex: 1 1 0; min-width: 0; }
.item-trail { display: flex; align-items: center; gap: var(--s1); flex: none; }
.item-title { font-weight: 800; line-height: 1.3; }
.item .more, .chore .more { margin: 0; }
.item-title { overflow-wrap: anywhere; }
.item-meta { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.item.done { opacity: .6; }
.item.done .item-title { text-decoration: line-through; color: var(--muted); }
.item.done.fresh { opacity: 1; border-color: color-mix(in srgb, var(--jaune) 55%, var(--line)); }
.item.done.fresh .item-title { text-decoration: none; color: var(--text); }
.item.done.fresh .tick { background: var(--jaune); border-color: var(--jaune); box-shadow: 0 3px 0 #B8882A; }
.item.done.fresh .item-meta { color: var(--gold-text); font-weight: 800; }
body[data-time="nuit"] .item.done.fresh .item-meta { color: var(--jaune); }

.item-actions {
  flex-basis: 100%;
  display: flex; gap: var(--s2); flex-wrap: wrap;
  padding-top: var(--s1);
}

.tick {
  position: relative; flex: none;
  width: 40px; height: 40px;
  border: 2.5px solid var(--ink);
  background: var(--surface-2);
  border-radius: var(--r-in);
  box-shadow: 0 3px 0 var(--ink-edge);
  display: grid; place-items: center;
  padding: 0; margin-top: -3px;  /* l'ombre basse compte dans la hauteur : on recentre */
}
.tick::before { content: ""; position: absolute; inset: -10px; }
.tick[aria-checked="true"] { background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-edge); }
.tick[aria-checked="true"]::after {
  content: ""; width: 15px; height: 8px;
  border: 3.5px solid #1C120C; border-top: 0; border-right: 0; border-radius: 0 0 0 2px;
  transform: rotate(-45deg) translate(1px, -1px);
}
.more {
  border: 0; background: none; width: 40px; height: 40px; margin: 0; flex: none;
  border-radius: 50%; color: var(--muted); font-size: 20px; line-height: 1;
}
.empty { color: var(--muted); padding: 18px 0; margin: 0; }

details.fold > summary {
  list-style: none; cursor: pointer;
  color: var(--muted); font-size: 14px; font-weight: 800; padding: var(--s3) 0 var(--s2);
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "+ "; }
details.fold[open] > summary::before { content: "− "; }

/* Réussites -------------------------------------------------------------- */

.wins { margin: var(--s3) 0 var(--s2); padding: var(--s4) var(--s4) var(--s3); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 3px 0 var(--shadow); }
.wins-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.wins-big { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.1; }
.wins-big b { font-size: 30px; font-weight: 900; color: var(--num); }
.wins-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.wins-side { display: flex; gap: 8px; flex: none; }
.wins-streak, .wins-total { display: grid; justify-items: center; gap: 0; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--line); text-align: center; min-width: 58px; }
.wins-streak { border-color: var(--ink); }
.wins-streak b, .wins-total b { font-size: 20px; font-weight: 900; line-height: 1.1; }
.wins-streak b { color: var(--num); }
.wins-streak span, .wins-total span { font-size: 10px; line-height: 1.1; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.wins .fold > summary { padding: 10px 0 4px; }
.wins-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wins-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; font-size: 14px; }
.wins-list .w-icon .ticon { width: 26px; height: 26px; border-radius: 7px; }
.wins-list .w-icon .ticon.emoji { font-size: 14px; line-height: 22px; }
.wins-list .w-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wins-list .w-who { color: var(--muted); font-size: 13px; }
.wins-list .w-when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.list-head.done-head { color: var(--gold-text); }
body[data-time="nuit"] .list-head.done-head { color: var(--jaune); }
.list-head.done-head .count { background: var(--jaune); }

/* Maison : coup d'œil --------------------------------------------------- */

.glance { margin: var(--s1) 0 var(--s2); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.glance button {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: flex-start; gap: 2px;
  width: 100%; min-height: 88px;
  border: 2px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: var(--s3) var(--s4);
  text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); font-family: inherit; line-height: 1.25;
  box-shadow: 0 3px 0 var(--shadow);
}
.glance .g-num { font-weight: 900; font-size: 28px; line-height: 1; color: var(--num); overflow-wrap: anywhere; }
.glance .g-num.small { font-size: 20px; line-height: 1.1; }
.glance .late { grid-column: 1 / -1; min-height: 0; flex-direction: row; justify-content: space-between; align-items: center; border-color: var(--rouge); color: var(--text); }
.glance .late .g-num { font-size: 20px; }
.glance .late .g-num { color: var(--rouge); }

/* Azami : pack d'animations V2, une scène par page ---------------------- */

.azami { display: block; width: 200px; height: 200px; margin: 0 auto; object-fit: contain; }
.azami-btn { all: unset; cursor: pointer; display: block; width: 200px; margin: 0 auto; }
.azami-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 24px; }
.hd.centered { text-align: center; margin-bottom: 12px; }
.hd.centered .azami, .hd.centered .azami-btn { width: 164px; }
.hd.centered .azami { height: 182px; transform: scale(1.18); transform-origin: 50% 85%; }  /* même encombrement qu'avant : le dessin V3 a des marges internes, on le grossit sans bouger la mise en page */
.hd.row .azami { transform: scale(1.12); transform-origin: 50% 80%; }
.hd.centered h1 { font-size: clamp(26px, 8vw, 34px); }
.hd.centered .hd-kicker { margin-top: 4px; }
.hd.row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px; }
.hd.row .azami { width: 150px; height: 166px; margin: 0; }
.hd.row .azami-btn { width: 150px; margin: 0; }

/* Icônes de thème et édition ------------------------------------------- */

.icon-btn {
  border: 0; background: none; border-radius: var(--r-in);
  width: 40px; height: 40px; padding: 0; overflow: hidden; flex: none;
  display: grid; place-items: center;
}
.ticon { display: block; width: 40px; height: 40px; border-radius: var(--r-in); object-fit: contain; }
.ticon.emoji { font-size: 20px; line-height: 36px; background: var(--surface-2); border: 2px solid var(--line); }
.picker .ticon { width: 40px; height: 40px; margin: 0 auto; }
.picker-head { grid-column: 1 / -1; margin: var(--s2) var(--s1) 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.picker-head:first-child { margin-top: 0; }
.ticon.person { object-fit: cover; }
.icon-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent); }
.picker {
  flex-basis: 100%;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  padding: 8px; margin-top: 4px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px;
}
.picker { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); max-height: 300px; overflow-y: auto; }
/* Dans la grille de choix, chaque illustration pose sur une tuile crème (pack V3). */
.picker button { border: 2px solid transparent; background: #FFF3D4; padding: 0; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.picker button .ticon { width: 36px; height: 36px; }
.picker button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, transparent); }
.item.editing, .chore.editing { display: block; padding: var(--s3) var(--s4) var(--s4); }
.form.edit { margin: 0; }
.form.edit .field { font-size: 16px; }
.note .form.edit { margin: 0; }


/* Récemment -------------------------------------------------------------- */

.recent { list-style: none; margin: 0 0 6px; padding: 0; font-size: 14px; }
.recent li { display: flex; gap: 6px; align-items: baseline; padding: 7px 0; border-bottom: 2px solid var(--line); }
.recent .who { font-weight: 700; }
.recent .when { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Tableau ---------------------------------------------------------------- */

.notes { display: grid; gap: var(--s3); margin-top: var(--s4); }
.note {
  background: var(--surface);
  border: 2px solid var(--line);
  padding: var(--s4) var(--s4) var(--s3);
  border-radius: var(--r);
}
.note.important { background: var(--jaune); border-color: var(--jaune); color: #1C120C; box-shadow: 0 3px 0 #C8951E; }
.note.important .note-foot, .note.important .link { color: #6B4E12; }
.note.pinned { border-color: var(--ink); }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 13px; color: var(--muted);
}
.note-foot .acts { display: flex; gap: 12px; }

/* Ménage ---------------------------------------------------------------- */

.chores { display: grid; gap: var(--s3); }
.chore.mine { border-color: var(--ink); }
.chore.late { border-color: var(--rouge); }
.chore.late .c-when { color: var(--rouge); font-weight: 800; }
.c-title { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; line-height: 1.3; }
.c-meta { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

.fair { margin-top: 8px; display: grid; gap: 8px; }
.fair-row { display: grid; grid-template-columns: 72px 1fr 26px; gap: 10px; align-items: center; font-size: 14px; }
.fair-bar { height: 14px; background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.fair-bar span { display: block; height: 100%; background: var(--jaune); border-radius: 999px; }
.fair-row b { text-align: right; }

/* Argent ---------------------------------------------------------------- */

.balance {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(26px, 8vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.balance .amt { white-space: nowrap; color: var(--num); }
.bal-card {
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: var(--s4); margin: var(--s1) 0 var(--s5);
  box-shadow: 0 3px 0 var(--shadow);
}
.bal-card .balance { margin: 0; font-size: clamp(24px, 7vw, 30px); }
.bal-kicker { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bal-sub { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.bal-rows { margin-top: 12px; display: grid; gap: 8px; }
.bal-head, .bal-row { display: grid; grid-template-columns: 64px 1fr 68px 60px; gap: 8px; align-items: center; font-size: 14px; }
.bal-head { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.bal-head b, .bal-head i, .bal-row b, .bal-row i { text-align: right; font-style: normal; white-space: nowrap; }
.bal-row b { font-weight: 700; }
.bal-row i { color: var(--muted); }
.bal-bars { display: grid; gap: 3px; }
.bal-bar { height: 8px; border-radius: 999px; background: var(--jaune); min-width: 3px; }
.bal-bar.part { background: var(--muted); opacity: .45; }
.bal-explain { margin: 10px 0 0; font-size: 14px; }
.bal-btn { margin-top: 12px; }
.item-meta .effect { white-space: nowrap; font-weight: 600; }
.item-meta .effect.neg { color: var(--text); }
.item-meta .effect.done { color: var(--muted); font-weight: 400; font-style: italic; }
.cats .who { color: var(--text); }
.money-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.money-row .amount { font-weight: 650; white-space: nowrap; }
.settle .item-title { color: var(--muted); font-style: italic; }
.month-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 26px 0 0; padding-bottom: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.month-head b { font-weight: 900; font-size: 16px; color: var(--text); letter-spacing: 0; }
.cats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); padding: 0 0 10px; }
.amount-input { font-size: 22px; font-weight: 900; padding: 0 12px; }
.item-meta .effect.pos { color: var(--gold-text); }
body[data-time="nuit"] .item-meta .effect.pos { color: var(--jaune); }

/* Courses ---------------------------------------------------------------- */

.shop .item-title { font-size: 17px; }

/* Nuit : care ----------------------------------------------------------- */

.letters { display: grid; gap: var(--s3); }
.letter {
  width: 100%;
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: var(--s4);
  text-align: left;
  display: grid; gap: var(--s1);
}
.letter.sealed { border-color: var(--lampe); }
.letter { grid-template-columns: 40px 1fr; grid-template-areas: "icon from" "icon meta" "body body" "talk talk" "act act"; column-gap: var(--s3); align-items: center; }
.letter .l-icon { grid-area: icon; width: 40px; height: 40px; border-radius: var(--r-in); }
.letter .l-from { grid-area: from; } .letter .l-meta { grid-area: meta; }
.letter .letter-body { grid-area: body; } .letter .talk { grid-area: talk; } .letter > div:last-child { grid-area: act; }
.letter .l-from { font-family: var(--mincho); font-size: 18px; }
.letter .l-meta { font-size: 13px; color: var(--muted); }
.letter-body {
  font-family: var(--mincho);
  font-size: 18px; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere;
  margin: 8px 0 4px;
}
.talk { color: var(--lampe); font-size: 14px; }
.sent .item-title { font-family: var(--mincho); }

/* Navigation ------------------------------------------------------------ */

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  transition: background-color .5s ease;
}
.nav ul {
  max-width: 560px; margin: 0 auto; padding: 0;
  list-style: none; display: grid; grid-template-columns: repeat(6, 1fr);
}
.nav button {
  position: relative;
  width: 100%; height: var(--nav-h);
  border: 0; background: none;
  display: grid; justify-items: center; align-content: center; gap: 2px;
  font-size: 11px; font-weight: 800; color: var(--muted);
}
.nav button[aria-current="page"] { color: var(--text); }
.nav svg { width: 24px; height: 24px; padding: 4px; box-sizing: content-box; border-radius: 12px; border: 2px solid transparent; }
.nav button[aria-current="page"] svg { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.nav .badge {
  position: absolute; top: 8px; left: calc(50% + 8px);
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--rouge); color: #fff;
  font-size: 11px; font-weight: 900; line-height: 17px; text-align: center;
}
.nav .dot {
  position: absolute; top: 10px; left: calc(50% + 9px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--lampe);
}

/* Connexion ------------------------------------------------------------- */

.login { min-height: 80dvh; display: grid; align-content: center; gap: 0; }
.login-az .azami { width: 150px; height: 166px; margin: 0 0 -6px -14px; }
.boot { min-height: 80dvh; display: grid; place-items: center; }
.boot img { width: 180px; height: 180px; opacity: 0; animation: boot-in .3s ease .35s forwards; }   /* pas de flash si le chargement est rapide */
@keyframes boot-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot img { animation: none; opacity: 1; } }
.login h1 { font-size: clamp(54px, 18vw, 84px); margin-bottom: 18px; }
.login p { color: var(--muted); margin: 0 0 22px; max-width: 32ch; }
.login .btn { margin-top: 18px; width: 100%; }

.demo {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text);
  border: 2px dashed var(--line); border-radius: 12px;
  padding: 6px 10px; margin: 0 0 16px;
}

.theme-row { margin-top: var(--s6); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.theme-row .seg { margin: 0; width: 180px; }
.theme-row .seg button { padding: 6px 0; font-size: 14px; }
.foot-essai { text-align: center; margin: var(--s4) 0 0; font-size: 14px; }
.foot { margin-top: var(--s4); display: flex; justify-content: center; align-items: center; gap: 14px; }
.foot .version { font-size: 12px; color: var(--muted); opacity: .7; }

#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  z-index: 9; max-width: calc(100% - 32px);
  background: var(--toast-bg); color: var(--toast-text);
  padding: 11px 18px; border-radius: 14px; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 0 var(--toast-edge);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#toast.on { opacity: 1; }

/* Rappeler à l'autre : petit bouton sous la ligne, à côté du nom. */
.nudge { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0; padding: 5px 11px 5px 8px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; font-weight: 800; line-height: 1.2; cursor: pointer; max-width: 100%; }
.nudge svg { width: 16px; height: 16px; flex: none; }
.nudge span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nudge.sent { color: var(--muted); border-style: dashed; background: none; }
.nudge:active { transform: scale(.95); }

/* Notifications dans l'app : pile jaune en haut (sur les deux thèmes), la plus récente au-dessus, repliée au-delà de trois ;
   un toucher ouvre le détail, × en ferme une, « Tout fermer » ou glisser vers le haut ferme tout. */
#pop { --pop-bg: #F7C948; --pop-edge: #C8951E; --pop-ink: #2A1C15; --pop-soft: rgba(42, 28, 21, .72);
  position: fixed; left: 50%; top: calc(var(--safe-t) + 10px); z-index: 80; width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 8px;
  max-height: calc(100dvh - var(--safe-t) - var(--nav-h) - var(--safe-b) - 36px);
  transform: translate(-50%, calc(-100% - var(--safe-t) - 24px)); opacity: 0; pointer-events: none;
  transition: transform .42s cubic-bezier(.34, 1.56, .64, 1), opacity .25s ease; }
#pop.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.pop-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 14px;
  background: var(--pop-ink); color: var(--pop-bg); font-size: 13px; font-weight: 900; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.pop-head button { all: unset; cursor: pointer; font-weight: 800; color: #FFF2D9; text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; }
.pop-list { display: flex; flex-direction: column; gap: 9px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 6px; }
.pop-item { flex: none; display: flex; align-items: stretch; background: var(--pop-bg); color: var(--pop-ink);
  border: 2px solid var(--pop-edge); border-radius: 20px; box-shadow: 0 4px 0 var(--pop-edge), 0 10px 24px rgba(0,0,0,.18);
  animation: pop-in .42s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes pop-in { from { transform: translateY(-16px) scale(.96); opacity: 0; } }
.pop-card { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 10px 4px 10px 10px; cursor: pointer; }
.pop-card .ticon { width: 44px; height: 44px; flex: none; border-radius: 12px; background: #FFF6DC; padding: 3px; box-sizing: border-box; object-fit: contain;
  animation: pop-wiggle .7s ease both; animation-delay: calc(var(--i, 0) * 80ms + .35s); }
.pop-card .ticon.emoji { display: grid; place-items: center; font-size: 24px; }
@keyframes pop-wiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-9deg) scale(1.08); } 55% { transform: rotate(6deg) scale(1.04); } 80% { transform: rotate(-2deg); } }
.pop-txt { min-width: 0; display: grid; gap: 1px; }
.pop-txt b { font-weight: 900; font-size: 15px; line-height: 1.25; }
.pop-txt span { font-size: 14px; font-weight: 600; color: var(--pop-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pop.expanded .pop-txt span { white-space: normal; }
.pop-go { font-size: 24px; font-weight: 800; color: var(--pop-soft); padding: 0 2px; }
.pop-x { all: unset; cursor: pointer; width: 42px; display: grid; place-items: center; color: var(--pop-soft); font-size: 22px; font-weight: 900; }
.pop-more { all: unset; box-sizing: border-box; cursor: pointer; flex: none; text-align: center; padding: 10px 12px; border-radius: 16px;
  background: #FCE7A8; color: var(--pop-ink); border: 2px dashed var(--pop-edge); font-size: 14px; font-weight: 900; }
.pop-bar { flex: none; height: 5px; border-radius: 5px; background: var(--pop-bg); box-shadow: 0 1px 0 var(--pop-edge); transform-origin: left; margin: -2px 14px 0; }
#pop.on .pop-bar { animation: popbar var(--d, 7s) linear forwards; }
@keyframes popbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 25%, 60% { box-shadow: 0 0 0 4px var(--accent); } }
@media (prefers-reduced-motion: reduce) { #pop { transition: opacity .2s; } .pop-item, .pop-card .ticon { animation: none; } }

/* Récompenses ------------------------------------------------------------- */

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.fx-p { position: absolute; display: block; will-change: transform, opacity; line-height: 1; font-weight: 700; }

.btn, .chips button, .tick, .nav button, .more, .icon-btn, .azami-btn, .link, .picker button {
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.btn.small:active { transform: translateY(3px); }
.chips button:active { transform: translateY(2px); box-shadow: 0 0 0 transparent; }
.tick:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }
.more:active, .icon-btn:active, .link:active, .picker button:active { transform: scale(.9); }
.nav button:active { transform: scale(.9); }
.azami-btn:active { transform: scale(.96) rotate(-2deg); }
.tick[aria-checked="true"] { animation: tick-pop .45s cubic-bezier(.34, 1.56, .64, 1); }
.tick[aria-checked="true"]::after { animation: tick-draw .3s .1s ease-out backwards; }
@keyframes tick-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes tick-draw { from { opacity: 0; transform: rotate(-45deg) translate(1px, -1px) scale(.4); } to { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); } }

.pop { animation: pop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.035); background-color: color-mix(in srgb, var(--accent) 30%, var(--surface)); } 100% { transform: scale(1); } }
/* Réaction Azami V3 : apparaît à côté de l'élément confirmé, puis s'efface. */
img.reaction { opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
img.reaction.on { opacity: 1; transform: none; }
img.reaction.off { opacity: 0; transform: translateY(-6px) scale(.95); }
img.azami.jump { animation: jump .8s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 50% 100%; }
@keyframes jump { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(4px) scale(1.08, .92); } 50% { transform: translateY(-18px) scale(.96, 1.06); } 75% { transform: translateY(0) scale(1.04, .96); } 100% { transform: translateY(0) scale(1, 1); } }

#toast { transition: opacity .25s, transform .35s cubic-bezier(.34, 1.56, .64, 1); transform: translateX(-50%) translateY(14px) scale(.92); }
#toast.on { transform: translateX(-50%) translateY(0) scale(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Clavier ouvert sur iPhone : la barre de navigation s'efface pour ne pas masquer le champ. */
body:has(textarea:focus) .nav { display: none; }

/* Grande célébration ----------------------------------------------------- */

/* Fiche « C'était combien ? » après les courses : une feuille qui monte du bas, par-dessus la page. */
#ticket { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 30, 40, 0); transition: background .3s; }
#ticket.on { background: rgba(20, 30, 40, .45); }
.ticket-card { width: 100%; max-width: 560px; background: var(--surface); color: var(--text); border: 2px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; padding: var(--s4) var(--s4) calc(var(--s5) + var(--safe-b)); transform: translateY(100%); transition: transform .4s cubic-bezier(.34, 1.4, .64, 1); text-align: center; }
#ticket.on .ticket-card { transform: none; }
.ticket-icon { width: 64px; height: 64px; margin: -44px auto 0; display: block; }
.ticket-title { margin: var(--s2) 0 2px; font-size: 24px; font-weight: 900; }
.ticket-sub { margin: 0 0 var(--s4); color: var(--muted); font-size: 14px; font-weight: 700; }
.ticket-card .row { align-items: center; gap: var(--s2); }
.ticket-card .amount-input.big { font-size: 30px; font-weight: 900; height: 58px; text-align: right; }
.ticket-cur { font-weight: 800; color: var(--muted); }
.ticket-card .chips { justify-content: center; }
.ticket-perso { text-align: left; margin: var(--s2) 0 0; }
.ticket-perso .chips { justify-content: flex-start; margin-top: var(--s2); }
.ticket-perso .hint { margin: var(--s1) 0 0; font-size: 13px; }
.ticket-split { margin: var(--s2) 0 0; }
.ticket-split input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
.ticket-split-txt { font-weight: 800; font-size: 14px; color: var(--text); margin-top: 2px; }
.ticket-card .form-actions { margin-top: var(--s4); display: flex; gap: var(--s2); justify-content: center; }
#cele { position: fixed; inset: 0; z-index: 30; pointer-events: none; display: grid; place-items: center; opacity: 0; transition: opacity .25s; background: radial-gradient(circle at 50% 45%, rgba(30,47,63,.5), rgba(30,47,63,.15) 55%, transparent 75%); }
#cele.on { opacity: 1; }
#cele.off { opacity: 0; transition: opacity .5s; }
.cele-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.55), rgba(255,255,255,0) 60%); animation: cele-flash 1.2s ease-out forwards; }
@keyframes cele-flash { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
.cele-card { position: relative; display: grid; justify-items: center; gap: 4px; transform: scale(.5); opacity: 0; animation: cele-in .7s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes cele-in { to { transform: scale(1); opacity: 1; } }
.cele-pair { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.cele-badge { width: 132px; height: 132px; border-radius: 30px; border: 4px solid #fff; box-shadow: 0 6px 0 #C8951E, 0 14px 24px rgba(0,0,0,.25); margin-bottom: 18px; animation: cele-badge .8s cubic-bezier(.34, 1.56, .64, 1) .25s both; }
@keyframes cele-badge { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: scale(1) rotate(-4deg); opacity: 1; } }
.cele-pair .cele-azami { width: 170px; height: 189px; }
.cele-azami { width: 200px; height: 222px; animation: cele-jump 1.1s cubic-bezier(.34, 1.56, .64, 1) .1s both; transform-origin: 50% 100%; filter: drop-shadow(0 12px 18px rgba(0,0,0,.25)); }
@keyframes cele-jump { 0% { transform: translateY(0) scale(1, 1) rotate(0); } 15% { transform: translateY(8px) scale(1.12, .88); } 45% { transform: translateY(-48px) scale(.94, 1.08) rotate(-6deg); } 70% { transform: translateY(0) scale(1.06, .94) rotate(4deg); } 85% { transform: translateY(-10px) rotate(-2deg); } 100% { transform: translateY(0) scale(1, 1) rotate(0); } }
.cele-title { margin: 6px 0 0; font-size: clamp(30px, 9vw, 40px); font-weight: 900; color: #fff; text-shadow: 0 3px 0 #C8951E, 0 6px 18px rgba(0,0,0,.3); letter-spacing: -.01em; text-align: center; padding: 0 20px; }
.cele-sub { margin: 0; font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35); text-align: center; padding: 0 24px; }
body[data-time="nuit"] .cele-title { text-shadow: 0 3px 0 #0D1820, 0 6px 18px rgba(0,0,0,.5); }

.wiggle { animation: wiggle .65s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes wiggle { 10%, 90% { transform: translateX(-1px) rotate(-.4deg); } 20%, 80% { transform: translateX(2px) rotate(.5deg); } 30%, 50%, 70% { transform: translateX(-3px) rotate(-.8deg) scale(1.02); } 40%, 60% { transform: translateX(3px) rotate(.8deg) scale(1.02); } }
.bump { display: inline-block; animation: bump .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); color: var(--accent-edge); } 100% { transform: scale(1); } }

/* Le bouton Fait s'illumine quand on appuie, et se transforme en coche. */
.btn.did { background: var(--accent); color: var(--accent-text); animation: did .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes did { 0% { transform: scale(1); } 40% { transform: scale(1.15) rotate(-3deg); } 100% { transform: scale(1); } }
.tick[aria-checked="true"]::after { animation: tick-draw .3s .05s ease-out backwards; }

/* Interrupteur natif invisible posé sur les boutons (haptique iOS 17.4 à 26.4). */
.tick, .btn, .nav button, .chips button, .icon-btn, .seg button { position: relative; }
input.hap { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; clip-path: inset(0 round 999px); touch-action: manipulation; -webkit-tap-highlight-color: transparent; z-index: 1; }

/* Barre d'état de l'iPhone : le contenu ne passe plus sous l'heure et la batterie en défilant. */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: 8;
  height: env(safe-area-inset-top, 0px); background: var(--bg); pointer-events: none;
}

/* Agenda ------------------------------------------------------------------ */
.hint { font-size: 14px; color: var(--muted); margin: 0 0 var(--s3); line-height: 1.45; }
.hint.err { color: var(--rouge); font-weight: 700; }
.item-actions .hint { margin: 0; font-size: 13px; }
.ag-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.ag-head .link { padding: 0; }
.day-head { margin: var(--s5) 0 var(--s2); color: var(--text); font-size: 13px; }
.day-head.today { color: var(--gold-text); }
.item.ev.ongoing { border-color: var(--accent); }
.item.house { border-style: dashed; }
/* Déchets : une carte comme une corvée ; ouverte, les quatre sortes dedans, séparées par un trait. */
.dech-card { display: block; padding: 0; }
.dech-card > summary { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); min-height: 64px; list-style: none; cursor: pointer; }
.dech-card > summary::-webkit-details-marker { display: none; }
.dech-card > summary > .ticon { width: 48px; height: 48px; margin: -4px 0 -4px -4px; }
.dech-card .dots { gap: 4px; padding-right: var(--s2); }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.dot-ok { background: #58C06A; } .dot-route { background: #F2C14E; } .dot-non { background: var(--rouge); }
.dot.off { opacity: .4; }
/* Bouton de descente : rouge quand c'est le moment, vert quand c'est fait, grisé quand le calendrier l'interdit. */
.dech-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; height: 40px; padding: 0 var(--s3); border-radius: 12px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.dech-btn.due { background: var(--rouge); color: #fff; border: 0; box-shadow: 0 4px 0 #A33428; }
.dech-btn.due.off { background: color-mix(in srgb, var(--rouge) 55%, var(--surface)); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, #A33428 50%, var(--surface)); }
.dech-btn.done { background: #58C06A; color: #0F3A1A; box-shadow: 0 4px 0 #2F8A42; }
.dech-btn.done.off { background: color-mix(in srgb, #58C06A 45%, var(--surface)); color: color-mix(in srgb, #0F3A1A 60%, var(--surface)); box-shadow: 0 4px 0 color-mix(in srgb, #2F8A42 40%, var(--surface)); }
.dech-btn.did { background: #58C06A; color: #0F3A1A; box-shadow: 0 4px 0 #2F8A42; }
.dech-row .item-trail { flex: none; }
.dech-btn.cycle { background: var(--surface-2); color: var(--muted); border: 2px solid var(--line); box-shadow: none; }
.groups { display: grid; gap: var(--s3); }
.dots-inline { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.dots-inline .dot { width: 8px; height: 8px; }
.dech-list { list-style: none; margin: 0; padding: 0 var(--s3) var(--s2) var(--s4); border-top: 2px solid var(--line); }
.dech-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.dech-row .item-main { flex: 1 1 0; min-width: 0; }
.dech-row .item-actions, .dech-row .picker { flex-basis: 100%; }
.dech-row.editing { display: block; }
.dech-row:first-child { border-top: 0; }
.dech-row .item-meta { display: flex; align-items: center; gap: 6px; }
.btn.wide { width: 100%; }
.shop-head { margin-top: var(--s5); }
.where { margin: var(--s3) 0 var(--s2); }
.where .chips { margin-top: var(--s1); }
/* « Je suis à… » : un seul bouton déroulant, on n'est qu'à un endroit à la fois */
.where { position: relative; }
.where-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 2px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 10px 14px; font-size: 15px; font-weight: 800; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.where-btn .where-k { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; flex: none; }
.where-btn .where-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where-btn .where-v.none { color: var(--muted); font-weight: 700; }
.where-btn .chip-ic { width: 26px; height: 26px; flex: none; margin: -4px 0; }
.where-btn.on { border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-edge); }
.where-caret { width: 10px; height: 10px; flex: none; border-right: 3px solid var(--muted); border-bottom: 3px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.where-btn[aria-expanded="true"] .where-caret { transform: translateY(2px) rotate(-135deg); }
.where-menu { margin-top: 6px; border: 2px solid var(--line); background: var(--surface-2); border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.12); overflow: hidden; animation: where-in .18s ease-out; }
@keyframes where-in { from { opacity: 0; transform: translateY(-6px); } }
.where-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 14px; color: var(--ink); }
.where-opt:first-child { border-top: 0; }
.where-opt b { display: block; font-size: 15px; font-weight: 800; }
.where-opt small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.where-opt .chip-ic { width: 28px; height: 28px; flex: none; }
.where-opt[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.where-opt[aria-selected="true"] small { color: inherit; opacity: .8; }
.where-opt.out b { color: var(--muted); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .where-menu { animation: none; } .where-caret { transition: none; } }
.shop-head .hint-inline { font-weight: 700; letter-spacing: 0; text-transform: none; opacity: .75; margin-left: 6px; }
.item-actions.shops { flex-wrap: wrap; }
.item-actions.shops .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent-edge); color: var(--accent-text); }
.pratique h3 { margin: var(--s4) 0 var(--s1); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pratique p, .pratique li { margin: 0 0 var(--s2); font-size: 15px; line-height: 1.4; }
.pratique ul.plain { list-style: none; padding: 0; margin: 0; }
.pratique .tel { color: var(--text); font-weight: 800; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; white-space: nowrap; }
.pratique .urgences { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.house-toggle { display: block; margin: var(--s3) 0 0; font-size: 14px; }
.form.add + .day-head, .btn + .day-head { margin-top: var(--s4); }

/* Recettes */
.rchips { margin: var(--s3) 0 var(--s2); }
.rcard { cursor: pointer; }
.rcard .chev { color: var(--muted); font-size: 26px; font-weight: 800; line-height: 1; padding-right: 2px; }
.link.back { display: inline-block; margin: 0 0 6px; padding: 0; font-weight: 800; color: var(--muted); }
.rdesc { margin: 0 0 var(--s3); font-size: 17px; line-height: 1.45; }
.rcta { display: grid; gap: var(--s2); margin: var(--s3) 0 var(--s2); }
.rcta .btn { width: 100%; }
h2 .muted { color: var(--muted); font-weight: 800; text-transform: none; letter-spacing: 0; }
.ring { gap: 0; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 3px 0 var(--shadow); padding: var(--s2) var(--s4); }
.ring li { display: flex; align-items: center; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.ring li:last-child { border-bottom: 0; }
.ring b { flex: none; min-width: 72px; color: var(--num); }
.ring .have { opacity: .55; text-decoration: line-through; }
.ring em { font-style: normal; font-size: 12px; color: var(--muted); text-decoration: none; display: inline-block; }
.rsteps { margin: 0; padding: 0 0 0 28px; display: grid; gap: var(--s3); font-size: 16px; line-height: 1.45; }
.rsteps li::marker { font-weight: 900; color: var(--muted); }
.rsteps.big li.now { font-weight: 800; }
.rstep { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 3px 0 var(--shadow); padding: var(--s5) var(--s4); text-align: center; margin-top: var(--s2); }
.rstep-n { width: 48px; height: 48px; margin: 0 auto var(--s3); border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-size: 22px; font-weight: 900; box-shadow: 0 3px 0 var(--accent-edge); }
.rstep-txt { margin: 0 0 var(--s3); font-size: clamp(19px, 5.5vw, 24px); line-height: 1.4; font-weight: 700; }
.rstep .dots-inline { justify-content: center; margin: 0; gap: 5px; }
.rstep .dot { background: var(--line); }
.rstep .dot.now { background: var(--accent); }
.rstep .dot.off { opacity: 1; }
.ticket-card.panier { text-align: left; max-height: 85vh; overflow: auto; }
.ticket-card.panier .ticket-title, .ticket-card.panier .ticket-sub { text-align: center; }
.persons { display: flex; align-items: center; justify-content: center; gap: var(--s3); margin: var(--s2) 0; font-size: 18px; }
.persons .btn { width: 44px; padding: 0; font-size: 22px; }
.ring.check li { padding: 6px 0; }
.ring.check .tick { flex: none; }
.rchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); padding: 0 var(--s4) 6px; }
.rchips::-webkit-scrollbar { display: none; }
.rchips button { flex: none; }

.rfilters { display: grid; gap: 2px; margin: var(--s2) 0 0; }
.rf { display: grid; grid-template-columns: 64px 1fr; align-items: center; }
.rf .chip-label { margin: 0; }
.rf .rchips { margin: 0; margin-right: calc(-1 * var(--s4)); padding: 4px var(--s4) 6px 0; }
.rcount { margin: var(--s3) 0 var(--s2); color: var(--muted); font-size: 13px; font-weight: 800; }
.rcount .link { font-size: 13px; }
.rmin { flex: none; min-width: 44px; text-align: right; font-weight: 900; color: var(--muted); font-size: 15px; }
.tbtns { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.rstep .tbtns { justify-content: center; margin: 0 0 var(--s3); }
.tbtn { font-variant-numeric: tabular-nums; }
.timers { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 6px); z-index: 30; display: grid; gap: 6px; padding: 0 var(--s4); max-width: 560px; margin: 0 auto; pointer-events: none; }
.timer { pointer-events: auto; display: flex; align-items: center; gap: var(--s2); padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--ink); color: #FAF3E8; box-shadow: 0 3px 0 var(--ink-edge); }
.timer .tl { flex: 1 1 0; min-width: 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer b { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer .link { color: #FAF3E8; font-size: 14px; }
.timer .tx { flex: none; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); color: inherit; font-weight: 900; font-size: 15px; }
.timer.ring { background: var(--accent); color: var(--accent-text); box-shadow: 0 3px 0 var(--accent-edge); animation: tring .6s ease-in-out infinite alternate; }
.timer.ring .tx { background: var(--ink); color: #FAF3E8; }
@keyframes tring { from { transform: scale(1); } to { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .timer.ring { animation: none; } }
.rsteps .tbtns .btn { height: 32px; font-size: 13px; }

.item-meta.pour { color: var(--text); opacity: .8; }
.menu .item-main { cursor: pointer; }
.menu .btn.small { flex: none; }

.rtime { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); margin: var(--s4) 0 var(--s2); }
.rtime label { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rtime output { min-width: 96px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.rtime input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; margin: 0;
  background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), var(--surface) var(--p, 0%) 100%); border: 2px solid var(--line); }
.rtime input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface-2); box-shadow: 0 3px 0 var(--accent-edge); }
.rtime input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface-2); box-shadow: 0 3px 0 var(--accent-edge); }
.rsep { flex: none; width: 2px; align-self: stretch; margin: 4px 2px; border-radius: 2px; background: var(--line); }

.rlist.rfade { animation: rfade .22s ease-out; }
@keyframes rfade { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rlist.rfade { animation: none; } }
.rcount { min-height: 20px; }

.shop-head { align-items: center; }
.shop-head .shop-ic { width: 34px; height: 34px; margin: -6px 2px -6px -4px; flex: none; }
.shop-chip { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; }
.shop-chip .chip-ic { width: 24px; height: 24px; margin: -4px 0; flex: none; }

/* Illustrations des recettes */
.rart { position: relative; flex: none; width: 60px; height: 56px; }
.rart .rhero { width: 46px; height: 46px; display: block; margin: 0 auto; }
.rart .rmini { position: absolute; bottom: 0; width: 24px; height: 24px; }
.rart .rmini:nth-child(2) { right: 0; }
.rart .rmini:nth-child(3) { left: 0; }
.menu .rart { width: 52px; height: 50px; }
.menu .rart .rhero { width: 42px; height: 42px; }
.rplate { position: relative; width: 168px; height: 168px; margin: 0 auto var(--s3); border-radius: 50%; background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--shadow); overflow: hidden; }
.rplate .rp-hero { position: absolute; left: 50%; top: 14px; width: 96px; height: 96px; transform: translateX(-50%); }
.rplate .rp-ing { position: absolute; top: 104px; width: 44px; height: 44px; }
.rplate .rp0 { left: 22px; transform: rotate(-8deg); }
.rplate .rp1 { left: 61px; top: 112px; }
.rplate .rp2 { left: 100px; transform: rotate(8deg); }
.rplate:has(.rp-ing:nth-of-type(1)):not(:has(.rp1)) .rp0 { left: 61px; }
.rplate:has(.rp1):not(:has(.rp2)) .rp0 { left: 38px; }
.rplate:has(.rp1):not(:has(.rp2)) .rp1 { left: 84px; top: 106px; }
.rplate:not(:has(.rp-ing)) .rp-hero { top: 50%; transform: translate(-50%, -50%); width: 112px; height: 112px; }
.rcta { grid-template-columns: 1fr; }
.ring .ring-ic { flex: none; width: 30px; height: 30px; margin: -4px -4px -4px -6px; }
.ring b { min-width: 64px; }
.rstep-ings { display: flex; justify-content: center; gap: 4px; margin: -6px 0 var(--s2); }
.rstep-ings .rs-ic { width: 46px; height: 46px; }
@media (prefers-reduced-motion: no-preference) {
  .rstep-ings .rs-ic { animation: rpop .35s cubic-bezier(.34, 1.4, .64, 1) both; }
  .rstep-ings .rs-ic:nth-child(2) { animation-delay: .05s; } .rstep-ings .rs-ic:nth-child(3) { animation-delay: .1s; } .rstep-ings .rs-ic:nth-child(4) { animation-delay: .15s; } .rstep-ings .rs-ic:nth-child(5) { animation-delay: .2s; }
}
@keyframes rpop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.empty-art { text-align: center; padding: var(--s3) 0 var(--s2); }
.empty-art img { width: 120px; height: 120px; display: block; margin: 0 auto -6px; }
.empty-art .empty { padding-top: var(--s2); }

button.dech-btn.cycle { border: 0; font: inherit; cursor: pointer; }
.seq-adjust { flex-direction: column; align-items: stretch; }
.seq-adjust .chips { justify-content: center; margin: 0; }
.seq-adjust .hint { text-align: center; margin: 6px 0 0; }

/* Frais : à finir vite */
.fresh-card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); box-shadow: 0 3px 0 var(--shadow); padding: var(--s2) var(--s3) var(--s3); }
.fresh-list { list-style: none; margin: 0; padding: 0; }
.fresh-item { display: flex; align-items: center; gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--line); }
.fresh-item:last-child { border-bottom: 0; }
.fresh-item .fresh-ic { width: 40px; height: 40px; flex: none; }
.fresh-item .item-title { font-size: 16px; }
.fresh-item.urgent .item-meta { color: var(--gold-text, var(--text)); font-weight: 800; }
.fresh-item.late .item-meta { color: var(--rouge); font-weight: 800; }
.fresh-item .btn.small { flex: none; }
.fresh-ideas { margin: var(--s3) 0 var(--s2); }
.fresh-card .rlist .rcard { box-shadow: none; }
.fresh-fold { margin-top: var(--s2); }
.fresh-fold .fresh-list { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 0 var(--s3); margin-top: var(--s2); }

.fresh-date { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.fresh-date .item-meta { margin: 0; min-width: 0; }
.fd-btn { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 900; font-size: 15px; line-height: 1; display: grid; place-items: center; padding: 0; }
.fresh-ok { width: 40px; padding: 0; font-size: 18px; }
.fresh-date .item-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vege-toggle { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 var(--s3); padding: 10px 14px; border-radius: var(--r-in); border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 800; text-align: left; }
.vege-toggle .vt-dot { flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.vege-toggle .vt-dot::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.vege-toggle[aria-pressed="true"] .vt-dot { background: #58C06A; }
.vege-toggle[aria-pressed="true"] .vt-dot::after { transform: translateX(16px); }

/* Étapes : quantités, lexique, ingrédients de l'étape */
.sq { color: var(--num); font-weight: 900; white-space: nowrap; }
.gl { border: 0; padding: 0; margin: 0; background: none; font: inherit; color: inherit; text-decoration: underline dotted 2px; text-underline-offset: 4px; text-decoration-color: var(--accent-edge, #C8951E); cursor: help; }
.step-need { list-style: none; margin: 0 0 var(--s3); padding: var(--s2) var(--s3); background: var(--surface-2); border-radius: var(--r-in); display: grid; gap: 4px; text-align: left; font-size: 15px; }
.step-need li { display: flex; align-items: center; gap: 8px; }
.step-need .sn-ic { width: 28px; height: 28px; flex: none; }
.step-need b { min-width: 56px; color: var(--num); }
.gloss-card { text-align: left; }
.gloss-card .ticket-title { text-align: left; }
.gloss-txt { font-size: 17px; line-height: 1.5; margin: var(--s2) 0 0; }
.unit-hint { margin: -6px 0 var(--s2); font-size: 13px; }
/* Matériel */
.gear-box { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-in); }
.gear-box .chip-label { margin: 2px 0 6px; }
.gear-row { display: flex; align-items: center; gap: var(--s2); padding: 6px 0; flex-wrap: wrap; }
.gear-row .gear-name { flex: 1 1 140px; font-weight: 800; }
.gear-row.no .gear-name { color: var(--rouge); }
.gear-row.ok .gear-name { color: var(--muted); }
.gear-st { font-size: 13px; color: var(--muted); font-weight: 800; }

/* Filtres recettes : grille régulière, colonnes égales alignées sur les bords de la page */
.rgroup { margin: var(--s2) 0 0; }
.rgroup .chip-label { margin: 0 0 6px; }
.rg-hint { text-transform: none; letter-spacing: 0; font-weight: 700; opacity: .75; margin-left: 4px; }
.rgroup .rchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; margin: 0; padding: 0; }
.rgroup .rchips.r4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rgroup .rchips button { width: 100%; min-width: 0; min-height: 40px; padding: 6px 2px; font-size: clamp(12px, 3.7vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.rgroup + .rcount { margin-top: var(--s2); }

/* Annuler la dernière action, en haut à droite */
#undo { position: fixed; z-index: 10000; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; max-width: min(70vw, 280px); border: 2px solid var(--accent-edge, #C8951E); border-radius: 14px; background: var(--accent); color: var(--accent-text);
  box-shadow: 0 3px 0 var(--accent-edge, #C8951E), 0 8px 20px rgba(0,0,0,.18); font: inherit; text-align: left; cursor: pointer;
  opacity: 0; transform: translateY(-16px) scale(.9); pointer-events: none; transition: opacity .2s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
#undo.on { opacity: 1; transform: none; pointer-events: auto; }
#undo:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-edge, #C8951E); }
#undo .undo-ic { font-size: 22px; font-weight: 900; line-height: 1; }
#undo .undo-txt { display: grid; line-height: 1.15; min-width: 0; }
#undo b { font-size: 15px; font-weight: 900; }
#undo small { font-size: 12px; font-weight: 700; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { #undo { transition: opacity .2s; transform: none; } }
.dech-btn.cycle .cyc-k { display: block; font-size: 10px; line-height: 1; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; opacity: .75; margin-bottom: 1px; }
.dech-btn.cycle { flex-direction: column; line-height: 1.1; }

/* Mode calme : une chose à la fois */
.calm { margin: var(--s3) 0; padding: var(--s4); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r, 18px); box-shadow: 0 4px 0 var(--line); }
.calm-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.calm-kicker { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.calm-done { margin: 0; font-size: 13px; color: var(--muted); font-weight: 800; }
.calm-done b { color: var(--num); }
.calm-title { margin: 4px 0 2px; font-size: 26px; line-height: 1.15; }
.calm-sub { margin: 0 0 var(--s3); font-size: 16px; line-height: 1.45; }
.calm .chip-label { margin: var(--s3) 0 6px; }
.calm-item { display: flex; align-items: center; gap: var(--s2); padding: 8px 0; flex-wrap: wrap; }
.calm-item + .calm-item { border-top: 1px solid var(--line); }
.calm-item .item-main { flex: 1 1 140px; min-width: 0; }
.calm-item.big { padding: var(--s3); background: var(--surface-2); border-radius: var(--r-in); border: 2px solid var(--accent); }
.calm-item.big .item-title { font-size: 20px; }
.calm-item.big .icon-btn, .calm-item.big .icon-btn img { width: 56px; height: 56px; }
.calm-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--line); font-weight: 800; font-size: 12px; color: var(--ink, inherit); }
.calm-item.p-vital .calm-tag { background: var(--rouge); color: #fff; }
.calm-item.p-important .calm-tag { background: var(--accent); color: var(--accent-text); }
.calm-actions { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s2); }
.calm-actions .btn { flex: 1 1 140px; }
.calm-do { white-space: nowrap; }
.calm-item:not(.big) .calm-do { padding: 6px 12px; min-height: 38px; font-size: 14px; }
.calm-rest { margin-top: var(--s3); }
.calm-rest summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 6px 0; }
.calm-rest .btn { margin-top: var(--s2); }
.calm-goal { margin: var(--s3) 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.calm-bar { display: block; height: 8px; margin-top: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line) var(--p)); }
.calm-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.calm-link { margin: var(--s2) 0 0; text-align: center; }
.calm-link .link { font-size: 14px; color: var(--muted); }
.help-card { margin: var(--s3) 0; padding: var(--s3) var(--s4); background: var(--surface-2); border: 2px solid var(--accent); border-radius: var(--r, 18px); box-shadow: 0 4px 0 var(--accent-edge, #C8951E); }
.help-card.answer { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); border-color: var(--line); box-shadow: 0 3px 0 var(--line); }
.help-card.answer p { margin: 0; }
.help-what { margin: 4px 0 0; font-size: 20px; font-weight: 900; }
.help-ask { margin: 2px 0 0; }
.help-opts { display: grid; gap: var(--s2); margin: var(--s3) 0 var(--s2); }
.help-sheet .ticket-sub { text-align: center; }
.calm-title { text-transform: none; letter-spacing: 0; color: var(--num); font-weight: 900; }

/* Déplacer en appuyant longtemps */
[data-sort] > [data-sid] { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
[data-sort].sorting > [data-sid] { transition: none; }
[data-sort] > .dragging { position: relative; z-index: 5; box-shadow: 0 12px 28px rgba(0,0,0,.25), 0 0 0 3px var(--accent); transform-origin: center; scale: 1.03; opacity: .96; cursor: grabbing; }
body.no-scroll { overflow: hidden; touch-action: none; overscroll-behavior: none; }
.sort-hint { margin: 6px 0 0; font-size: 12px; text-align: center; opacity: .75; }

/* Guide : bouton « ? » discret, bulle de première visite, visite d'accueil */
.hd { position: relative; }
.guide-q { position: absolute; top: 4px; right: 0; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 900; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; opacity: .85; }
.guide-q:active { transform: scale(.92); }
.guide-hint { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin: 0 0 var(--s3); padding: 10px 12px; border-radius: var(--r-in); background: var(--surface); border: 2px dashed var(--line); font-size: 14px; }
.guide-hint span { flex: 1 1 180px; }
.guide-card { text-align: left; max-height: 85vh; overflow: auto; }
.guide-card .ticket-title { text-align: left; }
.guide-list { margin: var(--s2) 0 var(--s3); }
.guide-list dt { font-weight: 900; margin-top: var(--s3); }
.guide-list dd { margin: 2px 0 0; line-height: 1.45; }
#tour { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: end center; padding: 12px; background: rgba(20, 30, 40, .55); opacity: 0; transition: opacity .25s; }
#tour.on { opacity: 1; }
.tour-card { width: min(520px, 100%); max-height: calc(100vh - 24px); overflow: auto; background: var(--surface-2); color: var(--text, inherit); border-radius: 22px; padding: 18px 18px calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -6px 30px rgba(0,0,0,.25); transform: translateY(20px); transition: transform .3s cubic-bezier(.34, 1.4, .64, 1); text-align: center; }
#tour.on .tour-card { transform: none; }
.tour-azami { width: 130px; height: 130px; object-fit: contain; display: block; margin: -6px auto 0; }
.tour-step { margin: 0; font-size: 12px; font-weight: 900; letter-spacing: .08em; color: var(--muted); }
.tour-title { margin: 4px 0 8px; font-size: 22px; text-transform: none; letter-spacing: 0; color: var(--num); }
.tour-points { text-align: left; margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; line-height: 1.45; }
.tour-actions { display: flex; gap: var(--s2); justify-content: space-between; align-items: center; margin-top: 8px; }
.tour-actions .btn { flex: 1; }
.tour-actions .link { flex: 1; }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots span.on { background: var(--accent); width: 18px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { #tour, .tour-card { transition: none; } }

/* Courses à deux */
.duo { display: flex; gap: 10px; align-items: flex-start; margin: var(--s2) 0; padding: 10px 12px; border-radius: var(--r-in); background: var(--surface); border: 2px solid var(--accent); }
.duo p { margin: 0; font-size: 14px; line-height: 1.4; }
.duo-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #4CB860; box-shadow: 0 0 0 4px rgba(76,184,96,.25); animation: duo 1.6s ease-in-out infinite; }
@keyframes duo { 50% { box-shadow: 0 0 0 7px rgba(76,184,96,.08); } }
@media (prefers-reduced-motion: reduce) { .duo-dot { animation: none; } }
.other-cart .item { opacity: .8; }

/* Rayons et menu incomplet */
.shop h3.aisle { margin: var(--s3) 0 6px; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-miss { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: var(--s2) 0; padding: 8px 12px; border-radius: var(--r-in); background: var(--surface); border-left: 4px solid var(--accent); font-size: 14px; }
.menu-miss em { font-style: normal; color: var(--muted); font-weight: 800; }
.menu-need { margin-top: 3px; font-size: 13px; font-weight: 800; color: var(--rouge); line-height: 1.35; }
.menu-ok { margin-top: 3px; font-size: 13px; font-weight: 800; color: #3E9B52; }
.menu .item.missing { box-shadow: inset 4px 0 0 var(--rouge), 0 4px 0 var(--line); }
.ticket-miss { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: #FFF1E0; color: #8A4B12; font-weight: 800; font-size: 14px; text-align: left; }

/* Visite d'Azami ------------------------------------------------------------------------------ */
/* L'invitation : Azami surgit en bas à droite et fait coucou, une bulle jaune « Psst… ». */
#visite-invite { all: unset; position: fixed; right: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); z-index: 60; cursor: pointer;
  display: flex; align-items: flex-end; flex-direction: row-reverse; gap: 0; transform: translateX(130%); transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
#visite-invite.on { transform: none; }
#visite-invite img { width: 104px; height: 104px; display: block; filter: drop-shadow(0 4px 0 rgba(0,0,0,.12)); }
.vi-bubble { display: grid; gap: 1px; margin: 0 -14px 46px 0; padding: 9px 14px 10px; border-radius: 18px 18px 4px 18px; max-width: 190px;
  background: #F7C948; color: #2A1C15; border: 2px solid #C8951E; box-shadow: 0 4px 0 #C8951E; animation: vi-bounce 1.6s ease-in-out infinite; }
.vi-bubble b { font-size: 15px; font-weight: 900; }
.vi-bubble span { font-size: 13px; font-weight: 700; color: rgba(42, 28, 21, .75); }
#visite-invite.rare .vi-bubble { background: linear-gradient(135deg, #FFE8A3, #F7C948 45%, #FFF3C9 70%, #E9B43A); }
@keyframes vi-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Le dialogue : grande carte en bas, bulles de conversation, deux choix. */
#visite { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 30, 40, 0); transition: background .3s; }
#visite.on { background: rgba(20, 30, 40, .55); }
.visite-card { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - var(--safe-t) - 12px); max-height: calc(100dvh - var(--safe-t) - 12px); min-height: 0; display: flex; flex-direction: column;
  background: var(--surface-2); color: var(--text); border: 2px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 14px 16px calc(16px + var(--safe-b)); transform: translateY(100%); transition: transform .45s cubic-bezier(.34, 1.3, .64, 1); }
#visite.on .visite-card { transform: none; }
.visite-card.rare { background: linear-gradient(180deg, #FFF6D8, var(--surface-2) 45%); border-color: #E9B43A; }
.visite-kind { margin: 0; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.visite-card.rare .visite-kind { color: #A8770F; }
.visite-x { all: unset; cursor: pointer; position: absolute; top: 6px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--muted); }
.visite-azami { display: block; width: 180px; height: 180px; margin: -6px auto -10px; object-fit: contain; flex: none; transition: width .3s, height .3s; }
.visite-card.long .visite-azami { width: 120px; height: 120px; }
.visite-talk { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding: 6px 2px 10px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bubble { margin: 0; max-width: 88%; padding: 11px 14px; font-size: 17px; line-height: 1.38; font-weight: 700; border-radius: 20px; }
.bubble.az { align-self: flex-start; background: #F7C948; color: #2A1C15; border-bottom-left-radius: 6px; box-shadow: 0 3px 0 #C8951E; }
.visite-card.rare .bubble.az { background: linear-gradient(135deg, #FFE8A3, #F7C948); }
.bubble.me { align-self: flex-end; background: var(--surface); color: var(--text); border: 2px solid var(--line); border-bottom-right-radius: 6px; animation: pop-in .3s ease both; }
.visite-foot { flex: none; }
.visite-choices { display: grid; gap: 8px; margin-top: 10px; }
.visite-choices .btn { width: 100%; margin: 0; animation: pop-in .35s cubic-bezier(.34, 1.56, .64, 1) both; }
.visite-choices .btn:nth-child(2) { animation-delay: .08s; }
.visite-step { margin: 8px 0 0; text-align: center; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bubble.me.ok { border-color: #4CAF6A; } .bubble.me.ko { border-color: #E06A5A; }
.carnet-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.carnet-kinds span { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); }
.carnet-kinds span.rare { border-color: #E9B43A; }
.visite-note { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.visite-note b { color: var(--text); }

/* Le carnet dans Care. */
.carnet-bar { height: 10px; border-radius: 10px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; margin: 4px 0 8px; }
.carnet-bar span { display: block; height: 100%; width: var(--p); background: #F7C948; }
.carnet { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.carnet-item { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); }
.carnet-item.rare { border-color: #E9B43A; background: linear-gradient(135deg, #FFF3C9, var(--surface)); color: #2A1C15; }
.carnet-kind { font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.carnet-txt { font-size: 15px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .vi-bubble, .bubble.me, .visite-choices .btn { animation: none; } }

/* Azami boude : elle a quitté l'écran (en-têtes et invitation), elle revient en trottinant. */
body.azami-away .azami-btn img.azami, body.azami-away #visite-invite { opacity: 0 !important; pointer-events: none; transition: none; }
body.azami-away .azami-btn { cursor: default; }
.visite-azami { cursor: pointer; }

/* Griffures d'Azami sur l'« écran » : rayures claires sur le verre, tracées d'un coup, puis elles restent. */
#griffures { position: fixed; inset: 0; z-index: 95; pointer-events: none; }
#griffures svg { position: absolute; inset: 0; overflow: visible; }
#griffures path { fill: none; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: griffe .18s cubic-bezier(.2, .8, .3, 1) forwards; animation-delay: var(--d, 0s); }
#griffures .g-shadow { stroke: rgba(20, 20, 30, .28); stroke-width: 7; transform: translate(1.5px, 2px); }
#griffures .g-cut { stroke: rgba(255, 255, 255, .62); stroke-width: 4.5; }
#griffures .g-shine { stroke: rgba(255, 255, 255, .95); stroke-width: 1.4; }
#griffures g { animation: griffe-tremble .25s ease-out; animation-delay: var(--d, 0s); }
@keyframes griffe { to { stroke-dashoffset: 0; } }
@keyframes griffe-tremble { 0% { opacity: .2; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #griffures path { animation: none; stroke-dashoffset: 0; } }

/* Gestes : glisser de côté (étapes, onglets, articles, notifications) */
.slide-r { animation: slide-r .28s cubic-bezier(.2,.8,.3,1); }
.slide-l { animation: slide-l .28s cubic-bezier(.2,.8,.3,1); }
@keyframes slide-r { from { transform: translateX(46px); opacity: .3; } }
@keyframes slide-l { from { transform: translateX(-46px); opacity: .3; } }
li.item.swipe-ok { background: var(--accent); }
.bump { animation: bump .35s ease-out; }
@keyframes bump { 30% { transform: scale(1.06); } 60% { transform: scale(.98); } }
.mtab { touch-action: pan-y; }
.rstep { touch-action: pan-y; }
@media (prefers-reduced-motion: reduce) { .slide-r, .slide-l, .bump { animation: none; } }

/* Notre carnet d'Azami : un album de cartes à collectionner, à deux. */
.carnet-box { margin-top: var(--s5); background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 14px 14px 16px; box-shadow: 0 4px 0 var(--line); }
.carnet-head { display: flex; align-items: center; gap: 10px; }
.carnet-az { width: 74px; height: 74px; flex: none; margin: -10px -4px -6px -8px; }
.carnet-title { flex: 1; min-width: 0; }
.carnet-title h2 { margin: 0 0 2px; font-size: 19px; }
.carnet-title p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.carnet-title b { color: var(--ink); }
.carnet-ring { --p: 0; width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#F7C948 calc(var(--p) * 1%), var(--line) 0); }
.carnet-ring span { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 900; font-size: 15px; color: var(--ink); }
.carnet-ring span { white-space: nowrap; display: flex; align-items: baseline; justify-content: center; }
.carnet-ring small { font-size: 10px; }
.carnet-goal { margin: 12px 0 4px; }
.carnet-goal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.carnet-goal-top b { color: var(--ink); }
.carnet-box .carnet-bar { height: 12px; margin: 6px 0; }
.carnet-box .carnet-bar span { border-radius: 10px; transition: width .6s cubic-bezier(.2,.8,.3,1); }
.carnet-goal-sub { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.4; }
.carnet-stickers { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 6px; margin: 4px -2px 0; scrollbar-width: none; }
.carnet-stickers::-webkit-scrollbar { display: none; }
.sticker { all: unset; cursor: pointer; flex: none; width: 66px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.sticker-face { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--line); color: var(--muted); font-size: 13px; background: var(--surface-2); }
.sticker-face svg { width: 26px; height: 26px; }
.sticker.on .sticker-face { border: 3px solid #2A1C15; background: radial-gradient(circle at 35% 30%, #FFF3C9, #F7C948); box-shadow: 0 3px 0 #C99A1E; animation: sticker-in .5s cubic-bezier(.2,1.6,.4,1) both; }
.sticker-name { font-size: 10.5px; font-weight: 800; line-height: 1.15; color: var(--muted); }
.sticker.on .sticker-name { color: var(--ink); }
@keyframes sticker-in { from { transform: scale(.4) rotate(-20deg); } }
.carnet-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 8px; margin: 2px -2px 4px; scrollbar-width: none; }
.carnet-tabs::-webkit-scrollbar { display: none; }
.carnet-tabs button { all: unset; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; padding: 6px 10px 6px 8px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); color: var(--ink); }
.carnet-tabs button b { font-weight: 700; color: var(--muted); font-size: 12px; }
.carnet-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 2px 0 var(--accent-edge); }
.carnet-tabs button[aria-pressed="true"] b { color: inherit; opacity: .8; }
.carnet-tabs button.rare { border-color: #E9B43A; }
.kbadge { --k: #ccc; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--k); border: 2.5px solid #2A1C15; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(42,28,21,.35); }
.kbadge svg { width: 21px; height: 21px; }
.kbadge.sm { width: 22px; height: 22px; border-width: 2px; box-shadow: none; }
.kbadge.sm svg { width: 14px; height: 14px; }
.carnet-grid { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.carnet-grid li { animation: ccard-in .35s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(min(var(--i), 10) * 35ms); }
@keyframes ccard-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.ccard { all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 100%; height: 100%; min-height: 132px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--k) 34%, #FFFFFF), #FFFFFF 70%); border: 2.5px solid #2A1C15; box-shadow: 0 4px 0 #2A1C15; color: #2A1C15; transition: transform .12s; }
.ccard:active { transform: translateY(3px); box-shadow: 0 1px 0 #2A1C15; }
.ccard-txt { font-size: 13.5px; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-meta { margin-top: auto; font-size: 11px; font-weight: 700; color: #6B5A4E; }
.ccard-new { position: absolute; top: -9px; right: 10px; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; background: #E7776B; color: #fff; padding: 3px 7px; border-radius: 999px; border: 2px solid #2A1C15; }
.ccard.rare { background: linear-gradient(150deg, #FFF3C9, #F7D774 45%, #FFF8E0); }
.ccard.rare::after { content: ''; position: absolute; inset: 0; border-radius: 13px; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.75) 45%, transparent 60%); background-size: 250% 100%; animation: shine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0%, 55% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.ccard.locked { align-items: center; justify-content: center; text-align: center; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px); border: 2.5px dashed var(--line); box-shadow: none; color: var(--muted); }
.ccard.locked .ccard-txt { font-size: 12px; font-weight: 800; }
.ccard-q { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 900; background: var(--surface); border: 2px dashed var(--line); }
.wiggle { animation: wiggle .4s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-4deg); } 50% { transform: rotate(3deg); } 75% { transform: rotate(-2deg); } }
.carnet-more { display: block; margin: 12px auto 0; }
.carnet-left { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.visite-note { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.visite-palier { margin: 6px 0 0; text-align: center; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: #FFF3C9; color: #2A1C15; border: 2px solid #E9B43A; animation: sticker-in .5s cubic-bezier(.2,1.6,.4,1) both; }
@media (prefers-reduced-motion: reduce) { .carnet-grid li, .sticker.on .sticker-face, .ccard.rare::after, .wiggle, .visite-palier { animation: none; } }

.carnet-title h2 { text-transform: none; letter-spacing: 0; }
.carnet-energy { display: flex; gap: 10px; align-items: center; margin: 10px 0 2px; padding: 9px 11px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); }
.carnet-energy p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.carnet-energy b { color: var(--ink); }
.ce-paws { display: flex; gap: 2px; flex: none; }
.ce-paws svg { width: 19px; height: 19px; fill: var(--line); }
.ce-paws svg.on { fill: #F48FA0; stroke: #2A1C15; stroke-width: 1.4; }

/* Gacha : la capsule de fin de visite */
.gacha { position: relative; display: grid; justify-items: center; gap: 6px; padding: 16px 0 2px; }
.gacha-cap { all: unset; cursor: pointer; position: relative; width: 92px; height: 92px; animation: cap-drop .6s cubic-bezier(.3,1.4,.5,1) both, cap-wiggle 1.4s ease-in-out .9s infinite; -webkit-tap-highlight-color: transparent; }
.cap-top, .cap-bot { position: absolute; left: 0; width: 92px; height: 46px; box-sizing: border-box; border: 3px solid #2A1C15; transition: transform .45s cubic-bezier(.2,1.3,.4,1), opacity .45s; }
.cap-top { top: 0; border-radius: 46px 46px 0 0; background: radial-gradient(circle at 30% 35%, rgba(255,255,255,.85) 0 10%, transparent 11%), color-mix(in srgb, var(--k) 70%, #FFFFFF); border-bottom-width: 1.5px; }
.cap-bot { bottom: 0; border-radius: 0 0 46px 46px; background: #FFFFFF; border-top-width: 1.5px; }
.cap-shine { position: absolute; inset: -10px; border-radius: 50%; pointer-events: none; }
.gacha.r2 .cap-shine { box-shadow: 0 0 18px 4px color-mix(in srgb, var(--k) 60%, transparent); animation: glow 1.6s ease-in-out infinite; }
.gacha.r3 .cap-top { background: radial-gradient(circle at 30% 35%, rgba(255,255,255,.9) 0 10%, transparent 11%), linear-gradient(135deg, #FFE27A, #E9B43A 60%, #FFF3C9); }
.gacha.r3 .cap-shine { box-shadow: 0 0 26px 8px rgba(247,201,72,.75); animation: glow 1s ease-in-out infinite; }
.gacha-hint { margin: 0; font-size: 13px; text-align: center; color: var(--muted); }
.gacha-hint b { color: var(--ink); }
.gacha.open .gacha-cap { animation: none; pointer-events: none; }
.gacha.open .cap-top { transform: translate(-26px, -30px) rotate(-38deg); opacity: 0; }
.gacha.open .cap-bot { transform: translate(24px, 26px) rotate(30deg); opacity: 0; }
.gacha.open .gacha-hint, .gacha.open .cap-shine { display: none; }
.gacha.open .gacha-cap { height: 0; transition: height .3s .2s; }
.gacha-card { --k: #ccc; width: min(260px, 82%); display: grid; justify-items: center; gap: 6px; text-align: center; padding: 14px 14px 12px; border-radius: 18px; border: 3px solid #2A1C15; box-shadow: 0 5px 0 #2A1C15; color: #2A1C15;
  background: linear-gradient(160deg, color-mix(in srgb, var(--k) 40%, #FFFFFF), #FFFFFF 75%); animation: card-pop .55s cubic-bezier(.2,1.5,.4,1) both; }
.gacha.r3 .gacha-card { background: linear-gradient(150deg, #FFF3C9, #F7D774 45%, #FFF8E0); }
.gacha-stars { font-size: 18px; letter-spacing: 2px; color: #E9A21A; text-shadow: 0 1px 0 #2A1C15; display: grid; justify-items: center; line-height: 1; }
.gacha-stars small { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #6B5A4E; text-shadow: none; font-weight: 900; margin-top: 3px; }
.gacha-kind { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.gacha-txt { font-size: 14px; font-weight: 800; line-height: 1.3; }
.gacha-count { font-size: 11.5px; font-weight: 800; color: #6B5A4E; }
@keyframes cap-drop { from { transform: translateY(-120px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes cap-wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-9deg); } 84% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
@keyframes glow { 50% { opacity: .45; } }
@keyframes card-pop { from { transform: scale(.3) rotateY(90deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gacha-cap, .gacha-card, .cap-shine { animation: none !important; } }

.push-card .push-steps { margin: 6px 0 4px; padding-left: 20px; font-size: 14px; line-height: 1.45; }
.push-card .push-later { display: block; margin: 8px 0 0 auto; font-size: 13px; }

/* « On mange quoi ce soir ? » */
.roulette-btn { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: flex; align-items: center; gap: 10px; margin: var(--s3) 0 var(--s2); padding: 8px 14px 8px 6px; border-radius: 18px; background: var(--surface-2); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); color: var(--ink); }
.roulette-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.roulette-btn img { width: 64px; height: 64px; flex: none; margin: -8px -4px -8px -4px; }
.roulette-btn span:not(.roulette-cap) { flex: 1; display: grid; gap: 1px; }
.roulette-btn b { font-size: 16px; }
.roulette-btn small { font-size: 12.5px; color: var(--muted); }
.roulette-cap { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2.5px solid #2A1C15; background: linear-gradient(180deg, #8CCB7E 50%, #FFFFFF 50%); box-shadow: inset 0 -1px 0 #2A1C15; animation: cap-wiggle 2.4s ease-in-out infinite; }
.roulette .roulette-stage { min-height: 150px; }
.roulette-card .rart { margin: 0 auto 4px; }
.roulette-why { font-size: 12px; font-weight: 800; color: #3F7A36; background: #E6F4E0; border-radius: 999px; padding: 3px 9px; }
.roulette-actions { justify-content: center; margin-top: 10px; }
.roulette .link { display: block; margin: 8px auto 0; }

/* Récap du dimanche */
.recap-card { position: relative; margin: var(--s3) 0; padding: 14px 14px 14px 96px; border-radius: 20px; border: 2.5px solid #2A1C15; box-shadow: 0 4px 0 #2A1C15; color: #2A1C15; background: linear-gradient(150deg, #FFF3C9, #F7D774 55%, #FFF8E0); min-height: 110px; }
.recap-card img { position: absolute; left: -4px; top: 50%; width: 104px; height: 104px; transform: translateY(-50%); }
.recap-card .calm-kicker { color: #6B5A4E; margin: 0; }
.recap-big { margin: 2px 0 6px; font-size: 17px; font-weight: 800; }
.recap-big b { font-size: 26px; }
.recap-parts { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.recap-parts li { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.7); border-radius: 999px; padding: 2px 8px; }
.recap-mot { margin: 0 0 8px; font-size: 13px; font-style: italic; }

/* Loisirs : sommaire et mot qui attend ------------------------------------------------------------ */
.mot-attend { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 0 0 var(--s3); border-radius: 16px; border: 2px solid var(--accent-edge); background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 800; text-align: left; box-shadow: 0 4px 0 var(--accent-edge); cursor: pointer; }
.mot-attend span { flex: 1; }
.mot-attend b { font-size: 22px; }
.mots { margin-top: var(--s5); scroll-margin-top: 16px; }
.cine, .carnet-box { scroll-margin-top: 16px; }
.h2-ic { width: 30px; height: 30px; vertical-align: -8px; margin-right: 2px; }

/* Ciné à deux ------------------------------------------------------------------------------------ */
.cine { background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 14px 14px 16px; box-shadow: 0 4px 0 var(--line); }
.cine h2 { margin-top: 0; }
.cine-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.cine-cta .btn { padding: 0 10px; font-size: 15px; }
.cine-add { position: relative; }
.cine-add .field { width: 100%; }
.cine-res { margin-top: 6px; }
.cine-res .hint { margin: 8px 2px; }
.cine-found { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 340px; overflow: auto; }
.cine-found button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.cine-found button:disabled { opacity: .5; }
.cine-found b { display: block; font-weight: 800; }
.cine-found small { color: var(--muted); }
.sposter { width: 40px; height: 60px; border-radius: 6px; object-fit: cover; flex: none; }
.noposter { display: grid; place-items: center; background: linear-gradient(160deg, #3a2a40, #1c1420); font-size: 22px; }
.cine-tabs { margin: 14px 0 10px; }
.cine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fcard { display: flex; gap: 12px; padding: 8px; border-radius: 16px; background: var(--surface-2); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); cursor: pointer; color: var(--text); }
.fposter { width: 64px; height: 96px; border-radius: 10px; object-fit: cover; flex: none; border: 2px solid var(--ink); }
.fbody { min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.ftitle { font-weight: 900; font-size: 16px; line-height: 1.2; }
.fmeta, .fprov { font-size: 13px; color: var(--muted); }
.fprov { font-weight: 700; }
.fbadge { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #FFE3E6; color: #8E1E2A; border: 1.5px solid #E7505A; }
.fbadge.match { background: #E7505A; color: #fff; }
.fprog { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.frates { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.frate { color: #C23848; font-weight: 800; }
.cine-empty { margin: 8px 2px; }
.cine-ideas { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.idea { position: relative; flex: none; width: 92px; display: grid; gap: 4px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; scroll-snap-align: start; }
.idea span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.iposter { width: 92px; height: 138px; border-radius: 10px; object-fit: cover; border: 2px solid var(--ink); }
.idea b { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); border: 2px solid var(--ink); display: grid; place-items: center; font-size: 17px; line-height: 1; }
.gouts { margin-top: var(--s3); }
.gout-k { font-size: 13px; font-weight: 800; margin: 10px 0 4px; }
.gout-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gout { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; }
.gout small { color: var(--muted); font-weight: 600; }
.gout button { border: 0; background: none; color: var(--muted); font-size: 16px; padding: 0 0 0 2px; cursor: pointer; }
.gout-add { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.gout-add select { width: auto; flex: none; max-width: 42%; }
.gout-add input { flex: 1; min-width: 0; }

/* Fiche d'un film */
.fsheet { text-align: left; max-height: 88vh; overflow: auto; }
.fsheet-top { display: flex; gap: 14px; align-items: flex-start; }
.fsheet-top .ticket-title, .fsheet-top .ticket-sub { text-align: left; margin: 0 0 4px; }
.bposter { width: 104px; height: 156px; border-radius: 12px; object-fit: cover; flex: none; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.fsyn { line-height: 1.5; margin: 12px 0; }
.fprovs { display: flex; flex-wrap: wrap; gap: 6px; }
.fp { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; }
.fp img { width: 24px; height: 24px; border-radius: 6px; }
.fp small { color: var(--muted); }
.frates-big { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.frates-big li { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; border: 1.5px solid var(--line); }
.hearts { color: #E7505A; letter-spacing: 2px; }
.fsheet-acts { flex-wrap: wrap; }
.fheart[aria-pressed="true"] { color: #C23848; border-color: #E7505A; }
.hearts-pick { display: flex; justify-content: center; gap: 6px; margin: 12px 0; }
.hearts-pick button { font-size: 38px; line-height: 1; border: 0; background: none; color: #E7505A; cursor: pointer; padding: 2px; transition: transform .15s; }
.hearts-pick button[aria-pressed="true"] { transform: scale(1.08); }
.rposter { width: 110px; height: 165px; border-radius: 12px; object-fit: cover; border: 3px solid #2A1C15; }
.cine-pick .fprov { color: #2A1C15; }

/* Match à deux */
#deck { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 10px) 16px calc(var(--safe-b) + 14px); background: radial-gradient(120% 80% at 50% 0%, #4A2230, #1A1016 70%); color: #FAF3E8; opacity: 0; transition: opacity .25s; }
#deck.on { opacity: 1; }
.deck-top { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.deck-top .link { color: #FAF3E8; }
.deck-moods { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.deck-moods button { flex: none; padding: 6px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #FAF3E8; font: inherit; font-weight: 800; font-size: 13px; }
.deck-moods button[aria-pressed="true"] { background: #E7505A; border-color: #E7505A; }
.deck-stack { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.deck-stack .hint { color: #E0CFB8; text-align: center; max-width: 280px; }
.dcard { position: absolute; inset: 4px 0; max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #2A1C15; border: 3px solid #FAF3E8; box-shadow: 0 10px 30px rgba(0,0,0,.45); touch-action: pan-y; user-select: none; transition: transform .25s; }
.dcard.next { transform: scale(.94) translateY(10px); opacity: .7; }
.dposter { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dposter.noposter { font-size: 64px; }
.dinfo { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; background: linear-gradient(transparent, rgba(10,6,8,.92) 45%); display: grid; gap: 4px; }
.dinfo b { font-size: 22px; font-weight: 900; }
.dinfo span { font-size: 14px; color: #E0CFB8; }
.dinfo p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dstamp { position: absolute; top: 22px; padding: 4px 12px; border: 4px solid; border-radius: 10px; font-weight: 900; font-size: 26px; letter-spacing: .08em; opacity: 0; transition: opacity .15s; }
.dstamp.oui { left: 18px; color: #6FDB8B; transform: rotate(-12deg); }
.dstamp.non { right: 18px; color: #FF7A85; transform: rotate(12deg); }
.dcard.lean-oui .dstamp.oui, .dcard.lean-non .dstamp.non { opacity: 1; }
.deck-btns { display: flex; justify-content: center; gap: 28px; margin-top: 14px; }
.deck-btns button { width: 66px; height: 66px; border-radius: 50%; font-size: 30px; font-weight: 900; border: 3px solid #FAF3E8; cursor: pointer; }
.deck-no { background: #2A1C15; color: #FF7A85; }
.deck-yes { background: #E7505A; color: #fff; }
.deck-hint { text-align: center; font-size: 13px; color: #E0CFB8; margin: 10px 0 0; }
.fmatch { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(20,8,12,.7); animation: fadein .25s; }
.fmatch-card { width: min(320px, 86%); text-align: center; padding: 18px; border-radius: 22px; background: #FFF4EC; color: #2A1C15; border: 3px solid #2A1C15; box-shadow: 0 6px 0 #2A1C15; animation: pop-in .45s cubic-bezier(.34,1.56,.64,1); }
.mposter { width: 120px; height: 180px; border-radius: 12px; object-fit: cover; border: 3px solid #2A1C15; }
.fmatch-t { font-size: 26px; font-weight: 900; color: #C23848; margin: 10px 0 4px; }
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dcard, .fmatch, .fmatch-card { transition: none; animation: none; } }

/* Loisirs : onglets qui restent en haut */
.loisirs-tabs { position: sticky; top: calc(var(--safe-t) + 6px); z-index: 12; margin: 0 0 var(--s3); box-shadow: 0 4px 0 var(--shadow), 0 6px 16px rgba(0,0,0,.12); }
.loisirs-tabs button { font-size: 14px; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.loisirs-tabs .nb { background: var(--rouge); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; font-size: 11px; padding: 0 5px; margin-left: 2px; }
.cine-tabs { display: grid; grid-template-columns: repeat(4, auto); }
.cine-tabs button { font-size: 13px; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.fwhere { font-size: 13px; color: var(--muted); font-weight: 700; }
.fwhere.chez { color: #1F7A45; }
.fwhere.salle { color: #B0303D; }
html[data-theme="brun"] .fwhere.chez { color: #9BE3B0; }
html[data-theme="brun"] .fwhere.salle { color: #FFB3BA; }
.fp.chez { border-color: #3FA46A; background: #E3F7EA; color: #1E2F3F; }
.fsalles { display: grid; gap: 6px; }
.fsalle { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: #FFE3E6; color: #5A1820; border: 1.5px solid #E7505A; text-decoration: none; font-size: 14px; }
.fsalle span { flex: 1; }
.dtag { align-self: flex-start; font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #3FA46A; color: #fff; }
.dtag.salle { background: #E7505A; }
.ichez { font-size: 11px; color: #1F7A45; font-weight: 800; }
.chip-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.link.small { font-size: 13px; }
.chips.subs button { font-size: 13px; }
.srows { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.srow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); }
.srow a { flex: 1; min-width: 0; color: var(--text); text-decoration: none; display: grid; gap: 2px; }
.srow b { font-weight: 800; }
.srow span { font-size: 12.5px; color: var(--muted); }
.srows.hot .srow { border-color: #E7505A; background: #FFF1F2; }
html[data-theme="brun"] .srows.hot .srow { background: #5E3036; }
.sgroup summary small { color: var(--muted); font-weight: 600; }

/* Ciné à deux : une petite salle obscure ------------------------------------------------------- */
.cine {
  --text: #FBF3E9; --muted: #C9B7C6; --surface: #2E1F33; --surface-2: #3A2840; --line: #54395B; --shadow: #140C17;
  --accent: #F7C948; --accent-edge: #B88A16; --accent-text: #2A1C15;
  color: var(--text); background: radial-gradient(120% 60% at 50% -10%, #5A2A44 0%, #2A1A2E 55%, #1D1220 100%);
  border: 3px solid #120A14; box-shadow: 0 5px 0 #120A14; border-radius: 24px; padding: 0 14px 16px; overflow: hidden;
}
.cine .hint, .cine .chip-label { color: var(--muted); }
.cine-marquee { position: relative; margin: 0 -14px 14px; padding: 22px 16px 14px; text-align: center;
  background: linear-gradient(180deg, #E7505A, #B8323F); border-bottom: 3px solid #120A14; box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); }
.cine-marquee h2 { margin: 0; color: #FFF6E5; font-size: 26px; font-weight: 900; letter-spacing: .02em; text-transform: none; text-shadow: 0 3px 0 #7E1A25; }
.cine-marquee p { margin: 4px 0 0; color: #FFE1D6; font-size: 13px; font-weight: 800; }
.cine-marquee .bulbs { position: absolute; left: 10px; right: 10px; top: 7px; height: 8px;
  background: radial-gradient(circle, #FFF3B0 0 3px, transparent 3.5px) 0 0 / 16px 8px repeat-x; filter: drop-shadow(0 0 3px #FFD35A); animation: bulbs 1.6s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 8px 0; } }
@media (prefers-reduced-motion: reduce) { .cine-marquee .bulbs { animation: none; } }
.cine-cta { gap: 10px; margin: 0 0 12px; }
.cine-cta .btn { height: 52px; font-size: 15.5px; border-radius: 16px; }
.cine-cta .cta-match { --edge: #8E1E2A; background: #E7505A; color: #fff; box-shadow: 0 4px 0 #8E1E2A; }
.cine-cta .cta-soir { --edge: var(--accent-edge); background: var(--accent); color: var(--accent-text); box-shadow: 0 4px 0 var(--accent-edge); }
.cine-add { position: relative; }
.cine-add .field { background: #3A2840; color: var(--text); border-color: #54395B; padding-left: 42px; border-radius: 14px; }
.cine-add .field::placeholder { color: #A893A6; }
.cine-add .field:focus { border-color: var(--accent); }
.cine-loupe { position: absolute; left: 14px; top: 14px; color: #A893A6; pointer-events: none; }
.cine-found button { background: #3A2840; border-color: #54395B; color: var(--text); }
.cine-tabs { background: #241828; border-color: #3E2A44; margin: 14px 0 12px; }
.cine-tabs button { color: #C9B7C6; }
.cine-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); box-shadow: 0 3px 0 var(--accent-edge); }

/* la grille d'affiches */
.cine-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.ftile { width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; display: grid; gap: 4px; }
.ftile-p { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; border: 2.5px solid #120A14; box-shadow: 0 4px 0 #120A14; background: #3A2840; transition: transform .15s; }
.ftile:active .ftile-p { transform: translateY(3px); box-shadow: 0 1px 0 #120A14; }
.tposter { width: 100%; height: 100%; object-fit: cover; display: block; }
.tposter.noposter { display: grid; place-items: center; font-size: 30px; background: linear-gradient(160deg, #4A3350, #241828); }
.ftile b { font-size: 13px; font-weight: 800; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ftile small { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: -2px; }
.tbadge { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 999px; background: rgba(20,10,22,.78); color: #FFD7DC; border: 1.5px solid #E7505A; }
.tbadge.match { background: #E7505A; color: #fff; border-color: #fff; font-size: 13px; padding: 1px 6px; }
/* où le voir : une pastille lisible sur n'importe quelle affiche (v169) */
.twhere { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-size: 11px; font-weight: 900; line-height: 1; padding: 5px 8px 5px 7px; border-radius: 999px; color: #fff;
  background: rgba(16,9,18,.86); border: 1.5px solid rgba(250,243,232,.22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.twhere::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.twhere.chez { color: #A6F0BE; }
.twhere.salle { color: #FFC0C6; }
.twhere.loc { color: #E8DCE6; }

/* séries en cours et journal des vus : sur des cartes sombres */
.cine .fcard { background: #33233A; border-color: #4A3350; box-shadow: 0 3px 0 #140C17; color: var(--text); }
.cine .fposter { border-color: #120A14; }
.cine .fwhere.chez { color: #A6F0BE; }
.cine .fwhere.salle { color: #FFC0C6; }
.cine .fprog { gap: 10px; }
.cine .fprog b { background: #F7C948; color: #2A1C15; border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.cine .fbadge { background: rgba(231,80,90,.18); color: #FFD7DC; }
.cine .fbadge.match { background: #E7505A; color: #fff; }
.journal .fcard { position: relative; border-style: dashed; }
.fstub { align-self: flex-start; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #2A1C15; background: #F7C948; padding: 2px 8px; border-radius: 6px; }
.cine .frate { color: #FF8C97; }
.fmot { font-size: 13px; color: #E8DCE6; line-height: 1.35; }

/* rangées d'affiches (coups de cœur, idées) */
.cine .idea { color: var(--text); width: 96px; }
.cine .iposter { width: 96px; height: 144px; border-color: #120A14; box-shadow: 0 3px 0 #120A14; }
.cine .iposter.noposter { background: linear-gradient(160deg, #4A3350, #241828); }
.cine .ichez { color: #A6F0BE; }
.cine .idea b { border-color: #120A14; }
.cine .chip-row { margin-top: 18px; }
.cine > .chip-label { margin-top: 18px; }

/* abonnements, goûts, salles */
.cine .fold > summary { color: var(--text); }
.cine .chips button { background: #3A2840; border-color: #54395B; color: var(--text); }
.cine .chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.cine .gout { background: #3A2840; border-color: #54395B; }
.cine .gout-add .field { background: #3A2840; color: var(--text); border-color: #54395B; }
.cine .srow { background: #33233A; border-color: #4A3350; }
.cine .srows.hot .srow { background: #4A2233; border-color: #E7505A; }
.cine .btn.ghost { background: #3A2840; border-color: #54395B; color: var(--text); --edge: #140C17; }
.cine-cta .btn { min-width: 0; padding: 0 8px; font-size: 14.5px; white-space: nowrap; }
.cine .link { color: var(--accent); text-decoration-color: rgba(247,201,72,.5); }
.idea span.noposter { display: grid; place-items: center; font-size: 34px; -webkit-line-clamp: unset; }

/* fiche d'un film : la salle s'éteint */
.ticket-card.fsheet { --text: #FBF3E9; --muted: #C9B7C6; --surface-2: #3A2840; --line: #54395B; position: relative; overflow-x: hidden;
  background: #221626; color: var(--text); border-color: #120A14; }
.fsheet > * { position: relative; }
.fsheet .fsheet-bg { position: absolute; left: -20px; right: -20px; top: -20px; height: 260px; background-size: cover; background-position: center 20%;
  filter: blur(18px) saturate(1.3) brightness(.55); opacity: .9; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); pointer-events: none; }
.fsheet .ticket-title { color: #FFF6E5; font-size: 24px; }
.fsheet .ticket-sub { color: #E3D3DF; }
.fsheet .bposter { border-color: #120A14; box-shadow: 0 6px 0 #120A14, 0 10px 30px rgba(0,0,0,.4); }
.fsheet .chip-label { color: #C9B7C6; }
.fsheet .fsyn { color: #F2E6EE; }
.fsheet .fp { background: #3A2840; border-color: #54395B; color: var(--text); }
.fsheet .fp.chez { background: #1F4A33; border-color: #3FA46A; color: #DDF8E6; }
.fsheet .fp small { color: #C9B7C6; }
.fsheet .fp.chez small { color: #A6F0BE; }
.fsheet .fsalle { background: #4A2233; color: #FFE1E4; border-color: #E7505A; }
.fsheet .frates-big li { background: #33233A; border-color: #4A3350; }
.fsheet .link { color: #F7C948; }
.fsheet .btn.ghost { background: #3A2840; border-color: #54395B; color: var(--text); --edge: #140C17; }
.fsheet .fbadge { background: rgba(231,80,90,.2); color: #FFD7DC; }
.fsheet .fbadge.match { background: #E7505A; color: #fff; }
.fsheet .hint { color: #C9B7C6; }
.fsheet-acts { align-items: center; }
.fheart { display: grid; justify-items: center; gap: 0; width: 66px; padding: 4px 0; border: 0; background: none; color: #FF8C97; font: inherit; cursor: pointer; }
.fheart span { font-size: 30px; line-height: 1; transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.fheart[aria-pressed="true"] span { transform: scale(1.15); }
.fheart small { font-size: 10.5px; font-weight: 800; color: #C9B7C6; }
.frate-sheet { text-align: center; }
.rateposter { width: 96px; height: 144px; border-radius: 12px; object-fit: cover; border: 3px solid #120A14; box-shadow: 0 5px 0 #120A14; margin: 0 auto 8px; display: block; }
.rateposter.noposter { display: grid; place-items: center; font-size: 34px; background: linear-gradient(160deg, #4A3350, #241828); }
.frate-sheet .area { background: #3A2840; color: var(--text); border-color: #54395B; }
.frate-sheet .area::placeholder { color: #A893A6; }
.fsheet [data-action="cine-del"] { color: #C9B7C6; }
.fheart { width: 80px; } .fheart small { white-space: nowrap; }

/* Ciné : trois espaces (ma liste, à deux, la sienne) */
.cine-spaces { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; margin: 14px 0 12px; }
.cine-spaces button { display: grid; justify-items: center; gap: 1px; padding: 8px 4px 7px; border-radius: 14px; border: 2px solid #3E2A44; background: #241828; color: #C9B7C6; font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; min-width: 0; }
.cine-spaces button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cine-spaces button b { font-size: 18px; font-weight: 900; color: #FBF3E9; line-height: 1.1; }
.cine-spaces button[aria-selected="true"] { background: #FBF3E9; color: #2A1C15; border-color: #FBF3E9; box-shadow: 0 3px 0 #120A14; }
.cine-spaces button[aria-selected="true"] b { color: #2A1C15; }
.cine-spaces button.nous[aria-selected="true"] { background: #E7505A; border-color: #E7505A; color: #fff; }
.cine-spaces button.nous[aria-selected="true"] b { color: #fff; }
.cine .cine-tabs { margin-top: 0; }
.tbadge.ask { background: #F7C948; color: #2A1C15; border-color: #2A1C15; }
.tbadge.dim { background: rgba(20,10,22,.8); color: #C9B7C6; border-color: #54395B; }
.iwhy { font-size: 10.5px; color: #C9B7C6; font-weight: 700; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ce qu'Azami a compris */
.taste { margin: 18px 0 4px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, #3A2840, #2A1C30); border: 2px solid #54395B; }
.taste-t { margin: 0 0 4px; font-weight: 900; font-size: 15px; }
.taste-t small { font-weight: 800; font-size: 12px; color: #F7C948; margin-left: 6px; }
.taste-k { margin: 8px 0 4px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #C9B7C6; }
.tchips { display: flex; flex-wrap: wrap; gap: 5px; }
.tchip { font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #4A3350; color: #FBF3E9; }
.tchip.no { background: transparent; border: 1.5px dashed #7A5A80; color: #C9B7C6; }
.taste .hint { margin: 4px 0 0; }

/* Cinder */
.cinder-logo { font-size: 20px; font-weight: 900; letter-spacing: .01em; color: #FFB0B8; }
.deck-n { font-size: 12px; font-weight: 800; color: #F7C948; min-width: 52px; text-align: right; }
.deck-btns { gap: 18px; align-items: center; }
.deck-btns button { display: grid; place-items: center; gap: 0; }
.deck-btns button span { line-height: 1; }
.deck-btns button small { font-size: 10px; font-weight: 900; letter-spacing: .04em; margin-top: 1px; }
.deck-btns .deck-seen { width: 54px; height: 54px; font-size: 22px; background: #3A2840; color: #F7C948; border-color: #FBF3E9; }
.deck-btns .deck-no, .deck-btns .deck-yes { width: 70px; height: 70px; }
.dtags { display: flex; gap: 6px; flex-wrap: wrap; }
.dtag.note { background: rgba(247,201,72,.95); color: #2A1C15; }
.dwhy { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 3px; }
.dwhy li { font-size: 13px; font-weight: 800; color: #FFE7A8; }
.dwhy li::before { content: '✦ '; color: #F7C948; }
.dwarn { margin: 0; font-size: 12.5px; font-weight: 700; color: #FFB0B8; }
.dstamp.vu { left: 50%; top: 30px; transform: translateX(-50%) rotate(-4deg); color: #F7C948; }
.dcard.lean-vu .dstamp.vu { opacity: 1; }
.dtheirs { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); margin: 0; font-size: 12px; font-weight: 800; color: #FFD7DC; background: rgba(20,10,22,.85); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.dseen { position: absolute; inset: auto 0 0 0; margin: 0 auto; max-width: 420px; padding: 16px 14px 12px; border-radius: 22px; background: #FBF3E9; color: #2A1C15; border: 3px solid #120A14; box-shadow: 0 -6px 30px rgba(0,0,0,.4); text-align: center; animation: pop-in .3s cubic-bezier(.34,1.56,.64,1); z-index: 3; }
.dseen-t { margin: 0 0 10px; font-weight: 800; }
.dseen-notes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 8px; }
.dseen-notes button { display: grid; gap: 2px; justify-items: center; padding: 8px 2px; border-radius: 12px; border: 2px solid #E5D5BA; background: #fff; font: inherit; cursor: pointer; }
.dseen-notes button span { color: #E7505A; font-size: 11px; letter-spacing: -1px; }
.dseen-notes button small { font-size: 11px; font-weight: 800; }
.dseen-notes button:nth-child(-n+2) span { color: #7A6A80; }
.dseen .link { color: #7A5A80; }
.fwhy { display: grid; gap: 4px; margin: 10px 0 0; }
.fwhy span { font-size: 13px; font-weight: 800; color: #FFE7A8; }
.fwhy span::before { content: '✦ '; color: #F7C948; }
.fwhy span.for { color: #A6F0BE; }
.fwhy span.for::before { content: '💞 '; }
.deck-btns .deck-seen { width: 58px; height: 58px; }
.deck-btns { gap: 12px; }
.deck-btns .deck-no, .deck-btns .deck-yes { width: 66px; height: 66px; }
.deck-btns .deck-bof { width: 54px; height: 54px; font-size: 22px; background: #3A2840; color: #E8DCE6; border: 3px solid #FBF3E9; border-radius: 50%; cursor: pointer; }
.deck-btns .deck-seen { width: 54px; height: 54px; }
.deck-no { color: #FF5C6A; }
.dstamp.non { color: #E8DCE6; }
.dstamp.beurk { left: 50%; top: auto; bottom: 40%; transform: translateX(-50%) rotate(8deg); color: #FF5C6A; }
.dcard.lean-beurk .dstamp.beurk { opacity: 1; }
.deck-hint { letter-spacing: .01em; }
/* Cinder : le doigt garde la main (pas de défilement de la page pendant qu'on glisse une carte) */
#deck { overscroll-behavior: contain; touch-action: none; }
.dcard { touch-action: none; will-change: transform; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .28s cubic-bezier(.2,.8,.3,1), opacity .28s; }
.dcard.next { transition: transform .2s, opacity .2s; }
.dposter { -webkit-user-drag: none; user-select: none; }
.deck-moods { touch-action: pan-x; }
.tstar { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 15px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.deck-btns .deck-super { width: 50px; height: 50px; font-size: 20px; background: #3A2840; color: #F7C948; border: 3px solid #FBF3E9; border-radius: 50%; cursor: pointer; }
.deck-btns { gap: 9px; }
.deck-btns .deck-no, .deck-btns .deck-yes { width: 62px; height: 62px; }
.deck-btns .deck-bof, .deck-btns .deck-seen { width: 50px; height: 50px; font-size: 20px; }
.tchip { border: 0; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.tchip.boost { background: #F7C948; color: #2A1C15; }
.tchip.rule { display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.tchip.rule.boost { background: #F7C948; color: #2A1C15; }
.tchip.rule.ban { background: #5A2233; color: #FFD7DC; }
.tchip.rule button { border: 0; background: none; color: inherit; font-size: 15px; padding: 0 0 0 2px; cursor: pointer; }
.taste-tip { margin: 8px 0 0; font-size: 12px; }
.fteam { display: flex; flex-wrap: wrap; gap: 6px; }
.fteam button { display: grid; text-align: left; gap: 0; padding: 5px 10px; border-radius: 12px; background: #3A2840; border: 1.5px solid #54395B; color: #FBF3E9; font: inherit; cursor: pointer; }
.fteam b { font-size: 13px; }
.fteam small { font-size: 10.5px; color: #C9B7C6; font-weight: 700; }
.trule-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.trule { text-align: center; }

/* Ciné : outils du goût, mesures, filtres, ménage, journal */
.taste-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.taste-tools .btn { font-size: 13.5px; }
.taste-meter { margin-top: 10px; display: grid; gap: 6px; }
.taste-meter p { margin: 0; font-size: 12.5px; color: #E8DCE6; line-height: 1.35; }
.taste-meter b { display: inline-block; min-width: 44px; padding: 1px 6px; margin-right: 6px; border-radius: 8px; background: #F7C948; color: #2A1C15; font-weight: 900; text-align: center; }
.cine-filt { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; }
/* une seule barre : filtre rapide en segments, et un bouton pour le reste (afficher, trier) (v171) */
.cine-seg { flex: 1; min-width: 0; display: flex; padding: 3px; gap: 2px; border-radius: 12px; background: #2C1E31; border: 2px solid #54395B; }
.cine-seg button { position: relative; flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: #C9B7C6; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .18s, color .18s; }
.cine-seg button[aria-pressed="true"] { background: #FBF3E9; color: #2A1C15; box-shadow: 0 2px 0 #CDBFA8; }
.cine-filt .cine-sortb { flex: none; height: 40px; border-radius: 12px; padding: 0 12px; gap: 7px; }
.cine-sortb.on { border-color: #F2C14E; color: #F2C14E; }
.cine-sortb svg { opacity: .85; }
.chips.mini button { flex: none; padding: 5px 10px; font-size: 12.5px; min-height: 0; }
.cine-sort select { width: auto; height: 34px; padding: 0 8px; font-size: 13px; background: #3A2840; color: #FBF3E9; border-color: #54395B; border-radius: 10px; }
.cine-more { margin-top: 12px; }
.menage-ban { width: 100%; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; border: 2px dashed #7A5A80; background: transparent; color: #FBF3E9; font: inherit; font-weight: 800; font-size: 13.5px; text-align: left; cursor: pointer; }
.menage-ban span { flex: 1; }
.menage-l { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; max-height: 55vh; overflow: auto; text-align: left; }
.menage-l li { display: flex; align-items: center; gap: 8px; }
.menage-l li span { flex: 1; min-width: 0; display: grid; }
.menage-l b { font-size: 14px; } .menage-l small { color: #C9B7C6; font-size: 12px; }
.jstats { margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, #4A2233, #2A1C30); border: 2px solid #7A3346; }
.jstats p { margin: 0 0 4px; font-size: 13.5px; color: #F2E6EE; }
.jstats p:first-child { font-size: 15px; }
.fcal { margin: 12px 0 4px; }
.fsheet .fpq { background: #3A2840; color: #FBF3E9; border-color: #54395B; font-size: 14px; }
.fsheet .fpq::placeholder { color: #A893A6; }
.fpq-o { margin: 6px 0 0; font-size: 13px; color: #E8DCE6; font-style: italic; }
.fpq-o small { font-style: normal; color: #C9B7C6; margin-left: 4px; }
.lb-bar { height: 10px; border-radius: 10px; background: #3A2840; overflow: hidden; margin: 14px 0 4px; }
.lb-bar span { display: block; height: 100%; background: linear-gradient(90deg, #F7C948, #E7505A); transition: width .4s; }
.lb-file { cursor: pointer; }
.cal-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 12px; }
.fsheet .cal-row .field { background: #3A2840; color: #FBF3E9; border-color: #54395B; color-scheme: dark; }
.cine .srow .sdim { opacity: .6; font-size: 12.5px; }

/* ── Nos propres choix (v168) : champs date et heure, feuilles, menus, confirmations ── */
.pickf { position: relative; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--text); cursor: pointer; line-height: normal; white-space: nowrap; overflow: hidden; }
.pickf .pk-ic { display: grid; place-items: center; color: var(--muted); flex: none; }
.pickf .pk-v { overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.pickf.empty .pk-v { color: var(--muted); font-weight: 600; }
.pickf:active { transform: translateY(1px); }
.w-110 .pickf .pk-ic { display: none; }

#uisheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 30, 40, 0); transition: background .28s; }
#uisheet.on, #uisheet.on.center { background: rgba(20, 30, 40, .45); }
#uisheet.center { align-items: center; padding: 20px; }
.ui-card { width: 100%; max-width: 480px; background: var(--surface); color: var(--text); border: 2px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 10px var(--s4) calc(var(--s5) + var(--safe-b)); transform: translateY(100%); transition: transform .34s cubic-bezier(.34, 1.3, .64, 1); max-height: 90vh; overflow: auto; }
#uisheet.on .ui-card { transform: none; }
#uisheet.center .ui-card { border-bottom: 2px solid var(--line); border-radius: 22px; padding: 20px var(--s4) var(--s4); transform: scale(.92); opacity: 0; transition: transform .26s cubic-bezier(.34, 1.4, .64, 1), opacity .2s; box-shadow: 0 6px 0 var(--shadow); max-width: 380px; }
#uisheet.center.on .ui-card { transform: none; opacity: 1; }
#uisheet.center .ui-grab { display: none; }
.ui-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.ui-title { font-weight: 900; font-size: 18px; text-align: center; margin: 2px 0 10px; }
.ui-text { font-size: 16px; line-height: 1.45; text-align: center; margin: 0 0 18px; color: var(--text); }
.ui-card .form-actions { display: flex; gap: 10px; margin-top: 14px; }
.ui-card .form-actions .btn { flex: 1; }
.btn.danger { --edge: #9E2F25; background: var(--rouge); color: #fff; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.cal-head b { font-size: 17px; font-weight: 900; text-transform: capitalize; }
.cal-nav { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 24px; font-weight: 900; line-height: 1; box-shadow: 0 2px 0 var(--line); }
.cal-dow, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: 12px; font-weight: 900; color: var(--muted); padding: 4px 0; }
.cal-days button { aspect-ratio: 1; max-height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font-size: 16px; font-weight: 800; }
.cal-days button.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-days button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); box-shadow: 0 2px 0 var(--accent-edge); }
.cal-days button:active { background: var(--line); }
.ui-quick { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ui-quick button { flex: 1; min-width: 0; height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 14px; box-shadow: 0 2px 0 var(--line); }
.ui-quick .ui-clear { color: var(--muted); }

.tm-big { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.tm-big b { font-size: 44px; font-weight: 900; color: var(--num); }
.tm-big span { font-size: 22px; font-weight: 800; color: var(--muted); }
.tm-grid { display: grid; gap: 6px; }
.tm-grid.h { grid-template-columns: repeat(6, 1fr); }
.tm-grid.m { grid-template-columns: repeat(6, 1fr); }
.tm-grid button { height: 40px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.tm-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 2px 0 var(--accent-edge); }

#uimenu { position: fixed; inset: 0; z-index: 75; }
.ui-menu { position: fixed; background: var(--surface-2); color: var(--text); border: 2px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 4px 0 var(--shadow), 0 14px 30px rgba(0, 0, 0, .18);
  transform: scale(.9); opacity: 0; transition: transform .2s cubic-bezier(.34, 1.4, .64, 1), opacity .15s; }
#uimenu.on .ui-menu { transform: none; opacity: 1; }
.ui-menu-t { margin: 8px 10px 4px; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ui-menu button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent; border-radius: 11px; color: var(--text); font-size: 16px; font-weight: 800; text-align: left; }
.ui-menu button[aria-checked="true"] { background: var(--accent); color: var(--accent-text); }
.ui-menu button:active { background: var(--line); }
.um-check { width: 14px; display: grid; place-items: center; flex: none; }

/* version ciné, sombre */
#uisheet.dark .ui-card, #uimenu.dark .ui-menu { --text: #FBF3E9; --muted: #C9B7C6; --surface-2: #3A2840; --line: #54395B; --shadow: #120A14; --num: #FBF3E9; background: #221626; border-color: #120A14; }
#uimenu.dark .ui-menu { background: #2C1E31; border-color: #54395B; }

.cine-sortb { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 2px solid #54395B; background: #3A2840; color: #FBF3E9; font-size: 13px; font-weight: 800; white-space: nowrap; }
.cine-sortb svg { opacity: .7; }
.gout-kinds { margin-top: 12px; }

/* Cinder : la fiche quand on touche l'affiche (v168) */
.dinfo-btn { position: absolute; right: 12px; top: 18px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(250,243,232,.7); background: rgba(20,10,14,.55); color: #FAF3E8; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dinfo { padding-right: 16px; }
.dinfo > b { padding-right: 48px; }
.dmore { position: absolute; inset: 4px 0; max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #1E1218; border: 3px solid #FAF3E8; box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 5;
  opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .22s, transform .3s cubic-bezier(.2,.8,.3,1); }
.dmore.on { opacity: 1; transform: none; }
.dm-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.dm-close { position: absolute; right: 12px; top: 12px; width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(250,243,232,.7); background: rgba(20,10,14,.6); color: #FAF3E8; display: grid; place-items: center; z-index: 2; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dm-hero { position: relative; display: flex; gap: 14px; align-items: flex-end; padding: 64px 16px 16px; min-height: 230px; overflow: hidden; cursor: pointer; }
.dm-bg { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(22px) saturate(1.3) brightness(.5); }
.dm-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%, #1E1218); }
.dm-hero > :not(.dm-bg) { position: relative; z-index: 1; }
.dm-poster { width: 104px; height: 156px; flex: none; border-radius: 12px; object-fit: cover; border: 2px solid rgba(250,243,232,.85); box-shadow: 0 6px 18px rgba(0,0,0,.45); background: #2A1C15; }
.dm-poster.noposter { display: grid; place-items: center; font-size: 40px; }
.dm-head { min-width: 0; display: grid; gap: 4px; }
.dm-head h3 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.15; color: #FAF3E8; }
.dm-orig { margin: 0; font-size: 13px; color: #C9B7C6; font-style: italic; }
.dm-meta { margin: 0; font-size: 14px; color: #E0CFB8; font-weight: 700; }
.dm-head .dtags { margin-top: 4px; }
.dm-body { padding: 4px 16px 22px; display: grid; gap: 14px; color: #FAF3E8; }
.dm-trailer { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 2px solid #54395B; background: #120A14; padding: 0; color: #fff; }
.dm-trailer img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.8); }
.dm-trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dm-play { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%; background: #E7505A; display: grid; place-items: center; box-shadow: 0 4px 0 #9E2F3A; padding-left: 4px; }
.dm-tl { position: absolute; left: 10px; bottom: 8px; font-size: 13px; font-weight: 900; padding: 3px 9px; border-radius: 8px; background: rgba(0,0,0,.6); }
.dm-trailer.wait { display: grid; place-items: center; color: #C9B7C6; font-size: 14px; font-weight: 700; }
.dm-syn { margin: 0; font-size: 15px; line-height: 1.55; }
.dm-syn.muted { color: #C9B7C6; }
.dm-where { margin: 0; font-size: 14px; font-weight: 800; }
.dm-cred { margin: 0; display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: #2C1E31; border: 2px solid #54395B; }
.dm-cred div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; }
.dm-cred dt { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: #C9B7C6; }
.dm-cred dd { margin: 0; font-size: 15px; font-weight: 700; }
.dm-why .chip-label { color: #C9B7C6; margin: 0 0 6px; }
.dm-why ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.dm-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 0; }
.dm-links a { color: #F2C14E; font-weight: 800; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .dmore { transition: none; } }

/* Dans une rangée qui défile de côté, l'interrupteur haptique invisible attrapait le glissé du doigt (iOS) :
   on le laisse passer pour que la rangée défile. (v170) */
.rchips input.hap, .carnet-tabs input.hap, .carnet-stickers input.hap, .cine-ideas input.hap { pointer-events: none; }

/* notes presse et public (v173) */
.fnotes { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.fnotes span { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 10px; border-radius: 12px; background: #2C1E31; border: 1.5px solid #54395B; color: #FBF3E9; line-height: 1; }
.fnotes small { font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: #C9B7C6; }
.fnotes b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fnotes i { font-style: normal; font-size: 11px; color: #C9B7C6; font-weight: 700; }
.fnotes .osc { border-color: #8A6512; }
.dm-body .fnotes { margin: 0; }
.taste-pub { margin: 2px 0 8px; font-weight: 800; font-size: 14px; }
.taste-pub small { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }

/* v174 : palmarès, tons, presse titre par titre, pourquoi */
.fpalma, .ftons { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fpalma span { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: #3A2840; border: 1.5px solid #54395B; color: #FBF3E9; }
.fpalma .cah, .fpalma .ss { background: #F2C14E; border-color: #F2C14E; color: #2A1C15; }
.fpalma .prix { border-color: #C8951E; color: #F2C14E; }
.ftons span { padding: 4px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 800; background: rgba(156, 196, 228, .14); color: #CFE3F3; border: 1px solid rgba(156, 196, 228, .3); }
.ftons .ry { background: transparent; color: #C9B7C6; border-style: dashed; }
.fcrit { margin: 0 0 12px; border-radius: 14px; background: #2C1E31; border: 2px solid #54395B; overflow: hidden; }
.fcrit summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 10px 14px; font-weight: 900; color: #FBF3E9; }
.fcrit summary::-webkit-details-marker { display: none; }
.fcrit summary::after { content: '›'; margin-left: auto; transform: rotate(90deg); transition: transform .2s; color: #C9B7C6; }
.fcrit[open] summary::after { transform: rotate(-90deg); }
.fcrit summary small { font-weight: 700; color: #C9B7C6; font-size: 12px; }
.fcrit ul { list-style: none; margin: 0; padding: 0 14px 10px; display: grid; gap: 2px; }
.fcrit li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 14px; font-weight: 700; color: #FBF3E9; }
.fcrit li.twin span { color: #F2C14E; }
.fcrit li em { font-style: normal; font-size: 11px; font-weight: 900; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(242,193,78,.16); color: #F2C14E; }
.fcrit li b { font-size: 14px; color: #F2C14E; letter-spacing: 1px; white-space: nowrap; }
.fcrit li b i { font-style: normal; color: rgba(255,255,255,.18); }
.taste-lo { margin: 2px 0 8px; font-size: 12.5px; }
.dwhyask { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 122px); z-index: 6; padding: 10px 12px 12px; border-radius: 16px; background: rgba(20, 10, 16, .92); border: 1.5px solid rgba(250,243,232,.25); color: #FAF3E8;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .25s; max-width: 404px; margin: 0 auto; }
.dwhyask.on { opacity: 1; transform: none; }
.dwhyask p { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #E0CFB8; }
.dwhyask p b { color: #FAF3E8; }
.dwhyask p small { font-weight: 600; opacity: .7; }
.dwhyask div { display: flex; flex-wrap: wrap; gap: 6px; }
.dwhyask button { padding: 6px 11px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #FAF3E8; font: inherit; font-size: 13px; font-weight: 800; }
.dwhyask button[aria-pressed="true"] { background: #F2C14E; border-color: #F2C14E; color: #2A1C15; }
.cine-moods { margin-bottom: 6px; }

/* v175 : fermer les feuilles en touchant dehors (iOS ne transmet le toucher qu'aux éléments « cliquables »),
   en les tirant vers le bas, ou avec la croix */
#ticket, #uisheet, #uimenu, .fmatch { cursor: pointer; -webkit-tap-highlight-color: transparent; }
#ticket .ticket-card, #uisheet .ui-card, #uimenu .ui-menu, .fmatch-card { cursor: auto; }
.ticket-card::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(127, 127, 127, .45); margin: -6px auto 10px; }
.fsheet { max-height: 84vh; }
.fsheet-x { position: sticky; top: 0; float: right; z-index: 3; width: 36px; height: 36px; margin: -4px -4px 0 8px; border-radius: 50%; border: 1.5px solid rgba(250,243,232,.35); background: rgba(20,10,16,.55); color: #FBF3E9; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dwhy-link { border: 0; background: transparent; color: #F2C14E; font: inherit; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 4px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtheirs.relance { background: #2A1C15; color: #F2C14E; border: 1.5px solid #8A6512; }

/* ── Nos icônes (remplacent les émojis) ── */
.icn { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -0.16em; flex: none; overflow: visible; }
.icn.big { width: 1.25em; height: 1.25em; vertical-align: -0.22em; }
.deck-btns button .icn { width: 26px; height: 26px; }
.deck-btns .deck-no .icn, .deck-btns .deck-yes .icn { width: 30px; height: 30px; }
.deck-btns .deck-bof .icn { width: 25px; height: 25px; }
.deck-btns .deck-seen { --icn-bg: #3A2840; }
.deck-btns .deck-super .icn { width: 23px; height: 23px; }
.deck-btns button small { margin-top: 2px; }
.cinder-logo { display: inline-flex; align-items: center; gap: 5px; }
.cinder-logo .icn { color: #FF7A85; width: 21px; height: 21px; }
.cine-cta .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.cine-cta .icn { width: 20px; height: 20px; }
.tbadge.match { display: grid; place-items: center; padding: 3px 5px; }
.tbadge.match .icn { width: 14px; height: 14px; }
.tstar { color: #F7C948; }
.tstar .icn { width: 17px; height: 17px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.noposter { color: rgba(255, 236, 240, .45); }
.noposter .icn { width: 1.2em; height: 1.2em; }
.fbadge .icn { width: 13px; height: 13px; vertical-align: -2px; }
.fmatch-t .icn { color: #E7505A; }
.fnotes .osc .icn { color: #F7C948; width: 18px; height: 18px; }
.loisirs-tabs .icn { width: 17px; height: 17px; margin-right: 2px; }
.deck-moods .icn, .cine-spaces .icn, .gout-k .icn, .gout-kinds .icn { width: 14px; height: 14px; }
.ticket-title .icn { width: 20px; height: 20px; margin-right: 3px; color: #E7505A; }

/* ── Cinder plus fluide ── */
.dcard.gone { pointer-events: none; z-index: 3; }
.dcard.next { transition: transform .26s cubic-bezier(.2,.8,.3,1), opacity .26s; }
.dcard.next.enter { opacity: 0; transform: scale(.88) translateY(22px); transition: none; }
.dcard { contain: layout paint; backface-visibility: hidden; }
.dinfo-btn { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(20,10,14,.72); }
@media (prefers-reduced-motion: reduce) { .dcard.next.enter { opacity: 1; transform: scale(.94) translateY(10px); } }

/* ── Mes vus ── */
.vu-sort { margin: 4px 0 6px; }
.vu-h { margin: 14px 0 6px; }
.vu-h small { opacity: .6; font-weight: 700; margin-left: 4px; }
.vulist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vurow { position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; border: 2px solid rgba(250,243,232,.12); background: rgba(250,243,232,.05); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vurow .sposter { width: 38px; height: 56px; }
.vurow .noposter { display: grid; place-items: center; font-size: 18px; }
.vu-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.vu-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vu-t small, .vu-n small { font-size: 12px; opacity: .7; }
.vu-n { display: grid; justify-items: end; gap: 2px; flex: none; }
.vu-n .hearts { color: #E7505A; font-size: 14px; letter-spacing: 1px; }
.vu-n .hearts i { font-style: normal; opacity: .22; }
.vu-sort { display: flex; gap: 6px; justify-content: flex-end; margin: 2px 0 0; }
.vu-sort button { font: inherit; font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; border: 2px solid rgba(250,243,232,.18); background: transparent; color: #E0CFB8; cursor: pointer; }
.vu-sort button[aria-pressed="true"] { background: #FAF3E8; color: #2A1C15; border-color: #FAF3E8; }

/* ── Soirée avec des invités ── */
.cine-inv { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 10px 0 2px; padding: 10px 14px; border-radius: 14px; border: 2px dashed rgba(250,243,232,.28); background: transparent; color: #FAF3E8; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.cine-inv .icn { width: 20px; height: 20px; color: #F7C948; }
.cine-inv b { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: #E7505A; color: #fff; }
.soiree-pts { margin: 6px 0 12px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.soiree-link { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.soiree-link span { flex: none; display: grid; place-items: center; }
.soiree-link .icn { width: 20px; height: 20px; }
.soiree-link input { flex: 1; min-width: 0; font-size: 13px; }
.soiree-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.soiree-acts .btn { flex: 1 1 auto; text-align: center; text-decoration: none; }
.soiree-cl { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; counter-reset: cl; }
.soiree-cl li { display: flex; align-items: center; gap: 10px; counter-increment: cl; }
.soiree-cl li::before { content: counter(cl); font-weight: 900; width: 18px; text-align: center; opacity: .6; }
.soiree-cl img, .soiree-cl .noposter { width: 34px; height: 50px; border-radius: 6px; object-fit: cover; flex: none; }
.soiree-cl span { display: grid; min-width: 0; }
.soiree-cl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soiree-cl small { font-size: 12px; opacity: .75; }
.btn.danger-t { color: #E7505A; }
.soiree-acts a.btn { display: inline-flex; align-items: center; justify-content: center; }
.soiree-sheet .btn.danger-t { color: #FF7A85; }
.tbadge.neuf { background: #F7C948; color: #2A1C15; border-color: #2A1C15; }
#deck .fmatch { background: rgba(20,8,12,.5); }
