/*
Theme Name: Zaytuna Extendable Child
Theme URI: https://example.com/
Description: Thème enfant Extendable pour personnalisation du site Éditions Zaytuna.
Author: OpenAI
Template: extendable
Version: 1.0.0
Text Domain: zaytuna-extendable-child
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Amiri:wght@400;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ===============================
   ZAYTUNA DESIGN SYSTEM
   Inspiré du HTML fourni
   Partie publique uniquement
   =============================== */

:root {
  --zay-gold: #b8975a;
  --zay-gold-light: #d4b483;
  --zay-gold-dark: #8b6e3e;
  --zay-ink: #1a1410;
  --zay-ink-mid: #3d2e1e;
  --zay-parchment: #f8f4ec;
  --zay-parchment-dark: #ede6d6;
  --zay-cream: #fdfbf7;
  --zay-text: #2c2218;
  --zay-text-muted: #7a6852;
  --zay-border: rgba(184, 151, 90, 0.25);
  --zay-border-strong: rgba(184, 151, 90, 0.5);
  --zay-white: #ffffff;
  --zay-shadow-soft: 0 10px 30px rgba(26, 20, 16, 0.06);
  --zay-shadow-card: 0 16px 40px rgba(26, 20, 16, 0.08);
  --zay-radius: 2px;
  --zay-content-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body,
.editor-styles-wrapper {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--zay-cream);
  color: var(--zay-text);
  line-height: 1.7;
}

body {
  overflow-x: hidden;
}

a {
  color: var(--zay-gold-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
  color: var(--zay-gold);
}

p,
li,
dd,
dt,
blockquote,
input,
textarea,
select,
button {
  font-family: 'Source Sans 3', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-post-title,
.entry-title,
.site-title {
  font-family: 'Cormorant Garamond', serif;
  color: var(--zay-ink);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
}

h1,
.wp-block-post-title,
.entry-title {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  font-weight: 300;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.site,
.wp-site-blocks {
  background: var(--zay-cream);
}

/* ===============================
   LAYOUT / CONTAINERS
   =============================== */

.wp-site-blocks > *,
.site-main > * {
  position: relative;
}

.alignwide,
.wp-block-group.alignwide,
.wp-block-cover.alignwide,
.wp-block-columns.alignwide,
.woocommerce-page .content-area,
.single-product div.product,
.site-main,
.site-content,
.site-footer > *,
.site-header > * {
  max-width: var(--zay-content-width);
}

.wp-site-blocks .alignwide,
.wp-site-blocks .alignfull > .wp-block-group__inner-container,
.wp-site-blocks .alignfull > .wp-block-cover__inner-container,
.site-main,
.site-content,
.content-area,
.widget-area,
.site-footer > *,
.site-header > * {
  margin-left: auto;
  margin-right: auto;
}

.wp-block-group,
.wp-block-cover,
.wp-block-columns,
.wp-block-media-text,
.entry-content > * {
  box-sizing: border-box;
}

/* ===============================
   HEADER / NAVIGATION
   =============================== */

.site-header,
header.site-header,
.wp-block-template-part.header,
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--zay-border);
}

.site-header,
header.site-header {
  padding: 0 1.25rem;
}

.site-branding .site-title,
.wp-block-site-title,
.custom-logo-link + .site-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--zay-ink);
  letter-spacing: 0.05em;
  text-transform: none;
}

.site-description,
.wp-block-site-tagline {
  color: var(--zay-text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.wp-block-navigation,
.main-navigation,
.primary-navigation {
  font-family: 'Source Sans 3', sans-serif;
}

.wp-block-navigation .wp-block-navigation-item__content,
.main-navigation a,
.primary-navigation a,
.menu a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zay-text-muted);
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.main-navigation a:hover,
.primary-navigation a:hover,
.menu a:hover {
  color: var(--zay-gold);
}

/* ===============================
   GLOBAL SECTIONS / BLOCKS
   =============================== */

main {
  padding-bottom: 3rem;
}

.entry-content > .wp-block-group,
.entry-content > .wp-block-cover,
.entry-content > .wp-block-columns,
.entry-content > .wp-block-media-text,
.entry-content > .wp-block-query,
.entry-content > .wp-block-woocommerce-product-collection {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section-title,
.wp-block-heading.is-style-zaytuna-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  color: var(--zay-ink);
}

.section-eyebrow,
.has-eyebrow {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--zay-gold);
}

.wp-block-separator,
hr {
  border: 0;
  border-top: 1px solid var(--zay-border);
}

/* ===============================
   BUTTONS
   =============================== */

button,
input[type='button'],
input[type='submit'],
.wp-block-button__link,
.button,
.wc-block-components-button,
.add_to_cart_button,
.single_add_to_cart_button {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--zay-radius);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.wp-block-button__link,
.button,
.wc-block-components-button,
.add_to_cart_button,
.single_add_to_cart_button,
button,
input[type='submit'] {
  background: var(--zay-ink);
  color: var(--zay-gold-light);
  border: 1px solid var(--zay-ink);
  padding: 0.95rem 1.75rem;
}

.wp-block-button__link:hover,
.button:hover,
.wc-block-components-button:hover,
.add_to_cart_button:hover,
.single_add_to_cart_button:hover,
button:hover,
input[type='submit']:hover {
  background: var(--zay-gold-dark);
  color: var(--zay-white);
  border-color: var(--zay-gold-dark);
  transform: translateY(-1px);
}

.is-style-outline > .wp-block-button__link,
.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: transparent;
  color: var(--zay-gold-dark);
  border: 1px solid var(--zay-border-strong);
}

.is-style-outline > .wp-block-button__link:hover,
.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background: var(--zay-gold);
  color: var(--zay-ink);
  border-color: var(--zay-gold);
}

/* ===============================
   HERO / COVER BLOCKS
   Ajoutez la classe: zaytuna-hero
   =============================== */

.zaytuna-hero,
.wp-block-cover.zaytuna-hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--zay-ink);
  color: var(--zay-parchment);
}

.zaytuna-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    radial-gradient(circle at 20% 50%, #b8975a 1px, transparent 1px),
    radial-gradient(circle at 80% 50%, #b8975a 1px, transparent 1px),
    radial-gradient(circle at 50% 20%, #b8975a 1px, transparent 1px),
    radial-gradient(circle at 50% 80%, #b8975a 1px, transparent 1px);
  background-size: 60px 60px;
}

.zaytuna-hero .wp-block-cover__inner-container,
.zaytuna-hero .wp-block-group__inner-container {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.zaytuna-hero h1,
.zaytuna-hero .wp-block-heading {
  color: var(--zay-parchment);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 300;
}

.zaytuna-hero p {
  color: rgba(248, 244, 236, 0.72);
}

/* ===============================
   CARDS / BOOKS / POSTS / PRODUCTS
   =============================== */

.wp-block-post,
.wc-block-grid__product,
.products li.product,
.book-card,
.wp-block-query .wp-block-post-template > li,
.wp-block-group.is-style-zaytuna-card {
  background: var(--zay-white);
  border: 1px solid var(--zay-border);
  box-shadow: var(--zay-shadow-soft);
}

.wp-block-post,
.wc-block-grid__product,
.products li.product,
.wp-block-query .wp-block-post-template > li {
  padding: 0;
  overflow: hidden;
}

.wp-block-post:hover,
.wc-block-grid__product:hover,
.products li.product:hover,
.book-card:hover,
.wp-block-query .wp-block-post-template > li:hover {
  transform: translateY(-4px);
  box-shadow: var(--zay-shadow-card);
}

.wc-block-grid__product-image img,
.products li.product img,
.wp-block-post-featured-image img,
.book-cover img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  width: 100%;
}

.wc-block-grid__product-title,
.products li.product .woocommerce-loop-product__title,
.book-title,
.wp-block-post-title a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--zay-ink);
}

.price,
.woocommerce-Price-amount,
.wc-block-components-product-price,
.book-author,
.wp-block-post-excerpt,
.wp-block-post-date {
  color: var(--zay-text-muted);
}

.products,
.wc-block-grid,
.books-grid,
.wp-block-post-template {
  gap: 2rem;
}

/* ===============================
   WOO / SINGLE PRODUCT / SHOP
   =============================== */

.woocommerce-page .site-main,
.woocommerce .site-main {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.woocommerce-breadcrumb,
.term-description,
.woocommerce-result-count,
.ordering,
.wc-block-product-categories-list {
  color: var(--zay-text-muted);
  font-size: 0.9rem;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  border: 1px solid var(--zay-border);
  background: var(--zay-white);
  padding: 0 0 1.2rem;
}

.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  margin: 0 1rem;
}

.single-product div.product {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 1.25rem;
}

.single-product div.product .summary {
  width: 100%;
}

.single-product .product_title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 400;
}

.single-product .price {
  color: var(--zay-gold-dark);
  font-size: 1.1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  border-bottom: 1px solid var(--zay-border);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li,
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background: transparent;
  border: 1px solid var(--zay-border);
}

/* ===============================
   FORMS / CONTACT / NEWSLETTER
   =============================== */

input[type='text'],
input[type='email'],
input[type='url'],
input[type='tel'],
input[type='number'],
input[type='search'],
input[type='password'],
textarea,
select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--zay-border-strong);
  background: var(--zay-white);
  color: var(--zay-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-textarea:focus {
  border-color: var(--zay-gold);
  box-shadow: 0 0 0 2px rgba(184, 151, 90, 0.08);
}

label,
.form-label,
.wpforms-field-label,
.mc4wp-form-fields label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--zay-text-muted);
  margin-bottom: 0.5rem;
}

/* ===============================
   TABLES / QUOTES / MISC
   =============================== */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--zay-white);
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--zay-border);
  text-align: left;
}

th {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zay-text-muted);
  background: var(--zay-parchment-dark);
  font-weight: 500;
}

blockquote,
.wp-block-quote,
.wp-block-pullquote {
  border-left: 2px solid var(--zay-gold);
  padding: 1rem 0 1rem 1.25rem;
  color: var(--zay-ink-mid);
  background: linear-gradient(90deg, rgba(184,151,90,0.06), transparent);
}

/* ===============================
   FOOTER
   =============================== */

.site-footer,
footer.site-footer,
.wp-block-template-part.footer,
footer.wp-block-template-part {
  background: var(--zay-ink-mid);
  color: rgba(248, 244, 236, 0.62);
  padding: 4rem 1.25rem 2rem;
  margin-top: 4rem;
}

.site-footer a,
footer.site-footer a,
.wp-block-template-part.footer a,
footer.wp-block-template-part a {
  color: rgba(248, 244, 236, 0.62);
}

.site-footer a:hover,
footer.site-footer a:hover,
.wp-block-template-part.footer a:hover,
footer.wp-block-template-part a:hover {
  color: var(--zay-gold);
}

.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
footer.site-footer h1,
footer.site-footer h2,
footer.site-footer h3,
footer.site-footer h4,
.wp-block-template-part.footer h1,
.wp-block-template-part.footer h2,
.wp-block-template-part.footer h3,
.wp-block-template-part.footer h4 {
  color: var(--zay-parchment);
}

/* ===============================
   OPTIONAL CLASSES FROM ORIGINAL HTML
   Vous pouvez les réutiliser dans des blocs Gutenberg
   =============================== */

.announcement-strip {
  background: var(--zay-ink);
  color: var(--zay-gold-light);
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.editorial-section {
  background: var(--zay-ink);
  color: var(--zay-parchment);
  padding: 6rem 1.25rem;
  text-align: center;
}

.editorial-section h1,
.editorial-section h2,
.editorial-section h3,
.editorial-section .section-title {
  color: var(--zay-parchment);
  font-weight: 300;
}

.editorial-section p {
  color: rgba(248, 244, 236, 0.74);
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--zay-border);
  border: 1px solid var(--zay-border);
}

.cat-item {
  background: var(--zay-cream);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: background 0.2s ease;
}

.cat-item:hover {
  background: var(--zay-parchment-dark);
}

.cat-icon {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--zay-gold);
  margin-bottom: 0.75rem;
}

.cat-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--zay-ink);
}

.cat-count {
  color: var(--zay-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.book-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
}

.book-detail-cover {
  aspect-ratio: 2 / 3;
  background: var(--zay-parchment-dark);
  border: 1px solid var(--zay-border);
  overflow: hidden;
}

.book-detail-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.book-detail-meta,
.book-detail-desc,
.hashtags {
  color: var(--zay-text-muted);
}

.hashtag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--zay-gold-dark);
  background: rgba(184, 151, 90, 0.1);
  padding: 0.35rem 0.7rem;
  letter-spacing: 0.05em;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zay-text-muted);
  background: none;
  border: none;
  padding: 0;
}

.back-btn:hover {
  color: var(--zay-gold);
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 1024px) {
  .single-product div.product,
  .book-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header,
  header.site-header {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .entry-content > .wp-block-group,
  .entry-content > .wp-block-cover,
  .entry-content > .wp-block-columns,
  .entry-content > .wp-block-media-text,
  .entry-content > .wp-block-query,
  .entry-content > .wp-block-woocommerce-product-collection,
  .woocommerce-page .site-main,
  .woocommerce .site-main {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .products,
  .wc-block-grid,
  .books-grid,
  .wp-block-post-template {
    gap: 1.2rem;
  }

  .editorial-section {
    padding: 4rem 1rem;
  }

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

@media (max-width: 560px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  h1,
  .wp-block-post-title,
  .entry-title {
    line-height: 1.05;
  }
}
