/* Polices servies par le site lui-même (aucun appel à un autre site) : Suez One pour les titres hébreux,
   Marcellus pour les titres latins, Assistant pour le reste. Licence SIL Open Font License. */
@font-face { font-family: 'Assistant'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/Assistant-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Assistant'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/Assistant-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Marcellus'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Marcellus-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Suez One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/SuezOne-hebrew.woff2) format('woff2'); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Suez One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/SuezOne-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Mise en page : une colonne calme, les images des envois sont la seule couleur forte ;
   l'accent suit la catégorie (mêmes teintes que le calendrier Luach). */
:root {
  --bg: #f4f5f8; --surface: #ffffff; --sunken: #eaecf1; --line: #dfe2e9; --line-2: #c6cbd6;
  --ink: #171b26; --ink-2: #454d5e; --ink-3: #646c7e; --ink-inv: #ffffff;
  --join: #17794a; --join-ink: #ffffff;
  --cat-he: #5a3cc0; --cat-he-soft: #ece6fb; --cat-he-ring: #7a5ad6;
  --cat-en: #0b6b6d; --cat-en-soft: #dcf2f2; --cat-en-ring: #1ca1a1;
  --cat-fr: #765b00; --cat-fr-soft: #f5ecd0; --cat-fr-ring: #b18e15;
  --cat-ga: #99205f; --cat-ga-soft: #f8e3ee; --cat-ga-ring: #b12d75;
  --ribbon-bg: #171b26; --ribbon-ink: #f1f3f8;
  --scrim: rgba(8, 10, 15, .97); --lb-ink: #f1f3f8; --lb-dim: #a9b1c2;
  --shadow: 0 1px 2px rgba(23, 27, 38, .08), 0 10px 26px -14px rgba(23, 27, 38, .35);
  --focus: #1d5fd1;
  --font-ui: "Assistant", "Heebo", "Segoe UI", "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
  --font-display-he: "Suez One", "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --font-display-lat: "Marcellus", "Palatino Linotype", Palatino, Georgia, serif;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e121a; --surface: #161b26; --sunken: #0a0d14; --line: #283041; --line-2: #3a4458;
    --ink: #e8ebf2; --ink-2: #b1b9c9; --ink-3: #8891a3; --ink-inv: #0e121a;
    --join: #5fd39a; --join-ink: #0b1a12;
    --cat-he: #b9adfc; --cat-he-soft: #241c4a; --cat-he-ring: #8271e6;
    --cat-en: #6fd6d8; --cat-en-soft: #0c2e31; --cat-en-ring: #24a6a8;
    --cat-fr: #e0bb4d; --cat-fr-soft: #33280c; --cat-fr-ring: #97750d;
    --cat-ga: #f593bf; --cat-ga-soft: #3a1427; --cat-ga-ring: #b53772;
    --ribbon-bg: #e8ebf2; --ribbon-ink: #131722;
    --scrim: rgba(3, 5, 9, .97); --lb-ink: #f1f3f8; --lb-dim: #a9b1c2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 28px -14px rgba(0, 0, 0, .8);
    --focus: #7fb0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e121a; --surface: #161b26; --sunken: #0a0d14; --line: #283041; --line-2: #3a4458;
  --ink: #e8ebf2; --ink-2: #b1b9c9; --ink-3: #8891a3; --ink-inv: #0e121a;
  --join: #5fd39a; --join-ink: #0b1a12;
  --cat-he: #b9adfc; --cat-he-soft: #241c4a; --cat-he-ring: #8271e6;
  --cat-en: #6fd6d8; --cat-en-soft: #0c2e31; --cat-en-ring: #24a6a8;
  --cat-fr: #e0bb4d; --cat-fr-soft: #33280c; --cat-fr-ring: #97750d;
  --cat-ga: #f593bf; --cat-ga-soft: #3a1427; --cat-ga-ring: #b53772;
  --ribbon-bg: #e8ebf2; --ribbon-ink: #131722;
  --scrim: rgba(3, 5, 9, .97); --lb-ink: #f1f3f8; --lb-dim: #a9b1c2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 28px -14px rgba(0, 0, 0, .8);
  --focus: #7fb0ff;
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 17px; line-height: 1.5; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

#app[data-cat="he"] { --accent: var(--cat-he); --accent-soft: var(--cat-he-soft); --ring: var(--cat-he-ring); }
#app[data-cat="en"] { --accent: var(--cat-en); --accent-soft: var(--cat-en-soft); --ring: var(--cat-en-ring); }
#app[data-cat="fr"] { --accent: var(--cat-fr); --accent-soft: var(--cat-fr-soft); --ring: var(--cat-fr-ring); }
#app[data-cat="gaagouim"] { --accent: var(--cat-ga); --accent-soft: var(--cat-ga-soft); --ring: var(--cat-ga-ring); }

.wrap { max-width: 1120px; margin: 0 auto; padding-block: 0 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* En-tête */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding-block: 28px 20px; }
.head-id { display: flex; align-items: center; gap: 16px; flex: 1 1 300px; min-width: 0; }
.logo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring); }
.head h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 6vw, 46px); line-height: 1.1; letter-spacing: 0; text-wrap: balance; }
#app { --font-display: var(--font-display-he); }
#app[data-lang="en"], #app[data-lang="fr"] { --font-display: var(--font-display-lat); }
#app[data-lang="en"] .head h1, #app[data-lang="fr"] .head h1 { letter-spacing: .1em; }
.head .sub { margin: 4px 0 0; color: var(--ink-2); font-size: 16.5px; }
.join { flex: none; display: inline-flex; text-decoration: none; align-items: center; gap: 10px; border: 0; border-radius: 999px; background: var(--join); color: var(--join-ink); padding: 12px 22px; font-weight: 700; font-size: 17.5px; cursor: pointer; }
.join svg { width: 20px; height: 20px; flex: none; }
.join:hover { filter: brightness(1.08); }

.lead { margin: 0 0 18px; color: var(--ink-2); max-width: 62ch; }

/* Les quatre pages, rangées par langue : l'hébreu d'abord */
.cats { display: flex; flex-wrap: wrap; gap: 14px 28px; padding-block: 4px 16px; border-bottom: 1px solid var(--line); }
.cgrp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cgrp-l { color: var(--ink-2); font-size: 14.5px; font-weight: 700; padding-inline-start: 4px; }
.cgrp-r { display: flex; flex-wrap: wrap; gap: 8px; }
.cat { display: inline-flex; align-items: center; gap: 8px; padding: 6px; padding-inline-end: 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 16px; font-weight: 600; white-space: nowrap; }
.cat img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; }
.cat:hover { border-color: var(--line-2); color: var(--ink); }
.cat[aria-current="page"] { border-color: var(--ring); background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* Index des mois */
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px 4px; }
.months { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Taille des images, comme dans une galerie de photos */
.sizer { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.sizer .lbl { color: var(--ink-3); font-size: 15px; margin-inline-end: 2px; }
.sz { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.sz svg { width: 18px; height: 18px; }
.sz:hover { color: var(--ink); border-color: var(--ink-3); }
.sz[disabled] { opacity: .35; cursor: default; }
.sz-dots { display: inline-flex; align-items: center; gap: 5px; }
.sz-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.sz-dots i.on { width: 9px; height: 9px; background: var(--ring); }
.years { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; }
.years .lbl { color: var(--ink-3); font-size: 15px; margin-inline-end: 4px; }
.years .mchip[aria-current="page"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--ring); }
.months .lbl { color: var(--ink-3); font-size: 15px; margin-inline-end: 4px; }
.mchip { border: 0; text-decoration: none; display: inline-block; background: var(--sunken); color: var(--ink-2); border-radius: 8px; padding: 5px 11px; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.mchip:hover { color: var(--ink); background: var(--line); }
.mchip span { display: inline-block; min-width: 20px; text-align: center; color: var(--ink-2); background: var(--surface); border-radius: 999px; padding: 0 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; margin-inline-start: 8px; }

/* Un mois */
.month { padding-top: 28px; scroll-margin-top: 12px; }
.month-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 18px; }
.month-h h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1.2; }
#app[data-lang="en"] .month-h h2, #app[data-lang="fr"] .month-h h2 { font-size: 31px; }
.month-h .heb { color: var(--accent); font-weight: 600; font-size: 17px; }
.month-h .n { color: var(--ink-3); font-size: 15.5px; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 32px 24px; align-items: start; }
#feed.one .grid { max-width: 760px; }
#feed.compact .grid { gap: 18px 12px; }
#feed.compact .item { gap: 6px; }
#feed.compact .shot { border-radius: 7px; }
#feed.compact .when { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
#feed.compact .heb-date { font-size: 13.5px; }
#feed.compact .src, #feed.compact .acts { display: none; }
#feed.tiny .grid { gap: 10px 8px; }
#feed.tiny .cap { display: none; }

/* Un envoi */
.item { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.shot { display: block; width: 100%; padding: 0; border: 0; background: var(--sunken); border-radius: var(--r); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; }
.item.flash .shot { outline: 3px solid var(--ring); outline-offset: 3px; }
.cap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.when { font-weight: 700; font-size: 17.5px; }
.heb-date { color: var(--accent); font-size: 16.5px; font-weight: 600; }
.src { color: var(--ink-3); font-size: 15.5px; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.act { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: 6px 11px; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.act svg { width: 16px; height: 16px; flex: none; }
.act:hover { color: var(--ink); border-color: var(--ink-3); }
.act.also { border-style: dashed; }
.also-grp { display: inline-flex; align-items: center; gap: 8px; }
.also-lbl { color: var(--ink-3); font-size: 15px; }

.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 15.5px; }
.foot p { margin: 0; }
.empty { color: var(--ink-2); padding-block: 40px; font-size: 18px; }

/* Page d'un seul envoi (celle que l'on partage) */
.solo { max-width: 760px; margin: 8px auto 0; }
.solo .item { gap: 14px; }
.solo .shot { cursor: default; }
.back { display: inline-flex; margin-top: 28px; font-weight: 700; color: var(--accent); }
html.nojs .sizer { display: none; }

/* Image en grand */
dialog.lb { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: var(--scrim); color: var(--lb-ink); }
dialog.lb::backdrop { background: transparent; }
.lb-in { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(14px, env(safe-area-inset-right, 0px)) 6px max(14px, env(safe-area-inset-left, 0px)); }
.lb-count { color: var(--lb-dim); font-size: 15.5px; font-variant-numeric: tabular-nums; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(241, 243, 248, .28); background: rgba(241, 243, 248, .08); color: var(--lb-ink); cursor: pointer; }
.lb-btn:hover { background: rgba(241, 243, 248, .18); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn[disabled] { opacity: .3; cursor: default; }
.lb-stage { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 0; padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.lb-stage img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; border-radius: 6px; flex: 0 1 auto; }
.lb-nav { flex: none; }
#lb-img { cursor: zoom-in; }
.lb-stage.zoom { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lb-stage { touch-action: pan-x pan-y; }
.lb-stage.zoom img { max-width: none; max-height: none; flex: none; margin: auto; cursor: grab; }
.lb-stage.zoom img.drag { cursor: grabbing; }
.lb-stage.zoom .lb-nav { display: none; }
.lb-tools { display: inline-flex; gap: 8px; }
.lb-cap { text-align: center; padding: 10px 16px 14px; font-size: 16px; color: var(--lb-dim); }
.lb-cap b { display: block; color: var(--lb-ink); font-weight: 700; font-size: 17px; }
@media (max-width: 640px) {
  .lb-stage { position: relative; }
  .lb-nav { position: absolute; bottom: 8px; }
  .lb-nav.prev { inset-inline-start: 12px; }
  .lb-nav.next { inset-inline-end: 12px; }
  .head { padding-block: 20px 16px; }
  .logo { width: 60px; height: 60px; }
  .join { width: 100%; justify-content: center; }
}

.toast { position: fixed; inset-inline: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; pointer-events: none; z-index: 50; padding-inline: 16px; }
.toast[hidden] { display: none; }
.toast div { max-width: 520px; background: var(--ribbon-bg); color: var(--ribbon-ink); border-radius: 10px; padding: 11px 16px; font-size: 16px; box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) {
  .shot img { transition: transform .25s ease; }
  .shot:hover img { transform: scale(1.015); }
}
