/* ============================================================
   Bar Mitsva de Nathan — thème Casino Royal
   Rouge velours, or et tapis vert.
   ============================================================ */

:root {
  --bordeaux:   #5E0B15;
  --rouge:      #A3141F;
  --rouge-vif:  #D21F2C;
  --or:         #D4AF37;
  --or-clair:   #F6DF9A;
  --or-fonce:   #8C6A1C;
  --vert:       #0F7A52;
  --vert-fonce: #08482F;
  --bois:       #6B3B17;
  --noir:       #141012;
  --creme:      #FFF8E7;

  --titre:  'Anton', 'Impact', sans-serif;
  --corps:  'Playfair Display', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --hebreu: 'Frank Ruhl Libre', 'David', serif;

  --degrade-or: linear-gradient(180deg, #FFF1B8 0%, #E9C35A 35%, #B98A26 70%, #F2D27A 100%);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--corps);
  color: var(--creme);
  background: var(--bordeaux);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.pas-de-scroll { overflow: hidden; height: 100vh; }

p { margin: 0; }

.rouge { color: var(--rouge-vif) !important; }

.bsd {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 5;
  font-family: var(--hebreu);
  font-size: 20px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}


/* ============================================================
   1. LA PAGE DE GARDE
   ============================================================ */

.couverture {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* la photo de la salle (images/salle.jpg) ; sans elle, l'ambiance dessinée */
  background:
    url('images/salle.jpg') center top / cover no-repeat,
    radial-gradient(ellipse 60% 30% at 50% 6%, rgba(255, 214, 140, .55), transparent 70%),
    radial-gradient(circle at 8% 38%, rgba(255, 190, 110, .28), transparent 14%),
    radial-gradient(circle at 92% 38%, rgba(255, 190, 110, .28), transparent 14%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 70px),
    linear-gradient(180deg, #4A2A12 0%, #2C180A 50%, #1A0C06 100%);
}

/* les lustres : des halos qui scintillent */
.lustre {
  position: absolute;
  top: 3%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 210, .95) 0 6%, rgba(255, 216, 140, .55) 18%, transparent 65%);
  filter: blur(2px);
  animation: scintille 3.2s ease-in-out infinite;
  pointer-events: none;
}
.lustre--1 { left: 50%; transform: translateX(-50%); width: 170px; height: 170px; }
.lustre--2 { left: 6%;  top: 14%; animation-delay: -1.1s; }
.lustre--3 { right: 6%; top: 14%; animation-delay: -2.2s; }

@keyframes scintille {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

/* le tapis rouge qui file vers la machine */
.tapis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, #7E0E1A 0%, #A3141F 45%, #6A0A14 100%);
  clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 20px 40px rgba(0, 0, 0, .4);
}

/* poteaux dorés à cordon de velours */
.cordon {
  position: absolute;
  bottom: 9%;
  width: 26%;
  height: 120px;
  pointer-events: none;
}
.cordon--gauche { left: 2%; }
.cordon--droite { right: 2%; }

.cordon i {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 110px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8C6A1C, #FFE9A6 45%, #B98A26);
}
.cordon i::before {          /* la boule en haut */
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #FFF4C9, #D4AF37 45%, #7A5413);
}
.cordon i::after {           /* le pied */
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 34px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #8C6A1C, #FFE9A6, #8C6A1C);
}
.cordon i:first-child { left: 0; }
.cordon i:last-child  { right: 0; }

.cordon::before {            /* le velours entre les deux poteaux */
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  height: 36px;
  border: 7px solid var(--rouge);
  border-top: 0;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35));
}

.couverture__contenu {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 40px 16px 24px;
}

.couverture__appel {
  font-family: var(--titre);
  font-size: clamp(19px, 5.4vw, 26px);
  letter-spacing: .04em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  color: var(--or-clair);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
  animation: appel 1.6s ease-in-out infinite;
}

@keyframes appel {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.couverture.ouverte {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s ease, transform 1.2s ease;
  pointer-events: none;
}


/* ---------- La machine à sous ---------- */

.machine {
  --largeur: min(270px, 72vw);
  position: relative;
  width: var(--largeur);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .6));
  -webkit-tap-highlight-color: transparent;
}

.machine:focus-visible { outline: 3px solid var(--or-clair); outline-offset: 8px; border-radius: 22px; }

.machine__fronton {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 12px 10px;
  border-radius: 26px 26px 6px 6px;
  background: var(--degrade-or);
  border: 2px solid #7A5413;
}

/* rangée d'ampoules qui clignotent */
.ampoules {
  position: absolute;
  top: 4px;
  left: 18px;
  right: 18px;
  height: 8px;
  background: radial-gradient(circle, #FFFDF0 0 2.5px, #FFCF4D 3px, transparent 4px) 0 0 / 14px 8px repeat-x;
  animation: ampoules .5s steps(1) infinite;
}

@keyframes ampoules {
  0%   { background-position: 0 0;   }
  50%  { background-position: 7px 0; }
}

.machine__mise,
.machine__titre {
  font-family: var(--titre);
  line-height: 1;
  color: var(--or-clair);
  background: var(--noir);
  border: 1px solid #7A5413;
  border-radius: 4px;
}

.machine__mise  { font-size: 12px; padding: 4px 5px; }
.machine__titre { flex: 1; font-size: 15px; padding: 5px 4px; letter-spacing: .06em; }

.machine__corps {
  display: block;
  padding: 12px 12px 8px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 12%, transparent 88%, rgba(0, 0, 0, .25)),
    var(--degrade-or);
  border-left: 2px solid #7A5413;
  border-right: 2px solid #7A5413;
}

.machine__ecran {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 7px;
  background: var(--noir);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #3A2A10;
}

.rouleau {
  --h: calc(var(--largeur) * .24);
  position: relative;
  display: block;
  height: var(--h);
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(180deg, #CFC6B4 0%, #FFFFFF 30%, #FFFFFF 70%, #CFC6B4 100%);
}

/* l'effet cylindre : ombre en haut et en bas */
.rouleau::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 70%, rgba(0, 0, 0, .35));
  pointer-events: none;
}

.rouleau__bande {
  display: block;
  will-change: transform;
}

.rouleau__case {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  font-family: var(--titre);
  font-size: calc(var(--h) * .62);
  line-height: 1;
  color: var(--noir);
}

.rouleau__case.rouge  { color: var(--rouge-vif); }
.rouleau__case.dore   { color: #B5851F; }

.machine__libelles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 6px;
  font-family: var(--titre);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #4A3510;
}

.machine__socle {
  display: block;
  padding: 10px 18px 14px;
  border-radius: 6px 6px 18px 18px;
  background: var(--degrade-or);
  border: 2px solid #7A5413;
  border-top-width: 1px;
}

.machine__plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px 8px;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 0%, #3A1A0E, var(--noir));
  border: 2px solid #E9C35A;
  font-family: var(--titre);
  font-size: 19px;
  letter-spacing: .06em;
  line-height: 1.05;
  color: var(--or-clair);
}
.machine__plaque b { font-weight: 400; font-size: 15px; }

/* le levier, à droite */
.machine__levier {
  position: absolute;
  top: 34%;
  right: -16px;
  width: 7px;
  height: 66px;
  border-radius: 4px;
  background: linear-gradient(90deg, #8C6A1C, #FFE9A6 45%, #B98A26);
  transform-origin: 50% 100%;
}
.machine__boule {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 30%, #FF8A8A, var(--rouge-vif) 45%, #5E0B15);
}
.machine.tiree .machine__levier { animation: levier .7s ease-in-out; }

@keyframes levier {
  0%   { transform: scaleY(1); }
  45%  { transform: scaleY(-.55); }
  100% { transform: scaleY(1); }
}

/* au gain : la machine s'illumine */
.machine.gagne .machine__ecran { animation: gain .25s ease-in-out 6 alternate; }

@keyframes gain {
  from { box-shadow: inset 0 0 0 2px #3A2A10, 0 0 0 rgba(255, 220, 120, 0); }
  to   { box-shadow: inset 0 0 0 2px #FFE9A6, 0 0 26px rgba(255, 220, 120, .9); }
}


/* ---------- Le compte à rebours de la page de garde ---------- */

.compteur {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compteur__case {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
}

.compteur--couverture .compteur__chiffre {
  font-family: var(--titre);
  font-size: 34px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}

.compteur__libelle {
  margin-top: 4px;
  font-family: var(--corps);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--or-clair);
}


/* ---------- La pluie de pièces ---------- */

.piece {
  position: fixed;
  top: -40px;
  z-index: 1100;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF4C9, #E2B74A 50%, #8C6219);
  box-shadow: inset 0 0 0 3px rgba(122, 84, 19, .55);
  pointer-events: none;
  animation: chute linear forwards;
}

@keyframes chute {
  to { transform: translateY(110vh) rotate(720deg); }
}


/* ============================================================
   2. L'INVITATION
   ============================================================ */

.invitation {
  position: relative;
  min-height: 100vh;
  padding: 64px 16px 0;
  /* le tissu de fond (images/tissu.jpg) ; sans lui, un velours à losanges */
  background:
    radial-gradient(ellipse at 50% 0%, rgba(90, 10, 20, .35), rgba(35, 3, 8, .55) 80%),
    linear-gradient(rgba(70, 6, 14, .62), rgba(70, 6, 14, .62)),
    url('images/tissu.jpg') center top / 300px auto repeat,
    radial-gradient(ellipse at 50% 0%, rgba(255, 120, 120, .18), transparent 60%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, .08) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, .08) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, #7E0E1A, var(--bordeaux) 60%, #3E0710);
}


/* ---------- La table de jeu ---------- */

.table {
  --l: min(440px, calc(100vw - 32px));
  position: relative;
  width: var(--l);
  margin: 0 auto;
  padding: 14px;
  border-radius: calc(var(--l) / 2) calc(var(--l) / 2) 30px 30px;
  background: linear-gradient(135deg, #8A5226, var(--bois) 40%, #3F200B 100%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 2px 3px rgba(255, 220, 170, .35);
}

.table__tapis {
  position: relative;
  padding: 18px 26px 40px;
  text-align: center;
  border-radius: calc(var(--l) / 2 - 14px) calc(var(--l) / 2 - 14px) 18px 18px;
  background:
    radial-gradient(ellipse at 50% 35%, #179566 0%, var(--vert) 45%, var(--vert-fonce) 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .45);
}

/* le filet doré qui court à l'intérieur du tapis */
.table__tapis::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(246, 223, 154, .75);
  border-radius: calc(var(--l) / 2 - 24px) calc(var(--l) / 2 - 24px) 10px 10px;
  pointer-events: none;
}

.table__arc {
  display: block;
  width: 100%;
  margin-bottom: -8px;
  overflow: visible;
}

.table__arc text {
  font-family: var(--hebreu);
  font-size: 25px;
  font-weight: 500;
  fill: var(--or-clair);
}

.couleurs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: -54px;
  font-size: 22px;
  color: var(--noir);
}

.filet {
  display: block;
  width: 120px;
  height: 1px;
  margin: 14px auto;
  background: linear-gradient(90deg, transparent, var(--or-clair), transparent);
}

.famille {
  font-size: 15px;
  line-height: 1.75;
  font-style: italic;
  color: #fff;
}

.invite {
  margin-top: 18px;
  text-wrap: balance;
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
  color: #fff;
}

.prenom {
  margin: 14px 0 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(54px, 15vw, 78px);
  line-height: 1.1;
  background: var(--degrade-or);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
}

.prenom-hebreu {
  font-family: var(--hebreu);
  font-weight: 700;
  font-size: clamp(32px, 9vw, 42px);
  line-height: 1.2;
  color: var(--or-clair);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .4);
}

.date-cle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--titre);
  font-size: 22px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
}

.date-cle__hebreu {
  font-family: var(--corps);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--or-clair);
}

.table__mot {
  margin-top: 18px;
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}

/* les dés posés sur le bord */
.de {
  position: absolute;
  z-index: 3;
  width: 62px;
  height: 62px;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .5));
}
.de--1 { left: -14px; top: 13%; transform: rotate(-18deg); }
.de--2 { left: 26px;  top: calc(13% + 42px); transform: rotate(14deg); width: 54px; height: 54px; }


/* ---------- L'éventail de cartes ---------- */

.eventail {
  position: relative;
  height: 150px;
  max-width: 300px;
  margin: 26px auto 0;
}

.petite-carte {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70px;
  height: 100px;
  margin-left: -35px;
  padding: 6px 7px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  transform-origin: 50% 120%;
  font-family: var(--titre);
  font-size: 18px;
  line-height: 1;
  color: var(--noir);
}
.petite-carte i {
  display: block;
  font-style: normal;
  font-size: 15px;
}
.petite-carte:nth-child(1) { transform: rotate(-32deg); }
.petite-carte:nth-child(2) { transform: rotate(-16deg); }
.petite-carte:nth-child(3) { transform: rotate(0deg); }
.petite-carte:nth-child(4) { transform: rotate(16deg); }
.petite-carte:nth-child(5) { transform: rotate(32deg); }


/* ---------- Les titres de section ---------- */

.titre-section {
  margin: 0 0 26px;
  font-family: var(--titre);
  font-weight: 400;
  font-size: clamp(28px, 8vw, 40px);
  letter-spacing: .05em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  background: var(--degrade-or);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5));
}


/* ---------- Le programme en cartes à jouer ---------- */

.programme { padding: 56px 0 10px; }

.cartes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

.carte {
  width: min(330px, 100%);
  perspective: 1400px;
}

.carte:nth-child(1) { transform: rotate(-2deg); }
.carte:nth-child(2) { transform: rotate(2deg); }

.carte__interieur {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.2, .7, .2, 1);
}

/* la carte arrive face cachée, puis se retourne quand on la voit */
.js .carte__interieur { transform: rotateY(180deg); }
.js .carte.retournee .carte__interieur { transform: rotateY(0deg); }

.carte__face,
.carte__dos {
  grid-area: 1 / 1;
  border-radius: 18px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
}

.carte__face {
  position: relative;
  padding: 46px 30px 48px;
  text-align: center;
  background: linear-gradient(180deg, #FFFFFF, #FBF4E4);
  color: var(--noir);
  border: 1px solid #E8DCC0;
}

.carte__face::before {         /* filet doré intérieur */
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(185, 138, 38, .55);
  border-radius: 12px;
  pointer-events: none;
}

.carte__dos {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 2px, transparent 2px 12px),
    var(--rouge);
  border: 10px solid #fff;
}
.carte__dos span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--or-clair);
  background: var(--bordeaux);
  font-family: var(--titre);
  font-size: 44px;
  color: var(--or-clair);
}

.carte__coin {
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: var(--titre);
  font-size: 20px;
  line-height: 1;
  text-align: center;
  color: var(--noir);
}
.carte__coin i { display: block; font-style: normal; font-size: 18px; }
.carte__coin--bas { top: auto; left: auto; bottom: 16px; right: 18px; transform: rotate(180deg); }

.carte__titre {
  margin: 0 0 14px;
  font-family: var(--titre);
  font-weight: 400;
  font-size: 27px;
  letter-spacing: .03em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--rouge);
}

.carte__date {
  font-size: 18px;
  font-weight: 600;
}
.carte__date span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: var(--or-fonce);
}

.carte__heure {
  margin-top: 6px;
  font-family: var(--titre);
  font-size: 22px;
  letter-spacing: .04em;
}

.carte__lieu {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
}

.carte__note {
  margin-top: 12px;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  color: #5A4A3A;
}

.bouton {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 22px;
  border-radius: 40px;
  background: var(--degrade-or);
  border: 1px solid #7A5413;
  box-shadow: 0 4px 0 #7A5413, 0 8px 14px rgba(0, 0, 0, .25);
  font-family: var(--titre);
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--noir);
  transition: transform .15s ease, box-shadow .15s ease;
}
.bouton:hover  { transform: translateY(-2px); }
.bouton:active { transform: translateY(3px); box-shadow: 0 1px 0 #7A5413, 0 3px 6px rgba(0, 0, 0, .25); }


/* ---------- Le compte à rebours en jetons ---------- */

.rebours { padding: 64px 0 10px; }

.compteur--jetons { gap: 10px; flex-wrap: wrap; }

.compteur--jetons .compteur__case { min-width: 0; }

.compteur--jetons .compteur__chiffre {
  --c: var(--rouge);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: repeating-conic-gradient(#F4ECD8 0 14deg, var(--c) 14deg 45deg);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45);
  font-family: var(--titre);
  font-size: 26px;
  line-height: 1;
  color: #fff;
  isolation: isolate;
}
.compteur--jetons .compteur__chiffre::before {
  content: '';
  position: absolute;
  inset: 9px;
  z-index: -1;
  border-radius: 50%;
  background: var(--c);
  border: 2px dashed rgba(255, 255, 255, .7);
}

.compteur--jetons .compteur__case:nth-child(2) .compteur__chiffre { --c: #1C1C1C; }
.compteur--jetons .compteur__case:nth-child(3) .compteur__chiffre { --c: var(--vert); }
.compteur--jetons .compteur__case:nth-child(4) .compteur__chiffre { --c: #B5851F; }

.compteur--jetons .compteur__libelle { margin-top: 8px; }


/* ---------- La pensée ---------- */

.pensee {
  max-width: 420px;
  margin: 60px auto 0;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  text-align: center;
  color: var(--or-clair);
}


/* ---------- Le panneau JACKPOT ---------- */

.jackpot {
  position: relative;
  max-width: 440px;
  margin: 90px auto 0;
}

.jackpot__titre {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -58%);
  padding: 0 14px;
  font-family: var(--titre);
  font-size: clamp(52px, 16vw, 72px);
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--rouge-vif);
  -webkit-text-stroke: 2px var(--or-clair);
  text-shadow: 0 4px 0 #5E0B15, 0 0 18px rgba(255, 210, 120, .6);
  white-space: nowrap;
}

.jackpot__cadre {
  position: relative;
  padding: 54px 24px 30px;
  border-radius: 26px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #3A0A12, #12070A 80%);
  border: 6px solid #E9C35A;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .5), inset 0 0 24px rgba(0, 0, 0, .8);
}

/* la couronne d'ampoules, qui clignote */
.jackpot__cadre::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 7px dotted #FFE9A6;
  border-radius: 18px;
  animation: guirlande 1s steps(1) infinite;
  pointer-events: none;
}

@keyframes guirlande {
  0%  { border-color: #FFF6CF; filter: drop-shadow(0 0 4px rgba(255, 230, 150, .9)); }
  50% { border-color: #C9921E; filter: none; }
}

.jackpot__hebreu {
  font-family: var(--hebreu);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--or-clair);
}

.jackpot__francais {
  margin-top: 12px;
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: #fff;
}

.jackpot__source {
  margin-top: 10px;
  font-family: var(--titre);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--or);
}


/* ---------- Le pied de page ---------- */

.pied {
  margin: 80px -16px 0;
  padding-bottom: 0;
  text-align: center;
}

/* la bande de roulette « 13 » qui défile */
.bande-13 {
  overflow: hidden;
  border-top: 2px solid var(--or);
  border-bottom: 2px solid var(--or);
  background: var(--noir);
}
.bande-13__defile {
  display: flex;
  width: max-content;
  animation: defile 22s linear infinite;
}
.bande-13__defile span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-right: 1px solid rgba(212, 175, 55, .5);
  font-family: var(--titre);
  font-size: 17px;
  color: #fff;
  background: var(--rouge);
}
.bande-13__defile span:nth-child(even) { background: #111; }
.bande-13__defile span:nth-child(9n)   { background: var(--vert); }

@keyframes defile {
  to { transform: translateX(-50%); }
}

.jetons-deco {
  display: flex;
  justify-content: center;
  margin: 46px 0 22px;
}

.jeton {
  --c: var(--rouge);
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 -6px;
  border-radius: 50%;
  background: repeating-conic-gradient(#F4ECD8 0 14deg, var(--c) 14deg 45deg);
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45);
}
.jeton::before {
  content: '13';
  position: absolute;
  inset: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .7);
  background: var(--c);
  font-family: var(--titre);
  font-size: 18px;
  color: #fff;
}
.jeton--noir { --c: #1C1C1C; transform: translateY(-10px); }
.jeton--vert { --c: var(--vert); }
.jeton--or   { --c: #B5851F; transform: translateY(-10px); }

.pied__mot {
  padding: 0 24px 40px;
  font-family: var(--script);
  font-size: 30px;
  line-height: 1.3;
  color: var(--or-clair);
}

.barre-signature {
  padding: 14px 16px 70px;
  background: var(--noir);
  border-top: 2px solid var(--or);
}
.barre-signature p {
  font-family: var(--corps);
  font-size: 12px;
  letter-spacing: .05em;
  color: rgba(255, 255, 255, .6);
}


/* ---------- Apparition au défilement ---------- */

.js .apparait {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}
.js .apparait.visible { opacity: 1; transform: none; }


/* ============================================================
   LE BOUTON MUSIQUE (composant commun à tous les sites)
   ============================================================ */

.musique {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--or);
  background: var(--rouge);
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
  transition: transform .2s ease, background-color .3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.musique.visible { display: flex; }

/* l'onde qui s'echappe du bouton pendant la lecture */
.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; }
}

/* les quatre barres de l'egaliseur */
.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;
}

/* a l'arret les barres restent basses ; en lecture elles montent en vague */
.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; }
}


/* ============================================================
   ÉCRANS PLUS LARGES
   ============================================================ */

@media (min-width: 768px) {
  .invitation { padding-top: 80px; }

  .cartes {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
  }
  .carte__interieur { height: 100%; }

  .de { width: 80px; height: 80px; }
  .de--1 { left: -40px; }
  .de--2 { left: 10px; top: calc(13% + 58px); width: 66px; height: 66px; }

  .compteur--jetons { gap: 22px; }
  .compteur--jetons .compteur__chiffre { width: 92px; height: 92px; font-size: 32px; }
}

/* grands écrans : la machine prend plus de place */
@media (min-width: 768px) and (min-height: 760px) {
  .machine { --largeur: 330px; }
}

/* petits téléphones : on resserre la page de garde */
@media (max-height: 680px) {
  .machine { --largeur: min(230px, 64vw); }
  .couverture__contenu { gap: 12px; }
  .compteur--couverture .compteur__chiffre { font-size: 28px; }
}


/* Respecte les personnes qui ont désactivé les animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01s !important;
  }
}
