/*
 * Référence visuelle v1.155
 * Ce module rapproche le shell modulaire de la version validée sans réintroduire
 * le monolithe historique. Il est chargé en dernier afin d'exprimer la référence
 * visuelle officielle dans un seul fichier identifiable.
 */

:root {
  --font-family: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --header-height: 64px;
  --sidebar-width: 268px;
  --shadow-reference: 0 12px 34px rgba(64, 58, 92, 0.08);
}

html,
body {
  overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

h1,
h2,
h3,
.app-topbar__title,
.button {
  font-family: "Baloo 2", var(--font-family);
}

h1,
h2,
h3 {
  color: var(--color-plum);
  letter-spacing: -0.015em;
}

.button {
  border-radius: 16px;
  font-weight: 800;
}

.button--primary {
  box-shadow: 0 10px 22px rgba(198, 75, 103, 0.14);
}

/* Connexion : retour à la carte centrale de la v1.155 */
.auth-page--reference {
  display: grid;
  min-height: 100vh;
  place-items: start center;
  padding: 18px 16px 42px;
  background: rgba(64, 58, 92, 0.92);
}

.auth-card--reference {
  display: block;
  width: min(420px, calc(100vw - 32px));
  min-height: auto;
  margin: 0;
  padding: 22px;
  border: 1px solid rgba(229, 221, 233, 0.92);
  border-radius: 24px;
  background: var(--color-cream);
  box-shadow: 0 26px 70px rgba(20, 17, 33, 0.28);
}

.auth-brand--reference {
  width: 220px;
  margin: 0;
}

.auth-brand--reference img {
  width: 100%;
  height: 78px;
  object-fit: contain;
  object-position: left center;
}

.auth-card__divider {
  height: 1px;
  margin: 10px 0 16px;
  background: var(--color-border);
}

.auth-card--reference h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.15;
}

.auth-card--reference .auth-intro {
  margin: 0 0 14px;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-card--reference .field {
  margin-top: 12px;
  gap: 6px;
  font-size: 13px;
}

.auth-card--reference .field input {
  min-height: 46px;
  border-radius: 15px;
  background: #fff;
}

.auth-card--reference .button {
  min-height: 46px;
  margin-top: 12px;
}

.auth-card--reference .auth-notice {
  margin: 0 0 12px;
  font-size: 12px;
}

.auth-context-link {
  display: block;
  margin: 12px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--color-turquoise-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-card--reference .auth-version {
  margin: 10px 0 0;
  color: #9b95a8;
  font-size: 10px;
  text-align: center;
}

/* Shell général : sidebar blanche, topbar blanche et contenu léger */
.application-shell--reference {
  min-height: 100vh;
  background: var(--color-bg);
}

.application-shell--reference .app-sidebar {
  z-index: 60;
  top: 0;
  width: var(--sidebar-width);
  padding: 14px 12px 18px;
  border-right: 1px solid var(--color-border);
  background: #fff;
  box-shadow: 8px 0 24px rgba(64, 58, 92, 0.035);
}

.app-sidebar__brand {
  display: flex;
  min-height: 92px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 10px 12px;
}

.app-sidebar__brand a {
  display: block;
  width: 190px;
}

.app-sidebar__brand img {
  width: 100%;
  height: 84px;
  object-fit: contain;
  object-position: left center;
}

.application-shell--reference .side-nav {
  gap: 4px;
}

.application-shell--reference .side-nav__item {
  min-height: 52px;
  padding: 0 15px;
  border-left-width: 4px;
  border-radius: 0 17px 17px 0;
  color: #5e5970;
  font-size: 14px;
}

.application-shell--reference .side-nav__item:hover {
  background: #faf9fc;
}

.application-shell--reference .side-nav__item.is-active {
  border-left-color: var(--color-turquoise);
  background: var(--color-raspberry-pale);
  color: var(--color-raspberry);
}

.application-shell--reference .side-nav__icon {
  width: 20px;
  height: 20px;
}

.application-shell--reference .app-sidebar__add {
  width: calc(100% - 24px);
  min-height: 48px;
  margin: 18px auto 0;
  border-radius: 16px;
}

.application-shell--reference .side-nav--secondary {
  margin-top: 12px;
  padding-top: 12px;
}

.application-shell--reference .app-topbar {
  left: var(--sidebar-width);
  min-height: var(--header-height);
  padding: 0 18px 0 28px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.98);
  color: var(--color-plum);
  box-shadow: 0 5px 20px rgba(64, 58, 92, 0.045);
  backdrop-filter: none;
}

.application-shell--reference .app-topbar__title {
  margin: 0;
  font-size: 24px;
  line-height: 1;
}

.application-shell--reference .app-topbar__actions {
  gap: 10px;
}

.application-shell--reference .icon-button,
.application-shell--reference .location-chip,
.application-shell--reference .profile-trigger {
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-plum);
  box-shadow: none;
}

.application-shell--reference .icon-button:hover,
.application-shell--reference .location-chip:hover,
.application-shell--reference .profile-trigger:hover {
  background: #fbfafc;
}

.application-shell--reference .location-chip {
  min-height: 42px;
  padding: 0 13px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 800;
}

.location-chip__country {
  color: var(--color-plum);
  font-size: 11px;
  font-weight: 900;
}

.application-shell--reference .profile-trigger {
  min-height: 46px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
}

.application-shell--reference .profile-trigger__copy strong {
  font-size: 12px;
}

.application-shell--reference .profile-trigger__copy small {
  color: var(--color-text-muted);
  font-size: 9px;
}

.profile-plan-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #f0ccd6;
  border-radius: 999px;
  background: var(--color-raspberry-pale);
  color: var(--color-raspberry);
  font-size: 10px;
  font-weight: 900;
}

.application-shell--reference .avatar {
  border-color: #fff;
  box-shadow: 0 0 0 1px var(--color-border);
}

.topbar-add-button {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-raspberry);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(198, 75, 103, 0.18);
}

.topbar-add-button .icon {
  width: 22px;
  height: 22px;
}

.application-shell--reference .application-frame {
  display: block;
  padding-top: var(--header-height);
}

.application-shell--reference .app-main {
  min-width: 0;
  margin-left: var(--sidebar-width);
  padding: 24px clamp(18px, 3vw, 44px) 52px;
}

.application-shell--reference .app-page-content,
.application-shell--reference .page-heading,
.application-shell--reference .preview-notice {
  width: 100%;
  max-width: 1500px;
}

.application-shell--reference .page-heading {
  margin-bottom: 20px;
}

.application-shell--reference .page-heading h1 {
  font-size: 30px;
}

.profile-panel__preview {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--color-cream);
  color: var(--color-text-muted);
  font-size: 11px;
  text-align: center;
}

/* Accueil : identité, densité et blocs proches de la v1.155 */
.home-dashboard {
  display: grid;
  gap: 26px;
}

.home-section {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--color-border);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-reference);
}

.home-section--attention {
  background: var(--color-cream);
}

.home-section--agreements {
  background: var(--color-raspberry-pale);
}

.home-section--choice {
  background: var(--color-turquoise-pale);
}

.home-section--program {
  background: var(--color-cream);
}

.home-section--activity {
  background: var(--color-lilac-pale);
}

.home-section__number {
  display: none !important;
}

.home-section__heading--reference {
  display: grid;
  min-height: 94px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.home-section__copy {
  min-width: 0;
}

.home-section__copy h2 {
  margin: 2px 0 4px;
  font-size: 25px;
}

.home-section__copy p:last-child {
  margin: 0;
  color: var(--color-text-muted);
}

.home-section__heading-art {
  width: 118px;
  height: 86px;
  object-fit: contain;
}

.home-section__heading--reference > .button {
  align-self: center;
}

.home-brand-lockup {
  width: 290px;
  max-width: 100%;
}

.home-brand-lockup img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  object-position: left center;
}

.home-onboarding--compact {
  display: grid;
  min-height: 290px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 30px;
  padding: 24px 28px;
  overflow: hidden;
}

.home-onboarding--compact__copy {
  display: grid;
  gap: 12px;
}

.home-onboarding--compact__visual {
  width: 360px;
  height: 235px;
  justify-self: end;
  object-fit: contain;
}

.home-how-button {
  display: grid;
  width: min(500px, 100%);
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: #fff;
  color: var(--color-plum);
  cursor: pointer;
  text-align: left;
}

.home-how-button__icon {
  display: grid;
  width: 38px;
  height: 38px;
  grid-template-columns: repeat(2, 10px);
  grid-template-rows: repeat(2, 10px);
  place-content: center;
  gap: 3px;
  border-radius: 12px;
  background: var(--color-coral-pale);
}

.home-how-button__icon i:nth-child(1) { background: var(--color-coral); }
.home-how-button__icon i:nth-child(2) { background: var(--color-turquoise); }
.home-how-button__icon i:nth-child(3) { background: var(--color-lilac); }
.home-how-button__icon i:nth-child(4) { background: var(--color-raspberry); }
.home-how-button__icon i { border-radius: 3px; }
.home-how-button strong,
.home-how-button small { display: block; }
.home-how-button strong { font-size: 14px; }
.home-how-button small { margin-top: 2px; color: var(--color-text-muted); font-size: 11px; }
.home-how-button__arrow { color: var(--color-raspberry); font-size: 24px; }

.home-onboarding--expanded {
  padding: 26px 28px;
}

.home-onboarding__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 24px;
}

.home-onboarding__hero > img {
  width: 360px;
  height: 245px;
  object-fit: contain;
}

.home-onboarding__hero h2 {
  margin: 2px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.98;
}

.home-onboarding__hero h2 span {
  color: var(--color-turquoise-deep);
}

.home-onboarding__hero p:last-child {
  max-width: 760px;
  color: var(--color-text-muted);
}

.home-onboarding__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.onboarding-step {
  min-height: 184px;
  padding: 16px;
  border: 1px solid rgba(64, 58, 92, 0.08);
  border-radius: 20px;
}

.onboarding-step__eyebrow {
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.onboarding-step__icon {
  float: right;
  margin: -20px 0 0;
}

.onboarding-step h3 {
  clear: both;
  margin-top: 24px;
}

.home-onboarding__example {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 18px;
  background: var(--color-lilac-pale);
}

.home-onboarding__example span {
  color: var(--color-turquoise-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-onboarding__example strong {
  font-size: 12px;
}

.home-action-list {
  display: grid;
  gap: 12px;
}

.home-action-card {
  display: grid;
  min-height: 102px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(243, 164, 131, 0.65);
  border-radius: 20px;
  background: var(--color-cream-strong);
}

.home-action-card__icon {
  border-radius: 15px;
}

.home-action-card__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.home-action-card__status {
  color: #9b6b21;
  font-size: 11px;
  font-weight: 900;
}

.home-action-card h3 {
  margin: 0;
  font-size: 18px;
}

.home-action-card p {
  margin: 3px 0 0;
  font-size: 13px;
}

.home-metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-metric {
  min-height: 106px;
  padding: 16px;
  border-radius: 18px;
}

.home-metric strong {
  font-size: 25px;
}

.home-section__actions {
  margin-top: 14px;
}

.home-section--ideas .home-section__actions .button--primary {
  flex: 1;
}

.agreement-stats,
.choice-mode-grid {
  gap: 12px;
}

.agreement-stat,
.choice-mode-card,
.program-card,
.activity-row,
.agreement-highlight {
  border-radius: 18px;
}

.choice-mode-card {
  min-height: 210px;
}

.activity-row {
  background: #fff;
}

/* Boîte à idées : même shell et densité plus proche du produit validé */
.library-overview {
  border-radius: 26px;
  background: #fff;
}

.library-overview h2 {
  font-size: 27px;
}

.library-toolbar {
  top: calc(var(--header-height) + 10px);
  border-radius: 20px;
}

.idea-card,
.library-dialog {
  border-radius: 22px;
}

.idea-card h3 {
  font-family: "Baloo 2", var(--font-family);
}

/* Responsive */
@media (max-width: 1120px) {
  .application-shell--reference .profile-trigger__copy,
  .profile-plan-badge {
    display: none;
  }

  .home-onboarding--compact {
    grid-template-columns: 1fr 280px;
  }

  .home-onboarding--compact__visual,
  .home-onboarding__hero > img {
    width: 280px;
  }

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

  .home-onboarding__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 0px;
  }

  .application-shell--reference .app-topbar {
    left: 0;
    padding-inline: 12px;
  }

  .application-shell--reference .app-sidebar {
    width: min(320px, 88vw);
    transform: translateX(-105%);
  }

  .application-shell--reference .app-sidebar.is-open {
    transform: translateX(0);
  }

  .application-shell--reference .app-main {
    margin-left: 0;
    padding: 18px 14px calc(92px + 24px);
  }

  .app-sidebar__close {
    display: inline-grid;
  }

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

  .home-onboarding--compact__visual,
  .home-onboarding__hero > img {
    width: min(360px, 78vw);
    height: auto;
    justify-self: center;
  }

  .home-onboarding--compact__visual {
    order: -1;
  }

  .home-section__heading--reference {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .home-section__heading--reference > .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .application-shell--reference .app-topbar__title {
    font-size: 20px;
  }

  .application-shell--reference .location-chip,
  .application-shell--reference .topbar-search {
    display: none;
  }

  .application-shell--reference .profile-trigger {
    border: 0;
    padding: 0;
  }

  .application-shell--reference .topbar-add-button {
    display: none;
  }

  .home-dashboard {
    gap: 16px;
  }

  .home-section,
  .home-onboarding--expanded,
  .home-onboarding--compact {
    padding: 17px 14px;
    border-radius: 22px;
  }

  .home-onboarding--compact {
    min-height: auto;
  }

  .home-brand-lockup {
    width: 230px;
  }

  .home-brand-lockup img {
    height: 74px;
  }

  .home-how-button {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .home-section__heading--reference {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-section__heading-art {
    width: 92px;
    height: 70px;
    justify-self: end;
    margin-top: -58px;
  }

  .home-section__copy h2 {
    max-width: calc(100% - 86px);
    font-size: 22px;
  }

  .home-action-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .home-action-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .home-metrics-grid,
  .agreement-stats,
  .choice-mode-grid,
  .agreement-highlights {
    grid-template-columns: 1fr;
  }

  .home-onboarding__hero h2 {
    font-size: 38px;
  }

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

/* Logo officiel reconstruit en composant, identique sur connexion, sidebar et accueil */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-plum);
}

.brand-lockup__mark {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 48px;
  flex: 0 0 58px;
}

.brand-lockup__circle {
  position: absolute;
  top: 5px;
  width: 39px;
  height: 39px;
  border-radius: 50%;
}

.brand-lockup__circle--coral {
  left: 0;
  background: var(--color-coral);
}

.brand-lockup__circle--turquoise {
  right: 0;
  background: var(--color-turquoise);
}

.brand-lockup__mark b {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 22px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--color-raspberry);
  font-size: 15px;
  line-height: 1;
}

.brand-lockup__copy,
.brand-lockup__copy strong,
.brand-lockup__copy small,
.brand-lockup__copy span,
.brand-lockup__copy em {
  display: block;
}

.brand-lockup__copy strong {
  color: var(--color-raspberry);
  font-family: "Baloo 2", var(--font-family);
  font-size: 20px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-lockup__copy small {
  margin-top: 5px;
  color: #69627c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.brand-lockup__copy em {
  color: var(--color-turquoise-deep);
  font-style: normal;
  font-weight: 900;
}

.brand-lockup--auth .brand-lockup__mark {
  width: 68px;
  height: 56px;
  flex-basis: 68px;
}

.brand-lockup--auth .brand-lockup__circle {
  width: 45px;
  height: 45px;
}

.brand-lockup--auth .brand-lockup__mark b {
  top: 14px;
  left: 26px;
  width: 29px;
  height: 29px;
  font-size: 17px;
}

.brand-lockup--auth .brand-lockup__copy strong {
  font-size: 24px;
}

.brand-lockup--auth .brand-lockup__copy small {
  font-size: 11px;
}

.brand-lockup--home .brand-lockup__mark {
  width: 64px;
  height: 52px;
  flex-basis: 64px;
}

.brand-lockup--home .brand-lockup__circle {
  width: 43px;
  height: 43px;
}

.brand-lockup--home .brand-lockup__mark b {
  top: 13px;
  left: 24px;
  width: 28px;
  height: 28px;
}

.brand-lockup--home .brand-lockup__copy strong {
  font-size: 22px;
}

.brand-lockup--sidebar .brand-lockup__copy strong {
  font-size: 18px;
}

.brand-lockup--sidebar .brand-lockup__copy small {
  font-size: 10px;
}

.auth-brand--reference {
  width: auto;
}

.auth-brand--reference img,
.app-sidebar__brand img,
.home-brand-lockup img {
  display: none !important;
}

.app-sidebar__brand a {
  width: auto;
  text-decoration: none;
}

.home-brand-lockup {
  width: auto;
}

@media (max-width: 760px) {
  .brand-lockup--home .brand-lockup__copy strong { font-size: 19px; }
  .brand-lockup--home .brand-lockup__copy small { font-size: 9px; }
}

/* ========================================================================== 
   ALPHA 6 — FIDÉLITÉ VISUELLE RENFORCÉE À LA V1.155
   Les règles ci-dessous sont issues des captures complètes de référence.
   Elles restent regroupées dans ce module unique au lieu d'être dispersées.
   ========================================================================== */

:root {
  --sidebar-width: 268px;
  --header-height: 64px;
  --content-wide: 1480px;
  --reference-radius: 24px;
  --reference-border: 1px solid rgba(64, 58, 92, 0.11);
  --reference-shadow: 0 13px 34px rgba(64, 58, 92, 0.075);
}

.visual-avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--color-raspberry);
  color: #fff;
  box-shadow: 0 0 0 1px var(--color-border), 0 5px 12px rgba(64, 58, 92, 0.09);
  font-size: 12px;
  font-weight: 900;
}

.visual-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-avatar--tiny { width: 24px; height: 24px; flex-basis: 24px; border-width: 1px; }
.visual-avatar--large { width: 62px; height: 62px; flex-basis: 62px; }
.visual-avatar--xl { width: 78px; height: 78px; flex-basis: 78px; }

.application-shell--reference .app-sidebar {
  padding: 16px 12px 22px;
}

.application-shell--reference .app-sidebar__brand {
  min-height: 130px;
  align-items: flex-start;
  padding: 12px 15px 22px;
}

.application-shell--reference .brand-lockup--sidebar .brand-lockup__mark {
  width: 58px;
  height: 50px;
  flex-basis: 58px;
}

.application-shell--reference .brand-lockup--sidebar .brand-lockup__copy strong {
  font-size: 19px;
}

.application-shell--reference .brand-lockup--sidebar .brand-lockup__copy small {
  font-size: 10px;
}

.application-shell--reference .side-nav__item {
  min-height: 55px;
  margin: 2px 0;
  padding: 0 18px;
  border-radius: 0 18px 18px 0;
  font-size: 14px;
  font-weight: 800;
}

.application-shell--reference .app-sidebar__add {
  min-height: 50px;
  margin-top: 22px;
}

.application-shell--reference .app-main {
  max-width: none;
  margin-left: var(--sidebar-width);
  padding: 24px clamp(38px, 4.25vw, 82px) 60px;
}

.application-shell--reference .app-page-content,
.application-shell--reference .page-heading,
.application-shell--reference .preview-notice {
  max-width: var(--content-wide);
  margin-inline: auto;
}

.application-shell--reference .app-topbar {
  min-height: 64px;
  padding: 0 22px 0 30px;
}

.application-shell--reference .app-topbar__title {
  font-size: 24px;
}

.application-shell--reference .profile-trigger .avatar {
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
}

.application-shell--reference .profile-trigger .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Connexion */
.auth-page--reference {
  place-items: start center;
  padding-top: 18px;
  background: #514b6a;
}

.auth-card--reference {
  width: 438px;
  max-width: calc(100vw - 30px);
  padding: 22px 22px 20px;
  border-radius: 23px;
  background: #fff8f3;
}

.auth-brand--reference {
  margin-bottom: 4px;
}

.auth-card--reference .brand-lockup--auth .brand-lockup__copy strong {
  font-size: 23px;
}

.auth-card--reference .brand-lockup--auth .brand-lockup__copy small {
  font-size: 10px;
}

.auth-card--reference h1 {
  font-size: 25px;
}

.auth-card--reference .auth-context-link {
  margin-top: 8px;
}

.auth-card--reference .auth-version {
  min-height: 20px;
  margin: 10px -2px -2px;
  padding-top: 7px;
  background: rgba(198, 75, 103, 0.045);
}

/* Accueil */
.home-dashboard {
  gap: 22px;
}

.home-section {
  padding: 21px 18px;
  border-radius: 24px;
  box-shadow: var(--reference-shadow);
}

.home-onboarding--compact {
  min-height: 292px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  padding: 26px 26px 24px;
}

.home-onboarding--compact__copy {
  gap: 14px;
}

.home-onboarding--compact__visual {
  width: 330px;
  height: 235px;
}

.home-brand-lockup .brand-lockup--home .brand-lockup__copy strong {
  font-size: 22px;
}

.home-how-button {
  width: min(500px, 100%);
  min-height: 74px;
  padding: 13px 15px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(64, 58, 92, 0.04);
}

.home-section__heading--reference {
  min-height: 70px;
  margin-bottom: 12px;
}

.home-section__copy h2 {
  margin: 1px 0 4px;
  font-size: 24px;
}

.home-section__copy p:last-child {
  font-size: 13px;
}

.home-section__heading-art {
  width: 110px;
  height: 78px;
}

.home-section--attention {
  padding: 22px 18px 24px;
}

.home-action-card {
  min-height: 128px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  padding: 14px 16px;
  border-color: rgba(243, 164, 131, 0.9);
  background: #fff3e5;
}

.home-action-card h3 {
  color: var(--color-raspberry);
  font-size: 17px;
}

.home-action-card__partner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(64, 58, 92, 0.1);
  color: #6f697d;
  font-size: 13px;
}

.home-space-card {
  padding: 13px;
  border: 1px solid rgba(243, 164, 131, 0.35);
  border-radius: 20px;
  background: #fff8f3;
}

.home-space-card__identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 1px 1px 10px;
}

.home-space-card__photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 15px;
  object-fit: cover;
}

.home-space-card__identity h3 {
  margin: 0;
  font-size: 18px;
}

.home-space-card__identity p {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

.home-space-card__edit {
  margin-left: auto;
  color: var(--color-raspberry);
}

.home-space-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-space-metric {
  position: relative;
  display: flex;
  min-height: 106px;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: #fff;
}

.home-space-metric__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
}

.home-space-metric--raspberry .home-space-metric__icon { background: var(--color-raspberry-pale); color: var(--color-raspberry); }
.home-space-metric--turquoise .home-space-metric__icon { background: var(--color-turquoise-pale); color: var(--color-turquoise-deep); }
.home-space-metric--lilac .home-space-metric__icon { background: var(--color-lilac-pale); color: var(--color-plum); }

.home-space-metric__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.home-space-metric strong,
.home-space-metric small,
.home-space-metric em {
  display: block;
}

.home-space-metric strong { font-size: 23px; line-height: 1; }
.home-space-metric small { margin-top: 5px; color: var(--color-text-muted); font-size: 11px; }
.home-space-metric em { margin-top: 5px; color: var(--color-raspberry); font-size: 10px; font-style: normal; font-weight: 900; }
.home-space-metric em button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.home-space-metric > img { position: absolute; right: 8px; bottom: 6px; width: 92px; height: 72px; object-fit: cover; border: 4px solid #fff; border-radius: 10px; box-shadow: 0 5px 13px rgba(64,58,92,.14); transform: rotate(-2deg); opacity: .9; }
.home-space-card__cta { width: 100%; margin-top: 10px; }

.home-section--agreements {
  background: #f1edf6;
}

.home-text-link {
  border: 0;
  background: transparent;
  color: var(--color-raspberry);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}

.home-agreements-panel {
  padding: 13px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #fff;
}

.home-agreements-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 11px;
}

.home-agreements-panel__top > div:first-child strong,
.home-agreements-panel__top > div:first-child span {
  display: block;
}

.home-agreements-panel__top > div:first-child strong {
  color: var(--color-raspberry);
  font-size: 29px;
  line-height: 1;
}

.home-agreements-panel__top > div:first-child span {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: 11px;
}

.agreement-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.agreement-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--color-plum);
  font-size: 10px;
  text-decoration: none;
}

.agreement-pill em { font-style: normal; font-weight: 800; }
.agreement-pill--turquoise { background: var(--color-turquoise-pale); color: var(--color-turquoise-deep); }
.agreement-pill--lilac { background: var(--color-lilac-pale); }
.agreement-pill--cream { background: var(--color-cream); }
.agreement-pill--neutral { background: var(--color-neutral-pale); color: var(--color-text-muted); }

.agreement-highlights--reference {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agreement-highlight--reference {
  position: relative;
  min-height: 175px;
  padding: 12px;
  border: 1px solid var(--color-border);
  background: #fff;
}

.agreement-highlight__top {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.agreement-highlight__top > img,
.agreement-highlight__fallback {
  width: 74px;
  height: 74px;
  border-radius: 15px;
  object-fit: cover;
}

.agreement-highlight__fallback {
  display: grid;
  place-items: center;
  background: var(--color-cream-strong);
  color: #f3c32d;
  font-size: 30px;
}

.agreement-highlight__top h3 { margin: 2px 0 5px; font-size: 15px; }
.agreement-highlight__top p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.agreement-highlight__badge { position: absolute; top: 14px; right: 12px; padding: 5px 8px; border-radius: 999px; background: var(--color-turquoise-deep); color: #fff; font-size: 9px; font-weight: 900; }
.agreement-highlight__meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 0 84px; }
.agreement-highlight__meta span { padding: 4px 7px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); font-size: 9px; }
.agreement-highlight--reference > a { position: absolute; right: 12px; bottom: 10px; color: var(--color-raspberry); font-size: 22px; text-decoration: none; }

.home-section--choice { background: #e8f7f6; }
.home-choice-panel { display: grid; grid-template-columns: .8fr 1.2fr .75fr; gap: 14px; align-items: stretch; padding: 13px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.home-choice-panel__intro { align-self: center; padding: 10px 8px; }
.home-choice-count { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--color-turquoise-pale); color: var(--color-turquoise-deep); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.home-choice-panel__intro h3 { margin: 12px 0 6px; font-size: 18px; }
.home-choice-panel__intro p { color: var(--color-text-muted); font-size: 12px; }
.home-choice-suggestion { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px dashed var(--color-turquoise); border-radius: 17px; background: #fbffff; }
.home-choice-suggestion__icon { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 15px; background: var(--color-coral-pale); font-size: 28px; }
.home-choice-suggestion h3 { margin: 2px 0 7px; font-size: 16px; }
.home-choice-suggestion p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.home-choice-suggestion > span.badge { position: absolute; top: 10px; right: 10px; }
.home-choice-suggestion > div > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.home-choice-suggestion > div > div span { padding: 4px 7px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 9px; }
.home-choice-panel__actions { display: grid; gap: 8px; align-content: center; }
.home-choice-panel__actions .button { display: flex; min-height: 60px; flex-direction: column; justify-content: center; text-align: center; }
.home-choice-panel__actions small { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; }

.home-section--program { background: #fff8f3; }
.home-program-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 13px; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.program-card--reference { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; min-height: 145px; gap: 12px; padding: 12px; border: 1px solid var(--color-border); background: #fff; }
.program-card--reference > img { width: 80px; height: 80px; border-radius: 15px; object-fit: cover; }
.program-card--reference h3 { margin: 2px 0 4px; font-size: 16px; }
.program-card--reference p { margin: 2px 0; color: var(--color-text-muted); font-size: 11px; }
.program-card__date { display: grid; place-items: center; min-width: 50px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--color-raspberry-pale); color: var(--color-raspberry); }
.program-card__date strong { font-size: 10px; }
.program-card__date span { font-size: 8px; }
.program-card__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.program-card__meta span { padding: 4px 7px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 9px; }
.program-card--reference .program-card__link { position: absolute; right: 10px; bottom: 9px; color: var(--color-raspberry); font-size: 22px; text-decoration: none; }
.program-next-card { display: flex; min-height: 145px; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--color-turquoise); border-radius: 18px; background: #f5ffff; color: var(--color-plum); text-decoration: none; }
.program-next-card > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--color-turquoise-pale); color: var(--color-turquoise-deep); }
.program-next-card h3 { margin: 0 0 4px; font-size: 16px; }
.program-next-card p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.program-next-card b { margin-left: auto; color: var(--color-raspberry); font-size: 22px; }

.home-section--activity { background: #f1edf6; }
.activity-list--reference { overflow: hidden; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.activity-row--reference { display: grid; min-height: 64px; grid-template-columns: 44px minmax(0, 1fr) 34px 20px; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; color: var(--color-plum); text-decoration: none; }
.activity-row--reference:last-child { border-bottom: 0; }
.activity-row--reference .activity-row__type { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--color-raspberry-pale); color: var(--color-raspberry); }
.activity-row--reference .activity-row__copy strong { display: block; font-size: 12px; }
.activity-row--reference .activity-row__copy small { display: block; margin-top: 4px; color: var(--color-text-muted); font-size: 10px; }
.activity-row--reference .activity-row__chevron { color: var(--color-raspberry); font-size: 20px; }
.home-section--activity .home-section__footer { justify-content: center; margin-top: 10px; }

/* Boîte à idées */
.reference-library-page { display: grid; gap: 16px; }
.library-reference-hero { display: flex; min-height: 190px; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 18px; border: var(--reference-border); border-radius: 24px; background: #fff; box-shadow: var(--reference-shadow); }
.library-reference-hero__identity { display: flex; min-width: 0; align-items: center; gap: 14px; }
.library-reference-hero__identity > img { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 16px; object-fit: cover; }
.library-reference-hero__identity h2 { margin: 1px 0 4px; font-size: 26px; }
.library-reference-hero__identity p:last-child { margin: 0; color: var(--color-text-muted); font-size: 12px; }
.library-reference-hero__identity .icon-button { margin-left: 4px; color: var(--color-raspberry); }
.library-reference-hero__art { width: 230px; height: 150px; object-fit: contain; }
.library-reference-tabs { display: flex; gap: 10px; }
.library-reference-tabs button,
.library-category-chips button,
.library-status-chips button,
.reference-chip-row button { min-height: 42px; padding: 0 18px; border: 1px solid var(--color-turquoise); border-radius: 999px; background: #fff; color: #6d677c; cursor: pointer; font-weight: 850; }
.library-reference-tabs button.is-active,
.library-category-chips button.is-active,
.library-status-chips button.is-active,
.reference-chip-row button.is-active { border-color: #efc7d1; background: var(--color-raspberry-pale); color: var(--color-raspberry); }
.library-reference-info { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid rgba(243,164,131,.35); border-radius: 16px; background: #fff8f3; }
.library-reference-info > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--color-raspberry-pale); color: var(--color-raspberry); }
.library-reference-info strong { display: block; font-size: 12px; }
.library-reference-info p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 10px; }
.library-reference-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid rgba(243,164,131,.25); border-radius: 20px; background: #fff8f3; }
.library-reference-overview h2 { margin: 2px 0 5px; font-size: 21px; }
.library-reference-overview p:last-child { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.library-reference-controls { display: grid; gap: 12px; }
.library-reference-search { display: flex; align-items: center; gap: 8px; }
.library-reference-search label { width: 250px; }
.library-reference-search input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; color: var(--color-plum); }
.library-filter-panel { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.library-filter-panel.is-open { display: grid; }
.library-filter-panel label { display: grid; gap: 5px; color: var(--color-text-muted); font-size: 10px; font-weight: 800; }
.library-filter-panel select { min-height: 40px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
.reference-filter-label { margin: 0; color: var(--color-turquoise-deep); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.library-category-chips,
.library-status-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.library-category-chips button,
.library-status-chips button { min-height: 40px; padding-inline: 16px; font-size: 12px; }
.library-status-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.library-sort { display: flex; align-items: center; gap: 8px; color: var(--color-plum); font-size: 12px; font-weight: 800; }
.library-sort select { min-height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
.library-results-heading { margin: 10px 0 0; }
.library-results-heading > strong { color: var(--color-plum); font-size: 18px; }
.library-category-section { display: grid; gap: 10px; }
.library-category-section > header { display: flex; min-height: 50px; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; }
.library-category-section > header strong { font-size: 14px; }
.library-category-section > header span { color: var(--color-text-muted); font-size: 11px; }
.idea-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.idea-card--reference { min-height: 500px; overflow: visible; padding: 12px; border-top: 2px solid var(--color-coral); border-radius: 18px; background: #fff8f3; box-shadow: 0 8px 20px rgba(64,58,92,.06); }
.idea-card--reference:hover { transform: translateY(-1px); }
.idea-card__reference-top { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.idea-card__reference-image { display: grid; width: 76px; height: 76px; place-items: center; overflow: hidden; border-radius: 15px; background: var(--color-cream-strong); }
.idea-card__reference-image img { width: 100%; height: 100%; object-fit: cover; }
.idea-card__reference-image--secret { position: relative; background: var(--color-lilac-pale); color: var(--color-raspberry); }
.idea-card__reference-image--secret span .icon { width: 34px; height: 34px; }
.idea-card__reference-image--secret strong { position: absolute; right: 10px; bottom: 8px; font-size: 22px; }
.idea-card__reference-identity > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.badge--category { background: #ffe9d9; color: #b46b3d; }
.idea-card__creator-line { display: inline-flex; align-items: center; gap: 4px; color: var(--color-text-muted); font-size: 9px; }
.idea-card--reference h3 { margin: 8px 0 0; font-size: 15px; }
.idea-card--reference .idea-card__labels { position: relative; z-index: 3; margin: 9px 0 0 86px; }
.idea-card--reference .idea-card__labels span { padding: 4px 7px; border-radius: 999px; background: #fff; color: #6f697d; font-size: 9px; }
.idea-card__reference-context { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.idea-card__reference-context span { padding: 5px 8px; border: 1px solid var(--color-border); border-radius: 999px; background: #fff; color: #6f697d; font-size: 9px; }
.idea-card__reference-location { margin: 11px 0 0; color: var(--color-plum); font-size: 11px; }
.idea-card__reference-location small { color: var(--color-text-muted); }
.idea-card__reference-description { min-height: 92px; margin: 10px 0 0; padding: 10px; border: 1px solid rgba(243,164,131,.3); border-radius: 12px; background: rgba(255,255,255,.55); color: var(--color-text-muted); font-size: 10px; line-height: 1.55; }
.idea-card__reference-description strong { display: block; margin-bottom: 4px; color: #9b6c6d; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.idea-card__reference-status { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: center; margin-top: 8px; }
.badge--soft { background: #e6f0e9; color: #5b7660; }
.secret-safe-note { color: var(--color-turquoise-deep); font-size: 9px; font-weight: 800; }
.idea-card__reference-actions { position: relative; z-index: 3; display: grid; gap: 7px; margin-top: auto; padding-top: 10px; }
.idea-card__reference-actions .button { min-height: 40px; padding: 7px 10px; border-radius: 13px; font-size: 11px; }
.idea-card__open { z-index: 1; }
.idea-card--secret { border-top-color: var(--color-lilac); background: #f9f7fc; }
.idea-card--archived { opacity: .72; }

/* Pages de référence statiques */
.reference-page { display: grid; gap: 14px; }
.reference-hero { display: flex; min-height: 174px; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 20px; border: var(--reference-border); border-radius: 24px; background: #fff; box-shadow: var(--reference-shadow); }
.reference-hero h2 { margin: 1px 0 6px; font-size: 26px; }
.reference-hero p:last-child { margin: 0; color: var(--color-text-muted); font-size: 12px; }
.reference-hero img { width: 220px; height: 140px; object-fit: contain; }
.reference-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.reference-stat-card { min-height: 138px; padding: 15px; border: 1px solid var(--color-border); border-radius: 20px; }
.reference-stat-card > div { display: flex; align-items: center; justify-content: space-between; }
.reference-stat-card > div span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #fff; font-weight: 900; }
.reference-stat-card > div strong { font-size: 27px; }
.reference-stat-card h3 { margin: 12px 0 5px; font-size: 15px; }
.reference-stat-card p { color: var(--color-text-muted); font-size: 10px; }
.reference-stat-card--turquoise { background: var(--color-turquoise-pale); }
.reference-stat-card--lilac { background: var(--color-lilac-pale); }
.reference-stat-card--cream { background: var(--color-cream); }
.reference-stat-card--neutral { background: #e8e6ea; }
.agreements-summary-line { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; }
.agreements-summary-line strong,
.agreements-summary-line small { display: block; }
.agreements-summary-line small { color: var(--color-text-muted); font-size: 10px; }
.reference-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.reference-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 190px; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; }
.reference-search-row input,
.reference-search-row select { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
.reference-search-row span { font-size: 11px; font-weight: 800; }
.reference-filter-bar { display: flex; min-height: 50px; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; color: var(--color-plum); cursor: pointer; font-weight: 850; }
.reference-filter-bar span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--color-turquoise); border-radius: 50%; color: var(--color-turquoise-deep); }
.reference-list-heading { display: flex; align-items: center; justify-content: space-between; }
.reference-list-heading span { color: var(--color-text-muted); font-size: 10px; }
.reference-category-group > header { display: flex; min-height: 50px; align-items: center; justify-content: space-between; padding: 0 13px; border: 1px solid var(--color-border); border-radius: 15px; background: #fff; }
.reference-category-group > header span { color: var(--color-text-muted); font-size: 10px; }
.reference-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.reference-result-card { display: grid; grid-template-columns: 75px minmax(0,1fr); gap: 10px; padding: 12px; border: 1px solid var(--color-border); border-radius: 17px; background: #fff; }
.reference-result-card > img,
.reference-result-fallback { width: 75px; height: 75px; border-radius: 14px; object-fit: cover; }
.reference-result-fallback { display: grid; place-items: center; background: var(--color-cream-strong); color: #eec52a; font-size: 28px; }
.reference-result-card h3 { margin: 6px 0 3px; font-size: 15px; }
.reference-result-card p { margin: 0; color: var(--color-text-muted); font-size: 10px; }
.reference-result-card > div > div { display: flex; flex-wrap: wrap; gap: 4px; margin: 7px 0; }
.reference-result-card > div > div span { padding: 4px 6px; border: 1px solid var(--color-border); border-radius: 999px; font-size: 8px; }
.reference-result-card .button { min-height: 36px; padding: 6px 10px; font-size: 10px; }

.choice-tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--color-border); border-radius: 17px; background: #fff; }
.choice-tabs button { display: grid; min-height: 62px; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 14px; border: 0; background: #fff; color: var(--color-plum); text-align: left; }
.choice-tabs button span { grid-row: 1 / span 2; display: block; width: 36px; height: 36px; border-radius: 12px; background: var(--color-turquoise-pale); }
.choice-tabs button strong,
.choice-tabs button small { display: block; }
.choice-tabs button small { color: var(--color-text-muted); font-size: 9px; }
.choice-tabs button.is-active { background: var(--color-raspberry); color: #fff; }
.choice-tabs button.is-active small { color: #fff; opacity: .85; }
.choice-tabs button.is-active span { background: rgba(255,255,255,.17); }
.what-intro { display: flex; min-height: 122px; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border: 1px solid rgba(243,164,131,.4); border-radius: 20px; background: #fff8f3; }
.what-intro h2 { margin: 0 0 7px; font-size: 34px; }
.what-intro p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.what-intro > strong { display: grid; width: 120px; height: 82px; place-items: center; padding: 10px; border: 1px solid var(--color-border); border-radius: 16px; background: #fff; font-size: 28px; }
.what-intro > strong small { display: block; font-size: 8px; font-weight: 700; text-align: center; }
.what-step-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.what-step-summary span { min-height: 42px; padding: 11px 13px; border: 1px solid rgba(243,164,131,.45); border-radius: 12px; background: #fff8f3; font-size: 9px; font-weight: 800; }
.what-question { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; padding: 14px; border: 1px solid rgba(243,164,131,.45); border-radius: 18px; background: #fff8f3; }
.what-question > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #f3e4dd; color: #8d6970; }
.what-question h3 { margin: 1px 0 10px; font-size: 13px; }
.what-question select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; }
.what-option-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.what-option-grid button { min-height: 43px; padding: 7px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; color: var(--color-plum); cursor: pointer; font-weight: 800; }
.what-option-grid button.is-selected { border-color: var(--color-coral); background: var(--color-raspberry-pale); color: #7e4252; }
.what-submit { width: min(360px,100%); }

.tracking-tabs { margin-top: 1px; }
.tracking-reference-card { display: grid; grid-template-columns: 190px minmax(0,1fr); overflow: hidden; border: 1px solid var(--color-border); border-top: 5px solid var(--color-lilac); border-radius: 20px; background: #fff; box-shadow: var(--reference-shadow); }
.tracking-reference-card__image { width: 100%; height: 100%; min-height: 380px; object-fit: cover; }
.tracking-reference-card__body { padding: 16px; }
.tracking-reference-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--color-text-muted); font-size: 9px; }
.tracking-reference-card__top > span:last-child { display: inline-flex; align-items: center; gap: 4px; }
.tracking-reference-card__body > h2 { margin: 12px 0 10px; font-size: 20px; }
.reference-meta-row { display: flex; flex-wrap: wrap; gap: 5px; }
.reference-meta-row span { padding: 5px 8px; border-radius: 999px; background: var(--color-cream); font-size: 9px; }
.tracking-location { margin: 11px 0; font-size: 10px; font-weight: 800; }
.tracking-description { padding: 11px; border: 1px solid rgba(243,164,131,.35); border-radius: 12px; background: #fff8f3; color: var(--color-text-muted); font-size: 10px; }
.tracking-date-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid rgba(243,164,131,.5); border-radius: 14px; background: #fff3e5; }
.tracking-date-card > span { display: grid; width: 54px; height: 60px; place-items: center; overflow: hidden; border: 1px solid #d9c1c4; border-radius: 9px; background: #fff; }
.tracking-date-card > span strong { width: 100%; padding: 4px; background: #f1d6db; font-size: 8px; text-align: center; }
.tracking-date-card > span b { font-size: 18px; }
.tracking-date-card h3 { margin: 0; font-size: 16px; }
.tracking-date-card p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 10px; }
.tracking-detail-link { display: block; margin: 11px 0 8px; color: #7e4252; font-size: 9px; font-weight: 900; text-decoration: none; }
.tracking-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.tracking-actions .button { min-height: 42px; padding: 7px 14px; }

/* Réglages */
.settings-modal-layer { position: fixed; z-index: 90; inset: 0; display: grid; place-items: start center; padding: 72px 16px 20px; }
.settings-modal-layer__backdrop { position: absolute; inset: 0; background: rgba(64,58,92,.28); backdrop-filter: blur(6px); }
.settings-reference-modal { position: relative; z-index: 1; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: hidden; border: 1px solid var(--color-border); border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(25,20,40,.24); }
.settings-reference-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px 12px; border-bottom: 1px solid var(--color-border); background: #fff8f3; }
.settings-reference-modal > header h2 { margin: 0 0 5px; font-size: 22px; }
.workspace-mode-badge { display: inline-flex; min-height: 26px; align-items: center; padding: 0 10px; border: 1px solid #f0ccd6; border-radius: 999px; background: #fff; color: var(--color-raspberry); font-size: 9px; font-weight: 900; }
.settings-reference-modal__scroll { display: grid; gap: 12px; max-height: calc(100vh - 170px); overflow: auto; padding: 14px 16px 18px; }
.settings-plan-card,
.settings-photo-card,
.settings-partner-card,
.settings-admin-card { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid rgba(243,164,131,.35); border-radius: 17px; background: #fff8f3; }
.settings-plan-card { justify-content: space-between; }
.settings-plan-card > div { display: flex; align-items: center; gap: 10px; }
.settings-plan-card h3,
.settings-photo-card h3,
.settings-partner-card h3,
.settings-admin-card h3 { margin: 0 0 3px; font-size: 15px; }
.settings-plan-card p,
.settings-photo-card p,
.settings-partner-card p,
.settings-admin-card p { margin: 0; color: var(--color-text-muted); font-size: 9px; }
.settings-plan-card > div:last-child { display: flex; align-items: center; gap: 10px; }
.settings-text-button { border: 0; background: transparent; color: var(--color-turquoise-deep); cursor: pointer; font-size: 9px; font-weight: 900; text-decoration: underline; }
.settings-usage-card { padding: 14px; border: 1px solid var(--color-border); border-radius: 17px; background: #fff; }
.settings-usage-card > h3 { margin: 0 0 4px; font-size: 16px; }
.settings-usage-card > p { margin: 0 0 12px; color: var(--color-text-muted); font-size: 9px; }
.settings-usage-card > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.settings-usage-card article { min-height: 74px; padding: 10px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-lilac-pale); }
.settings-usage-card article strong,
.settings-usage-card article small { display: block; }
.settings-usage-card article strong { font-size: 15px; }
.settings-usage-card article small { margin-top: 4px; color: var(--color-text-muted); font-size: 8px; }
.settings-photo-card > div:last-child,
.settings-partner-card > div:nth-child(2),
.settings-admin-card > div { min-width: 0; flex: 1; }
.settings-photo-card > div:last-child > div { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 9px; }
.settings-subtitle { margin: 2px 0 0; font-size: 14px; }
.settings-partner-card .button,
.settings-admin-card .button { margin-left: auto; }
.settings-divider { height: 1px; background: var(--color-border); }
.settings-location h3 { margin: 0 0 9px; font-size: 13px; }
.settings-location > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.settings-location label { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 13px; background: #fff; }
.settings-location input { width: 100%; border: 0; outline: 0; color: var(--color-plum); }
.settings-location > p { margin: 7px 0; color: var(--color-text-muted); font-size: 8px; }
.settings-location aside { padding: 9px; border-radius: 11px; background: var(--color-turquoise-pale); color: var(--color-turquoise-deep); font-size: 8px; }
.settings-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-admin-card { border-color: rgba(105,201,195,.5); background: var(--color-turquoise-pale); }
.settings-admin-card > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #fff; color: var(--color-turquoise-deep); }

@media (max-width: 1250px) {
  .idea-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-choice-panel { grid-template-columns: 1fr 1.2fr; }
  .home-choice-panel__actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .application-shell--reference .app-main { padding-inline: 18px; }
  .home-space-card__metrics,
  .agreement-highlights--reference,
  .reference-result-grid { grid-template-columns: 1fr 1fr; }
  .reference-stat-grid { grid-template-columns: 1fr 1fr; }
  .idea-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-program-panel { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-card--reference { width: min(438px, calc(100vw - 24px)); }
  .home-onboarding--compact { grid-template-columns: 1fr; min-height: auto; }
  .home-onboarding--compact__visual { order: -1; width: min(290px, 80vw); height: auto; justify-self: center; }
  .home-action-card { grid-template-columns: 44px minmax(0,1fr); }
  .home-action-card .button { grid-column: 1 / -1; width: 100%; }
  .home-space-card__metrics,
  .agreement-highlights--reference,
  .reference-stat-grid,
  .reference-result-grid,
  .idea-card-grid,
  .what-step-summary { grid-template-columns: 1fr; }
  .home-agreements-panel__top { display: grid; }
  .agreement-pills { justify-content: flex-start; }
  .home-choice-panel { grid-template-columns: 1fr; }
  .home-choice-panel__actions { grid-column: auto; grid-template-columns: 1fr; }
  .program-card--reference { grid-template-columns: 72px minmax(0,1fr); }
  .program-card__date { grid-column: 1 / -1; justify-self: start; }
  .activity-row--reference { grid-template-columns: 40px minmax(0,1fr) 30px 16px; }
  .library-reference-hero { min-height: auto; align-items: flex-start; }
  .library-reference-hero__art { width: 110px; height: 90px; }
  .library-reference-hero__identity { align-items: flex-start; }
  .library-reference-hero__identity > img { width: 56px; height: 56px; flex-basis: 56px; }
  .library-reference-hero__identity h2 { font-size: 20px; }
  .library-reference-tabs,
  .library-reference-search,
  .library-status-row { align-items: stretch; flex-direction: column; }
  .library-reference-search label { width: 100%; }
  .library-filter-panel { grid-template-columns: 1fr; }
  .library-sort { width: 100%; justify-content: space-between; }
  .idea-card--reference { min-height: auto; }
  .reference-search-row { grid-template-columns: 1fr; }
  .choice-tabs { grid-template-columns: 1fr; }
  .what-intro { display: grid; }
  .what-intro h2 { font-size: 28px; }
  .what-option-grid { grid-template-columns: 1fr; }
  .tracking-reference-card { grid-template-columns: 1fr; }
  .tracking-reference-card__image { min-height: 220px; max-height: 260px; }
  .tracking-actions .button { width: 100%; }
  .settings-modal-layer { padding: 66px 8px 8px; }
  .settings-reference-modal { width: calc(100vw - 16px); max-height: calc(100vh - 74px); }
  .settings-reference-modal__scroll { max-height: calc(100vh - 150px); }
  .settings-plan-card,
  .settings-photo-card,
  .settings-partner-card,
  .settings-admin-card { align-items: flex-start; flex-direction: column; }
  .settings-plan-card > div:last-child { width: 100%; justify-content: space-between; }
  .settings-usage-card > div,
  .settings-photo-card > div:last-child > div,
  .settings-secondary-actions,
  .settings-location > div { grid-template-columns: 1fr; }
  .settings-partner-card .button,
  .settings-admin-card .button { width: 100%; margin-left: 0; }
}

/* Correctifs de recette visuelle alpha 6 */
.auth-page--reference {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 980px) {
  .application-shell--reference .app-topbar {
    left: 0;
  }

  .application-shell--reference .app-main {
    width: 100%;
    margin-left: 0;
    padding: 18px 12px calc(92px + env(safe-area-inset-bottom));
  }

  .application-shell--reference .app-page-content {
    max-width: 100%;
    min-width: 0;
  }

  .application-shell--reference .app-sidebar {
    top: var(--header-height);
  }
}
