/* fairepart.vous — « Votre espace » (page privée du couple)
   Charte : titres Lora, texte Catamaran, fond clair, bleu marine, vert sauge.
   Tout est préfixé .fpv-espace pour ne pas interférer avec le thème WordPress. */
.fpv-espace {
  --e-bg: #f6f3ee;
  --e-card: #ffffff;
  --e-ink: #1e2d3f;
  --e-muted: #5b6675;
  --e-sage: #8e9c78;
  --e-sage-dark: #5f6e45;
  --e-sage-btn: #66764b;
  --e-line: #e3ddd1;
  --e-yes: #2f6b4f;
  --e-yes-bg: #e3efe7;
  --e-no: #8a3b45;
  --e-no-bg: #f5e4e6;
  --e-warn: #8a5a12;
  --e-warn-bg: #fbefd9;
  --e-title: "Lora", Georgia, "Times New Roman", serif;
  --e-text: "Catamaran", system-ui, -apple-system, "Segoe UI", sans-serif;

  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--e-text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--e-ink);
}
.fpv-espace *, .fpv-espace *::before, .fpv-espace *::after { box-sizing: border-box; }
.fpv-espace [hidden] { display: none !important; }

.fpv-espace__brand { margin: 0; font-family: var(--e-title); font-weight: 600; font-size: 1.05rem; }
.fpv-espace__brand span { color: var(--e-sage); }
.fpv-espace__head { display: flex; flex-direction: column; gap: 4px; }
.fpv-espace__eyebrow { margin: 10px 0 0; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--e-sage-dark); }
.fpv-espace__eyebrow + .fpv-espace__h1 { margin-top: 0; }
.fpv-espace__h1 { margin: 6px 0 0; font-family: var(--e-title); font-weight: 600; font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.15; text-wrap: balance; color: var(--e-ink); }
.fpv-espace__sub { margin: 0; color: var(--e-muted); }
.fpv-espace__dot { margin: 0 6px; color: var(--e-sage); }
.fpv-espace__lead { margin: 0; color: var(--e-muted); max-width: 60ch; }
.fpv-espace__h2 { margin: 0; font-family: var(--e-title); font-weight: 600; font-size: 1.25rem; color: var(--e-ink); }
.fpv-espace__muted { margin: 0; color: var(--e-muted); }

.fpv-espace__notice { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--e-yes-bg); color: var(--e-ink); }
.fpv-espace__notice--warn { background: var(--e-warn-bg); color: var(--e-warn); font-weight: 600; }

/* Résumé */
.fpv-espace__stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.fpv-espace__stat { display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: 14px; background: var(--e-card); border: 1px solid var(--e-line); min-width: 0; }
.fpv-espace__stat--main { background: var(--e-ink); border-color: var(--e-ink); color: #ffffff; }
.fpv-espace__num { font-family: var(--e-title); font-weight: 600; font-size: 2.2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fpv-espace__stat--main .fpv-espace__num { font-size: 2.8rem; }
.fpv-espace__lbl { font-size: .9rem; color: var(--e-muted); }
.fpv-espace__stat--main .fpv-espace__lbl { color: #d7dde6; }
@media (max-width: 560px) {
  .fpv-espace__stats { grid-template-columns: 1fr 1fr; }
  .fpv-espace__stat--main { grid-column: 1 / -1; }
}

/* Cartes */
.fpv-espace__card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 14px; background: var(--e-card); border: 1px solid var(--e-line); }
.fpv-espace__card--quiet { background: transparent; }
.fpv-espace__card--fun { background: #fbf8f2; }
.fpv-espace__cardhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.fpv-espace__tools, .fpv-espace__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Boutons */
.fpv-espace__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--e-sage-btn);
  background: var(--e-sage-btn); color: #ffffff; font-family: var(--e-text); font-weight: 700; font-size: .95rem;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.fpv-espace__btn:hover { background: var(--e-sage-dark); border-color: var(--e-sage-dark); color: #ffffff; }
.fpv-espace__btn--ghost { background: transparent; color: var(--e-ink); border-color: var(--e-line); }
.fpv-espace__btn--ghost:hover { background: var(--e-bg); color: var(--e-ink); border-color: var(--e-sage); }
.fpv-espace__btn--danger { background: var(--e-no); border-color: var(--e-no); }
.fpv-espace__btn--danger:hover { background: #6f2c35; border-color: #6f2c35; }
.fpv-espace__btn[disabled] { opacity: .6; cursor: wait; }
.fpv-espace :is(.fpv-espace__btn, .fpv-espace__icon, .fpv-espace__chips button, input, select):focus-visible { outline: 3px solid var(--e-sage); outline-offset: 2px; }

/* Formulaires */
.fpv-espace input[type="text"], .fpv-espace input[type="email"], .fpv-espace input[type="search"], .fpv-espace input[type="number"], .fpv-espace select {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 2px solid var(--e-line); border-radius: 10px;
  background: #ffffff; color: var(--e-ink); font-family: var(--e-text); font-size: 1rem;
}
.fpv-espace__addform { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--e-bg); }
.fpv-espace__formtitle { margin: 0; font-weight: 600; }
.fpv-espace__f { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; font-size: .85rem; font-weight: 700; color: var(--e-muted); min-width: 0; }
.fpv-espace__f--nb { flex: 0 1 120px; }
.fpv-espace__err { margin: 0; color: var(--e-no); font-weight: 600; }
.fpv-espace__findform { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.fpv-espace__findform label { font-weight: 700; font-size: .9rem; }
.fpv-espace__findform .fpv-espace__btn { align-self: flex-start; margin-top: 6px; }
.fpv-espace__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Filtres */
.fpv-espace__filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fpv-espace__search { flex: 1 1 220px; min-width: 0; }
.fpv-espace__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fpv-espace__chips button {
  min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--e-line); background: #ffffff;
  color: var(--e-ink); font-family: var(--e-text); font-weight: 600; font-size: .9rem; cursor: pointer;
}
.fpv-espace__chips button.is-on { background: var(--e-ink); border-color: var(--e-ink); color: #ffffff; }

/* Liste */
.fpv-espace__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fpv-espace__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--e-line);
}
.fpv-espace__item:first-child { border-top: 0; }
.fpv-espace__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fpv-espace__name { font-weight: 700; overflow-wrap: anywhere; }
.fpv-espace__meta { font-size: .85rem; color: var(--e-muted); }
.fpv-espace__badges { display: flex; flex-wrap: wrap; gap: 4px; }
.fpv-espace__badge { font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--e-bg); color: var(--e-muted); }
.fpv-espace__badge--warn { background: var(--e-warn-bg); color: var(--e-warn); }
.fpv-espace__ans { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.fpv-espace__pill { font-weight: 700; font-size: .85rem; padding: 3px 12px; border-radius: 999px; }
.fpv-espace__pill--oui { background: var(--e-yes-bg); color: var(--e-yes); }
.fpv-espace__pill--non { background: var(--e-no-bg); color: var(--e-no); }
.fpv-espace__pers { font-weight: 700; font-variant-numeric: tabular-nums; }
.fpv-espace__acts { display: flex; gap: 4px; }
.fpv-espace__icon {
  min-height: 36px; padding: 4px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--e-muted);
  font-family: var(--e-text); font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.fpv-espace__icon:hover { background: var(--e-bg); color: var(--e-ink); }
.fpv-espace__confirm { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--e-no-bg); }
.fpv-espace__card--quiet .fpv-espace__confirm { background: var(--e-warn-bg); }
.fpv-espace__confirm span { font-weight: 600; margin-right: 4px; }
@media (max-width: 560px) {
  .fpv-espace__item { grid-template-columns: minmax(0, 1fr) auto; }
  .fpv-espace__acts { grid-column: 1 / -1; justify-content: flex-start; margin-left: -10px; }
}
.fpv-espace__empty { padding: 20px; border-radius: 12px; background: var(--e-bg); text-align: center; }
.fpv-espace__empty p { margin: 0; }
.fpv-espace__empty p + p { margin-top: 4px; color: var(--e-muted); }
.fpv-espace__noresult { margin: 0; color: var(--e-muted); }

/* Liens */
.fpv-espace__link { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--e-line); }
.fpv-espace__link:first-of-type { border-top: 0; padding-top: 0; }
.fpv-espace__ltitle { margin: 0; font-weight: 700; }
.fpv-espace__url { margin: 0; font-size: .85rem; color: var(--e-muted); overflow-wrap: anywhere; }
.fpv-espace__top { margin: 0; padding-left: 1.4em; }

/* Notification */
.fpv-espace__toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 9999;
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px; background: var(--e-ink); color: #ffffff;
  font-family: var(--e-text); font-weight: 600; box-shadow: 0 8px 24px rgba(30, 45, 63, .25);
}

@media (prefers-reduced-motion: no-preference) {
  .fpv-espace__toast { transition: opacity .2s; }
}

/* ── Intégration à la mise en page du site (main.landing_mev > .hero-carousel) ── */
.landing_mev .fpv-espace--hero { padding-bottom: 0; }
.landing_mev .hero-carousel + .fpv-espace { padding-top: 16px; }

/* ── Livre d'or ── */
.fpv-espace__count { display: inline-block; min-width: 1.6em; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--e-bg); color: var(--e-muted); font-family: var(--e-text); font-size: .85rem; font-weight: 600; text-align: center; vertical-align: middle; }
.fpv-espace__msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fpv-espace__msg { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--e-line); }
.fpv-espace__msg:first-child { border-top: 0; padding-top: 4px; }
.fpv-espace__msghead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fpv-espace__msghead .fpv-espace__icon { margin-left: auto; }
.fpv-espace__msgtext { margin: 0; font-family: var(--e-title); font-style: italic; line-height: 1.6; color: var(--e-ink); overflow-wrap: anywhere; }
.fpv-espace__more { align-self: center; }

/* ── Galerie ── */
.fpv-espace__gstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fpv-espace__gstats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; background: var(--e-bg); text-align: center; }
.fpv-espace__gnum { font-family: var(--e-title); font-weight: 600; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .fpv-espace__gstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fpv-espace__topmedia ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fpv-espace__topmedia a, .fpv-espace__thumb { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--e-bg); }
.fpv-espace__topmedia img, .fpv-espace__topmedia video, .fpv-espace__thumb img, .fpv-espace__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fpv-espace__likes, .fpv-espace__vbadge { position: absolute; left: 6px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(30, 45, 63, .72); color: #fff; font-size: .8rem; font-weight: 600; }
.fpv-espace__vbadge { top: 6px; bottom: auto; }
.fpv-espace__manage { border-top: 1px solid var(--e-line); padding-top: 12px; }
.fpv-espace__manage > summary { cursor: pointer; font-weight: 600; color: var(--e-sage-btn); list-style-position: inside; }
.fpv-espace__manage[open] > summary { margin-bottom: 10px; }
.fpv-espace__manage > .fpv-espace__muted { margin-bottom: 10px; }
.fpv-espace__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fpv-espace__tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fpv-espace__tilebar { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.fpv-espace__tile .fpv-espace__confirm { flex-direction: column; align-items: stretch; padding: 8px; }
.fpv-espace__tile .fpv-espace__confirm span { margin: 0; font-size: .9rem; }
.fpv-espace__manage .fpv-espace__more { display: block; margin: 12px auto 0; }
