* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background-image: url("back.jpg");
  color: #333;
  padding: 0px;
}

.controls {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#carousel {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-height: 200px;
}

.slides {
  display: flex;
}

.slides:hover {
  animation-play-state: paused !important;
}

.slide {
  background-color: transparent;
  flex: 0 0 20%;
  position: relative;
  text-align: center;
  padding: 5px;
}

#slides {
  animation-play-state: running;
}

.message {
  text-align: center;
  padding: 20px;
  color: #666;
}

@font-face {
  font-family: "Beleren";
  src: url("beleren.ttf") format("truetype");
  font-display: swap;
}

/* --- Headers & Banners --- */
.fb-header {
  position: relative;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  font-family: sans-serif;
}

.fb-cover {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
}

.fb-profile {
  position: absolute;
  width: 150px;
  height: 150px;
  bottom: 30px;
  left: -70px;
  background-size: cover;
  background-position: center;
  border: 5px solid #af790b;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  background-color: #af790b;
}

.qr-code {
  position: absolute;
  width: 128px;
  height: 128px;
  bottom: 30px;
  left: 860px;
}

.fb-title {
  position: absolute;
  font-family: "Beleren";
  font-weight: bold;
  font-size: 65px;
  text-shadow: 2px 2px rgb(88, 60, 6);
  bottom: 60px;
  left: 160px;
  color: #ffffff;
  white-space: nowrap;
}

.main-banner {
  background-color: white;
  color: #007b00;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 8px 0;
  margin: 10px 0;
  width: 100%;
  border-top: 2px solid white;
  border-bottom: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* --- Card Elements --- */
.card-price-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background-color: white;
  border: 2px solid white;
  border-radius: 8px;
  padding: 4px 8px;
  margin-bottom: 6px;
  box-sizing: border-box;
  color: #007b00;
  font-size: 1.5rem;
  font-weight: bold;
}

.card-tags {
  font-size: 0.85rem;
  color: white;
  background-color: rgba(0,0,0,0.7);
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: normal;
  letter-spacing: 0.5px;
}

.card-tags.foil {
  background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  color: #111;
  font-weight: bold;
  border: 1px solid #aa771c;
}

.card-tags.reserved {
  background-color: #8b0000;
  font-weight: bold;
}

.card-img-container {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}

.card-img-container img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

.foil-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(255,255,255,0) 0%,
    rgba(255, 0, 128, 0.08) 30%,
    rgba(0, 255, 255, 0.12) 40%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 0, 0.12) 60%,
    rgba(128, 0, 255, 0.08) 70%,
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 200%;
  mix-blend-mode: color-dodge;
  animation: foilShine 4s ease infinite;
}

@keyframes foilShine {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Double-Faced Card (DFC) Animations --- */
.card-img-container.is-dfc {
  aspect-ratio: 488 / 680;
}

.card-img-container.is-dfc img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.is-dfc .front-face {
  /* Links back to the JS constant via CSS variables */
  animation: fadeOutIn var(--flip-duration, 10s) infinite;
}

.is-dfc .back-face {
  opacity: 0;
  animation: fadeInOut var(--flip-duration, 10s) infinite;
}

@keyframes fadeOutIn {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeInOut {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Boutons de langue (Drapeaux) --- */
.lang-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.lang-btn svg {
  width: 24px;
  height: 16px;
  display: block;
  border-radius: 2px;
}

.lang-btn.active {
  border-color: #007b00;
  background-color: #e6f9e6;
  box-shadow: 0 0 5px rgba(0,123,0,0.3);
}

.lang-btn:hover {
  background-color: #f0f0f0;
}