/* ============================================================
   OHR ITSHAK — web app
   Palette issue du logo : bordeaux, or, ivoire.
   ============================================================ */
:root {
  --wine-950: #1e070d;
  --wine-900: #2a0a12;
  --wine-800: #3d0f1c;
  --wine-700: #561526;
  --wine-600: #7a1c2e;
  --wine-500: #9b2438;

  --gold-700: #8f6a1e;
  --gold-600: #b8892a;
  --gold-500: #d4a843;
  --gold-400: #e8c97a;
  --gold-300: #f5e4b0;

  --ivory-50: #fffdf8;
  --ivory-100: #fbf7ef;
  --ivory-200: #f4ecdd;
  --ivory-300: #e9dcc4;

  --ink: #1f0e08;
  --ink-2: #4a2c1c;
  --ink-3: #8a6b55;

  --hair: rgba(184, 137, 42, 0.24);
  --hair-strong: rgba(184, 137, 42, 0.45);

  --foil: linear-gradient(105deg, #a87a22 0%, #e8c97a 28%, #fff1c6 44%, #d4a843 58%, #9c7020 100%);
  --foil-soft: linear-gradient(105deg, #c79a3a, #f1d78f 45%, #c99a36);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 14px 34px -22px rgba(61, 15, 28, 0.45), 0 2px 6px -3px rgba(61, 15, 28, 0.12);
  --shadow-deep: 0 24px 50px -24px rgba(30, 7, 13, 0.75);

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-text: "EB Garamond", Georgia, serif;
  --f-hebrew: "Frank Ruhl Libre", "David", serif;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--wine-950); }
body {
  min-height: 100dvh;
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--wine-950);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.he { font-family: var(--f-hebrew); direction: rtl; unicode-bidi: isolate; }
.tnum { font-variant-numeric: lining-nums tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Coque ---------- */
.shell {
  position: relative;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(232, 201, 122, 0.10), transparent 60%),
    var(--ivory-100);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px);
  overflow-x: hidden;
}
@media (min-width: 560px) {
  body {
    background:
      radial-gradient(60% 50% at 50% 0%, rgba(212, 168, 67, 0.14), transparent 70%),
      radial-gradient(80% 80% at 50% 100%, var(--wine-800), var(--wine-950));
    padding: 28px 0;
  }
  .shell { min-height: calc(100dvh - 56px); border-radius: 34px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 168, 67, 0.25); }
}

/* ---------- Texte or ---------- */
.foil {
  background: var(--foil);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.eyebrow {
  font-family: var(--f-display);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-600);
}

/* ---------- Ornement ---------- */
.ornament { display: flex; align-items: center; gap: 10px; color: var(--gold-500); }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.ornament::after { background: linear-gradient(90deg, currentColor, transparent); }
.ornament svg { width: 14px; height: 14px; flex: none; }

/* ============================================================
   HERO (accueil)
   ============================================================ */
.hero {
  position: relative;
  color: var(--ivory-100);
  text-align: center;
  padding: calc(var(--safe-t) + 26px) 24px 74px;
  background:
    radial-gradient(90% 70% at 50% -10%, rgba(232, 201, 122, 0.28), transparent 62%),
    radial-gradient(70% 60% at 100% 100%, rgba(155, 36, 56, 0.55), transparent 70%),
    linear-gradient(170deg, var(--wine-700) 0%, var(--wine-800) 45%, var(--wine-900) 100%);
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* filigrane */
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: 0.09;
  background-image:
    radial-gradient(circle at 50% 50%, transparent 58%, var(--gold-400) 59%, transparent 60%),
    radial-gradient(circle at 50% 50%, transparent 70%, var(--gold-400) 70.6%, transparent 71.2%);
  background-size: 120px 120px;
  background-position: center -30px;
}
.hero::after { /* liseré bas */
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 10px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 201, 122, 0.55), transparent);
}
.hero-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.hero-bar .hb-left, .hero-bar .hb-right {
  font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(245, 228, 176, 0.72);
}
.medallion {
  width: 104px; height: 104px; margin: 0 auto 16px;
  border-radius: 50%;
  padding: 3px;
  background: var(--foil);
  box-shadow: 0 0 0 6px rgba(232, 201, 122, 0.08), 0 18px 40px -12px rgba(0, 0, 0, 0.6);
}
.medallion img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.hero h1 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 36px;
  letter-spacing: 0.08em;
  line-height: 1.05;
  margin-top: 6px;
}
.hero .he-name { font-size: 22px; color: var(--gold-400); margin-top: 6px; letter-spacing: 0.02em; }
.hero .ornament { max-width: 210px; margin: 16px auto 14px; }
.hero .civil { font-family: var(--f-serif); font-size: 19px; font-weight: 500; color: var(--ivory-100); }
.hero .hdate { margin-top: 2px; font-size: 15px; color: rgba(245, 228, 176, 0.8); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hero .hdate .he { font-size: 16px; }

/* ============================================================
   CONTENU
   ============================================================ */
.content { padding: 0 18px; }
.lift { margin-top: -50px; position: relative; z-index: 2; }
.stack > * + * { margin-top: 14px; }

.card {
  background: var(--ivory-50);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 18px 18px; }

.sec-title {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 4px 12px;
  font-family: var(--f-display); font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--wine-600);
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair-strong), transparent); }
.sec-title[id] { scroll-margin-top: 16px; } /* cible d'un lien (ex. #/compte?voir=recus) ; sur bureau, place pour la barre supérieure collante */
@media (min-width: 1024px) { .sec-title[id] { scroll-margin-top: 96px; } }

/* ---------- Carte Chabbat ---------- */
.shabbat {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 18px 18px;
  background:
    linear-gradient(var(--ivory-50), var(--ivory-50)) padding-box,
    linear-gradient(135deg, var(--gold-400), rgba(184, 137, 42, 0.15) 40%, var(--gold-500)) border-box;
  border: 1px solid transparent;
}
.shabbat .s-par { font-family: var(--f-display); font-size: 20px; color: var(--wine-600); letter-spacing: 0.03em; line-height: 1.15; margin-top: 4px; }
.shabbat .s-par-he { font-size: 17px; color: var(--ink-3); margin-top: 2px; text-align: left; }
.shabbat .s-date { font-size: 14px; color: var(--ink-3); margin-top: 4px; }
.shabbat .s-times { display: flex; gap: 16px; text-align: center; }
.shabbat .s-times small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.shabbat .s-times b { font-family: var(--f-serif); font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.shabbat .s-icon { width: 22px; height: 22px; color: var(--gold-600); margin: 0 auto 2px; display: block; }
.holiday-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 14px; color: var(--wine-600);
  padding: 4px 12px; border-radius: 999px; background: rgba(122, 28, 46, 0.06); border: 1px solid rgba(122, 28, 46, 0.14);
}

/* ---------- Tuiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 118px; padding: 16px;
  border-radius: var(--r-md);
  background: var(--ivory-50);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tile:active { transform: scale(0.97); }
.tile .t-ic {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--gold-600);
  background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200));
  border: 1px solid var(--hair-strong);
}
.tile .t-ic svg { width: 21px; height: 21px; }
.tile .t-name { font-family: var(--f-display); font-size: 15px; font-weight: 500; letter-spacing: 0.03em; color: var(--ink); margin-top: 12px; }
.tile .t-sub { font-size: 13.5px; color: var(--ink-3); line-height: 1.25; }
.tile.dark {
  background: linear-gradient(160deg, var(--wine-600), var(--wine-800));
  border-color: rgba(212, 168, 67, 0.4);
}
.tile.dark .t-name { color: var(--ivory-100); }
.tile.dark .t-sub { color: rgba(245, 228, 176, 0.75); }
.tile.dark .t-ic { background: rgba(232, 201, 122, 0.12); border-color: rgba(232, 201, 122, 0.4); color: var(--gold-400); }
.tile .t-arrow { position: absolute; top: 16px; right: 14px; width: 16px; height: 16px; color: var(--gold-500); opacity: 0.7; }

/* ---------- Bannière don ---------- */
.don-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px;
  border-radius: var(--r-lg);
  color: var(--ivory-100);
  background:
    radial-gradient(100% 140% at 0% 0%, rgba(232, 201, 122, 0.22), transparent 55%),
    linear-gradient(135deg, var(--wine-600), var(--wine-900));
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(212, 168, 67, 0.35) inset;
}
.don-banner .db-ic { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--foil); color: var(--wine-900); }
.don-banner .db-ic svg { width: 26px; height: 26px; }
.don-banner h3 { font-family: var(--f-display); font-weight: 500; font-size: 17px; letter-spacing: 0.04em; }
.don-banner p { font-size: 14.5px; color: rgba(245, 228, 176, 0.8); line-height: 1.3; margin-top: 2px; }

/* ---------- Pied ---------- */
.foot { text-align: center; padding: 34px 24px 10px; color: var(--ink-3); }
.foot .quote { font-family: var(--f-serif); font-style: italic; font-size: 18px; color: var(--wine-600); }
.foot .ornament { max-width: 140px; margin: 0 auto 12px; }
.foot .credits { font-size: 12px; margin-top: 10px; line-height: 1.5; }

/* ============================================================
   EN-TÊTE DES PAGES INTÉRIEURES
   ============================================================ */
.phead {
  position: relative;
  color: var(--ivory-100);
  padding: calc(var(--safe-t) + 14px) 18px 58px;
  text-align: center;
  background:
    radial-gradient(90% 90% at 50% -20%, rgba(232, 201, 122, 0.22), transparent 60%),
    linear-gradient(170deg, var(--wine-700), var(--wine-900));
  border-bottom-left-radius: 30px; border-bottom-right-radius: 30px;
}
.phead .back {
  position: absolute; left: 12px; top: calc(var(--safe-t) + 10px);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold-400);
  background: rgba(232, 201, 122, 0.08); border: 1px solid rgba(232, 201, 122, 0.2);
}
.phead .back svg { width: 18px; height: 18px; }
.phead .p-eyebrow { margin-top: 6px; }
.phead h1 { font-family: var(--f-display); font-weight: 500; font-size: 28px; letter-spacing: 0.06em; margin-top: 6px; }
.phead .p-he { font-size: 18px; color: var(--gold-400); margin-top: 2px; }
.phead .ornament { max-width: 150px; margin: 12px auto 0; }

/* ---------- Sélecteur de date ---------- */
.daypick {
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  padding: 10px;
}
.daypick button {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--wine-600);
  border: 1px solid var(--hair); background: var(--ivory-100);
}
.daypick button svg { width: 18px; height: 18px; }
.daypick .dp-mid { text-align: center; }
.daypick .dp-date { font-family: var(--f-display); font-size: 16px; letter-spacing: 0.03em; color: var(--ink); }
.daypick .dp-heb { font-size: 14px; color: var(--ink-3); }
.daypick .dp-today {
  display: inline-block; margin-top: 4px; font-size: 12px; color: var(--gold-700);
  font-family: var(--f-display); letter-spacing: 0.18em; text-transform: uppercase;
}

/* ---------- Liste de zmanim ---------- */
.zlist { padding: 4px 0; }
.zrow {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 13px 18px;
}
.zrow + .zrow { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.zrow .z-fr { font-size: 17.5px; color: var(--ink); line-height: 1.2; }
.zrow .z-fr em { font-style: italic; color: var(--ink-3); font-size: 15px; }
.zrow .z-he { display: block; font-size: 14.5px; color: var(--ink-3); margin-top: 2px; text-align: left; direction: rtl; }
.zrow .z-t { text-align: right; }
.zrow .z-t b { font-family: var(--f-serif); font-weight: 600; font-size: 25px; color: var(--ink); letter-spacing: 0.01em; }
.zrow .z-t small { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: -2px; }
.zrow.major .z-t b { color: var(--wine-600); }
.zrow.gold .z-t b { color: var(--gold-700); }
.zrow.past { opacity: 0.45; }
.zrow.next { background: linear-gradient(90deg, rgba(232, 201, 122, 0.22), rgba(232, 201, 122, 0.04)); }
.zrow.next::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--foil); }
.pill {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-family: var(--f-display); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  color: var(--wine-900); background: var(--foil-soft);
}
.pill.muted { color: var(--ink-3); background: var(--ivory-200); }
.note { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; padding: 14px 6px 0; }
.note b { color: var(--ink-2); font-weight: 600; }

/* ---------- Offices ---------- */
.today-offices { display: grid; grid-template-columns: repeat(3, 1fr); }
.today-offices .to { text-align: center; padding: 18px 6px; }
.today-offices .to + .to { border-left: 1px solid rgba(184, 137, 42, 0.16); }
.today-offices .to .he { display: block; font-size: 15px; color: var(--ink-3); }
.today-offices .to .n { font-family: var(--f-display); font-size: 14.5px; letter-spacing: 0.04em; color: var(--wine-600); margin-top: 2px; }
.today-offices .to b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 30px; line-height: 1.1; margin-top: 6px; }
.today-offices .to b.txt { font-family: var(--f-text); font-size: 16px; font-weight: 500; font-style: italic; color: var(--ink-3); line-height: 1.9; }
.today-offices .to.next { background: linear-gradient(180deg, rgba(232, 201, 122, 0.25), transparent); }
.today-offices .to.past { opacity: 0.45; }

.week { padding: 4px 0; }
.wrow { display: grid; grid-template-columns: 76px repeat(3, 1fr); align-items: center; padding: 12px 14px; }
.wrow + .wrow { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.wrow.head { padding-top: 14px; padding-bottom: 8px; }
.wrow.head span { font-family: var(--f-display); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.wrow .wd { line-height: 1.15; }
.wrow .wd b { font-family: var(--f-display); font-size: 14px; font-weight: 500; color: var(--ink); letter-spacing: 0.03em; }
.wrow .wd small { display: block; font-size: 13px; color: var(--ink-3); }
.wrow .wt { text-align: center; font-family: var(--f-serif); font-weight: 600; font-size: 20px; }
.wrow .wt.txt { font-family: var(--f-text); font-size: 13px; font-style: italic; font-weight: 400; color: var(--ink-3); line-height: 1.2; }
.wrow.is-today { background: linear-gradient(90deg, rgba(232, 201, 122, 0.25), rgba(232, 201, 122, 0.05)); }
.wrow.is-shab { background: rgba(122, 28, 46, 0.045); }
.wrow.is-shab .wd b { color: var(--wine-600); }

/* ---------- Cours ---------- */
.course { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 16px; align-items: center; }
.course + .course { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.course .c-when {
  text-align: center; padding: 10px 4px; border-radius: 14px;
  background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); color: var(--ivory-100);
}
.course .c-when small { display: block; font-family: var(--f-display); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-400); }
.course .c-when b { font-family: var(--f-serif); font-weight: 600; font-size: 22px; line-height: 1.1; }
.course h3 { font-family: var(--f-display); font-size: 16px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); }
.course p { font-size: 15px; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }

/* ---------- Dons ---------- */
.don-hero { text-align: center; padding: 26px 22px 24px; }
.don-hero .dh-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--foil); color: var(--wine-900); box-shadow: 0 10px 24px -10px rgba(143, 106, 30, 0.7); }
.don-hero .dh-ic svg { width: 30px; height: 30px; }
.don-hero h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: 0.04em; color: var(--wine-600); }
.don-hero p { font-size: 16.5px; color: var(--ink-2); margin-top: 8px; }
.don-hero .verse { font-family: var(--f-serif); font-style: italic; font-size: 17px; color: var(--ink-3); margin-top: 14px; }
.don-hero .verse .he { display: block; font-style: normal; font-size: 19px; color: var(--wine-600); margin-bottom: 2px; }

.btn-gold {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; margin-top: 20px; padding: 0 22px;
  border-radius: 999px;
  font-family: var(--f-display); font-size: 14px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--wine-950);
  background: var(--foil);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 26px -12px rgba(143, 106, 30, 0.8);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-gold:active { transform: scale(0.98); filter: brightness(0.96); }
.btn-gold svg { width: 18px; height: 18px; }
.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; margin-top: 12px; border-radius: 999px;
  font-family: var(--f-display); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--wine-600); border: 1px solid var(--hair-strong); background: transparent;
}
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin-top: 12px; }
.secure svg { width: 14px; height: 14px; }

/* ---------- Listes (liens, compte) ---------- */
.lrow { display: grid; grid-template-columns: 44px 1fr 18px; gap: 14px; align-items: center; padding: 15px 16px; }
.lrow + .lrow { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.lrow .l-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); border: 1px solid var(--hair-strong); }
.lrow .l-ic svg { width: 20px; height: 20px; }
.lrow h3 { font-family: var(--f-display); font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }
.lrow p { font-size: 14.5px; color: var(--ink-3); line-height: 1.25; }
.lrow .l-go { width: 18px; height: 18px; color: var(--gold-500); }
.lrow.locked { opacity: 0.85; }

.member-hero { text-align: center; padding: 26px 22px; }
.member-hero .lock { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-400); background: linear-gradient(160deg, var(--wine-600), var(--wine-900)); box-shadow: 0 0 0 4px rgba(232, 201, 122, 0.18); }
.member-hero .lock svg { width: 26px; height: 26px; }
.member-hero h2 { font-family: var(--f-display); font-weight: 500; font-size: 21px; letter-spacing: 0.04em; color: var(--wine-600); }
.member-hero p { font-size: 16px; color: var(--ink-2); margin-top: 8px; }

/* ---------- Chargement / erreur ---------- */
.sk { display: inline-block; height: 0.9em; width: 3.2em; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, rgba(184, 137, 42, 0.12), rgba(184, 137, 42, 0.28), rgba(184, 137, 42, 0.12));
  background-size: 200% 100%; animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.err { text-align: center; padding: 22px; color: var(--ink-3); font-size: 15px; }
.err button { margin-top: 10px; color: var(--wine-600); font-family: var(--f-display); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--hair-strong); }

/* ============================================================
   BARRE D'ONGLETS
   ============================================================ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 520px; margin: 0 auto;
  padding: 8px 10px calc(8px + var(--safe-b));
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(253, 250, 244, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--hair);
  box-shadow: 0 -10px 30px -20px rgba(61, 15, 28, 0.4);
}
@media (min-width: 560px) { .tabbar { bottom: 28px; border-radius: 0 0 34px 34px; } }
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 2px;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.02em;
}
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--wine-600); }
.tab.on::before { content: ""; position: absolute; top: -9px; width: 26px; height: 2px; border-radius: 2px; background: var(--foil); }
.tab.don-tab svg { color: var(--gold-600); }

/* ---------- Transitions ---------- */
.view { animation: viewIn 0.35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .sk { animation: none; } }

/* ============================================================
   v2 — ACCUEIL : devise, affiche de Chabbat, prochain cours
   ============================================================ */
.hero .devise { font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: 21px; color: var(--gold-300); margin-top: 8px; letter-spacing: 0.01em; }
.hero .direction { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hero .direction span { font-family: var(--f-display); font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(245, 228, 176, 0.6); }
.hero .direction b { font-family: var(--f-display); font-weight: 500; font-size: 13.5px; letter-spacing: 0.08em; color: var(--ivory-100); }
.hero .ornament { margin-top: 14px; }
/* En-tête compact : médaillon + nom, mention du Rav, dates */
.hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left;
  grid-template-areas: "medal name" "medal he" "sub sub";
  padding: calc(var(--safe-t) + 18px) 64px 56px 20px;
}
.hero .medallion { grid-area: medal; width: 64px; height: 64px; margin: 0; padding: 2px; box-shadow: 0 0 0 4px rgba(232, 201, 122, 0.08), 0 10px 24px -10px rgba(0, 0, 0, 0.6); }
.hero h1 { grid-area: name; font-size: 27px; margin: 0; align-self: end; }
.hero .he-name { grid-area: he; font-size: 19px; margin: 2px 0 0; text-align: left; }
.hero-sub { grid-area: sub; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 10px; }
.hero .direction { flex: 1 1 0; min-width: 0; margin-top: 0; align-items: flex-start; text-align: left; }
.hero .direction { flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
.hero .direction span { font-size: 12.5px; letter-spacing: 0.02em; text-transform: none; font-family: var(--f-serif); font-style: italic; white-space: nowrap; flex: none; }
.hero .direction b { font-size: 12.5px; letter-spacing: 0.03em; line-height: 1.3; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hero .hdates { flex: none; text-align: right; }
.hero .civil { font-size: 13px; white-space: nowrap; }
.hero .hdate { justify-content: flex-end; margin-top: 2px; font-size: 12.5px; }
.hero .hdate .he { font-size: 13.5px; }

/* Barre du bas : bascule Zmanim / Offices */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 999px; background: rgba(253, 250, 244, 0.96); border: 1px solid var(--hair); box-shadow: 0 8px 22px -14px rgba(61, 15, 28, 0.5); }
.seg a { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 0; border-radius: 999px; font-family: var(--f-display); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-3); }
.seg a svg { width: 17px; height: 17px; }
.seg a.on { color: var(--ivory-100); background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); }


.poster {
  padding: 0; overflow: hidden;
  background:
    linear-gradient(var(--ivory-50), var(--ivory-50)) padding-box,
    linear-gradient(135deg, var(--gold-400), rgba(184, 137, 42, 0.2) 40%, var(--gold-500)) border-box;
  border: 1px solid transparent;
}
.poster .pz-skel { padding: 20px; }

.pz-head { text-align: center; padding: 22px 18px 16px; background: radial-gradient(90% 120% at 50% 0%, rgba(232, 201, 122, 0.22), transparent 70%); border-bottom: 1px solid var(--hair); }
.pz-title { font-family: var(--f-display); font-weight: 500; font-size: 26px; letter-spacing: 0.05em; color: var(--wine-600); margin-top: 8px; line-height: 1.1; }
.pz-he { font-size: 20px; color: var(--ink-3); margin-top: 2px; text-align: center; }
.pz-date { font-family: var(--f-serif); font-size: 17px; color: var(--ink-2); margin-top: 4px; }
.pz-body { padding: 4px 18px 6px; }
.pz { padding: 14px 0 6px; }
.pz + .pz { border-top: 1px solid rgba(184, 137, 42, 0.16); }
.pz-h { display: flex; align-items: center; gap: 9px; font-family: var(--f-display); font-weight: 500; font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--wine-600); margin-bottom: 4px; }
.pz-h svg { width: 17px; height: 17px; color: var(--gold-600); }
.pr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; }
.pr-l span { font-size: 18px; color: var(--ink); line-height: 1.2; display: block; }
.pr-l em { display: block; font-size: 14px; color: var(--ink-3); line-height: 1.25; }
.pr b { font-family: var(--f-serif); font-weight: 600; font-size: 28px; color: var(--ink); line-height: 1; flex: none; }
.pr.sub { padding: 2px 0 6px; }
.pr.sub .pr-l span { font-size: 15px; color: var(--ink-3); }
.pr.sub b { font-size: 19px; color: var(--ink-3); }
.pr.gold b { color: var(--gold-700); }
.pz-info ul { list-style: none; display: grid; gap: 8px; margin: 6px 0 4px; }
.pz-info li { display: flex; gap: 10px; align-items: flex-start; font-size: 16.5px; line-height: 1.3; color: var(--ink-2); }
.pz-info li svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--gold-600); }
.pz-info li.success svg { color: #3f7a4f; stroke-width: 2.2; }
.pz-info li.warning svg { color: var(--wine-500); }
.pz-info li.info svg { width: 9px; height: 9px; margin: 8px 4px 0; }
.pz-foot { text-align: center; padding: 14px 18px 16px; margin-top: 4px; background: linear-gradient(180deg, transparent, rgba(232, 201, 122, 0.16)); border-top: 1px solid var(--hair); }
.pz-wish { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 21px; color: var(--wine-600); }
.pz-wish-he { font-size: 16px; color: var(--gold-700); text-align: center; }
.pz-note { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; font-style: italic; }
.pz-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wine-600); }
.pz-link svg { width: 13px; height: 13px; }

.nextcourse { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.nc-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); border: 1px solid var(--hair-strong); }
.nc-ic svg { width: 20px; height: 20px; }
.nc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nc-txt .eyebrow { font-size: 9.5px; }
.nc-txt b { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; margin-top: 2px; }
.nc-txt > span { font-size: 14px; color: var(--ink-3); }
.nc-when { text-align: right; }
.nc-when b { font-family: var(--f-serif); font-weight: 600; font-size: 24px; display: block; line-height: 1; }
.nc-when small { font-size: 12.5px; color: var(--ink-3); }

.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 0; padding: 14px 16px;
  background: linear-gradient(135deg, var(--ivory-50), var(--ivory-200)); border-color: var(--hair-strong); }
.tile.wide .t-name { margin-top: 0; }
.tile.wide .t-txt { flex: 1; }
.tile.wide .t-go { width: 18px; height: 18px; color: var(--gold-500); flex: none; }
.tile.wide .t-ic { background: var(--foil); color: var(--wine-900); border: 0; flex: none; }

.day-title { display: flex; align-items: baseline; gap: 10px; margin: 8px 6px 8px; }
.day-title b { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.06em; color: var(--wine-600); }
.day-title span { font-size: 15px; color: var(--ink-3); }
.course.cx h3, .course.cx .c-when b { text-decoration: line-through; text-decoration-thickness: 1px; }
.course.cx { opacity: 0.6; }
.course .c-note { font-style: italic; color: var(--wine-600); }
.pill.cancel { color: #fff; background: var(--wine-500); }

/* ============================================================
   v2 — FORMULAIRES, BOUTONS, ÉTATS
   ============================================================ */
.form { padding: 18px; display: grid; gap: 14px; }
.field label { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wine-600); margin-bottom: 6px; }
.field label i { font-family: var(--f-text); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.inp {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--ivory-100); border: 1px solid var(--hair-strong); border-radius: var(--r-sm);
  appearance: none; -webkit-appearance: none; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
textarea.inp { min-height: 84px; resize: vertical; line-height: 1.35; }
select.inp { background-image: linear-gradient(45deg, transparent 50%, var(--gold-600) 50%), linear-gradient(135deg, var(--gold-600) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input[type="time"].inp, input[type="date"].inp { font-family: var(--f-serif); font-weight: 600; font-size: 19px; }
.inp:focus { border-color: var(--gold-600); background: #fff; box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.25); }
.inp::placeholder { color: rgba(138, 107, 85, 0.65); font-style: italic; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > * { min-width: 0; }
.hint { font-size: 13.5px; color: var(--ink-3); line-height: 1.35; margin-top: 6px; }
.f-legend { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine-600); }
.f-legend i { font-family: var(--f-text); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.f-h { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: 0.05em; color: var(--wine-600); }
.f-h svg { width: 20px; height: 20px; color: var(--gold-600); }
.alert { padding: 11px 14px; border-radius: var(--r-sm); font-size: 15px; line-height: 1.3; }
.alert[hidden] { display: none; }
.alert.err { color: #7a1c2e; background: rgba(155, 36, 56, 0.08); border: 1px solid rgba(155, 36, 56, 0.25); }
.lnk { color: var(--wine-600); border-bottom: 1px solid var(--hair-strong); }

.btn-gold.loading, .btn-ghost.loading, .btn-sm.loading { opacity: 0.6; pointer-events: none; }
.btn-gold:disabled { opacity: 0.6; }
.btn-ghost.sm { min-height: 42px; font-size: 11.5px; margin-top: 0; }
.btn-ghost.sm svg { width: 16px; height: 16px; }
.btn-ghost { transition: background 0.15s; }
.btn-ghost:active { background: rgba(212, 168, 67, 0.12); }
.btn-ghost svg { width: 16px; height: 16px; }
.btn-gold + .btn-ghost { margin-top: 10px; }
.btn-sm { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px; font-family: var(--f-display); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine-950); background: var(--foil); white-space: nowrap; box-shadow: 0 8px 16px -10px rgba(143, 106, 30, 0.8); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-sm.ghost { background: transparent; color: var(--wine-600); border: 1px solid var(--hair-strong); box-shadow: none; padding: 0 12px; }
.btn-danger { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border-radius: 999px; color: var(--wine-500); border: 1px solid rgba(155, 36, 56, 0.35); font-family: var(--f-display); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; }
.btn-danger svg { width: 16px; height: 16px; }
.actionbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); z-index: 4; padding: 10px; margin: 0 -8px; border-radius: 20px; background: rgba(253, 250, 244, 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--hair); box-shadow: 0 14px 30px -18px rgba(61, 15, 28, 0.55); }
.actionbar .btn-gold, .actionbar .btn-ghost { margin-top: 0; min-height: 48px; font-size: 11.5px; letter-spacing: 0.12em; padding: 0 10px; }

.st { display: inline-block; vertical-align: middle; font-family: var(--f-display); font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; line-height: 1.2; }
.st.free { color: #2f6b43; background: rgba(63, 122, 79, 0.12); border: 1px solid rgba(63, 122, 79, 0.3); }
.st.pending { color: var(--gold-700); background: rgba(212, 168, 67, 0.16); border: 1px solid rgba(184, 137, 42, 0.4); }
.st.paid { color: #2f6b43; background: rgba(63, 122, 79, 0.14); border: 1px solid rgba(63, 122, 79, 0.35); }
.st.cancelled { color: var(--ink-3); background: var(--ivory-200); border: 1px solid var(--hair); }
.st.admin { color: var(--ivory-100); background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); transform: translate(-50%, 14px); z-index: 80; max-width: min(92vw, 440px); padding: 12px 20px; border-radius: 999px; font-size: 15.5px; text-align: center; color: var(--ivory-100); background: var(--wine-900); border: 1px solid rgba(232, 201, 122, 0.4); box-shadow: var(--shadow-deep); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #5c1220; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin: 14px 14px 0; border-radius: 999px; background: var(--ivory-200); border: 1px solid var(--hair); }
.seg button { min-height: 42px; border-radius: 999px; font-family: var(--f-display); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); transition: background 0.2s, color 0.2s; }
.seg button.on { color: var(--wine-950); background: var(--foil-soft); box-shadow: 0 6px 14px -8px rgba(143, 106, 30, 0.9); }
.seg.sm { margin: 0; }
.seg.sm button { min-height: 38px; font-size: 10.5px; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 8px 10px; border-radius: var(--r-sm); text-align: center; background: var(--ivory-100); border: 1px solid var(--hair-strong); transition: all 0.15s; }
.chip b { font-family: var(--f-display); font-weight: 500; font-size: 13px; letter-spacing: 0.04em; color: var(--ink); }
.chip i { font-style: normal; font-size: 15px; color: var(--ink-3); }
.chip input:checked + span { background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); border-color: var(--gold-500); box-shadow: 0 8px 18px -10px rgba(61, 15, 28, 0.8); }
.chip input:checked + span b { color: var(--ivory-100); }
.chip input:checked + span i { color: var(--gold-400); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.4); }
.chip:last-child:nth-child(odd) { grid-column: 1 / -1; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--r-md); background: rgba(122, 28, 46, 0.05); border: 1px solid rgba(122, 28, 46, 0.14); font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.callout > svg { width: 22px; height: 22px; flex: none; color: var(--wine-600); margin-top: 1px; }
.callout.gold { background: rgba(232, 201, 122, 0.2); border-color: var(--hair-strong); }
.callout.gold > svg { color: var(--gold-700); }
/* Icône dans le fil du texte (ex. cadenas de la coche grisée, admin Carrousel) : taille du texte, sinon le SVG prend toute la largeur. */
.ic-inl { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; color: var(--ink-3); }

.recap { display: grid; gap: 0; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--ivory-100); overflow: hidden; text-align: left; }
.recap > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-size: 16px; color: var(--ink-2); }
.recap > div + div { border-top: 1px solid var(--hair); }
.recap b { font-family: var(--f-serif); font-weight: 600; font-size: 22px; color: var(--ink); }
.recap .total { background: linear-gradient(90deg, rgba(232, 201, 122, 0.25), rgba(232, 201, 122, 0.06)); }
.recap .total span { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wine-600); }
.recap .total b { font-size: 28px; color: var(--gold-700); }

/* ============================================================
   v2 — KIDDOUCH
   ============================================================ */
.k-seal, .seal { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--foil); color: var(--wine-900); box-shadow: 0 10px 24px -10px rgba(143, 106, 30, 0.7), 0 0 0 5px rgba(232, 201, 122, 0.18); }
.k-seal svg, .seal svg { width: 28px; height: 28px; }
.k-intro, .gate, .done { text-align: center; padding: 24px 20px 22px; }
.k-intro h2, .gate h2, .done h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: 0.04em; color: var(--wine-600); }
.k-intro > p, .gate > p { font-size: 16.5px; color: var(--ink-2); margin-top: 8px; }
.k-promise { display: flex; gap: 12px; align-items: flex-start; text-align: left; margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: rgba(232, 201, 122, 0.2); border: 1px solid var(--hair-strong); }
.k-promise svg { width: 24px; height: 24px; flex: none; color: var(--gold-700); }
.k-promise p { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.k-promise b { color: var(--wine-600); }
.gate .btn-gold { margin-top: 18px; }
.kitem { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 14px 14px 14px 12px; }
.k-date, .kitem .k-date { text-align: center; padding: 8px 4px; border-radius: 14px; background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); color: var(--ivory-100); line-height: 1.05; }
.k-date small { display: block; font-family: var(--f-display); font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-400); }
.k-date b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 26px; }
.k-date span { font-size: 12.5px; color: var(--gold-300); }
.kitem.taken .k-date { background: linear-gradient(160deg, #8a6b55, #5c4636); }
.kitem h3 { font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: 0.03em; line-height: 1.2; }
.kitem h3 .he { font-size: 15px; color: var(--ink-3); margin-left: 4px; }
.k-sub { font-size: 14.5px; color: var(--ink-3); margin: 1px 0 6px; }
.k-by { font-size: 15px; color: var(--ink-2); }
.k-by b { font-weight: 600; color: var(--wine-600); }
.k-ded { font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--ink-2); line-height: 1.25; }
.kitem.taken { background: linear-gradient(var(--ivory-50), var(--ivory-100)); }
.k-lock { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); border: 1px solid var(--hair-strong); }
.k-lock svg { width: 15px; height: 15px; }
.k-recap-head { display: grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; padding: 14px; }
.k-recap-head h2 { font-family: var(--f-display); font-weight: 500; font-size: 21px; color: var(--wine-600); letter-spacing: 0.04em; }
.done .seal { width: 68px; height: 68px; }
.done .seal svg { width: 32px; height: 32px; }
.done .eyebrow { margin-top: 4px; }
.done h2 { margin-top: 6px; font-size: 26px; }
.done-lead { font-size: 17.5px; color: var(--ink-2); margin: 10px 0 14px; line-height: 1.35; }
.done-lead b { color: var(--wine-600); font-weight: 600; }
.done-note { font-size: 15px; color: var(--ink-3); margin: 14px 0 4px; line-height: 1.4; }
.done .recap { margin-top: 14px; }
.dedic { margin: 0 0 14px; padding: 14px; border-radius: var(--r-md); background: linear-gradient(160deg, var(--wine-700), var(--wine-900)); color: var(--ivory-100); }
.dedic .he { display: block; font-size: 20px; color: var(--gold-400); }
.dedic p { font-family: var(--f-serif); font-style: italic; font-size: 19px; margin-top: 2px; }
.dedic.sm { padding: 8px 12px; margin: 10px 0 0; text-align: left; }
.dedic.sm p { font-size: 16px; }
.done .btn-gold { margin-top: 18px; }

/* ============================================================
   v2 — COMPTE
   ============================================================ */
.auth { padding-bottom: 20px; }
.auth .form { padding-top: 16px; }
.auth .secure { margin-top: 0; }
.forgot { display: block; text-align: center; margin-top: 4px; padding: 10px; font-size: 15px; color: var(--wine-600); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 4px; }
.lead { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.sent { text-align: center; padding: 26px 18px 14px; }
.sent .l-ic { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); border: 1px solid var(--hair-strong); }
.sent .l-ic svg { width: 24px; height: 24px; }
.sent h2 { font-family: var(--f-display); font-weight: 500; font-size: 21px; letter-spacing: 0.04em; color: var(--wine-600); margin-bottom: 8px; }
.sent p { font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.member { text-align: center; padding: 24px 18px 20px; }
.avatar { width: 74px; height: 74px; margin: 0 auto 12px; border-radius: 50%; padding: 3px; background: var(--foil); box-shadow: 0 0 0 5px rgba(232, 201, 122, 0.14); }
.avatar span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 24px; letter-spacing: 0.04em; color: var(--gold-400); background: linear-gradient(160deg, var(--wine-600), var(--wine-900)); }
.avatar.sm { width: 46px; height: 46px; margin: 0; padding: 2px; }
.avatar.sm span { font-size: 15px; }
.member h2 { font-family: var(--f-display); font-weight: 500; font-size: 23px; letter-spacing: 0.04em; color: var(--wine-600); }
.m-mail { font-size: 15px; color: var(--ink-3); margin-bottom: 8px; }
.admin-link { display: grid; grid-template-columns: 44px 1fr auto 18px; gap: 14px; align-items: center; padding: 15px 16px; border-radius: var(--r-lg); color: var(--ivory-100); background: radial-gradient(100% 140% at 0% 0%, rgba(232, 201, 122, 0.22), transparent 55%), linear-gradient(135deg, var(--wine-600), var(--wine-900)); box-shadow: var(--shadow-deep), 0 0 0 1px rgba(212, 168, 67, 0.35) inset; }
.admin-link .l-ic { background: rgba(232, 201, 122, 0.12); color: var(--gold-400); border-color: rgba(232, 201, 122, 0.4); }
.admin-link h3 { font-family: var(--f-display); font-weight: 500; font-size: 15.5px; letter-spacing: 0.04em; }
.admin-link p { font-size: 14px; color: rgba(245, 228, 176, 0.75); }
.admin-link .l-go { width: 18px; height: 18px; color: var(--gold-400); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-family: var(--f-text); font-size: 12.5px; font-weight: 600; color: #fff; background: var(--wine-500); line-height: 1; }
.badge[hidden] { display: none; }
.promise { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px; }
.promise.off { opacity: 0.55; }
.promise .l-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); border: 1px solid var(--hair-strong); }
.promise .l-ic svg { width: 20px; height: 20px; }
.pm-body h3 { font-family: var(--f-display); font-weight: 500; font-size: 14px; letter-spacing: 0.02em; line-height: 1.25; }
.pm-body p { font-size: 13.5px; color: var(--ink-3); margin: 1px 0 5px; }
.pm-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pm-side b { font-family: var(--f-serif); font-weight: 600; font-size: 22px; line-height: 1; }
.lrow.mk { grid-template-columns: 44px 1fr; }

/* ============================================================
   v2 — ADMIN
   ============================================================ */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 14px 18px 4px; margin-top: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pills::-webkit-scrollbar { display: none; }
.ptab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px; font-family: var(--f-display); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); background: var(--ivory-50); border: 1px solid var(--hair-strong); }
.ptab.on { color: var(--wine-950); background: var(--foil-soft); border-color: transparent; box-shadow: 0 8px 16px -10px rgba(143, 106, 30, 0.9); }
.adm { padding-top: 14px; }
.adm > .btn-gold { margin-top: 0; }
.banner { display: grid; grid-template-columns: 44px 1fr 18px; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); color: var(--wine-950); background: linear-gradient(135deg, var(--gold-300), var(--gold-400) 60%, var(--gold-500)); box-shadow: 0 16px 30px -18px rgba(143, 106, 30, 0.9), 0 0 0 1px rgba(143, 106, 30, 0.35) inset; }
.bn-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--wine-800); color: var(--gold-400); }
.bn-ic svg { width: 22px; height: 22px; }
.bn-txt b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; }
.bn-txt span { font-size: 14.5px; color: var(--wine-800); line-height: 1.25; display: block; }
.bn-go { width: 18px; height: 18px; color: var(--wine-800); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats:empty { display: none; }
.stat { text-align: center; padding: 14px 6px; border-radius: var(--r-md); background: var(--ivory-50); border: 1px solid var(--hair); box-shadow: var(--shadow-card); }
.stat b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 32px; line-height: 1; color: var(--wine-600); }
.stat span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.2; color: var(--ink-3); }

.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.satchip { flex: none; position: relative; width: 56px; padding: 8px 0 12px; text-align: center; border-radius: 16px; background: var(--ivory-50); border: 1px solid var(--hair-strong); line-height: 1.1; }
.satchip small { display: block; font-family: var(--f-display); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.satchip b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 24px; color: var(--ink); }
.satchip i { position: absolute; left: 50%; bottom: 6px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--hair-strong); }
.satchip.published i, .dot.published { background: #3f7a4f; }
.satchip.draft i, .dot.draft { background: var(--gold-500); }
.satchip.on { background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); border-color: var(--gold-500); }
.satchip.on small { color: var(--gold-400); } .satchip.on b { color: var(--ivory-100); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); margin: -4px 4px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--hair-strong); margin-left: 8px; }
.dot:first-child { margin-left: 0; }
.wf-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wf-top h2 { font-family: var(--f-display); font-weight: 500; font-size: 17px; letter-spacing: 0.04em; color: var(--wine-600); }
fieldset { border: 0; display: grid; gap: 12px; padding: 14px 0 0; border-top: 1px solid var(--hair); }
legend { display: flex; align-items: center; gap: 8px; float: left; width: 100%; margin-bottom: 12px; font-family: var(--f-display); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine-600); }
legend + * { clear: both; }
legend svg { width: 18px; height: 18px; color: var(--gold-600); }
.iw { position: relative; }
.week-d { border-top: 1px solid var(--hair); padding-top: 14px; }
.week-d summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-family: var(--f-display); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine-600); }
.week-d summary::-webkit-details-marker { display: none; }
.week-d summary svg { width: 18px; height: 18px; color: var(--gold-600); }
.week-d summary small { margin-left: auto; font-family: var(--f-text); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.wk-head, .wkrow { display: grid; grid-template-columns: 40px repeat(3, 1fr); gap: 6px; align-items: center; }
.wk-head { margin: 12px 0 4px; }
.wk-head span { font-family: var(--f-display); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.wkrow { margin-top: 6px; }
.wkrow b { font-family: var(--f-display); font-weight: 500; font-size: 12px; color: var(--ink); }
.wkrow .inp { min-height: 42px; padding: 6px 4px; font-size: 16px; text-align: center; }
.wk-na { grid-column: 3 / -1; font-size: 12.5px; color: var(--ink-3); font-style: italic; }

.cr { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; }
.cr.off { opacity: 0.55; }
.cr-body { min-width: 0; }
.cr-body h3 { font-family: var(--f-display); font-weight: 500; font-size: 15.5px; letter-spacing: 0.02em; line-height: 1.25; }
.cr-body p { font-size: 14.5px; color: var(--ink-2); line-height: 1.3; }
.cr-body .cr-sub { color: var(--ink-3); }
.cr-act { display: flex; flex-direction: column; gap: 6px; flex: none; }
.cr-act .btn-sm { min-height: 34px; font-size: 10px; }
.occ { padding: 12px 14px; }
.occ + .occ { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.oc-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.oc-when b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 14.5px; letter-spacing: 0.02em; }
.oc-when span { font-size: 14px; color: var(--ink-3); }
.occ.cancelled .oc-when b { text-decoration: line-through; }
.oc-note { font-size: 14px; font-style: italic; color: var(--wine-600); margin-top: 4px; }
.oc-form { padding: 12px 0 2px; }
.oc-form[hidden], .oc-chg[hidden], #k-weekly[hidden], #k-one[hidden] { display: none; }
.bk { padding: 14px; }
.bk.off { opacity: 0.55; }
.bk-top { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; }
.bk-main h3 { font-family: var(--f-display); font-weight: 500; font-size: 15.5px; letter-spacing: 0.02em; }
.bk-c, .bk-w { font-size: 14px; color: var(--ink-3); line-height: 1.3; word-break: break-word; }
.bk-c a { color: var(--wine-600); }
.bk-msg { font-size: 15px; font-style: italic; color: var(--ink-2); margin-top: 8px; }
.bk-bot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.bk-bot b { font-family: var(--f-serif); font-weight: 600; font-size: 22px; margin-right: 6px; }
.bk-act { display: flex; gap: 8px; }
.notif { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
.notif + .notif { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.notif .l-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-600); background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); border: 1px solid var(--hair-strong); }
.notif .l-ic svg { width: 20px; height: 20px; }
.notif h3 { font-family: var(--f-display); font-weight: 500; font-size: 14.5px; letter-spacing: 0.02em; line-height: 1.25; }
.notif p { font-size: 14.5px; color: var(--ink-2); line-height: 1.3; }
.notif small { font-size: 12.5px; color: var(--ink-3); }
.notif.unread { background: linear-gradient(90deg, rgba(232, 201, 122, 0.22), transparent); box-shadow: inset 3px 0 0 var(--gold-500); }
.mb { padding: 14px; display: grid; gap: 12px; }
.mb-top { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; }
.mb-top h3 { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; }
.mb-top p { font-size: 14px; color: var(--ink-3); word-break: break-word; }
.mb-bot { display: grid; gap: 10px; }
.inline { display: flex; gap: 8px; }
.inline .inp { min-height: 42px; font-size: 15.5px; }
.field.mini2 label { margin-bottom: 4px; }
.search { border-radius: 999px; padding-left: 18px; }
.rule { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 4px 0; }
.rule + .rule { border-top: 1px solid rgba(184, 137, 42, 0.12); padding-top: 12px; }
.rule > span { font-size: 16.5px; }
.rl-in { display: flex; align-items: center; gap: 8px; }
.rl-in .inp { width: 74px; text-align: center; min-height: 44px; font-family: var(--f-serif); font-weight: 600; font-size: 19px; padding: 6px; }
.rl-in em { font-size: 12.5px; color: var(--ink-3); font-style: normal; width: 104px; line-height: 1.2; }
.sh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sh-grid label { margin-bottom: 4px; }
.sh-grid .inp { min-height: 44px; padding: 6px; text-align: center; font-size: 17px; }
.filters { margin: 0 0 4px; }
.tl { padding: 6px 0; }
.tl-i { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 12px 14px; position: relative; }
.tl-i + .tl-i { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.tl-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-700); background: rgba(232, 201, 122, 0.22); border: 1px solid var(--hair-strong); }
.tl-ic svg { width: 16px; height: 16px; }
.tl-ic.delete, .tl-ic.cancel { color: var(--wine-500); background: rgba(155, 36, 56, 0.08); border-color: rgba(155, 36, 56, 0.25); }
.tl-ic.publish, .tl-ic.create { color: #2f6b43; background: rgba(63, 122, 79, 0.12); border-color: rgba(63, 122, 79, 0.3); }
.tl-b p { font-size: 16px; line-height: 1.3; color: var(--ink-2); }
.tl-b p b { color: var(--ink); font-weight: 600; }
.tl-b small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.tl-b details { margin-top: 6px; }
.tl-b summary { cursor: pointer; font-family: var(--f-display); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--wine-600); }
.dfs { margin-top: 8px; border-radius: var(--r-sm); border: 1px solid var(--hair); background: var(--ivory-100); overflow: hidden; }
.df { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 8px 10px; font-size: 13.5px; line-height: 1.3; word-break: break-word; }
.df + .df { border-top: 1px solid var(--hair); }
.df code { grid-column: 1 / -1; font-family: var(--f-display); font-size: 9px; letter-spacing: 0.1em; color: var(--ink-3); text-transform: none; }
.df .df-b { color: var(--wine-500); text-decoration: line-through; text-decoration-color: rgba(155, 36, 56, 0.4); }
.df .df-a { color: #2f6b43; }
.df.head { background: var(--ivory-200); }
.df.head span { font-family: var(--f-display); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.df-none { font-size: 13.5px; color: var(--ink-3); padding: 10px; }
@media (max-width: 360px) { .kitem { grid-template-columns: 56px 1fr auto; } }

/* ---------- WhatsApp ---------- */
.wa-slot { margin-top: 12px; }
.wa-slot:empty { display: none; }
.wa { text-align: center; padding: 16px 16px 14px; border-radius: var(--r-lg); background: var(--ivory-50); border: 1px solid var(--hair); box-shadow: var(--shadow-card); }
.wa .eyebrow { font-size: 10px; margin-bottom: 10px; }
.wa-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 22px; border-radius: 999px; color: #fff; background: #25D366; font-family: var(--f-display); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; box-shadow: 0 12px 24px -12px rgba(37, 211, 102, 0.75), 0 1px 0 rgba(255, 255, 255, 0.35) inset; transition: background 0.15s, transform 0.15s; }
.wa-btn:hover, .wa-btn:active { background: #1EBE5A; }
.wa-btn:active { transform: scale(0.98); }
.wa-ic { width: 24px; height: 24px; flex: none; }
.wa-go { width: 18px; height: 18px; color: var(--gold-500); }

#k-weekly:not([hidden]), #k-one:not([hidden]) { display: grid; gap: 14px; }
.field label { flex-wrap: wrap; row-gap: 0; }

.form > *, .stack > * { min-width: 0; }
.row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inp { min-width: 0; }
.rl-in em { width: 92px; }
.rule > span { min-width: 0; }

.lift > div:first-child > .day-title b { color: var(--gold-300); }
.lift > div:first-child > .day-title span { color: rgba(245, 228, 176, 0.75); }
.sh-grid .inp { padding: 6px 2px; font-size: 16px; }

/* ============================================================
   v3 — mots de passe, installation, invitations
   ============================================================ */
.pw { position: relative; }
.pw .inp { padding-right: 52px; }
.pw-t { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--wine-600); border-radius: 50%; }
.pw-t svg { width: 20px; height: 20px; }
.pw-ghost { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.admin-link.light { width: 100%; text-align: left; color: var(--ink); background: var(--ivory-100); box-shadow: 0 0 0 1px var(--hair-strong) inset; }
.admin-link.light .l-ic { background: radial-gradient(circle at 30% 30%, #fff, var(--ivory-200)); color: var(--gold-600); border-color: var(--hair-strong); }
.admin-link.light h3 { color: var(--wine-600); }
.admin-link.light p { color: var(--ink-3); }
.install { position: fixed; z-index: 60; left: 12px; right: 12px; max-width: 480px; margin: 0 auto; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); padding: 18px 18px 16px; border-radius: var(--r-lg); background: var(--ivory-50, #fdfaf4); border: 1px solid var(--gold-500); box-shadow: var(--shadow-deep); animation: inst-up 0.35s ease both; }
@keyframes inst-up { from { opacity: 0; transform: translateY(18px); } }
.install .x { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-3); }
.install .x svg { width: 18px; height: 18px; }
.i-top { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding-right: 30px; margin-bottom: 14px; }
.i-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--gold-400); background: linear-gradient(160deg, var(--wine-600), var(--wine-900)); }
.i-ic svg { width: 22px; height: 22px; }
.i-top h3 { font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: 0.03em; color: var(--wine-600); }
.i-top p { font-size: 14.5px; line-height: 1.3; color: var(--ink-3); }
.steps { list-style: none; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; font-size: 16px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--ivory-100); border: 1px solid var(--hair); }
.s-ic { width: 38px; height: 38px; display: grid; place-items: center; color: var(--wine-600); }
.s-ic svg { width: 24px; height: 24px; }
.inv-share { display: grid; gap: 10px; }
.inv-share .btn-ghost { margin-top: 0; }
.linkbox { display: flex; gap: 8px; }
.linkbox .inp { font-size: 14px; min-width: 0; }
.inv-item { padding: 14px; display: grid; gap: 10px; }
.inv-item h3 { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; }
.inv-item p { font-size: 14px; color: var(--ink-3); word-break: break-word; }
.inv-item .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.st.expired { color: #7a1c2e; background: rgba(155, 36, 56, 0.08); border: 1px solid rgba(155, 36, 56, 0.25); }
.alert.ok { color: #2f6b43; background: rgba(63, 122, 79, 0.1); border: 1px solid rgba(63, 122, 79, 0.3); display: flex; align-items: center; gap: 8px; }
.alert.ok svg { width: 18px; height: 18px; flex: none; }
.field .chip { display: block; margin: 0; font: inherit; letter-spacing: normal; text-transform: none; color: inherit; }

/* ---------- Superadmin : panneau technique, bandeau de maintenance ---------- */
.mbanner { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) 12px 8px 16px; color: var(--wine-900); background: linear-gradient(135deg, var(--gold-300), var(--gold-400)); border-bottom: 1px solid rgba(143, 106, 30, 0.35); font-size: 15px; line-height: 1.3; }
.mbanner > svg { width: 20px; height: 20px; flex: none; color: var(--wine-800); }
.mbanner p { flex: 1; min-width: 0; }
.mbanner button { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--wine-800); background: none; border: 0; cursor: pointer; }
.mbanner button svg { width: 18px; height: 18px; }
.tg { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; }
.tg + .tg { border-top: 1px solid rgba(184, 137, 42, 0.12); }
.tg > div { min-width: 0; }
.tg label { display: block; margin: 0; font-family: var(--f-text); font-size: 16.5px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.tg .hint { margin-top: 2px; }
.tg .au-dur { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tg .au-dur label { font-size: 13px; color: var(--ink-3); }
.tg .au-dur .inp { width: 76px; flex: none; text-align: center; }
.sw { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; margin-top: 2px; border-radius: 999px; background: var(--ivory-300); border: 1px solid var(--hair-strong); cursor: pointer; transition: background 0.2s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(30, 7, 13, 0.35); transition: transform 0.2s; }
.sw:checked { background: var(--foil-soft); border-color: var(--gold-600); }
.sw:checked::after { transform: translateX(20px); }
.sw:focus-visible { outline: 2px solid var(--wine-600); outline-offset: 2px; }
.sw.sm { width: 38px; height: 22px; margin-top: 0; }
.sw.sm::after { width: 16px; height: 16px; }
.sw.sm:checked::after { transform: translateX(16px); }
.sw:disabled { opacity: 0.55; cursor: progress; }
/* Coches « TV » / « Mobile » dans la liste du carrousel (écran admin). */
.tv-tg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; }
.tv-tgi { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; }
.tv-tgi label { margin: 0; font-family: var(--f-text); font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--ink-2, var(--ink)); cursor: pointer; }
/* Coche indisponible (la diapositive n'existe pas à cet endroit) : grisée, verrouillée */
.tv-tgi.na { cursor: not-allowed; }
.tv-tgi.na .sw:disabled { opacity: 0.35; cursor: not-allowed; background: var(--ivory-200); }
.tv-tgi.na label { color: var(--ink-3); cursor: not-allowed; display: inline-flex; align-items: center; gap: 3px; }
.tv-tgi.na label .ic, .tv-tgi.na label svg { width: 13px; height: 13px; }
/* Fond des diapositives Chabbat / Kiddouch : vignette + actions */
.au-bg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hair-strong); font-size: 13.5px; }
.au-bg .gal-th, .au-bg .au-bg-def { width: 56px; flex: none; border-radius: 6px; }
.au-bg .au-bg-def { aspect-ratio: 1600 / 1077; border: 1px solid var(--hair-strong); background: radial-gradient(40% 70% at 15% 85%, rgba(255, 184, 77, 0.55), transparent 70%), radial-gradient(40% 70% at 85% 85%, rgba(255, 184, 77, 0.55), transparent 70%), linear-gradient(160deg, #4f1324, #1e070d 72%); }
.au-bg i { color: var(--ink-3); }
.au-bg .btn-sm { margin: 0; }
.sim { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.sim li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ivory-100); border: 1px solid var(--hair); font-size: 15px; }
.sim li span { color: var(--ink-3); font-size: 14px; }
.sv { font-family: var(--f-text); font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rule.off { opacity: 0.45; }
.rule input:disabled { background: var(--ivory-200); cursor: not-allowed; }

/* Aperçu du message d'invitation à copier */
.inv-msg { white-space: pre-wrap; word-break: break-word; font-family: var(--f-text); font-size: 15px; line-height: 1.45; color: var(--ink-2); background: #f6f1e4; border: 1px solid var(--hair); border-left: 3px solid var(--gold-500); border-radius: 12px; padding: 12px 14px; margin: 12px 0 4px; max-height: 260px; overflow: auto; }

/* ---------- Admin : écran TV (carrousel) ---------- */
.tv-card { display: grid; grid-template-columns: 96px 1fr; gap: 6px 14px; align-items: center; padding: 12px; }
.tv-card.off { opacity: 0.6; }
.tv-th { width: 96px; aspect-ratio: 1600 / 1077; object-fit: cover; border-radius: 6px; border: 1px solid var(--hair-strong); background: var(--ivory-200); display: block; }
.tv-th-msg { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; padding: 4px; gap: 2px; font-size: 7px; line-height: 1.15; }
.tv-th-msg b { font-family: var(--f-display); text-transform: uppercase; font-size: 7px; letter-spacing: 0.06em; }
.tv-th-msg.ivory { background: var(--ivory-100); color: var(--ink); }
.tv-th-msg.ivory b { color: var(--wine-600); }
.tv-th-msg.wine { background: var(--wine-700, #7a1c2e); color: #fff; }
.tv-th-msg.wine b { color: #e8c97a; }
.tv-th-msg.bgm { position: relative; background: #1e070d; color: #fff8ea; }
.tv-th-msg.bgm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tv-th-veil { position: absolute; inset: 0; background: rgba(30, 7, 13, 0.62); }
.tv-th-msg.bgm b, .tv-th-msg.bgm span { position: relative; }
.tv-th-msg.bgm b { color: #e8c97a; }
.tv-info h3 { font-size: 15px; margin: 0; }
.tv-info p { font-size: 13px; color: var(--ink-3); margin: 2px 0 0; }


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Écran TV : liste unique du carrousel, réordonnable par glisser-déposer (ecran.js) */
.tv-head { padding: 16px; }
.tv-head h2 { margin: 0; }
.tv-head .hint svg { width: 14px; height: 14px; vertical-align: -2px; }
.tv-list { margin-top: 10px; }
.tv-it { grid-template-columns: 30px 96px minmax(0, 1fr) auto; gap: 12px; }
.tv-it .tv-info h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tv-it .tv-info h3 label { margin: 0; font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }
.tv-grip { display: grid; place-items: center; width: 30px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.tv-grip svg { width: 20px; height: 20px; }
.tv-grip:hover, .tv-grip:focus-visible { background: rgba(184, 137, 42, 0.12); color: var(--gold-600); }
.tv-thb { position: relative; display: block; width: 96px; }
.tv-thb .tv-th { width: 100%; }
.tv-th-live { position: relative; overflow: hidden; background: var(--ivory-200); aspect-ratio: 1843 / 842; } /* zone du carrousel de l'écran (96vw × 78vh) */
.tv-th-live iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.tv-badge { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; border-radius: 999px; background: rgba(30, 7, 13, 0.72); color: #f5e4b0; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; pointer-events: none; }
.tv-badge svg { width: 10px; height: 10px; }
.tv-pv-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 6px; background: none; cursor: zoom-in; }
.tv-pv-btn:hover, .tv-pv-btn:focus-visible { box-shadow: 0 0 0 2px var(--gold-600); }
.tv-dlg { margin: auto; width: min(920px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--hair-strong); border-radius: 18px; background: var(--ivory-50, #fffdf8); box-shadow: 0 30px 60px -20px rgba(30, 7, 13, 0.6); }
.tv-dlg::backdrop { background: rgba(30, 7, 13, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tv-dlg-in { padding: 12px 14px 14px; }
.tv-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tv-dlg-head h3 { margin: 0; font-size: 17px; }
.tv-dlg-frame { aspect-ratio: 1843 / 842; border-radius: 10px; overflow: hidden; background: var(--ivory-200); border: 1px solid var(--hair-strong); }
.tv-dlg-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.tv-dlg .hint { margin: 8px 2px 0; }
.tv-auto .au-dur { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tv-auto .au-dur label { margin: 0; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.tv-auto .au-dur .inp { width: 70px; flex: none; text-align: center; padding-top: 6px; padding-bottom: 6px; }
.tv-edit { white-space: nowrap; }
.tv-tabs { position: sticky; top: calc(var(--safe-t, 0px) + 6px); z-index: 6; margin-bottom: 14px; box-shadow: 0 10px 22px -18px rgba(61, 15, 28, 0.6); }
.tv-tabs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; border-radius: 999px; font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; transition: background 0.2s, color 0.2s; }
.tv-tabs a.on { color: var(--wine-950); background: var(--foil-soft); box-shadow: 0 6px 14px -8px rgba(143, 106, 30, 0.9); }
.tv-tabs a:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 1px; }
.tv-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: rgba(122, 28, 46, 0.12); color: var(--wine-600); font-size: 10px; letter-spacing: 0; }
.tv-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.tv-acts .btn-sm { white-space: nowrap; }
.tv-acts .btn-sm svg { width: 15px; height: 15px; }
.tv-arch { grid-template-columns: 96px minmax(0, 1fr); }
.tv-arch .tv-acts { grid-column: 1 / -1; }
.tv-arch .tv-thb { filter: grayscale(0.55); }
.tv-form-more { margin-top: 10px; align-items: stretch; }
.tv-form-more > * { margin: 0; min-height: 46px; }
.tv-list.sorting { -webkit-user-select: none; user-select: none; }
.tv-list.sorting .tv-grip { cursor: grabbing; }
.tv-it.dragging { position: relative; z-index: 5; opacity: 1; transform: scale(1.015); box-shadow: 0 18px 36px -16px rgba(61, 15, 28, 0.55); outline: 2px dashed var(--gold-600); outline-offset: -2px; }
.tv-none { margin: 8px 4px 0; }
@media (max-width: 560px) {
  .tv-it { grid-template-columns: 26px 64px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
  .tv-it .tv-thb { width: 64px; }
  .tv-grip { width: 26px; }
  .tv-edit span { display: none; }
  .tv-it .tv-acts { flex-direction: column; }
  .tv-arch { grid-template-columns: 64px minmax(0, 1fr); }
  .tv-arch .tv-acts { flex-direction: row; justify-content: flex-start; }
}
.tv-crop { position: relative; width: 100%; aspect-ratio: 1600 / 1077; border-radius: 8px; overflow: hidden; border: 1.5px dashed var(--hair-strong); background: var(--ivory-200); touch-action: none; cursor: grab; }
.tv-crop.has { border-style: solid; cursor: grabbing; }
.tv-crop canvas { width: 100%; height: 100%; display: none; }
.tv-crop.has canvas { display: block; }
.tv-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 14px; margin: 0; }
.tv-crop.has .tv-empty { display: none; }
.tv-zoom input[type=range] { width: 100%; }
.tv-fit { margin: 10px 0 0; }
.tv-pick { margin: 12px 0 4px; cursor: pointer; }
.tv-cur { width: 100%; aspect-ratio: 1600 / 1077; object-fit: cover; border-radius: 8px; border: 1px solid var(--hair-strong); margin-top: 8px; }
.tv-cur[hidden] { display: none; }
.pa { display: grid; gap: 12px; }
.pa .body { display: grid; gap: 12px; }
.pa .body[hidden] { display: none; }
/* Galerie de médias et choix du visuel de la parasha */
.pa-cur-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.pa-cur-row .btn-sm { margin-top: 8px; }
.pa-act { display: grid; gap: 10px; }
.pa-act .btn-sm, .pa-act .btn-gold { white-space: normal; text-align: center; }
@media (min-width: 560px) { .pa-act { grid-template-columns: 1fr 1fr; } }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gal-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; text-align: left; background: var(--ivory-50); border: 1px solid var(--hair-strong); border-radius: var(--r-md); color: var(--ink); cursor: pointer; min-width: 0; }
.gal-card:hover, .gal-card:focus-visible { border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.25); }
.gal-card.on { border-color: var(--gold-600); background: rgba(232, 201, 122, 0.25); box-shadow: 0 0 0 2px var(--gold-600); }
.gal-th { position: relative; display: block; width: 100%; aspect-ratio: 1600 / 1077; border-radius: 6px; overflow: hidden; background: var(--ivory-200); }
.gal-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-play { position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(30, 7, 13, 0.72); }
.gal-play svg { width: 13px; height: 13px; margin-left: 1px; }
.gal-cap { display: flex; flex-direction: column; gap: 1px; font-size: 13px; line-height: 1.25; color: var(--ink-3); min-width: 0; overflow-wrap: anywhere; }
.gal-cap b { font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--wine-600); font-weight: 600; }
.gal-bar { align-items: end; }
.gal-new { display: flex; justify-content: flex-end; margin: 4px 0 12px; }
.gal-theme:disabled { opacity: 0.55; cursor: not-allowed; }
.gal-theme b svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.gal-copy { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.gal-howto { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.gal-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.gal-prog[hidden] { display: none; }
.gal-prog progress { flex: 1; height: 10px; accent-color: var(--wine-600); }
.gal-prog span { font-size: 13px; color: var(--ink-3); min-width: 3.5em; text-align: right; }
#gi-vid[hidden], #gi-crop[hidden] { display: none; }
#gi-t { width: 100%; }
#gi-vid { display: grid; gap: 10px; }
.gal-big { width: 100%; max-height: 520px; object-fit: contain; border-radius: 8px; border: 1px solid var(--hair-strong); background: #1e070d; display: block; }
/* Fiche d'un média : aperçu au format de l'écran TV (recadré comme lui), métadonnées en liste de définitions, création d'une vidéo depuis une image */
.gal-fig { margin: 0; display: grid; gap: 4px; }
.gal-big.gal-tv { aspect-ratio: 1600 / 1077; max-height: none; object-fit: cover; }
.gal-fig figcaption { margin: 0; text-align: center; }
.gal-meta { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 10px 16px; margin: 0; }
.gal-meta dt { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine-600); padding-top: 3px; }
.gal-meta dd { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 559px) { .gal-meta { grid-template-columns: minmax(0, 1fr); gap: 0; } .gal-meta dd { margin-bottom: 12px; } }
.gal-mkvid { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--ivory-50); }
.gal-mkvid h3 { font-family: var(--f-display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine-600); }
.gal-mkvid .hint { margin: 0; }
.gal-mkrow { display: grid; gap: 12px; }
@media (min-width: 560px) { .gal-mkrow { grid-template-columns: minmax(0, 14rem) 1fr; align-items: end; } }
.gal-prompt summary, .gal-adv summary { cursor: pointer; font-family: var(--f-display); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wine-600); padding: 6px 0; }
.gal-prompt p { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.gal-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 4px; padding: 0; counter-reset: gs; }
.gal-steps li { flex: 1; text-align: center; padding: 6px 2px; border-bottom: 3px solid var(--hair); font-family: var(--f-display); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.gal-steps li.done { border-color: var(--gold-500); }
.gal-steps li.on { border-color: var(--wine-600); color: var(--wine-600); font-weight: 600; }
.gal-themes, .gal-format { display: grid; gap: 10px; }
.gal-theme { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; background: var(--ivory-50); border: 1px solid var(--hair-strong); border-radius: var(--r-md); color: var(--ink); cursor: pointer; }
.gal-theme b { font-family: var(--f-serif); font-size: 18px; color: var(--wine-600); }
.gal-theme span { font-size: 14px; line-height: 1.35; color: var(--ink-3); }
.gal-theme:hover, .gal-theme:focus-visible { border-color: var(--gold-600); }
.gal-theme.on { border-color: var(--gold-600); background: rgba(232, 201, 122, 0.25); box-shadow: 0 0 0 2px var(--gold-600); }
.gal-cands { display: grid; gap: 10px; }
.gal-cand { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--ivory-200); cursor: pointer; line-height: 0; }
.gal-cand img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.gal-cand.on { border-color: var(--gold-600); box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.35); }
.gal-adv[hidden] { display: none; }
a.gal-cand { display: block; position: relative; text-decoration: none; }
a.gal-cand:hover, a.gal-cand:focus-visible { border-color: var(--gold-600); }
.gal-ccap { display: block; padding: 8px 10px; font-size: 14px; line-height: 1.3; color: var(--wine-600); background: var(--ivory-50); }
.gal-check b::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; border: 1.5px solid var(--gold-600); border-radius: 4px; background: var(--ivory-50); }
.gal-check.on b::before { content: "✓"; background: var(--gold-600); color: var(--ivory-50); font-size: 12px; line-height: 16px; text-align: center; font-family: var(--f-sans, sans-serif); }
.gal-wait { display: grid; justify-items: center; gap: 10px; padding: 26px 12px; text-align: center; color: var(--ink-2); }
.gal-spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--hair-strong); border-top-color: var(--wine-600); animation: gal-rot 0.9s linear infinite; }
.gal-spin[hidden] { display: none; }
@keyframes gal-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gal-spin { animation-duration: 3s; } }
/* Étape « images » : « Choisir cette image » en pleine largeur au-dessus de Retour / Relancer (3 boutons ne tiennent pas sur 390 px) */
@media (max-width: 559px) { .gal-act3 { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr 1fr; } .gal-act3 .btn-gold { grid-column: 1 / -1; order: -1; } }
.gal-sub { margin-top: 10px; }
.gal-sub .btn-ghost { width: 100%; }
.pa .wf-top > div { min-width: 0; }
.pa .wf-top .pill { flex-shrink: 0; white-space: nowrap; align-self: flex-start; }
@media (min-width: 768px) { .gal-cands { grid-template-columns: repeat(3, 1fr); } .gal-themes { grid-template-columns: repeat(2, 1fr); } .gal-format { grid-template-columns: 1fr 1fr; } .gal-modes { grid-template-columns: repeat(3, 1fr); } }
/* Aperçu fidèle du message sur l'écran (mêmes proportions que /welcome, unités = cqw de la zone) */
.tv-pv-wrap { container-type: inline-size; }
.tv-pv { position: relative; width: 100%; aspect-ratio: 1600 / 1077; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 8px; overflow: hidden; padding: 4.4cqw 7.8cqw; border: 1px solid var(--hair-strong); }
.tv-pv.ivory { background: radial-gradient(ellipse 80% 70% at 50% 40%, #fffdf8 0%, #fbf4e4 100%); color: #1a0c06; }
.tv-pv.wine { background: radial-gradient(ellipse 80% 70% at 50% 40%, #9b2438 0%, #7a1c2e 100%); color: #fff; }
.tv-pv::before { content: ""; position: absolute; top: 1.9cqw; left: 2.5cqw; right: 2.5cqw; bottom: 1.9cqw; border: 1.5px solid #d4a843; pointer-events: none; }
.tv-pv::after { content: ""; position: absolute; top: 3cqw; left: 3.75cqw; right: 3.75cqw; bottom: 3cqw; border: 1px solid #e8c97a; opacity: 0.7; pointer-events: none; }
.tv-pv-in { max-width: 81cqw; display: flex; flex-direction: column; align-items: center; gap: 2.1cqw; position: relative; z-index: 1; }
.tv-pv-t { font-family: var(--f-display); font-weight: 700; font-size: 4.2cqw; letter-spacing: 0.08em; line-height: 1.2; text-transform: uppercase; color: #7a1c2e; }
.tv-pv.wine .tv-pv-t { color: #e8c97a; }
.tv-pv-r { width: 14cqw; height: 2px; background: linear-gradient(90deg, transparent, #d4a843, transparent); }
.tv-pv-b { font-family: var(--f-serif); font-weight: 500; line-height: 1.35; white-space: pre-line; overflow-wrap: break-word; max-width: 100%; }
.tv-pv-b.s1 { font-size: 5.3cqw; } .tv-pv-b.s2 { font-size: 4.2cqw; } .tv-pv-b.s3 { font-size: 3.3cqw; } .tv-pv-b.s4 { font-size: 2.7cqw; }
/* Message sur un fond de la galerie : aperçu du formulaire (même voile et texte clair que sur l'écran) */
.tv-pv.gal { background: #1e070d; color: #fff8ea; }
.tv-pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tv-pv-veil { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(30, 7, 13, 0.8) 0, rgba(30, 7, 13, 0.62) 60%, rgba(30, 7, 13, 0.5) 100%); }
.tv-pv.gal::before, .tv-pv.gal::after { z-index: 1; }
.tv-pv.gal .tv-pv-t { color: #e8c97a; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }
.tv-pv.gal .tv-pv-b { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65); }
.tv-pv img[hidden], .tv-pv i[hidden] { display: none; }
.tv-pv-qr { display: grid; place-items: center; width: 14cqw; aspect-ratio: 1; background: #fff; color: #1a0c06; border: 2px solid #d4a843; font-family: var(--f-display); font-weight: 700; font-size: 3.4cqw; letter-spacing: 0.08em; }
.tv-new { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tv-new > * { min-width: 0; }
.tv-bg { display: grid; gap: 12px; margin-top: 10px; }
.tv-bg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tv-bg-pick { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--ivory-50); }
.tv-bg[hidden], .tv-bg-pick[hidden] { display: none; }
.tv-bg-pick .row2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tv-bg-pick .btn-sm { justify-self: start; }
.tv-bg .pa-cur-row .btn-sm { margin-top: 0; }
.tv-bg-grid { max-height: 52vh; overflow-y: auto; padding: 2px; }
.tv-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.tv-pick { position: relative; }
.tv-pick:focus-within { outline: 2px solid var(--gold-600); outline-offset: 2px; }

/* ============================================================
   RESPONSIVE — tablette & bureau
   Mobile (< 768px) : inchangé (coque 520px, barre d'onglets en bas).
   Tablette (≥ 768px) : coque élargie, tuiles sur 3 colonnes.
   Bureau (≥ 1024px) : mise en page d'application (type SaaS) —
   barre latérale fixe, barre supérieure, tableau de bord en grille.
   ============================================================ */
:root { --side-w: 264px; }
.sidenav, .topbar { display: none; }

/* ---------- Tablette ---------- */
@media (min-width: 768px) {
  .shell, .tabbar { max-width: 720px; }
  .content { padding: 0 28px; }
  .hero { padding-left: 40px; padding-right: 76px; padding-bottom: 70px; }
  .hero h1 { font-size: 32px; }
  .phead { padding-left: 28px; padding-right: 28px; }
  .phead .back { left: 20px; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .tile { min-height: 132px; }
  .toast, .install { max-width: 520px; }
}

/* ---------- Bureau : application ---------- */
@media (min-width: 1024px) {
  .tv-tabs { top: 84px; } /* sous la barre supérieure collante (78 px) */
  body { padding: 0; background: var(--ivory-200); }
  .shell {
    max-width: none; min-height: 100dvh; margin: 0 0 0 var(--side-w); padding: 0;
    border-radius: 0; box-shadow: none; overflow: visible;
    background: radial-gradient(70% 40% at 60% 0%, rgba(232, 201, 122, 0.10), transparent 70%), var(--ivory-100);
  }
  .tabbar, .phead, .seg { display: none; }

  /* Barre latérale */
  .sidenav {
    display: flex; flex-direction: column;
    position: fixed; inset: 0 auto 0 0; z-index: 45; width: var(--side-w);
    padding: 22px 14px 18px; overflow-y: auto;
    color: var(--ivory-100);
    background:
      radial-gradient(120% 40% at 0% 0%, rgba(232, 201, 122, 0.16), transparent 60%),
      linear-gradient(180deg, var(--wine-800), var(--wine-950));
    box-shadow: 1px 0 0 rgba(212, 168, 67, 0.28);
  }
  .sn-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; border-bottom: 1px solid rgba(232, 201, 122, 0.14); }
  .sn-medal { width: 48px; height: 48px; flex: none; border-radius: 50%; padding: 2px; background: var(--foil); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.7); }
  .sn-medal img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
  .sn-brand b { display: block; font-family: var(--f-display); font-weight: 600; font-size: 15.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-300); }
  .sn-brand .he { display: block; font-size: 16px; color: rgba(245, 228, 176, 0.65); text-align: left; }
  .sn-h { margin: 22px 12px 8px; font-family: var(--f-display); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(232, 201, 122, 0.6); }
  .sn-list { display: grid; gap: 2px; }
  .sn-list a, .sn-user {
    position: relative; display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 12px;
    font-size: 16.5px; color: rgba(251, 247, 239, 0.82);
    transition: background 0.15s, color 0.15s;
  }
  .sn-list a svg { width: 19px; height: 19px; flex: none; color: var(--gold-400); opacity: 0.85; }
  .sn-list a:hover, .sn-user:hover { background: rgba(232, 201, 122, 0.08); color: var(--ivory-50); }
  .sn-list a.on { background: rgba(232, 201, 122, 0.15); color: var(--gold-300); }
  .sn-list a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--foil); }
  .sn-list a.on svg { opacity: 1; }
  .sn-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--foil); color: var(--wine-900); font-size: 12px; font-weight: 600; }
  .sn-badge[hidden] { display: none; }
  /* Sous-menu (Soutenir > Faire un don) : en retrait, relié par un filet doré ; la barre de l'élément actif se pose sur le filet. */
  .sn-sub { display: grid; gap: 1px; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid rgba(232, 201, 122, 0.22); }
  .sn-list .sn-sub a { gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 15px; }
  .sn-list .sn-sub a svg { width: 16px; height: 16px; }
  .sn-list .sn-sub a.on::before { left: -12px; top: 7px; bottom: 7px; }
  .sn-list .sn-sub a .sn-ext { width: 12px; height: 12px; margin-left: auto; opacity: 0.5; }
  .sn-list .sn-sub a.soon { color: rgba(251, 247, 239, 0.55); }
  .sn-list .sn-sub a.soon.on { color: var(--gold-300); }
  /* Gestion : sections réordonnables par glisser-déposer */
  .sn-sort a[draggable="true"] { cursor: grab; }
  .sn-sort.sorting a { cursor: grabbing; }
  .sn-sort a.dragging { opacity: 0.45; background: rgba(232, 201, 122, 0.1); outline: 1px dashed rgba(232, 201, 122, 0.55); outline-offset: -1px; }
  .sn-h:has(.sn-reset) { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .sn-reset { padding: 0; border: 0; background: none; font: inherit; font-size: 9px; letter-spacing: 0.14em; color: rgba(232, 201, 122, 0.55); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .sn-reset:hover, .sn-reset:focus-visible { color: var(--gold-300); }
  /* La barre latérale liste déjà les sections admin : les pastilles deviennent inutiles sur bureau. */
  body[data-page="admin"] .pills { display: none; }
  .sn-foot { margin-top: auto; padding-top: 18px; }
  .sn-user { border: 1px solid rgba(232, 201, 122, 0.16); background: rgba(0, 0, 0, 0.12); }
  .sn-user.on { border-color: rgba(232, 201, 122, 0.45); }
  .sn-av { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--foil); color: var(--wine-900); font-family: var(--f-display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
  .sn-av svg { width: 18px; height: 18px; }
  .sn-user b { display: block; font-weight: 500; font-size: 15.5px; line-height: 1.2; color: var(--ivory-100); }
  .sn-user small { display: block; font-size: 13px; color: rgba(245, 228, 176, 0.6); }
  .sn-sig { margin: 14px 12px 0; font-family: var(--f-serif); font-style: italic; font-size: 14.5px; line-height: 1.3; color: rgba(245, 228, 176, 0.5); }
  .sidenav a:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }

  /* Barre supérieure */
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: sticky; top: 0; z-index: 40;
    min-height: 78px; padding: 12px 40px;
    background: rgba(251, 247, 239, 0.9);
    -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--hair);
  }
  .tb-title .eyebrow { font-size: 10px; }
  .tb-title h1 { font-family: var(--f-display); font-weight: 500; font-size: 25px; letter-spacing: 0.05em; color: var(--wine-600); line-height: 1.15; margin-top: 2px; }
  .tb-right { display: flex; align-items: center; gap: 22px; }
  .tb-date { text-align: right; line-height: 1.25; }
  .tb-date b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 17px; color: var(--ink); }
  .tb-date span { font-size: 14px; color: var(--ink-3); }
  .tb-date .he { font-size: 15px; }
  .tb-don {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px;
    font-family: var(--f-display); font-weight: 600; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--wine-950); background: var(--foil);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 22px -12px rgba(143, 106, 30, 0.9);
    transition: filter 0.15s, transform 0.15s;
  }
  .tb-don svg { width: 16px; height: 16px; }
  .tb-don:hover { filter: brightness(1.05); transform: translateY(-1px); }

  /* Zone de contenu */
  #view { max-width: 1360px; margin: 0 auto; padding: 30px 40px 24px; }
  .content { max-width: 880px; margin: 0 auto; padding: 0; }
  .lift { margin-top: 0; }
  .content + .content { margin-top: 8px; }
  .content > .sec-title:first-child { margin-top: 0; }
  .content.adm { max-width: 1120px; }
  .foot { padding: 48px 0 8px; }
  .foot .quote { font-size: 16px; }

  /* Éléments flottants */
  .toast { bottom: 28px; left: calc(50% + var(--side-w) / 2); }
  .install { bottom: 24px; left: auto; right: 28px; margin: 0; }
  .actionbar { bottom: 16px; }
  .gal-create .actionbar { position: static; margin: 4px 0 0; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; } /* bureau : le formulaire tient à l'écran, une barre flottante cacherait le prompt */

  /* Survols */
  .tile { transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s; }
  .tile:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 20px 38px -20px rgba(61, 15, 28, 0.55); }
  .tile.dark:hover { filter: brightness(1.08); }
  .don-banner, .nextcourse { transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .don-banner:hover, .nextcourse:hover { transform: translateY(-2px); }
  a.lrow, .lrow { transition: background 0.15s; }
  a.lrow:hover { background: rgba(232, 201, 122, 0.14); }
  .btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); }
  .btn-ghost:hover { background: rgba(212, 168, 67, 0.12); }
  .pz-link:hover { color: var(--wine-600); }
  .tile:focus-visible, .lrow:focus-visible, .btn-gold:focus-visible, .btn-ghost:focus-visible, .tb-don:focus-visible { outline: 2px solid var(--wine-600); outline-offset: 2px; }

  /* ---------- Accueil : bandeau + tableau de bord ---------- */
  .hero {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 28px; align-items: center;
    grid-template-areas: "medal name" "medal he" "medal dir";
    text-align: left; padding: 26px 36px; margin-bottom: 26px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-deep), 0 0 0 1px rgba(212, 168, 67, 0.3) inset;
  }
  .hero::after { left: 24px; right: 24px; bottom: 8px; }
  .hero-bar, .hero .ornament, .hero .hdates { display: none; }
  .hero-sub { display: contents; }
  .hero .medallion { grid-area: medal; width: 112px; height: 112px; margin: 0; }
  .hero h1 { grid-area: name; font-size: 38px; margin: 0; align-self: end; }
  .hero .he-name { grid-area: he; font-size: 22px; margin: 2px 0 0; text-align: left; }
  .hero .direction { grid-area: dir; align-items: flex-start; flex-direction: row; gap: 10px; align-items: baseline; margin-top: 4px; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .tile { min-height: 136px; padding: 18px; }
  .tile.wide { padding: 16px 20px; }
  .don-banner { padding: 20px 24px; }

  /* ---------- Pages larges ---------- */
  body[data-page="accueil"] .content, body[data-page="zmanim"] .content, body[data-page="offices"] .content,
  body[data-page="cours"] .content, body[data-page="dons"] .content { max-width: none; }

  /* Zmanim : sélecteur de jour en bandeau, Matin / Journée / Soir en trois colonnes */
  body[data-page="zmanim"] .daypick { grid-template-columns: 56px 1fr 56px; padding: 12px 16px; }
  body[data-page="zmanim"] .daypick .dp-date { font-size: 19px; }
  body[data-page="zmanim"] #zl { columns: 3; column-gap: 0; column-rule: 1px solid rgba(184, 137, 42, 0.16); padding: 6px 0; }
  body[data-page="zmanim"] #zl .zrow { break-inside: avoid; border-top: 0 !important; }
  body[data-page="zmanim"] #zl .zrow:has(> .eyebrow):not(:first-child) { break-before: column; }
  body[data-page="zmanim"] #zl .zrow:last-child { border-top: 1px solid rgba(184, 137, 42, 0.13) !important; }
  body[data-page="zmanim"] .zrow { padding: 13px 24px; }

  /* Offices : aujourd'hui à gauche, semaine à droite */
  body[data-page="offices"] #view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); column-gap: 26px; align-items: start; }
  body[data-page="offices"] #view > .foot { grid-column: 1 / -1; }
  body[data-page="offices"] #view > .content { margin: 0; }
  body[data-page="offices"] #view > .content.lift { padding-top: 29px; position: sticky; top: 102px; }
  body[data-page="offices"] .today-offices { grid-template-columns: 1fr; }
  body[data-page="offices"] .today-offices .to { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n t" "he t"; text-align: left; align-items: center; padding: 18px 24px; }
  body[data-page="offices"] .today-offices .to + .to { border-left: 0; border-top: 1px solid rgba(184, 137, 42, 0.16); }
  body[data-page="offices"] .today-offices .to .n { grid-area: n; font-size: 17px; margin: 0; }
  body[data-page="offices"] .today-offices .to .he { grid-area: he; text-align: left; }
  body[data-page="offices"] .today-offices .to b { grid-area: t; margin: 0; font-size: 40px; }
  body[data-page="offices"] .today-offices .to b.txt { font-size: 17px; line-height: 1.3; }
  body[data-page="offices"] .today-offices .to.next { background: linear-gradient(90deg, rgba(232, 201, 122, 0.25), transparent); }
  .wrow { padding: 14px 24px; grid-template-columns: 120px repeat(3, 1fr); }
  .wrow .wt { font-size: 22px; }

  /* Cours : jours en grille de cartes */
  body[data-page="cours"] #cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 22px 24px; align-items: start; }
  body[data-page="cours"] #cl > * { margin: 0; }
  body[data-page="cours"] #cl > .note { grid-column: 1 / -1; }
  body[data-page="cours"] .lift > div:first-child > .day-title b { color: var(--wine-600); }
  body[data-page="cours"] .lift > div:first-child > .day-title span { color: var(--ink-3); }

  /* Dons : appel principal + options côte à côte */
  body[data-page="dons"] .content.lift { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  body[data-page="dons"] .content.lift > * { margin: 0; }
  body[data-page="dons"] .don-hero { padding: 40px 36px 34px; }

  /* Liens : deux colonnes */
}

/* Petits écrans de bureau : barre latérale plus fine, colonne Chabbat plus étroite */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --side-w: 228px; }
  #view { padding: 26px 28px 20px; }
  .topbar { padding: 10px 28px; }
  .tb-right { gap: 16px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 22px 28px; }
  .hero .medallion { width: 92px; height: 92px; }
  .hero h1 { font-size: 32px; }
  body[data-page="zmanim"] .zrow { padding: 12px 16px; }
  body[data-page="offices"] #view { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: 22px; }
  .wrow { padding: 12px 16px; grid-template-columns: 84px repeat(3, 1fr); }
}

@media (min-width: 1440px) {
  :root { --side-w: 280px; }
  #view { padding-left: 48px; padding-right: 48px; }
  .topbar { padding-left: 48px; padding-right: 48px; }
}

/* ============================================================
   NOTIFICATIONS : cloche, boîte de réception, préférences, envois
   ============================================================ */
.bell {
  position: absolute; z-index: 5; right: 12px; top: calc(var(--safe-t) + 10px);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gold-400);
  background: rgba(232, 201, 122, 0.08); border: 1px solid rgba(232, 201, 122, 0.2);
}
.bell svg { width: 19px; height: 19px; }
.bell .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; border: 2px solid var(--wine-800); }
.shell.has-bell .hero-bar .hb-right { margin-right: 40px; }
a.notif { color: inherit; }
a.notif .l-go { width: 18px; height: 18px; color: var(--gold-500); }
.notif > div { min-width: 0; }
.notif p { word-break: break-word; }
.np-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 0; }
.np-row + .np-row { border-top: 1px solid rgba(184, 137, 42, 0.12); }
.np-row > span { font-size: 16.5px; }
.np-row label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-family: var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.np-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hint svg { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 4px; color: var(--gold-700); }
.np-actions .btn-gold, .np-actions .btn-ghost { margin-top: 0; flex: 1 1 200px; }
.bc-prev { padding: 10px 14px; border-radius: var(--r-sm); background: var(--ivory-200); border: 1px solid var(--hair); font-size: 15px; line-height: 1.4; }
.bc-item { padding: 14px 16px; }
.bc-item + .bc-item { border-top: 1px solid rgba(184, 137, 42, 0.13); }
.bc-item h3 { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.02em; line-height: 1.25; }
.bc-item p { font-size: 14.5px; color: var(--ink-2); line-height: 1.3; margin-top: 2px; word-break: break-word; }
.bc-item small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.mode-sel { max-width: 190px; }
/* Volet latéral des notifications : voile blanc, panneau blanc, mise en page minimale */
.np-back { position: fixed; inset: 0; z-index: 90; background: rgba(255, 253, 248, 0.68); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: np-fade 0.18s ease; }
.np-pop {
  position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; width: min(380px, 92vw);
  display: flex; flex-direction: column; outline: none;
  background: #fff; border-left: 1px solid rgba(184, 137, 42, 0.16);
  box-shadow: -18px 0 50px -26px rgba(61, 15, 28, 0.28);
  animation: np-in 0.2s cubic-bezier(.2, .8, .3, 1);
}
.np-back.out, .np-pop.out { pointer-events: none; }
.np-back.out { animation: np-fade 0.16s ease reverse forwards; }
.np-pop.out { animation: np-in 0.16s ease reverse forwards; }
.np-head { display: flex; align-items: center; padding: calc(var(--safe-t) + 18px) 14px 10px 22px; }
.np-head h2 { flex: 1; font-family: var(--f-display); font-weight: 500; font-size: 16px; letter-spacing: 0.04em; color: var(--ink); }
.np-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; }
.np-x:hover { background: rgba(184, 137, 42, 0.1); }
.np-x svg { width: 18px; height: 18px; }
.np-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.np-body .err { padding: 22px; }
.np-empty { padding: 40px 22px; text-align: center; color: var(--ink-3); font-size: 15.5px; }
.np-pop .notif { display: grid; grid-template-columns: 8px 1fr; gap: 14px; align-items: start; padding: 15px 22px; color: inherit; border-top: 1px solid rgba(184, 137, 42, 0.12); box-shadow: none; background: none; }
.np-pop .notif + .notif { border-top: 1px solid rgba(184, 137, 42, 0.12); }
.np-pop a.notif:hover { background: rgba(184, 137, 42, 0.05); }
.np-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.np-pop .notif.unread .np-dot { background: var(--wine-600); }
.np-pop .notif h3 { font-family: var(--f-serif); font-weight: 600; font-size: 16px; letter-spacing: 0; line-height: 1.3; color: var(--ink); }
.np-pop .notif p { font-size: 15px; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.np-pop .notif small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.np-foot { padding: 12px 22px calc(var(--safe-b) + 14px); border-top: 1px solid rgba(184, 137, 42, 0.12); }
.np-foot a { font-size: 14.5px; }
.np-foot svg { width: 1em; height: 1em; vertical-align: -0.12em; }
@keyframes np-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes np-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .np-pop, .np-back, .np-back.out, .np-pop.out { animation: none; } }
.tb-bell { display: none; }
@media (min-width: 1024px) {
  .bell { display: none; }
  .shell.has-bell .hero-bar .hb-right { margin-right: 0; }
  .tb-bell {
    position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    color: var(--wine-600); background: rgba(184, 137, 42, 0.08); border: 1px solid rgba(184, 137, 42, 0.25);
  }
  .tb-bell svg { width: 19px; height: 19px; }
  .tb-bell.on, .tb-bell:hover { background: rgba(184, 137, 42, 0.16); }
  .tb-bell .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; border: 2px solid var(--ivory-100); }
}

/* Puce d'environnement (hors production) : toujours visible, ne bloque aucun clic. */
.envchip {
  position: fixed; z-index: 100; top: calc(var(--safe-t) + 2px); left: 50%; transform: translateX(-50%);
  padding: 2px 9px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  font-family: var(--f-display); font-size: 9px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: #c2410c; border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.5);
}

/* Promesses du Chabbat : motifs rapides, actions du fidèle, écran ADMIN */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.qchip { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 14px; color: var(--wine-600); background: var(--ivory-100); border: 1px solid var(--hair-strong); }
.qchip:active, .qchip:hover { background: var(--ivory-200); }
.promise .pm-act { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--hair); }
.pm-act .hint { margin: 0 0 8px; }
.pm-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-pm { padding: 14px; }
.sp-pm.stale { border-color: rgba(155, 36, 56, 0.45); box-shadow: 0 0 0 2px rgba(155, 36, 56, 0.1), var(--shadow-card); }
.sp-pm h3 { font-family: var(--f-display); font-weight: 500; font-size: 15.5px; letter-spacing: 0.02em; }
.sp-pm p { font-size: 14px; color: var(--ink-3); line-height: 1.3; }
.sp-pm .bk-bot { margin-top: 10px; padding-top: 10px; }
.sp-pm .bk-act { flex-wrap: wrap; }
.satchip.todo i { background: #9b2438; }
.pick { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
.pick button { text-align: left; padding: 9px 12px; border-radius: var(--r-sm); background: var(--ivory-100); border: 1px solid var(--hair); font-size: 15px; }
.pick button small { display: block; color: var(--ink-3); font-size: 13px; }

/* ---------- Admin : tableau des droits (admins × sections) ---------- */
.pm-wrap { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pm { width: 100%; border-collapse: collapse; font-size: 14px; }
.pm th, .pm td { padding: 10px 8px; text-align: center; vertical-align: middle; border-top: 1px solid rgba(184, 137, 42, 0.13); }
.pm thead th { border-top: 0; font-family: var(--f-display); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.pm th[scope="row"], .pm thead th:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--ivory-50); min-width: 150px; padding-left: 16px; }
.pm th[scope="row"] b { display: block; font-weight: 500; }
.pm th[scope="row"] small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.pm-h { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.pm-h svg { width: 18px; height: 18px; color: var(--gold-600); }
.pm .sw { margin: 0; }
.pm .pm-tout { border-right: 1px solid rgba(184, 137, 42, 0.13); }
.pm .pm-all { width: 18px; height: 18px; color: var(--gold-600); }

/* ---------- Admin : conflits de paramètres prod / staging ---------- */
.cf-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; padding: 0 4px; }
.cf-bar a { font-size: 13.5px; color: var(--gold-700); }
.cf-h { font-family: var(--f-display); font-weight: 500; font-size: 15px; margin-bottom: 10px; overflow-wrap: anywhere; }
.cf-path { color: var(--ink-3); font-weight: 400; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 10px; }
.cf-env { display: block; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.cf-val { font-size: 14.5px; overflow-wrap: anywhere; }
.cf-val code { display: block; white-space: pre-wrap; font-size: 12.5px; max-height: 180px; overflow: auto; }
.cf-grid small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.cf-abs { color: var(--ink-3); font-style: italic; }
.cf-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cf-edit { margin-top: 12px; }
.cf-edit input, .cf-edit select, .cf-edit textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--hair-strong); border-radius: 8px; background: var(--ivory-50); }
.cf-edit textarea { font-family: ui-monospace, monospace; font-size: 12.5px; }
.cf-ign { opacity: 0.7; }
@media (max-width: 560px) { .cf-grid { grid-template-columns: 1fr; } }
.cf-act[hidden], .cf-edit[hidden] { display: none; }

/* ============================================================
   Horaires automatiques (admin) et annonces
   ============================================================ */
.wk > summary { display: grid; grid-template-columns: 50px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 14px 16px; list-style: none; cursor: pointer; }
.wk > summary::-webkit-details-marker { display: none; }
.wk[open] > summary { border-bottom: 1px solid var(--hair); }
.wk[open] > summary .l-go { transform: rotate(90deg); }
.wk .l-go { width: 18px; height: 18px; color: var(--gold-500); transition: transform 0.15s; }
.wk-dt { display: block; padding: 6px 0 7px; text-align: center; border-radius: 14px; background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); line-height: 1.05; }
.wk-dt small { display: block; font-family: var(--f-display); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-400); }
.wk-dt b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 22px; color: var(--ivory-100); }
.wk.deg .wk-dt { background: linear-gradient(160deg, var(--wine-500), var(--wine-700)); }
.wk-main { min-width: 0; }
.wk-main h3 { font-family: var(--f-display); font-weight: 500; font-size: 15px; letter-spacing: 0.03em; color: var(--wine-600); }
.wk-main p { font-size: 14px; color: var(--ink-3); line-height: 1.3; overflow-wrap: anywhere; }
.wk-main p b { color: var(--ink-2); font-weight: 600; }
.wk-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wk-pills:empty { display: none; }
.wk-pills .pill { margin-left: 0; }
.pill.flag { color: var(--wine-600); background: rgba(155, 36, 56, 0.08); border: 1px solid rgba(155, 36, 56, 0.25); letter-spacing: 0.08em; }
.wk-form { padding: 16px; }
.src { display: inline-block; margin-left: auto; padding: 2px 8px; border-radius: 999px; font-family: var(--f-display); font-size: 8.5px; letter-spacing: 0.12em; white-space: nowrap; }
.src.auto { color: var(--ink-3); background: var(--ivory-200); }
.src.learned { color: var(--gold-700); background: rgba(212, 168, 67, 0.2); border: 1px solid rgba(184, 137, 42, 0.35); }
.src.override { color: var(--ivory-100); background: linear-gradient(160deg, var(--wine-600), var(--wine-800)); }
.hf .iw { position: relative; }
.hf.learned .inp { background: linear-gradient(90deg, rgba(232, 201, 122, 0.22), rgba(232, 201, 122, 0.08)); }
.hf.override .inp { background: linear-gradient(90deg, rgba(232, 201, 122, 0.4), rgba(232, 201, 122, 0.16)); border-color: var(--gold-500); }
.hf .inp:disabled { background: var(--ivory-200); color: var(--ink-2); opacity: 1; cursor: default; }
.hf .iw:has(.rv:not([hidden])) .inp { padding-right: 38px; }
.rv { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--wine-600); background: transparent; }
.rv[hidden] { display: none; }
.rv:hover, .rv:focus-visible { background: rgba(184, 137, 42, 0.16); }
.hf.mini .rv { top: -9px; right: -6px; transform: none; width: 22px; height: 22px; font-size: 13px; background: var(--ivory-50); border: 1px solid var(--hair-strong); }
.hf.mini .iw:has(.rv:not([hidden])) .inp { padding-right: 4px; }
/* Infos du Chabbat (admin › Horaires) : un seul cadre large, façon bloc « Information importante » de l'affiche */
.wk-base { padding: 16px; margin-bottom: 12px; }
.wk-info { display: grid; gap: 8px; margin-top: 4px; }
.wk-info .inf-h { display: flex; align-items: center; gap: 8px; }
.wk-info .inf-h .f-legend { margin: 0; }
.inf-rv { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--wine-600); background: transparent; flex: none; }
.inf-rv[hidden] { display: none; }
.inf-rv:hover, .inf-rv:focus-visible { background: rgba(184, 137, 42, 0.16); }
.inf-frame { padding: 12px; border-radius: var(--r-sm); background: var(--ivory-100); border: 1px solid var(--gold-500); }
.inf-frame .inf-ul { list-style: none; display: grid; gap: 10px; margin: 0; }
.inf-frame .inf-ul:empty { display: none; }
.inf-frame .inf-none { margin: 0; }
.inf-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 40px; gap: 6px; align-items: center; }
.inf-row .inp { min-height: 42px; }
.inf-row .inf-k { padding-left: 8px; padding-right: 4px; font-size: 14px; }
.inf-row.success .inf-k { border-left: 3px solid #3f7a4f; } .inf-row.warning .inf-k { border-left: 3px solid var(--wine-500); } .inf-row.info .inf-k { border-left: 3px solid var(--gold-500); }
.inf-del { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--wine-600); }
.inf-del svg { width: 17px; height: 17px; }
.inf-del:hover, .inf-del:focus-visible { background: rgba(155, 36, 56, 0.1); }
.inf-add { justify-self: start; }
.inf-add[hidden] { display: none; }
.inf-frame li:not(.inf-row) { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.3; color: var(--ink-2); }
.inf-frame li:not(.inf-row) svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--gold-600); }
.inf-frame li.success:not(.inf-row) svg { color: #3f7a4f; } .inf-frame li.warning:not(.inf-row) svg { color: var(--wine-500); }
@media (max-width: 520px) { .inf-row { grid-template-columns: minmax(0, 1fr) 40px; } .inf-row .inf-t { grid-column: 1 / -1; grid-row: 2; } .inf-row .inf-del { grid-column: 2; grid-row: 1; } .inf-frame .inf-ul { gap: 14px; } }

.an { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 12px; align-items: start; }
.an.off .an-t { opacity: 0.6; }
.an-mv { display: grid; gap: 6px; }
.an-mv .btn-sm { min-height: 38px; width: 44px; padding: 0; font-size: 17px; }
.an-mv .btn-sm:disabled { opacity: 0.35; }
.an-t { font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.an-m { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.an-k.success { color: #2f6b43; } .an-k.warning { color: var(--wine-500); }
.an-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.an-act .btn-sm { min-height: 36px; font-size: 10px; }
.an-sw { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); }
.an-sw .sw { margin: 0; }
.form .tg { padding: 8px 0; }

/* ============================================================
   ACCUEIL v3 — « Maison » : une page directe, sobre et dorée.
   Hero bordeaux unique (marque, prochain office, Chabbat), puis carrousel de cartes ivoire,
   prochain cours et accès rapides. Grille de 8 px ; cibles tactiles ≥ 44 px ; contrastes AA.
   ============================================================ */
.hm { --hm-x: 24px; }
.hm [data-in] { animation: hmIn 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes hmIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hm a:focus-visible, .hm button:focus-visible, .hm .hm-track:focus-visible { outline: 2px solid var(--wine-600); outline-offset: 3px; }
.hm .hm-hero a:focus-visible, .hm .hm-hero button:focus-visible { outline-color: var(--gold-300); }

/* ---- Hero ---- */
.hm-hero {
  position: relative; isolation: isolate; color: var(--ivory-100);
  padding: calc(var(--safe-t) + 16px) var(--hm-x) 32px;
  background:
    radial-gradient(90% 55% at 50% -12%, rgba(232, 201, 122, 0.24), transparent 62%),
    radial-gradient(70% 50% at 100% 100%, rgba(155, 36, 56, 0.5), transparent 70%),
    linear-gradient(170deg, var(--wine-700) 0%, var(--wine-800) 48%, var(--wine-900) 100%);
  border-radius: 0 0 32px 32px;
  box-shadow: 0 26px 40px -30px rgba(30, 7, 13, 0.8);
}
.hm-hero::before { /* filigrane */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.07; border-radius: inherit;
  background-image: radial-gradient(circle at 50% 50%, transparent 58%, var(--gold-400) 59%, transparent 60%), radial-gradient(circle at 50% 50%, transparent 70%, var(--gold-400) 70.6%, transparent 71.2%);
  background-size: 120px 120px; background-position: center -30px;
}
.hm-hero::after { /* liseré bas */
  content: ""; position: absolute; left: 40px; right: 40px; bottom: 12px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 201, 122, 0.55), transparent);
}
.hm-eye { font-family: var(--f-display); font-weight: 500; font-size: 11px; line-height: 1.2; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-400); }

/* Marque : logo, nom (français / hébreu), direction et Rav — une rangée compacte, filet doré dessous */
.hm-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo name" "rav rav";
  column-gap: 14px; row-gap: 12px; align-items: center;
  padding-bottom: 18px; border-bottom: 1px solid rgba(232, 201, 122, 0.22);
}
.hm-top .medallion { grid-area: logo; width: 52px; height: 52px; margin: 0; padding: 2px; flex: none; box-shadow: 0 0 0 3px rgba(232, 201, 122, 0.1), 0 8px 18px -10px rgba(0, 0, 0, 0.6); }
.hm-brand-t { grid-area: name; min-width: 0; padding-right: 44px; /* place de la cloche des notifications */ }
.hm-name { font-family: var(--f-display); font-weight: 600; font-size: 20px; letter-spacing: 0.14em; line-height: 1.15; }
.hm-he { margin-top: 2px; font-size: 16px; line-height: 1.2; color: var(--gold-400); text-align: left; }
.hm-rav { grid-area: rav; font-size: 14px; line-height: 1.3; color: rgba(245, 228, 176, 0.82); }
.hm-rav span { font-style: italic; }
.hm-rav b { font-family: var(--f-display); font-weight: 500; font-size: 12.5px; letter-spacing: 0.04em; color: var(--ivory-100); }

/* Prochain office */
.hm-next { margin-top: 16px; }
.hm-date { margin-top: 4px; min-height: 22px; font-size: 15px; line-height: 1.4; color: rgba(245, 228, 176, 0.88); }
.hm-nextmain { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.hm-time {
  font-family: var(--f-serif); font-weight: 600; font-size: clamp(64px, 20vw, 84px); line-height: 1; letter-spacing: 0.005em;
  background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}
.hm-time.txt { font-size: 24px; line-height: 1.15; font-style: italic; font-weight: 500; background: none; color: var(--gold-300); filter: none; max-width: 9ch; }
.hm-oside { min-width: 0; text-align: right; }
.hm-oname { font-family: var(--f-display); font-weight: 500; font-size: clamp(16px, 5vw, 20px); letter-spacing: 0.04em; line-height: 1.15; overflow-wrap: anywhere; }
.hm-ohe { font-size: 18px; line-height: 1.2; color: rgba(245, 228, 176, 0.75); }
.hm-count {
  display: inline-block; margin-top: 8px; min-height: 32px; padding: 4px 14px; border-radius: 999px;
  font-size: 15.5px; line-height: 24px; color: var(--gold-300); white-space: nowrap;
  background: rgba(232, 201, 122, 0.1); border: 1px solid rgba(232, 201, 122, 0.3);
}
.hm-next.is-err .hm-time { display: none; }
.hm-next.is-err .hm-oside { flex: 1; text-align: left; }
.hm-next.is-err .hm-offs { opacity: 0.4; }
.hm-offs { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(232, 201, 122, 0.2); }
.hm-offs li { min-height: 48px; text-align: center; }
.hm-offs li + li { border-left: 1px solid rgba(232, 201, 122, 0.14); }
.hm-offs small { display: block; font-family: var(--f-display); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245, 228, 176, 0.72); }
.hm-offs b { font-family: var(--f-serif); font-weight: 600; font-size: 21px; line-height: 1.3; color: var(--ivory-100); }
.hm-offs b i { font-family: var(--f-text); font-size: 14px; font-weight: 400; }
.hm-offs li.on small, .hm-offs li.on b { color: var(--gold-300); }

/* ---- Corps ---- */
.hm-body { display: grid; gap: 8px; padding: 16px 18px 0; }
.hm-body > * { min-width: 0; }
.hm-body #h-admin:empty { display: none; }
.hm-body #h-admin { padding-top: 8px; }
.hm-body .sec-title { margin: 16px 4px 12px; }
/* ---- Carrousel ---- */
.hm-track {
  position: relative; display: flex; gap: 12px; align-items: stretch;
  margin: 0 -18px; padding: 4px 18px 32px; scroll-padding-inline: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hm-track::-webkit-scrollbar { display: none; }
.hc {
  position: relative; flex: 0 0 min(320px, calc(100% - 28px)); scroll-snap-align: start;
  min-height: 232px; display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 20px;
  border-radius: 22px; overflow: hidden; color: var(--ink);
  background: linear-gradient(180deg, var(--ivory-50), var(--ivory-100));
  border: 1px solid var(--hair); box-shadow: var(--shadow-card);
}
.hc::before { content: ""; position: absolute; inset: 6px; z-index: 3; border-radius: 17px; border: 1px solid rgba(184, 137, 42, 0.22); pointer-events: none; }
.hc-skel { gap: 16px; }
.hc-skel .sk { display: block; width: 60%; height: 18px; }
.hc-skel .sk:first-child { width: 40%; height: 12px; }
.hc-skel .sk:last-child { width: 80%; }
.hc-wine, .hc-media { color: var(--ivory-100); background: linear-gradient(160deg, var(--wine-800), var(--wine-950)); border-color: rgba(212, 168, 67, 0.35); box-shadow: var(--shadow-deep); }
.hc-wine::before, .hc-media::before { border-color: rgba(232, 201, 122, 0.2); }
.hc-eye { font-family: var(--f-display); font-weight: 500; font-size: 10.5px; line-height: 1.3; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-700); }
.hc-wine .hc-eye, .hc-media .hc-eye { color: var(--gold-400); }
.hc-title { font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.2; letter-spacing: 0.05em; color: var(--wine-600); }
.hc-wine .hc-title, .hc-media .hc-title { color: var(--gold-300); }
.hc-he { display: block; margin-top: 2px; font-size: 18px; letter-spacing: 0; text-align: left; color: rgba(245, 228, 176, 0.85); }
.hc-date { font-style: italic; font-size: 15.5px; color: var(--ink-2); }
.hc-wine .hc-date, .hc-media .hc-date { color: rgba(245, 228, 176, 0.88); }
.hc-rule { width: 40px; height: 1px; margin: 4px 0; background: linear-gradient(90deg, var(--gold-500), transparent); }
.hc-in { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hc-body { font-family: var(--f-serif); font-weight: 600; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink); }
.hc-body.s1 { font-size: 25px; } .hc-body.s2 { font-size: 22px; } .hc-body.s3 { font-size: 19px; } .hc-body.s4 { font-size: 17px; }
.hc-wine .hc-body, .hc-msg .hc-body { color: var(--ivory-100); }
.hc-sub { font-size: 15.5px; line-height: 1.35; color: var(--ink-2); }
.hc-wine .hc-sub { color: rgba(245, 228, 176, 0.85); }
.hc .hc-cta { width: auto; align-self: flex-start; min-height: 48px; margin-top: auto; padding: 0 24px; position: relative; z-index: 4; text-align: center; }
.hc-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: auto; align-self: flex-start; font-family: var(--f-display); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--wine-600); position: relative; z-index: 4; }
.hc-link svg { width: 14px; height: 14px; }
/* Médias */
.hc-media { justify-content: flex-end; }
.hc-m { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hc-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(30, 7, 13, 0.6) 0, transparent 30%, transparent 46%, rgba(30, 7, 13, 0.92) 100%); }
.hc-veil { position: absolute; inset: 0; z-index: 1; background: rgba(30, 7, 13, 0.58); }
.hc-top { position: absolute; z-index: 4; top: 22px; left: 24px; right: 24px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); color: var(--gold-300); }
.hc-cap { position: relative; z-index: 4; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.hc-media .hc-title { font-size: 24px; }
.hc-msg { justify-content: center; }
.hc-affiche { padding: 0; background: var(--wine-950); border-color: rgba(212, 168, 67, 0.35); box-shadow: var(--shadow-deep); }
.hc-affiche::before { display: none; }
.hc-blur { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); max-width: none; object-fit: cover; filter: blur(24px) brightness(0.55); }
.hc-fit { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: contain; }
/* Cours */
.hc-lines { list-style: none; display: grid; gap: 8px; }
.hc-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(184, 137, 42, 0.22); }
.hc-lines li:first-child { border-top: 0; padding-top: 0; }
.hc-lines li span { min-width: 0; }
.hc-lines small { display: block; font-family: var(--f-display); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-700); }
.hc-lines b { display: block; font-family: var(--f-serif); font-weight: 600; font-size: 19px; line-height: 1.2; }
.hc-lines em { display: block; font-size: 14.5px; line-height: 1.3; color: var(--ink-2); }
.hc-lines time { flex: none; font-family: var(--f-serif); font-weight: 700; font-size: 24px; color: var(--wine-600); }
.hc-lines li.off b, .hc-lines li.off time { text-decoration: line-through; opacity: 0.55; }
/* Chabbat (carte) */
.hc-shab .hc-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hc-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; border-top: 1px solid rgba(232, 201, 122, 0.2); text-align: center; }
.hc-times > div { padding: 8px 4px 6px; border-bottom: 1px solid rgba(232, 201, 122, 0.14); }
.hc-times > div:nth-child(3n + 2), .hc-times > div:nth-child(3n) { border-left: 1px solid rgba(232, 201, 122, 0.14); }
.hc-times dt { min-height: 36px; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1.15; color: rgba(245, 228, 176, 0.88); }
.hc-times dd { font-family: var(--f-serif); font-weight: 600; font-size: 26px; line-height: 1.15; color: var(--ivory-50); }
.hc-times small { display: block; font-size: 12.5px; line-height: 1.2; color: rgba(245, 228, 176, 0.78); }
.hc-times .end dd { color: var(--gold-300); }
.hc-info { list-style: none; display: grid; gap: 6px; margin-top: 4px; font-size: 14.5px; line-height: 1.3; color: rgba(245, 228, 176, 0.9); }
.hc-info li { display: flex; gap: 8px; align-items: flex-start; }
.hc-info i { flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--gold-400); }
.hc-info li.warning i { background: #e0687c; } .hc-info li.success i { background: #67b57c; }
.hc-wish { margin-top: auto; padding-top: 8px; font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-300); }
.hc-wish small { font-family: var(--f-text); font-size: 13px; font-weight: 400; color: rgba(245, 228, 176, 0.75); }

/* Points et pause */
.hm-ctl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; margin-top: -24px; }
.hm-ctl:empty { display: none; }
.hm-dots { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.hm-dot { position: relative; width: 28px; height: 44px; }
.hm-dot::before { content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: var(--ivory-300); border: 1px solid var(--hair-strong); transition: width 0.25s, margin 0.25s, background 0.25s; }
.hm-dot[aria-current="true"]::before { width: 24px; margin-left: -12px; background: var(--foil); border-color: var(--gold-600); }
.hm-pause { width: 44px; height: 44px; display: grid; place-items: center; color: var(--wine-600); border-radius: 50%; box-shadow: inset 0 0 0 7px var(--ivory-100), inset 0 0 0 8px var(--hair-strong); }
.hm-pause svg { width: 14px; height: 14px; }

/* Carte Parasha : entrée et sortie de Chabbat */
.hc-ptimes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(232, 201, 122, 0.35); text-align: center; }
.hc-ptimes > div + div { border-left: 1px solid rgba(232, 201, 122, 0.25); }
.hc-ptimes dt { font-family: var(--f-display); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-400); }
.hc-ptimes dd { font-family: var(--f-serif); font-weight: 600; font-size: 30px; line-height: 1.15; color: var(--ivory-50); }
.hc-ptimes .end dd { color: var(--gold-300); }
.hc-wine.hc-par { justify-content: flex-end; }

/* Téléphone et tablette : tout tient sur un écran (en-tête compact, carrousel qui prend la hauteur restante) */
@media (max-width: 1023.98px) {
  .hm { display: flex; flex-direction: column; min-height: calc(100dvh - var(--tabbar-h) - var(--safe-b) - 24px); }
  .hm-hero { flex: none; padding-top: calc(var(--safe-t) + 20px); padding-bottom: 20px; }
  .hm-next { margin-top: 20px; }
  .hm-time { font-size: clamp(56px, 17vw, 76px); }
  .hm-offs { margin-top: 12px; padding-top: 8px; }
  .hm-offs li { min-height: 44px; }
  .hm-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .hm-body .sec-title { margin: 8px 4px 8px; }
  .hm-feed { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .hm-track { flex: 1; min-height: 260px; padding-bottom: 28px; }
  .hc { flex-basis: calc(100% - 28px); min-height: 0; }
}
/* Téléphone : l'accueil a exactement la hauteur de l'écran ; le carrousel prend ce qui reste sous l'en-tête,
   plafonné à des vignettes presque carrées (largeur de carte = 100vw - 64px). */
@media (max-width: 767.98px) {
  .hm { height: calc(100dvh - var(--tabbar-h) - var(--safe-b) - 24px); min-height: 0; }
  .hm-track { flex: 1 1 auto; min-height: 300px; max-height: calc((100vw - 64px) * 0.96 + 32px); }
}

@media (prefers-reduced-motion: reduce) {
  .hm [data-in] { animation: none; }
  .hm-dot::before { transition: none; }
}

/* Tablette */
@media (min-width: 768px) {
  .hm { --hm-x: 40px; }
  .hm-body { padding: 24px 28px 0; }
  .hm-track { margin: 0 -28px; padding-inline: 28px; scroll-padding-inline: 28px; }
  .hc { flex-basis: min(420px, calc(100% - 28px)); }
}

/* Bureau : en-tête prochain office, puis cartes sans bord perdu */
@media (min-width: 1024px) {
  .hm { max-width: 1040px; margin: 0 auto; }
  .hm-hero { padding: 32px 40px; border-radius: var(--r-lg); box-shadow: var(--shadow-deep), 0 0 0 1px rgba(212, 168, 67, 0.3) inset; }
  .hm-hero::after { display: none; }
  .hm-top .medallion, .hm-brand-t { display: none; } /* le logo et le nom sont déjà dans la barre latérale ; on garde la ligne du Rav */
  .hm-time { font-size: 96px; }
  .hm-oname { font-size: 24px; }
  .hm-body { padding: 24px 0 0; }
  .hm-track { margin: 0; padding: 4px 4px 32px; scroll-padding-inline: 4px; }
  .hc { min-height: 320px; }
}