/* ============================================
   LE CAFARD â€” Components (App-Like)
   ============================================ */

/* â€”â€” TYPOGRAPHY â€”â€” */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-terracotta);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--text-primary);
  line-height: var(--lh-tight);
}

.section-subtitle {
  font-size: var(--fs-base);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-top: var(--space-sm);
}

/* â€”â€” BOUTONS â€”â€” */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ed {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
  text-transform: uppercase;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-ed:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

/* â€”â€” APP NAVIGATION (Bottom Tab Bar) â€”â€” */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 -10px 40px rgba(43, 27, 21, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-nav__list {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0 auto;
  padding: 12px 0;
  max-width: 500px;
  position: relative; /* For the pill to absolute position within */
}

/* â€”â€” Glassmorphism Pill â€”â€” */
.nav-pill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 85%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 100px;
  z-index: 0;
  transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: inset 0 2px 4px rgba(255,255,255,1), 0 4px 12px rgba(43,27,21,0.08);
  pointer-events: none;
}

.app-nav__item {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.app-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 8px 0;
}

.app-nav__link svg {
  width: 26px;
  height: 26px;
  transition: all 0.3s ease;
}

.app-nav__label {
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.app-nav__link.active {
  color: var(--text-primary);
  /* The pill moves behind it, no need to transform Y anymore unless preferred */
  transform: translateY(-2px);
}

.app-nav__link.active svg {
  stroke-width: 2;
}

@media (min-width: 900px) {
  .app-nav {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px; /* Force a fixed width so items split exactly 1/3 */
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 0 24px;
  }
  
  .app-nav__list {
    padding: 16px 12px;
    gap: 20px; /* Reduced gap since items will be wider */
  }
  
  .nav-pill {
    height: 100%;
  }

  .app-nav__link {
    flex-direction: row;
    gap: 10px;
    padding: 12px 24px;
  }
  
  .app-nav__label {
    font-size: 0.8rem;
  }
}

/* —— Collapsible Gallery —— */
.ed-gallery-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.ed-gallery-inner {
  overflow: hidden;
}

.ed-gallery-wrapper.is-open {
  grid-template-rows: 1fr;
}
