/* ============================================================
   PALETTE : 18ème siècle, bordeaux et rose gold
   ============================================================ */
:root {
  --bordeaux-fonce: #3d0c1a;
  --bordeaux: #6b1530;
  --bordeaux-clair: #8a2542;
  --rosegold: #b76e79;
  --rosegold-clair: #e0a9a9;
  --rosegold-pale: #f3d8d3;
  --ivoire: #faf3ee;
  --creme: #fdf9f5;
  --or: #c9a86a;
  --encre: #3a2028;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  background: var(--ivoire);
  color: var(--encre);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3 { font-weight: 500; }

.placeholder {
  background: rgba(201, 168, 106, 0.15);
  border: 1px dashed var(--or);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-style: italic;
  color: #8a6d3b;
}

/* ============================================================
   ÉCRAN COMPTE À REBOURS (page d'accueil uniquement)
   ============================================================ */
#countdown-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(ellipse at 50% 30%, #7b1e3a 0%, #4a0e1f 55%, #300815 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--rosegold-pale);
  padding: 2rem;
  transition: opacity 1.2s ease;
}
#countdown-screen.hidden { opacity: 0; pointer-events: none; }

.monogram {
  width: 110px;
  height: 110px;
  border: 2px solid var(--rosegold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-style: italic;
  color: var(--rosegold-clair);
  position: relative;
  cursor: pointer;
  user-select: none;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(183, 110, 121, 0.35), inset 0 0 25px rgba(183, 110, 121, 0.15);
  animation: monogram-glow 3s ease-in-out infinite alternate;
}
.monogram::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(224, 169, 169, 0.4);
  border-radius: 50%;
}
@keyframes monogram-glow {
  from { box-shadow: 0 0 25px rgba(183, 110, 121, 0.25), inset 0 0 20px rgba(183, 110, 121, 0.1); }
  to   { box-shadow: 0 0 55px rgba(183, 110, 121, 0.5), inset 0 0 30px rgba(183, 110, 121, 0.25); }
}

#countdown-screen .surtitre {
  font-size: 0.95rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--rosegold);
  margin-bottom: 0.8rem;
}
#countdown-screen h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-style: italic;
  margin-bottom: 2.2rem;
  color: var(--ivoire);
}

.compteur {
  display: flex;
  gap: clamp(0.6rem, 3vw, 1.8rem);
  margin-bottom: 2rem;
}
.compteur .bloc {
  min-width: clamp(62px, 16vw, 96px);
  padding: 0.9rem 0.4rem;
  border: 1px solid rgba(224, 169, 169, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}
.compteur .chiffre {
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--ivoire);
  font-variant-numeric: tabular-nums;
}
.compteur .libelle {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rosegold-clair);
}

#quip {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rosegold-clair);
  max-width: 34rem;
  min-height: 3.2em;
  transition: opacity 0.6s ease;
}

#btn-ouvrir {
  margin-top: 2rem;
  display: none;
}

/* ============================================================
   RIDEAUX DE RÉVÉLATION (page d'accueil uniquement)
   ============================================================ */
.rideau {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 51%;
  z-index: 999;
  background:
    repeating-linear-gradient(90deg,
      #5a1229 0px, #7b1e3a 45px, #5a1229 90px);
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  transition: transform 2.4s cubic-bezier(0.65, 0, 0.25, 1);
}
#rideau-gauche { left: 0; }
#rideau-droit  { right: 0; }
.rideau.ouvert#rideau-gauche { transform: translateX(-105%); }
.rideau.ouvert#rideau-droit  { transform: translateX(105%); }
body:not(.revele) .rideau { display: none; }
body.revele .rideau { display: block; }
body.rideaux-partis .rideau { display: none !important; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  padding: 0.75rem 2.2rem;
  border: 1px solid var(--rosegold);
  border-radius: 3px;
  background: linear-gradient(135deg, #b76e79, #d99a94 50%, #b76e79);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(183, 110, 121, 0.45); }
.btn:active { transform: translateY(0); }
.btn.secondaire {
  background: transparent;
  color: var(--bordeaux);
  border-color: var(--bordeaux);
}

/* ============================================================
   STRUCTURE GÉNÉRALE
   ============================================================ */
main { padding-bottom: 92px; }

/* Attente du compte à rebours : la classe "attente" n'est posée sur
   <body> que par accueil.js, quand le compte à rebours est réellement
   actif. Les autres pages ne sont donc jamais concernées. */
body.attente main { display: none; }
body.attente.revele main { display: block; }

section {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 1.4rem;
}

/* Douce entrée de la section au chargement de chaque page */
main > section {
  animation: page-entree 0.7s ease both;
}
@keyframes page-entree {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ----- Navigation en bas (liens générés par commun.js) ----- */
#navigation {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem clamp(0.8rem, 4vw, 2rem);
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(250, 243, 238, 0.92), var(--ivoire));
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--rosegold-clair);
  box-shadow: 0 -6px 24px rgba(107, 21, 48, 0.08);
}
.btn-nav {
  display: inline-block;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--rosegold);
  border-radius: 3px;
  background: transparent;
  color: var(--bordeaux);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-nav:hover { background: var(--rosegold-pale); }
.btn-nav.invisible { visibility: hidden; }
.btn-nav.principal {
  background: linear-gradient(135deg, #b76e79, #d99a94 50%, #b76e79);
  color: #fff;
}
#nav-points {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
#nav-points a {
  display: inline-block;
  border: none;
  background: none;
  color: var(--rosegold-clair);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}
#nav-points a.actif {
  color: var(--bordeaux);
  font-size: 1.15rem;
  transform: rotate(180deg);
}

.surtitre-section {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--rosegold);
  margin-bottom: 0.6rem;
}
h2 {
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-style: italic;
  color: var(--bordeaux);
  margin-bottom: 2.2rem;
}

/* ============================================================
   HÉRO (page d'accueil)
   ============================================================ */
#hero {
  min-height: calc(100vh - 92px);
  min-height: calc(100svh - 92px);
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 20%, #fdf4ef 0%, var(--ivoire) 60%),
    var(--ivoire);
  overflow: hidden;
}
#hero .cadre {
  border: 2px solid var(--rosegold);
  outline: 1px solid rgba(183, 110, 121, 0.35);
  outline-offset: 7px;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 8vw, 5rem);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  position: relative;
  z-index: 2;
  margin: 1rem;
}
#hero .surtitre {
  font-size: 0.9rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--rosegold);
  margin-bottom: 1rem;
}
#hero h1 {
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-style: italic;
  color: var(--bordeaux);
  line-height: 1.1;
}
#hero .grand-nombre {
  font-size: clamp(4rem, 14vw, 7.5rem);
  background: linear-gradient(135deg, #b76e79 10%, #e8c4bc 45%, #b76e79 70%, #8a4a55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  line-height: 1;
  margin: 0.5rem 0;
}
#hero .sous-titre {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--encre);
  max-width: 30rem;
  margin: 0.8rem auto 0;
}

.petale {
  position: absolute;
  top: -30px;
  font-size: 1.3rem;
  color: var(--rosegold-clair);
  animation: chute linear infinite;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}
@keyframes chute {
  0%   { transform: translateY(-5vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0.3; }
}

/* ============================================================
   MOT D'INTRODUCTION
   ============================================================ */
#intro .carte-lettre {
  background: var(--creme);
  border: 1px solid var(--rosegold-clair);
  box-shadow: 0 10px 30px rgba(107, 21, 48, 0.08);
  padding: clamp(1.8rem, 5vw, 3rem);
  font-size: 1.15rem;
  position: relative;
}
#intro .carte-lettre::before, #lettre .parchemin::before {
  content: '❦';
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--rosegold);
  font-size: 1.3rem;
}

/* ============================================================
   QUIZ
   ============================================================ */
#quiz .carte-quiz {
  background: var(--creme);
  border: 1px solid var(--rosegold-clair);
  box-shadow: 0 10px 30px rgba(107, 21, 48, 0.08);
  padding: clamp(1.6rem, 5vw, 2.6rem);
  text-align: center;
}
#quiz .progression {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rosegold);
  margin-bottom: 1rem;
}
#quiz .question {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--bordeaux);
  margin-bottom: 1.6rem;
  min-height: 2.5em;
}
#quiz .options { display: flex; flex-direction: column; gap: 0.8rem; }
#quiz .option {
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--rosegold);
  border-radius: 4px;
  background: #fff;
  color: var(--encre);
  cursor: pointer;
  transition: all 0.2s ease;
}
#quiz .option:hover:not(:disabled) { background: var(--rosegold-pale); transform: translateX(4px); }
#quiz .option.bonne { background: #e8f3e4; border-color: #7ba05b; color: #3d5a2a; }
#quiz .option.mauvaise { background: #f9e4e4; border-color: var(--bordeaux-clair); color: var(--bordeaux); }
#quiz .option:disabled { cursor: default; opacity: 0.85; }
#quiz .retour-quiz {
  min-height: 3em;
  margin-top: 1.2rem;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--bordeaux);
}
#quiz .resultat { display: none; }
#quiz .resultat .score {
  font-size: 3rem;
  font-style: italic;
  color: var(--bordeaux);
  margin: 0.5rem 0;
}

/* ============================================================
   MINI-JEU : LE FEU D'ARTIFICE
   ============================================================ */
#jeu .zone-jeu {
  position: relative;
  height: 480px;
  background: linear-gradient(180deg, #10050d 0%, #24081a 45%, #3d0c1f 80%, #4a0e1f 100%);
  border: 1px solid var(--rosegold);
  border-radius: 6px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 14px 40px rgba(20, 5, 15, 0.4), inset 0 0 60px rgba(0, 0, 0, 0.5);
  touch-action: manipulation;
}
#jeu canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#jeu .hud {
  position: absolute;
  top: 0.8rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: var(--rosegold-pale);
  z-index: 5;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  padding: 0 1rem;
}
#jeu .ecran-jeu {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  z-index: 6;
  background: rgba(16, 5, 13, 0.82);
  color: var(--rosegold-pale);
  cursor: default;
}
#jeu .ecran-jeu p { max-width: 28rem; margin-bottom: 1.2rem; font-size: 1.1rem; font-style: italic; }
/* La révélation : une invitation gravée, dorée, cérémonieuse */
.message-secret {
  display: none;
  margin-top: 2.4rem;
  background: linear-gradient(180deg, #fdf8f0, #f8eeda);
  border: 1px solid var(--or);
  outline: 1px solid rgba(201, 168, 106, 0.45);
  outline-offset: 6px;
  padding: clamp(1.8rem, 5vw, 2.8rem) clamp(1.2rem, 5vw, 2.4rem);
  text-align: center;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--encre);
  box-shadow: 0 16px 44px rgba(201, 168, 106, 0.3);
  animation: invitation-apparait 0.9s ease both;
}
@keyframes invitation-apparait {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.invitation-surtitre {
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 0.5rem;
}
.invitation-titre {
  font-style: italic;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 500;
  color: var(--bordeaux);
  margin-bottom: 0.3rem;
}
.invitation-ornement {
  color: var(--or);
  font-size: 1.2rem;
  letter-spacing: 0.6em;
  margin-bottom: 1.1rem;
  user-select: none;
}
.message-secret p { max-width: 34rem; margin: 0 auto; line-height: 1.7; }

/* ============================================================
   23 RAISONS
   ============================================================ */
#raisons .grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}
.carte-raison {
  perspective: 800px;
  height: 150px;
  cursor: pointer;
}
.carte-raison .interieur {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.carte-raison.retournee .interieur { transform: rotateY(180deg); }
.carte-raison .face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem;
  text-align: center;
}
.carte-raison .recto {
  background: linear-gradient(150deg, var(--bordeaux), var(--bordeaux-clair));
  color: var(--rosegold-pale);
  font-size: 2rem;
  font-style: italic;
  border: 1px solid var(--rosegold);
  box-shadow: 0 6px 16px rgba(107, 21, 48, 0.25);
}
.carte-raison .recto::after {
  content: '❧';
  position: absolute;
  bottom: 0.35rem;
  right: 0.55rem;
  font-size: 1.5rem;
  opacity: 0.75;
}
.carte-raison .verso {
  background: var(--creme);
  border: 1px solid var(--rosegold);
  transform: rotateY(180deg);
  font-size: 0.86rem;
  font-style: italic;
  color: var(--encre);
  overflow-y: auto;
  line-height: 1.35;
}

/* ============================================================
   GALERIE DE SOUVENIRS
   ============================================================ */
#souvenirs .galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.6rem;
  align-items: start;
}
.cadre-souvenir {
  background: var(--creme);
  border: 1px solid var(--rosegold-clair);
  box-shadow: 0 8px 24px rgba(107, 21, 48, 0.14);
  padding: 0.8rem 0.8rem 1rem;
  transform: rotate(-1.2deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cadre-souvenir:nth-child(even) { transform: rotate(1.2deg); }
.cadre-souvenir:hover {
  transform: rotate(0) scale(1.02);
  box-shadow: 0 12px 32px rgba(107, 21, 48, 0.22);
}
.cadre-souvenir img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--or);
}
.cadre-souvenir figcaption {
  margin-top: 0.7rem;
  text-align: center;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--bordeaux);
}
.cadre-souvenir figcaption p { margin-bottom: 0 !important; }

/* ============================================================
   LETTRE FINALE
   ============================================================ */
#lettre .parchemin {
  background:
    linear-gradient(180deg, #fdf8f2, #f8efe6);
  border: 1px solid var(--or);
  box-shadow: 0 14px 40px rgba(107, 21, 48, 0.12);
  padding: clamp(2rem, 6vw, 3.5rem);
  font-size: 1.18rem;
  position: relative;
}
#lettre .parchemin .signature {
  text-align: right;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--bordeaux);
  margin-top: 2rem;
}

footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  font-style: italic;
  color: var(--rosegold);
  background: linear-gradient(180deg, transparent, rgba(224, 169, 169, 0.15));
}

/* ============================================================
   CONFETTIS
   ============================================================ */
.confetti {
  position: fixed;
  top: -20px;
  z-index: 1001;
  pointer-events: none;
  animation: confetti-chute linear forwards;
}
@keyframes confetti-chute {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .petale, .monogram { animation: none; }
  main > section { animation: none; }
  .cadre-souvenir, .cadre-souvenir:hover { transform: none; transition: none; }
}

/* ============================================================
   AJUSTEMENTS TÉLÉPHONE
   ============================================================ */
@media (max-width: 600px) {
  section { padding: 3rem 1rem; }
  #hero .cadre { outline-offset: 5px; }
  .compteur { flex-wrap: wrap; justify-content: center; }
  #jeu .zone-jeu { height: 70svh; max-height: 480px; min-height: 340px; }
  #jeu .ecran-jeu p { font-size: 1rem; }
  #raisons .grille { grid-template-columns: repeat(2, 1fr); }
  .carte-raison { height: 140px; }
  .carte-raison .verso { font-size: 0.82rem; }
  #quiz .option { padding: 0.9rem 1rem; }
  .btn { padding: 0.85rem 1.8rem; }
  .polaroid { max-width: 150px; }
  .polaroid img { height: 128px; }
  .medaillon-photo { width: 116px; height: 116px; }
  #navigation { gap: 0.35rem; padding-left: 0.6rem; padding-right: 0.6rem; }
  .btn-nav { padding: 0.5rem 0.7rem; font-size: 0.82rem; letter-spacing: 0.03em; }
  #nav-points { gap: 0.3rem; }
  .table-uno { min-height: 440px; }
}

/* ============================================================
   PHOTOS INTÉGRÉES : médaillon, polaroids, vignette Poupouille
   ============================================================ */
.medaillon-photo {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rosegold);
  outline: 1px solid rgba(183, 110, 121, 0.35);
  outline-offset: 5px;
  box-shadow: 0 10px 26px rgba(107, 21, 48, 0.25);
}

.rangee-polaroids {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin: 0 0 2.2rem;
}
.polaroid {
  background: #fff;
  padding: 0.55rem 0.55rem 0.75rem;
  border: 1px solid var(--rosegold-clair);
  box-shadow: 0 10px 24px rgba(107, 21, 48, 0.16);
  max-width: 225px;
  margin: 0;
}
.polaroid img {
  display: block;
  width: 100%;
  height: 165px;
  object-fit: cover;
}
.polaroid figcaption {
  font-style: italic;
  font-size: 0.85rem;
  text-align: center;
  padding-top: 0.5rem;
  color: var(--encre);
}
.rangee-polaroids .polaroid:nth-child(odd)  { transform: rotate(-2.3deg); }
.rangee-polaroids .polaroid:nth-child(even) { transform: rotate(1.7deg); }
.rangee-polaroids .polaroid:hover { transform: rotate(0deg) scale(1.03); transition: transform 0.25s ease; }

/* ============================================================
   PAGE DE SA MAJESTÉ POUPOUILLE
   ============================================================ */
#lapin { text-align: center; }
.sous-titre-lapin {
  font-style: italic;
  font-size: 1.1rem;
  max-width: 32rem;
  margin: -1rem auto 2.2rem;
  color: var(--encre);
}
.cour-royale { margin-bottom: 2.6rem; }
.portrait-royal {
  position: relative;
  display: inline-block;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.portrait-royal img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--or);
  outline: 1px solid rgba(201, 168, 106, 0.5);
  outline-offset: 7px;
  box-shadow: 0 14px 36px rgba(107, 21, 48, 0.28);
  display: block;
}
.portrait-royal .couronne {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%) rotate(-12deg);
  font-size: 2.4rem;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  z-index: 2;
}
.portrait-royal.caresse img { animation: fretillement 0.45s ease; }
@keyframes fretillement {
  0%, 100% { transform: rotate(0deg) scale(1); }
  30% { transform: rotate(-3deg) scale(1.04); }
  60% { transform: rotate(2.5deg) scale(1.02); }
}
.consigne-caresse {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--rosegold);
  margin-top: 1.1rem;
}
.compteur-caresses {
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bordeaux);
  margin-top: 0.5rem;
}
.reaction-caresse {
  min-height: 2em;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--bordeaux);
  margin-top: 0.6rem;
}
#btn-carotte { margin-top: 1rem; }

.colonnes-royales {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  text-align: left;
}
.titre-royal {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--bordeaux);
  text-align: center;
  margin-bottom: 1rem;
}
.liste-royale { list-style: none; }
.liste-royale li {
  padding: 0.45rem 0 0.45rem 1.6rem;
  position: relative;
  font-size: 1.02rem;
}
.liste-royale li::before {
  content: '❧';
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--rosegold);
}

.coeur-flottant {
  position: fixed;
  z-index: 200;
  font-size: 3.4rem;
  pointer-events: none;
  animation: coeur-envol 1.5s ease-out forwards;
}
@keyframes coeur-envol {
  from { transform: translateY(0) scale(0.7); opacity: 1; }
  to   { transform: translateY(-90px) scale(1.4); opacity: 0; }
}
.pluie-carotte {
  position: fixed;
  top: -40px;
  z-index: 200;
  font-size: 2.6rem;
  pointer-events: none;
  animation: carotte-chute linear forwards;
}
@keyframes carotte-chute {
  to { transform: translateY(110vh) rotate(320deg); }
}

/* ============================================================
   LA REVANCHE D'UNO
   ============================================================ */
#uno { text-align: center; }
.table-uno {
  position: relative;
  min-height: 480px;
  border: 1px solid var(--rosegold);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(224, 169, 169, 0.16), transparent 70%),
    linear-gradient(170deg, #571226, #6b1530 60%, #58122a);
  box-shadow: 0 14px 40px rgba(61, 12, 26, 0.35), inset 0 0 60px rgba(0, 0, 0, 0.28);
  padding: 1.4rem 1rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  overflow: hidden;
}
.adversaire {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.avatar-adversaire {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--rosegold-clair);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}
.avatar-adversaire.rage-1 { animation: rage 0.5s ease 2; }
.avatar-adversaire.rage-2 { animation: rage 0.3s ease 5; }
.avatar-adversaire.rage-3 { animation: rage 0.16s ease 14; }
@keyframes rage {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-7deg) translateY(-2px); }
  75% { transform: rotate(7deg) translateY(1px); }
}
.main-adversaire { display: flex; }
.main-adversaire .carte-uno { width: 46px; height: 66px; }
.bulle {
  max-width: 30rem;
  background: var(--creme);
  color: var(--encre);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  font-style: italic;
  font-size: 1rem;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  min-height: 2.6em;
}
.bulle::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 42px;
  border: 9px solid transparent;
  border-bottom-color: var(--creme);
  border-top: none;
}
.bulle.apparait { animation: bulle-pop 0.3s ease; }
@keyframes bulle-pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.centre-uno { display: flex; align-items: center; justify-content: center; min-height: 130px; }
.consigne-uno {
  color: var(--rosegold-pale);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  min-height: 1.5em;
}
.main-joueuse {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 3vw, 1.2rem);
}
.carte-uno {
  position: relative;
  width: clamp(76px, 24vw, 104px);
  height: calc(clamp(76px, 24vw, 104px) * 1.45);
  border-radius: 10px;
  border: 3px solid #fdf6ee;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
}
.carte-uno .ovale {
  position: absolute;
  inset: 12% 8%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  transform: rotate(-24deg);
}
.carte-uno .valeur {
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-style: italic;
}
.couleur-bordeaux { background: linear-gradient(145deg, #8a2542, #5a1229); }
.couleur-or       { background: linear-gradient(145deg, #d9b26a, #a97f38); }
.couleur-rose     { background: linear-gradient(145deg, #d98a97, #b76e79); }
.couleur-neutre   { background: linear-gradient(145deg, #4d5a74, #37415a); }
.carte-uno.dos {
  background:
    repeating-linear-gradient(45deg, #6b1530 0 8px, #7b1e3a 8px 16px);
}
.carte-uno.dos .valeur { font-size: 1.1rem; opacity: 0.8; }
.carte-uno.jouable { cursor: pointer; transition: transform 0.2s ease; }
.carte-uno.jouable:hover { transform: translateY(-10px); }
.carte-uno.jouee { animation: carte-jouee 0.4s ease forwards; pointer-events: none; }
.carte-uno.refusee { animation: carte-refusee 0.4s ease; }
@keyframes carte-refusee {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px) rotate(-2deg); }
  75% { transform: translateX(7px) rotate(2deg); }
}
@keyframes carte-jouee {
  to { transform: translateY(-120px) scale(0.85) rotate(8deg); opacity: 0; }
}
.ecran-uno {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.5rem;
  background: rgba(61, 12, 26, 0.9);
  color: var(--rosegold-pale);
  z-index: 5;
}
.ecran-uno p { max-width: 27rem; font-style: italic; font-size: 1.05rem; margin-bottom: 0.8rem; }

.ticket-cadre {
  border: 2px dashed var(--or);
  border-radius: 8px;
  padding: 1.4rem 1.2rem;
  background: linear-gradient(180deg, #fdf8f0, #f8efe0);
}
.ticket-titre {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 0.7rem;
}

/* Cartes des raisons contenant une photo */
.carte-raison .verso.avec-photo {
  padding: 0;
  overflow: hidden;
}
.carte-raison .verso.avec-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Cadrage sur le haut de l'image : c'est là que sont les visages */
  object-position: 50% 22%;
}
.carte-raison .verso.avec-photo .legende-carte {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.4rem;
  background: rgba(250, 243, 238, 0.88);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--bordeaux);
  line-height: 1.25;
}

.photo-secret {
  display: block;
  width: min(300px, 100%);
  margin: 1.1rem auto 0;
  border: 1px solid var(--or);
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(201, 168, 106, 0.3);
}

/* Textes des cartes centrés (l'avant-propos et la lettre) */
#texte-intro, #texte-lettre { text-align: center; }

.rangee-signatures {
  display: flex;
  justify-content: flex-end;
  gap: 1.6rem;
  margin-top: 1.8rem;
}
.vignette-lapin {
  width: 116px;
  margin: 0;
  text-align: center;
}
.vignette-lapin img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--or);
  box-shadow: 0 6px 16px rgba(107, 21, 48, 0.2);
  transform: rotate(4deg);
}
.vignette-lapin figcaption {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--bordeaux);
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .rangee-polaroids .polaroid, .rangee-polaroids .polaroid:hover { transform: none; transition: none; }
}
