/*
 * Alpha 14 — lot correctif visuel et UX transversal.
 * Retours de recette du 9 juillet 2026 : accueil, Boîte à idées,
 * Nos accords et Donner mon avis. Aucune règle métier ni donnée distante.
 */

/* --------------------------------------------------------------------------
   Accueil — utiliser l’espace disponible et clarifier les actions
   -------------------------------------------------------------------------- */
.home-onboarding--compact {
  min-height: 270px;
  grid-template-columns: minmax(560px, 1fr) minmax(300px, 360px);
  gap: clamp(24px, 4vw, 68px);
  padding: 30px 38px;
}

.home-onboarding--compact__copy {
  width: 100%;
  max-width: none;
  justify-content: center;
  gap: 22px;
}

.home-onboarding--compact .home-brand-lockup,
.home-onboarding--compact .brand-lockup--home {
  width: 100%;
  max-width: none;
}

.home-onboarding--compact .brand-lockup--home .brand-lockup__copy {
  min-width: 0;
}

.home-onboarding--compact .home-how-button {
  width: min(760px, 100%);
  min-height: 82px;
  padding: 16px 19px;
  border-color: rgba(105, 201, 195, 0.52);
  box-shadow: 0 10px 26px rgba(64, 58, 92, 0.07);
}

.home-onboarding--compact .home-how-button:hover {
  transform: translateY(-3px);
  border-color: var(--eiv-turquoise);
  box-shadow: 0 16px 34px rgba(64, 58, 92, 0.12);
}

.home-onboarding--compact__visual {
  width: min(100%, 360px);
  height: 230px;
  justify-self: end;
}

.home-onboarding--expanded {
  padding: 34px 38px 32px;
}

.home-onboarding__hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
  gap: clamp(32px, 5vw, 78px);
  align-items: center;
}

.home-onboarding__hero > img {
  width: min(100%, 430px);
  height: 285px;
}

.home-onboarding__slogan {
  max-width: 980px;
  margin: 12px 0 20px !important;
  font-size: clamp(46px, 5vw, 72px) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em !important;
}

.home-onboarding__slogan span,
.home-onboarding__slogan em {
  display: block;
  font-style: normal;
}

.home-onboarding__slogan span {
  color: var(--eiv-plum);
}

.home-onboarding__slogan em {
  margin-top: 6px;
  color: var(--eiv-turquoise-deep);
}

.home-onboarding__lead {
  max-width: 940px !important;
  font-size: 16px !important;
  line-height: 1.68 !important;
}

/* CTA Boîte à idées dans une vraie zone blanche. */
.home-space-card {
  overflow: hidden;
  padding: 0;
  border-color: rgba(243, 164, 131, 0.48);
  background: #fff;
}

.home-space-card__content {
  padding: 14px 14px 12px;
  background: var(--eiv-cream);
}

.home-space-card__footer {
  padding: 13px 14px 14px;
  border-top: 1px solid var(--eiv-border);
  background: #fff;
}

.home-space-card__cta {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  border-radius: 17px;
}

.home-space-card__cta .icon {
  width: 20px;
  height: 20px;
}

/* CTA Suivi plus lisible que le simple lien texte. */
.home-program-cta,
.home-agreements-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(198, 75, 103, 0.28);
  border-radius: 14px;
  background: #fff;
  color: var(--eiv-raspberry);
  box-shadow: 0 7px 18px rgba(64, 58, 92, 0.055);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.home-program-cta .icon,
.home-agreements-cta .icon {
  width: 18px;
  height: 18px;
}

.home-program-cta b,
.home-agreements-cta b {
  font-size: 20px;
  line-height: 1;
}

.home-program-cta:hover,
.home-agreements-cta:hover {
  transform: translateY(-3px);
  border-color: var(--eiv-raspberry);
  background: var(--eiv-raspberry-pale);
  box-shadow: 0 13px 28px rgba(64, 58, 92, 0.12);
}

/* Les micro-chevrons deviennent des actions explicites. */
.agreement-highlight--reference > .home-card-action,
.program-card--reference .program-card__link {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(198, 75, 103, 0.22);
  border-radius: 11px;
  background: #fff;
  color: var(--eiv-raspberry);
  font-size: 10px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(64, 58, 92, 0.06);
}

.agreement-highlight--reference > .home-card-action b,
.program-card--reference .program-card__link b {
  font-size: 18px;
  line-height: 1;
}

.agreement-highlight--reference > .home-card-action:hover,
.program-card--reference .program-card__link:hover {
  border-color: var(--eiv-raspberry);
  background: var(--eiv-raspberry-pale);
  transform: translateY(-2px);
}

.agreement-highlight__description {
  margin-right: 112px;
}

.program-card__meta {
  margin-bottom: 35px;
}

/* --------------------------------------------------------------------------
   Nos accords — pictogrammes, contraste, catégories et sticky controls
   -------------------------------------------------------------------------- */
.agreements-result-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  border-width: 1px;
  box-shadow: 0 7px 20px rgba(64, 58, 92, 0.055);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.agreements-result-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: currentColor;
  opacity: 0.28;
}

.agreements-result-card:hover {
  transform: translateY(-5px) scale(1.008);
  border-color: rgba(64, 58, 92, 0.22);
  box-shadow: 0 18px 38px rgba(64, 58, 92, 0.14);
  filter: saturate(1.04);
}

.agreements-result-card--love {
  border-color: rgba(40, 127, 134, 0.22);
  background: #e5f7f5;
  color: var(--eiv-turquoise-deep);
}

.agreements-result-card--compromise {
  border-color: rgba(64, 58, 92, 0.18);
  background: #eee9f5;
  color: var(--eiv-plum);
}

.agreements-result-card--hesitation {
  border-color: rgba(123, 118, 140, 0.24);
  background: #fff7ef;
  color: var(--eiv-text-muted);
}

.agreements-result-card--rejected {
  border-color: #cfcbd4;
  background: #e9e8ec;
  color: #625c6b;
}

.agreements-result-card--hesitation .agreements-result-icon {
  color: var(--eiv-text-muted);
}

.agreements-result-card--compromise .agreements-result-icon__svg {
  width: 26px;
  height: 26px;
}

.agreements-result-icon {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(64, 58, 92, 0.07);
  box-shadow: 0 5px 14px rgba(64, 58, 92, 0.06);
}

.agreements-result-card__title {
  color: var(--eiv-plum);
  font-size: 1.05rem;
}

.agreements-result-card__description {
  color: #686277;
  font-size: 0.78rem;
  line-height: 1.48;
}

.agreements-sticky-controls,
.library-sticky-controls {
  position: sticky;
  top: calc(var(--header-height) + 7px);
  z-index: 45;
  grid-template-columns: minmax(280px, 1fr) auto;
  padding: 6px;
  border-color: rgba(105, 201, 195, 0.38);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(64, 58, 92, 0.13);
  backdrop-filter: blur(16px);
}

.agreements-sticky-controls .agreements-search input,
.library-sticky-controls .library-reference-search input {
  min-height: 44px;
}

.agreements-sticky-controls:focus-within,
.library-sticky-controls:focus-within {
  border-color: var(--eiv-turquoise);
  box-shadow: 0 0 0 3px rgba(105, 201, 195, 0.21), 0 15px 34px rgba(64, 58, 92, 0.14);
}

/* Catégories : quatre teintes de la charte, sans couleur parasite. */
.agreements-category-row button,
.library-category-chips button {
  border-color: rgba(64, 58, 92, 0.12);
  color: var(--eiv-plum);
  box-shadow: 0 4px 12px rgba(64, 58, 92, 0.035);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, filter 150ms ease;
}

.agreements-category-row button:hover,
.library-category-chips button:hover {
  transform: translateY(-2px);
  border-color: rgba(64, 58, 92, 0.28);
  box-shadow: 0 9px 18px rgba(64, 58, 92, 0.1);
  filter: saturate(1.06);
}

.category-tone--all { background: #fff; }
.category-tone--coral { background: var(--eiv-coral-pale) !important; }
.category-tone--turquoise { background: var(--eiv-turquoise-pale) !important; }
.category-tone--lilac { background: var(--eiv-lilac-pale) !important; }
.category-tone--raspberry { background: var(--eiv-raspberry-pale) !important; }
.category-tone--neutral { background: #fff !important; }

.agreements-category-row button.is-active,
.library-category-chips button.is-active {
  border-color: var(--eiv-raspberry);
  color: var(--eiv-raspberry);
  box-shadow: 0 0 0 3px rgba(198, 75, 103, 0.13), 0 8px 18px rgba(64, 58, 92, 0.08);
}

.library-category-icon,
.agreements-category-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

/* Le bouton +/- indique maintenant clairement son rôle. */
.agreements-filter-toggle__control,
.library-filter-toggle__control {
  display: inline-flex !important;
  width: auto !important;
  height: 36px !important;
  align-items: center;
  gap: 8px;
  padding: 0 5px 0 11px;
  border: 1px solid var(--eiv-turquoise) !important;
  border-radius: 999px !important;
  color: var(--eiv-turquoise-deep);
  background: var(--eiv-turquoise-pale);
}

.agreements-filter-toggle__control i,
.library-filter-toggle__control i {
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.agreements-filter-toggle__control b,
.library-filter-toggle__control b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  line-height: 1;
}

.agreements-filter-toggle:hover,
.library-filter-toggle:hover {
  background: var(--eiv-turquoise-pale);
}

/* Cartes et groupes : davantage de relief au survol. */
.agreements-card,
.agreement-highlight--reference,
.program-card--reference,
.program-next-card,
.home-space-metric,
.idea-card--reference {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.agreements-card:hover,
.agreement-highlight--reference:hover,
.program-card--reference:hover,
.program-next-card:hover,
.home-space-metric:hover,
.idea-card--reference:hover {
  transform: translateY(-5px);
  border-color: rgba(105, 201, 195, 0.62);
  box-shadow: 0 18px 38px rgba(64, 58, 92, 0.14);
  filter: saturate(1.035);
}

.agreements-card {
  border-top-width: 4px;
  background: #fff;
}

.agreements-card--love { border-top-color: var(--eiv-turquoise); }
.agreements-card--compromise { border-top-color: #b6a0cf; }
.agreements-card--hesitation { border-top-color: var(--eiv-coral); }
.agreements-card--rejected { border-top-color: #aaa5af; }

.agreements-card__body {
  background: #fff;
}

.agreements-card__result-copy {
  padding: 10px 12px;
  border-left: 3px solid var(--eiv-turquoise);
  border-radius: 10px;
  background: var(--eiv-turquoise-pale);
  color: var(--eiv-plum);
}

.agreements-card--compromise .agreements-card__result-copy {
  border-left-color: #b6a0cf;
  background: var(--eiv-lilac-pale);
}

.agreements-card--hesitation .agreements-card__result-copy {
  border-left-color: var(--eiv-coral);
  background: var(--eiv-cream);
}

.agreements-card--rejected .agreements-card__result-copy {
  border-left-color: #aaa5af;
  background: #eeedf0;
}

/* --------------------------------------------------------------------------
   Boîte à idées — même langage de recherche/tri que Nos accords
   -------------------------------------------------------------------------- */
.library-reference-controls {
  display: grid;
  gap: 13px;
}

.library-sticky-controls {
  display: grid;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(105, 201, 195, 0.38);
  border-radius: 18px;
}

.library-reference-search {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
}

.library-reference-search > svg {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 19px;
  height: 19px;
  color: var(--eiv-turquoise-deep);
  pointer-events: none;
}

.library-reference-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 48px 0 44px;
  border: 1px solid var(--eiv-border);
  border-radius: 15px;
  background: #fff;
  color: var(--eiv-plum);
  font: inherit;
  outline: 0;
}

.library-reference-search input:focus {
  border-color: var(--eiv-turquoise);
}

.library-reference-search button {
  position: absolute;
  right: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--eiv-coral-pale);
  color: var(--eiv-text-muted);
  cursor: pointer;
  font-size: 20px;
}

.library-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--eiv-plum);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.library-sort select {
  min-width: 180px;
  min-height: 44px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--eiv-border);
  border-radius: 14px;
  background: #fff;
  color: var(--eiv-plum);
  font: inherit;
  font-weight: 800;
}

.library-advanced {
  overflow: hidden;
  border: 1px solid var(--eiv-border);
  border-radius: 18px;
  background: #fff;
}

.library-filter-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border: 0;
  background: #fff;
  color: var(--eiv-plum);
  cursor: pointer;
  text-align: left;
}

.library-filter-toggle > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-filter-toggle > span:first-child > b {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--eiv-raspberry-pale);
  color: var(--eiv-raspberry);
  font-size: 12px;
}

.library-filter-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--eiv-border);
  background: var(--eiv-cream);
}

.library-filter-panel label {
  display: grid;
  gap: 5px;
  color: var(--eiv-plum);
  font-size: 12px;
  font-weight: 900;
}

.library-filter-panel select {
  min-height: 44px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--eiv-border);
  border-radius: 13px;
  background: #fff;
  color: var(--eiv-plum);
  font: inherit;
}

.library-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 3px;
}

.library-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 6px;
}

.library-category-chips button {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(64, 58, 92, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.library-category-section {
  overflow: hidden;
  border: 1px solid var(--eiv-border);
  border-radius: 18px;
  background: #fff;
}

.library-category-section > header {
  border: 0;
  border-bottom: 1px solid rgba(64, 58, 92, 0.08);
  border-radius: 0;
  background: transparent;
}

.library-category-section > header strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.library-category-section > .idea-card-grid {
  padding: 12px;
}

.badge--category.category-tone--coral,
.badge--category.category-tone--turquoise,
.badge--category.category-tone--lilac,
.badge--category.category-tone--raspberry {
  color: var(--eiv-plum);
}

.idea-card__agreement {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.idea-card__agreement .icon {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   Donner mon avis — plus de contraste et plus d’informations dès l’ouverture
   -------------------------------------------------------------------------- */
.opinion-dialog {
  width: min(850px, 100%);
  background: var(--eiv-bg);
}

.opinion-page {
  gap: 10px;
  padding-bottom: 14px;
}

.opinion-header-card {
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--eiv-border);
  background: #fff;
}

.opinion-header-card__top h2 {
  font-size: 27px;
}

.opinion-progress {
  margin-top: 10px;
  padding: 8px 11px;
  background: var(--eiv-lilac-pale);
}

.opinion-queue-navigation {
  margin-top: 8px;
  padding: 6px;
  box-shadow: 0 5px 15px rgba(64, 58, 92, 0.045);
}

.opinion-navigation-help {
  margin-top: 5px;
  font-size: 10px;
}

.opinion-idea-card {
  grid-template-columns: minmax(180px, 29%) minmax(0, 1fr);
  margin: 0 12px;
  border-color: rgba(105, 201, 195, 0.38);
  background: #fff;
  box-shadow: 0 9px 24px rgba(64, 58, 92, 0.08);
}

.opinion-idea-card__media {
  min-height: 215px;
  max-height: 235px;
  padding: 13px;
  border-right-color: rgba(243, 164, 131, 0.42);
  background: var(--eiv-cream);
}

.opinion-idea-card__media img {
  max-height: 205px;
}

.opinion-idea-card__content {
  padding: 15px 17px;
}

.opinion-idea-card h1 {
  margin: 9px 0 6px;
  font-size: 27px;
  line-height: 1.04;
}

.opinion-idea__meta {
  gap: 5px;
  margin-bottom: 8px;
}

.opinion-idea__meta span {
  padding: 5px 8px;
}

.opinion-idea__description {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.opinion-idea__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.opinion-details-toggle,
.opinion-source-button {
  min-height: 44px;
  padding-inline: 10px;
}

.opinion-partner-status {
  margin: 0 12px;
  border-color: rgba(105, 201, 195, 0.42);
  border-left: 5px solid var(--eiv-turquoise);
  background: #fff;
  box-shadow: 0 7px 18px rgba(64, 58, 92, 0.055);
}

.opinion-partner-status.is-revealed {
  background: var(--eiv-turquoise-pale);
}

.opinion-answer-card {
  margin: 0 12px;
  border: 1px solid rgba(243, 164, 131, 0.45);
  background: #fff;
  box-shadow: 0 8px 22px rgba(64, 58, 92, 0.065);
}

.opinion-answer-card > div:first-child {
  margin: -17px -17px 14px;
  padding: 15px 17px 12px;
  border-bottom: 1px solid rgba(243, 164, 131, 0.38);
  border-radius: 20px 20px 0 0;
  background: var(--eiv-cream);
}

.opinion-choice:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 14px 28px rgba(64, 58, 92, 0.13);
}

/* Accessibilité : animation réduite si demandée par le système. */
@media (prefers-reduced-motion: reduce) {
  .home-how-button,
  .home-program-cta,
  .home-agreements-cta,
  .agreements-result-card,
  .agreements-card,
  .agreement-highlight--reference,
  .program-card--reference,
  .program-next-card,
  .home-space-metric,
  .idea-card--reference,
  .opinion-choice,
  .agreements-category-row button,
  .library-category-chips button {
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .home-onboarding--compact {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    padding-inline: 26px;
  }

  .home-onboarding__hero {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
  }

  .home-onboarding__slogan {
    font-size: clamp(42px, 5vw, 58px) !important;
  }
}

@media (max-width: 900px) {
  .home-onboarding--compact {
    grid-template-columns: 1fr;
  }

  .home-onboarding--compact__visual {
    justify-self: center;
  }

  .home-onboarding__hero {
    grid-template-columns: 1fr;
  }

  .home-onboarding__hero > img {
    justify-self: center;
  }

  .agreements-sticky-controls,
  .library-sticky-controls {
    top: calc(var(--header-height) + 5px);
  }

  .opinion-idea-card {
    grid-template-columns: 1fr;
  }

  .opinion-idea-card__media {
    min-height: 180px;
    max-height: 215px;
    border-right: 0;
    border-bottom: 1px solid rgba(243, 164, 131, 0.42);
  }

  .opinion-idea-card__media img {
    max-height: 190px;
  }
}

@media (max-width: 720px) {
  .home-onboarding--compact {
    padding: 22px 18px;
  }

  .home-onboarding--expanded {
    padding: 22px 17px;
  }

  .home-onboarding__slogan {
    font-size: 39px !important;
  }

  .agreements-sticky-controls,
  .library-sticky-controls {
    grid-template-columns: 1fr;
  }

  .agreements-sort,
  .library-sort {
    width: 100%;
  }

  .agreements-sort select,
  .library-sort select {
    width: 100%;
    min-width: 0;
  }

  .agreements-filter-toggle__control i,
  .library-filter-toggle__control i {
    display: none;
  }

  .library-filter-panel.is-open {
    grid-template-columns: 1fr;
  }

  .agreement-highlight--reference > .home-card-action span,
  .program-card--reference .program-card__link span {
    display: none;
  }

  .agreement-highlight--reference > .home-card-action,
  .program-card--reference .program-card__link {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .agreement-highlight__description {
    margin-right: 38px;
  }

  .opinion-idea__actions {
    grid-template-columns: 1fr;
  }
}
