/* Espace client du site (27/10/2026) : en-tête (« Pro », icône de liste), menu du compte, choix particulier /
   professionnel, page /compte/ (assets/customer-space.js). */

/* En-tête ----------------------------------------------------------------------------------------------------- */
.home-redesign .site-header .pro-mode-toggle,
.pro-mode-toggle {
  flex: 0 0 auto;
  min-width: 52px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #ffffff30;
  border-radius: 4px;
  background: transparent;
  color: #a6ad9f;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.home-redesign .site-header .pro-mode-toggle.active,
.pro-mode-toggle.active {
  border-color: #f7df22;
  background: #f7df2218;
  color: #f7df22;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px #f7df22;
}
@media (hover: hover) and (pointer: fine) {
  .home-redesign .site-header .pro-mode-toggle:hover { border-color: #ffffff60; color: #f4f5ee; }
  .home-redesign .site-header .pro-mode-toggle.active:hover { color: #ffe941; border-color: #ffe941; }
}

/* Liste : icône seule, plus grande, pastille du nombre. */
.home-redesign .site-header #openListTop.list-icon-button {
  position: relative;
  width: 48px;
  min-width: 48px;
  padding: 0;
  justify-content: center;
}
.home-redesign .site-header #openListTop.list-icon-button > svg { width: 23px; height: 23px; }
.home-redesign .site-header #openListTop.list-icon-button #quoteCountTop {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border: 2px solid #20251f;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}
.home-redesign .site-header #openListTop.list-icon-button #quoteCountTop[data-count="0"] { display: none; }

@media (max-width: 880px) {
  .home-redesign .site-header .main-nav { grid-template-columns: 44px minmax(0, 1fr) auto auto 44px; }
  .home-redesign .site-header #proModeToggle { grid-column: 3; grid-row: 1; }
  .home-redesign .site-header #openListTop { grid-column: 4; grid-row: 1; }
  .home-redesign .site-header #openCustomerPanel { grid-column: 5; grid-row: 1; }
}
@media (max-width: 540px) {
  .home-redesign .site-header .main-nav { grid-template-columns: 40px minmax(0, 1fr) auto auto 40px; }
  .home-redesign .site-header .pro-mode-toggle { min-width: 44px; height: 40px; padding: 0 9px; font-size: 12px; }
  .home-redesign .site-header #openListTop.list-icon-button { width: 42px; min-width: 42px; min-height: 40px; }
  .home-redesign .site-header .brand { width: 120px; }
}

/* Menu du compte connecté. */
.customer-menu {
  position: fixed;
  z-index: 130;
  display: grid;
  min-width: 200px;
  padding: 6px;
  border: 1px solid #e2e4dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px #0003;
}
.customer-menu[hidden] { display: none; }
.customer-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #1a1d1b;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.customer-menu-item svg { width: 18px; height: 18px; color: #5f6559; }
.customer-menu-item:hover, .customer-menu-item:focus-visible { background: #f4f2dc; outline: none; }

/* Première visite : particulier ou professionnel. */
.customer-type-modal { z-index: 135; }
.customer-type-modal .customer-type-panel {
  width: min(440px, calc(100vw - 32px));
  padding: 26px 24px 24px;
  border-radius: 16px;
  text-align: center;
}
.customer-type-panel h2 { margin: 0 0 18px; font-size: 22px; }
.customer-type-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.customer-type-choice {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 12px;
  border: 2px solid #e2e4dc;
  border-radius: 12px;
  background: #fafaf6;
  color: #1a1d1b;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.customer-type-choice svg { width: 30px; height: 30px; }
.customer-type-choice strong { font-size: 16px; }
.customer-type-choice small { color: #5f6559; font-size: 13px; }
.customer-type-choice:hover, .customer-type-choice:focus-visible { border-color: #f7df22; background: #fffbe0; transform: translateY(-1px); outline: none; }

/* Page Espace client --------------------------------------------------------------------------------------- */
body:not(.account-view) #customerSpace { display: none; }
body.account-view main > :not(#customerSpace) { display: none !important; }
.customer-space { padding: 32px 20px 64px; background: #f4f4ef; min-height: calc(100vh - var(--public-header-height, 72px)); }
.customer-space-inner { width: min(1040px, 100%); margin: 0 auto; }
.customer-space-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
/* En-tête (27/10/2026) : avatar + nom ; la déconnexion reste dans l'en-tête du site. */
.customer-space-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.customer-space-identity-text { display: grid; gap: 3px; min-width: 0; }
.customer-space-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; background: #1a1d1b; color: #f7df22; font-size: 22px; font-weight: 850; flex: 0 0 auto; }
.customer-space-name { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 850; line-height: 1.15; letter-spacing: -.01em; text-transform: none; overflow-wrap: anywhere; }
.customer-space-sub { color: #5f6559; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.customer-space-login h1 { text-transform: none; letter-spacing: -.01em; }

.customer-space-tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 18px; overflow-x: auto; border-radius: 12px; background: #fff; border: 1px solid #e2e4dc; scrollbar-width: none; }
.customer-space-tabs::-webkit-scrollbar { display: none; }
.customer-space-tab { display: inline-flex; align-items: center; gap: 8px; flex: 1 0 auto; justify-content: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: none; color: #3e443a; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.customer-space-tab-icon { display: inline-flex; }
.customer-space-tab svg { width: 18px; height: 18px; }
.customer-space-tab-chevron, .customer-space-section-bar { display: none; }
.customer-space-tab[aria-selected="true"] { background: #1a1d1b; color: #f7df22; }
.customer-space-tab:hover:not([aria-selected="true"]) { background: #f4f2dc; }

.customer-space-panel { display: grid; gap: 14px; }
.customer-space-card { display: grid; align-content: start; gap: 12px; padding: 18px; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; }
.customer-space-card h2, .customer-space-section-head h2 { margin: 0; font-size: 17px; }
.customer-space-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-space-muted { margin: 0; color: #5f6559; font-size: 14px; }
.customer-space-empty { display: grid; justify-items: center; gap: 8px; padding: 42px 16px; border: 1px dashed #d4d7cc; border-radius: 12px; background: #fff; color: #5f6559; text-align: center; }
.customer-space-empty svg { width: 30px; height: 30px; color: #9aa094; }
.customer-space-empty p { margin: 0; }
.customer-space-state { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 12px; background: #fff; }
.customer-space-state.is-error { color: #a12b20; }
.customer-space-dev-tag { margin-right: auto; padding: 3px 8px; border-radius: 999px; background: #fde8c8; color: #8a4b0a; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

.customer-space-orders { display: grid; gap: 12px; }
.customer-space-orders .customer-order-card { border-radius: 12px; }

.customer-space-favorites { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.customer-favorite { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; }
.customer-favorite-open { display: grid; gap: 3px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.customer-favorite-open strong { font-size: 15px; }
.customer-favorite-open small { color: #5f6559; font-size: 13px; }
.customer-favorite-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.customer-space-worksites { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.customer-space-worksites .customer-worksite-postcard { padding: 14px; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; }

.customer-space-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.customer-space-profile > :first-child { grid-column: 1 / -1; }
.customer-space-security > :first-child { grid-column: auto; }
.customer-space-security > .customer-space-two-factor { grid-column: 1 / -1; }
.customer-space-methods { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.customer-space-methods li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.customer-space-methods svg { width: 22px; height: 22px; color: #3e443a; }
.customer-space-methods span { display: grid; gap: 2px; }
.customer-space-methods small { color: #5f6559; font-size: 13px; line-height: 1.4; }
.customer-space-two-factor .customer-space-section-head { flex-wrap: wrap; justify-content: flex-start; gap: 8px 12px; }
.customer-space-two-factor .customer-space-section-head .customer-space-dev-tag { margin-right: 0; white-space: nowrap; }
.customer-space-two-factor .customer-space-login-actions { justify-content: flex-start; margin-top: 0; }
.customer-space-demo-entry { display: grid; justify-items: center; gap: 8px; max-width: 460px; margin-top: 22px; padding: 16px; border: 1px dashed #d4b37a; border-radius: 12px; background: #fffaf0; }
.customer-space-demo-entry .customer-space-dev-tag { margin: 0; }
.customer-space-demo-entry p { font-size: 14px; }
.customer-space-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; margin: 0; }
.customer-space-facts dt { color: #5f6559; font-size: 12px; font-weight: 650; }
.customer-space-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.customer-space-discount-value { margin: 0; font-size: 30px; font-weight: 850; color: #1a1d1b; }
.customer-space-card label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; color: #3e443a; }
.customer-space-card input { min-height: 44px; padding: 0 12px; border: 1px solid #d4d7cc; border-radius: 8px; font: inherit; font-size: 15px; }
.customer-space-card button[type="submit"] { justify-self: start; }
.customer-space-form-message { margin: 0; font-size: 13px; font-weight: 650; color: #1f5f2b; }

.customer-space-login { display: grid; justify-items: center; gap: 10px; padding: 56px 16px; text-align: center; }
.customer-space-login > svg { width: 40px; height: 40px; color: #5f6559; }
.customer-space-login h1 { margin: 0; font-size: 28px; }
.customer-space-login p { margin: 0; color: #5f6559; }
.customer-space-login-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* Calcul de prix. */
.customer-calculator { display: grid; gap: 14px; }
.customer-calculator-period { display: grid; gap: 14px; padding: 16px; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; }
/* Calendrier (mêmes classes que le calendrier de réservation du site) + Matin / Soir (27/10/2026). */
.customer-calculator-calendar { margin: 0; }
.customer-calculator-calendar .quote-calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.customer-calculator-calendar .quote-date.is-range-start, .customer-calculator-calendar .quote-date.is-range-end { background: #1a1d1b; color: #f7df22; }
.customer-calculator-range { margin: 8px 0 0; color: #3e443a; font-size: 14px; font-weight: 650; text-align: center; }
.customer-calculator-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-calculator-slot { display: grid; gap: 6px; }
.customer-calculator-slot > span { font-size: 13px; font-weight: 750; color: #3e443a; }
.customer-slot-toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid #d4d7cc; border-radius: 10px; background: #f4f4ef; }
.customer-slot-toggle button { display: grid; gap: 1px; justify-items: center; min-height: 48px; padding: 4px 6px; border: 0; border-radius: 7px; background: none; color: #3e443a; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
.customer-slot-toggle button small { font-size: 11.5px; font-weight: 600; color: inherit; opacity: .8; }
.customer-slot-toggle button[aria-pressed="true"] { background: #1a1d1b; color: #f7df22; }
.customer-calculator-note { margin: 0; color: #5f6559; font-size: 12.5px; line-height: 1.45; }
.customer-calculator-search { position: relative; display: grid; gap: 10px; }
.customer-calculator-search-field { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid #d4d7cc; border-radius: 12px; background: #fff; }
.customer-calculator-search-field svg { width: 19px; height: 19px; color: #5f6559; }
.customer-calculator-search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 15px; }
.customer-calculator-suggestions { margin: 0; padding: 6px; list-style: none; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px #0001; }
.customer-calculator-suggestions button { display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font: inherit; text-align: left; cursor: pointer; }
.customer-calculator-suggestions button:hover, .customer-calculator-suggestions button:focus-visible { background: #f4f2dc; outline: none; }
.customer-calculator-suggestions small { color: #5f6559; white-space: nowrap; }
.customer-calculator-favorites { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #d4d7cc; border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.customer-chip svg { width: 15px; height: 15px; color: #c0392b; }
.customer-calculator-lines { display: grid; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; overflow: hidden; }
.customer-calculator-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 110px 36px; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid #eeefe9; }
.customer-calculator-line:first-child { border-top: 0; }
.customer-calculator-line-main { display: grid; gap: 3px; min-width: 0; }
.customer-calculator-line-main small { color: #5f6559; font-size: 13px; }
.customer-calculator-qty { display: inline-flex; align-items: center; border: 1px solid #d4d7cc; border-radius: 8px; overflow: hidden; }
.customer-calculator-qty button { width: 34px; height: 34px; border: 0; background: #f4f4ef; font: inherit; font-size: 18px; cursor: pointer; }
.customer-calculator-qty span { min-width: 30px; text-align: center; font-weight: 750; }
.customer-calculator-amount { text-align: right; font-size: 15px; }
.customer-calculator-remove { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: #5f6559; cursor: pointer; }
.customer-calculator-remove svg { width: 18px; height: 18px; }
.customer-calculator-remove:hover { background: #f4f2dc; }
.customer-calculator-total { display: grid; gap: 6px; padding: 18px; border-radius: 12px; background: #1a1d1b; color: #f4f5ee; }
.customer-calculator-total > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.customer-calculator-total > div.is-discount { color: #b9e4a4; }
.customer-calculator-total > div.is-total span { display: inline-flex; align-items: center; font-weight: 700; }
.customer-calculator-total > div.is-total strong { color: #f7df22; font-size: 28px; }
.customer-calculator-total small { color: #c4cabd; font-size: 12.5px; }
.customer-calculator-total .button { justify-self: end; margin-top: 8px; }
.customer-calculator-total .price-help-button { border-color: #f7df22; background: transparent; color: #f7df22; }

@media (max-width: 760px) {
  .customer-space { padding: 14px 14px 48px; }
  /* GSM (27/10/2026) : en-tête compact (avatar + nom) ; on arrive sur la liste des rubriques (grandes icônes) ;
     une rubrique choisie s'ouvre seule, avec « ‹ Rubriques » pour revenir (le retour du téléphone fait de même). */
  .customer-space-head { gap: 12px; margin-bottom: 14px; }
  .customer-space-avatar { width: 42px; height: 42px; font-size: 18px; }
  .customer-space-name { font-size: 19px; }
  .customer-space-sub { font-size: 12.5px; }
  .customer-space-tabs { display: grid; gap: 8px; padding: 0; margin-bottom: 0; overflow: visible; border: 0; background: none; }
  .customer-space-tab { justify-content: flex-start; gap: 14px; min-height: 64px; padding: 0 14px; border: 1px solid #e2e4dc; border-radius: 12px; background: #fff; color: #1a1d1b; font-size: 16px; font-weight: 750; }
  .customer-space-tab[aria-selected="true"] { background: #fff; color: #1a1d1b; }
  .customer-space-tab:active { background: #f4f2dc; }
  .customer-space-tab-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #1a1d1b; color: #f7df22; flex: 0 0 auto; }
  .customer-space-tab-icon svg { width: 22px; height: 22px; }
  .customer-space-tab-label { flex: 1; text-align: left; }
  .customer-space-tab-chevron { display: block; width: 20px !important; height: 20px !important; color: #8a9083; }
  [data-mobile-view="menu"] .customer-space-panel { display: none; }
  [data-mobile-view="section"] .customer-space-tabs { display: none; }
  [data-mobile-view="section"] .customer-space-section-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .customer-space-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 6px; border: 1px solid #e2e4dc; border-radius: 10px; background: #fff; color: #1a1d1b; font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
  .customer-space-back svg { width: 20px; height: 20px; }
  .customer-space-section-bar h2 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 18px; }
  .customer-space-section-bar h2 svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .customer-space-security > * { grid-column: auto; }
  .customer-space-profile { grid-template-columns: minmax(0, 1fr); }
  .customer-calculator-period { padding: 12px; }
  .customer-calculator-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main remove" "qty amount"; }
  .customer-calculator-line-main { grid-area: main; }
  .customer-calculator-remove { grid-area: remove; }
  .customer-calculator-qty { grid-area: qty; justify-self: start; }
  .customer-calculator-amount { grid-area: amount; }
  .customer-calculator-total .button { justify-self: stretch; }
}

/* Calcul de prix sur ordinateur (28/10/2026) : calendrier à gauche (moitié de la largeur), machines et total à
   droite ; la liste des machines défile dans sa propre zone. */
.customer-calculator-column { display: grid; align-content: start; gap: 14px; min-width: 0; }
.customer-calculator-slots-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 800; color: #1a1d1b; }
.customer-calculator-slots-head .price-help-button { margin-left: 0; }
@media (min-width: 900px) {
  .customer-calculator { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  /* La page ne défile pas : seule la liste des machines a sa zone de défilement (hauteur fixe), le total reste dessous. */
  .customer-calculator-column--lines .customer-calculator-lines { max-height: min(46vh, 340px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .customer-calculator-calendar .quote-date { min-height: 36px; }
  .customer-calculator-calendar .quote-calendar-weekdays span { font-size: 11px; }
}
