/* ==========================================================================
   Espace client (mon-compte.html) — connexion à deux colonnes, tableau de bord en onglets, cartes de commande.
   Charte BoOKet (vert + orange) via les variables de css/base.css. Chargé après style-pro.css.
   ========================================================================== */
:root {
  --acct-line: #DCE6DE;
  --acct-soft: #F3F8F4;
  --acct-shadow: 0 1px 2px rgba(0, 40, 14, 0.05), 0 10px 30px rgba(0, 40, 14, 0.07);
}

main > .container { padding-bottom: var(--space-xl); }

/* ---------- Connexion ---------- */
.acct-auth { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); max-width: 1040px; margin: 0.5rem auto 0; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--acct-shadow); animation: acct-entree 0.6s var(--ease-standard) both; }
@keyframes acct-entree { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.acct-auth__brand { position: relative; padding: 2.4rem 2.2rem; color: #fff; background: linear-gradient(160deg, var(--color-violet-deep-1) 0%, var(--color-violet-deep-2) 60%, var(--color-violet-medium) 120%); overflow: hidden; display: flex; flex-direction: column; gap: 1.1rem; }
.acct-auth__brand::before, .acct-auth__brand::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.acct-auth__brand::before { width: 260px; height: 260px; right: -90px; top: -90px; background: rgba(250, 150, 0, 0.22); filter: blur(10px); animation: acct-flotte 9s ease-in-out infinite alternate; }
.acct-auth__brand::after { width: 220px; height: 220px; left: -80px; bottom: -80px; background: rgba(126, 217, 87, 0.2); filter: blur(10px); animation: acct-flotte 11s ease-in-out infinite alternate-reverse; }
@keyframes acct-flotte { to { transform: translate(24px, 18px) scale(1.12); } }
.acct-auth__brand > * { position: relative; z-index: 1; }
.acct-auth__logo img { height: 66px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 30, 10, 0.35)); }
.acct-auth__brand h2 { color: #fff; font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0.4rem 0 0; }
.acct-auth__brand p { color: rgba(255, 255, 255, 0.88); margin: 0; line-height: 1.55; }
.acct-auth__perks { display: grid; gap: 0.7rem; margin-top: 0.4rem; }
.acct-auth__perks li { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; font-size: 0.95rem; }
.acct-auth__perks svg { flex-shrink: 0; width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-auth__help { margin-top: auto; display: inline-flex; align-items: center; gap: 0.6rem; align-self: flex-start; padding: 0.65rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 700; font-size: 0.88rem; transition: background 0.25s; }
.acct-auth__help:hover { background: rgba(255, 255, 255, 0.26); }
.acct-auth__help svg { width: 18px; height: 18px; }

.acct-auth__form { padding: 2.4rem 2.4rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.acct-auth__form h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 0.4rem; }
.acct-auth__intro { color: var(--color-ink-soft); margin: 0 0 1.3rem; line-height: 1.55; }

/* ---------- Formulaires ---------- */
.acct-form { display: grid; gap: 1rem; }
.acct-field { display: grid; gap: 0.4rem; }
.acct-field__label { font-weight: 700; font-size: 0.86rem; color: var(--color-violet-deep-1); }
.acct-input { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.9rem; height: 52px; border: 1.5px solid var(--color-grey-300); border-radius: 14px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.acct-input:focus-within { border-color: var(--color-orange-primary); box-shadow: 0 0 0 4px rgba(250, 150, 0, 0.18); }
.acct-input > svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--color-ink-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--color-ink); }
.acct-input__eye { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--color-ink-soft); }
.acct-input__eye:hover { background: var(--acct-soft); color: var(--color-violet-deep-2); }
.acct-input__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-input__eye[aria-pressed="true"] { color: var(--color-orange-dark); }
.acct-submit { width: 100%; min-height: 50px; justify-content: center; font-size: 1rem; }
.acct-link { justify-self: center; font-weight: 700; font-size: 0.9rem; color: var(--color-violet-deep-2); text-decoration: underline; text-underline-offset: 3px; padding: 0.2rem; }
.acct-link:hover { color: var(--color-orange-dark); }
.acct-forgot { display: grid; gap: 1rem; }
.acct-forgot > .acct-auth__intro { margin: 0; }
.acct-help { margin-top: 1.4rem; border: 1px dashed var(--color-grey-300); border-radius: 14px; padding: 0.2rem 1rem; background: var(--acct-soft); }
.acct-help summary { cursor: pointer; padding: 0.8rem 0; font-weight: 700; color: var(--color-violet-deep-1); }
.acct-help__steps { list-style: decimal; padding-left: 1.2rem; display: grid; gap: 0.5rem; margin: 0 0 1rem; color: var(--color-ink-soft); line-height: 1.5; }

/* ---------- En-tête de l'espace connecté ---------- */
.acct-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; padding: 1.6rem 1.8rem; border-radius: 24px; color: #fff; background: linear-gradient(120deg, var(--color-violet-deep-1), var(--color-violet-deep-2) 60%, var(--color-violet-medium)); box-shadow: var(--acct-shadow); position: relative; overflow: hidden; animation: acct-entree 0.5s var(--ease-standard) both; }
.acct-hero::after { content: ''; position: absolute; right: -60px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(250, 150, 0, 0.25); filter: blur(8px); pointer-events: none; }
.acct-hero__who { display: flex; align-items: center; gap: 1.1rem; position: relative; z-index: 1; min-width: 0; }
.acct-avatar { flex-shrink: 0; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-family: var(--font-title); font-size: 1.8rem; font-weight: 700; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }
.acct-hero__eyebrow { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.78); font-weight: 700; }
.acct-hero h1 { color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); margin: 0.1rem 0; line-height: 1.15; }
.acct-hero__sub { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; }
.acct-hero__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; position: relative; z-index: 1; }
.acct-hero .btn-secondary { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.acct-hero .btn-secondary:hover { background: rgba(255, 255, 255, 0.26); }

/* ---------- Indicateurs ---------- */
.acct-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.acct-kpi { display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem; border-radius: 18px; background: #fff; border: 1px solid var(--acct-line); box-shadow: var(--acct-shadow); animation: acct-entree 0.5s var(--ease-standard) both; }
.acct-kpi:nth-child(2) { animation-delay: 0.06s; } .acct-kpi:nth-child(3) { animation-delay: 0.12s; } .acct-kpi:nth-child(4) { animation-delay: 0.18s; }
.acct-kpi__icon { flex-shrink: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #FFF1DC; color: var(--color-orange-dark); }
.acct-kpi__icon--green { background: var(--color-rose-pale-soft); color: var(--color-violet-deep-2); }
.acct-kpi__icon--rose { background: #FDE8EE; color: #C2185B; }
.acct-kpi__icon--blue { background: #E6F0FB; color: #1565C0; }
.acct-kpi__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-kpi > div { display: flex; flex-direction: column; min-width: 0; }
.acct-kpi strong { font-family: var(--font-title); font-size: 1.35rem; line-height: 1.1; color: var(--color-violet-deep-1); white-space: nowrap; }
.acct-kpi span:not(.acct-kpi__icon) { font-size: 0.8rem; color: var(--color-ink-soft); }

/* ---------- Onglets ---------- */
.acct-tabs { position: sticky; top: calc(var(--header-height, 110px) + 6px); z-index: 20; display: flex; gap: 0.4rem; padding: 0.4rem; margin: 0 0 1.2rem; border-radius: 16px; background: #fff; border: 1px solid var(--acct-line); box-shadow: var(--acct-shadow); overflow-x: auto; scrollbar-width: none; }
.acct-tabs::-webkit-scrollbar { display: none; }
.acct-tab { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.1rem; border-radius: 12px; font-weight: 700; font-size: 0.92rem; color: var(--color-ink-soft); white-space: nowrap; transition: background 0.2s, color 0.2s, transform 0.2s; }
.acct-tab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acct-tab:hover { background: var(--acct-soft); color: var(--color-violet-deep-2); }
.acct-tab.is-active { background: var(--gradient-brand); color: #fff; box-shadow: 0 6px 16px rgba(250, 150, 0, 0.3); }
.acct-tab__count, .acct-tab__alert { font-style: normal; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--color-violet-deep-2); color: #fff; font-size: 0.72rem; font-weight: 800; line-height: 20px; text-align: center; }
.acct-tab.is-active .acct-tab__count { background: #fff; color: var(--color-orange-dark); }
.acct-tab__alert { background: var(--color-discount); }

.acct-panel { animation: acct-entree 0.4s var(--ease-standard) both; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.1rem; margin-bottom: 1.4rem; }
.acct-card, .acct-block { background: #fff; border: 1px solid var(--acct-line); border-radius: 20px; padding: 1.4rem 1.5rem; box-shadow: var(--acct-shadow); }
.acct-card h2, .acct-block h2 { margin: 0 0 0.9rem; font-size: 1.25rem; color: var(--color-violet-deep-1); }
.acct-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.acct-card__head h2 { margin: 0; }
.acct-card__text { margin: 0 0 1rem; color: var(--color-ink-soft); line-height: 1.55; font-size: 0.93rem; }
.acct-card--help { background: linear-gradient(160deg, #fff 40%, var(--color-rose-pale-soft)); display: flex; flex-direction: column; gap: 0.9rem; }
.acct-card--help h2, .acct-card--help p { margin: 0; }
.acct-card--help p { color: var(--color-ink-soft); line-height: 1.55; }
.acct-help-btn { align-self: flex-start; gap: 0.6rem; }
.acct-help-btn svg { width: 18px; height: 18px; }
.acct-tips { display: grid; gap: 0.5rem; margin-top: auto; }
.acct-tips li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; font-weight: 600; color: var(--color-violet-deep-1); }
.acct-tips svg { flex-shrink: 0; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--color-violet-deep-2); fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.acct-block { margin-bottom: 1.2rem; }
.acct-badge { padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.74rem; font-weight: 800; }
.acct-badge--warn { background: #FFF1DC; color: #b3680a; }
.acct-badge--ok { background: #DDF3E4; color: #1d7a41; }

/* ---------- Commandes ---------- */
.acct-orders { display: grid; gap: 1rem; }
.acct-order { display: grid; gap: 1rem; padding: 1.2rem 1.3rem; border: 1px solid var(--acct-line); border-left-width: 4px; border-radius: 18px; background: #fff; transition: box-shadow 0.25s, transform 0.25s; }
.acct-order:hover { transform: translateY(-2px); box-shadow: var(--acct-shadow); }
.acct-last .acct-order { border: 0; padding: 0; box-shadow: none; transform: none; border-radius: 0; }
.acct-order__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.acct-order__head > div { display: flex; flex-direction: column; }
.acct-order__date { font-size: 1.02rem; color: var(--color-violet-deep-1); }
.acct-order__ref { font-size: 0.8rem; color: var(--color-ink-soft); }
.tag--status { padding: 0.3rem 0.8rem; border-radius: 999px; font-weight: 800; font-size: 0.78rem; }
.acct-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; margin: 0.2rem 0; }
.acct-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; font-size: 0.78rem; font-weight: 700; color: var(--color-ink-soft); }
.acct-steps li::before { content: ''; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--color-grey-200); z-index: 0; }
.acct-steps li:first-child::before { display: none; }
.acct-steps li.is-done::before { background: var(--color-violet-medium); }
.acct-steps__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--color-grey-300); font-size: 0.8rem; }
.acct-steps li.is-done .acct-steps__dot { background: var(--color-violet-medium); border-color: var(--color-violet-medium); color: #fff; }
.acct-steps li.is-current .acct-steps__dot { border-color: var(--color-orange-primary); color: var(--color-orange-dark); box-shadow: 0 0 0 4px rgba(250, 150, 0, 0.2); animation: acct-pouls 1.8s ease-in-out infinite; }
.acct-steps li.is-done, .acct-steps li.is-current { color: var(--color-violet-deep-1); }
@keyframes acct-pouls { 50% { box-shadow: 0 0 0 8px rgba(250, 150, 0, 0); } }
.acct-order__alert { margin: 0; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.88rem; font-weight: 600; }
.acct-order__alert--failed { background: #FBE3E1; color: #b3261e; } .acct-order__alert--cancelled { background: var(--color-grey-100); color: var(--color-ink-soft); }
.acct-items { display: grid; gap: 0.55rem; }
.acct-items li { display: flex; align-items: center; gap: 0.75rem; }
.acct-items img, .acct-items__ph { flex-shrink: 0; width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--acct-soft); }
.acct-items__name { flex: 1; min-width: 0; font-weight: 600; font-size: 0.92rem; }
.acct-items__qty { font-weight: 800; color: var(--color-ink-soft); font-size: 0.88rem; }
.acct-order__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; padding-top: 0.9rem; border-top: 1px dashed var(--acct-line); }
.acct-order__total { display: flex; flex-direction: column; }
.acct-order__total span { font-size: 0.78rem; color: var(--color-ink-soft); }
.acct-order__total strong { font-family: var(--font-title); font-size: 1.3rem; color: var(--color-violet-deep-1); }
.acct-order__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.acct-order__btn { padding: 0.55rem 1rem; font-size: 0.85rem; }
.acct-review { border-radius: 12px; background: var(--acct-soft); padding: 0 1rem; }
.acct-review summary { cursor: pointer; padding: 0.75rem 0; font-weight: 700; font-size: 0.9rem; color: var(--color-violet-deep-2); }
.acct-review__body { display: grid; gap: 1rem; padding-bottom: 1rem; }
.acct-review__item > strong { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; }

/* ---------- États vides ---------- */
.acct-empty { display: grid; justify-items: center; gap: 0.5rem; padding: 2.2rem 1rem; text-align: center; border-radius: 18px; background: var(--acct-soft); }
.acct-empty p { margin: 0; font-weight: 700; color: var(--color-violet-deep-1); }
.acct-empty .acct-empty__sub { font-weight: 500; color: var(--color-ink-soft); max-width: 36ch; }
.acct-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--color-violet-medium); box-shadow: var(--acct-shadow); margin-bottom: 0.3rem; }
.acct-empty__icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acct-empty--small { padding: 1.4rem 1rem; }

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 1000px) {
  .acct-auth { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .acct-auth__brand { padding: 1.6rem 1.5rem; gap: 0.8rem; }
  .acct-auth__perks, .acct-auth__brand > p { display: none; }
  .acct-auth__brand h2 { font-size: 1.35rem; }
  .acct-auth__help { margin-top: 0; }
  .acct-auth__form { padding: 1.6rem 1.4rem 1.4rem; }
  .acct-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .acct-hero { padding: 1.2rem 1.1rem; border-radius: 20px; }
  .acct-avatar { width: 52px; height: 52px; font-size: 1.5rem; }
  .acct-hero__actions { width: 100%; } .acct-hero__actions .btn { flex: 1; justify-content: center; }
  .acct-kpi { padding: 0.8rem; gap: 0.6rem; } .acct-kpi__icon { width: 40px; height: 40px; } .acct-kpi strong { font-size: 1.1rem; }
  .acct-tab { padding: 0.65rem 0.9rem; font-size: 0.85rem; } .acct-tab svg { display: none; }
  .acct-card, .acct-block { padding: 1.1rem 1rem; border-radius: 18px; }
  .acct-order { padding: 1rem; }
  .acct-order__foot { flex-direction: column; align-items: stretch; } .acct-order__actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .acct-auth, .acct-hero, .acct-kpi, .acct-panel, .acct-auth__brand::before, .acct-auth__brand::after, .acct-steps li.is-current .acct-steps__dot { animation: none; }
}

/* Téléphone : les deux boutons de l'en-tête s'empilent à pleine largeur au lieu d'être rognés. */
@media (max-width: 560px) {
  .acct-hero__actions { flex-direction: column; }
  .acct-hero__actions .btn { width: 100%; white-space: normal; text-align: center; }
  .acct-tabs { margin-inline: -0.2rem; }
}
