/* ==========================================================================
   ECO CASA CONCEPT — product.css
   Styles partagés pour les fiches produit tiny house
   ========================================================================== */

/* --- Breadcrumb ---------------------------------------------------------- */

.breadcrumb {
  padding: calc(clamp(14px, 2vw, 22px) + 80px) 0 clamp(20px, 3vw, 32px);
  font-size: 1rem;
  color: var(--ink-soft);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.breadcrumb li + li::before {
  content: "›";
  color: var(--bark);
  margin-right: 4px;
  font-size: 1.1em;
}
.breadcrumb a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb a:hover { color: var(--forest); }
.breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* --- Product hero -------------------------------------------------------- */

.product-hero {
  padding: calc(clamp(14px, 2vw, 22px) + 100px) 0 clamp(60px, 8vw, 100px);
  background: var(--paper);
}

.p-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* Galerie */

.p-gallery {
  position: sticky;
  top: calc(clamp(14px, 2vw, 22px) + 88px);
}
.p-gallery-main {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--cream-deep);
  position: relative;
}
.p-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.22,1,.36,1);
}
.p-gallery-main:hover img { transform: scale(1.03); }

.p-gallery-badge {
  position: absolute;
  top: 20px; left: 20px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: oklch(96.5% 0.014 85 / .95);
  color: var(--forest);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.p-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.p-thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: var(--cream-deep);
  cursor: pointer;
  transition: border-color .3s, transform .3s cubic-bezier(.22,1,.36,1);
}
.p-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.p-thumb:hover { transform: translateY(-2px); }
.p-thumb.is-active { border-color: var(--forest); }

/* Infos */

.p-info { padding-top: 4px; }
.p-eyebrow {
  font-family: var(--sans);
  font-style: italic;
  color: var(--bark);
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.p-info h1 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.p-tagline {
  font-size: clamp(1.2rem, 1.6vw, 1.35rem);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 46ch;
}

.p-specs {
  margin: clamp(32px, 4vw, 44px) 0 clamp(28px, 3.5vw, 36px);
  padding: clamp(22px, 2.6vw, 28px);
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(18px, 2.4vw, 26px) clamp(14px, 2vw, 24px);
}
.p-specs li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 12px;
  align-items: center;
}
.p-specs svg {
  grid-area: icon;
  width: 26px; height: 26px;
  color: var(--moss-ink, var(--forest));
  align-self: start;
  margin-top: 2px;
}
.p-specs span {
  grid-area: label;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.p-specs strong {
  grid-area: value;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1.2;
}

.p-price {
  margin: clamp(20px, 3vw, 28px) 0 clamp(16px, 2vw, 22px);
  padding: clamp(18px, 2.4vw, 24px) clamp(20px, 2.6vw, 28px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.p-price-label {
  font-family: var(--sans);
  font-style: italic;
  color: var(--bark);
  font-size: 1rem;
}
.p-price-amount {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--forest);
  line-height: 1;
  letter-spacing: -0.01em;
}

.p-cta { margin-top: 12px; }
.p-cta .btn { width: 100%; justify-content: center; }
.p-reassure {
  margin-top: 12px;
  font-size: 1rem;
  color: var(--ink-soft);
  text-align: center;
}

/* --- Section head partagé ------------------------------------------------ */

.p-section-head {
  max-width: 780px;
  margin: 0 auto clamp(40px, 5vw, 56px);
  text-align: center;
}
.p-kicker {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  margin-bottom: 20px;
}
.p-kicker.on-dark {
  color: oklch(85% 0.06 130);
  background: oklch(20% 0.045 155 / .4);
  border-color: oklch(94% 0.015 90 / .2);
}
.p-section-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  letter-spacing: -0.01em;
}
.p-lead {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1.65;
}
.p-lead.on-dark { color: oklch(88% 0.025 110); }

/* --- Intro éditoriale --------------------------------------------------- */

.p-intro {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--cream-deep);
}
.p-intro-inner { max-width: 900px; margin-inline: auto; text-align: center; }
.p-intro-inner .p-kicker { margin-bottom: 24px; }
.p-intro-inner h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin-inline: auto;
}
.p-intro-cols {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px 48px;
  text-align: left;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1.7;
}
.p-intro-cols em { font-style: italic; color: var(--ink); }

/* --- Features / équipements --------------------------------------------- */

.p-features {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--paper);
}
.p-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
}
.p-feature {
  padding: clamp(24px, 2.8vw, 32px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .4s cubic-bezier(.22,1,.36,1), border-color .3s;
}
.p-feature:hover {
  transform: translateY(-3px);
  border-color: oklch(70% 0.05 130);
}
.p-feature h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.p-feature ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.p-feature li {
  padding-left: 24px;
  position: relative;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.p-feature li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}

/* --- Niveaux de finition ------------------------------------------------ */

.p-finish {
  background: var(--forest);
  color: var(--paper-on-dark);
  padding-block: clamp(80px, 11vw, 140px);
  position: relative;
  overflow: hidden;
}
.p-finish::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 90% 0%, oklch(38% 0.06 155 / .5), transparent 60%),
    radial-gradient(ellipse at 0% 100%, oklch(26% 0.05 155 / .8), transparent 60%);
  pointer-events: none;
}
.p-finish > .container { position: relative; z-index: 1; }

.p-finish h2 { color: var(--paper-on-dark); }

.p-finish-list {
  max-width: 820px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid oklch(94% 0.015 90 / .18);
}
.p-finish-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: clamp(24px, 3vw, 32px) clamp(16px, 2vw, 24px);
  border-bottom: 1px solid oklch(94% 0.015 90 / .18);
  align-items: start;
}
.p-finish-num {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  color: oklch(85% 0.06 130);
  min-width: 44px;
}
.p-finish-list h3 {
  font-size: 1.5rem;
  color: var(--paper-on-dark);
  margin-bottom: 8px;
}
.p-finish-list p {
  color: oklch(82% 0.025 120);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 58ch;
}
.p-finish-note {
  margin: 40px auto 0;
  max-width: 60ch;
  text-align: center;
  color: oklch(78% 0.03 120);
  font-size: 1.05rem;
  font-style: italic;
}

/* --- Finitions disponibles (section détaillée après hero) --------------- */

.p-finitions-detailed {
  background: var(--cream-deep);
  padding-block: clamp(72px, 10vw, 130px);
}
.p-finitions-detailed .p-section-head {
  margin-bottom: clamp(40px, 5vw, 56px);
}
.p-finitions-detailed h2 { color: var(--ink); }
.p-finitions-detailed .p-lead { color: var(--ink-soft); }

.p-finitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
  align-items: stretch;
}

.p-finitions-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 32px);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .4s cubic-bezier(.22,1,.36,1), border-color .3s, box-shadow .5s cubic-bezier(.22,1,.36,1);
  position: relative;
}
.p-finitions-card:hover {
  transform: translateY(-4px);
  border-color: oklch(70% 0.05 130);
  box-shadow: 0 20px 40px -24px oklch(20% 0.04 100 / .3);
}
.p-finitions-card--featured {
  border-color: var(--forest);
  border-width: 2px;
  padding-top: clamp(46px, 5vw, 56px);
}

.p-finitions-badge {
  position: absolute;
  top: 16px; right: 20px;
  padding: 6px 14px;
  background: var(--forest);
  color: var(--paper-on-dark);
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.p-finitions-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 10px;
}
.p-finitions-tag {
  font-family: var(--sans);
  font-style: italic;
  color: var(--bark);
  font-size: 1rem;
  margin-bottom: 8px;
}
.p-finitions-card h3 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.p-finitions-card > p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
}
.p-finitions-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.p-finitions-list li {
  padding-left: 22px;
  position: relative;
  font-size: .98rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.p-finitions-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}
.p-finitions-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: transparent;
  color: var(--forest);
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s, color .25s;
  align-self: flex-start;
}
.p-finitions-cta:hover {
  background: var(--forest);
  color: var(--paper-on-dark);
}
.p-finitions-cta svg { width: 18px; height: 18px; transition: transform .3s cubic-bezier(.22,1,.36,1); }
.p-finitions-cta:hover svg { transform: translateX(4px); }

.p-finitions-card--featured .p-finitions-cta {
  background: var(--forest);
  color: var(--paper-on-dark);
}
.p-finitions-card--featured .p-finitions-cta:hover {
  background: var(--forest-deep);
}

/* --- Usages / cas d'usage ---------------------------------------------- */

.p-uses {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--paper);
}
.p-uses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 2.4vw, 28px);
}
.p-use {
  padding: clamp(28px, 3vw, 36px);
  background: var(--cream-deep);
  border-radius: var(--radius);
  position: relative;
}
.p-use::before {
  content: "";
  position: absolute;
  top: 22px; left: 24px;
  width: 24px; height: 3px;
  background: var(--forest);
  border-radius: 2px;
}
.p-use h3 {
  margin-top: 12px;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.p-use p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* --- Réglementation ---------------------------------------------------- */

.p-legal {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--cream-deep);
}
.p-legal-inner {
  max-width: 1000px;
  margin-inline: auto;
}
.p-legal-inner > .p-kicker { display: inline-block; margin-bottom: 20px; }
.p-legal-inner > h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: clamp(36px, 5vw, 52px);
}
.p-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.p-legal-item {
  padding: clamp(22px, 2.6vw, 28px);
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
}
.p-legal-item::before {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(clamp(22px, 2.6vw, 28px));
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: oklch(93% 0.045 140);
  display: block;
}
.p-legal-item::after {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(clamp(22px, 2.6vw, 28px) + 5px);
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: rotate(-45deg);
}
.p-legal-item h3 {
  font-size: 1.2rem;
  margin: 6px 0 10px 34px;
  color: var(--ink);
}
.p-legal-item p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}
.p-legal-item strong {
  color: var(--forest);
  font-weight: 600;
}

/* --- Autres modèles / cross-sell --------------------------------------- */

.p-related {
  padding-block: clamp(72px, 10vw, 130px);
  background: var(--paper);
}
.p-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}
.p-related-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s cubic-bezier(.22,1,.36,1), border-color .3s;
}
.p-related-card:hover {
  transform: translateY(-4px);
  border-color: oklch(70% 0.05 130);
  box-shadow: 0 20px 40px -24px oklch(20% 0.04 100 / .3);
}
.p-related-media { aspect-ratio: 3 / 2; overflow: hidden; }
.p-related-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.22,1,.36,1);
}
.p-related-card:hover .p-related-media img { transform: scale(1.04); }
.p-related-body {
  padding: clamp(22px, 2.6vw, 28px);
}
.p-related-eyebrow {
  font-family: var(--sans);
  font-style: italic;
  color: var(--bark);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.p-related-card h3 {
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.p-related-card p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 18px;
}
.p-related-link {
  font-weight: 600;
  color: var(--forest);
  border-bottom: 2px solid var(--moss);
  padding-bottom: 2px;
  transition: border-color .2s, color .2s;
}
.p-related-card:hover .p-related-link {
  color: var(--forest-deep);
  border-color: var(--forest-deep);
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 900px) {
  .p-hero-grid { grid-template-columns: 1fr; }
  .p-gallery { position: static; }
  .p-info h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .p-specs { grid-template-columns: 1fr 1fr; }
  .p-specs li { grid-template-columns: auto 1fr; }
}
@media (max-width: 520px) {
  .p-specs { grid-template-columns: 1fr; }
  .p-gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}
