/* ============================================================
   KAPPAROT.COM v2 — Feuille de style (mobile-first, RTL ready)
   Identité conservée : charbon #252122, accent #d52349
   ============================================================ */
:root {
  --dark: #252122;
  --accent: #d52349;
  --accent-dark: #b01c3c;
  --blue: #039ee1;
  --bg: #f7f7f7;
  --text: #333;
  --muted: #777;
  --border: #ddd;
  --ok: #1d9e56;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --font: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--bg); font-size: 17px; line-height: 1.55;
  /* Pied de page toujours en bas de l'écran, même sur les pages courtes */
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; width: 100%; }
.site-footer { margin-top: auto; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--dark); line-height: 1.25; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Bannière de langue ---------- */
#langbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  background: var(--dark); color: #fff; padding: 10px 14px; font-size: 15px; text-align: center;
}
#langbar[hidden] { display: none; } /* la bannière n'apparaît que si une autre langue est suggérée */
#langbar a { color: #ffd166; font-weight: 700; }
#langbar button {
  background: none; border: 1px solid #666; color: #bbb; border-radius: 20px;
  padding: 3px 12px; cursor: pointer; font-size: 13px;
}

/* ---------- En-tête (avec la prière des kapparot en fond, comme l'ancien site) ---------- */
.site-header {
  background: linear-gradient(rgba(255,255,255,.86), rgba(255,255,255,.86)),
              url('../images/kapparot.jpg') center/cover #fff;
  box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }
.logo img { display: block; max-height: 40px; width: auto; }
.nav-toggle {
  display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--dark);
}
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav > a { color: var(--dark); font-weight: 600; font-size: 15.5px; }
.main-nav > a:hover { color: var(--accent); text-decoration: none; }

.lang-menu { position: relative; }
.lang-btn {
  background: var(--bg); border: 1px solid var(--border); border-radius: 20px;
  padding: 5px 14px; font-weight: 700; cursor: pointer; font-size: 14px; color: var(--dark);
}
.lang-list {
  display: none; position: absolute; top: 110%; inset-inline-end: 0; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 160px; padding: 6px; z-index: 60;
}
.lang-list.open { display: block; }
.lang-list a { display: block; padding: 8px 12px; color: var(--dark); border-radius: 6px; font-size: 15px; }
.lang-list a:hover { background: var(--bg); text-decoration: none; }
.lang-list a.active { color: var(--accent); font-weight: 700; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 12px 4px; border-bottom: 1px solid #eee; }
  .lang-menu { padding-top: 10px; }
}

/* ---------- Héros / accueil (prière des kapparot en fond) ---------- */
.hero {
  background: linear-gradient(rgba(255,255,255,.55), rgba(247,247,247,.96)),
              url('../images/kapparot.jpg') center/cover #fff;
  text-align: center; padding: 52px 16px 70px;
}
/* Mobile : l'image (bande large et peu haute) est répétée verticalement
   pour que le texte de la prière reste visible jusqu'en bas, comme sur desktop */
@media (max-width: 820px) {
  .hero {
    background: linear-gradient(rgba(255,255,255,.5), rgba(247,247,247,.94)),
                url('../images/kapparot.jpg') top center/860px auto repeat #fff;
  }
}
.hero h1 { color: var(--dark); font-size: clamp(22px, 4.5vw, 34px); margin: 0 0 12px; }
.hero p { max-width: 760px; margin: 0 auto; color: #4a4a4a; font-size: 17.5px; }

.choices { display: grid; gap: 22px; grid-template-columns: 1fr; margin: -40px auto 30px; max-width: 980px; padding: 0 16px; }
@media (min-width: 760px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.choice:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.13); }
.choice-photo { width: 100%; height: 175px; object-fit: cover; display: block; }
.choice-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.choice h2 { margin: 0 0 10px; font-size: 21px; color: var(--accent-dark); }
.choice p { flex: 1; margin: 0 0 18px; font-size: 16px; }
.choice.disabled { opacity: .55; }
.choice.disabled:hover { transform: none; }
.choice .closed-note { color: var(--accent-dark); font-weight: 700; font-size: 15px; margin-bottom: 12px; }

.btn {
  display: inline-block; text-align: center; background: var(--accent); color: #fff !important;
  font-weight: 700; font-size: 17px; padding: 13px 26px; border-radius: 30px;
  border: none; cursor: pointer; transition: background .15s, transform .12s, box-shadow .15s;
  text-decoration: none !important; -webkit-appearance: none;
  box-shadow: 0 3px 10px rgba(213,35,73,.25);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn.secondary { box-shadow: 0 3px 10px rgba(37,33,34,.25); }
.btn.ghost { box-shadow: none; }
.btn.secondary { background: var(--dark); }
.btn.ghost { background: #fff; color: var(--dark) !important; border: 2px solid var(--border); }
.btn.big { width: 100%; padding: 15px; font-size: 18px; }
.btn[disabled] { background: #bbb; cursor: not-allowed; }

.notice {
  width: calc(100% - 32px); max-width: 948px; margin: 0 auto 8px;
  padding: 18px 24px; border-radius: var(--radius);
  background: #fffdf6; border: 1px solid #eadfc3;
  box-shadow: var(--shadow); color: #555; font-size: 15.5px; text-align: center;
}
.notice-line { display: block; line-height: 1.6; }
.notice-line + .notice-line { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #eadfc3; }
.notice-line.deadline span:last-child { font-weight: 600; color: var(--dark); }
.notice-ico { display: inline-block; margin-inline-end: 6px; font-size: 17px; vertical-align: -1px; }
.notice.info {
  background: #eef7fd; border: 1px solid #cfe8f8;
  color: #136a96; box-shadow: none; text-align: center;
  width: fit-content; max-width: calc(100% - 32px);
  padding: 10px 22px; font-size: 15px; line-height: 1.5;
  border-radius: 999px; margin: 0 auto 16px;
}
@media (max-width: 520px) { .notice.info { border-radius: 14px; padding: 10px 16px; } }

/* ---------- Vœux Chana Tova (texte, sans encadré) ---------- */
.shana-text {
  max-width: 720px; margin: 0 auto; padding: 30px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.shana-text .shana-he {
  margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(26px, 5vw, 42px); line-height: 1.3; color: var(--dark); direction: rtl;
}
.shana-text .shana-lat {
  margin: 0; color: #9a7b2f; font-weight: 600;
  font-size: clamp(15px, 2.4vw, 20px); letter-spacing: 3px;
}
.shana-sep { display: flex; align-items: center; gap: 10px; }
.shana-sep i { display: block; width: 70px; height: 1.5px; background: #d9a441; opacity: .75; }
.shana-sep b { display: block; width: 7px; height: 7px; border-radius: 50%; background: #d9a441; }
@media (max-width: 560px) { .shana-sep i { width: 44px; } }

/* ---------- Sections de contenu ---------- */
.section { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; }
.section h2 { font-size: 24px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

/* ---------- Dates de Tichri ---------- */
.dates-list { display: grid; gap: 12px; padding: 0; margin: 20px 0 0; list-style: none; }
.date-item { display: flex; gap: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.date-badge {
  flex: 0 0 58px; text-align: center; background: var(--dark); color: #fff;
  border-radius: 8px; padding: 7px 4px; height: fit-content;
}
.date-badge .m { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #ffd166; }
.date-badge .d { display: block; font-size: 22px; font-weight: 900; line-height: 1.1; }
.date-item h3 { margin: 0 0 3px; font-size: 17px; }
.date-item p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Tunnel de commande ---------- */
.steps {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin: 26px auto 18px; padding: 0 12px; max-width: 720px;
}
.steps span {
  display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700;
  color: var(--muted); padding: 5px 10px;
}
.steps .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: #ccc; color: #fff; font-size: 13px;
}
.steps .on { color: var(--dark); }
.steps .on .num { background: var(--accent); }
.steps .done .num { background: var(--ok); }

/* Sur mobile : que les numéros, sauf l'étape en cours qui garde son nom */
@media (max-width: 560px) {
  .steps { flex-wrap: nowrap; gap: 2px; justify-content: center; margin-top: 18px; }
  .steps span { font-size: 0; gap: 0; padding: 5px 5px; }
  .steps .num { font-size: 13px; }
  .steps .on { font-size: 13.5px; gap: 7px; }
}

.funnel { max-width: 720px; margin: 0 auto; padding: 0 16px 50px; }
/* Étapes avec barre de total : la barre colle au pied de page, sans écart */
.funnel:has(.total-bar) { padding-bottom: 0; }
.funnel h1 { font-size: 24px; text-align: center; margin: 8px 0 20px; }

/* Desktop : tunnel plus large et qui occupe la hauteur de l'écran,
   la barre du total est ainsi ancrée en bas de la fenêtre */
@media (min-width: 821px) {
  .funnel {
    max-width: 900px; width: 100%;
    display: flex; flex-direction: column;
    min-height: calc(100vh - 220px);
  }
  .funnel > form { display: flex; flex-direction: column; flex: 1; }
  .funnel .total-bar { margin-top: auto; }
}

/* Texte explicatif en haut de l'étape 1 (tarifs + lien de bascule) */
.funnel-intro {
  max-width: 660px; margin: -6px auto 22px; text-align: center;
  color: #555; font-size: 15px; line-height: 1.6;
}
.funnel-intro p { margin: 0 0 8px; }
.funnel-intro .switch-line { font-weight: 600; color: var(--dark); }
.funnel-intro .switch-line a { text-decoration: underline; }

/* Carte email + téléphone + devise (étape 1) */
.contact-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 18px;
}
.contact-card .currency-field { max-width: 220px; margin-bottom: 0; }

.person-block {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 14px; position: relative;
}
.person-block h3 { margin: 0 0 12px; font-size: 16px; color: var(--accent); padding-inline-end: 42px; }
.person-block .remove-person {
  position: absolute; top: 13px; inset-inline-end: 13px;
  width: 30px; height: 30px; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; border-radius: 50%;
  background: #fff; border: 1px solid var(--border); color: #999;
  cursor: pointer; box-shadow: none; -webkit-appearance: none;
}
.person-block .remove-person:hover { color: var(--accent-dark); border-color: var(--accent); background: #fdf2f5; }
.person-block > .field:last-of-type { margin-bottom: 0; } /* uniquement le dernier champ direct du bloc */

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 5px; color: var(--dark); }
.field .help { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], select {
  width: 100%; padding: 12px 14px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }

.total-bar {
  position: sticky; bottom: 0; background: var(--dark); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0; padding: 14px 18px; margin-top: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
}
.total-bar .amount { font-size: 22px; font-weight: 900; color: #ffd166; }
.bar-add {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid #777; background: transparent; color: #fff;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.bar-add:hover { border-color: #fff; }
.bar-add-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.bar-tip {
  position: absolute; bottom: calc(100% + 12px); inset-inline-start: -4px;
  background: #fff; color: var(--dark); font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px; box-shadow: 0 3px 12px rgba(0,0,0,.25);
  white-space: nowrap; pointer-events: none; opacity: 1; transition: opacity .5s;
}
.bar-tip::after {
  content: ""; position: absolute; top: 100%; inset-inline-start: 14px;
  border: 6px solid transparent; border-top-color: #fff;
}
.bar-tip.off { opacity: 0; }
.bar-add-wrap:hover .bar-tip.off { opacity: 1; }

.err {
  background: #fdecec; border: 1px solid #f5b5b5; color: #9c1c1c;
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 15px;
}
.ok-banner {
  background: #e8f7ee; border: 1px solid #b7e4c7; color: #14532d;
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 15px;
}

/* ---------- Paiement ---------- */
.cur-switch {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 14px; font-size: 14px; color: var(--muted); flex-wrap: wrap;
}
.cur-switch a, .cur-switch b {
  display: inline-block; padding: 6px 14px; border-radius: 20px; font-weight: 700;
  border: 1px solid var(--border); background: #fff; color: var(--dark); text-decoration: none;
}
.cur-switch b { background: var(--dark); color: #fff; border-color: var(--dark); }
.cur-switch a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.pay-recap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.recap-rows { margin-top: 10px; }
.recap-rows .rr {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 9px 0; border-bottom: 1px solid #f1f1f1; font-size: 15.5px;
}
.recap-rows .rr > span { color: var(--muted); flex-shrink: 0; }
.recap-rows .rr > b { font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.pay-recap .total { font-size: 20px; font-weight: 900; color: var(--dark); margin-top: 12px; text-align: end; }
.express-box { margin-bottom: 14px; }
/* Colonne de paiement : même largeur pour tous les blocs (sans effet sur petit écran) */
.express-box, .pay-methods, .secure-note { max-width: 560px; margin-inline: auto; width: 100%; }
/* Écrans moyens et larges : boutons à taille raisonnable, centrés */
@media (min-width: 641px) {
  #paypal-buttons,
  #stripe-submit, .pay-box form .btn.ghost.big {
    max-width: 380px; margin-inline: auto; display: block;
  }
}
.shana-img { text-align: center; margin: 26px 0 8px; }
.shana-img img { max-width: min(340px, 86%); height: auto; }

/* Prière des kapparot sur la confirmation (dons) */
.prayer-card { margin-top: 4px; }
.prayer-title { margin: 0 0 14px; font-size: 21px; }
.prayer-text { margin: 0 0 14px; line-height: 1.7; }
.prayer-names { margin: 0 0 14px; padding: 12px 16px; background: #faf7ef; border-radius: 8px; line-height: 1.8; }
.pay-methods { display: grid; gap: 14px; }
.pay-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.pay-box h2 { margin: 0 0 4px; font-size: 18px; }
.pay-box .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.secure-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 16px; }
.secure-note::before { content: "🔒 "; }
#paypal-buttons { min-height: 45px; margin-top: 12px; }
#stripe-element { margin-top: 10px; }

/* ---------- Confirmation ---------- */
.confirm-hero { text-align: center; padding: 46px 16px 10px; }
.confirm-hero .check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 74px; height: 74px; border-radius: 50%; background: var(--ok); color: #fff;
  font-size: 38px; margin-bottom: 14px;
}

/* ---------- Pied de page ---------- */
.site-footer { background: var(--dark); color: #cfc9ca; margin-top: 30px; padding: 34px 0; font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #ffd166; }
.site-footer strong { color: #fff; }

/* ---------- RTL (hébreu) ---------- */
.rtl { direction: rtl; }
.rtl .date-badge .m { letter-spacing: 0; }

/* ---------- Contenu éditorial ---------- */
.prose { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 26px; }

/* --- Choix de catégorie en cartes côte à côte (au lieu du menu déroulant) --- */
.genre-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gopt {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 7px; text-align: center;
  border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 8px; cursor: pointer; background: #fff;
  font-size: 13.5px; line-height: 1.3; transition: border-color .12s, background .12s;
}
.gopt input { position: absolute; opacity: 0; pointer-events: none; }
.gico, .glab, .gsub { display: block; width: 100%; text-align: center; }
.gico {
  font-size: 28px; margin-bottom: 2px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.gico-sm { font-size: 17px; letter-spacing: 3px; margin-inline-end: -3px; }
.glab { font-weight: 700; overflow-wrap: break-word; }
@media (max-width: 820px) { .glab { font-size: clamp(11.5px, 3.5vw, 13.5px); } .gopt { padding: 12px 5px; } }
.gsub { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: -3px; }
.gopt:hover { border-color: #bbb; }
.gopt.on { border-color: var(--accent); background: #fdf3f5; box-shadow: 0 0 0 1px var(--accent) inset; }
.gopt.on .glab { color: var(--accent); }
@media (min-width: 821px) { .gopt { font-size: 14.5px; padding: 15px 10px; } }

/* --- Champs manquants (validation) --- */
.field input.invalid, .field select.invalid {
  border-color: var(--accent) !important;
  background: #fdf1f3;
  box-shadow: 0 0 0 3px rgba(213, 35, 73, .12);
}
.field input.invalid::placeholder { color: #cb6c80; }

/* Menu déroulant de l'autocomplétion d'adresse Google */
.pac-container { z-index: 10000; font-family: var(--font); border-radius: 8px; box-shadow: var(--shadow); }

/* --- Page Adresses : en-tête --- */
.addr-title { font-size: 26px; margin: 0 0 12px; line-height: 1.25; }
.addr-lead { margin: 0 0 14px; }
.addr-choice { margin: 0 0 8px; font-weight: 700; }
.addr-opts { list-style: none; margin: 0 0 20px; padding: 0; }
.addr-opts li { position: relative; padding-inline-start: 20px; margin-bottom: 8px; }
.addr-opts li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .5em;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.addr-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 10px; }
.addr-updated { color: var(--muted); font-size: 14px; }
@media (max-width: 520px) { .addr-title { font-size: 23px; } }
.prose p { margin: 0 0 16px; }
.prose h2 { margin-top: 26px; }
.hebrew-text { font-size: 20px; line-height: 1.9; direction: rtl; text-align: right; }
