/**
 * ARINWA — Améliorations visuelles (hero, galerie responsive)
 */

:root {
  --arinwa-red: #B91C1C;
  --arinwa-green: #15803D;
  --arinwa-gold: #d97706;
  --arinwa-surface: #f8fafc;
  --arinwa-card-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* ── Hero / Carousel ── */
.hero .carousel {
  min-height: clamp(320px, 72vh, 880px);
  max-height: 92vh;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  image-rendering: auto;
  filter: none;
}

.hero .carousel-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.hero .carousel-container {
  z-index: 3;
}

.hero .caption-title {
  font-size: clamp(1.35rem, 3.5vw, 2.75rem);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero .caption-text {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.95;
}

@media (max-width: 767.98px) {
  .hero .carousel {
    min-height: clamp(260px, 52vh, 480px);
  }

  .hero .carousel-control-prev,
  .hero .carousel-control-next {
    width: 36px;
    height: 36px;
  }

  .hero .carousel-container {
    padding: 0 1rem 2.5rem;
  }
}

/* ── Section Galerie ── */
#portfolio.portfolio {
  background: linear-gradient(180deg, #ffffff 0%, var(--arinwa-surface) 100%);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.gallery-panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--arinwa-card-shadow);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.gallery-filters-wrap {
  margin-bottom: 1.75rem;
}

.gallery-filter-group {
  margin-bottom: 1rem;
}

.gallery-filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.65rem;
}

.gallery-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-filter-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  line-height: 1.2;
}

.gallery-filter-btn:hover {
  border-color: var(--arinwa-red);
  color: var(--arinwa-red);
}

.gallery-filter-btn.is-active {
  background: var(--arinwa-red);
  border-color: var(--arinwa-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.28);
}

.gallery-filter-btn.year-btn.is-active {
  background: var(--arinwa-green);
  border-color: var(--arinwa-green);
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.28);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 575.98px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .gallery-filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
  }
}

.gallery-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.35s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

@media (max-width: 575.98px) {
  .gallery-card-media {
    aspect-ratio: 16 / 10;
  }
}

.gallery-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-card:hover .gallery-card-media img {
  transform: scale(1.04);
}

.gallery-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 2;
}

.gallery-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  backdrop-filter: blur(4px);
}

.gallery-badge.category {
  background: rgba(185, 28, 28, 0.88);
}

.gallery-badge.year {
  background: rgba(21, 128, 61, 0.88);
  margin-left: auto;
}

.gallery-card-body {
  padding: 1rem 1.1rem 1.15rem;
}

.gallery-card-body h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #0f172a;
  line-height: 1.35;
}

.gallery-card-body p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-actions {
  margin-top: 0.85rem;
}

.gallery-card-actions .preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--arinwa-red);
  text-decoration: none;
}

.gallery-card-actions .preview-link:hover {
  color: #991b1b;
}

.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.gallery-panel > .gallery-empty-state[data-gallery-empty-filter] {
  margin-top: 0.5rem;
}

.gallery-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
  color: #cbd5e1;
}

/* Services — cartes plus modernes */
#services .service-item {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#services .service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

#services .service-item .icon {
  color: var(--arinwa-red);
  font-size: 2rem;
}

/* Section titre */
.section-title h2 {
  color: var(--arinwa-red);
  font-weight: 800;
}

.section-title p {
  color: #475569;
  font-size: 1.05rem;
}
