/**
 * Vaiggie Soul — hub Mon compte (pleine page)
 */

/* Breakout même si la body class n’est pas encore là (Elementor / cache). */
html:has(.vs-mon-compte),
html:has(body.vs-mon-compte-page),
body:has(.vs-mon-compte),
body.vs-mon-compte-page {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

body:has(.vs-mon-compte),
body.vs-mon-compte-page {
  margin: 0 !important;
  background: #fbf5ef !important;
}

/*
 * Conteneurs thème / Elementor / Woo autour du hub.
 * Cible aussi via :has(.vs-mon-compte) pour ne pas dépendre de body_class.
 */
body:has(.vs-mon-compte) .site,
body:has(.vs-mon-compte) #page,
body:has(.vs-mon-compte) #content,
body:has(.vs-mon-compte) .site-content,
body:has(.vs-mon-compte) .content-area,
body:has(.vs-mon-compte) .entry-content,
body:has(.vs-mon-compte) .entry-content > *:has(.vs-mon-compte),
body:has(.vs-mon-compte) .ast-container,
body:has(.vs-mon-compte) .ast-container-fluid,
body:has(.vs-mon-compte) .woocommerce,
body:has(.vs-mon-compte) .woocommerce-account,
body:has(.vs-mon-compte) .woocommerce-MyAccount-content,
body:has(.vs-mon-compte) .elementor,
body:has(.vs-mon-compte) .elementor-section,
body:has(.vs-mon-compte) .elementor-section.elementor-section-boxed > .elementor-container,
body:has(.vs-mon-compte) .elementor-column,
body:has(.vs-mon-compte) .elementor-column-wrap,
body:has(.vs-mon-compte) .elementor-widget-wrap,
body:has(.vs-mon-compte) .e-con,
body:has(.vs-mon-compte) .e-con-boxed,
body:has(.vs-mon-compte) .e-con-full,
body:has(.vs-mon-compte) .e-con-inner,
body:has(.vs-mon-compte) .e-con-parent,
body:has(.vs-mon-compte) .elementor-widget:has(.vs-mon-compte),
body:has(.vs-mon-compte) .elementor-widget-container:has(.vs-mon-compte),
body:has(.vs-mon-compte) .elementor-shortcode:has(.vs-mon-compte),
body.vs-mon-compte-page .site,
body.vs-mon-compte-page #page,
body.vs-mon-compte-page #content,
body.vs-mon-compte-page .site-content,
body.vs-mon-compte-page .content-area,
body.vs-mon-compte-page .entry-content,
body.vs-mon-compte-page .ast-container,
body.vs-mon-compte-page .woocommerce,
body.vs-mon-compte-page .woocommerce-account,
body.vs-mon-compte-page .elementor,
body.vs-mon-compte-page .elementor-section,
body.vs-mon-compte-page .elementor-section.elementor-section-boxed > .elementor-container,
body.vs-mon-compte-page .elementor-column-wrap,
body.vs-mon-compte-page .elementor-widget-wrap,
body.vs-mon-compte-page .e-con,
body.vs-mon-compte-page .e-con-boxed,
body.vs-mon-compte-page .e-con-full,
body.vs-mon-compte-page .e-con-inner,
body.vs-mon-compte-page .e-con-parent,
body.vs-mon-compte-page .elementor-widget:has(.vs-mon-compte),
body.vs-mon-compte-page .elementor-widget-container:has(.vs-mon-compte),
body.vs-mon-compte-page .elementor-shortcode:has(.vs-mon-compte) {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body:has(.vs-mon-compte) .e-con-boxed.e-flex,
body:has(.vs-mon-compte) .e-con-boxed > .e-con-inner,
body.vs-mon-compte-page .e-con-boxed.e-flex,
body.vs-mon-compte-page .e-con-boxed > .e-con-inner {
  --content-width: 100%;
  --width: 100%;
  max-width: 100% !important;
  width: 100% !important;
  margin-inline: 0 !important;
}

:root,
.vs-mon-compte {
  --vs-canopee: #406820;
  --vs-canopee-deep: #2f5018;
  --vs-matcha: #afc356;
  --vs-matcha-pale: #e8f0c4;
  --vs-pivoine: #f583b6;
  --vs-avoine: #fbf5ef;
  --vs-ink: #406820;
  --vs-text: #2c3224;
  --vs-mute: #6b7358;
  --vs-line: rgba(64, 104, 32, 0.14);
  --vs-radius: 18px;
  --vs-font-display: 'Cloudy Bumpy', Fredoka, 'Nunito Sans', system-ui, sans-serif;
  --vs-font-subtitle: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --vs-font-body: 'Mero Thai', 'Nunito Sans', system-ui, -apple-system, sans-serif;
}

/*
 * Plein viewport : sort du parent boxed (Elementor / thème)
 * sans provoquer de scroll horizontal (overflow-x sur html/body).
 */
.vs-mon-compte {
  position: relative;
  left: 50%;
  right: auto;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 0 0 -50vw !important;
  padding: 1.75rem clamp(1rem, 3vw, 2.75rem) 2.75rem;
  border-radius: 0 !important;
  border: 0 !important;
  color: var(--vs-text);
  font-family: var(--vs-font-body);
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(175, 195, 86, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 10%, rgba(245, 131, 182, 0.18), transparent 50%),
    linear-gradient(165deg, #fbf5ef 0%, #f3eadf 48%, #eef5d8 100%);
}

.vs-mon-compte *,
.vs-mon-compte *::before,
.vs-mon-compte *::after {
  box-sizing: border-box;
}

.vs-mon-compte__header {
  margin-bottom: 1.25rem;
}

.vs-mon-compte__eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--vs-font-subtitle);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--vs-canopee);
  letter-spacing: 0.02em;
}

.vs-mon-compte__title {
  margin: 0;
  font-family: var(--vs-font-display);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--vs-canopee-deep);
}

.vs-mon-compte__hello {
  margin: 0.45rem 0 0;
  color: var(--vs-mute);
  font-size: 1rem;
}

.vs-mon-compte__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--vs-line);
}

.vs-mon-compte__tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1 1 auto;
}

.vs-mon-compte__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none !important;
  color: var(--vs-canopee) !important;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.vs-mon-compte__tab:hover,
.vs-mon-compte__tab:focus-visible {
  background: #fff;
  border-color: rgba(64, 104, 32, 0.18);
  transform: translateY(-1px);
}

.vs-mon-compte__tab.is-active {
  background: var(--vs-canopee);
  color: #fff !important;
  border-color: var(--vs-canopee);
}

.vs-mon-compte__tab-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.vs-mon-compte__logout {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vs-mute) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.vs-mon-compte__logout:hover,
.vs-mon-compte__logout:focus-visible {
  color: var(--vs-canopee) !important;
}

.vs-mon-compte__body {
  min-height: 12rem;
  width: 100%;
}

.vs-mon-compte__cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.vs-mon-compte__card {
  margin: 0;
}

.vs-mon-compte__card-link {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  padding: 1.15rem 1.2rem;
  border-radius: var(--vs-radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(64, 104, 32, 0.1);
  box-shadow: 0 10px 28px rgba(64, 104, 32, 0.06);
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.vs-mon-compte__card-link:hover,
.vs-mon-compte__card-link:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(64, 104, 32, 0.1);
}

.vs-mon-compte__card-title {
  margin: 0;
  font-family: var(--vs-font-subtitle);
  font-size: 1.15rem;
  color: var(--vs-canopee);
}

.vs-mon-compte__card-meta {
  margin: 0;
  flex: 1 1 auto;
  color: var(--vs-mute);
  font-size: 0.92rem;
  word-break: break-word;
}

.vs-mon-compte__card-cta {
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--vs-canopee);
}

.vs-mon-compte__login {
  max-width: 420px;
  padding: 1.25rem 1.3rem;
  border-radius: var(--vs-radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(64, 104, 32, 0.1);
}

.vs-mon-compte__login .woocommerce-form-login__submit,
.vs-mon-compte__infos .woocommerce-Button {
  background: var(--vs-canopee) !important;
  border-color: var(--vs-canopee) !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 0.65rem 1.25rem !important;
  font-weight: 700 !important;
}

.vs-mon-compte__infos .woocommerce-form-row,
.vs-mon-compte__infos fieldset {
  margin-bottom: 1rem;
}

.vs-mon-compte__infos input.input-text,
.vs-mon-compte__infos select,
.vs-mon-compte__infos textarea {
  border-radius: 12px;
  border: 1px solid rgba(64, 104, 32, 0.2);
  padding: 0.55rem 0.75rem;
  background: #fff;
}

.vs-mon-compte__infos legend {
  font-family: var(--vs-font-subtitle);
  font-size: 1.05rem;
  color: var(--vs-canopee);
  padding: 0;
  margin-bottom: 0.5rem;
}

.vs-mon-compte__lieux .vs-places {
  margin: 0;
}

.vs-mon-compte__empty {
  color: var(--vs-mute);
}

@media (max-width: 640px) {
  .vs-mon-compte {
    padding: 1.1rem 0.85rem 2rem;
  }

  .vs-mon-compte__nav {
    flex-direction: column;
    align-items: stretch;
  }

  .vs-mon-compte__tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .vs-mon-compte__tab {
    justify-content: center;
    padding: 0.55rem 0.35rem;
    font-size: 0.78rem;
  }

  .vs-mon-compte__tab-icon {
    display: none;
  }

  .vs-mon-compte__logout {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vs-mon-compte__tab,
  .vs-mon-compte__card-link {
    transition: none;
  }
}
