/* Global Styles */

:root {
  --sidebar-width: 220px;
  --cart-width: 380px;
  --cart-gap: 20px;
  --topbar-height: 102px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f8f8f8;
  padding: var(--topbar-height) calc(var(--cart-width) + var(--cart-gap)) 0 var(--sidebar-width);
}

/* Navigation bar */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1.1rem 0.85rem;
  background-color: #141414;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  box-sizing: border-box;
  z-index: 1000;
  overflow-y: auto;
}

.logo {
  padding: 0.1rem 0.35rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.logo a {
  font-size: 1.15rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.2;
  padding: 0.45rem 0.5rem;
  border-radius: 4px;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.cart {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  padding: 2px 6px;
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: calc(var(--cart-width) + var(--cart-gap));
  min-height: var(--topbar-height);
  box-sizing: border-box;
  z-index: 998;
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(230px, 0.9fr) minmax(300px, auto);
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #e1e1e1;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.search-area {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.search-area label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
}

.search-area input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  font-size: 0.98rem;
  background: #fdfdfd;
}

.search-area input:focus {
  border-color: #e67e22;
  outline: 2px solid rgba(230, 126, 34, 0.18);
}

.client-login {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.client-login label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
}

.client-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.client-login input {
  min-width: 0;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  background: #fdfdfd;
}

.client-login input:focus {
  border-color: #e67e22;
  outline: 2px solid rgba(230, 126, 34, 0.18);
}

.client-login button {
  border: none;
  border-radius: 4px;
  padding: 0.65rem 0.8rem;
  background: #141414;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.client-login button:hover {
  background: #333;
}

.client-login span {
  min-height: 1rem;
  font-size: 0.78rem;
  color: #6b625a;
}

.store-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.8rem;
  max-width: 620px;
  font-size: 0.84rem;
  color: #333;
}

.store-info a {
  color: #333;
  text-decoration: none;
}

.store-info strong {
  color: #141414;
}

/* Hero section */
.hero {
  width: 100%;
  min-height: 320px;
  background-image: url('images/hero.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #ffffff;
}

.hero-tagline {
  padding: 1rem;
  background: #141414;
  color: #fff;
  text-align: center;
}

.hero-tagline h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

/* Container */
.container {
  max-width: none;
  margin: 0;
  padding: 1rem;
}

/* Category headings */
.category {
  margin-top: 2rem;
}

.category h2 {
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  color: #222;
  border-bottom: 2px solid #e1e1e1;
  padding-bottom: 0.3rem;
}

.section-intro {
  max-width: 760px;
  margin: 0 0 1rem;
  color: #555;
}

.search-empty {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  margin: 1rem 0;
  padding: 1rem;
  color: #555;
}

.is-hidden {
  display: none !important;
}

/* Product grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

#impression .products {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

#impression .product-card {
  padding: 0.85rem;
}

.paint-subcategories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.paint-subcategory {
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e1da;
  border-radius: 6px;
}

.paint-subcategory h3 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: #222;
  border-bottom: 1px solid #e5e1da;
  padding-bottom: 0.5rem;
}

.paint-subcategory-products {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1rem;
  margin: 0;
}

.paint-subcategory-products .conditionnement-card-wide,
.paint-subcategory-products .featured-choice-card {
  grid-column: span 1;
}

.paint-subcategory-products .conditionnement-card-wide .condition-list {
  grid-template-columns: 1fr;
}

.product-card {
  background-color: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: box-shadow 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #333;
}

/* Image pour chaque produit */
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  background: #f4f4f4;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  padding: 0.45rem;
  box-sizing: border-box;
}

.format-image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.format-image-pair img {
  height: 230px;
  margin-bottom: 0;
}

.product-card p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #666;
}

.price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
  margin-top: auto;
  margin-bottom: 0.5rem;
}

.variant-label {
  display: block;
  margin: 0.2rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
}

.variant-select {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 0.95rem;
}

.featured-choice-card {
  grid-column: span 2;
}

.featured-choice-card img {
  height: 260px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-top: auto;
}

.choice-button {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  text-align: left;
}

.choice-button span,
.choice-button strong {
  display: block;
}

.choice-button strong {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.92;
}

.conditionnement-card {
  gap: 0.45rem;
}

#impression .ekoprim-card {
  grid-column: span 1;
  width: 100%;
  max-width: none;
}

#impression .ekoprim-card .condition-list {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.45rem;
}

#impression .ekoprim-card .conditionnement-card .product-image,
#impression .ekoprim-card .product-image {
  height: 150px;
}

#impression .ekoprim-card .condition-row {
  padding: 0.5rem;
}

#impression .ekoprim-card .condition-actions button {
  min-height: 46px;
  padding: 0.45rem 0.5rem;
}

.conditionnement-card .product-image {
  height: 210px;
}

.conditionnement-card-wide {
  grid-column: span 2;
}

.conditionnement-card-wide .condition-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.condition-list {
  display: grid;
  gap: 0.6rem;
  margin-top: auto;
}

.condition-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid #e5e1da;
  border-radius: 6px;
  background: #faf9f6;
}

.condition-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  text-align: center;
}

.condition-format {
  font-weight: 700;
  color: #222;
  font-size: 1.05rem;
}

.condition-actions {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.condition-actions-single {
  grid-template-columns: 1fr;
}

.condition-actions-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.condition-actions button {
  width: 100%;
  min-height: 58px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
  line-height: 1.15;
}

.condition-choice-button span {
  font-size: 0.9rem;
  font-weight: 700;
}

.condition-choice-button strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  opacity: 0.96;
}

.condition-actions .blanc-button,
.condition-actions .teinte-button {
  width: 100%;
  margin: 0;
}

.condition-promos {
  display: grid;
  gap: 0.4rem;
}

.product-card .compact-promo {
  margin-bottom: 0;
  padding: 0.5rem;
  font-size: 0.8rem;
}

@media (max-width: 700px) {
  .featured-choice-card {
    grid-column: span 1;
  }

  #impression .ekoprim-card {
    grid-column: span 1;
  }

  #impression .ekoprim-card .condition-list {
    grid-template-columns: 1fr;
  }

  .featured-choice-card img {
    height: 210px;
  }

  .format-image-pair {
    grid-template-columns: 1fr;
  }

  .format-image-pair img {
    height: 180px;
  }

  .condition-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .conditionnement-card-wide {
    grid-column: span 1;
  }

  .conditionnement-card-wide .condition-list {
    grid-template-columns: 1fr;
  }
}

.product-card button {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 4px;
  background-color: #e67e22;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.product-card button:hover {
  background-color: #d35400;
}

.product-card button:disabled {
  background-color: #c9c9c9;
  color: #666;
  cursor: not-allowed;
}

.product-card button:disabled:hover {
  background-color: #c9c9c9;
}

/* Styles spécifiques pour les boutons de format blanc et mise à la teinte.
   On les affiche côte à côte et de taille plus réduite pour gagner de l'espace. */
.product-card .blanc-button,
.product-card .teinte-button {
  display: inline-block;
  width: 48%;
  margin-right: 2%;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.product-card .blanc-button {
  background-color: #e67e22;
  color: #fff;
}

.product-card .blanc-button:hover {
  background-color: #d35400;
}

.product-card .teinte-button {
  background-color: #2980b9;
  color: #fff;
}

.product-card .teinte-button:hover {
  background-color: #1f6391;
}

.product-card .condition-actions .blanc-button,
.product-card .condition-actions .teinte-button {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.6rem;
}

.tesa-choice-button {
  width: 100%;
  min-height: 86px;
}

.tesa-choice-grid {
  align-items: start;
}

.tesa-choice-column {
  display: grid;
  gap: 0.45rem;
  width: 100%;
}

.tesa-promo-stack {
  display: grid;
  gap: 0.4rem;
  width: 100%;
}

.tesa-promo-stack .compact-promo {
  width: 100%;
  min-height: 58px;
}

#masquage .featured-choice-card,
#nettoyage .featured-choice-card {
  grid-column: span 1;
}

#masquage .product-card,
#nettoyage .product-card {
  padding: 0.75rem;
}

#masquage .product-card h3,
#nettoyage .product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

#masquage .product-card p,
#nettoyage .product-card p {
  font-size: 0.84rem;
  margin-bottom: 0.5rem;
}

#masquage .product-card img,
#nettoyage .product-card img {
  height: 150px;
  margin-bottom: 0.4rem;
}

#masquage .featured-choice-card img,
#nettoyage .featured-choice-card img {
  height: 150px;
}

#masquage .choice-grid,
#nettoyage .choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 0.4rem;
  margin-top: 0;
}

#masquage .choice-button,
#nettoyage .choice-button {
  min-height: 44px;
  padding: 0.42rem 0.5rem;
}

#masquage .choice-button span,
#nettoyage .choice-button span {
  font-size: 0.82rem;
}

#masquage .choice-button strong,
#nettoyage .choice-button strong {
  font-size: 0.76rem;
}

#masquage .tesa-choice-button {
  min-height: 46px;
}

#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision bleu"] .tesa-choice-grid,
#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision rose"] .tesa-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision bleu"] .tesa-choice-column,
#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision rose"] .tesa-choice-column {
  min-width: 0;
}

#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision bleu"] .tesa-choice-button,
#masquage .tesa-choice-card[data-tesa-group="tesaKREPP précision rose"] .tesa-choice-button {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
}

#masquage .tesa-choice-column,
#masquage .tesa-promo-stack {
  gap: 0.28rem;
}

#masquage .product-card .compact-promo {
  min-height: 40px;
  padding: 0.35rem;
  font-size: 0.74rem;
}

#masquage .price,
#nettoyage .price,
#masquage .condition-list,
#nettoyage .condition-list {
  margin-top: 0;
}

#masquage .discount-button,
#nettoyage .discount-button {
  padding: 0.45rem;
  font-size: 0.78rem;
}

/* Boutons de PROMOS (quantités multiples). Ils s’affichent côte à côte
   et reprennent une taille similaire aux boutons blanc/teinte. La couleur est
   différente pour bien distinguer cette option (violet). */
.product-card .discount-button {
  /* Les boutons de PROMOS utilisent toute la largeur de la carte
     pour que le texte reste lisible. La marge latérale est supprimée et
     la hauteur ajustée pour un meilleur confort visuel. */
  display: block;
  width: 100%;
  margin: 0 0 0.5rem 0;
  padding: 0.6rem;
  font-size: 0.85rem;
  /* Autoriser le retour à la ligne dans les boutons PROMO pour
     afficher le texte complet (quantité et prix) sans troncature. */
  white-space: normal;
  line-height: 1.2;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background-color: #8e44ad;
  color: #fff;
}

.product-card .discount-button:hover {
  background-color: #732d91;
}

/* Modal pour la mise à la teinte */
.tint-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.tint-modal.open {
  display: flex;
}

.tint-modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
}

.tint-modal-content h2 {
  margin-top: 0;
}

.tint-modal-content p {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.tint-modal-content input {
  width: 100%;
  padding: 0.5rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.tint-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tint-modal-buttons button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.tint-modal-buttons #tint-cancel {
  background-color: #cccccc;
  color: #333;
}

.tint-modal-buttons #tint-cancel:hover {
  background-color: #b3b3b3;
}

.tint-modal-buttons #tint-confirm {
  background-color: #e67e22;
  color: #fff;
}

.tint-modal-buttons #tint-confirm:hover {
  background-color: #d35400;
}

/* Cart modal */
.cart-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--cart-width);
  height: 100vh;
  background: #f6f4f1;
  box-shadow: -8px 0 28px rgba(20, 20, 20, 0.16);
  transform: translateX(0);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #ded7cf;
}

.cart-modal.open {
  transform: translateX(0);
}

.cart-modal header {
  padding: 1rem 1rem 1.15rem;
  background: linear-gradient(135deg, #161616 0%, #2b2119 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid #e67e22;
}

.cart-modal header h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.cart-pill {
  background: rgba(230, 126, 34, 0.18);
  border: 1px solid rgba(230, 126, 34, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.cart-items {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    #f6f4f1;
}

.cart-empty {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  text-align: center;
  color: #5f5a55;
  background: #fff;
  border: 1px dashed #d7cbc0;
  border-radius: 8px;
}

.cart-empty strong {
  color: #222;
}

.cart-empty span {
  font-size: 0.85rem;
  line-height: 1.35;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid #e7dfd7;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(20, 20, 20, 0.05);
}

.cart-item-main {
  min-width: 0;
}

.cart-item-name {
  display: block;
  color: #222;
  font-weight: 700;
  line-height: 1.25;
}

.cart-item-meta {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #f2ede8;
  color: #6a625b;
  font-size: 0.75rem;
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-item-price {
  color: #1f6b3a;
  font-weight: 800;
  white-space: nowrap;
}

.cart-item button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #fff1ee;
  border: none;
  border-radius: 50%;
  color: #c0392b;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.cart-item button:hover {
  background: #f7d6cf;
}

.cart-summary {
  padding: 1rem;
  border-top: 1px solid #ded7cf;
  background: #fff;
  box-shadow: 0 -6px 18px rgba(20, 20, 20, 0.08);
}

.client-file-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #eadfd5;
  border-radius: 8px;
  background: #fffaf4;
}

.client-file-strip strong,
.client-file-strip span {
  display: block;
}

.client-file-strip strong {
  color: #222;
  font-size: 0.88rem;
}

.client-file-strip span {
  margin-top: 0.12rem;
  color: #6a625b;
  font-size: 0.78rem;
  line-height: 1.25;
}

.saved-orders h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.saved-orders h3 {
  margin: 0 0 0.65rem;
  color: #222;
  font-size: 0.95rem;
}

.order-status {
  color: #188047;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.cart-summary > .order-status {
  display: block;
  min-height: 1rem;
  margin: -0.35rem 0 0.55rem;
}

.client-file-section {
  margin-top: 2rem;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid #ded7cf;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(20, 20, 20, 0.05);
}

.client-file-section:target {
  border-color: #e67e22;
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.14);
}

.client-file-section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid #ece5df;
}

.client-file-section-head h2 {
  margin: 0;
  color: #222;
  font-size: 1.35rem;
}

.client-file-section-head p {
  margin: 0.2rem 0 0;
  color: #6a625b;
  font-size: 0.9rem;
}

.client-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.client-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #5f5a55;
  font-size: 0.74rem;
  font-weight: 800;
}

.client-grid input,
.client-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d9d0c8;
  border-radius: 6px;
  padding: 0.48rem 0.55rem;
  background: #fffdfb;
  color: #222;
  font: inherit;
  font-size: 0.82rem;
  resize: vertical;
}

.client-grid input:focus,
.client-grid textarea:focus {
  border-color: #e67e22;
  outline: 2px solid rgba(230, 126, 34, 0.16);
}

.client-full {
  grid-column: 1 / -1;
}

.cart-summary p {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 0.8rem;
  color: #5f5a55;
  font-weight: 700;
}

.cart-summary #cart-total {
  color: #141414;
  font-size: 1.18rem;
}

.cart-summary button {
  width: 100%;
  padding: 0.75rem 0.8rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2fb461, #188047);
  color: #fff;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(39, 174, 96, 0.28);
}

.cart-summary button:hover {
  background: linear-gradient(135deg, #269c52, #146f3d);
}

.cart-summary .compact-button {
  width: auto;
  padding: 0.48rem 0.65rem;
  white-space: nowrap;
}

.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.cart-summary .secondary-button {
  padding: 0.55rem 0.5rem;
  background: #f4efe9;
  color: #3a332d;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.cart-summary .secondary-button:hover {
  background: #e9ded3;
}

.cart-summary .danger-button {
  background: #fff1ee;
  color: #b23a2f;
}

.cart-summary .danger-button:hover {
  background: #f7d6cf;
}

.saved-orders {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #ece5df;
}

.saved-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.saved-order {
  padding: 0.55rem;
  border: 1px solid #eadfd5;
  border-radius: 6px;
  background: #fffdfb;
  color: #5f5a55;
  font-size: 0.78rem;
}

.saved-order strong {
  display: block;
  color: #222;
  font-size: 0.82rem;
}

.saved-order span {
  display: block;
  margin-top: 0.1rem;
}

.saved-order-empty {
  margin: 0;
  color: #7a7169;
  font-size: 0.8rem;
}

.contact-section {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 1.2rem;
  align-items: end;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
}

.contact-section h2 {
  margin-top: 0;
}

.contact-details p:last-child {
  margin-bottom: 0;
}

.contact-visual {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  object-position: right bottom;
  justify-self: end;
  align-self: end;
  border-radius: 6px;
}

.account-page {
  padding-right: 0;
  background: #f2f3f4;
}

.account-page .topbar {
  right: 0;
}

.account-page .nav-links a[aria-current="page"] {
  background: rgba(230, 126, 34, 0.22);
  color: #fff;
}

.account-topline {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.account-topline strong {
  color: #222;
}

.account-topline span {
  color: #6a625b;
  font-size: 0.85rem;
}

.account-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.35rem;
}

.account-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #ded7cf;
}

.account-hero h1 {
  margin: 0;
  max-width: 760px;
  color: #1f1f1f;
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.account-tabs > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-list {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  border: 1px solid #ded7cf;
  border-radius: 8px;
  background: #fff;
}

.tab-list label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: 6px;
  color: #5f5a55;
  font-weight: 800;
  cursor: pointer;
}

#tab-register:checked ~ .tab-list label[for="tab-register"],
#tab-history:checked ~ .tab-list label[for="tab-history"] {
  background: #141414;
  color: #fff;
}

.tab-panel {
  display: none;
}

#tab-register:checked ~ .register-panel,
#tab-history:checked ~ .history-panel {
  display: grid;
}

.register-panel {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: start;
}

.account-card {
  background: #fff;
  border: 1px solid #ded7cf;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(20, 20, 20, 0.05);
}

.account-card.client-file-section {
  margin-top: 0;
}

.current-cart-panel {
  overflow: hidden;
}

.current-cart-panel .client-file-section-head,
.history-panel .client-file-section-head {
  margin: 0;
  padding: 1rem;
}

.account-cart-items {
  max-height: 420px;
  padding: 0 1rem 1rem;
}

.account-cart-summary {
  box-shadow: none;
}

.account-order-actions {
  display: flex;
  gap: 0.6rem;
  margin: 0;
  padding: 0 1rem 1rem;
}

.account-order-actions .secondary-button {
  width: auto;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: #f4efe9;
  color: #3a332d;
  cursor: pointer;
  font-weight: 800;
}

.account-order-actions .danger-button {
  background: #fff1ee;
  color: #b23a2f;
}

.account-orders-list {
  padding: 0 1rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.7rem;
}

/* Footer */
footer {
  background-color: #141414;
  color: #fff;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 190px;
    --cart-width: 340px;
    --cart-gap: 18px;
    --topbar-height: 182px;
  }

  body {
    padding-right: calc(var(--cart-width) + var(--cart-gap));
    padding-left: var(--sidebar-width);
  }

  .navbar {
    width: var(--sidebar-width);
  }

  .topbar {
    left: var(--sidebar-width);
    right: calc(var(--cart-width) + var(--cart-gap));
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .store-info {
    justify-content: flex-start;
  }

  .cart-modal {
    width: var(--cart-width);
  }
}

@media (max-width: 860px) {
  :root {
    --topbar-height: 0px;
  }

  body {
    padding: 0;
  }

  .navbar,
  .topbar,
  .cart-modal {
    position: static;
    width: auto;
    height: auto;
  }

  .navbar {
    max-height: none;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .client-login-row {
    grid-template-columns: 1fr;
  }

  .contact-section,
  .register-panel {
    grid-template-columns: 1fr;
  }

  .contact-visual {
    max-height: 220px;
  }

  .account-hero,
  .account-order-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-modal {
    box-shadow: none;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
  }

  .cart-items {
    max-height: 260px;
  }

  .cart-summary {
    max-height: none;
  }

  .client-grid,
  .order-actions {
    grid-template-columns: 1fr;
  }
}

/* Mode bureau force sur telephone.
   Le site garde le menu fixe a gauche et le panier fixe a droite, comme sur ordinateur. */
@media (max-width: 860px) {
  :root {
    --sidebar-width: 220px;
    --cart-width: 380px;
    --cart-gap: 20px;
    --topbar-height: 102px;
  }

  html,
  body {
    min-width: 1280px;
    overflow-x: auto;
  }

  body {
    padding: var(--topbar-height) calc(var(--cart-width) + var(--cart-gap)) 0 var(--sidebar-width);
  }

  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    height: auto;
    max-height: none;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
  }

  .topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: calc(var(--cart-width) + var(--cart-gap));
    min-height: var(--topbar-height);
    grid-template-columns: minmax(240px, 1.1fr) minmax(230px, 0.9fr) minmax(300px, auto);
    gap: 1rem;
  }

  .client-login-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .store-info {
    justify-content: flex-end;
  }

  .cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--cart-width);
    height: 100vh;
    box-shadow: -8px 0 28px rgba(20, 20, 20, 0.16);
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid #ded7cf;
  }

  .cart-items {
    max-height: none;
  }

  .cart-summary {
    max-height: none;
  }

  .contact-section {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  }

  .register-panel {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  }

  .contact-visual {
    max-height: none;
  }

  .account-hero,
  .account-order-actions {
    flex-direction: row;
    align-items: center;
  }

  .client-grid,
  .order-actions {
    grid-template-columns: 1fr 1fr;
  }
}
