/* ═══════════════════════════════════════════════════════════════
   Flag-select widget — used in buyer auth forms
   ═══════════════════════════════════════════════════════════════ */

.flag-select {
  position: relative;
}

.flag-select-btn {
  display: flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  background: #fff !important;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px !important;
  width: 100%;
  font-size: 16px;
}

.flag-select-flag {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 50%;
  object-position: center;
}

.flag-select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}

.flag-select-arrow {
  display: none;
}

.flag-select.open .flag-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Dropdown panel */
.flag-select-dropdown {
  display: none;
  position: absolute;
  z-index: 1000;
  top: 100%;
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid rgba(217, 217, 217, 0.8);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.flag-select.open .flag-select-dropdown {
  display: block;
}

.flag-select-search {
  display: block;
  width: 100%;
  border: none !important;
  border-bottom: 1px solid rgba(217, 217, 217, 0.5) !important;
  padding: 8px 12px;
  outline: none !important;
  font-size: 14px;
  border-radius: 10px 10px 0 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.flag-select-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
}

.flag-select-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s;
}

.flag-select-list li:hover,
.flag-select-list li.selected {
  background: rgba(238, 238, 238, 0.59);
}

.flag-select-list li img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.flag-select-list .fs-prefix {
  margin-left: auto;
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

/* Phone prefix group */
.phone-prefix-group {
  display: flex;
  align-items: center;
  position: relative;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 10px 14px 9px;
  gap: 5px;
}

.phone-prefix-group .flag-select {
  width: auto;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.phone-prefix-group .flag-select--prefix {
  flex-shrink: 0;
  position: relative;
}
.phone-prefix-group .buyer-input {
  padding: 0;
  border: none;
  border-radius: 0;
}
.phone-prefix-group .flag-select--prefix .flag-select-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.phone-prefix-group .flag-select--prefix .flag-select-btn .button_select {
  display: flex;
  gap: 4px;
  align-items: center;
  background: url(../img/select.svg) no-repeat center right / 16px;
  padding-right: 18px;
}

.phone-prefix-group .flag-select .flag-select-label {
  width: auto;
  height: auto;
  border-radius: 0;
}

.phone-prefix-group .flag-select .flag-select-arrow {
  display: none;
}

/* Country variant */
.flag-select--country {
  width: 100%;
}

.flag-select--country .flag-select-btn {
  width: 100%;
  background: url(../img/select.svg) no-repeat calc(100% - 10px) center !important;
}

/* ═══════════════════════════════════════════════════════════════
   Buyer Auth — Connexion & Inscription acheteur
   ═══════════════════════════════════════════════════════════════ */

.buyer-auth-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px 48px;
}

/* ── Card ─────────────────────────────────────────────────────── */
.buyer-auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 40px 48px;
  width: 100%;
  max-width: 680px;
}

@media (max-width: 576px) {
  .buyer-auth-card {
    padding: 28px 20px;
  }
}

/* ── Titre & sous-titre ───────────────────────────────────────── */
.buyer-auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.buyer-auth-subtitle {
  font-size: 0.9rem;
  color: #888;
  text-align: center;
  margin-bottom: 28px;
}

/* ── Champs ───────────────────────────────────────────────────── */
.buyer-field {
  margin-bottom: 20px;
}

.buyer-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.buyer-required {
  color: #e63946;
  margin-left: 2px;
}

.buyer-input {
  width: 100%;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 10px 14px;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
  box-shadow: none !important;
}

.buyer-input:focus {
  border-color: #C8A84B;
}

/* Dans un input-group Bootstrap, laisser le flex jouer */
.input-group .buyer-input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 10px 0 0 10px;
}
.input-group .input-group-append .btn {
  border-radius: 0 10px 10px 0;
}

/* ── Phone prefix dans buyer forms ────────────────────────────── */
.buyer-auth-card .phone-prefix-group {
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  background: #fff;
  padding: 4px 6px 4px 4px;
  transition: border-color 0.2s;
}

.buyer-auth-card .phone-prefix-group:focus-within {
  border-color: #C8A84B;
}

.buyer-auth-card .phone-prefix-group .buyer-input {
  border: none !important;
  border-radius: 0 !important;
  padding: 6px 8px;
  background: transparent;
}

/* ── Sélecteur pays (standalone dans buyer form) ──────────────── */
.buyer-country-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.buyer-country-btn .flag-select-label {
  flex: 1;
  color: #555;
}

.buyer-country-btn .flag-select-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
}

.buyer-auth-card .buyer-country-select.flag-select .flag-select-dropdown {
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: unset;
}

/* ── Mot de passe ─────────────────────────────────────────────── */
.buyer-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.buyer-password-wrap .buyer-input {
  padding-right: 44px;
}

.buyer-pwd-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  display: flex;
  align-items: center;
}

.buyer-pwd-toggle:hover {
  color: #C8A84B;
}

.buyer-pwd-toggle .material-icons {
  font-size: 20px;
}

/* ── CGU ──────────────────────────────────────────────────────── */
.buyer-cgu,
.buyer-remember {
  margin-bottom: 20px;
}

.buyer-cgu-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  user-select: none;
}

.buyer-cgu-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #C8A84B;
  cursor: pointer;
}

/* ── Bouton principal ─────────────────────────────────────────── */
.buyer-btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-align: center;
  background: #1a1a1a;
  color: #fff;
  margin-bottom: 16px;
}

.buyer-btn-submit:hover {
  opacity: 0.88;
}
.buyer-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.buyer-btn-submit:active {
  transform: scale(0.98);
}

/* Variante dorée (login) */
.buyer-btn-submit--gold {
  background: linear-gradient(135deg, #d4a832 0%, #C8A84B 60%, #e8c56a 100%);
  color: #fff;
}

/* ── Liens ────────────────────────────────────────────────────── */
.buyer-link-gold {
  color: #C8A84B;
  text-decoration: none;
  font-weight: 600;
}

.buyer-link-gold:hover {
  text-decoration: underline;
  color: #a0822a;
}

.buyer-login-prompt {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #888;
}

.buyer-forgot {
  font-size: 0.88rem;
}

.buyer-forgot a {
  color: #888;
  text-decoration: none;
}

.buyer-forgot a:hover {
  color: #C8A84B;
}

/* ── Séparateur ───────────────────────────────────────────────── */
.buyer-hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}

/* ── Grille 2 colonnes formulaire ────────────────────────────── */
.buyer-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

@media (max-width: 576px) {
  .buyer-form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Page succès ──────────────────────────────────────────────── */
.buyer-auth-card--success {
  max-width: 480px;
}

.buyer-success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.buyer-success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.buyer-success-text {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 16px;
}

.buyer-resend-text {
  font-size: 0.88rem;
  color: #888;
  margin-top: 8px;
}

/* ── Sidebar compte acheteur — avatar initiales ──────────────── */
.account-menu__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: rgba(213, 157, 55, .15);
  color: #D59D37;
  border: 2px solid rgba(213, 157, 55, .4);
  margin: 0 auto 10px;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.account-menu__customer-name {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px;
}

.account-menu__customer-company {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.account-menu__sep {
  border: none;
  border-top: 1px solid #eee;
  margin: 8px 0 12px;
}

/* ── Autocomplete adresse (Photon) ────────────────────────────────── */
.address-wrap {
  position: relative;
}

.address-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  max-height: 260px;
  overflow-y: auto;
}

.address-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .15s;
}
.address-suggestion:hover {
  background: #f5f5f5;
}
.address-suggestion .sug-icon {
  font-size: 18px;
  color: #999;
  flex-shrink: 0;
  margin-top: 2px;
}
.address-suggestion .sug-text {
  display: flex;
  flex-direction: column;
  font-size: .875rem;
  line-height: 1.3;
}
.address-suggestion .sug-text strong {
  font-weight: 600;
}
.address-suggestion .sug-text span {
  color: #666;
}

.address-no-country {
  padding: 8px 12px;
  font-size: .85rem;
  color: #888;
  font-style: italic;
}
