/* ============================================
   FERME ARC-EN-CIEL — Design System & Styles
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Color palette */
  --color-primary: #422006;
  --color-hero-bg: #3a5a2c;
  --color-hero-overlay: rgba(30, 60, 20, 0.55);

  --color-programme-text: #422006;
  --color-programme-bg: #fef9c3;

  --color-aventure-bg: #ffeaa7;
  --color-aventure-accent: #e6c85a;

  --color-explo-bg: #ffdfa3;
  --color-explo-accent: #e0b56a;

  --color-ferme-text: #500724;
  --color-ferme-bg: #fdf2f8;
  --color-ferme-header: rgba(80, 7, 36, 0.19);
  --color-ferme-stripe: rgba(80, 7, 36, 0.05);

  --color-contact-text: #042f2e;
  --color-contact-bg: #f0fdfa;

  --color-footer-text: #264e00;
  --color-footer-bg: #cdebb0;
  --color-footer-border: #264e00;

  --color-header-bg: rgba(255, 255, 255, 0.34);

  /* Typography */
  --font-body: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-cursive: 'Dancing Script', cursive;
  --font-heading: 'Syne', sans-serif;

  /* Layout */
  --max-width: 85rem;
  --blur: 8px;
  --shadow: 3px 6px rgba(0, 0, 0, 0.15);
  --radius: 1rem;
  --radius-sm: 0.5rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: url('cursor.svg'), auto;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: #1a1a1a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  cursor: url('link.svg'), auto;
}

a:hover {
  opacity: 0.8;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  background-color: transparent;
  backdrop-filter: none;
  transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

.site-header.scrolled {
  background-color: var(--color-header-bg);
  backdrop-filter: blur(var(--blur));
  border-bottom: 2px solid var(--color-primary);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header__logo {
  font-family: var(--font-cursive);
  font-size: 2rem;
  font-weight: 700;
  padding: 0.6rem 0;
  white-space: nowrap;
}

.site-header__logo:hover {
  opacity: 1;
}

/* Mobile hamburger (CSS-only) */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: block;
  cursor: url('link.svg'), auto;
  padding: 1.8rem 0.5rem;
}

.nav-toggle-label .navicon,
.nav-toggle-label .navicon::before,
.nav-toggle-label .navicon::after {
  cursor: url('link.svg'), auto;
}

.nav-toggle-label .navicon {
  background: #1a1a1a;
  display: block;
  height: 3px;
  width: 23px;
  position: relative;
  transition: background var(--transition-fast);
}

.nav-toggle-label .navicon::before,
.nav-toggle-label .navicon::after {
  background: #1a1a1a;
  content: '';
  display: block;
  height: 100%;
  width: 100%;
  position: absolute;
  transition: all var(--transition-fast);
}

.nav-toggle-label .navicon::before {
  top: 7px;
}

.nav-toggle-label .navicon::after {
  top: -7px;
}

/* Menu open state */
.nav-toggle:checked ~ .main-nav {
  max-height: 16rem;
}

.nav-toggle:checked ~ .nav-toggle-label .navicon {
  background: transparent;
}

.nav-toggle:checked ~ .nav-toggle-label .navicon::before {
  transform: rotate(-45deg);
  top: 0;
}

.nav-toggle:checked ~ .nav-toggle-label .navicon::after {
  transform: rotate(45deg);
  top: 0;
}

.main-nav {
  clear: both;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-fast);
  width: 100%;
}

.main-nav__list {
  padding-bottom: 0.5rem;
}

.main-nav__link {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 1.15rem;
  font-weight: 500;
  position: relative;
}

.main-nav__link:hover {
  opacity: 1;
}

/* Desktop nav */
@media (min-width: 55em) {
  .site-header__inner {
    flex-wrap: nowrap;
    padding: 0 1.4rem;
  }

  .nav-toggle-label {
    display: none;
  }

  .main-nav {
    clear: none;
    max-height: none;
    width: auto;
    overflow: visible;
  }

  .main-nav__list {
    display: flex;
    gap: 0.2rem;
    padding-bottom: 0;
  }

  .main-nav__list li {
    padding: 1.5rem 0.7rem 1.3rem;
  }

  .main-nav__link {
    padding: 0;
    display: inline-block;
    font-size: 1.1rem;
    position: relative;
  }

  .main-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-in-out;
  }

  .main-nav__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .main-nav__link:hover {
    opacity: 1;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-hero-bg);
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.5) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 1;
}

.hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  color: #fff;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  animation: heroFadeIn 1.2s ease-out;
}

.hero__text {
  text-align: left;
}

.hero__title {
  font-family: var(--font-cursive);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  font-weight: 400;
  opacity: 0.9;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.2);
}

.hero__cta {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--color-primary);
  background-color: var(--color-programme-bg);
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.hero__cta:hover {
  opacity: 1;
  background-color: var(--color-aventure-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
  .hero__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
}

@media (min-width: 55em) {
  .hero__content {
    padding: 2.5rem 1.4rem;
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTIONS — Common
   ============================================ */
.section {
  padding: 3rem 0;
  scroll-margin-top: 3.5rem;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

/* ============================================
   PROGRAMME SECTION
   ============================================ */
.section--programme {
  background-color: var(--color-programme-bg);
  color: var(--color-programme-text);
  border-top: 2px solid var(--color-programme-text);
  border-bottom: 2px solid var(--color-programme-text);
}

.section--programme .section__title {
  text-align: center;
}

.programme-intro {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  opacity: 0.85;
}

/* --- Activity Group (Aventure Nature / Explorateurs) --- */
.activity-group {
  margin-bottom: 2.5rem;
}

.activity-group:last-child {
  margin-bottom: 0;
}

.activity-group__header {
  display: inline-block;
  border: 2px solid currentColor;
  border-bottom: none;
  margin: 1rem 1rem 0 1rem;
  padding: 1rem 1.8rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.activity-group--aventure .activity-group__header {
  background-color: var(--color-aventure-bg);
}

.activity-group--explo .activity-group__header {
  background-color: var(--color-explo-bg);
}

.activity-group__name {
  font-family: var(--font-cursive);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.activity-group__age {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

/* --- Activity Cards Grid --- */
.activity-cards {
  display: grid;
  grid-template-columns: 1fr;
  border: 2px solid var(--color-programme-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.activity-group--aventure .activity-cards {
  background-color: var(--color-aventure-bg);
}

.activity-group--explo .activity-cards {
  background-color: var(--color-explo-bg);
}

@media (min-width: 50rem) {
  .activity-cards--two {
    grid-template-columns: 1fr 1fr;
  }

  .activity-cards--three {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* --- Single Activity Card --- */
.activity-card {
  padding: 1.5rem 1.8rem;
  border-bottom: 2px solid var(--color-programme-text);
  transition: background-color var(--transition-fast);
}

.activity-card:last-child {
  border-bottom: none;
}

@media (min-width: 50rem) {
  .activity-card {
    border-bottom: none;
    border-right: 2px solid var(--color-programme-text);
  }

  .activity-card:last-child {
    border-right: none;
  }
}

.activity-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.activity-card__date {
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.3rem 0 0.6rem;
}

.activity-card__description {
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.activity-card__list {
  padding-left: 1.1rem;
  margin-bottom: 0.8rem;
}

.activity-card__list li {
  margin-bottom: 0.3rem;
  list-style: disc;
}

.activity-card__price {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px dashed currentColor;
}

.activity-card__price span {
  font-weight: 400;
  font-size: 0.95rem;
}

.activity-card__note {
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.8;
  margin-top: 0.3rem;
}

/* --- Image Placeholder for user photos --- */
.activity-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: rgba(0, 0, 0, 0.06);
  border: 2px dashed rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
}

.activity-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* ============================================
   INSCRIPTION / INFO BANNER
   ============================================ */
.section--inscription {
  background-color: var(--color-ferme-bg);
  color: var(--color-ferme-text);
  border-bottom: 2px solid var(--color-ferme-text);
}

.inscription-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 2px solid var(--color-ferme-text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

@media (min-width: 50rem) {
  .inscription-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-box {
  padding: 1.5rem 1.8rem;
}

.info-box + .info-box {
  border-top: 2px solid var(--color-ferme-text);
}

@media (min-width: 50rem) {
  .info-box + .info-box {
    border-top: none;
    border-left: 2px solid var(--color-ferme-text);
  }
}

.info-box__title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box__title svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.info-box ul {
  padding-left: 1.1rem;
}

.info-box li {
  margin-bottom: 0.3rem;
  list-style: disc;
}

/* ============================================
   FERME / PRODUCTS SECTION
   ============================================ */
.section--ferme {
  background-color: var(--color-ferme-bg);
  color: var(--color-ferme-text);
  border-bottom: 2px solid var(--color-ferme-text);
}

.ferme-intro {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-size: 1.05rem;
}

.products-table {
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 2px solid var(--color-ferme-text);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 40rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.products-table thead {
  background-color: var(--color-ferme-header);
}

.products-table th,
.products-table td {
  padding: 0.6rem 1rem;
  text-align: left;
}

.products-table th {
  font-weight: 700;
}

.products-table td {
  border-top: 1px solid rgba(80, 7, 36, 0.12);
}

.products-table tbody tr:nth-child(even) {
  background-color: var(--color-ferme-stripe);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.section--contact {
  background-color: var(--color-contact-bg);
  color: var(--color-contact-text);
  padding-bottom: 0;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 50rem) {
  .contact-info {
    flex-direction: row;
    justify-content: space-between;
  }
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.contact-link span {
  position: relative;
}

.contact-link span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-in-out;
}

.contact-link:hover {
  opacity: 1;
}

.contact-link:hover span::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

.map-embed {
  width: 100%;
  border: none;
  display: block;
  margin-top: 2rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  border-top: 2px solid var(--color-footer-border);
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--color-footer-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 600px) {
  .hero__image {
    object-position: 75% center;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 2rem 0;
  }

  .activity-card {
    padding: 1.2rem;
  }

  .contact-grid {
    flex-direction: column;
  }
}
