/* GRID */
/* Layout général */
.rh-section { padding: 10px 0; }

.rh-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 1rem;
}

.rh-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  background: #f2f2f2;
  text-decoration: none;
}

.rh-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.rh-thumb:focus,
.rh-thumb:hover {
  outline: none;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.rh-thumb:hover img,
.rh-thumb:focus img {
  transform: scale(1.12);
}

.rh-modal-toggle { position: absolute; left: -9999px; }

.rh-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0,0,0,0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;
  cursor: pointer;
}

.rh-modal-toggle:checked + .rh-modal {
  opacity: 1;
  pointer-events: auto;
}

.rh-modal__box {
  width: min(90vw, 800px);
  text-align: center;
  color: #fff;
  cursor: auto;
  position: relative;
}

.rh-modal__text {
  margin-top: 12px;
  font-size: 1.05rem;
  color: #fff;
  opacity: 0.95;
}

.rh-modal > .rh-modal__overlay {
  position: absolute;
  inset: 0;
}

@media (max-width: 420px) {
  .rh-modal__text { font-size: 1rem; }
}

@media (max-width: 1100px) {
  .rh-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .rh-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .rh-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
  .rh-grid { grid-template-columns: 1fr; }
}

.rh-modal,
.rh-modal > .rh-modal__overlay,
.rh-modal .rh-modal__box {
  cursor: default;
}

/* ============================================
   MINI-CARROUSEL CSS PUR — version sans arrondi
   ============================================ */

.rh-nav { display: none; }

.rh-slides-wrap {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  --a: 0;
}

/* Chaque slide occupe 100% de la largeur (jamais de fraction), positionnée par un multiple entier de 100% */
.rh-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(calc((var(--i) - var(--a)) * 100%));
  transition: transform 0.35s ease;
}

.rh-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* Index actif (0-based) selon le radio coché */
.rh-nav:nth-of-type(1):checked ~ .rh-slides-wrap { --a: 0; }
.rh-nav:nth-of-type(2):checked ~ .rh-slides-wrap { --a: 1; }
.rh-nav:nth-of-type(3):checked ~ .rh-slides-wrap { --a: 2; }
.rh-nav:nth-of-type(4):checked ~ .rh-slides-wrap { --a: 3; }
.rh-nav:nth-of-type(5):checked ~ .rh-slides-wrap { --a: 4; }
.rh-nav:nth-of-type(6):checked ~ .rh-slides-wrap { --a: 5; }

/* Flèches */
.rh-arrow {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(40, 40, 40, 0.55);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  z-index: 2;
}
.rh-arrow:hover { background: rgba(40, 40, 40, 0.75); }
.rh-arrow--prev { left: 30px; }
.rh-arrow--next { right: 30px; }

.rh-arrow::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}
.rh-arrow--prev::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}
.rh-arrow--next::before {
  transform: rotate(45deg);
  margin-right: 4px;
}

.rh-nav:nth-of-type(1):checked ~ .rh-arrow--next[data-n="2"],
.rh-nav:nth-of-type(2):checked ~ .rh-arrow--next[data-n="3"],
.rh-nav:nth-of-type(3):checked ~ .rh-arrow--next[data-n="4"],
.rh-nav:nth-of-type(4):checked ~ .rh-arrow--next[data-n="5"],
.rh-nav:nth-of-type(5):checked ~ .rh-arrow--next[data-n="6"] {
  display: flex;
}

.rh-nav:nth-of-type(2):checked ~ .rh-arrow--prev[data-n="1"],
.rh-nav:nth-of-type(3):checked ~ .rh-arrow--prev[data-n="2"],
.rh-nav:nth-of-type(4):checked ~ .rh-arrow--prev[data-n="3"],
.rh-nav:nth-of-type(5):checked ~ .rh-arrow--prev[data-n="4"],
.rh-nav:nth-of-type(6):checked ~ .rh-arrow--prev[data-n="5"] {
  display: flex;
}

.rh-dots {
  position: absolute;
  bottom: -28px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.rh-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.rh-nav:nth-of-type(1):checked ~ .rh-dots .rh-dot:nth-of-type(1),
.rh-nav:nth-of-type(2):checked ~ .rh-dots .rh-dot:nth-of-type(2),
.rh-nav:nth-of-type(3):checked ~ .rh-dots .rh-dot:nth-of-type(3),
.rh-nav:nth-of-type(4):checked ~ .rh-dots .rh-dot:nth-of-type(4),
.rh-nav:nth-of-type(5):checked ~ .rh-dots .rh-dot:nth-of-type(5),
.rh-nav:nth-of-type(6):checked ~ .rh-dots .rh-dot:nth-of-type(6) {
  background: #fff;
}