/* =====================================================================
   Pépinière Fidèle Briant — Boutique : panier, tunnel de commande,
   compte client. Design maison, palette vert forêt + accent lime.
   Toutes les classes sont préfixées .pf- pour éviter les collisions.
   ===================================================================== */

:root {
  --pf-green-900: #14342a;
  --pf-green-800: #1b4332;
  --pf-green-700: #2d6a4f;
  --pf-green-600: #0b6b55;
  --pf-green-500: #40916c;
  --pf-green-400: #52b788;
  --pf-lime: #85BF18;
  --pf-lime-dark: #6fa312;
  --pf-cream: #f4f9f4;
  --pf-paper: #ffffff;
  --pf-ink: #1f2d27;
  --pf-muted: #6b7d74;
  --pf-line: #e7efe9;
  --pf-danger: #c0392b;
  --pf-shadow-sm: 0 6px 18px rgba(20, 52, 42, 0.06);
  --pf-shadow-md: 0 18px 40px rgba(20, 52, 42, 0.10);
  --pf-shadow-lg: 0 28px 60px rgba(20, 52, 42, 0.16);
  --pf-radius: 18px;
  --pf-radius-sm: 12px;
  --pf-font: 'Outfit', 'DM Sans', system-ui, sans-serif;
}

/* ───────────────────────── Layout de page ───────────────────────── */
.pf-page {
  background:
    radial-gradient(1100px 480px at 88% -8%, rgba(133, 191, 24, 0.08), transparent 60%),
    radial-gradient(900px 460px at -6% 4%, rgba(45, 106, 79, 0.07), transparent 55%),
    var(--pf-cream);
  padding: 38px 0 80px;
  font-family: var(--pf-font);
  color: var(--pf-ink);
}
.pf-container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

.pf-page-head { text-align: center; margin-bottom: 26px; }
.pf-page-head h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800; color: var(--pf-green-800); margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.pf-page-head p { color: var(--pf-muted); font-size: .98rem; margin: 0; }

.pf-grid { display: grid; grid-template-columns: 1fr 372px; gap: 26px; align-items: start; }
@media (max-width: 940px) { .pf-grid { grid-template-columns: 1fr; } }

.pf-card {
  background: var(--pf-paper); border: 1px solid var(--pf-line);
  border-radius: var(--pf-radius); box-shadow: var(--pf-shadow-sm);
  padding: 22px;
}
.pf-card + .pf-card { margin-top: 18px; }
.pf-card__title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.08rem; font-weight: 700; color: var(--pf-green-800);
  margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--pf-line);
}
.pf-card__title i { color: var(--pf-lime); }

/* ───────────────────────── Stepper 01→05 ───────────────────────── */
.pf-steps {
  display: flex; gap: 8px; margin: 0 auto 28px; max-width: 920px;
  flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.pf-steps::-webkit-scrollbar { display: none; }
.pf-step {
  flex: 1 1 0; min-width: 120px; position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--pf-paper); border: 1px solid var(--pf-line);
  color: var(--pf-muted); font-size: .82rem; font-weight: 600;
  box-shadow: var(--pf-shadow-sm); transition: .25s;
}
.pf-step__num {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--pf-cream); color: var(--pf-muted); border: 1px solid var(--pf-line);
}
.pf-step__label { line-height: 1.15; }
.pf-step__label small { display: block; font-weight: 500; opacity: .7; font-size: .72rem; }
.pf-step.is-done { color: var(--pf-green-700); }
.pf-step.is-done .pf-step__num { background: var(--pf-green-400); color: #fff; border-color: var(--pf-green-400); }
.pf-step.is-active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--pf-green-700), var(--pf-green-500));
  box-shadow: 0 14px 26px rgba(45, 106, 79, 0.30);
}
.pf-step.is-active .pf-step__num { background: rgba(255,255,255,.22); color: #fff; border-color: transparent; }

/* ───────────────────────── Boutons ───────────────────────── */
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 50px; font-weight: 700; font-size: .94rem;
  font-family: var(--pf-font); cursor: pointer; border: none; text-decoration: none;
  transition: transform .18s, box-shadow .18s, background .2s; white-space: nowrap;
}
.pf-btn:active { transform: translateY(1px); }
.pf-btn--primary {
  background: linear-gradient(135deg, var(--pf-green-700), var(--pf-green-500));
  color: #fff; box-shadow: 0 12px 24px rgba(45, 106, 79, 0.28);
}
.pf-btn--primary:hover { color:#fff; box-shadow: 0 16px 30px rgba(45, 106, 79, 0.36); transform: translateY(-2px); }
.pf-btn--accent {
  background: linear-gradient(135deg, var(--pf-lime), #a4d72a);
  color: #1c2b06; box-shadow: 0 12px 24px rgba(133, 191, 24, 0.32);
}
.pf-btn--accent:hover { color:#1c2b06; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(133,191,24,.42); }
.pf-btn--ghost { background: var(--pf-cream); color: var(--pf-green-800); border: 1px solid var(--pf-line); }
.pf-btn--ghost:hover { background: #eaf3ec; color: var(--pf-green-900); }
.pf-btn--block { width: 100%; }
.pf-btn--lg { padding: 15px 30px; font-size: 1rem; }
.pf-btn[disabled], .pf-btn.is-disabled { opacity: .55; pointer-events: none; }
.pf-btn--danger-ghost { background: transparent; color: var(--pf-danger); border: 1px solid #f0d5d1; }
.pf-btn--danger-ghost:hover { background: #fcecea; }

.pf-link { color: var(--pf-green-700); font-weight: 600; text-decoration: none; }
.pf-link:hover { color: var(--pf-green-600); text-decoration: underline; }

/* ───────────────────────── Panier ───────────────────────── */
.pf-cart-item {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 16px;
  align-items: center; padding: 16px 0; border-bottom: 1px solid var(--pf-line);
}
.pf-cart-item:last-child { border-bottom: none; }
.pf-cart-item__thumb {
  width: 84px; height: 84px; border-radius: 14px; overflow: hidden;
  background: var(--pf-cream); flex: 0 0 84px;
}
.pf-cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pf-cart-item__name { font-weight: 700; color: var(--pf-green-800); font-size: 1rem; margin: 0 0 3px; text-decoration: none; }
.pf-cart-item__name:hover { color: var(--pf-green-600); }
.pf-cart-item__meta { font-size: .8rem; color: var(--pf-muted); margin: 0; }
.pf-cart-item__price { font-weight: 700; color: var(--pf-ink); }
.pf-cart-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pf-line-total { font-size: 1.05rem; font-weight: 800; color: var(--pf-green-700); white-space: nowrap; }

/* Stepper quantité */
.pf-qty {
  display: inline-flex; align-items: center; background: var(--pf-cream);
  border: 1px solid var(--pf-line); border-radius: 50px; overflow: hidden;
}
.pf-qty button {
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  color: var(--pf-green-700); font-size: 1rem; display: grid; place-items: center; transition: .15s;
}
.pf-qty button:hover { background: #e4efe6; color: var(--pf-green-900); }
.pf-qty input {
  width: 42px; height: 34px; border: none; background: transparent; text-align: center;
  font-weight: 700; color: var(--pf-ink); font-size: .95rem; -moz-appearance: textfield;
}
.pf-qty input::-webkit-outer-spin-button, .pf-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-remove { background: none; border: none; color: var(--pf-muted); cursor: pointer; font-size: .82rem; display: inline-flex; align-items: center; gap: 5px; transition: .15s; }
.pf-remove:hover { color: var(--pf-danger); }

/* ───────────────────────── Récap / Summary ───────────────────────── */
.pf-summary { position: sticky; top: 18px; }
.pf-summary__row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: .95rem; color: var(--pf-ink); }
.pf-summary__row span:first-child { color: var(--pf-muted); }
.pf-summary__row--total {
  margin-top: 8px; padding-top: 16px; border-top: 2px dashed var(--pf-line);
  font-size: 1.25rem; font-weight: 800; color: var(--pf-green-800);
}
.pf-summary__row--total .pf-amount { color: var(--pf-green-700); }
.pf-summary__note { font-size: .8rem; color: var(--pf-muted); margin: 12px 0 0; display: flex; gap: 8px; align-items: flex-start; }
.pf-summary__note i { color: var(--pf-lime); margin-top: 2px; }
.pf-summary .pf-btn { margin-top: 16px; }

.pf-trust { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; }
.pf-trust__item { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--pf-muted); }
.pf-trust__item i { color: var(--pf-green-500); font-size: 1rem; }

/* ───────────────────────── Adresses ───────────────────────── */
.pf-addr-list { display: grid; gap: 14px; }
.pf-addr {
  display: flex; gap: 14px; padding: 16px; border: 1.5px solid var(--pf-line);
  border-radius: var(--pf-radius-sm); cursor: pointer; transition: .2s; background: var(--pf-paper);
}
.pf-addr:hover { border-color: var(--pf-green-400); box-shadow: var(--pf-shadow-sm); }
.pf-addr input[type="radio"] { margin-top: 4px; accent-color: var(--pf-green-700); width: 18px; height: 18px; }
.pf-addr.is-selected { border-color: var(--pf-green-700); background: #f5fbf6; box-shadow: 0 0 0 3px rgba(45,106,79,.10); }
.pf-addr__name { font-weight: 700; color: var(--pf-green-800); margin: 0 0 3px; }
.pf-addr__name .pf-tag { font-size: .68rem; background: var(--pf-lime); color: #1c2b06; padding: 2px 8px; border-radius: 20px; margin-left: 8px; font-weight: 700; vertical-align: middle; }
.pf-addr__meta { font-size: .85rem; color: var(--pf-muted); margin: 0; line-height: 1.5; }

/* ───────────────────────── Formulaires ───────────────────────── */
.pf-form { display: grid; gap: 16px; }
.pf-form--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .pf-form--2 { grid-template-columns: 1fr; } }
.pf-field { display: flex; flex-direction: column; gap: 6px; }
.pf-field.pf-col-2 { grid-column: 1 / -1; }
.pf-field label { font-size: .82rem; font-weight: 600; color: var(--pf-green-800); }
.pf-field input, .pf-field select, .pf-field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--pf-line); border-radius: 12px;
  font-family: var(--pf-font); font-size: .95rem; color: var(--pf-ink); background: #fcfdfc; transition: .15s;
}
.pf-field input:focus, .pf-field select:focus, .pf-field textarea:focus {
  outline: none; border-color: var(--pf-green-400); background: #fff;
  box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.15);
}
.pf-field .pf-help { font-size: .76rem; color: var(--pf-muted); }
.pf-field .pf-err, .pf-errorlist { color: var(--pf-danger); font-size: .8rem; margin: 2px 0 0; padding: 0; list-style: none; }
.pf-check { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--pf-ink); }
.pf-check input { width: 18px; height: 18px; accent-color: var(--pf-green-700); }

/* ───────────────────────── Notices ───────────────────────── */
.pf-notice {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px;
  border-radius: var(--pf-radius-sm); background: #fff8ec; border: 1px solid #f3e2c0;
}
.pf-notice__icon { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #f9a826; color: #fff; font-size: 1.2rem; }
.pf-notice h3 { margin: 0 0 6px; font-size: 1.05rem; color: #8a5a00; font-weight: 700; }
.pf-notice p { margin: 0; color: #7a6230; font-size: .9rem; line-height: 1.6; }

/* ───────────────────────── Empty state ───────────────────────── */
.pf-empty { text-align: center; padding: 60px 20px; }
.pf-empty__icon { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 22px; display: grid; place-items: center; background: linear-gradient(135deg, #eaf5ec, #dcefe0); color: var(--pf-green-500); font-size: 2.6rem; }
.pf-empty h3 { font-size: 1.35rem; font-weight: 800; color: var(--pf-green-800); margin: 0 0 8px; }
.pf-empty p { color: var(--pf-muted); margin: 0 auto 22px; max-width: 420px; }

/* ───────────────────────── Confirmation ───────────────────────── */
.pf-confirm-hero { text-align: center; padding: 14px 0 28px; }
.pf-confirm-check {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pf-green-500), var(--pf-green-400)); color: #fff; font-size: 2.6rem;
  box-shadow: 0 18px 40px rgba(64, 145, 108, 0.4); animation: pfPop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pfPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pf-confirm-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--pf-green-800); font-weight: 800; margin: 0 0 8px; }
.pf-confirm-hero .pf-order-num { display: inline-block; margin-top: 10px; background: var(--pf-cream); border: 1px dashed var(--pf-green-400); color: var(--pf-green-700); font-weight: 800; padding: 8px 18px; border-radius: 50px; letter-spacing: .03em; }

.pf-recap-table { width: 100%; border-collapse: collapse; }
.pf-recap-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pf-muted); padding: 8px 0; border-bottom: 1px solid var(--pf-line); }
.pf-recap-table td { padding: 12px 0; border-bottom: 1px solid var(--pf-line); font-size: .92rem; vertical-align: top; }
.pf-recap-table td.pf-num, .pf-recap-table th.pf-num { text-align: right; white-space: nowrap; }

/* ───────────────────────── Auth (login / register) ───────────────────────── */
.pf-auth-wrap { max-width: 480px; margin: 0 auto; }
.pf-auth-wrap.pf-auth-wide { max-width: 560px; }
.pf-auth-card { background: var(--pf-paper); border: 1px solid var(--pf-line); border-radius: 22px; box-shadow: var(--pf-shadow-md); padding: 34px 30px; }
.pf-auth-head { text-align: center; margin-bottom: 24px; }
.pf-auth-head .pf-leaf { width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--pf-green-700), var(--pf-green-400)); color: #fff; font-size: 1.4rem; }
.pf-auth-head h1 { font-size: 1.5rem; font-weight: 800; color: var(--pf-green-800); margin: 0 0 6px; }
.pf-auth-head p { color: var(--pf-muted); font-size: .9rem; margin: 0; }
.pf-auth-foot { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--pf-muted); }
.pf-formerrors { background: #fcecea; border: 1px solid #f3c8c2; color: #a13226; border-radius: 12px; padding: 12px 16px; font-size: .86rem; margin-bottom: 18px; }

/* Bandeau de bascule connexion / inscription dans le tunnel */
.pf-auth-switch { display: flex; gap: 10px; background: var(--pf-cream); border-radius: 50px; padding: 5px; margin-bottom: 22px; }
.pf-auth-switch a { flex: 1; text-align: center; padding: 10px; border-radius: 50px; font-weight: 700; font-size: .9rem; color: var(--pf-muted); text-decoration: none; transition: .2s; }
.pf-auth-switch a.is-active { background: #fff; color: var(--pf-green-700); box-shadow: var(--pf-shadow-sm); }

/* ───────────────────────── Dashboard ───────────────────────── */
.pf-dash-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.pf-order-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px; border: 1px solid var(--pf-line); border-radius: 14px; transition: .2s; }
.pf-order-row:hover { box-shadow: var(--pf-shadow-sm); border-color: var(--pf-green-400); }
.pf-order-row__main { display: flex; flex-direction: column; gap: 3px; }
.pf-order-row__num { font-weight: 800; color: var(--pf-green-800); }
.pf-order-row__meta { font-size: .82rem; color: var(--pf-muted); }
.pf-badge-status { font-size: .74rem; font-weight: 700; padding: 4px 12px; border-radius: 50px; }
.pf-badge-status.s-pending_payment { background: #fff3df; color: #a96b00; }
.pf-badge-status.s-to_contact { background: #e6f0ff; color: #1d5fb0; }
.pf-badge-status.s-confirmed { background: #e6f6ec; color: #1d7a45; }
.pf-badge-status.s-delivered { background: #e9f7ef; color: #11663a; }
.pf-badge-status.s-cancelled { background: #fbe9e7; color: #b23a2c; }

/* ───────────────────────── Badge panier (header) ───────────────────────── */
.pf-cart-link { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.pf-cart-badge {
  position: absolute; top: -8px; right: -10px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 50px; background: var(--pf-lime); color: #1c2b06; font-size: .68rem; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); line-height: 1;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.pf-cart-badge.is-empty { display: none; }
.pf-cart-badge.pf-bump { animation: pfBump .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes pfBump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* Header desktop : icônes panier + compte */
.pf-header-actions { display: inline-flex; align-items: center; gap: 18px; margin-right: 6px; }
.pf-header-ico { position: relative; color: var(--pf-green-800); font-size: 1.18rem; text-decoration: none; transition: .15s; }
.pf-header-ico:hover { color: var(--pf-green-600); }

/* ───────────────────────── Toast ───────────────────────── */
#pf-toasts { position: fixed; top: 90px; right: 18px; z-index: 12000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.pf-toast {
  display: flex; align-items: center; gap: 12px; background: #fff; border-left: 4px solid var(--pf-green-500);
  border-radius: 12px; box-shadow: var(--pf-shadow-lg); padding: 13px 18px 13px 14px; min-width: 250px; max-width: 360px;
  font-size: .9rem; color: var(--pf-ink); pointer-events: auto;
  animation: pfToastIn .35s cubic-bezier(.34,1.56,.64,1);
}
.pf-toast.is-out { animation: pfToastOut .3s forwards; }
.pf-toast__ico { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center; background: var(--pf-green-500); color: #fff; }
.pf-toast.level-error { border-left-color: var(--pf-danger); }
.pf-toast.level-error .pf-toast__ico { background: var(--pf-danger); }
.pf-toast a { color: var(--pf-green-700); font-weight: 700; text-decoration: none; }
@keyframes pfToastIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pfToastOut { to { transform: translateX(120%); opacity: 0; } }
@media (max-width: 560px) { #pf-toasts { left: 12px; right: 12px; top: auto; bottom: 86px; } .pf-toast { max-width: none; } }

/* ───────────────────────── Add-to-cart fiche produit ───────────────────────── */
.pf-buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pf-buy-row .pf-qty { transform: scale(1.05); }

/* Quick-add sur la grille boutique */
.pf-quickadd {
  border: none; background: var(--pf-green-700); color: #fff; border-radius: 12px;
  width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; font-size: 1rem;
  box-shadow: 0 8px 18px rgba(45,106,79,.3); transition: .18s;
}
.pf-quickadd:hover { background: var(--pf-green-600); transform: translateY(-2px); }

.pf-spin { display: inline-block; animation: pfspin .7s linear infinite; }
@keyframes pfspin { to { transform: rotate(360deg); } }

/* ───────────────────────── CAPTCHA ───────────────────────── */
.pf-captcha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-captcha__img { height: 64px; width: 190px; border-radius: 10px; border: 1px solid var(--pf-line); background: #fff; display: block; }
.pf-captcha__refresh { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; border: 1px solid var(--pf-line); background: var(--pf-cream); color: var(--pf-green-700); cursor: pointer; display: grid; place-items: center; transition: .15s; }
.pf-captcha__refresh:hover { background: #e4efe6; color: var(--pf-green-900); }
.pf-captcha input { flex: 1 1 140px; min-width: 130px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
