/* global css */

/* global */

.main,
main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
	font-family: "AkkuratMono", sans-serif;
  text-align: left;
	font-size: 0.9rem;
	letter-spacing: 0px;
	line-height: 1.2;
	color: #333;
}

strong {
  font-weight: 800;
}

.container.content.pageContent,
#content {
  flex-grow: 1;
}

#module-b2bregistration-business .container.content.pageContent {
  display: flex;
  justify-content: center;
  align-items: center;
}

.elementor.elementor-3170101.ce-edit-wrapper {
  margin-top: auto;
}

.btn-outline-secondary:hover {
  background-color: black;
  border-color: black;
}

.btn-outline-secondary:hover {
  color: white !important;
}

.btn-outline-secondary,
.btn-outline-secondary:focus,
.btn-outline-secondary:visited {
  color: #6c757d !important;
  border-color: black;
}

.btn-outline-primary,
.btn-outline-primary:focus,
.btn-outline-primary:visited {
  color: #F5553D;
  border-color: #F5553D;
}

.btn-outline-primary:hover {
	background-color:#F5553D;
	border-color: #F5553D;
	color: white;
}

.elementor-search__products {
  max-height: fit-content !important;
}

/* info boxes */

.alert.alert-info.tme-intro-message {
	background-color: #ff3e3e5c !important;
	color: black;
}

.alert-info {
	background-color: #ff3e3e5c !important;
	color: black;
	border-color: #ff3e3e5c;
}

/* inscription */
/* === Register form — light theme, mobile-first, modern === */
.register-form {
  --bg: transparent;
  --card: #ffffff;
  --muted: #5b6470;
  --text: #111827;
  --primary: #b37a59; /* accent cuivre */
  --ring: rgba(191, 131, 92, 0.25); /* halo focus cuivre */
  --error: #c02a2a;
  --radius: 12px;
  --line: rgba(17, 24, 39, 0.08);
}

.register-form p,
.register-form label,
.register-form .form-control,
.register-form h3,
.register-form .btn {
  color: var(--text);
}

/* Carte formulaire */
.register-form form section {
  display: flex;
  flex-direction: column; /* mobile: pile */
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(17, 24, 39, 0.06);
  max-width: none;
}

/* Inputs */
.register-form .form-control {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  /* padding: 12px;
  line-height: 1.25; */
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
  height: auto;
}
.register-form .form-control::placeholder {
  color: #9aa3ad;
}
.register-form .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 6px var(--ring);
  background: #fff;
}
.register-form label {
  font-size: 0.9rem;
  margin-bottom: 6px;
  display: inline-block;
  color: var(--muted);
}
.register-form sup.required {
  color: var(--error) !important;
}

/* Password input-group */
.register-form .input-group {
  display: flex;
  align-items: stretch;
}

#password-requirements ul {
  display: flex;
  padding-left: unset !important;
}
#password-requirements ul li {
  font-size: 0.8rem !important;
  margin-right: 20px;
}
.register-form .input-group .btn:hover {
  background: #f3f4f6;
}

/* Checkboxes */
.register-form .custom-checkbox label {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: #e60019;
  background: #fff;
  height: 100%;
}
.register-form .custom-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #e60019;
}

/* CTA */
.register-form .form-footer .btn {
  background: #e60019;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  width: 100%;
  transition:
    transform 0.05s,
    box-shadow 0.18s,
    opacity 0.18s;
}
.register-form .form-footer .btn:enabled:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(191, 131, 92, 0.25);
}
.register-form .form-footer .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== Masquer les headings/HR sans trous ===== */
.register-form h3,
.register-form form section > h3,
.register-form form section > .col-md-12:has(h3),
.register-form form section > hr {
  display: none !important;
}

/* ===== Ordre visuel exact (mobile-first) ===== */
.register-form form section > *:has(#first-name) {
  order: 13;
}
.register-form form section > *:has(#last-name) {
  order: 14;
}
.register-form form section > *:has(#address-alias) {
  order: 7;
}
.register-form form section > *:has(#b2bregistration_id_country) {
  order: 2;
}

.register-form form section > .col-md-6:has([name="fields[4]"]) {
  order: 1;
}

.register-form form section > *:has(#birthdate) {
  order: 14;
}

.register-form form section > *:has(#vat_num) {
  order: 5;
}
.register-form form section > *:has(#company-name) {
  order: 3;
}

.register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="6"]) {
  flex: 1 1 calc(50% - 8px) !important;
  order: 4;
}

.register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="2"]) {
  order: 6;
}
/* Invoice email */
.register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="3"]) {
  order: 4;
}
/* Departement */
.register-form form section > *:has(#address) {
  order: 8;
}
.register-form form section > *:has(#postcode) {
  order: 9;
}
.register-form form section > *:has(#city) {
  order: 10;
}
.register-form form section > *:has(#id_state) {
  order: 11;
}
.register-form form section > *:has(#phone) {
  order: 12;
}
.register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="5"]) {
  order: 14;
  width: 100%;
  max-width: 100%;
  flex: unset;
}
.register-form form section > *:has(#email) {
  order: 15;
}
.register-form form section > *:has(#business-password) {
  order: 16;
}
.register-form form section > *:has(#confirm-password) {
  order: 17;
}

/* Autres blocs */
.register-form form section > *:has(#partner-option) {
  order: 20;
}
.register-form form section > *:has(#newsletter) {
  order: 21;
}
.register-form form section > *:has(#terms) {
  order: 22;
}
.register-form form section > #Gcaptcha {
  order: 30;
}
.register-form form section > footer {
  order: 40;
}

.register-form form section > .form-group,
.register-form form section > .col-md-3,
.register-form form section > .col-md-4,
.register-form form section > .col-md-6,
.register-form form section > .col-md-12 {
  margin-bottom: 10px;
}

.custom-checkbox .label-control span {
  margin: 0 10px;
}

/* ===== Desktop (PC) — logique stricte des lignes =====
   Seules ces paires sont côte à côte:
   - FIRST/LAST
   - COMPANY/VAT
   - POST CODE/CITY
   Tout le reste = pleine largeur.
*/
@media (min-width: 1200px) {
  /* conteneur rangées + wrap */
  .register-form form section {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 14px 16px !important;
    padding: 18px;
  }

  .register-form form section > *:has(#business-password),
  .register-form form section > *:has(#confirm-password) {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 340px; /* cohérent avec les autres items desktop */
  }

  /* Par défaut: chaque bloc prend TOUTE la largeur (évite le "tout côte à côte") */
  /* .register-form form section > .form-group,
  .register-form form section > .col-md-3,
  .register-form form section > .col-md-4,
  .register-form form section > .col-md-6,
  .register-form form section > .col-md-12 {
    flex: 1 1 100% !important;
    min-width: 340px;
  } */

  /* 1) FIRST / LAST → 50/50 */
  .register-form form section > :has(#first-name),
  .register-form form section > :has(#last-name) {
    flex: 1 1 calc(50% - 8px) !important;
    max-width: 50%;
  }

  /* 2 Alias */
  .register-form form section > :has(#address-alias) {
    flex: 1 1 100% !important;
    max-width: 100%;
  }

  /* 3 country */
  .register-form form section > :has(#b2bregistration_id_country) {
    flex: 1 1 100% !important;
    max-width: 100%;
  }

  /* 4) COMPANY / VAT → 50/50 */
  .register-form form section > *:has(#company-name),
  .register-form form section > *:has(#vat_num) {
    flex: 1 1 calc(50% - 8px) !important;
    max-width: 50%;
  }

  /* 5 Invoice mail  & departement */

  .register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="2"]),
  .register-form form section > .col-md-6:has(.rf_input_wrapper[data-id="3"]) {
    flex: 1 1 calc(50% - 8px) !important;
    max-width: 50%;
  }

  /* 6 adress */
  .register-form form section > :has(#address) {
    flex: 1 1 100% !important;
    max-width: 100%;
  }

  /* 8) POST CODE / CITY / STATE → 33/33/33 */
  .register-form form section > *:has(#postcode),
  .register-form form section > *:has(#city),
  .register-form form section > *:has(#id_state) {
    flex: 1 1 calc(33.333% - 11px) !important;
    max-width: 33.333%;
  }
  /* 9) phone*/
  .register-form form section > :has(#phone) {
    flex: 1 1 100% !important;
    max-width: 100%;
  }
  /* 10) email */
  .register-form form section > :has(#email) {
    flex: 1 1 100% !important;
    max-width: 100%;
  }
  /* 11) pwd */
  .register-form form section > :has(#business-password),
  .register-form form section > :has(#confirm-password) {
    flex: 1 1 calc(50% - 8px) !important;
    max-width: 50%;
  }

  .register-form form section > :has(#partner-option),
  .register-form form section > :has(#newsletter),
  .register-form form section > :has(#terms) {
    flex: 1 1 calc(50% - 8px) !important;
    max-width: 50%;
  }

  /* Captcha + footer en full width */
  .register-form form section > .g-recaptcha,
  .register-form form section > footer {
    flex: 0 0 100% !important;
  }
}

.form-group.col-md-4:has(#partner-option) {
  display: none !important;
}

.read-b2b-conditions {
  margin-left: 10px;
}

/* Liens / selects */
.register-form a {
  color: var(--primary);
  text-decoration: none;
}
.register-form a:hover {
  text-decoration: underline;
}
.register-form .alert.error,
#password .ps-alert-error:has(*) {
  border-radius: var(--radius);
  background: #fff1f1;
  border: 1px solid #ffd3d3;
  color: #7a1d1d;
}

#password .ps-alert-error:has(*) {
  border-radius: 20px;
  padding: 15px !important;
}
.register-form select.form-control {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(17, 24, 39, 0.55) 50%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

#business-password + .input-group-btn > button[data-action="show-password"],
#confirm-password + .input-group-btn > button[data-action="show-password"] {
  background-color: #00244d !important;
  color: #ffffff !important;
  border: 1px solid #00244d !important;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* password recovery page */
#password .pageContent #content svg {
  display: none;
}

#password .pageContent #content-wrapper ul {
  list-style: none;
  padding: unset;
}
#password .pageContent #content-wrapper ul a {
  color: #b37a59;
}

#password .renew-password .email {
  margin-bottom: 2rem;
}
/* Password validation styles */
#password-requirements {
  margin-top: 8px;
  font-size: 13px;
  color: #6c757d;
}

#password-requirements ul {
  margin-bottom: 0;
}

#password-requirements li {
  padding: 2px 0;
  transition: color 0.3s ease;
}

#password-requirements .req-icon {
  display: inline-block;
  width: 16px;
  font-weight: bold;
  margin-right: 5px;
}

#password-requirements .req-invalid {
  color: #dc3545;
}

#password-requirements .req-invalid .req-icon {
  color: #dc3545;
}

#password-requirements .req-valid {
  color: #28a745;
}

#password-requirements .req-valid .req-icon {
  color: #28a745;
}
.register-form a {
  color: #e60019;
  text-decoration: none;
  margin: 0 5px;
}

#password .col-md-5.email {
  margin-bottom: 1rem;
}

/* login page */

.page-customer-account .alert.alert-info {
  margin-top: 1rem;
}
.page-customer-account .alert.alert-info a {
  color: #e60019;
}

/* account */

.center-column .jblock-title h1,
.center-column .jblock-title h2,
.center-column .jblock-title h3,
.center-column .jblock-title h4,
.center-column .jblock-title h5 {
  font-family: "AkkuratMono", sans-serif;
  text-align: left;
  font-size: 2rem;
  text-transform: none;
  color: inherit;
}

.page-customer-account {
  font-family: "AkkuratMono", sans-serif;
}

.dropdown-item.active,
.dropdown-item:active,
.list-group-item.active {
  color: white;
  background-color: black;
}

a.list-group-item.list-group-item-action {
  text-transform: capitalize;
}

.page-customer-account H1 span,
#module-su_multibilling-billingaddresses span H1,
#order-detail H1 span {
  text-transform: capitalize;
}

li:has(#author-blog-comment-link),
li:has(#author-blog-info-link) {
  display: none !important;
}

.accountMenu {
  margin: 1rem 0 3rem;
}

@media (min-width: 1200px) {
  .accountMenu {
    margin: 1rem 0 0 0;
  }
}

.su-password-accordion__content .btn {
  padding: 8px 15px;
}

/* 1) Cacher les 2 liens */
.accountMenu a[href*="b2b-customer-create"] {
  display: none !important;
}
.accountMenu a[href*="module/mollie/subscriptions"] {
  display: none !important;
}

/* 2) Réordonner sans toucher au reste */
.accountMenu {
  display: flex;
  flex-direction: column;
}

/* Tous les liens par défaut après les 3 premiers */
.accountMenu > a.list-group-item {
  order: 10;
}

#order-slips-link {
  display: none !important;
}

/* Ordre spécifique des 3 entrées */
.accountMenu > a#my-account {
  order: 1;
}
.accountMenu > a#su-multibilling-link {
  order: 2;
}
.accountMenu > a#addresses-link {
  order: 3;
}

/* Cacher le bloc "Identification number" (champ siret) */
.form-group.row:has(input[name="siret"]) {
  display: none !important;
}

/* account page */

/* quick order */

/* ============================
   QUICK ORDER – MOBILE FIRST
   ============================ */

@media (max-width: 767.98px) {
  /* Table en largeur complète + header caché */
  #quickorderform-table {
    width: 100%;
    border-collapse: collapse;
  }

  #quickorderform-table thead {
    display: none; /* On cache l’en-tête sur mobile */
  }

  #quickorderform-table tbody,
  #quickorderform-table tbody tr,
  #quickorderform-table tbody td {
    display: block;
    width: 100%;
  }

  #quickorderform-table tbody tr {
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    padding: 0.75rem;
  }

  /* Base : chaque cellule = label au-dessus + contenu */
  #quickorderform-table tbody td {
    padding: 0.25rem 0;
  }

  #quickorderform-table tbody td::before {
    content: "";
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
  }

  /* Labels par colonne (on compte seulement les <td>, pas l'input hidden) */
  #quickorderform-table tbody td:nth-of-type(1)::before {
    content: "Reference";
  }
  #quickorderform-table tbody td:nth-of-type(2)::before {
    content: "Image";
  }
  #quickorderform-table tbody td:nth-of-type(3)::before {
    content: "Name";
  }
  #quickorderform-table tbody td:nth-of-type(4)::before {
    content: "Combination";
  }
  #quickorderform-table tbody td:nth-of-type(5)::before {
    content: "Quantity";
  }
  #quickorderform-table tbody td:nth-of-type(6)::before {
    content: "Stock";
  }
  #quickorderform-table tbody td:nth-of-type(7)::before {
    content: "Price";
  }
  #quickorderform-table tbody td:nth-of-type(8)::before {
    content: "Total";
  }
  #quickorderform-table tbody td:nth-of-type(9)::before {
    content: "Delete";
  }

  /* Champs en largeur complète par défaut */
  #quickorderform-table .form-control,
  #quickorderform-table .input-group {
    width: 100%;
    max-width: 100%;
  }

  /* Évite que des éléments débordent horizontalement */
  #quickorderform-table tbody td * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Si le conteneur faisait un scroll horizontal, on le laisse respirer */
  ._table-responsive {
    overflow-x: visible;
  }

  /* Image : taille & centrage par défaut */
  #quickorderform-table .product-image img {
    max-width: 64px;
    height: auto;
    display: block;
  }

  /* Cellule Delete : alignée à droite, sans label visible */
  #quickorderform-table tbody td:last-of-type {
    text-align: right;
  }
  #quickorderform-table tbody td:last-of-type::before {
    content: "";
  }

  /* ============================
     SUR UNE SEULE LIGNE :
     Image, Quantity, Stock, Price, Total
     ============================ */

  /* Image (2e), Quantity (5e), Stock (6e), Price (7e), Total (8e) :
     label + valeur sur la même ligne */
  #quickorderform-table tbody td:nth-of-type(2),
  #quickorderform-table tbody td:nth-of-type(5),
  #quickorderform-table tbody td:nth-of-type(6),
  #quickorderform-table tbody td:nth-of-type(7),
  #quickorderform-table tbody td:nth-of-type(8) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  #quickorderform-table tbody td:nth-of-type(2)::before,
  #quickorderform-table tbody td:nth-of-type(5)::before,
  #quickorderform-table tbody td:nth-of-type(6)::before,
  #quickorderform-table tbody td:nth-of-type(7)::before,
  #quickorderform-table tbody td:nth-of-type(8)::before {
    display: inline-block;
    margin-bottom: 0; /* on annule le margin-bottom du mode "stacked" */
  }

  /* Contenu à droite prend la place disponible */
  #quickorderform-table tbody td:nth-of-type(2) > *,
  #quickorderform-table tbody td:nth-of-type(5) .form-control,
  #quickorderform-table tbody td:nth-of-type(5) .input-group,
  #quickorderform-table tbody td:nth-of-type(6) > *,
  #quickorderform-table tbody td:nth-of-type(7) > *,
  #quickorderform-table tbody td:nth-of-type(8) > * {
    width: auto;
    max-width: 100%;
    flex: 1;
  }

  /* Image : on la laisse à droite, bien contenue */
  #quickorderform-table tbody td:nth-of-type(2) .product-image,
  #quickorderform-table tbody td:nth-of-type(2) img {
    margin-left: auto;
  }

  /* Quantity (touchspin) prend naturellement la place à droite */
  #quickorderform-table
    tbody
    td:nth-of-type(5)
    .input-group.bootstrap-touchspin {
    margin-left: auto;
  }

  /* Price / Total alignés à droite si tu gardes ce style */
  #quickorderform-table tbody td:nth-of-type(7),
  #quickorderform-table tbody td:nth-of-type(8) {
    text-align: right;
  }

  /* ============================
     TFOOT : TOTAL, CSV, ADD TO CART
     ============================ */

  #quickorderform-table tfoot tr,
  #quickorderform-table tfoot td {
    display: block;
    width: 100%;
  }

  #quickorderform-table tfoot tr {
    margin-bottom: 0.75rem;
  }

  #quickorderform-table tfoot td.bold.center {
    text-align: right;
    font-weight: 600;
  }

  #quickorderform-table .order-total {
    font-size: 1.1rem;
  }

  /* Formulaire CSV : tout en colonne */
  #sldqof_file_sending .table,
  #sldqof_file_sending .table tfoot,
  #sldqof_file_sending .table tr,
  #sldqof_file_sending .table td {
    display: block;
    width: 100%;
  }

  #sldqof_file_sending input[type="file"] {
    margin-bottom: 0.5rem;
  }

  #sldqof_file_sending button[type="submit"],
  #quickorderform-add-to-cart {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* login profile choose */
.profile-chooser__card[data-profile="customer-create"] {
  display: none;
}

.profile-chooser__grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

.profile-chooser__card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 20px 25px;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  cursor: pointer;
}

.page-header {
  text-align: center;
}
