/* ============================================================
   TefilaTime — ecran.css
   Charte 2026 : écrans S1 (Zmanim) et S2 (Téfilot), en-tête commun,
   bandeau d'annonces, version mobile.
   Fidèle à la maquette Figma « TefilaTime — Nouvelle identité ».
   Toutes les tailles desktop sont exprimées en pixels de la maquette
   (1920 × 1080) multipliés par --p : l'écran reste identique à la
   maquette quelle que soit la résolution de la TV (16:9).
   ============================================================ */

/* ---------- Jetons de thème (miroir des variables Figma « Thème écran »)
   Deux thèmes : bleu-royal (défaut) et clair. */
[data-theme='clair'] {
  --e-fond: #fbf8f1;
  --e-halo: #ffe7a3;
  --e-surface: #ffffff;
  --e-bord: rgba(31, 48, 100, 0.12);
  --e-texte: #1f3064;
  --e-doux: rgba(31, 48, 100, 0.62);
  --e-accent: #8a6a0e;
  --e-accent-fond: #ffc32c;
  --e-sur-accent: #1f3064;
  --e-logo: #1f3064;
  --e-bandeau: #1f3064;
  --e-sur-bandeau: #ffffff;
}
:root,
[data-theme='bleu-royal'] {
  --e-fond: #1f3064;
  --e-halo: #3a54a8;
  --e-surface: rgba(255, 255, 255, 0.08);
  --e-bord: rgba(255, 195, 44, 0.3);
  --e-texte: #ffffff;
  --e-doux: rgba(255, 255, 255, 0.66);
  --e-accent: #ffc32c;
  --e-accent-fond: #ffc32c;
  --e-sur-accent: #1f3064;
  --e-logo: #ffffff;
  --e-bandeau: #111111;
  --e-sur-bandeau: #ffffff;
}

:root {
  /* 1 pixel de maquette */
  --p: calc(min(100vw, 177.7778vh) / 1920);
  --e-serif: 'PT Serif Caption', 'Frank Ruhl Libre', serif;
  --e-serif-gras: 'PT Serif', 'Frank Ruhl Libre', serif;
  --e-hebreu: 'Frank Ruhl Libre', 'PT Serif', serif;
  --e-sans: 'Poppins', 'Heebo', sans-serif;
  --e-hdr-h: calc(158 * var(--p));
}

.tt-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

/* ---------- Typographies communes */
.e-etiquette {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(18 * var(--p));
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--e-accent);
}
.e-hebreu {
  font-family: var(--e-hebreu);
}

/* ============================================================
   FOND
   ============================================================ */
body {
  background: var(--e-fond);
}
body .bg {
  background: var(--e-fond);
  overflow: hidden;
}
body .bg::before {
  display: none;
}
body .bg::after {
  inset: auto;
  left: calc(900 * var(--p));
  top: calc(380 * var(--p));
  width: calc(1400 * var(--p));
  height: calc(1000 * var(--p));
  border-radius: 50%;
  background: var(--e-halo);
  filter: blur(calc(160 * var(--p)));
  opacity: 0.9;
}

/* ============================================================
   EN-TÊTE COMMUN
   ============================================================ */
.e-hdr {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: calc(48 * var(--p)) calc(72 * var(--p)) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(32 * var(--p));
}
.e-hdr-gauche {
  display: flex;
  align-items: center;
  gap: calc(32 * var(--p));
  min-width: 0;
}
.e-logo {
  display: flex;
  align-items: center;
  gap: calc(15 * var(--p));
  color: var(--e-logo);
  flex-shrink: 0;
}
.e-logo-symbole {
  width: calc(66.5 * var(--p));
  height: calc(65 * var(--p));
}
.e-logo-texte {
  width: calc(209 * var(--p));
  height: calc(27 * var(--p));
}
.e-hdr-sep {
  width: 1px;
  height: calc(56 * var(--p));
  background: var(--e-bord);
  flex-shrink: 0;
}
.e-syna-logo:empty {
  display: none;
}
.e-syna-logo img {
  display: block;
  height: calc(64 * var(--p));
  max-width: calc(180 * var(--p));
  object-fit: contain;
}
.e-syna {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--p));
  min-width: 0;
}
.e-syna-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(36 * var(--p));
  line-height: 1.1;
  color: var(--e-texte);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-syna-adresse {
  font-family: var(--e-serif);
  font-size: calc(22 * var(--p));
  line-height: 1.2;
  color: var(--e-doux);
}
.e-syna-adresse:empty {
  display: none;
}
.e-hdr-droite {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(2 * var(--p));
  flex-shrink: 0;
}
.e-date-greg {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(22 * var(--p));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--e-texte);
}
.e-date-heb {
  font-family: var(--e-hebreu);
  font-size: calc(32 * var(--p));
  line-height: 1.2;
  color: var(--e-accent);
  direction: rtl;
}

/* Les affiches restent en plein écran : pas d'en-tête */
body[data-screen^='scp'] .e-hdr {
  display: none;
}

/* ============================================================
   ZONE DES ÉCRANS (desktop)
   ============================================================ */
@media (min-width: 769px) {
  body .screen {
    top: var(--e-hdr-h);
    bottom: var(--ticker-h, 0px);
  }
  body[data-screen^='scp'] .screen {
    top: 0;
  }
  /* Écrans historiques (S3, S4, S5, Club) : occupent la zone sous l'en-tête */
  body .screen > .s3,
  body .screen > .s4,
  body .screen > .s5 {
    height: 100% !important;
    max-height: 100%;
  }
}

/* ============================================================
   ÉCRAN 1 — ZMANIM
   ============================================================ */
.e-s1 {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(640 * var(--p));
  gap: calc(56 * var(--p));
  padding: 0 calc(72 * var(--p)) calc(48 * var(--p));
  box-sizing: border-box;
}
.e-s1-gauche {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: calc(32 * var(--p));
  min-width: 0;
  min-height: 0;
}
.e-s1-haut {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--p));
}

/* Horloge */
.e-horloge {
  display: flex;
  align-items: baseline;
  gap: calc(12 * var(--p));
  font-family: var(--e-serif);
  line-height: 1;
}
.e-horloge-hm {
  font-size: calc(250 * var(--p));
  color: var(--e-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.e-horloge-s {
  font-size: calc(84 * var(--p));
  color: var(--e-doux);
  font-variant-numeric: tabular-nums;
}

/* Repères Hanetz / Chkia / Tzeit */
.e-reperes {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8 * var(--p)) calc(36 * var(--p));
}
.e-repere {
  display: inline-flex;
  align-items: baseline;
  gap: calc(12 * var(--p));
}
.e-repere-l {
  font-family: var(--e-serif);
  font-size: calc(28 * var(--p));
  color: var(--e-doux);
}
.e-repere-v {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(30 * var(--p));
  color: var(--e-texte);
}

/* Infos du jour (fête, Omer, Rosh Hodesh, Mevarekhim) */
.e-infos-jour {
  display: flex;
  flex-wrap: wrap;
  gap: calc(12 * var(--p));
  margin-top: calc(12 * var(--p));
}
.e-infos-jour:not(:has(.e-info:not([style*='none']))) {
  display: none;
}
.e-info {
  display: inline-flex;
  flex-direction: column;
  padding: calc(10 * var(--p)) calc(22 * var(--p));
  border-radius: calc(12 * var(--p));
  background: var(--e-surface);
  border: 1px solid var(--e-bord);
  font-family: var(--e-serif);
  font-size: calc(26 * var(--p));
  line-height: 1.3;
  color: var(--e-texte);
}
.e-info[style*='flex'],
.e-info[style*='block'] {
  display: inline-flex !important;
}
.e-info .fete-ligne {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--p));
}
.e-info-ligne {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--p));
}
/* Icônes SVG (icones.js) : couleur d'accent dans les encarts */
.e-info .tt-ic,
.e-s5 .tt-ic,
.s5-section-label .tt-ic {
  color: var(--e-accent);
}
.e-info .fete-emoji:empty {
  display: none;
}

/* Prochaine téfila */
.e-prochaine {
  display: flex;
  align-items: center;
  gap: calc(32 * var(--p));
  padding: calc(24 * var(--p)) calc(36 * var(--p));
  border-radius: calc(16 * var(--p));
  background: var(--e-surface);
  border-left: calc(6 * var(--p)) solid var(--e-accent);
}
.e-prochaine-texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--p));
}
.e-prochaine-ligne {
  display: flex;
  align-items: baseline;
  gap: calc(24 * var(--p));
  min-width: 0;
}
.e-prochaine-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(60 * var(--p));
  line-height: 1.1;
  color: var(--e-texte);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-prochaine-delai {
  font-family: var(--e-serif);
  font-size: calc(30 * var(--p));
  color: var(--e-doux);
  white-space: nowrap;
}
.e-prochaine-heure {
  font-family: var(--e-serif);
  font-size: calc(96 * var(--p));
  line-height: 1;
  color: var(--e-accent);
}

/* Cartes Paracha / Chabbat / Don */
.e-cartes {
  display: flex;
  gap: calc(24 * var(--p));
  align-items: stretch;
}
.e-carte {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--p));
  /* marge droite réduite comme sur la maquette ; si le texte ne tient
     toujours pas (lien de don, chabbat double…), ajusterCartes() réduit
     la taille du texte au lieu de le couper */
  padding: calc(28 * var(--p)) calc(16 * var(--p)) calc(28 * var(--p))
    calc(32 * var(--p));
  border-radius: calc(16 * var(--p));
  background: var(--e-surface);
  border: 1px solid var(--e-bord);
  box-sizing: border-box;
}
.e-carte-valeur {
  --k: 1;
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(44 * var(--p) * var(--k));
  line-height: 1.15;
  color: var(--e-texte);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-carte-valeur.e-chabbat {
  display: grid;
  grid-template-columns: auto auto 1fr;
  column-gap: calc(12 * var(--p) * var(--k));
  row-gap: calc(6 * var(--p));
  align-items: baseline;
}
.e-chabbat .e-carte-detail {
  font-weight: 400;
}
.e-carte-valeur:empty::before {
  content: '—';
}
.e-carte-detail {
  font-family: var(--e-serif);
  font-size: calc(26 * var(--p));
  line-height: 1.2;
  color: var(--e-doux);
}
.e-carte-detail.e-hebreu {
  font-family: var(--e-hebreu);
  display: flex;
  flex-wrap: wrap;
  gap: calc(10 * var(--p));
  align-items: center;
}
.e-badge {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(14 * var(--p));
  letter-spacing: 0.08em;
  padding: calc(3 * var(--p)) calc(10 * var(--p));
  border-radius: 999px;
  background: var(--e-accent-fond);
  color: var(--e-sur-accent);
}
.e-don {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: calc(20 * var(--p));
  padding: calc(20 * var(--p));
  border-radius: calc(16 * var(--p));
  background: #ffffff;
}
.e-don-qr {
  width: calc(124 * var(--p));
  height: calc(124 * var(--p));
}
.e-don-qr img,
.e-don-qr canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.e-don-texte {
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--p));
}
.e-don-titre {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(30 * var(--p));
  line-height: 1.1;
  color: #1f3064;
}
.e-don-sous {
  font-family: var(--e-sans);
  font-size: calc(18 * var(--p));
  line-height: 1.4;
  color: #3a3f4b;
}
.e-don-bouton,
.e-zm-mobile {
  display: none !important;
}

/* Panneau Zmanim */
.e-zmanim {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: calc(24 * var(--p)) calc(32 * var(--p));
  border-radius: calc(24 * var(--p));
  background: var(--e-surface);
  border: 1px solid var(--e-bord);
  box-sizing: border-box;
}
.e-zmanim-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: calc(8 * var(--p));
}
.e-zmanim-titre-he {
  font-family: var(--e-hebreu);
  font-size: calc(30 * var(--p));
  color: var(--e-accent);
}
.e-zmanim-liste {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.e-zrow {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--p));
  padding: calc(8 * var(--p)) calc(4 * var(--p));
  border-bottom: 1px solid var(--e-bord);
}
.e-zrow.passe {
  opacity: 0.4;
}
.e-zrow-l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.e-zrow-p {
  font-family: var(--e-serif);
  font-size: calc(28 * var(--p));
  line-height: 1.2;
  color: var(--e-texte);
}
.e-zrow-p.e-hebreu {
  font-family: var(--e-hebreu);
  font-size: calc(30 * var(--p));
}
.e-zrow-s {
  font-family: var(--e-serif);
  font-size: calc(18 * var(--p));
  line-height: 1.2;
  color: var(--e-doux);
}
.e-zrow-s.e-hebreu {
  font-family: var(--e-hebreu);
  font-size: calc(20 * var(--p));
}
.e-zrow-t {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(38 * var(--p));
  line-height: 1.1;
  color: var(--e-accent);
  font-variant-numeric: tabular-nums;
}
/* Plus de 9 zmanim : lignes resserrées */
.e-zmanim-liste[data-densite='compact'] .e-zrow {
  padding: calc(5 * var(--p)) calc(4 * var(--p));
}
.e-zmanim-liste[data-densite='compact'] .e-zrow-p {
  font-size: calc(25 * var(--p));
}
.e-zmanim-liste[data-densite='compact'] .e-zrow-s {
  font-size: calc(16 * var(--p));
}
.e-zmanim-liste[data-densite='compact'] .e-zrow-t {
  font-size: calc(33 * var(--p));
}
.e-zmanim-liste[data-densite='serre'] .e-zrow {
  padding: calc(6 * var(--p)) calc(4 * var(--p));
}
.e-zmanim-liste[data-densite='serre'] .e-zrow-l {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(12 * var(--p));
}
.e-zmanim-liste[data-densite='serre'] .e-zrow-p {
  font-size: calc(25 * var(--p));
}
.e-zmanim-liste[data-densite='serre'] .e-zrow-s {
  font-size: calc(18 * var(--p));
}
.e-zmanim-liste[data-densite='serre'] .e-zrow-t {
  font-size: calc(31 * var(--p));
}

/* ============================================================
   ÉCRAN 2 — TÉFILOT
   ============================================================ */
.e-s2 {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(40 * var(--p));
  padding: 0 calc(72 * var(--p)) calc(48 * var(--p));
  box-sizing: border-box;
}
.e-titre-ecran {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--p));
}
.e-titre-ecran h1 {
  margin: 0;
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(60 * var(--p));
  line-height: 1.1;
  color: var(--e-texte);
  white-space: nowrap;
}
.e-filet {
  flex: 1;
  height: 2px;
  background: var(--e-bord);
}
.e-titre-sous {
  font-family: var(--e-serif);
  font-size: calc(28 * var(--p));
  color: var(--e-doux);
  white-space: nowrap;
}
.e-s2-colonnes {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(48 * var(--p));
}
.e-s2-colonnes {
  /* hauteur bornée : permet de détecter les lignes qui débordent */
  grid-template-rows: minmax(0, 1fr);
}
.e-s2-colonnes.e-s2-seule {
  grid-template-columns: minmax(0, calc(1100 * var(--p)));
  justify-content: center;
}
/* Colonne seule trop longue : elle prend toute la largeur, lignes sur 2 colonnes */
.e-s2-colonnes.e-s2-seule.e-s2-large {
  grid-template-columns: minmax(0, 1fr);
}
.e-trows.e-trows-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rangs, 4), auto);
  grid-auto-flow: column;
  align-content: start;
  column-gap: calc(48 * var(--p));
}
.e-s2-col {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--p));
  min-height: 0;
}
.e-s2-col[style*='none'] {
  display: none !important;
}
.e-s2-col-titre {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.e-s2-col-titre .e-etiquette {
  font-size: calc(20 * var(--p));
}
.e-s2-col-titre .e-hebreu {
  font-size: calc(28 * var(--p));
  color: var(--e-accent);
}
.e-trows {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--p) * var(--k, 1));
  min-height: 0;
}
.e-trow {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--p) * var(--k, 1));
  padding: calc(22 * var(--p) * var(--k, 1)) calc(32 * var(--p) * var(--k, 1));
  border-radius: calc(16 * var(--p) * var(--k, 1));
  background: var(--e-surface);
  border: 1px solid var(--e-bord);
}
.e-trow-l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--p) * var(--k, 1));
}
.e-trow-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(44 * var(--p) * var(--k, 1));
  line-height: 1.1;
  color: var(--e-texte);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-trow-detail {
  font-family: var(--e-serif);
  font-size: calc(24 * var(--p) * var(--k, 1));
  line-height: 1.2;
  color: var(--e-doux);
}
.e-trow-detail {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: calc(14 * var(--p) * var(--k, 1));
}
/* Jours de la téfila : mis en évidence (or, capitales espacées) */
.e-trow-jours {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: 0.85em;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--e-accent);
}
.e-trow.next-up .e-trow-jours,
.e-trow.current .e-trow-jours {
  color: var(--e-sur-accent);
}
.e-trow-heure {
  font-family: var(--e-serif);
  font-size: calc(64 * var(--p) * var(--k, 1));
  line-height: 1;
  color: var(--e-accent);
  font-variant-numeric: tabular-nums;
}
.e-trow.next-up,
.e-trow.current {
  background: var(--e-accent-fond);
  border-color: transparent;
}
.e-trow.next-up .e-trow-nom,
.e-trow.next-up .e-trow-detail,
.e-trow.next-up .e-trow-heure,
.e-trow.current .e-trow-nom,
.e-trow.current .e-trow-detail,
.e-trow.current .e-trow-heure {
  color: var(--e-sur-accent);
}
.e-trows[data-densite='compact'] .e-trow {
  padding: calc(13 * var(--p) * var(--k, 1)) calc(28 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='compact'] .e-trow-nom {
  font-size: calc(36 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='compact'] .e-trow-detail {
  font-size: calc(20 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='compact'] .e-trow-heure {
  font-size: calc(52 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='serre'] {
  gap: calc(10 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='serre'] .e-trow {
  padding: calc(8 * var(--p) * var(--k, 1)) calc(24 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='serre'] .e-trow-nom {
  font-size: calc(30 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='serre'] .e-trow-detail {
  font-size: calc(18 * var(--p) * var(--k, 1));
}
.e-trows[data-densite='serre'] .e-trow-heure {
  font-size: calc(42 * var(--p) * var(--k, 1));
}
.e-vide {
  padding: calc(24 * var(--p));
  font-family: var(--e-serif);
  font-size: calc(24 * var(--p));
  color: var(--e-doux);
  text-align: center;
}

/* ============================================================
   ÉCRANS HISTORIQUES (S3 Chiourim, S4 Hazkarot, S5 Fêtes, Club)
   Titres et tableau des cours alignés sur la charte
   ============================================================ */
@media (min-width: 769px) {
  body .screen .screen-title {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-variant-caps: normal;
    font-size: calc(60 * var(--p)) !important;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    color: var(--e-texte);
    text-shadow: none;
  }
  body .screen .screen-title em {
    font-style: normal;
    color: var(--e-texte) !important;
  }
  body #sc3 .s3,
  body #sc3b .s3 {
    padding: 0 calc(72 * var(--p)) calc(48 * var(--p));
    gap: calc(24 * var(--p));
  }
  body .s3-header {
    align-items: center;
    gap: calc(24 * var(--p));
  }
  body .s3-header::after {
    content: '';
    order: 1;
    flex: 1;
    height: 2px;
    background: var(--e-bord);
  }
  body .s3-header .screen-title {
    order: 0;
  }
  body .s3-week {
    order: 2;
    font-family: var(--e-serif);
    font-size: calc(28 * var(--p));
    letter-spacing: 0;
    color: var(--e-doux);
  }
  body .ct {
    font-family: var(--e-serif);
    color: var(--e-texte);
    text-shadow: none;
    border-spacing: 0 calc(12 * var(--p));
  }
  body .ct th {
    font-family: var(--e-sans);
    font-weight: 600;
    font-size: 0.6em;
    letter-spacing: 0.14em;
    color: var(--e-accent);
    border-bottom: 0;
    padding: 0 calc(24 * var(--p));
  }
  body .ct td {
    background: var(--e-surface);
    border-top: 1px solid var(--e-bord);
    border-bottom: 1px solid var(--e-bord);
    padding: calc(14 * var(--p)) calc(24 * var(--p));
    color: var(--e-texte);
  }
  body .ct .ct-day {
    font-family: var(--e-sans);
    font-weight: 600;
    font-size: 0.7em;
    letter-spacing: 0.1em;
    text-align: left;
    color: var(--e-doux);
    border-left: 1px solid var(--e-bord);
    border-radius: calc(16 * var(--p)) 0 0 calc(16 * var(--p));
  }
  body .ct .ct-day.today {
    color: var(--e-accent);
    background: var(--e-surface);
  }
  body .ct .ct-time {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    color: var(--e-accent);
    border-left: 0;
  }
  body .ct .ct-rav {
    color: var(--e-doux);
  }
  body .ct .ct-name {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    border-right: 1px solid var(--e-bord);
    border-radius: 0 calc(16 * var(--p)) calc(16 * var(--p)) 0;
  }
  body .ct .ct-salle {
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--e-sans);
    font-weight: 400;
    font-size: 0.62em;
    color: var(--e-doux);
  }
  body .ct .ct-salle svg {
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  body .ct .ct-row.next td,
  body .ct .ct-row.now td,
  body .ct .ct-row.next td:not(.ct-day),
  body .ct .ct-row.now td:not(.ct-day) {
    background: var(--e-accent-fond);
    border-color: transparent;
    color: var(--e-sur-accent);
    opacity: 1;
  }
  body .ct .ct-row.next .ct-name,
  body .ct .ct-row.now .ct-name,
  body .ct .ct-row.next .ct-salle,
  body .ct .ct-row.now .ct-salle,
  body .ct .ct-row.next .ct-rav,
  body .ct .ct-row.now .ct-rav,
  body .ct .ct-row.next .ct-time,
  body .ct .ct-row.now .ct-time,
  body .ct .ct-row.next .ct-day,
  body .ct .ct-row.now .ct-day {
    color: var(--e-sur-accent);
  }
}

/* ============================================================
   BANDEAU D'ANNONCES
   ============================================================ */
body .ticker-bar.e-bandeau {
  height: auto;
  padding: calc(18 * var(--p)) calc(72 * var(--p));
  gap: calc(28 * var(--p));
  background: var(--e-bandeau);
  border-top: 0;
  backdrop-filter: none;
}
body .e-bandeau .ticker-label {
  height: auto;
  padding: calc(6 * var(--p)) calc(14 * var(--p));
  border: 0;
  border-radius: calc(6 * var(--p));
  background: var(--e-accent-fond);
  color: var(--e-sur-accent);
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(16 * var(--p));
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body .e-bandeau .ticker-content {
  font-family: var(--e-serif);
  font-variant-caps: normal;
  font-size: calc(26 * var(--p));
  line-height: 1.4;
  color: var(--e-sur-bandeau);
}
body .e-bandeau .ticker-content .ticker-sep {
  margin: 0 calc(20 * var(--p));
  font-size: inherit;
  color: var(--e-accent-fond);
}
body .e-bandeau .ticker-content .ticker-auto {
  padding: 0 calc(14 * var(--p));
  background: rgba(255, 195, 44, 0.16);
  color: var(--e-accent-fond);
  font-weight: 400;
  letter-spacing: 0;
}
.e-signature {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--p));
  flex-shrink: 0;
  color: #ffffff;
  font-family: var(--e-sans);
  font-size: calc(16 * var(--p));
}
.e-signature svg {
  width: calc(36 * var(--p));
  height: calc(35 * var(--p));
}

/* Rotation : barre de progression et pastilles discrètes */
body .progress-bar {
  height: calc(3 * var(--p));
  background: transparent;
}
body .progress-fill {
  background: var(--e-accent-fond);
  opacity: 0.8;
}
body .page-dots {
  bottom: calc(var(--ticker-h, 0px) + 14 * var(--p));
  gap: calc(8 * var(--p));
}
body .pdot {
  width: calc(8 * var(--p));
  height: calc(8 * var(--p));
  background: var(--e-doux);
  opacity: 0.5;
}
body .pdot.on {
  width: calc(28 * var(--p));
  background: var(--e-accent-fond);
  box-shadow: none;
  opacity: 1;
}
body .nav-arrow-dot {
  display: none;
}

/* Mini-horloge des autres écrans : pastille dans le flux de l'en-tête,
   entre la synagogue et les dates (plus de position fixe au centre qui
   chevauchait les noms / logos longs) */
body #mini-clock {
  position: static;
  flex: none;
  margin-left: auto;
  transform: none;
  padding: calc(6 * var(--p)) calc(24 * var(--p));
  border-radius: 999px;
  background: var(--e-surface);
  border: 1px solid var(--e-bord);
  color: var(--e-accent);
  font-family: var(--e-serif);
  font-size: calc(40 * var(--p));
  line-height: 1.1;
  box-shadow: none;
  text-shadow: none;
}

/* Maquette : bandeau statique quand il tient, ni pastilles ni barre de
   progression. L'heure (option de la synagogue) reste en pastille au
   centre de l'en-tête sur tous les écrans sauf S1. */
body .e-bandeau .ticker-content.statique {
  animation: none;
  padding-left: 0;
}
body .e-bandeau .ticker-track {
  display: flex;
  justify-content: flex-start;
  margin: 0 calc(24 * var(--p));
}
@media (min-width: 769px) {
  body .progress-bar,
  body .page-dots {
    display: none !important;
  }
  body.has-mini-clock .s3-week {
    margin-right: 0;
  }
}

/* Titre de l'écran Chiourim : TV « Cours & Chiourim », mobile « Chiourim de la semaine » */
.s3-titre-mobile {
  display: none;
}
@media (max-width: 768px) {
  body #sc3 .s3-titre-tv,
  body #sc3 .s3-week {
    display: none !important;
  }
  body #sc3 .s3-titre-mobile {
    display: inline;
  }
}

/* La promo TefilaTime devient la signature du bandeau */
body .qr-promo {
  display: none !important;
}

/* ============================================================
   MOBILE (≤ 768 px) — maquette « Mobile · Zmanim / Téfilot / Chiourim »
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --m-hdr-h: 92px;
    --m-tabs-h: 64px;
  }
  .e-etiquette {
    font-size: 11px;
  }
  body .bg::after {
    left: 15vw;
    top: 50vh;
    width: 520px;
    height: 520px;
    filter: blur(80px);
  }

  /* En-tête : symbole + synagogue + dates */
  .e-hdr {
    position: fixed;
    height: var(--m-hdr-h);
    padding: 16px 20px 12px;
    box-sizing: border-box;
    background: var(--e-fond);
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
  }
  .e-hdr-gauche {
    display: contents;
  }
  .e-logo {
    grid-row: 1 / span 2;
  }
  .e-logo-symbole {
    width: 41px;
    height: 40px;
  }
  .e-logo-texte,
  .e-hdr-sep,
  .e-syna-logo,
  .e-syna-adresse {
    display: none !important;
  }
  .e-syna-nom {
    font-size: 20px;
  }
  .e-hdr-droite {
    grid-column: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .e-date-greg {
    font-family: var(--e-sans);
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--e-doux);
  }
  .e-date-heb {
    font-size: 13px;
  }

  body .screen {
    top: var(--m-hdr-h) !important;
    bottom: var(--m-tabs-h) !important;
    height: auto !important;
    overflow-y: auto;
  }

  /* --- Zmanim */
  .e-s1 {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    padding: 4px 20px 24px;
  }
  .e-s1-gauche {
    gap: 16px;
    justify-content: flex-start;
  }
  .e-zmanim,
  .e-reperes,
  .e-don {
    display: none !important;
  }
  .e-horloge {
    gap: 6px;
  }
  .e-horloge-hm {
    font-size: 96px;
  }
  .e-horloge-s {
    font-size: 30px;
  }
  .e-infos-jour {
    margin-top: 4px;
    gap: 8px;
  }
  .e-info {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 10px;
  }
  .e-prochaine {
    order: 1;
    padding: 16px;
    gap: 12px;
    border-radius: 16px;
    border-left: 0;
    background: var(--e-accent-fond);
  }
  .e-prochaine .e-etiquette,
  .e-prochaine-nom,
  .e-prochaine-delai,
  .e-prochaine-heure {
    color: var(--e-sur-accent);
  }
  .e-prochaine-ligne {
    gap: 6px;
  }
  .e-prochaine-nom,
  .e-prochaine-delai {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-size: 19px;
  }
  .e-prochaine-delai::before {
    content: '· ';
  }
  .e-prochaine-heure {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-size: 30px;
  }
  .e-s1-haut {
    order: 0;
  }
  .e-zm-mobile {
    order: 2;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
  .e-zm-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .e-ztuile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--e-surface);
    border: 1px solid var(--e-bord);
  }
  .e-ztuile.passe {
    opacity: 0.45;
  }
  .e-ztuile-l {
    font-family: var(--e-sans);
    font-size: 13px;
    line-height: 1.4;
    color: var(--e-doux);
  }
  .e-ztuile-t {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: var(--e-accent);
  }
  .e-cartes {
    order: 3;
    gap: 10px;
  }
  .e-carte {
    padding: 14px;
    border-radius: 12px;
    gap: 2px;
  }
  .e-carte-valeur {
    font-size: 18px;
  }
  .e-carte-detail {
    font-size: 13px;
  }
  .e-badge {
    font-size: 10px;
  }
  .e-don-bouton {
    order: 4;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--e-accent);
    color: var(--e-accent);
    font-family: var(--e-sans);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
  }
  .e-don-bouton[style*='none'] {
    display: none !important;
  }
  .e-don-bouton svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* --- Téfilot */
  .e-s2 {
    height: auto;
    gap: 16px;
    padding: 4px 20px 24px;
  }
  .e-titre-ecran h1 {
    font-size: 24px;
  }
  .e-filet,
  .e-titre-sous,
  .e-s2-col-titre .e-hebreu {
    display: none;
  }
  .e-s2-colonnes,
  .e-s2-colonnes.e-s2-seule {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .e-s2-col {
    gap: 0;
    border-radius: 16px;
    background: var(--e-surface);
    border: 1px solid var(--e-bord);
    overflow: hidden;
  }
  .e-s2-col-titre {
    padding: 12px 16px;
  }
  .e-s2-col-titre .e-etiquette {
    font-size: 11px;
  }
  .e-trows,
  .e-trows[data-densite] {
    gap: 0;
  }
  .e-trow,
  .e-trows[data-densite] .e-trow {
    padding: 12px 16px;
    gap: 12px;
    border-radius: 0;
    background: transparent;
    border: 0;
    border-top: 1px solid var(--e-bord);
  }
  .e-trow-nom,
  .e-trows[data-densite] .e-trow-nom {
    font-size: 17px;
  }
  .e-trow-detail,
  .e-trows[data-densite] .e-trow-detail {
    font-family: var(--e-sans);
    font-size: 12px;
  }
  .e-trow-heure,
  .e-trows[data-densite] .e-trow-heure {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-size: 22px;
  }
  .e-trows .e-trow.next-up,
  .e-trows .e-trow.current {
    background: var(--e-accent-fond);
  }

  /* --- Chiourim (écran historique S3, version mobile) */
  body #sc3 .s3 {
    padding: 4px 20px 24px !important;
    gap: 16px !important;
    height: auto !important;
  }
  body #sc3 .s3-header {
    display: block !important;
    padding: 0 !important;
  }
  body #sc3 .screen-title {
    font-family: var(--e-serif-gras) !important;
    font-weight: 700;
    font-variant-caps: normal;
    font-size: 24px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-align: left !important;
    color: var(--e-texte) !important;
    text-shadow: none !important;
  }
  body #sc3 .screen-title em {
    font-style: normal;
    color: var(--e-texte) !important;
  }
  body #sc3 .s3-week {
    font-family: var(--e-sans) !important;
    font-size: 12px !important;
    color: var(--e-doux) !important;
    text-align: left !important;
    margin-top: 2px;
  }
  body .mob-day-tabs {
    gap: 6px !important;
    padding: 0 !important;
  }
  body .mob-day-tab {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 8px 0 !important;
    border-radius: 10px !important;
    background: var(--e-surface) !important;
    border: 1px solid var(--e-bord) !important;
    color: var(--e-texte) !important;
    box-shadow: none !important;
  }
  body .mob-day-abbr {
    display: block;
    font-family: var(--e-sans);
    font-weight: 400;
    font-size: 12px;
    text-transform: lowercase;
    color: var(--e-doux);
  }
  body .mob-day-abbr::first-letter {
    text-transform: uppercase;
  }
  body .mob-day-num {
    font-family: var(--e-serif-gras);
    font-weight: 700;
    font-size: 17px;
  }
  body .mob-day-tab.active {
    background: var(--e-accent-fond) !important;
    border-color: transparent !important;
  }
  body .mob-day-tab.active .mob-day-abbr,
  body .mob-day-tab.active .mob-day-num {
    color: var(--e-sur-accent);
  }
  body .mob-day-content {
    display: flex !important;
    flex-direction: column;
    gap: 12px !important;
  }
  body .mob-cal-card {
    display: grid !important;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    row-gap: 4px;
    align-items: baseline;
    padding: 16px !important;
    border-radius: 16px !important;
    background: var(--e-surface) !important;
    border: 1px solid var(--e-bord) !important;
    box-shadow: none !important;
  }
  body .mob-cal-card.next,
  body .mob-cal-card.now {
    border-color: var(--e-accent) !important;
  }
  body .mob-cal-info {
    display: contents !important;
  }
  body .mob-cal-time {
    font-family: var(--e-serif-gras) !important;
    font-weight: 700;
    font-size: 18px !important;
    color: var(--e-accent) !important;
  }
  body .mob-cal-name {
    font-family: var(--e-serif-gras) !important;
    font-weight: 700;
    font-variant-caps: normal !important;
    font-size: 17px !important;
    color: var(--e-texte) !important;
  }
  body .mob-cal-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--e-sans);
    font-size: 12px;
    color: var(--e-doux);
  }
  body .mob-cal-meta .mob-cal-rav,
  body .mob-cal-meta .mob-cal-salle {
    font-variant-caps: normal !important;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  body .mob-cal-salle svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }
  body .mob-cal-empty {
    font-family: var(--e-sans) !important;
    color: var(--e-doux) !important;
  }

  /* --- Barre d'onglets */
  body .mobile-tabs.e-onglets {
    height: var(--m-tabs-h);
    padding: 0 20px env(safe-area-inset-bottom);
    background: var(--e-bandeau);
    border-top: 1px solid var(--e-bord);
    backdrop-filter: none;
    justify-content: space-between;
  }
  body .e-onglets .mobile-tab {
    gap: 4px;
    color: var(--e-doux);
    font-family: var(--e-sans);
    font-size: 12px;
    letter-spacing: 0;
  }
  [data-theme='clair'] body .e-onglets .mobile-tab,
  [data-theme='clair'] .e-onglets .mobile-tab {
    color: rgba(255, 255, 255, 0.7);
  }
  body .e-onglets .mobile-tab.active {
    color: var(--e-accent-fond);
  }
  body .e-onglets .mobile-tab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  body #mini-clock {
    display: none !important;
  }
}

/* ============================================================
   ÉCRAN 4 — HAZKAROT « Mémorial » (maquette Figma, page 05)
   Sobre et centré : bougie et blocs au centre, noms gravés sur
   les côtés, aucun cadre ni aplat.
   ============================================================ */
.e-s4 {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(40 * var(--p));
  padding: 0 calc(72 * var(--p)) calc(48 * var(--p));
  box-sizing: border-box;
  color: var(--e-texte);
}
.e-s4-titre {
  display: flex;
  align-items: center;
  gap: calc(32 * var(--p));
}
.e-s4-filet {
  flex: 1;
  height: 1px;
  background: var(--e-accent);
  opacity: 0.6;
}
.e-s4-titre h1 {
  margin: 0;
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(56 * var(--p));
  line-height: 1.32;
  color: var(--e-texte);
  white-space: nowrap;
}
.e-s4-titre h1 .e-hebreu {
  margin-left: calc(20 * var(--p));
  font-weight: 400;
  font-size: calc(48 * var(--p));
  color: var(--e-accent);
}
.e-s4-corps {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(700 * var(--p)) minmax(0, 1fr);
}
.e-s4-cote {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: calc(16 * var(--p));
  overflow: hidden;
}
.e-s4-grave {
  max-width: 100%;
  text-align: center;
  line-height: 1.3;
}
.e-s4-grave-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(28 * var(--p));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-s4-grave-detail {
  display: flex;
  justify-content: center;
  gap: calc(10 * var(--p));
  margin-top: calc(4 * var(--p));
  font-family: var(--e-serif);
  font-size: calc(22 * var(--p));
  color: var(--e-doux);
  white-space: nowrap;
}
.e-s4-or {
  color: var(--e-accent);
}
.e-s4-centre {
  --k: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: calc(18 * var(--p) * var(--k));
  /* la maquette laisse les noms longs déborder la marge de 48 px */
  padding: 0 calc(28 * var(--p));
  text-align: center;
  line-height: 1.3;
}
/* Filets verticaux or, à 45 % */
.e-s4-centre::before,
.e-s4-centre::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--e-accent);
  opacity: 0.45;
}
.e-s4-centre::before {
  left: 0;
}
.e-s4-centre::after {
  right: 0;
}
.e-s4-bougie {
  flex: none;
  width: calc(36 * var(--p) * var(--k));
  height: calc(98 * var(--p) * var(--k));
  color: var(--e-accent);
  filter: drop-shadow(0 0 calc(20 * var(--p)) rgba(255, 195, 44, 0.45));
}
.e-s4-leilouy {
  font-size: calc(32 * var(--p) * var(--k));
  color: var(--e-accent);
}
.e-s4-blocs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(18 * var(--p) * var(--k));
  max-width: 100%;
}
.e-s4-bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--p) * var(--k));
  max-width: 100%;
}
.e-s4-bloc-titre {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(17 * var(--p) * var(--k));
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--e-doux);
}
.e-s4-defunt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--p));
  max-width: 100%;
}
.e-s4-defunt-nom {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--p));
  max-width: 100%;
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(28 * var(--p) * var(--k));
  color: var(--e-texte);
}
.e-s4-defunt-nom > span:first-child {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.e-s4-defunt.grand .e-s4-defunt-nom {
  font-size: calc(36 * var(--p) * var(--k));
}
.e-s4-defunt-date {
  font-family: var(--e-serif);
  font-size: calc(20 * var(--p) * var(--k));
  color: var(--e-accent);
}
.e-s4-defunt.grand .e-s4-defunt-date {
  font-size: calc(22 * var(--p) * var(--k));
}
.e-s4-auj {
  flex: none;
  padding: calc(5 * var(--p)) calc(12 * var(--p));
  border-radius: 999px;
  background: var(--e-accent-fond);
  color: var(--e-sur-accent);
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(14 * var(--p));
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Aucun bloc : prochaine hazkara */
.e-s4-centre.vide {
  gap: calc(22 * var(--p));
}
.e-s4-centre.vide .e-s4-blocs {
  gap: calc(22 * var(--p));
}
.e-s4-centre.vide .e-s4-bougie {
  width: calc(44 * var(--p));
  height: calc(120 * var(--p));
}
.e-s4-centre.vide .e-s4-leilouy {
  font-size: calc(40 * var(--p));
}
.e-s4-vide {
  font-family: var(--e-serif);
  font-size: calc(26 * var(--p));
  color: var(--e-doux);
}
.e-s4-ornement {
  font-family: var(--e-sans);
  font-size: calc(16 * var(--p));
  color: var(--e-accent);
  opacity: 0.7;
}
.e-s4-prochaine-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(40 * var(--p));
  color: var(--e-texte);
}
.e-s4-prochaine-date {
  font-family: var(--e-serif);
  font-size: calc(24 * var(--p));
  color: var(--e-accent);
}
.e-s4-prochaine-delai {
  font-family: var(--e-serif);
  font-size: calc(22 * var(--p));
  color: var(--e-doux);
}

/* ============================================================
   ÉCRAN CLUB — « Bloc or » (maquette Figma, page 05)
   Chaleureux et arrondi : bloc or plein à gauche, noms complets
   en pastilles. Mode .defile : seule la zone des noms défile, le
   membre de la semaine reste figé en haut.
   ============================================================ */
.e-s6 {
  height: 100%;
  padding: 0 calc(72 * var(--p)) calc(48 * var(--p));
  box-sizing: border-box;
  color: var(--e-texte);
}
.e-s6-corps {
  height: 100%;
  display: flex;
  gap: calc(56 * var(--p));
}
.e-s6-bloc {
  flex: none;
  width: calc(600 * var(--p));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--p));
  padding: calc(44 * var(--p)) calc(48 * var(--p)) calc(36 * var(--p));
  border-radius: calc(32 * var(--p));
  background: var(--e-accent-fond);
  color: var(--e-sur-accent);
}
.e-s6-bloc-l {
  font-family: var(--e-sans);
  font-weight: 600;
  font-size: calc(20 * var(--p));
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.e-s6-montant {
  font-family: var(--e-serif);
  font-size: calc(200 * var(--p));
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.e-s6-phrase {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(34 * var(--p));
  line-height: 1.25;
}
.e-s6-espace {
  flex: 1;
}
.e-s6-contact {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--p));
  padding: calc(22 * var(--p)) calc(24 * var(--p));
  border-radius: calc(20 * var(--p));
  background: var(--e-sur-accent);
  color: var(--e-accent-fond);
}
.e-s6-tel {
  flex: none;
  width: calc(52 * var(--p));
  height: calc(52 * var(--p));
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.e-s6-contact-l {
  font-family: var(--e-serif);
  font-size: calc(22 * var(--p));
  line-height: 1.3;
  opacity: 0.85;
}
.e-s6-contact-n {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(42 * var(--p));
  line-height: 1.32;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.e-s6-membres {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--p));
}
.e-s6-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16 * var(--p));
}
.e-s6-entete h1 {
  margin: 0;
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(48 * var(--p));
  line-height: 1.32;
  color: var(--e-texte);
  white-space: nowrap;
}
.e-s6-entete .e-hebreu {
  font-size: calc(34 * var(--p));
  color: var(--e-accent);
}
.e-s6-zone {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
.e-s6-nuage {
  display: flex;
  flex-wrap: wrap;
  gap: calc(16 * var(--p));
  will-change: transform;
}
.e-s6-pastille {
  display: inline-flex;
  align-items: baseline;
  gap: calc(10 * var(--p));
  padding: calc(14 * var(--p)) calc(28 * var(--p));
  border-radius: 999px;
  background: var(--e-surface);
  border: calc(1.5 * var(--p)) solid var(--e-bord);
  line-height: 1.3;
  white-space: nowrap;
}
.e-s6-prenom {
  font-family: var(--e-serif);
  font-size: calc(26 * var(--p));
  color: var(--e-doux);
}
.e-s6-nom {
  font-family: var(--e-serif-gras);
  font-weight: 700;
  font-size: calc(30 * var(--p));
  color: var(--e-texte);
}
.e-s6-etoile {
  font-family: var(--e-sans);
  font-size: calc(22 * var(--p));
}
.e-s6-pastille.vedette {
  background: var(--e-accent-fond);
  border-color: var(--e-accent-fond);
}
.e-s6-pastille.vedette .e-s6-etoile,
.e-s6-pastille.vedette .e-s6-prenom,
.e-s6-pastille.vedette .e-s6-nom {
  color: var(--e-sur-accent);
}
.e-s6-legende {
  display: flex;
  align-items: baseline;
  gap: calc(10 * var(--p));
  font-family: var(--e-serif);
  font-size: calc(24 * var(--p));
  line-height: 1.3;
  color: var(--e-doux);
}
.e-s6-legende .e-s6-etoile {
  font-size: calc(20 * var(--p));
  color: var(--e-accent);
}
.e-s6-epingle {
  display: none;
  align-items: center;
  gap: calc(16 * var(--p));
}
.e-s6-mention {
  font-family: var(--e-serif);
  font-size: calc(24 * var(--p));
  line-height: 1.3;
  color: var(--e-doux);
}
/* Défilement : vedette figée en haut, zone des noms sur toute la hauteur */
.e-s6.defile .e-s6-epingle {
  display: flex;
}
.e-s6.defile .e-s6-ved-nuage,
.e-s6.defile .e-s6-legende {
  display: none;
}
.e-s6.defile .e-s6-zone {
  flex: 1 1 auto;
}
/* Ni hazkara ni prochaine dans les 10 jours : bougie seule au centre,
   noms répartis sur 4 colonnes (2 de chaque côté) */
.e-s4.disperse .e-s4-corps {
  grid-template-columns: minmax(0, 1fr) calc(300 * var(--p)) minmax(0, 1fr);
}
.e-s4.disperse .e-s4-centre::before,
.e-s4.disperse .e-s4-centre::after,
.e-s4.disperse .e-s4-blocs {
  display: none;
}
.e-s4.disperse .e-s4-cote {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(var(--rangs, 4), auto);
  grid-auto-flow: column;
  align-content: center;
  justify-items: center;
  column-gap: calc(32 * var(--p));
  row-gap: calc(40 * var(--p));
}

/* ============================================================
   S1 — PENDANT CHABBAT (allumage du vendredi → havdala)
   Pas de QR de don ; cartes Paracha et Chabbat mises en avant.
   ============================================================ */
body.chabbat-en-cours .e-don,
body.chabbat-en-cours .e-don-bouton {
  display: none !important;
}
@media (min-width: 769px) {
  body.chabbat-en-cours .e-carte {
    padding: calc(28 * var(--p)) calc(32 * var(--p));
    border: calc(2 * var(--p)) solid var(--e-accent);
  }
  body.chabbat-en-cours .e-carte-valeur {
    font-size: calc(56 * var(--p) * var(--k));
  }
}
/* Carte Chabbat : aplat or */
body.chabbat-en-cours .e-carte-chabbat {
  background: var(--e-accent-fond);
  border-color: var(--e-accent-fond);
}
body.chabbat-en-cours .e-carte-chabbat .e-etiquette,
body.chabbat-en-cours .e-carte-chabbat .e-carte-valeur,
body.chabbat-en-cours .e-carte-chabbat .e-carte-detail {
  color: var(--e-sur-accent);
}
