:root {
  --panel-width-desktop: 300px;
  --panel-width-mobile: 85vw;
  --panel-gap: 1.5rem; /* espace vertical entre les deux panels */
  --main-link-color: #45d0e7;
  --card-1-img: url("./images/ambanja_menu.jpg");
  --card-2-img: url("./images/antalaha_menu.jpg");
  --card-3-img: url("./images/bundibugyo_menu.jpg");
  --card-4-img: url("./images/amcho_menu.jpg");
}

/* Déclaration de la police Alternate Gothic */
@font-face {
  font-family: 'AlternateGothic';
  src: url('../fonts/Alternate Gothic No3 D Regular/Alternate Gothic No3 D Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Déclaration de la police Balboa */
@font-face {
  font-family: 'BalboaMedium';
  src: url('../fonts/Alternate Gothic No3 D Regular/Alternate Gothic No3 D Regular.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.wrap {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 1rem;
    max-height: 560px;
    height: 25vh;
    z-index: 5;

  @container (max-width: 1400px) {
    gap: 3rem;
  }

  @container (max-width: 1200px) {
    zoom: 0.7;
  }

  @container (max-width: 865px) {
    zoom: 1;
    flex-direction: column;
    max-height: 100%;
    height: auto;
  }
}

.card-container {
  --main-color: var(--main-link-color);
  --main-color-text: oklch(
    from var(--main-color) calc(l - 0.7) calc(c - 0.15) h
  );
  --main-color-bright: oklch(from var(--main-color) calc(l + 0.7) c h);
  --main-color-dark: oklch(
    from var(--main-color) calc(l - 0.2) calc(c - 0.05) h
  );
  position: relative;
  display: block;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;

  border-radius: 1.75rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 2px oklch(from var(--main-color) l c h / calc(alpha - 0.3)),
    0 0 25px 8px oklch(from var(--main-color) l c h / calc(alpha - 0.9));
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.4s ease-out, background-size 1.5s ease-out;
  cursor: default;
  will-change: transform, box-shadow, background-size;
  user-select: none;
  backface-visibility: hidden;

  @container (max-width: 865px) {
    height: 500px;
  }
}

.card-1 {
  background-image: var(--card-1-img);
}

.card-2 {
  background-image: var(--card-2-img);
}

.card-3 {
  background-image: var(--card-3-img);
}

.card-4 {
  background-image: var(--card-4-img);
}

.card-container[data-color="green"] {
  --main-color: #5d2a2c;
}

.card-container[data-color="orange"] {
  --main-color: #5d2a2c;
}

.card-container[data-color="red"] {
  --main-color: #5d2a2c;
}

.card-container[data-color="purple"] {
  --main-color: #5d2a2c;
}

.card-container:hover {
  box-shadow: 0 0 0 3px oklch(from var(--main-color) l c h / calc(alpha - 0.2)),
    0 0 35px 12px oklch(from var(--main-color) l c h / calc(alpha - 0.8));
}

.pattern {
  width: 100%;
  height: 100%;
  perspective: 1000px;
  background-repeat: repeat;
  background-size: 40px 40px;
  z-index: 2;
  position: absolute;
  mix-blend-mode: overlay;
  opacity: 0.48;
  pointer-events: none;
}

.shine {
  --color1: rgb(0, 231, 255);
  --color2: rgb(255, 0, 231);
  background-size: cover;
  background-blend-mode: overlay;
  mix-blend-mode: color-dodge;

  opacity: 0.5;
  filter: brightness(0.8) contrast(0.8) invert(1);
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  mask-size: cover;
  mask-position: center;
  transition: all 0.4s linear;
}

.card-container:hover .shine {
  opacity: 0.8;
}

/* Effet hover sur la card */
.card-container:hover .text-block h1 {
  color: #5d2a2c; /* couleur du titre quand on survole */
}

/* Effet hover sur la card */
.card-container:hover .single {
  color: #5d2a2c; /* couleur du titre quand on survole */
}

/* Effet hover sur la card */
.card-container:hover .gradient-overlay {
  background: #f6c243 !important; /* ta couleur */
  mix-blend-mode: normal !important; /* neutralise les mélanges */
  mask-image: none !important;       /* enlève les masques éventuels */
}

.card-1 .shine,
.card-1 .pattern {
  mask-image: var(--card-1-mask), radial-gradient(50% 50%, #ffffff00, #000000);
}

.card-2 .shine,
.card-2 .pattern {
  mask-image: var(--card-2-mask), radial-gradient(50% 50%, #ffffff00, #000000);
}

.card-3 .shine,
.card-3 .pattern {
  mask-image: var(--card-3-mask), radial-gradient(50% 50%, #ffffff00, #000000);
}

.card-4 .shine,
.card-4 .pattern {
  mask-image: var(--card-3-mask), radial-gradient(50% 50%, #ffffff00, #000000);
}

.js-tilt-glare {
  mix-blend-mode: hard-light;
}

.js-tilt-glare-inner {
  z-index: 4;
}

.inner-border-overlay {
  position: absolute;
  border-radius: 1.375rem;
  pointer-events: none;
  z-index: 10;
  box-shadow: inset 0.5px 0.5px 1.5px
      oklch(from var(--main-color) l c h / calc(alpha - 0.7)),
    inset -1px -1px 1px rgba(0, 0, 0, 0.5),
    inset 3px 3px 6px rgba(0, 0, 0, 0.25);
  transform: translateZ(30px);
  will-change: transform;
  border: 1px solid oklch(from var(--main-color) l c h / calc(alpha - 0.8));
}

.content-area {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* au lieu de center */
  align-items: center;         /* pour garder le centrage horizontal */
  padding-top: 0.3rem !important;           /* espace en haut */
  z-index: 5;
  transform: translateZ(60px);
  will-change: transform;
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--main-color);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  color: var(--main-color-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateZ(70px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 25;
  will-change: transform;
}

.badge svg {
  width: 1em;
  height: 1em;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: #5d2a2c !important; /* ta couleur */
  mix-blend-mode: normal !important; /* neutralise les mélanges */
  mask-image: none !important;       /* enlève les masques éventuels */
  pointer-events: none;
  z-index: 15;  
  transform: translateZ(5px);
  will-change: transform;
}

.text-block {
  font-family: 'BalboaMedium', sans-serif;
  font-size: 1.1rem;
  position: relative;
  z-index: 20;
  color: #f6c243;
  text-align: center;
  transform: translateZ(25px);
  will-change: transform;
}

.text-block h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.text-block p {
  color: #cbd5e1;
}

.single {
  color: #fff;  
}

.main-button {
  position: relative;
  z-index: 20;
  background: var(--main-color);
  color: var(--main-color-text);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-align: center;
  width: auto;
  min-width: 90px;
  height: 40px;
  max-width: 65%;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
  border: none;
  box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.2);
  transform: translateZ(40px);
  will-change: transform, box-shadow, background;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  letter-spacing: 0.025em;
  margin-top: 1rem;
}

.main-button:hover {
  background: var(--main-color-bright);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0),
    inset -2px -2px 5px rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateZ(40px) translateY(-2px);
}

.main-button:active {
  background: var(--main-color-dark);
  box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.3),
    inset 2px 2px 4px rgba(255, 255, 255, 0.5), 0 0 0 rgba(0, 0, 0, 0);
  transform: translateZ(40px) translateY(0px);
}

/* Appliquer une police personnalisée à tout le contenu Shepherd */
.shepherd-element {
  font-family: 'AlternateGothic', sans-serif; /* ou ta police préférée */
  color: #5d2a2c;              /* texte blanc */
}

/* Couleur de fond et texte de la barre d’entête */
.shepherd-title {
  font-family: 'BalboaMedium', sans-serif;
  font-size: 1.3rem;
  color: #5d2a2c;              /* texte blanc */
}

/* Couleur de fond et texte de la barre d’entête */
.shepherd-header {
  background: #f6c243 !important; /* violet personnalisé */
}

/* Style général des boutons */
.shepherd-button {
  font-family: 'AlternateGothic', sans-serif; /* ou ta police préférée */
  background-color: #5d2a2c; /* violet personnalisé */
  color: #fff;
  border-radius: 6px;
  padding: 8px 16px;
}

/* Bouton "Cancel" spécifique */
.shepherd-button.shepherd-cancel-button {
  background-color: #ccc;
  color: #000;
}

/* ================================
   INFO-BOX — Responsive
=================================== */

.info-box {
  position: fixed;
  bottom: clamp(1rem, 6vw, 4rem);
  left: clamp(0.5rem, 3vw, 1rem);

  width: clamp(220px, 80vw, 300px);
  max-width: 52vw;

  z-index: 1000;
  border: 2px solid #5d2a2c;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}

/* Header */
.info-header {
  font-family: 'Roboto';
  font-size: clamp(0.80rem, 2.5vw, 1.2rem);
  color: #5d2a2c;
  padding: clamp(0.5rem, 2vw, 0.8rem) clamp(0.8rem, 3vw, 1rem);
  text-align: center;
  background: #ffd22f;
  font-weight: bold;
}

/* Content */
.info-content {
  font-family: 'Roboto';
  color: #5d2a2c;
  font-size: clamp(0.8rem, 2.5vw, 1.2rem);
  padding: clamp(0.7rem, 2vw, 1rem);
  text-align: center;
}

/* Buttons */
.info-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
}

.info-buttons button {
  font-family: 'AlternateGothic', sans-serif;
  font-size: clamp(0.7rem, 2vw, 0.85rem);

  flex: 1;
  padding: clamp(0.4rem, 2vw, 0.6rem);

  border-radius: 30px;
  border: none;
  background-color: #5d2a2c;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.info-buttons button:hover {
  background-color: #7a3a3d;
}

/* ================================
   BOTTOM-BOX — Responsive
=================================== */


.bottom-box {
  position: fixed;

  /* placé juste sous le down-box */
  top: calc(50% + (var(--panel-width-desktop) / 2) - var(--panel-gap));
  right: 0.75rem;

  /* même largeur */
  width: var(--panel-width-desktop);
  max-width: var(--panel-width-desktop);

  background: #fff0ab;
  border: 2px solid #5d2a2c;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  padding: clamp(0.7rem, 2vw, 1rem);
  z-index: 998;

  display: flex;
  flex-direction: column;
}

/* Header */
.bottom-header {
  font-family: 'Roboto';
  font-size: clamp(0.75rem, 2.2vw, 0.9rem);
  color: #5d2a2c;
  margin-bottom: 0.4rem;
  text-align: center;
  font-weight: bold;
}

/* Content */
.bottom-content {
  font-family: 'Roboto';
  color: #5d2a2c;
  font-size: clamp(0.75rem, 2.2vw, 0.9rem);
  margin-bottom: 0.8rem;
  text-align: center;
  font-weight: bold;
}

/* Buttons */
.bottom-buttons {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.bottom-buttons button {
  font-family: 'AlternateGothic', sans-serif;
  font-size: clamp(0.7rem, 2vw, 0.85rem);

  flex: 1;
  padding: clamp(0.4rem, 2vw, 0.6rem);

  border-radius: 30px;
  border: none;
  background-color: #5d2a2c;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.bottom-buttons button:hover {
  background-color: #7a3a3d;
}

/* ========= DESACTIVE HOVER SUR MOBILE ======== */
@media (hover: none) {
  .info-buttons button:hover,
  .bottom-buttons button:hover {
    background-color: #5d2a2c;
  }
}

/* ====== Optimisation pour très petits écrans ====== */
@media (max-width: 480px) {

  .bottom-box {
    width: var(--panel-width-mobile);
    max-width: var(--panel-width-mobile);
    transform-origin: right center;
  }

  .bottom-box {
    /* même scale et même alignement */
    transform: scale(0.85);
    top: calc(
      50% 
      + (var(--panel-width-mobile) * 0.85 / 2) 
      - var(--panel-gap)
    );
  }
}

@media (max-width: 360px) {

  .info-box
  {
    width: 52vw;
    border-width: 1.5px;
  }

  .bottom-box {
    transform-origin: right center;
  }

  .bottom-box {
    transform: scale(0.78);
    top: calc(
      50% 
      + (var(--panel-width-mobile) * 0.78 / 2) 
      - var(--panel-gap)
    );
  }
}

/* Encadré global sur element side-box */
.side-box {
  position: fixed;
  top: 4rem;             /* marge en haut */
  left: calc(1rem + 300px); /* juste à côté de info-box */
  background: #fff0ab;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  width: 300px;
  max-width: 90%;
  padding: 1rem;
  z-index: 1000;
  flex-direction: column;
}

.side-header {
  font-family: 'BalboaMedium', sans-serif;
  font-size: 1rem;
  color: #5d2a2c;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  text-align: left;
}

.side-content {
  font-size: 0.75rem;
  color: #333;
}

input[type="range"] {
  width: 15rem;
  margin: 0.5rem 0;
}