/*
 * Pages Panier et Commander.
 *
 * Chargée uniquement sur ces deux pages (voir cig_charger_style_boutique).
 * Les deux partagent le balisage WooCommerce classique — le panier est servi
 * par [woocommerce_cart], la caisse par [woocommerce_checkout] que le widget
 * Elementor appelle en interne — donc un seul jeu de sélecteurs suffit.
 *
 * Charte reprise de compositions.css, sans la dupliquer d'intention : doré
 * #C5A065, rayon 6 px, boutons de 48 px de haut, 18 px partout et rien en
 * dessous de 16 px. Le public visé est âgé et remplit ce formulaire dans un
 * moment difficile ; le confort de lecture prime sur la densité.
 *
 * Aucun gabarit n'est surchargé : tout est affaire de style et de hooks.
 */

/* --- Base ---------------------------------------------------------------- */

.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
  font-size: 18px;
  line-height: 1.6;
  color: #3a3226;
}

/* Titres de section (« Détails de facturation », « Votre commande »). */
.woocommerce-cart h2,
.woocommerce-checkout h2,
.woocommerce-cart h3,
.woocommerce-checkout h3 {
  font-size: 22px;
  font-weight: 600;
  color: #3a3226;
}

/* --- Tableaux : panier et récapitulatif de commande ---------------------- */

.woocommerce table.shop_table,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  font-size: 18px;
}

.woocommerce table.shop_table th {
  font-weight: 600;
  color: #6b5a3e;
}

.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
  padding: 14px 12px;
  vertical-align: middle;
}

/* Nom de l'article : légèrement au-dessus du reste. */
.woocommerce table.shop_table td.product-name {
  font-size: 18px;
}

.woocommerce table.shop_table td.product-name a {
  color: #3a3226;
  text-decoration: none;
}

.woocommerce table.shop_table td.product-name a:hover {
  color: #6b5a3e;
  text-decoration: underline;
}

/* Ventilation de la composition et remise professionnelle, sous l'article :
   informations secondaires, en teinte plus douce mais à la même taille que le
   reste du tableau — ce sont des montants, ils se lisent. */
.woocommerce table.shop_table .wc-item-meta,
.woocommerce table.shop_table dl.variation {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: #6f6555;
}

.woocommerce table.shop_table .wc-item-meta li,
.woocommerce table.shop_table dl.variation dt,
.woocommerce table.shop_table dl.variation dd {
  font-size: 18px;
}

/* WooCommerce enveloppe la valeur dans un <p> : sans cette règle il retombe
   sur la taille du thème et la ligne paraît plus petite que le reste. */
.woocommerce table.shop_table .wc-item-meta p,
.woocommerce table.shop_table dl.variation dd p {
  font-size: 18px;
  margin: 0;
}

/* ESPACE APRÈS LE DEUX-POINTS. WooCommerce ajoute « : » à la fin du libellé et
   compte sur la marge du terme pour l'en détacher (dt { margin-right: .25em }).
   Une remise à zéro des marges collerait donc la valeur au deux-points :
   « Remise professionnelle (37 %):-95,83 € ». On pose la marge explicitement,
   un peu plus généreuse que celle de WooCommerce, et on ne remet à zéro que
   celle de la définition. */
.woocommerce table.shop_table .wc-item-meta .wc-item-meta-label,
.woocommerce table.shop_table dl.variation dt {
  margin-right: 0.45em;
  font-weight: 600;
}

.woocommerce table.shop_table .wc-item-meta dd,
.woocommerce table.shop_table dl.variation dd {
  margin: 0;
}

/* Prix barré du tarif public, conservé : il sert au professionnel qui revend. */
.woocommerce table.shop_table del {
  color: #8a8279;
  margin-right: 0.4em;
}

.woocommerce table.shop_table ins {
  text-decoration: none;
  font-weight: 600;
}

/* Vignette : la cellule reste, la colonne s'aligne sur les autres lignes. */
.woocommerce table.shop_table td.product-thumbnail img {
  max-width: 72px;
  height: auto;
  border-radius: 6px;
}

/* --- Totaux -------------------------------------------------------------- */

.woocommerce .cart_totals,
.woocommerce-checkout-review-order-table {
  font-size: 18px;
}

.woocommerce .cart_totals th,
.woocommerce-checkout-review-order-table tfoot th {
  font-weight: 600;
  color: #6b5a3e;
}

.woocommerce .cart_totals .order-total .amount,
.woocommerce-checkout-review-order-table tfoot .order-total .amount {
  font-size: 20px;
  font-weight: 700;
  color: #3a3226;
}

/* Mentions secondaires (frais de port, taxes) : lisibles, jamais minuscules. */
.woocommerce .cart_totals small,
.woocommerce-checkout small,
.woocommerce .woocommerce-shipping-destination,
.woocommerce .includes_tax {
  font-size: 16px;
  color: #6f6555;
}

/* --- Champs de formulaire de la caisse ----------------------------------- */

/* Saisie confortable : hauteur généreuse et texte à 18 px. Un champ à 13 px
   est un obstacle de plus dans un moment qui n'en demande pas. */
.woocommerce form .form-row label,
.woocommerce-checkout label {
  font-size: 18px;
  font-weight: 500;
  color: #3a3226;
  margin-bottom: 6px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.select2-container .select2-selection--single {
  box-sizing: border-box;
  min-height: 52px;
  padding: 0.7em 0.9em;
  border: 1px solid #ded7cb;
  border-radius: 6px;
  font-size: 18px;
  font-family: inherit;
  line-height: 1.4;
  color: #3a3226;
}

.woocommerce form .form-row textarea,
.woocommerce-checkout textarea {
  min-height: 110px;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
  border-color: #c5a065;
  outline: 2px solid #f0e4cd;
}

/* Le sélecteur de pays de WooCommerce, aligné sur les autres champs. */
.select2-container .select2-selection--single .select2-selection__rendered {
  font-size: 18px;
  line-height: 52px;
  padding-left: 0;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 52px;
}

/* Champ d'upload de la photo du défunt (lot 4) : même confort. */
.cig-photo-checkout label,
.cig-photo-checkout p,
.cig-photo-checkout #cig-photo-message {
  font-size: 17px;
}

.cig-photo-checkout input[type='file'] {
  font-size: 17px;
  padding: 0.4em 0;
}

/* --- Boutons ------------------------------------------------------------- */

/* Gabarit commun : même hauteur, même rayon, même graisse. Les propriétés qui
   suivent neutralisent ce que le thème pose habituellement — majuscules
   forcées, interlettrage, ombre portée — pour qu'aucun bouton ne se distingue
   autrement que par sa fonction. */
.woocommerce-cart .woocommerce a.button,
.woocommerce-cart .woocommerce button.button,
.woocommerce-cart .woocommerce input.button,
.woocommerce-checkout .woocommerce a.button,
.woocommerce-checkout .woocommerce button.button,
.woocommerce-checkout .woocommerce input.button,
.woocommerce-checkout #place_order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0.6em 1.4em;
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
  font-size: 18px;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

/* Action principale : les deux boutons qui font avancer la commande.
   Texte brun très foncé sur doré — contraste franc, dans la palette. */
.woocommerce-cart .woocommerce a.checkout-button,
.woocommerce-cart .woocommerce a.wc-forward.checkout-button,
.woocommerce-checkout #place_order,
.woocommerce-checkout .woocommerce button.button.alt,
.woocommerce-cart .woocommerce button.button.alt {
  background: #c5a065;
  border-color: #a8863f;
  color: #2b241a !important;
}

.woocommerce-cart .woocommerce a.checkout-button:hover,
.woocommerce-cart .woocommerce a.checkout-button:focus,
.woocommerce-checkout #place_order:hover,
.woocommerce-checkout #place_order:focus,
.woocommerce-checkout .woocommerce button.button.alt:hover,
.woocommerce-cart .woocommerce button.button.alt:hover {
  background: #b08d52;
  border-color: #8a6a30;
  color: #2b241a !important;
}

/* « Valider la commande » et « Commander » occupent toute la largeur de leur
   colonne : ce sont les points d'aboutissement, ils ne se cherchent pas. */
.woocommerce-cart .woocommerce a.checkout-button,
.woocommerce-checkout #place_order {
  width: 100%;
  padding: 0.85em 1.4em;
}

/* Action secondaire : « Mettre à jour le panier », contour doré. */
.woocommerce-cart .woocommerce button[name='update_cart'],
.woocommerce-cart .woocommerce input[name='update_cart'],
.woocommerce-cart .woocommerce a.button:not(.checkout-button):not(.alt) {
  background: #fff;
  border-color: #c5a065;
  color: #5c4d33 !important;
  font-weight: 500;
}

.woocommerce-cart .woocommerce button[name='update_cart']:hover,
.woocommerce-cart .woocommerce input[name='update_cart']:hover,
.woocommerce-cart .woocommerce a.button:not(.checkout-button):not(.alt):hover {
  background: #f7f1e4;
  color: #40351f !important;
}

/* Bouton désactivé (panier inchangé) : lisible, sans fausse promesse. */
.woocommerce-cart .woocommerce button[name='update_cart']:disabled {
  opacity: 0.5;
  cursor: default;
}

/* --- Messages et notices ------------------------------------------------- */

.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error,
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-error {
  font-size: 18px;
  line-height: 1.6;
  border-radius: 6px;
}

/* --- Affichage réduit ---------------------------------------------------- */

@media (max-width: 768px) {
  .woocommerce table.shop_table td,
  .woocommerce table.shop_table th {
    padding: 12px 8px;
  }

  .woocommerce-cart .woocommerce a.button,
  .woocommerce-cart .woocommerce button.button,
  .woocommerce-cart .woocommerce input.button,
  .woocommerce-checkout .woocommerce button.button,
  .woocommerce-checkout #place_order {
    width: 100%;
    padding: 0.85em 1em;
  }

  .woocommerce table.shop_table td.product-thumbnail img {
    max-width: 56px;
  }
}
