/*
 Theme Name: Sevy Astra Child
 Theme URI: https://sevy-creations-bois.ch
 Description: Thème enfant Sevy Créations Bois
 Author: Sevy
 Author URI: https://sevy-creations-bois.ch
 Template: astra
 Version: 1.1
*/

/* =========================================================
   VARIABLES GLOBALES SEVY (facile à modifier)
========================================================= */
:root {
  --sevy-primary:   #8B5E3C;
  --sevy-secondary: #D6BFA7;
  --sevy-dark:      #2b2b2b;
  --sevy-light:     #f7f3ed;
  --sevy-accent:    #c89b6d;
  --sevy-green:     #2D6A4F;
  --sevy-text:      #3a3a3a;
  --sevy-border:    rgba(139,94,60,0.15);
  --sevy-radius:    6px;
  --sevy-shadow:    0 2px 12px rgba(139,94,60,0.10);
}

/* =========================================================
   BASE
========================================================= */
body {
  background: var(--sevy-light);
  color: var(--sevy-text);
  font-family: 'DM Sans', sans-serif;
}

a {
  color: var(--sevy-primary);
  text-decoration: none;
}
a:hover {
  color: var(--sevy-accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   CONTAINER
========================================================= */
.ast-container {
  max-width: 1200px;
}

/* =========================================================
   BOUTONS WOOCOMMERCE
========================================================= */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--sevy-primary);
  color: #fff !important;
  border-radius: var(--sevy-radius);
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.25s ease, transform 0.15s ease;
  cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--sevy-accent);
  color: #fff !important;
  transform: translateY(-1px);
}

/* Bouton "Ajouter au panier" */
.woocommerce a.button.add_to_cart_button {
  background: var(--sevy-primary);
}

/* Bouton checkout */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order {
  background: var(--sevy-green) !important;
  color: #fff !important;
  font-size: 1.05rem;
  padding: 14px 28px;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce #payment #place_order:hover {
  background: #1e4f38 !important;
}

/* Panier et commande WooCommerce Blocks */
.woocommerce-cart #primary,
.woocommerce-checkout #primary {
  margin-bottom: 72px;
  margin-top: 32px;
}

.woocommerce-cart .ast-article-single,
.woocommerce-checkout .ast-article-single {
  padding-top: 42px !important;
}

.sevy-commerce-title {
  color: #4a3422;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  margin: 4px 0 34px;
}

/* Le panier flottant est redondant et masque le récapitulatif sur ces pages. */
.woocommerce-cart .xoo-wsc-basket,
.woocommerce-checkout .xoo-wsc-basket {
  display: none !important;
}

@media (max-width: 680px) {
  .woocommerce-cart #primary,
  .woocommerce-checkout #primary {
    margin-bottom: 48px;
    margin-top: 18px;
  }

  .woocommerce-cart .ast-article-single,
  .woocommerce-checkout .ast-article-single {
    padding-top: 26px !important;
  }

  .sevy-commerce-title {
    margin-bottom: 24px;
  }
}

/* =========================================================
   BARRE DE PROMO
========================================================= */
.barre-promo {
  display: block;
  background: var(--sevy-primary);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
  transition: background 0.2s;
}
.barre-promo:hover {
  background: var(--sevy-accent);
  color: #fff;
}
.barre-promo strong {
  font-weight: 700;
  background: rgba(255,255,255,0.18);
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 4px;
}

/* =========================================================
   FICHES PRODUIT WOOCOMMERCE
========================================================= */
/* Astra ajoute un second en-tête avant la fiche produit. */
.single-product .content-area > .entry-header {
  display: none !important;
}

.single-product .site-content {
  padding-top: 52px;
}

.single-product div.product .product_title {
  color: #4a3422;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.12;
  margin-bottom: 16px;
}

.single-product div.product p.price {
  color: var(--sevy-primary);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.single-product .woocommerce-product-details__short-description {
  color: var(--sevy-text);
  font-size: 1rem;
  line-height: 1.65;
}

.single-product .scb-product-highlights {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 18px 0 24px;
  padding: 0;
}

.single-product .scb-product-highlights li {
  border-left: 3px solid var(--sevy-accent);
  padding: 5px 0 5px 12px;
}

.single-product .woocommerce-tabs {
  margin-top: 64px;
}

.single-product .scb-product-description {
  color: var(--sevy-text);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 auto;
  max-width: 920px;
}

.single-product .scb-product-description h2 {
  color: #4a3422;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.2;
  margin: 42px 0 14px;
}

.single-product .scb-product-uses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 30px 0 42px;
}

.single-product .scb-product-uses > div {
  background: #f3ece3;
  border: 1px solid var(--sevy-border);
  border-radius: 10px;
  padding: 22px;
}

.single-product .scb-product-uses strong,
.single-product .scb-product-uses span {
  display: block;
}

.single-product .scb-product-uses strong {
  color: #4a3422;
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.single-product .scb-product-specs {
  border: 1px solid var(--sevy-border);
  border-collapse: collapse;
  margin: 20px 0 38px;
  width: 100%;
}

.single-product .scb-product-specs th,
.single-product .scb-product-specs td {
  border-bottom: 1px solid var(--sevy-border);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.single-product .scb-product-specs th {
  background: #f3ece3;
  color: #4a3422;
  width: 30%;
}

.single-product .scb-product-video {
  aspect-ratio: 16 / 9;
  background: #eee5da;
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
}

.single-product .scb-product-video iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

@media (max-width: 680px) {
  .single-product .site-content {
    padding-top: 30px;
  }

  .single-product .scb-product-uses {
    grid-template-columns: 1fr;
  }

  .single-product .scb-product-specs th,
  .single-product .scb-product-specs td {
    padding: 11px 12px;
  }
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sevy-dark);
}

.woocommerce ul.products li.product .price {
  color: var(--sevy-primary);
  font-weight: 700;
}

.woocommerce ul.products li.product {
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  background: #fff;
  box-shadow: var(--sevy-shadow);
}
.woocommerce ul.products li.product:hover {
  box-shadow: 0 6px 24px rgba(139,94,60,0.16);
  transform: translateY(-3px);
}

/* Image produit */
.woocommerce ul.products li.product a img {
  border-radius: 10px 10px 0 0;
}

/* Badge "En stock" */
.woocommerce span.onsale {
  background: var(--sevy-green);
  border-radius: 4px;
}

/* =========================================================
   BADGES DE CONFIANCE (footer)
   Usage : <div class="sevy-trust-badges">...</div>
========================================================= */
.sevy-trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--sevy-border);
}

.sevy-trust-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--sevy-text);
  opacity: 0.75;
}

.sevy-trust-badge svg,
.sevy-trust-badge img {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Logos paiement */
.sevy-payment-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.sevy-payment-logos img {
  height: 26px;
  width: auto;
  opacity: 0.75;
  filter: grayscale(30%);
  transition: opacity 0.2s;
}
.sevy-payment-logos img:hover {
  opacity: 1;
}

/* =========================================================
   NEWSLETTER (section optionnelle)
   Usage : <section class="sevy-newsletter">...</section>
========================================================= */
.sevy-newsletter {
  background: var(--sevy-primary);
  color: #fff;
  text-align: center;
  padding: 48px 24px;
}

.sevy-newsletter h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.sevy-newsletter p {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 20px;
}

.sevy-newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 8px;
}

.sevy-newsletter-form input[type="email"] {
  flex: 1;
  padding: 11px 16px;
  border: none;
  border-radius: var(--sevy-radius);
  font-size: 14px;
}

.sevy-newsletter-form button {
  background: var(--sevy-accent);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--sevy-radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.sevy-newsletter-form button:hover {
  background: #a87b4e;
}

/* =========================================================
   BARRE DE RECHERCHE
========================================================= */
.sevy-search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--sevy-border);
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
}

.sevy-search-form input[type="search"] {
  border: none;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  background: transparent;
  min-width: 180px;
}

.sevy-search-form button {
  background: var(--sevy-primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.sevy-search-form button:hover {
  background: var(--sevy-accent);
}

/* =========================================================
   PAGE CONTACT
========================================================= */
.sevy-contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.sevy-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--sevy-text);
}

.sevy-contact-item a {
  color: var(--sevy-primary);
  font-weight: 500;
}

/* =========================================================
   SECTION TEMOIGNAGES
========================================================= */
.sevy-testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 32px 0;
}

.sevy-testimonial-card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--sevy-shadow);
  border-left: 4px solid var(--sevy-accent);
}

.sevy-testimonial-card .stars {
  color: #f0a500;
  font-size: 16px;
  margin-bottom: 10px;
}

.sevy-testimonial-card blockquote {
  font-size: 14px;
  line-height: 1.7;
  color: var(--sevy-text);
  font-style: italic;
  margin: 0 0 12px;
}

.sevy-testimonial-card cite {
  font-size: 13px;
  font-weight: 600;
  color: var(--sevy-primary);
  font-style: normal;
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */
@media (max-width: 768px) {
  .sevy-newsletter-form {
    flex-direction: column;
  }

  .sevy-newsletter-form input[type="email"],
  .sevy-newsletter-form button {
    width: 100%;
  }

  .sevy-trust-badges {
    gap: 12px;
  }

  .sevy-testimonials {
    grid-template-columns: 1fr;
  }

  .woocommerce ul.products li.product:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .barre-promo {
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* =========================================================
   ACCESSIBILITÉ
========================================================= */
:focus-visible {
  outline: 2px solid var(--sevy-primary);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* La page de confirmation contient encore des blocs de maquette anglais
   placés après le récapitulatif WooCommerce. Ils ne doivent jamais être
   présentés au client après une commande. */
.woocommerce-order-received #post-12 .entry-content > .wp-block-group {
  display: none !important;
}


/* =========================================================
   PAIEMENT TWINT MANUEL — LOGO OFFICIEL
========================================================= */
#radio-control-wc-payment-method-options-bacs__label .wc-block-components-payment-method-label,
.woocommerce-checkout #payment_method_bacs + label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#radio-control-wc-payment-method-options-bacs__label .wc-block-components-payment-method-label::after,
.woocommerce-checkout #payment_method_bacs + label::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 78px;
  height: 30px;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20201%2075%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20aria-hidden%3D%22true%22%3E%3Cg%20clip-path%3D%22url(%23base-logo-clip)%22%3E%3Cpath%20d%3D%22M198.089%2075.156H2.83706C1.28548%2075.156%200.0512695%2073.9351%200.0512695%2072.4002V2.63276C0.0512695%201.09788%201.28548%20-0.123047%202.83706%20-0.123047H198.054C199.605%20-0.123047%20200.84%201.09788%20200.84%202.63276V72.4002C200.875%2073.9351%20199.605%2075.156%20198.089%2075.156Z%22%20fill%3D%22black%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M62.5388%2050.4589C62.5388%2051.1915%2062.0099%2052.0984%2061.3751%2052.4473L38.7009%2065.3891C38.0662%2065.7728%2037.0083%2065.7728%2036.3735%2065.3891L13.6993%2052.4473C13.0646%2052.0636%2012.5356%2051.1915%2012.5356%2050.4589V24.5403C12.5356%2023.8077%2013.0646%2022.9008%2013.6993%2022.5519L36.3735%209.61006C37.0083%209.22634%2038.0662%209.22634%2038.7009%209.61006L61.3751%2022.5519C62.0099%2022.9356%2062.5388%2023.8077%2062.5388%2024.5403V50.4589Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M188.429%2026.4258H168.118V31.2048H175.382V51.7165H181.13V31.2048H188.429V26.4258Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M96.1812%2026.4258H75.8696V31.2048H83.1691V51.7165H88.917V31.2048H96.1812V26.4258Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M154.967%2025.623C148.584%2025.623%20145.022%2029.6696%20145.022%2035.4951V51.7161H150.7V35.3556C150.7%2032.8091%20152.216%2030.8556%20155.037%2030.8556C157.858%2030.8556%20159.339%2033.1579%20159.339%2035.3556V51.7161H165.017V35.4951C165.017%2029.6696%20161.349%2025.623%20154.967%2025.623Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M133.49%2026.4258V51.7165H139.202V26.4258H133.49Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M114.237%2036.4723L114.449%2037.5886L119.773%2051.7165H122.101L129.365%2026.4258H123.758L120.267%2039.7165L120.091%2041.1467L119.809%2039.7165L115.154%2026.4258H113.32L108.701%2039.7165L108.419%2041.1467L108.207%2039.7165L104.751%2026.4258H99.1445L106.409%2051.7165H108.736L114.061%2037.5886L114.237%2036.4723Z%22%20fill%3D%22white%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M49.3149%2037.5879L43.426%2046.1693L40.3934%2041.5647L43.8844%2036.4019C44.5191%2035.4949%2045.9297%2032.9484%2044.3076%2029.4949C43.0028%2026.7042%2040.1818%2025.3438%2037.7134%2025.3438C35.2449%2025.3438%2032.5297%2026.5996%2031.1191%2029.4949C29.497%2032.8089%2030.9076%2035.4251%2031.507%2036.2972C31.507%2036.2972%2033.4465%2039.1228%2035.0686%2041.4949L37.7134%2045.2624L41.6628%2051.2275C41.6981%2051.2624%2042.3328%2052.2042%2043.426%2052.2042C44.5191%2052.2042%2045.1186%2051.2624%2045.2244%2051.1577L54.4986%2037.5879H49.3149ZM37.7134%2037.7972C37.7134%2037.7972%2036.1618%2035.46%2035.1744%2033.8554C34.0813%2032.1112%2035.3155%2029.5298%2037.7134%2029.5298C40.1113%2029.5298%2041.3455%2032.1112%2040.2523%2033.8554C39.2649%2035.4949%2037.7134%2037.7972%2037.7134%2037.7972Z%22%20fill%3D%22url(%23base-logo-paint0)%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M32.002%2045.8905L26.1836%2037.8324C26.1836%2037.8324%2024.632%2035.4952%2023.6446%2033.8905C22.5515%2032.1463%2023.7857%2029.565%2026.1836%2029.565C28.5815%2029.565%2026.783%2029.5998%2027.0299%2029.6696L29.0751%2025.9719C28.123%2025.5882%2027.1357%2025.3789%2026.1836%2025.3789C23.7151%2025.3789%2020.9999%2026.6347%2019.5894%2029.5301C17.9673%2032.844%2019.3778%2035.4603%2019.9773%2036.3324L30.133%2051.2277C30.2036%2051.3673%2030.8736%2052.3091%2031.9315%2052.3091C32.9894%2052.3091%2033.6241%2051.4022%2033.7299%2051.2626L36.7978%2046.658L34.153%2042.8208L32.002%2045.8905Z%22%20fill%3D%22url(%23base-logo-paint1)%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3Cdefs%3E%3CradialGradient%20id%3D%22base-logo-paint0%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(35.7739%2027.7158)%20scale(27.3289%2027.0349)%22%3E%3Cstop%20stop-color%3D%22%23FFC800%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.2%22%20stop-color%3D%22%23FFBD00%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.3%22%20stop-color%3D%22%23FF9100%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%23FF7000%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.5%22%20stop-color%3D%22%23FF4700%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.6%22%20stop-color%3D%22%23FF0000%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FF0000%22%3E%3C%2Fstop%3E%3C%2FradialGradient%3E%3CradialGradient%20id%3D%22base-logo-paint1%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(19.3073%2029.251)%20scale(25.0368%2024.7674)%22%3E%3Cstop%20stop-color%3D%22%2300B4E6%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.2%22%20stop-color%3D%22%2300B0E3%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.4%22%20stop-color%3D%22%2301A5DB%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.6%22%20stop-color%3D%22%230292CD%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.8%22%20stop-color%3D%22%230377BA%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%220.9%22%20stop-color%3D%22%230455A1%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23054696%22%3E%3C%2Fstop%3E%3C%2FradialGradient%3E%3CclipPath%20id%3D%22base-logo-clip%22%3E%3Crect%20width%3D%22201%22%20height%3D%2275%22%20fill%3D%22white%22%3E%3C%2Frect%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E") center / contain no-repeat;
}

@media (max-width: 480px) {
  #radio-control-wc-payment-method-options-bacs__label .wc-block-components-payment-method-label::after,
  .woocommerce-checkout #payment_method_bacs + label::after {
    width: 68px;
    height: 26px;
  }
}
/* =========================================================
   PAIEMENT PAYPAL — LOGO OFFICIEL
========================================================= */
#radio-control-wc-payment-method-options-ppcp-gateway__label,
.woocommerce-checkout #payment_method_ppcp-gateway + label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#radio-control-wc-payment-method-options-ppcp-gateway__label::after,
.woocommerce-checkout #payment_method_ppcp-gateway + label::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 92px;
  height: 30px;
  margin-left: auto;
  background: url("https://www.paypalobjects.com/paypal-ui/logos/svg/paypal-color.svg") center / contain no-repeat;
}

@media (max-width: 480px) {
  #radio-control-wc-payment-method-options-ppcp-gateway__label::after,
  .woocommerce-checkout #payment_method_ppcp-gateway + label::after {
    width: 80px;
    height: 26px;
  }
}

/* =========================================================
   GALERIES — VISIONNEUSE PHOTO COMMUNE
========================================================= */
body.sevy-image-viewer-open {
  overflow: hidden;
}

.sevy-image-viewer[hidden] {
  display: none !important;
}

.sevy-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(25, 20, 16, 0.94);
}

.sevy-image-viewer__panel {
  position: relative;
  width: min(1180px, 94vw);
  max-height: calc(100vh - 32px);
}

.sevy-image-viewer__figure {
  display: grid;
  gap: 12px;
  margin: 0;
}

.sevy-image-viewer__media {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
}

.sevy-image-viewer__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 130px);
  margin: 0 auto;
  border-radius: 16px;
  background: #f7f2e9;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 160ms ease;
}

.sevy-image-viewer__image.is-loaded {
  opacity: 1;
}

.sevy-image-viewer__status {
  color: #fff;
  font-size: 1rem;
  text-align: center;
}

.sevy-image-viewer__caption {
  margin: 0;
  color: #f4eadc;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.sevy-image-viewer__close {
  position: absolute;
  z-index: 2;
  top: -18px;
  right: -18px;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: #fff;
  color: #35271d;
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sevy-image-viewer__close:hover,
.sevy-image-viewer__close:focus-visible {
  background: #d7a35d;
  color: #24180f;
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .sevy-image-viewer {
    padding: 12px;
  }

  .sevy-image-viewer__panel {
    width: 100%;
  }

  .sevy-image-viewer__media {
    min-height: 160px;
  }

  .sevy-image-viewer__image {
    max-height: calc(100vh - 105px);
    border-radius: 10px;
  }

  .sevy-image-viewer__caption {
    padding-inline: 8px;
    font-size: 0.9rem;
  }

  .sevy-image-viewer__close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-width: 1px;
  }
}


/* Priorité sur les styles généraux des boutons du thème. */
button.sevy-image-viewer__close {
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.75) !important;
  background: #fff !important;
  color: #35271d !important;
}

button.sevy-image-viewer__close:hover,
button.sevy-image-viewer__close:focus,
button.sevy-image-viewer__close:focus-visible {
  border-color: #fff !important;
  background: #d7a35d !important;
  color: #24180f !important;
}
