/* ============================================================
   BAR MITSVA D'ALON — ambiance « Marbre & Or »
   Palette relevée directement sur le logo.
   ============================================================ */

:root {
  --bleu-nuit:   #002F4B;
  --bleu-royal:  #1B4C7C;
  --or:          #C9A063;
  --or-clair:    #E0C08A;
  --bronze:      #A87848;
  --creme:       #F3E2CE;
  --creme-clair: #FAF5EE;
  --marbre:      #D8C0A8;

  --titre:  'Cinzel', Georgia, serif;
  --texte:  'Cormorant Garamond', Georgia, serif;
  --ui:     'Montserrat', system-ui, sans-serif;

  --largeur: 680px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--creme-clair);
  color: var(--bleu-nuit);
  font-family: var(--texte);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto est indispensable : sans lui, l'attribut height="900"
   du HTML l'emporte et le logo s'étire sur toute la page. */
img { max-width: 100%; height: auto; display: block; }


/* ---------- Petits éléments partagés ---------- */

.bloc { max-width: var(--largeur); margin: 0 auto; padding: 0 22px; }

.section { padding: 72px 0; }

.titre-section {
  font-family: var(--titre);
  font-size: clamp(26px, 6.5vw, 38px);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 8px;
  color: var(--bleu-nuit);
}

/* « בס״ד » se met en haut à droite de la feuille, jamais au centre :
   c'est sa place sur un faire-part imprimé. Il reste à droite aussi
   sur la page hébreu. */
.bsd {
  font-family: 'Assistant', sans-serif;
  font-size: 14px;
  letter-spacing: .06em;
  color: var(--bronze);
  opacity: .75;
  text-align: right;
  margin: 0 0 12px;
  padding: 0 22px;
  max-width: var(--largeur);
  margin-inline: auto;
}

/* le filet d'or, séparateur maison */
.filet {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px auto 34px;
  max-width: 260px;
}
.filet::before, .filet::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--or), transparent);
}
.filet span {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--or);
  flex-shrink: 0;
}


/* ============================================================
   LA PAGE DE GARDE
   Deux pans de velours bleu qui s'écartent quand on clique.
   Elle ne s'affiche QUE si le script tourne : sans JavaScript,
   le site s'ouvre directement au lieu de rester derrière un
   rideau qui ne s'ouvrirait jamais.
   ============================================================ */

.garde { display: none; }

html.garde-active .garde {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
}

/* pendant que la garde est là, la page dessous ne défile pas */
html.garde-active,
html.garde-active body { overflow: hidden; height: 100%; }

.garde__volet {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;          /* un chouïa de recouvrement : aucun trait au milieu */
  background-image: url('images/fond-carre.webp');
  background-size: 200% 100%;
  background-repeat: no-repeat;
  transition: transform 1.5s cubic-bezier(.65, 0, .25, 1);
}

.garde__volet--gauche  { left: 0;  background-position: left center; }
.garde__volet--droite  { right: 0; background-position: right center; }

/* le clic : les deux pans partent sur les côtés */
.garde.ouverte .garde__volet--gauche  { transform: translateX(-100%); }
.garde.ouverte .garde__volet--droite  { transform: translateX(100%); }

/* sur un téléphone, le marbre en portrait — le même que le hero */
@media (max-aspect-ratio: 3/4) {
  .garde__volet {
    background-image: url('images/fond-portrait.webp');
    background-size: 200% 100%;
  }
}

.garde__contenu {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  transition: opacity .55s ease, transform .55s ease;
}

/* Le même voile clair que le hero : il garantit la lisibilité
   par-dessus les veines du marbre. */
.garde__contenu::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(250, 245, 238, .58) 0%,
              rgba(250, 245, 238, .78) 55%,
              rgba(243, 226, 206, .92) 100%);
  pointer-events: none;
}

/* le contenu repasse au-dessus du voile */
.garde__logo,
.garde__type,
.garde__he,
.garde__sceau { position: relative; z-index: 1; }

.garde.ouverte .garde__contenu {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.garde__logo {
  width: min(52vw, 210px);
  margin-bottom: 20px;
  filter: drop-shadow(0 8px 22px rgba(0, 47, 75, .22));
}

.garde__type {
  font-family: var(--titre);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 6px;
  padding-left: .34em;
}

.garde__he {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(20px, 5.4vw, 26px);
  font-weight: 500;
  color: var(--bleu-royal);
  margin: 0 0 34px;
}

/* le sceau : un rond d'or avec une étoile, et son libellé dessous */
.garde__sceau {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Le sceau : un anneau d'or fin sur un centre sombre, avec l'étoile
   de David tracée au trait. Le disque doré plein et l'étoile à cinq
   branches faisaient « bouton d'appli », pas faire-part. */
.garde__sceau-rond {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--or);
  background: rgba(255, 255, 255, .5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s ease, border-color .35s ease;
}

/* le second anneau, plus fin — le même geste que la double bordure des cartes */
.garde__sceau-rond::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 99, .4);
}

.garde__sceau-rond svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--bronze);
  stroke-width: 1.1;
  stroke-linejoin: round;
}

/* une respiration lente plutôt qu'une onde qui gicle */
.garde__sceau-rond::after {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 99, .3);
  animation: garde-respire 3.4s infinite ease-in-out;
}

@keyframes garde-respire {
  0%, 100% { transform: scale(.94); opacity: 0; }
  50%      { transform: scale(1);   opacity: .9; }
}

.garde__sceau:hover .garde__sceau-rond { border-color: var(--or-clair); }

.garde__sceau:hover .garde__sceau-rond { transform: scale(1.07); }
.garde__sceau:active .garde__sceau-rond { transform: scale(.95); }

.garde__sceau-texte {
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bronze);
  padding-left: .2em;
}

/* la garde s'efface entièrement une fois les pans écartés */
.garde.partie { opacity: 0; visibility: hidden; pointer-events: none;
                transition: opacity .5s ease, visibility .5s; }

@media (prefers-reduced-motion: reduce) {
  .garde__volet { transition: none; }
  .garde__sceau-rond::after { animation: none; }
}

html[dir="rtl"] .garde__type,
html[dir="rtl"] .garde__sceau-texte {
  font-family: 'Assistant', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  padding-left: 0;
  font-size: 14px;
}
html[dir="rtl"] .garde__he { font-family: 'Heebo', sans-serif; }


/* ---------- La barre de navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 800;
  background: rgba(250, 245, 238, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 160, 99, .35);
}

.nav__interieur {
  max-width: 900px;
  margin: 0 auto;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a {
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bleu-nuit);
  padding: 7px 8px;
  border-radius: 999px;
  transition: color .25s ease, background-color .25s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--bronze); background: rgba(201, 160, 99, .12); }

/* Sur un petit écran, « Montée à la Torah » ferait passer la barre
   sur deux lignes : on ne garde que « Torah ». */
.nav__long { display: none; }
@media (min-width: 560px) { .nav__long { display: inline; } }

.nav__langue {
  border: 1px solid var(--or);
  color: var(--bronze) !important;
  margin-left: 4px;
}
.nav__langue:hover { background: var(--or) !important; color: #fff !important; }


/* ---------- Le hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 22px 56px;
  overflow: hidden;
}

.hero__fond {
  position: absolute;
  inset: 0;
  background: url('images/fond-portrait.webp') center/cover no-repeat;
}

/* le voile qui garantit la lisibilité par-dessus la photo */
.hero__fond::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
              rgba(250, 245, 238, .58) 0%,
              rgba(250, 245, 238, .78) 55%,
              rgba(243, 226, 206, .92) 100%);
}

.hero__contenu {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

.hero__logo {
  width: min(62vw, 250px);
  margin: 0 auto 22px;
  filter: drop-shadow(0 8px 22px rgba(0, 47, 75, .22));
}

.hero__type {
  font-family: var(--titre);
  font-size: clamp(15px, 4vw, 19px);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 4px;
  padding-left: .34em;   /* compense l'interlettrage sur le centrage */
}

.hero__prenom-he {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 500;
  color: var(--bleu-royal);
  margin: 0 0 14px;
}

.hero__date {
  font-family: var(--texte);
  font-size: 18px;
  color: var(--bleu-nuit);
  margin: 0;
}

.hero__date-he {
  font-family: 'Assistant', sans-serif;
  font-size: 16px;
  color: var(--bronze);
  margin: 2px 0 0;
}


/* ---------- Le compte à rebours ---------- */

/* Le compte à rebours : plus de pastilles encadrées, qui alourdissaient
   le hero. Juste les chiffres, séparés par de fins filets d'or. */

.compteur { margin-top: 34px; }

.compteur__pastilles {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.compteur__pastille {
  position: relative;
  min-width: 74px;
  padding: 0 4px;
}

/* le filet d'or entre deux chiffres — « inset-inline-start » et pas « left » :
   en hébreu les chiffres se lisent de droite à gauche, le filet doit suivre */
.compteur__pastille + .compteur__pastille::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg,
              transparent, rgba(201, 160, 99, .75) 35%,
              rgba(201, 160, 99, .75) 65%, transparent);
}

.compteur__nombre {
  display: block;
  font-family: var(--titre);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  color: var(--bleu-nuit);
  font-variant-numeric: tabular-nums;
}

.compteur__unite {
  display: block;
  font-family: var(--ui);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-top: 9px;
  padding-left: .14em;
}


/* ---------- Le faire-part ---------- */

.fairepart {
  background: var(--creme-clair);
  text-align: center;
}

.fairepart__intro {
  font-size: 20px;
  font-style: italic;
  line-height: 1.75;
  margin: 0 auto 26px;
  max-width: 500px;
}

/* Le bloc famille : nom, parents et fratrie serrés ensemble.
   Séparés, les lignes flottaient dans le vide en bas de section. */
.famille { margin: 0; }

.famille__nom {
  font-family: var(--titre);
  font-size: clamp(15px, 3.6vw, 18px);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 10px;
}

.famille__parents {
  font-family: var(--texte);
  font-size: clamp(21px, 5.4vw, 26px);
  color: var(--bleu-nuit);
  margin: 0;
  line-height: 1.3;
}

.famille__fratrie {
  font-family: var(--texte);
  font-style: italic;
  font-size: 17px;
  color: var(--bleu-royal);
  opacity: .8;
  margin: 4px 0 0;
  line-height: 1.5;
}

.fairepart__evenement {
  font-family: var(--titre);
  font-size: clamp(19px, 5vw, 25px);
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bleu-royal);
  margin: 0 0 6px;
  padding-left: .2em;
}

.fairepart__prenom {
  font-family: var(--titre);
  font-size: clamp(46px, 14vw, 74px);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  color: var(--bleu-nuit);
  margin: 10px 0 0;
  padding-left: .05em;
}

.fairepart__second {
  font-family: var(--texte);
  font-size: clamp(22px, 6vw, 30px);
  font-style: italic;
  color: var(--bronze);
  margin: 2px 0 0;
}

.fairepart__prenom-he {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 500;
  color: var(--bleu-royal);
  margin: 8px 0 0;
}



/* ---------- Les moments (Torah, Soirée) ---------- */

.moment {
  position: relative;
  padding: 76px 0;
  overflow: hidden;
}

.moment__fond {
  position: absolute;
  inset: 0;
  background: url('images/fond-carre.webp') center/cover no-repeat;
}
.moment__fond::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(250, 245, 238, .72);
}

.moment .bloc {
  position: relative;
  z-index: 1;
}

.carte {
  position: relative;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(201, 160, 99, .45);
  border-radius: 24px;
  padding: 38px 26px 34px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(0, 47, 75, .10);
}

/* la double bordure dorée, reprise de Lenny Abitbol */
.carte::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(201, 160, 99, .3);
  border-radius: 16px;
  pointer-events: none;
}

.carte__date {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0;
}

.carte__date-he {
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
  color: var(--bronze);
  margin: 3px 0 22px;
}

.carte__lieu {
  font-family: var(--titre);
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--bleu-nuit);
  margin: 0 0 4px;
}

.carte__adresse {
  font-size: 18px;
  color: var(--bleu-royal);
  margin: 0 0 18px;
}

.carte__heure {
  font-family: var(--titre);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--bronze);
  margin: 0 0 20px;
}

.carte__mot {
  font-size: 18px;
  font-style: italic;
  line-height: 1.7;
  margin: 0 auto 26px;
  max-width: 430px;
}


/* ---------- Les boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--bleu-royal);
  border: 1px solid var(--bleu-royal);
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, transform .2s ease;
  min-height: 46px;   /* confortable au doigt */
}
.bouton:hover { background: var(--bleu-nuit); border-color: var(--bleu-nuit); }
.bouton:active { transform: scale(.97); }

.bouton--or { background: var(--or); border-color: var(--or); }
.bouton--or:hover { background: var(--bronze); border-color: var(--bronze); }


/* ---------- La pensée pour les grands-mères ---------- */

/* La pensée pour les disparues : un bloc étroit, encadré de deux
   filets d'or, avec une petite flamme. Plus recueilli qu'un
   paragraphe posé au milieu de la page. */

.memoire {
  background: var(--creme);
  text-align: center;
  padding: 70px 0;
}

.memoire__carte {
  max-width: 340px;
  margin: 0 auto;
  padding: 34px 20px 30px;
  border-top: 1px solid rgba(168, 120, 72, .35);
  border-bottom: 1px solid rgba(168, 120, 72, .35);
}

/* Un simple losange d'or — le même motif que les filets du site.
   La flamme faisait trop illustratif. */
.memoire__losange {
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto 20px;
  transform: rotate(45deg);
  background: var(--or);
  opacity: .8;
}

.memoire__intro {
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 14px;
  padding-left: .2em;
}

.memoire__noms {
  font-family: var(--texte);
  font-size: clamp(22px, 5.6vw, 26px);
  color: var(--bleu-nuit);
  margin: 0;
  line-height: 1.45;
}

.memoire__he {
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
  color: var(--bronze);
  margin: 12px 0 0;
  opacity: .8;
}

.memoire__mot {
  font-family: var(--texte);
  font-style: italic;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--bleu-royal);
  opacity: .75;
  margin: 18px 0 0;
}


/* ---------- Le RSVP ---------- */

.rsvp {
  background: var(--bleu-nuit);
  color: var(--creme);
  padding: 76px 0;
}

.rsvp .titre-section { color: var(--creme); }
.rsvp .bsd { color: var(--or-clair); }
.rsvp .filet::before,
.rsvp .filet::after {
  background: linear-gradient(90deg, transparent, var(--or-clair), transparent);
}
.rsvp .filet span { background: var(--or-clair); }

/* Le RSVP est écrit dans une police simple et droite (Montserrat) :
   plus lisible qu'une italique de cérémonie pour remplir un formulaire. */
.rsvp__mot {
  text-align: center;
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 auto 34px;
  max-width: 440px;
  color: var(--creme);
}

.rsvp__limite {
  display: block;
  font-family: var(--ui);
  font-size: 12px;
  font-style: normal;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--or-clair);
  margin-top: 12px;
}

.formulaire { max-width: 420px; margin: 0 auto; }

.champ { margin-bottom: 20px; }

/* Un bloc par moment : on demande la présence séparément pour la
   Montée à la Torah et pour la Soirée. Beaucoup d'invités ne viennent
   qu'à l'un des deux, et les deux repas n'ont pas le même effectif. */
.bloc-moment {
  border: 1px solid rgba(201, 160, 99, .32);
  border-radius: 20px;
  padding: 22px 18px 6px;
  margin-bottom: 22px;
}

.bloc-moment__titre {
  font-family: var(--titre);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--or-clair);
  margin: 0 0 2px;
  text-align: center;
}

.bloc-moment__quand {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(243, 226, 206, .6);
  margin: 0 0 18px;
  text-align: center;
}

html[dir="rtl"] .bloc-moment__titre { font-family: 'Heebo', sans-serif; letter-spacing: 0; }
html[dir="rtl"] .bloc-moment__quand {
  font-family: 'Assistant', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

.champ__libelle {
  display: block;
  font-family: var(--ui);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--or-clair);
  margin-bottom: 8px;
}

.champ input[type="text"],
.champ select {
  width: 100%;
  font-family: var(--ui);
  font-size: 16px;
  color: var(--creme-clair);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(201, 160, 99, .5);
  border-radius: 14px;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color .25s ease, background-color .25s ease;
  -webkit-appearance: none;
  appearance: none;
}
.champ input[type="text"]:focus,
.champ select:focus {
  outline: none;
  border-color: var(--or-clair);
  background: rgba(255, 255, 255, .12);
}

/* la petite flèche du menu déroulant, dessinée en SVG */
.champ select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%208'%3E%3Cpath%20fill='none'%20stroke='%23E0C08A'%20stroke-width='1.6'%20d='M1%201l5%205%205-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}
.champ select option { color: #14212c; background: var(--creme-clair); }

/* les deux boutons Oui / Non */
.presence { display: flex; gap: 11px; }

.presence input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.presence label {
  flex: 1;
  text-align: center;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--creme);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(201, 160, 99, .5);
  border-radius: 999px;
  padding: 14px 8px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.presence input:checked + label {
  background: var(--or);
  border-color: var(--or);
  color: #fff;
}
.presence input:focus-visible + label {
  outline: 2px solid var(--or-clair);
  outline-offset: 2px;
}

/* Le champ piège anti-robots.
   Surtout PAS « left: -9999px » : en droite-à-gauche, le navigateur
   en fait une zone scrollable de 10 000 px et toute la page hébreu
   se met à glisser horizontalement. */
.piege {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* les champs adultes/enfants n'apparaissent que si on vient */
.champ--conditionnel {
  display: none;
  animation: apparait .35s ease;
}
.champ--conditionnel.visible { display: block; }

@keyframes apparait {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.formulaire .bouton { width: 100%; margin-top: 6px; }

.formulaire__erreur {
  display: none;
  font-family: var(--ui);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  color: #FFD9D0;
  background: rgba(190, 60, 40, .22);
  border: 1px solid rgba(255, 150, 130, .45);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 16px;
}
.formulaire__erreur.visible { display: block; }

.merci {
  display: none;
  text-align: center;
  padding: 26px 0;
}
.merci.visible { display: block; }

.merci__titre {
  font-family: var(--titre);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--or-clair);
  margin: 0 0 10px;
}

.merci__mot {
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  color: var(--creme);
}


/* ---------- Le pied de page ---------- */

.pied {
  background: var(--bleu-nuit);
  color: var(--creme);
  text-align: center;
  padding: 0 22px 54px;
  border-top: 1px solid rgba(201, 160, 99, .25);
}

.pied__logo {
  width: 96px;
  margin: 0 auto 18px;
  opacity: .92;
  padding-top: 46px;
}

.pied__mot {
  font-family: var(--titre);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--or-clair);
  margin: 0;
  padding-left: .18em;
}

.pied__signature {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(243, 226, 206, .45);
  margin: 26px 0 0;
}


/* ---------- Le bouton musique (le rond à quatre barres) ---------- */

.musique {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--or);
  background: var(--or);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 47, 75, .25);
  transition: transform .2s ease, background-color .3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.musique::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--or);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
}
.musique.joue { animation: musique-respire 2s infinite ease-in-out; }
.musique.joue::before { animation: musique-onde 1.5s infinite ease-out; }

@keyframes musique-respire {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes musique-onde {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}

.musique__barres {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 16px;
}
.musique__barres span {
  width: 2.5px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
}
.musique.joue .musique__barres span {
  animation: musique-vague .45s infinite ease-in-out alternate;
}
.musique.joue .musique__barres span:nth-child(1) { animation-delay: 0s; }
.musique.joue .musique__barres span:nth-child(2) { animation-delay: .15s; }
.musique.joue .musique__barres span:nth-child(3) { animation-delay: .3s; }
.musique.joue .musique__barres span:nth-child(4) { animation-delay: .1s; }

@keyframes musique-vague {
  from { height: 3px; }
  to   { height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .musique.joue,
  .musique.joue::before,
  .musique.joue .musique__barres span { animation: none; }
  html { scroll-behavior: auto; }
}


/* ============================================================
   LA PAGE HÉBREU — droite à gauche
   ============================================================ */

html[dir="rtl"] body {
  font-family: 'Assistant', sans-serif;
  font-size: 18px;
}

html[dir="rtl"] .titre-section,
html[dir="rtl"] .carte__lieu,
html[dir="rtl"] .carte__heure,
html[dir="rtl"] .fairepart__evenement,
html[dir="rtl"] .fairepart__prenom,
html[dir="rtl"] .famille__nom,
html[dir="rtl"] .memoire__noms,
html[dir="rtl"] .memoire__mot,
html[dir="rtl"] .merci__titre,
html[dir="rtl"] .pied__mot,
html[dir="rtl"] .hero__type,
html[dir="rtl"] .compteur__nombre {
  font-family: 'Heebo', sans-serif;
  text-transform: none;   /* l'hébreu n'a pas de capitales */
}

/* l'interlettrage large casse la lecture de l'hébreu */
html[dir="rtl"] .hero__type,
html[dir="rtl"] .fairepart__evenement,
html[dir="rtl"] .fairepart__prenom,
html[dir="rtl"] .famille__nom,
html[dir="rtl"] .memoire__noms,
html[dir="rtl"] .memoire__mot,
html[dir="rtl"] .pied__mot,
html[dir="rtl"] .titre-section {
  letter-spacing: 0;
  padding-left: 0;
}

html[dir="rtl"] .fairepart__intro,
html[dir="rtl"] .carte__mot,
html[dir="rtl"] .memoire__mot,
html[dir="rtl"] .rsvp__mot,
html[dir="rtl"] .famille__fratrie,
html[dir="rtl"] .famille__parents,
html[dir="rtl"] .memoire__intro,
html[dir="rtl"] .merci__mot,
html[dir="rtl"] .fairepart__second {
  font-family: 'Assistant', sans-serif;
  font-style: normal;
}

html[dir="rtl"] .champ__libelle,
html[dir="rtl"] .presence label,
html[dir="rtl"] .bouton,
html[dir="rtl"] .nav a,
html[dir="rtl"] .compteur__unite,
html[dir="rtl"] .rsvp__limite,
html[dir="rtl"] .carte__date {
  font-family: 'Assistant', sans-serif;
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}
html[dir="rtl"] .compteur__unite { font-size: 11px; }
html[dir="rtl"] .nav a { font-size: 13px; }

html[dir="rtl"] .champ input[type="text"],
html[dir="rtl"] .champ select {
  font-family: 'Assistant', sans-serif;
  font-size: 17px;
  text-align: right;
}
html[dir="rtl"] .champ select {
  background-position: left 14px center;
  padding-right: 14px;
  padding-left: 38px;
}

html[dir="rtl"] .musique { right: auto; left: 18px; }
html[dir="rtl"] .nav__langue { margin-left: 0; margin-right: 4px; }


/* ---------- Écrans plus larges ---------- */

@media (min-width: 720px) {
  body { font-size: 20px; }
  .section, .moment { padding: 96px 0; }
  .carte { padding: 52px 44px 46px; }
  .compteur__pastille { min-width: 76px; padding: 14px 8px 11px; }
  .compteur__nombre { font-size: 31px; }
  .nav a { font-size: 12.5px; padding: 8px 14px; }
  .hero__logo { width: min(40vw, 300px); }
}
