/* 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: 90vw;
  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;
  }
}

.rh-modal,
.rh-modal > .rh-modal__overlay,
.rh-modal .rh-modal__box {
  cursor: default;
}

/* ============================================
		MINI-CARROUSEL CSS PUR
   ============================================ */

.rh-nav {
  display: none;
}

.rh-slides-wrap {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
  --a: 0;
}

.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;
}

/* --- SLIDER PROJECT : modal plein écran (réutilise le système du GRID) --- */
/* --- mini-carrousel --- */
.project-single {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: block;
}

.project-single img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  display: block;
  background: #000;
}

.project-more-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.project-more-badge::before {
  content: "⤢";
  font-size: 1rem;
}

/* --- Grand carrousel de projets --- */
.proj-carousel {
  position: relative;
  margin: 10px 0;
}

.proj-inner {
  position: relative;
  width: 100%;
}

.proj-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.proj-open:checked + .proj-item {
  position: static;
  opacity: 1;
  pointer-events: auto;
}

.proj-carousel-header {
  margin-bottom: 12px;
}

.proj-pager {
  /*margin-bottom: 12px;*/
}

.proj-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 6px;
}
.proj-label::before,
.proj-label::after {
  content: "★";
  color: #e5484d;
}
.proj-count {
  font-size: 1.1rem;
  font-weight: bold;
  color: #999;
  flex-shrink: 0;
}
.proj-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0;
}
.proj-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.proj-footer-info {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.proj-arrows-group {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.proj-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #e5484d;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  font-size: 1.2rem;
}
.proj-arrow--disabled {
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.4);
  cursor: default;
}