/**
 * Pages institutionnelles — À propos, Engagements, Distributeurs
 * Style éditorial botanique Racine Vita
 */

/* —— Base —— */
body.page-about,
body.page-commitments,
body.page-distributors {
  background: var(--off-white);
}

/* —— En-tête de page (sans hero) —— */
.inst-pagehead {
  padding: max(100px, calc(80px + env(safe-area-inset-top, 0px))) 0 28px;
  background:
    linear-gradient(165deg, rgba(228, 245, 220, 0.65) 0%, var(--off-white) 70%);
  border-bottom: 1px solid rgba(114, 192, 64, 0.12);
}

.inst-pagehead__title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-dark);
}

.inst-pagehead__lead {
  margin: 0;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-medium);
}

.inst-pagehead__cta {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.inst-pagehead__cta:hover {
  background: var(--primary-dark);
  color: #fff;
}

.inst-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.inst-breadcrumb a {
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

.inst-breadcrumb a:hover {
  color: var(--primary-dark);
}

.inst-breadcrumb i {
  font-size: 9px;
  opacity: 0.7;
}

body.page-about .header,
body.page-commitments .header,
body.page-distributors .header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(114, 192, 64, 0.12);
}

[data-theme="dark"] body.page-about .header,
[data-theme="dark"] body.page-commitments .header,
[data-theme="dark"] body.page-distributors .header {
  background: rgba(20, 26, 20, 0.94);
  border-bottom-color: var(--border-light);
}

[data-theme="dark"] .inst-pagehead {
  background: linear-gradient(165deg, rgba(30, 42, 30, 0.95) 0%, var(--off-white) 75%);
  border-bottom-color: var(--border-light);
}

/* —— Sections —— */
.inst-section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.inst-section--mint {
  background: linear-gradient(180deg, rgba(228, 245, 220, 0.55) 0%, var(--off-white) 100%);
}

.inst-section--soft {
  background: var(--white);
}

.inst-section__head {
  max-width: 640px;
  margin: 0 auto clamp(36px, 5vw, 52px);
  text-align: center;
}

.inst-section__head--left {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.inst-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.inst-section__title {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-dark);
  letter-spacing: -0.015em;
}

.inst-section__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-medium);
  font-weight: 400;
}

/* —— Split story —— */
.inst-split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}

.inst-split--reverse .inst-split__media {
  order: 2;
}

.inst-split--reverse .inst-split__body {
  order: 1;
}

.inst-split__media {
  position: relative;
  overflow: hidden;
  border-radius: 4px 20px 4px 20px;
  background: var(--soft-mint);
}

.inst-split__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.inst-split__body h2,
.inst-split__body .inst-section__title {
  margin-bottom: 16px;
}

.inst-split__body p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-medium);
}

.inst-split__body p:last-child {
  margin-bottom: 0;
}

.inst-split__body strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* —— Mission / Vision —— */
.inst-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
}

.inst-duo__item {
  padding: 8px 0 8px 22px;
  border-left: 3px solid var(--primary);
}

.inst-duo__item h2,
.inst-duo__item h3 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.inst-duo__item p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-medium);
}

.inst-duo__item p:last-child {
  margin-bottom: 0;
}

/* —— Values —— */
.inst-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
}

.inst-value {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.inst-value__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(114, 192, 64, 0.12);
  color: var(--primary-dark);
  font-size: 16px;
}

.inst-value h3,
.inst-value h4 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
}

.inst-value p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-medium);
}

/* —— Metrics —— */
.inst-metrics {
  padding: clamp(40px, 6vw, 64px) 0;
  background:
    linear-gradient(135deg, #4a8f28 0%, var(--primary) 45%, var(--primary-dark) 100%);
  color: #fff;
}

.inst-metrics .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px;
}

.inst-metric {
  text-align: center;
  padding: 8px 12px;
}

.inst-metric__value {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
}

.inst-metric__label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.88);
}

/* —— Engagements alternating —— */
.inst-pledge {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.inst-pledge:last-child {
  margin-bottom: 0;
}

.inst-pledge:nth-child(even) .inst-pledge__media {
  order: 2;
}

.inst-pledge:nth-child(even) .inst-pledge__body {
  order: 1;
}

.inst-pledge__media {
  overflow: hidden;
  border-radius: 4px 18px 4px 18px;
  background: var(--soft-mint);
}

.inst-pledge__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.inst-pledge__body h2 {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

.inst-pledge__body p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-medium);
}

.inst-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inst-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

.inst-list li i {
  margin-top: 3px;
  color: var(--primary);
  font-size: 12px;
  flex-shrink: 0;
}

/* —— Certifications row —— */
.inst-certs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 28px;
  padding-top: 8px;
}

.inst-cert {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
}

.inst-cert__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(114, 192, 64, 0.14);
  color: var(--primary-dark);
  font-size: 15px;
}

.inst-cert h3,
.inst-cert h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
}

.inst-cert p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-medium);
}

/* —— Guarantee CTA —— */
.inst-guarantee {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.inst-guarantee p {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-medium);
}

.inst-guarantee .btn {
  display: inline-flex;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.inst-guarantee .btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* —— Distributor perks —— */
.inst-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-top: 28px;
}

.inst-perk {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.inst-perk__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(114, 192, 64, 0.12);
  color: var(--primary-dark);
  font-size: 14px;
}

.inst-perk span {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.inst-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 24px;
}

.inst-why__item h3,
.inst-why__item h4 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-dark);
}

.inst-why__item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-medium);
}

.inst-why__num {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}

/* —— Form —— */
.inst-form-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 40px);
  background: var(--white);
  border: 1px solid rgba(114, 192, 64, 0.18);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(30, 58, 30, 0.06);
}

.inst-form-wrap .contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.inst-form-wrap .form-group {
  margin-bottom: 16px;
}

.inst-form-wrap .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-medium);
}

.inst-form-wrap .form-group input,
.inst-form-wrap .form-group select,
.inst-form-wrap .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(114, 192, 64, 0.22);
  border-radius: 12px;
  background: rgba(250, 253, 251, 0.9);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inst-form-wrap .form-group input:focus,
.inst-form-wrap .form-group select:focus,
.inst-form-wrap .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(114, 192, 64, 0.15);
}

.inst-form-wrap .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-medium);
  cursor: pointer;
}

.inst-form-wrap .checkbox-label input {
  width: auto;
  margin-top: 3px;
}

.inst-form-wrap .btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.inst-form-wrap .btn-primary:hover {
  background: var(--primary-dark);
}

/* —— Contact commercial —— */
.inst-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 720px;
  margin: 0 auto;
}

.inst-contact-item {
  padding-left: 18px;
  border-left: 3px solid var(--primary);
}

.inst-contact-item h3 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.inst-contact-item p {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-medium);
}

.inst-contact-item a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.inst-contact-item a:hover {
  text-decoration: underline;
}

/* —— Motion —— */
@keyframes inst-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inst-pagehead {
  animation: inst-fade-up 0.55s ease both;
}

.inst-split__media,
.inst-pledge__media {
  transition: transform 0.45s ease;
}

.inst-split__media:hover img,
.inst-pledge__media:hover img {
  transform: scale(1.03);
}

.inst-split__media img,
.inst-pledge__media img {
  transition: transform 0.6s ease;
}

.inst-value,
.inst-cert,
.inst-why__item,
.inst-metric {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* —— Dark mode —— */
[data-theme="dark"] body.page-about,
[data-theme="dark"] body.page-commitments,
[data-theme="dark"] body.page-distributors {
  background: var(--off-white);
}

[data-theme="dark"] .inst-section--soft {
  background: var(--surface-elevated);
}

[data-theme="dark"] .inst-section--mint {
  background: linear-gradient(180deg, rgba(30, 42, 30, 0.9) 0%, var(--off-white) 100%);
}

[data-theme="dark"] .inst-form-wrap {
  background: var(--surface-elevated);
  border-color: var(--border-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .inst-form-wrap .form-group input,
[data-theme="dark"] .inst-form-wrap .form-group select,
[data-theme="dark"] .inst-form-wrap .form-group textarea {
  background: var(--surface);
  border-color: var(--border-light);
  color: var(--text-dark);
}

[data-theme="dark"] .inst-value__icon,
[data-theme="dark"] .inst-cert__icon,
[data-theme="dark"] .inst-perk__icon {
  background: rgba(114, 192, 64, 0.18);
  color: var(--primary-light);
}

[data-theme="dark"] .inst-section__title,
[data-theme="dark"] .inst-duo__item h2,
[data-theme="dark"] .inst-duo__item h3,
[data-theme="dark"] .inst-value h3,
[data-theme="dark"] .inst-cert h3,
[data-theme="dark"] .inst-why__item h3,
[data-theme="dark"] .inst-pledge__body h2,
[data-theme="dark"] .inst-contact-item h3 {
  color: var(--text-dark);
}

[data-theme="dark"] .inst-section__desc,
[data-theme="dark"] .inst-split__body p,
[data-theme="dark"] .inst-duo__item p,
[data-theme="dark"] .inst-value p,
[data-theme="dark"] .inst-cert p,
[data-theme="dark"] .inst-pledge__body p,
[data-theme="dark"] .inst-guarantee p,
[data-theme="dark"] .inst-why__item p {
  color: var(--text-medium);
}

[data-theme="dark"] .inst-list li {
  color: var(--text-dark);
}

/* —— Responsive —— */
@media (max-width: 992px) {
  .inst-pagehead {
    padding-top: max(92px, calc(72px + env(safe-area-inset-top, 0px)));
    padding-bottom: 24px;
  }

  .inst-split,
  .inst-split--reverse,
  .inst-pledge,
  .inst-pledge:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .inst-split--reverse .inst-split__media,
  .inst-split--reverse .inst-split__body,
  .inst-pledge:nth-child(even) .inst-pledge__media,
  .inst-pledge:nth-child(even) .inst-pledge__body {
    order: unset;
  }

  .inst-duo,
  .inst-values,
  .inst-certs,
  .inst-why,
  .inst-metrics .container {
    grid-template-columns: 1fr 1fr;
  }

  .inst-perks {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .inst-pagehead {
    padding-top: max(88px, calc(68px + env(safe-area-inset-top, 0px)));
    padding-bottom: 20px;
  }

  .inst-duo,
  .inst-values,
  .inst-certs,
  .inst-why,
  .inst-perks,
  .inst-metrics .container,
  .inst-contact-row,
  .inst-form-wrap .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .inst-metrics .container {
    gap: 28px 16px;
  }

  .inst-form-wrap {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .inst-pledge {
    margin-bottom: 48px;
  }

  .inst-section {
    padding: clamp(44px, 10vw, 64px) 0;
  }
}
