/* IvoireSogo : mise en page propre à chaque page */

/* Accueil : bandeau d'introduction */
.hero {
  padding-block: 2.25rem 2.5rem;
  color: #fff;
  background-color: var(--palm);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 14px, transparent 14px 28px);
}
.hero__title { color: #fff; max-width: 20ch; margin-bottom: 0.75rem; }
.hero__lead { max-width: 38rem; margin-bottom: 1.5rem; color: #d9e8de; font-size: 1.05rem; }
.hero__panel {
  padding: 1rem;
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--radius-lg);
}

/* Pages de liste : bandeau de recherche */
.page-head {
  padding-block: 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 1rem; }

/* Comment ça marche : vraie séquence, donc numérotée */
.steps {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
.steps li {
  position: relative;
  padding: 0 0 0 3.2rem;
  counter-increment: etape;
}
.steps li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  background: var(--palm);
  border-radius: 50%;
}
.steps h3 { margin-bottom: 0.2rem; }
.steps p { margin: 0; color: var(--slate); }

/* Fiche animal */
.animal-layout { display: grid; gap: 1.5rem; }
.galerie__main {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--palm-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.galerie__main img { width: 100%; height: 100%; object-fit: cover; }
.galerie__thumbs {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 0;
  padding: 0 0 0.25rem;
  list-style: none;
  overflow-x: auto;
}
.galerie__thumb {
  display: block;
  width: 76px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: none;
  border: 2px solid transparent;
  border-radius: 6px;
}
.galerie__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.galerie__thumb.is-active { border-color: var(--palm); }

.animal-head { margin-bottom: 1rem; }
.animal-head h1 { margin: 0.4rem 0 0.1rem; }
.animal-head__ref { margin: 0; color: var(--slate); }
.badge--inline { position: static; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
.fact {
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fact dt { margin: 0 0 0.15rem; font-size: 0.85rem; color: var(--slate); }
.fact dd { margin: 0; font-weight: 700; }
.fact--price { grid-column: 1 / -1; background: var(--palm); border-color: var(--palm); }
.fact--price dt { color: #cfe3d5; }
.fact--price dd {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}
.animal-desc { margin-bottom: 1.25rem; max-width: 60ch; }

.ferme-box {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ferme-box__title { margin-bottom: 0.3rem; font-size: 0.95rem; font-weight: 600; color: var(--slate); }
.ferme-box__name { margin-bottom: 0.4rem; font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.ferme-box__note { color: var(--slate); }
.contact { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.contact .btn { flex: 1 1 9rem; }

.localisation { margin-top: 0.75rem; display: grid; gap: 0.75rem; }
.localisation__lieu { display: flex; gap: 0.45rem; margin: 0; font-weight: 600; }
.localisation__lieu .icon { margin-top: 0.15rem; color: var(--palm); }
.localisation__map {
  width: 100%;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.localisation__note { margin: 0; color: var(--slate); font-size: 0.95rem; }

/* Fiche ferme */
.ferme-layout { display: grid; gap: 1.25rem; }
.ferme-layout .localisation { margin-top: 0; }

/* Suivi : carnet de bord (frise verticale, dates et pesées) */
.timeline {
  margin: 0 0 0 0.5rem;
  padding: 0;
  list-style: none;
  border-left: 2px solid #a9bdb0;
}
.timeline__item { position: relative; padding: 0 0 1.6rem 1.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  background: var(--surface);
  border: 3px solid var(--palm);
  border-radius: 50%;
}
.timeline__item--pesee::before { border-color: var(--kola); }
.timeline__item--soin::before { border-color: #3a7d99; }
.timeline__item--vente::before,
.timeline__item--mise_en_vente::before { background: var(--palm); }
.timeline__date { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--slate); }
.timeline__title { margin: 0 0 0.3rem; font-size: 1.1rem; }
.timeline__note { margin: 0.3rem 0 0; max-width: 55ch; }

.poids { display: flex; align-items: center; gap: 0.75rem; max-width: 26rem; }
.poids__valeur { flex: none; min-width: 5.5rem; font-weight: 800; color: var(--palm); }
.poids__bar {
  flex: 1;
  height: 10px;
  overflow: hidden;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #b9cabd;
}
.poids__bar span { display: block; height: 100%; background: var(--palm); border-radius: 999px; }

@media (min-width: 640px) {
  .hero { padding-block: 3rem 3.5rem; }
  .hero__panel { padding: 1.25rem; }
  .search-form { grid-template-columns: repeat(2, 1fr); }
  .search-form .field--wide,
  .search-form__footer { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .contact .btn { flex: 0 1 auto; }
}

@media (min-width: 900px) {
  .search-form { grid-template-columns: 2fr 1fr 1fr; }
  .search-form--simple { grid-template-columns: 2fr 1fr; }
  .animal-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
  }
  .animal-layout__media { position: sticky; top: 5rem; }
  .ferme-layout { grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
  .hero__title { max-width: 22ch; }
}
