/* Nido : papier à lettres et encre prune. Trois couleurs, pas plus : le bleu et le rose (une couleur par personne), le prune (vous deux).
   Fraunces (titres, chiffres), Figtree (texte), Kalam (petits mots). */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/fraunces-latin-full-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(../fonts/fraunces-latin-soft-italic.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(../fonts/figtree-latin-wght-normal.woff2) format('woff2'); }
@font-face { font-family: 'Kalam'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/kalam-latin-400-normal.woff2) format('woff2'); }

:root {
  --paper: #F4ECE0; --paper-2: #ECE1D1; --card: #FFFBF5; --white: #FFFFFF;
  --ink: #2B1D2A; --ink-2: #463545; --cream: #FFF4E6; --on-ink: #D9C2D4;
  --muted: #6E5E67; --soft: #5D4D58;
  --line: #E7DCCD; --line2: #F0E7DA; --line3: #D8C9B6;
  --blue: #2F5BCB; --blue-t: #E5ECFB; --blue-i: #2448A6;
  --pink: #D23C6E; --pink-t: #FBE6EE; --pink-i: #A92A57;
  --us: #763F7A; --us-t: #EFE3EA; --us-i: #5A2D5E;
  --fete: #A08E84;
  --paper-ink: var(--us-i); --letter: #FFFDF8; --rule: #EADFEF;
  --sh1: 0 1px 1px rgba(43, 29, 42, .04), 0 3px 8px -3px rgba(43, 29, 42, .12);
  --sh2: 0 2px 2px rgba(43, 29, 42, .04), 0 14px 30px -14px rgba(43, 29, 42, .42);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .11 0 0 0 0 .16 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --title: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hand: 'Kalam', 'Segoe Print', cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper) var(--grain); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--ink); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--us-t); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- La marque : le nid et le coeur ---------- */
.nid { display: block; }
.marque { display: flex; flex-direction: column; align-items: center; text-align: center; }
.marque .nid { width: 92px; height: 92px; filter: drop-shadow(0 10px 14px rgba(43, 29, 42, .18)); }
.marque .marque-nom { margin: 6px 0 0; font-family: var(--title); font-weight: 650; font-size: 54px; line-height: .95; letter-spacing: -.02em; font-variation-settings: 'SOFT' 100; color: var(--ink); text-align: center; }
.marque .marque-sous { margin: 6px 0 0; font-family: var(--hand); font-size: 21px; color: var(--muted); text-align: center; }

/* Démarrage */
.boot { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.boot .marque { margin: auto; padding-bottom: 8vh; animation: monte .5s ease-out both; }

/* ---------- La coquille ---------- */
.shell { position: relative; max-width: 560px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }
.main { flex: 1; padding: 22px 18px calc(116px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.main > * { min-width: 0; animation: entre .42s cubic-bezier(.2, .7, .2, 1) backwards; }
.main > :nth-child(2) { animation-delay: .04s; }
.main > :nth-child(3) { animation-delay: .08s; }
.main > :nth-child(4) { animation-delay: .12s; }
.main > :nth-child(5) { animation-delay: .16s; }
.main > :nth-child(n+6) { animation-delay: .2s; }
@keyframes entre { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* Les onglets : une barre qui flotte au-dessus de la page */
.tabbar { position: fixed; z-index: 20; bottom: calc(10px + var(--safe-b)); left: 50%; transform: translateX(-50%); width: calc(100% - 20px); max-width: 540px; display: flex; background: var(--card); border: 1px solid rgba(43, 29, 42, .07); border-radius: 26px; box-shadow: 0 1px 1px rgba(43, 29, 42, .05), 0 18px 36px -16px rgba(43, 29, 42, .45); padding: 6px; }
.brand { display: none; }
.tab { flex: 1; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 650; border: 0; background: none; padding: 0; position: relative; border-radius: 20px; transition: color .15s; }
.tab .ic { width: 50px; height: 30px; padding: 3px 13px; border-radius: 15px; transition: background-color .2s, color .2s; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); font-weight: 800; }
.tab[aria-current="page"] .ic { background: var(--ink); color: var(--cream); }
.tab-dot { position: absolute; top: 5px; left: calc(50% + 12px); width: 11px; height: 11px; border-radius: 50%; background: var(--pink); border: 2px solid var(--card); animation: bat 1.6s ease-in-out infinite; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--us-t); border-bottom: 1px solid #E3D3DE; font-size: 13px; color: var(--us-i); font-weight: 700; }
.demo-bar button { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--card); color: var(--us-i); font-weight: 800; font-size: 13px; box-shadow: var(--sh1); }

/* Icônes (traits) */
.ic { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Titres et textes ---------- */
h1, h2, h3 { margin: 0; font-family: var(--title); font-weight: 600; font-variation-settings: 'SOFT' 100; letter-spacing: -.01em; }
h1 { font-size: 34px; line-height: 1.05; }
h2 { font-size: 20px; line-height: 1.2; }
h3 { font-size: 17px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.hand { font-family: var(--hand); font-weight: 400; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.head-c { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kicker { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 10px; }
.section-h a, .section-h button { font-family: var(--font); letter-spacing: 0; }
.count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--paper-2); font-family: var(--font); font-size: 12px; font-weight: 800; letter-spacing: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--soft); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.hello { font-size: 38px; line-height: 1.05; margin-top: 4px; }
.hello em { font-style: italic; font-weight: 500; color: var(--c, var(--pink)); }

/* ---------- Boutons ---------- */
.btn { min-height: 46px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line3); background: var(--card); color: var(--ink); font-size: 14.5px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: transform .12s, box-shadow .15s, background-color .15s, border-color .15s; }
.btn:hover { border-color: #C4B29C; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); box-shadow: 0 8px 16px -10px rgba(43, 29, 42, .9); }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-dark:disabled { background: #B9AAB0; border-color: #B9AAB0; box-shadow: none; }
.btn-big { width: 100%; min-height: 56px; border-radius: 20px; font-size: 16px; }
.btn-full { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; padding: 0 10px; }
.btn-ghost:hover { border-color: transparent; background: var(--paper-2); }
.btn-danger { color: #A3262B; border-color: #E8C4C4; }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 14px; font-size: 13px; }
.btn-person { border: 0; color: var(--white); background: var(--c, var(--pink)); box-shadow: 0 12px 22px -12px var(--c, var(--pink)); }
.btn-person:hover { filter: brightness(1.05); }
.btn-person .ic { animation: bat 2.4s ease-in-out infinite; }
.btn-note { background: var(--letter); border-color: var(--line3); color: var(--ink); }
.btn-note .ic { color: var(--paper-ink); }
.link-btn { min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 14px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.back { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; margin-left: -8px; padding: 0 12px 0 6px; border-radius: 14px; font-size: 15px; font-weight: 750; color: var(--ink); text-decoration: none; }
.back:hover { background: var(--paper-2); }
@keyframes bat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.16); } 24% { transform: scale(1); } 36% { transform: scale(1.1); } 48% { transform: scale(1); } }

/* ---------- Couleurs des personnes : --c, --ct (fond clair), --ci (texte) ---------- */
.p-blue { --c: var(--blue); --ct: var(--blue-t); --ci: var(--blue-i); }
.p-pink { --c: var(--pink); --ct: var(--pink-t); --ci: var(--pink-i); }
.p-us { --c: var(--us); --ct: var(--us-t); --ci: var(--us-i); }
.p-fete { --c: var(--fete); --ct: #F1EBE4; --ci: #5E4E46; }
.chip { flex: none; min-width: 32px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--ct); color: var(--ci); font-size: 11.5px; font-weight: 850; display: inline-flex; align-items: center; justify-content: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-family: var(--title); font-weight: 600; font-size: 18px; border: 3px solid var(--paper); box-shadow: var(--sh1); }
.avatars { display: flex; text-decoration: none; min-height: 44px; align-items: center; }
.avatars .avatar + .avatar { margin-left: -12px; }

/* ---------- Cartes et listes ---------- */
.card, .card-link, .list, .idea, .month, .stops, .year-ago { background: var(--card); border: 1px solid rgba(43, 29, 42, .06); border-radius: 22px; box-shadow: var(--sh1); }
.card { padding: 16px 18px; }
.card-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 14px 16px; width: 100%; text-align: left; transition: transform .15s, box-shadow .15s; }
.card-link:hover { box-shadow: var(--sh2); }
.card-link > .ic:last-child { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 4px 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px dashed var(--line); min-height: 60px; }
.list > li:last-child { border-bottom: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.li-meta { margin-top: 1px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.li-btn { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 4px 0; }
.empty { padding: 16px 18px; border: 1.5px dashed var(--line3); border-radius: 20px; font-family: var(--title); font-style: italic; font-size: 16px; color: var(--muted); text-align: center; }
.postcard { position: relative; overflow: hidden; }
.postcard::after { content: ''; position: absolute; right: 52px; top: 12px; bottom: 12px; border-right: 1.5px dashed var(--line3); }
.postcard > .ic:first-child { width: 42px; height: 42px; padding: 9px; border-radius: 14px; background: var(--us-t); color: var(--us-i); }
.postcard .li-title { font-family: var(--title); font-weight: 600; font-size: 18px; }

/* Une lettre : le papier, l'écriture à la main posée sur les lignes */
.paper, .letter { position: relative; display: block; background: var(--letter); border-radius: 8px; padding: 18px 18px 14px 20px; color: var(--ink); text-decoration: none; box-shadow: 0 1px 0 #E6D8C6, 0 16px 28px -18px rgba(43, 29, 42, .5); }
.paper-label, .letter-from { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ci, var(--paper-ink)); }
.paper-text, .letter-text, .note-box textarea { display: block; font-family: var(--hand); font-size: 22px; line-height: 32px; background: repeating-linear-gradient(to bottom, transparent 0 25px, var(--rule) 25px 26.5px, transparent 26.5px 32px) local; }
.paper-text, .letter-text { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.letter { transform: rotate(-.6deg); transition: transform .2s; }
.letter:hover { transform: rotate(0deg); }
.seal { position: absolute; right: 14px; top: -14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #FFE9EF; background: var(--c, var(--pink)); background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c, var(--pink)) 70%, white), var(--c, var(--pink)) 55%, color-mix(in srgb, var(--c, var(--pink)) 70%, black)); box-shadow: 0 3px 6px rgba(43, 29, 42, .28); }
.seal .ic { fill: currentColor; stroke: none; }

/* ---------- Segments et pastilles ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 5px; background: var(--paper-2); border-radius: 18px; box-shadow: inset 0 1px 2px rgba(43, 29, 42, .06); }
.seg-item { min-height: 44px; border-radius: 14px; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--soft); display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; padding: 0 6px; transition: background-color .15s; }
.seg-item[aria-current="true"], .seg-item[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 800; box-shadow: var(--sh1); }
.seg-item[aria-current="true"] .count, .seg-item[aria-pressed="true"] .count { background: var(--ink); color: var(--cream); }
.pill { min-height: 42px; padding: 0 16px; border-radius: 21px; border: 1.5px solid var(--line3); background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 750; transition: background-color .15s; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.choice { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.choice .pill { padding: 0 8px; border-radius: 14px; }

/* ---------- Aujourd'hui : le billet et les timbres ---------- */
.countdowns { display: flex; flex-direction: column; gap: 12px; }
.ticket { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 84px; text-decoration: none; background: var(--ink); color: var(--cream); border-radius: 24px; overflow: hidden; box-shadow: 0 2px 2px rgba(43, 29, 42, .08), 0 18px 32px -16px rgba(43, 29, 42, .7); transition: transform .2s; }
.ticket:hover { transform: translateY(-2px); }
.ticket::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 120% at 100% 100%, rgba(118, 63, 122, .55), transparent 62%); pointer-events: none; }
.t-main { position: relative; z-index: 1; padding: 22px 18px 18px 20px; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.t-n { display: block; font-family: var(--title); font-weight: 500; font-size: 78px; line-height: .86; letter-spacing: -.03em; font-variation-settings: 'SOFT' 100; }
.t-unit { font-size: 21px; font-style: italic; font-weight: 400; letter-spacing: 0; margin-left: 8px; color: var(--on-ink); }
.t-word { font-size: 46px; line-height: 1; font-style: italic; }
.t-title { display: block; margin-top: 10px; font-family: var(--title); font-style: italic; font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }
.t-stub { position: relative; z-index: 1; border-left: 2px dashed rgba(255, 244, 230, .26); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 16px 4px 10px; text-align: center; }
.t-stub::before, .t-stub::after { content: ''; position: absolute; left: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); }
.t-stub::before { top: -11px; }
.t-stub::after { bottom: -11px; }
.t-wd, .t-m { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink); }
.t-d { font-family: var(--title); font-size: 36px; font-weight: 600; line-height: 1; font-variation-settings: 'SOFT' 100; }

.stamps { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stamp { display: block; text-decoration: none; color: var(--ink); padding: 6px; background: radial-gradient(circle at 6px 6px, transparent 2.9px, var(--card) 3.3px) -6px -6px / 12px 12px; filter: drop-shadow(0 2px 2px rgba(43, 29, 42, .14)); transition: transform .2s; }
.stamp:nth-child(odd) { transform: rotate(-.8deg); }
.stamp:nth-child(even) { transform: rotate(.7deg); }
.stamp:hover { transform: rotate(0deg) translateY(-2px); }
.stamp-in { --k: var(--us); position: relative; display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1.5px solid var(--k); border-radius: 4px; padding: 12px 12px 10px; }
.stamp-in > .ic { position: absolute; right: 10px; top: 10px; color: var(--k); }
.stamp-n { display: block; font-family: var(--title); font-size: 42px; font-weight: 600; line-height: .95; letter-spacing: -.02em; color: var(--k); font-variation-settings: 'SOFT' 100; }
.stamp-n small { font-size: 15px; font-style: italic; font-weight: 400; margin-left: 4px; letter-spacing: 0; color: var(--ink); }
.stamp-word { font-size: 26px; font-style: italic; }
.stamp-t { display: block; margin-top: 8px; font-size: 14px; font-weight: 750; line-height: 1.2; overflow-wrap: anywhere; }
.stamp-d { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.quick { display: flex; flex-direction: column; gap: 10px; }
.dot-i { width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--ct); color: var(--ci); display: inline-flex; align-items: center; justify-content: center; font-weight: 850; font-size: 12px; }
.nudge { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--ct); color: var(--ci); font-weight: 750; }
.nudge .ic { animation: bat 1.8s ease-in-out infinite; fill: currentColor; }
.status-ok { position: relative; min-height: 56px; border-radius: 20px; background: var(--ct); color: var(--ci); display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px 18px; font-size: 15px; font-weight: 750; animation: monte .3s ease-out both; }
.status-ok::before, .status-ok::after { content: '\2665'; position: absolute; bottom: 60%; font-size: 20px; color: var(--c); opacity: 0; animation: envole 1.4s ease-out .1s both; }
.status-ok::before { left: 22%; }
.status-ok::after { right: 24%; font-size: 15px; animation-delay: .3s; }
@keyframes envole { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px) scale(1.15); } }
.tz-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--us-t); color: var(--us-i); font-size: 13px; font-weight: 700; }

/* ---------- Agenda ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav h2 { font-size: 22px; font-style: italic; font-weight: 500; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 1.5px solid var(--line3); background: var(--card); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--ink); transition: background-color .15s; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn:disabled { opacity: .4; }
.month { padding: 12px 8px 8px; }
.wd, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wd span { text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--muted); padding: 2px 0 8px; }
.day { position: relative; min-height: 50px; border: 0; background: none; padding: 4px 0 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 14px; font-size: 14.5px; font-weight: 650; color: var(--ink); }
.day:hover { background: var(--line2); }
.day-n { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.day.today .day-n { background: var(--ink); color: var(--cream); font-weight: 800; }
.day[aria-pressed="true"] { background: var(--paper-2); }
.day.pinned .day-n { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--us); }
.day.out { visibility: hidden; }
.dots { display: flex; gap: 3px; height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.ev-date { width: 46px; flex: none; text-align: center; line-height: 1.05; }
.ev-date b { display: block; font-family: var(--title); font-size: 24px; font-weight: 600; font-variation-settings: 'SOFT' 100; }
.ev-date span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.ev-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); flex: none; }

/* ---------- Idées ---------- */
.add-bar { display: flex; gap: 8px; }
.add-bar input { flex: 1; min-width: 0; }
/* Sur un petit téléphone, le bouton « Ajouter » ne garde que son + (le mot reste lu par les lecteurs d'écran) */
@media (max-width: 430px) {
  .btn-add { flex: none; width: 50px; padding: 0; }
  .add-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.idea { padding: 16px 16px 14px 18px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.idea.flash { box-shadow: 0 0 0 3px var(--us), var(--sh2); }
.idea.dim { opacity: .7; }
.idea-top { display: flex; align-items: flex-start; gap: 8px; }
.idea-top .icon-btn { border-color: transparent; background: var(--paper); }
.idea-title { font-family: var(--title); font-weight: 600; font-size: 21px; line-height: 1.15; overflow-wrap: anywhere; }
.idea-img { width: 100%; max-height: 240px; object-fit: cover; border-radius: 14px; background: var(--paper-2); }
.votes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vote { min-height: 46px; border-radius: 15px; border: 1.5px solid var(--line3); background: var(--card); font-size: 14px; font-weight: 800; color: var(--ink); padding: 0 4px; transition: transform .12s, background-color .15s; }
.vote:active { transform: scale(.96); }
.vote[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.vote.v-si[aria-pressed="true"] { background: var(--us); border-color: var(--us); color: var(--white); }
.vote.v-pq[aria-pressed="true"] { background: var(--us-t); border-color: var(--us); color: var(--us-i); }
.vote.v-bof[aria-pressed="true"] { background: var(--muted); border-color: var(--muted); color: var(--white); }
.outcome { border-radius: 16px; padding: 14px 16px; font-size: 14.5px; font-weight: 750; display: flex; flex-direction: column; gap: 10px; }
.outcome-match { background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .16) 0 2.5px, transparent 3.5px) 0 0 / 26px 24px, radial-gradient(circle at 70% 75%, rgba(217, 194, 212, .3) 0 2px, transparent 3px) 0 0 / 38px 34px, var(--us); color: var(--white); }
.outcome-match a { color: var(--white); }
.outcome-match .btn-dark { background: var(--cream); color: var(--ink); border-color: var(--cream); box-shadow: none; }
.outcome-wait { background: var(--paper-2); color: var(--soft); }
.outcome-no { background: var(--paper-2); color: var(--soft); }
.trip-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 20px; background: var(--ink); color: var(--cream); text-decoration: none; overflow: hidden; box-shadow: var(--sh2); }
.trip-card > .ic { width: 42px; height: 42px; padding: 9px; border-radius: 14px; background: rgba(255, 244, 230, .1); color: var(--on-ink); }
.trip-card .li-title { font-family: var(--title); font-size: 20px; font-weight: 600; }
.trip-card .muted { color: #CDBBC6; }
.badge { padding: 5px 11px; border-radius: 12px; background: var(--on-ink); color: var(--ink); font-size: 12.5px; font-weight: 850; white-space: nowrap; }

/* ---------- Fiche voyage : la carte d'embarquement ---------- */
.pass { position: relative; background: var(--ink); color: var(--cream); border-radius: 26px; padding: 22px 20px 20px; overflow: hidden; box-shadow: 0 2px 2px rgba(43, 29, 42, .08), 0 18px 32px -16px rgba(43, 29, 42, .7); }
.pass-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pass-k { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--on-ink); }
.pass h1 { font-size: 40px; margin-top: 8px; overflow-wrap: anywhere; }
.pass-route { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 0; border-top: 2px dashed rgba(255, 244, 230, .2); border-bottom: 2px dashed rgba(255, 244, 230, .2); }
.pass-route b { font-family: var(--title); font-size: 30px; font-weight: 600; letter-spacing: .04em; font-variation-settings: 'SOFT' 100; }
.pass-line { flex: 1; position: relative; display: flex; justify-content: center; color: var(--on-ink); }
.pass-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dotted rgba(255, 244, 230, .35); }
.pass-line .ic { position: relative; background: var(--ink); padding: 0 6px; width: 32px; transform: rotate(45deg); }
.pass-info { margin-top: 14px; font-size: 14px; font-weight: 700; }
.pass-sub { margin-top: 3px; font-size: 13px; color: #CDBBC6; }
.flights { min-height: 54px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line3); color: var(--ink); text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 800; padding: 0 16px; text-align: center; box-shadow: var(--sh1); }
.flights .ic { color: var(--us); }
.flights:hover { border-color: #C4B29C; color: var(--ink); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; box-shadow: var(--sh1); }
.stops { list-style: none; margin: 0; padding: 10px 16px; }
.stops li { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 10px 0 12px; }
.stops li::before { content: ''; position: absolute; left: 103px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.stops li:first-child::before { top: 16px; }
.stops li:last-child::before { bottom: calc(100% - 16px); }
.stops li::after { content: ''; position: absolute; left: 98px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--us); }
.stop-d { font-size: 12px; font-weight: 750; color: var(--muted); padding-top: 2px; line-height: 1.3; }
.stop-p { padding-left: 12px; font-family: var(--title); font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.stop-n { display: block; margin-top: 2px; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); }
.stop-bday { display: block; margin-top: 3px; font-family: var(--font); font-size: 12px; font-weight: 800; color: var(--ci); }

/* ---------- Listes et tâches ---------- */
.task-li { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-bottom: 1px dashed var(--line); min-height: 60px; }
.task-li:last-child { border-bottom: 0; }
.st-btn { width: 44px; height: 44px; flex: none; border: 0; background: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.st { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #A08E84; display: flex; align-items: center; justify-content: center; color: var(--white); transition: background-color .2s; }
.st-1 { border-color: var(--us); background: conic-gradient(var(--us) 0 50%, transparent 0); }
.st-2 { border-color: var(--us); background: var(--us); }
.done-t { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(43, 29, 42, .35); }
.thank { flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 0; background: var(--ct); color: var(--ci); font-size: 13px; font-weight: 800; }
.check-li { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-bottom: 1px dashed var(--line); min-height: 54px; }
.check-li:last-child { border-bottom: 0; }
.list > li.task-li { padding: 6px 14px 6px 6px; gap: 10px; }
.list > li.check-li { padding: 4px 6px; gap: 6px; min-height: 54px; }
.check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid #A08E84; display: flex; align-items: center; justify-content: center; color: var(--white); transition: background-color .2s; }
.check.on { background: var(--us); border-color: var(--us); }

/* ---------- Nous deux ---------- */
.us-head h1 { font-size: 40px; }
.us-since { margin-top: 6px; font-size: 16px; font-weight: 650; color: var(--soft); }
.us-since em { font-family: var(--title); font-style: italic; font-size: 28px; font-weight: 600; color: var(--ci); line-height: 1; font-variation-settings: 'SOFT' 100; }
.note-box { padding-top: 16px; }
.note-box textarea { width: 100%; min-height: 128px; padding: 0; border: 0; border-radius: 0; resize: vertical; color: var(--ink); }
.note-box textarea:focus { outline: none; }
.note-box:focus-within { box-shadow: 0 0 0 3px rgba(43, 29, 42, .14), 0 16px 28px -18px rgba(43, 29, 42, .5); }
.note-box textarea::placeholder { color: #B7A7AE; }
.note-box .sheet-actions .btn { border-radius: 14px; }
.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; padding-top: 6px; }
.note-card { position: relative; margin: 0; background: var(--letter); border-radius: 6px; padding: 18px 14px 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-width: 0; box-shadow: 0 1px 0 #E6D8C6, 0 12px 22px -16px rgba(43, 29, 42, .5); }
.note-card:nth-child(odd) { transform: rotate(-1.2deg); }
.note-card:nth-child(even) { transform: rotate(1deg); }
.note-card::before { content: ''; position: absolute; top: -8px; left: 50%; width: 58px; height: 18px; margin-left: -29px; background: var(--ct); background: color-mix(in srgb, var(--c) 55%, transparent); transform: rotate(-3deg); border-radius: 2px; }
.note-card blockquote { margin: 0; font-family: var(--hand); font-size: 19px; line-height: 1.3; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-card figcaption { font-size: 11.5px; font-weight: 800; color: var(--ci); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.ph { position: relative; aspect-ratio: .86; border-radius: 3px; overflow: hidden; border: 0; padding: 6px 6px 22px; background: var(--white); display: block; width: 100%; box-shadow: 0 1px 2px rgba(43, 29, 42, .1), 0 10px 18px -12px rgba(43, 29, 42, .5); transition: transform .2s; }
.ph:nth-child(3n+1) { transform: rotate(-1.6deg); }
.ph:nth-child(3n+2) { transform: rotate(1.2deg); }
.ph:nth-child(3n) { transform: rotate(-.6deg); }
.ph:hover { transform: rotate(0deg) scale(1.03); }
.ph img, .ph > div { width: 100%; height: 100%; object-fit: cover; background: var(--paper-2); }
.ph-add { padding: 6px; border: 2px dashed var(--line3); background: transparent; box-shadow: none; color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 800; }
.photos .ph-add { transform: none; }
.year-ago { display: block; background: var(--white); padding: 10px 10px 4px; border-radius: 4px; transform: rotate(-1deg); color: var(--ink); text-decoration: none; }
.year-ago img { width: 100%; max-height: 280px; object-fit: cover; }
.year-ago div { padding: 10px 6px 10px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 800; }
.label span { font-weight: 600; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 0 16px; border: 1.5px solid var(--line3); border-radius: 16px; background: var(--card); font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 96px; padding: 12px 16px; resize: vertical; }
.select { appearance: auto; }
.input::placeholder, .textarea::placeholder { color: #A8979F; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(43, 29, 42, .09); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.error { color: #A3262B; font-size: 13px; font-weight: 700; }

/* ---------- Feuilles (bas d'écran) ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(43, 29, 42, .46); display: flex; align-items: flex-end; justify-content: center; animation: fondu .2s ease-out both; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--paper) var(--grain); border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; animation: monte .26s cubic-bezier(.2, .8, .2, 1) both; box-shadow: 0 -10px 40px -10px rgba(43, 29, 42, .4); }
.sheet::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line3); }
.sheet h2 { font-size: 24px; }
.sheet-full { max-height: 100vh; max-height: 100dvh; height: 100dvh; border-radius: 0; }
.sheet-full::before { display: none; }
@keyframes monte { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
.sheet-actions { display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; min-height: 50px; border-radius: 16px; font-size: 15px; }
.sheet-actions .btn-dark { flex: 1.4; }
.viewer img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 6px; background: #1E1418; }
.stop-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.stop-edit .input { min-height: 44px; font-size: 15px; padding: 0 10px; }
.stop-edit .wide { grid-column: 1 / 3; }

/* ---------- Messages ---------- */
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(96px + var(--safe-b)); width: calc(100% - 32px); max-width: 520px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; padding: 13px 16px; border-radius: 18px; background: var(--ink); color: var(--cream); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 14px 30px -12px rgba(43, 29, 42, .6); animation: monte .25s ease-out both; }
.toast button { min-height: 36px; border: 0; border-radius: 18px; padding: 0 14px; background: var(--cream); color: var(--ink); font-weight: 800; font-size: 13px; }
.offline { padding: 8px 14px; background: var(--paper-2); color: var(--soft); font-size: 13px; font-weight: 700; text-align: center; }

/* ---------- Connexion et première ouverture ---------- */
.welcome { padding: 40px 22px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
.welcome > .marque { margin: 8px 0 6px; }
.welcome h1 { font-size: 34px; text-align: center; }
.welcome > p { text-align: center; color: var(--soft); }
.welcome form { background: var(--card); border-radius: 24px; padding: 20px 18px; box-shadow: var(--sh2); border: 1px solid rgba(43, 29, 42, .06); }
.colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.color-opt { min-height: 54px; border-radius: 16px; border: 2px solid var(--line3); background: var(--card); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; }
.color-opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(43, 29, 42, .08); }
.color-opt:disabled { opacity: .45; }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }

/* ---------- Sur un grand écran (les PC) : la barre devient une colonne ---------- */
@media (min-width: 1000px) {
  .shell { max-width: none; margin: 0; padding-left: 256px; }
  .main { width: 100%; max-width: 820px; margin: 0 auto; padding: 44px 48px 64px; gap: 20px; }
  .tabbar { top: 0; bottom: 0; left: 0; transform: none; width: 256px; max-width: none; flex-direction: column; justify-content: flex-start; gap: 4px; padding: 28px 16px 20px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--card) var(--grain); box-shadow: none; }
  .brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; margin-bottom: 8px; border-bottom: 1px dashed var(--line3); text-decoration: none; color: var(--ink); }
  .brand .nid { width: 46px; height: 46px; }
  .brand b { display: block; font-family: var(--title); font-weight: 650; font-size: 30px; line-height: 1; font-variation-settings: 'SOFT' 100; }
  .brand small { display: block; margin-top: 3px; font-family: var(--hand); font-size: 15px; line-height: 1.1; color: var(--muted); }
  .tab { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 52px; padding: 0 10px; font-size: 15.5px; font-weight: 700; border-radius: 16px; }
  .tab .ic { width: 44px; height: 36px; padding: 6px 10px; border-radius: 12px; }
  .tab:hover { background: var(--paper); }
  .tab-dot { top: 8px; left: 42px; }
  .hello { font-size: 48px; }
  h1 { font-size: 40px; }
  .ticket { grid-template-columns: minmax(0, 1fr) 120px; }
  .t-n { font-size: 96px; }
  .t-d { font-size: 44px; }
  .stamps { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .letter { transform: none; }
  .quick { flex-direction: row; }
  .quick > * { flex: 1; }
  .notes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .toasts { left: calc(50% + 128px); bottom: 28px; }
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; max-height: 88vh; padding-bottom: 24px; }
  .sheet::before { display: none; }
  .sheet-full { height: auto; max-height: 92vh; border-radius: 28px; }
  .demo-bar { position: sticky; top: 0; z-index: 5; }
}
