/*
 * Theme Name:   House of Berber Child
 * Theme URI:    https://houseofberber.com
 * Description:  Child theme for House of Berber — Astra customizations
 * Author:       House of Berber
 * Author URI:   https://houseofberber.com
 * Template:     astra
 * Version:      1.0.0
 * Text Domain:  houseofberber-child
 */

/* ==========================================================================
   DESIGN TOKENS — House of Berber
   ========================================================================== */

:root {
  /* --- Palette --- */
  --hob-cream:       #F5F0E8;   /* fond principal, chaleur naturelle       */
  --hob-sand:        #E8DCC8;   /* sections alternées, cartes              */
  --hob-terracotta:  #C4622D;   /* accent primaire, CTA                    */
  --hob-terracotta-dark: #A04E22; /* hover boutons                         */
  --hob-burgundy:    #7A2530;   /* accent secondaire, badges               */
  --hob-charcoal:    #2C2C2C;   /* titres, texte principal                 */
  --hob-taupe:       #7A6E5F;   /* texte secondaire, meta                  */
  --hob-white:       #FFFFFF;
  --hob-black:       #1A1A1A;

  /* --- Typographie --- */
  --hob-font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --hob-font-body:    'Jost', 'Helvetica Neue', sans-serif;
  --hob-font-accent:  'Cormorant Garamond', serif; /* italique pour labels */

  /* --- Tailles de police --- */
  --hob-text-xs:   0.75rem;   /*  12px */
  --hob-text-sm:   0.875rem;  /*  14px */
  --hob-text-base: 1rem;      /*  16px */
  --hob-text-lg:   1.125rem;  /*  18px */
  --hob-text-xl:   1.25rem;   /*  20px */
  --hob-text-2xl:  1.5rem;    /*  24px */
  --hob-text-3xl:  2rem;      /*  32px */
  --hob-text-4xl:  2.75rem;   /*  44px */
  --hob-text-5xl:  3.5rem;    /*  56px */

  /* --- Espacements --- */
  --hob-space-xs:  0.5rem;
  --hob-space-sm:  1rem;
  --hob-space-md:  1.5rem;
  --hob-space-lg:  2.5rem;
  --hob-space-xl:  4rem;
  --hob-space-2xl: 6rem;

  /* --- Bordures & ombres --- */
  --hob-radius-sm:  4px;
  --hob-radius-md:  8px;
  --hob-radius-pill: 50px;
  --hob-shadow-soft: 0 4px 20px rgba(44, 44, 44, 0.08);
  --hob-shadow-card: 0 8px 32px rgba(44, 44, 44, 0.12);

  /* --- Transitions --- */
  --hob-transition: 0.3s ease;
}


/* ==========================================================================
   BASE — Fond & Couleurs globales
   ========================================================================== */

body {
  background-color: var(--hob-cream);
  color: var(--hob-charcoal);
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}


/* ==========================================================================
   TYPOGRAPHIE
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.ast-woocommerce-container .woocommerce-loop-product__title,
.entry-title {
  font-family: var(--hob-font-heading);
  color: var(--hob-charcoal);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--hob-text-5xl); }
h2 { font-size: var(--hob-text-4xl); }
h3 { font-size: var(--hob-text-3xl); }
h4 { font-size: var(--hob-text-2xl); }
h5 { font-size: var(--hob-text-xl); }
h6 { font-size: var(--hob-text-lg); }

@media (max-width: 768px) {
  h1 { font-size: var(--hob-text-4xl); }
  h2 { font-size: var(--hob-text-3xl); }
  h3 { font-size: var(--hob-text-2xl); }
}

p {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-base);
  color: var(--hob-taupe);
  line-height: 1.8;
  margin-bottom: var(--hob-space-sm);
}

a {
  color: var(--hob-terracotta);
  text-decoration: none;
  transition: color var(--hob-transition);
}

a:hover {
  color: var(--hob-terracotta-dark);
}

/* Labels & petites caps */
.hob-label,
.ast-above-header-bar,
.site-header-section .ast-primary-header-bar span {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hob-taupe);
}


/* ==========================================================================
   BOUTONS
   ========================================================================== */

/* Bouton primaire */
.ast-button,
.button,
button,
input[type="button"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .cart .button,
.woocommerce .cart input.button {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background-color: var(--hob-terracotta);
  color: var(--hob-white) !important;
  border: 2px solid var(--hob-terracotta);
  border-radius: var(--hob-radius-sm);
  padding: 14px 32px;
  cursor: pointer;
  transition: background-color var(--hob-transition),
              border-color var(--hob-transition),
              transform var(--hob-transition),
              box-shadow var(--hob-transition);
  display: inline-block;
}

.ast-button:hover,
.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .cart .button:hover {
  background-color: var(--hob-terracotta-dark);
  border-color: var(--hob-terracotta-dark);
  color: var(--hob-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 98, 45, 0.35);
}

/* Bouton secondaire (outline) */
.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background-color: transparent;
  color: var(--hob-terracotta) !important;
  border: 2px solid var(--hob-terracotta);
}

.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background-color: var(--hob-terracotta);
  color: var(--hob-white) !important;
}

/* Bouton "Add to cart" WooCommerce */
.woocommerce ul.products li.product .button {
  width: 100%;
  text-align: center;
  margin-top: var(--hob-space-xs);
  border-radius: var(--hob-radius-sm);
}


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

#masthead,
.site-header,
.ast-header-break-point .main-header-bar,
.main-header-bar {
  background-color: var(--hob-cream) !important;
  border-bottom: 1px solid var(--hob-sand);
}

/* Logo */
.custom-logo,
.ast-site-identity img {
  max-height: 60px;
}

/* Nav links */
.main-navigation a,
.ast-main-header-bar-alignment .main-header-menu a,
.ast-primary-menu a {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hob-charcoal) !important;
  transition: color var(--hob-transition);
  padding: 6px 14px;
}

.main-navigation a:hover,
.ast-primary-menu a:hover,
.ast-primary-menu li.current-menu-item > a {
  color: var(--hob-terracotta) !important;
}

/* Dropdown menus */
.ast-primary-menu .sub-menu {
  background-color: var(--hob-cream);
  border-top: 2px solid var(--hob-terracotta);
  box-shadow: var(--hob-shadow-card);
}

.ast-primary-menu .sub-menu a {
  color: var(--hob-charcoal) !important;
}

.ast-primary-menu .sub-menu a:hover {
  background-color: var(--hob-sand);
  color: var(--hob-terracotta) !important;
}


/* ==========================================================================
   WOOCOMMERCE — Grille produits
   ========================================================================== */

.woocommerce ul.products {
  margin: 0;
}

.woocommerce ul.products li.product {
  background-color: var(--hob-white);
  border-radius: var(--hob-radius-md);
  overflow: hidden;
  box-shadow: var(--hob-shadow-soft);
  transition: box-shadow var(--hob-transition), transform var(--hob-transition);
  padding: 0 0 var(--hob-space-md);
}

.woocommerce ul.products li.product:hover {
  box-shadow: var(--hob-shadow-card);
  transform: translateY(-4px);
}

.woocommerce ul.products li.product img {
  border-radius: var(--hob-radius-md) var(--hob-radius-md) 0 0;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--hob-font-heading);
  font-size: var(--hob-text-xl);
  font-weight: 500;
  color: var(--hob-charcoal);
  padding: var(--hob-space-sm) var(--hob-space-sm) 0;
}

.woocommerce ul.products li.product .price {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-base);
  color: var(--hob-terracotta);
  font-weight: 600;
  padding: 0 var(--hob-space-sm);
}

.woocommerce ul.products li.product .price del {
  color: var(--hob-taupe);
  font-weight: 400;
}

/* Badge "Sale" */
.woocommerce span.onsale {
  background-color: var(--hob-burgundy);
  border-radius: var(--hob-radius-sm);
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  min-width: auto;
  min-height: auto;
  line-height: 1;
}


/* ==========================================================================
   SECTIONS — Espacement général
   ========================================================================== */

.ast-container,
.entry-content {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hob-space-lg);
  padding-right: var(--hob-space-lg);
}

section,
.elementor-section,
.wp-block-group {
  padding-top: var(--hob-space-xl);
  padding-bottom: var(--hob-space-xl);
}

@media (max-width: 768px) {
  section,
  .elementor-section,
  .wp-block-group {
    padding-top: var(--hob-space-lg);
    padding-bottom: var(--hob-space-lg);
  }

  .ast-container,
  .entry-content {
    padding-left: var(--hob-space-sm);
    padding-right: var(--hob-space-sm);
  }
}

/* Sections à fond sable */
.hob-section-sand,
.ast-row:nth-child(even) {
  background-color: var(--hob-sand);
}


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

.site-footer,
#colophon,
.ast-small-footer {
  background-color: var(--hob-charcoal) !important;
  color: var(--hob-sand) !important;
}

.site-footer a,
#colophon a,
.ast-small-footer a {
  color: var(--hob-sand) !important;
  transition: color var(--hob-transition);
}

.site-footer a:hover,
#colophon a:hover,
.ast-small-footer a:hover {
  color: var(--hob-terracotta) !important;
}

.site-footer h4,
.site-footer h5,
.site-footer .widget-title {
  color: var(--hob-white) !important;
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--hob-space-md);
}

.ast-small-footer {
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  font-size: var(--hob-text-sm);
  color: var(--hob-taupe) !important;
}


/* ==========================================================================
   FORMULAIRES
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
  font-family: var(--hob-font-body);
  font-size: var(--hob-text-base);
  color: var(--hob-charcoal);
  background-color: var(--hob-white);
  border: 1px solid var(--hob-sand);
  border-radius: var(--hob-radius-sm);
  padding: 12px 16px;
  width: 100%;
  transition: border-color var(--hob-transition), box-shadow var(--hob-transition);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--hob-terracotta);
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.15);
}


/* ==========================================================================
   UTILITAIRES
   ========================================================================== */

/* Séparateur décoratif berbère */
.hob-divider {
  display: flex;
  align-items: center;
  gap: var(--hob-space-sm);
  margin: var(--hob-space-lg) auto;
}

.hob-divider::before,
.hob-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hob-sand);
}

/* Texte surligné terracotta */
.hob-highlight {
  color: var(--hob-terracotta);
}

/* Container centré narrow pour le contenu éditorial */
.hob-narrow {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
