/* =========================================================================
   AN NAJM — PAGE D'ACCUEIL (refonte 2026)
   Fichier : wp-content/themes/annajm-child/assets/css/annajm-home.css
   Chargé uniquement sur la page d'accueil (voir functions.php, section 7).

   Toutes les règles sont scopées sous #annajm-homepage :
   aucun style global du thème, de Kadence ou de WooCommerce n'est modifié
   en dehors de la page d'accueil.

   Sommaire
   1.  Variables
   2.  Base scopée (neutralise les styles globaux du thème enfant)
   3.  Utilitaires (conteneur, eyebrow, boutons, liens)
   4.  Hero + vitrine + recherche
   5.  Bande de réassurance
   6.  En-têtes de section
   7.  Collections (catégories WooCommerce)
   8.  Grilles produits (shortcodes WooCommerce natifs)
   9.  Méthode éditoriale
   10. À propos + avis lecteurs
   11. Articles
   12. Appel à l'action final
   13. Sections vides (masquage automatique)
   14. Responsive
   15. Accessibilité : mouvement réduit, impression
   ========================================================================= */


/* -------------------------------------------------------------------------
   1. VARIABLES
   Les couleurs reprennent la palette Kadence du site (--global-paletteX)
   avec une valeur de secours identique à la charte An Najm.
   ------------------------------------------------------------------------- */
#annajm-homepage {
  /* Marine */
  --ah-navy:        var(--global-palette6, #2C3E50);
  --ah-navy-deep:   #1A252F;

  /* Or */
  --ah-gold:        var(--global-palette1, #D4A574);   /* fonds, filets, grands chiffres */
  --ah-gold-soft:   #E6BF8A;                           /* texte doré sur fond marine (6,4:1) */
  --ah-ink-gold:    #8A6038;                           /* texte doré sur fond clair (5,4:1) */

  /* Fonds */
  --ah-cream:       var(--global-palette9, #FEFCF8);
  --ah-sand:        #F5F2ED;
  --ah-paper:       #FFFFFF;
  --ah-line:        #E8E3D8;
  --ah-line-strong: #D9D1C2;

  /* Textes */
  --ah-text:        #2C2C2C;
  --ah-text-2:      #5A5A5A;                           /* 6,7:1 sur crème */
  --ah-on-dark:     #FEFCF8;
  --ah-on-dark-2:   #C9D2DB;                           /* 7,2:1 sur marine */
  --ah-danger:      #9B2C2C;

  /* Focus (adapté au fond, redéfini sur les sections sombres) */
  --ah-focus:       var(--ah-ink-gold);

  /* Typographie : polices déjà chargées par le thème enfant */
  --ah-font-heading: var(--anjm-font-heading, 'Crimson Text', Georgia, serif);
  --ah-font-body:    var(--anjm-font-body, 'Inter', system-ui, -apple-system, sans-serif);

  /* Mise en page */
  --ah-wrap:        1240px;
  --ah-gutter:      clamp(16px, 4vw, 40px);
  --ah-space:       clamp(56px, 7vw, 104px);
  --ah-radius:      12px;
  --ah-radius-sm:   8px;

  /* Décalage sous l'en-tête transparent Kadence (topbar + header) */
  --ah-hero-offset: clamp(104px, 10vw, 148px);

  /* Ombres légères */
  --ah-shadow:       0 1px 2px rgba(26, 37, 47, 0.05), 0 6px 20px rgba(26, 37, 47, 0.06);
  --ah-shadow-hover: 0 2px 4px rgba(26, 37, 47, 0.07), 0 14px 32px rgba(26, 37, 47, 0.10);

  --ah-ease:        cubic-bezier(0.2, 0.7, 0.2, 1);
  --ah-dur:         0.25s;
}


/* -------------------------------------------------------------------------
   2. BASE SCOPÉE
   :where() garde une spécificité minimale (celle de l'ID) pour que les
   composants ci-dessous puissent la surcharger sans !important.
   ------------------------------------------------------------------------- */
#annajm-homepage {
  font-family: var(--ah-font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ah-text);
  background: var(--ah-cream);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

#annajm-homepage *,
#annajm-homepage *::before,
#annajm-homepage *::after {
  box-sizing: border-box;
}

#annajm-homepage :where(h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, figcaption) {
  margin: 0;
  padding: 0;
}

#annajm-homepage :where(h1, h2, h3, h4) {
  font-family: var(--ah-font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ah-navy);
  letter-spacing: 0;
}

#annajm-homepage :where(p) {
  line-height: 1.65;
}

#annajm-homepage :where(ul, ol) {
  list-style: none;
}

#annajm-homepage :where(img) {
  max-width: 100%;
  height: auto;
}

#annajm-homepage :where(a) {
  color: inherit;
  text-decoration: none;
}

#annajm-homepage :where(a:hover) {
  color: inherit;
  text-decoration: none;
}

#annajm-homepage :where(a, button, input, select):focus-visible {
  outline: 3px solid var(--ah-focus);
  outline-offset: 3px;
}

#annajm-homepage :where(a, button, input, select):focus:not(:focus-visible) {
  outline: none;
}


/* -------------------------------------------------------------------------
   3. UTILITAIRES
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-wrap {
  width: min(100% - 2 * var(--ah-gutter), var(--ah-wrap));
  margin-inline: auto;
}

#annajm-homepage .annajm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--ah-font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--ah-gold);
  flex: none;
}

#annajm-homepage .annajm-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;
}

/* Boutons */
#annajm-homepage .annajm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--ah-radius-sm);
  font-family: var(--ah-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--ah-dur) var(--ah-ease),
    color var(--ah-dur) var(--ah-ease),
    border-color var(--ah-dur) var(--ah-ease),
    transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* Or : texte marine profond (7:1) au lieu du blanc (2,2:1) */
#annajm-homepage .annajm-btn--gold {
  background: var(--ah-gold);
  color: var(--ah-navy-deep);
}

#annajm-homepage .annajm-btn--gold:hover {
  background: var(--ah-gold-soft);
  color: var(--ah-navy-deep);
}

#annajm-homepage .annajm-btn--navy {
  background: var(--ah-navy);
  color: var(--ah-on-dark);
}

#annajm-homepage .annajm-btn--navy:hover {
  background: var(--ah-navy-deep);
  color: var(--ah-on-dark);
}

/* Contour sur fond sombre */
#annajm-homepage .annajm-btn--ghost {
  background: transparent;
  border-color: rgba(230, 191, 138, 0.55);
  color: var(--ah-on-dark);
}

#annajm-homepage .annajm-btn--ghost:hover {
  border-color: var(--ah-gold-soft);
  background: rgba(230, 191, 138, 0.08);
  color: var(--ah-on-dark);
}

/* Contour sur fond clair */
#annajm-homepage .annajm-btn--outline {
  background: transparent;
  border-color: var(--ah-navy);
  color: var(--ah-navy);
}

#annajm-homepage .annajm-btn--outline:hover {
  background: var(--ah-navy);
  color: var(--ah-on-dark);
}

/* Lien texte avec flèche */
#annajm-homepage .annajm-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ah-navy);
  border-bottom: 1px solid transparent;
  transition: color var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-link::after {
  content: "\2192";
  transition: transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-link:hover {
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-link:hover::after {
  transform: translateX(3px);
}


/* -------------------------------------------------------------------------
   4. HERO
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-hero {
  --ah-focus: var(--ah-gold-soft);
  position: relative;
  isolation: isolate;
  padding: var(--ah-hero-offset) 0 clamp(48px, 7vw, 96px);
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(212, 165, 116, 0.14) 0%, rgba(212, 165, 116, 0) 55%),
    linear-gradient(180deg, var(--ah-navy-deep) 0%, var(--ah-navy) 100%);
  color: var(--ah-on-dark);
}

/* Étoile (an-najm) : un seul ornement, discret */
#annajm-homepage .annajm-hero__star {
  position: absolute;
  z-index: -1;
  top: clamp(60px, 9vw, 120px);
  right: -60px;
  width: clamp(260px, 32vw, 460px);
  height: auto;
  color: var(--ah-gold);
  opacity: 0.09;
  pointer-events: none;
}

#annajm-homepage .annajm-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

#annajm-homepage .annajm-hero .annajm-eyebrow {
  color: var(--ah-gold-soft);
}

#annajm-homepage .annajm-hero__eyebrow-ar {
  font-family: var(--ah-font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#annajm-homepage .annajm-hero__title {
  max-width: 20ch;
  font-size: clamp(2.125rem, 2.6vw + 1rem, 3.375rem);
  line-height: 1.08;
  color: var(--ah-on-dark);
  text-wrap: balance;
}

#annajm-homepage .annajm-hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ah-gold-soft);
}

#annajm-homepage .annajm-hero__lead {
  max-width: 36em;
  margin-top: 20px;
  font-size: clamp(1rem, 0.4vw + 0.92rem, 1.1875rem);
  color: var(--ah-on-dark-2);
  text-wrap: pretty;
}

#annajm-homepage .annajm-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Recherche WooCommerce native (?s=…&post_type=product) */
#annajm-homepage .annajm-search {
  max-width: 520px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 210, 219, 0.18);
}

#annajm-homepage .annajm-search__label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ah-on-dark-2);
}

#annajm-homepage .annajm-search__field {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--ah-paper);
  border-radius: var(--ah-radius-sm);
}

#annajm-homepage .annajm-search__input,
#annajm-homepage .annajm-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  font-family: var(--ah-font-body);
  font-size: 1rem;              /* 16 px : évite le zoom iOS */
  color: var(--ah-text);
}

#annajm-homepage .annajm-search input[type="search"]::placeholder {
  color: #6B6B6B;
}

#annajm-homepage .annajm-search input[type="search"]:focus-visible {
  outline: 2px solid var(--ah-ink-gold);
  outline-offset: 0;
}

#annajm-homepage .annajm-search__submit {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: var(--ah-navy);
  color: var(--ah-on-dark);
  font-family: var(--ah-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-search__submit:hover {
  background: var(--ah-navy-deep);
}

/* Vitrine : trois couvertures réelles (shortcode [annajm_vitrine]) */
#annajm-homepage .annajm-hero__visual {
  width: 100%;
  max-width: 540px;
  justify-self: end;
}

#annajm-homepage .annajm-vitrine {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

#annajm-homepage .annajm-vitrine__item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ah-paper);
  border-radius: var(--ah-radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transition: transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-vitrine__item:first-child {
  grid-row: 1 / span 2;
}

#annajm-homepage .annajm-vitrine__item:hover {
  transform: translateY(-3px);
}

#annajm-homepage .annajm-vitrine__media {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--ah-sand);
}

#annajm-homepage .annajm-vitrine__media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;           /* la couverture n'est jamais rognée */
  mix-blend-mode: multiply;      /* fond clair de la photo fondu dans le sable */
}

#annajm-homepage .annajm-vitrine__caption {
  padding: 12px 14px 14px;
  font-family: var(--ah-font-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ah-navy);
}

#annajm-homepage .annajm-vitrine__item:first-child .annajm-vitrine__caption {
  font-size: 1.1875rem;
}

#annajm-homepage .annajm-vitrine__caption a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Lien étendu à toute la carte */
#annajm-homepage .annajm-vitrine__caption a::after {
  content: "";
  position: absolute;
  inset: 0;
}


/* -------------------------------------------------------------------------
   5. BANDE DE RÉASSURANCE
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-trust {
  padding: 22px 0 18px;
  background: var(--ah-paper);
  border-bottom: 1px solid var(--ah-line);
}

#annajm-homepage .annajm-trust__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 28px;
}

#annajm-homepage .annajm-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-trust__icon {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-trust__item strong {
  display: block;
  font-weight: 600;
  color: var(--ah-text);
}

#annajm-homepage .annajm-trust__item a {
  color: var(--ah-navy);
  text-decoration: underline;
  text-decoration-color: var(--ah-gold);
  text-underline-offset: 3px;
}

#annajm-homepage .annajm-trust__item a:hover {
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-trust__note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--ah-text-2);
}


/* -------------------------------------------------------------------------
   6. SECTIONS ET EN-TÊTES
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-section {
  padding: var(--ah-space) 0;
}

#annajm-homepage .annajm-section--paper { background: var(--ah-paper); }
#annajm-homepage .annajm-section--sand  { background: var(--ah-sand); }

#annajm-homepage .annajm-section__head {
  max-width: 720px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

#annajm-homepage .annajm-section__head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  max-width: none;
}

#annajm-homepage .annajm-section__head--split > div {
  max-width: 640px;
}

#annajm-homepage .annajm-section__title {
  font-size: clamp(1.75rem, 1.6vw + 1.2rem, 2.625rem);
  text-wrap: balance;
}

#annajm-homepage .annajm-section__intro {
  margin-top: 12px;
  font-size: 1.0625rem;
  color: var(--ah-text-2);
  text-wrap: pretty;
}


/* -------------------------------------------------------------------------
   7. COLLECTIONS (shortcode [annajm_collections])
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}

#annajm-homepage .annajm-collection {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px 22px 20px;
  overflow: hidden;
  background: var(--ah-paper);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  transition:
    border-color var(--ah-dur) var(--ah-ease),
    box-shadow var(--ah-dur) var(--ah-ease),
    transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-collection:hover,
#annajm-homepage .annajm-collection:focus-within {
  border-color: var(--ah-gold);
  box-shadow: var(--ah-shadow-hover);
  transform: translateY(-2px);
}

/* Filet doré qui se déploie au survol */
#annajm-homepage .annajm-collection::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--ah-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ah-ease);
}

#annajm-homepage .annajm-collection:hover::before,
#annajm-homepage .annajm-collection:focus-within::before {
  transform: scaleX(1);
}

#annajm-homepage .annajm-collection__index {
  font-family: var(--ah-font-heading);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ah-gold);
}

#annajm-homepage .annajm-collection__media {
  margin: -22px -22px 16px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ah-sand);
}

#annajm-homepage .annajm-collection__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#annajm-homepage .annajm-collection__name {
  margin-top: auto;
  padding-top: 20px;
  font-size: 1.5rem;
  line-height: 1.15;
}

#annajm-homepage .annajm-collection__media + .annajm-collection__name {
  padding-top: 0;
}

#annajm-homepage .annajm-collection__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

#annajm-homepage .annajm-collection__sub {
  margin-top: 2px;
  font-family: var(--ah-font-heading);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-collection__desc {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-collection__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ah-line);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-collection__meta::after {
  content: "\2192";
  font-size: 1rem;
  color: var(--ah-navy);
  transition: transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-collection:hover .annajm-collection__meta::after {
  transform: translateX(4px);
}


/* -------------------------------------------------------------------------
   8. GRILLES PRODUITS
   Habille le balisage natif des shortcodes [products class="annajm-grid"]
   (gabarit de boucle Kadence / WooCommerce, non modifié).
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-grid {
  width: 100%;
}

#annajm-homepage .annajm-grid ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 24px);
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Clearfix WooCommerce inutile en grille (sinon cellules fantômes) */
#annajm-homepage .annajm-grid ul.products::before,
#annajm-homepage .annajm-grid ul.products::after {
  content: none;
  display: none;
}

#annajm-homepage .annajm-grid ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: column;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: var(--ah-paper);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  box-shadow: none;
  transition:
    border-color var(--ah-dur) var(--ah-ease),
    box-shadow var(--ah-dur) var(--ah-ease),
    transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-grid ul.products li.product:hover,
#annajm-homepage .annajm-grid ul.products li.product:focus-within {
  border-color: var(--ah-line-strong);
  box-shadow: var(--ah-shadow-hover);
  transform: translateY(-3px);
}

/* Lien principal : WooCommerce standard (enveloppe image + titre + prix)
   ou Kadence (enveloppe l'image seule) */
#annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link,
#annajm-homepage .annajm-grid li.product > a.woocommerce-loop-image-link {
  display: block;
  position: relative;
  color: inherit;
}

#annajm-homepage .annajm-grid li.product > a.woocommerce-loop-image-link,
#annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link > img:first-of-type {
  background: var(--ah-sand);
}

#annajm-homepage .annajm-grid li.product img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Zone texte (Kadence : .product-details) */
#annajm-homepage .annajm-grid li.product .product-details,
#annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 6px;
  padding: 14px 16px 16px;
  background: transparent;
}

#annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link {
  padding: 0;
}

#annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link > :not(img) {
  margin-inline: 16px;
}

#annajm-homepage .annajm-card__kicker {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-grid .woocommerce-loop-product__title {
  margin: 0;
  padding: 0;
  font-family: var(--ah-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ah-navy);
  overflow-wrap: anywhere;
}

#annajm-homepage .annajm-grid .woocommerce-loop-product__title a {
  color: inherit;
}

#annajm-homepage .annajm-grid .woocommerce-loop-product__title a:hover {
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-card__author {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ah-text-2);
}

/* Prix : poussé en bas pour aligner les cartes d'une même ligne */
#annajm-homepage .annajm-grid li.product .price {
  display: block;
  margin: auto 0 0;
  padding-top: 8px;
  font-family: var(--ah-font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ah-navy);
}

#annajm-homepage .annajm-grid li.product .price del {
  margin-right: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ah-text-2);
  opacity: 1;
}

#annajm-homepage .annajm-grid li.product .price ins {
  text-decoration: none;
  background: none;
  color: var(--ah-navy);
}

/* Disponibilité (affichée seulement si stock faible ou épuisé) */
#annajm-homepage .annajm-grid li.product .stock {
  margin: 2px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-grid li.product .stock.out-of-stock {
  color: var(--ah-danger);
}

/* Badge promotion natif */
#annajm-homepage .annajm-grid li.product .onsale {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 100px;
  background: var(--ah-navy);
  color: var(--ah-on-dark);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Bouton natif (ajout au panier / choix des options / lire la suite) */
#annajm-homepage .annajm-grid li.product .product-action-wrap {
  margin: 10px 0 0;
  padding: 0;
}

#annajm-homepage .annajm-grid li.product .button,
#annajm-homepage .annajm-grid li.product a.add_to_cart_button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--ah-radius-sm);
  background: var(--ah-navy);
  color: var(--ah-on-dark);
  font-family: var(--ah-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  box-shadow: none;
  transition: background-color var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-grid li.product .product-action-wrap .button {
  margin-top: 0;
}

/* Bouton dans la carte WooCommerce standard (hors lien principal) */
#annajm-homepage .annajm-grid li.product > .button {
  width: auto;
  margin: auto 16px 16px;
}

#annajm-homepage .annajm-grid li.product .button:hover {
  background: var(--ah-navy-deep);
  color: var(--ah-on-dark);
}

/* Produit indisponible : bouton secondaire */
#annajm-homepage .annajm-grid li.product.outofstock .button {
  background: transparent;
  border: 1px solid var(--ah-line-strong);
  color: var(--ah-navy);
}

#annajm-homepage .annajm-grid li.product.outofstock .button:hover {
  border-color: var(--ah-navy);
  background: var(--ah-sand);
}

#annajm-homepage .annajm-grid li.product .button .kadence-svg-iconset,
#annajm-homepage .annajm-grid li.product .button svg {
  width: 1em;
  height: 1em;
}

#annajm-homepage .annajm-grid li.product .added_to_cart {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ah-navy);
  text-decoration: underline;
  text-decoration-color: var(--ah-gold);
  text-underline-offset: 3px;
}

/* Note de pied de grille */
#annajm-homepage .annajm-grid-note {
  margin-top: 18px;
  font-size: 0.8125rem;
  color: var(--ah-text-2);
}


/* -------------------------------------------------------------------------
   9. MÉTHODE ÉDITORIALE
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-method {
  --ah-focus: var(--ah-gold-soft);
  background: var(--ah-navy);
  color: var(--ah-on-dark);
}

#annajm-homepage .annajm-method .annajm-eyebrow {
  color: var(--ah-gold-soft);
}

#annajm-homepage .annajm-method .annajm-section__title {
  color: var(--ah-on-dark);
}

#annajm-homepage .annajm-method .annajm-section__intro {
  color: var(--ah-on-dark-2);
}

#annajm-homepage .annajm-method__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}

#annajm-homepage .annajm-method__figure {
  margin-top: 32px;
  overflow: hidden;
  background: var(--ah-cream);
  border-radius: var(--ah-radius);
}

#annajm-homepage .annajm-method__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

#annajm-homepage .annajm-method__figure figcaption {
  padding: 10px 16px;
  font-size: 0.8125rem;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-steps {
  display: grid;
  gap: 28px;
  counter-reset: annajm-step;
}

#annajm-homepage .annajm-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  counter-increment: annajm-step;
}

#annajm-homepage .annajm-step::before {
  content: counter(annajm-step);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(230, 191, 138, 0.6);
  border-radius: 50%;
  font-family: var(--ah-font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--ah-gold-soft);
}

#annajm-homepage .annajm-step__title {
  font-size: 1.375rem;
  color: var(--ah-on-dark);
}

#annajm-homepage .annajm-step__text {
  margin-top: 6px;
  color: var(--ah-on-dark-2);
}

#annajm-homepage .annajm-step__text a {
  color: var(--ah-gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#annajm-homepage .annajm-step__text a:hover {
  color: var(--ah-on-dark);
}


/* -------------------------------------------------------------------------
   10. À PROPOS + AVIS LECTEURS
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

#annajm-homepage .annajm-about__statement {
  margin-top: 18px;
  font-family: var(--ah-font-heading);
  font-size: clamp(1.25rem, 0.6vw + 1.05rem, 1.5rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ah-navy);
}

#annajm-homepage .annajm-about__text {
  margin-top: 16px;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-about__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 20px;
}

#annajm-homepage .annajm-reviews__title {
  margin-bottom: 18px;
  font-size: 1.375rem;
}

#annajm-homepage .annajm-reviews {
  display: grid;
  gap: 14px;
}

#annajm-homepage .annajm-review {
  position: relative;
  padding: 22px 24px 20px 24px;
  background: var(--ah-paper);
  border: 1px solid var(--ah-line);
  border-left: 3px solid var(--ah-gold);
  border-radius: var(--ah-radius-sm);
}

#annajm-homepage .annajm-review blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0.9375rem;
  font-style: normal;
  line-height: 1.6;
  color: var(--ah-text);
  quotes: "\00AB\00A0" "\00A0\00BB";
}

#annajm-homepage .annajm-review blockquote p::before { content: open-quote; }
#annajm-homepage .annajm-review blockquote p::after  { content: close-quote; }

#annajm-homepage .annajm-review figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-review figcaption strong {
  font-weight: 600;
  color: var(--ah-text);
}


/* -------------------------------------------------------------------------
   11. ARTICLES (shortcode [annajm_articles])
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

#annajm-homepage .annajm-post {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ah-paper);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  transition:
    box-shadow var(--ah-dur) var(--ah-ease),
    transform var(--ah-dur) var(--ah-ease);
}

#annajm-homepage .annajm-post:hover,
#annajm-homepage .annajm-post:focus-within {
  box-shadow: var(--ah-shadow-hover);
  transform: translateY(-2px);
}

#annajm-homepage .annajm-post__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ah-sand);
}

#annajm-homepage .annajm-post__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#annajm-homepage .annajm-post__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 20px 22px 22px;
}

#annajm-homepage .annajm-post__title {
  font-size: 1.3125rem;
  line-height: 1.25;
}

#annajm-homepage .annajm-post__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

#annajm-homepage .annajm-post__title a:hover {
  color: var(--ah-ink-gold);
}

#annajm-homepage .annajm-post__excerpt {
  font-size: 0.9375rem;
  color: var(--ah-text-2);
}

#annajm-homepage .annajm-post__more {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ah-navy);
}

#annajm-homepage .annajm-post__more::after {
  content: " \2192";
}


/* -------------------------------------------------------------------------
   12. APPEL À L'ACTION FINAL
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-final {
  --ah-focus: var(--ah-gold-soft);
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0;
  background: var(--ah-navy-deep);
  color: var(--ah-on-dark);
  text-align: center;
}

#annajm-homepage .annajm-final::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(240px, 40%);
  height: 2px;
  background: var(--ah-gold);
  transform: translateX(-50%);
}

#annajm-homepage .annajm-final__title {
  max-width: 28ch;
  margin-inline: auto;
  font-size: clamp(1.75rem, 1.8vw + 1.2rem, 2.75rem);
  color: var(--ah-on-dark);
  text-wrap: balance;
}

#annajm-homepage .annajm-final__text {
  max-width: 34em;
  margin: 14px auto 0;
  color: var(--ah-on-dark-2);
}

#annajm-homepage .annajm-final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}


/* -------------------------------------------------------------------------
   13. SECTIONS VIDES
   Une section dynamique sans contenu (aucun produit mis en avant, aucune
   vente enregistrée, aucun article) disparaît d'elle-même : pas de titre
   orphelin, pas de bloc vide.
   ------------------------------------------------------------------------- */
#annajm-homepage .annajm-section[data-annajm-requires="products"]:not(:has(li.product)),
#annajm-homepage .annajm-section[data-annajm-requires="posts"]:not(:has(.annajm-post)),
#annajm-homepage .annajm-section[data-annajm-requires="collections"]:not(:has(.annajm-collection)) {
  display: none;
}

#annajm-homepage .annajm-hero__visual:not(:has(.annajm-vitrine__item)) {
  display: none;
}

#annajm-homepage .annajm-hero__grid:not(:has(.annajm-vitrine__item)) {
  grid-template-columns: minmax(0, 1fr);
}

#annajm-homepage .annajm-trust__item:has(.annajm-trust__value:empty) {
  display: none;
}


/* -------------------------------------------------------------------------
   14. RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  #annajm-homepage .annajm-trust__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  #annajm-homepage .annajm-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #annajm-homepage .annajm-posts > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 899px) {
  /* Grilles de 4 produits : 2 × 2 plutôt que 3 + 1 orphelin */
  #annajm-homepage .annajm-grid ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #annajm-homepage .annajm-hero__grid,
  #annajm-homepage .annajm-method__grid,
  #annajm-homepage .annajm-about__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #annajm-homepage .annajm-hero__title {
    max-width: 20ch;
  }

  #annajm-homepage .annajm-hero__visual {
    max-width: none;
    justify-self: stretch;
  }

  /* Vitrine : trois couvertures côte à côte */
  #annajm-homepage .annajm-vitrine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  #annajm-homepage .annajm-vitrine__item:first-child {
    grid-row: auto;
  }

  #annajm-homepage .annajm-vitrine__item:first-child .annajm-vitrine__caption,
  #annajm-homepage .annajm-vitrine__caption {
    font-size: 0.875rem;
  }

  #annajm-homepage .annajm-method__figure {
    margin-top: 24px;
  }
}

@media (max-width: 719px) {
  #annajm-homepage .annajm-grid ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #annajm-homepage .annajm-grid li.product .product-details {
    padding: 12px 12px 14px;
  }

  #annajm-homepage .annajm-grid li.product > a.woocommerce-LoopProduct-link > :not(img) {
    margin-inline: 12px;
  }

  #annajm-homepage .annajm-grid li.product > .button {
    margin: auto 12px 12px;
  }

  #annajm-homepage .annajm-grid .woocommerce-loop-product__title {
    font-size: 1rem;
  }

  #annajm-homepage .annajm-grid li.product .price {
    font-size: 1rem;
  }

  #annajm-homepage .annajm-grid li.product .button {
    font-size: 0.8125rem;
    padding: 10px 8px;
  }

  #annajm-homepage .annajm-collections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #annajm-homepage .annajm-collection {
    min-height: 170px;
    padding: 18px 16px 16px;
  }

  #annajm-homepage .annajm-collection__media {
    margin: -18px -16px 14px;
  }

  #annajm-homepage .annajm-collection__index {
    font-size: 2rem;
  }

  #annajm-homepage .annajm-collection__name {
    font-size: 1.25rem;
  }

  #annajm-homepage .annajm-posts {
    grid-template-columns: minmax(0, 1fr);
  }

  #annajm-homepage .annajm-posts > :nth-child(3) {
    display: flex;
  }

  #annajm-homepage .annajm-step {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
  }

  #annajm-homepage .annajm-step::before {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
  }
}

@media (max-width: 560px) {
  #annajm-homepage .annajm-trust__list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  #annajm-homepage .annajm-hero__actions .annajm-btn {
    flex: 1 1 100%;
  }

  #annajm-homepage .annajm-vitrine {
    gap: 10px;
  }

  #annajm-homepage .annajm-vitrine__caption {
    padding: 8px 10px 10px;
  }

  #annajm-homepage .annajm-final__actions .annajm-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 374px) {
  #annajm-homepage .annajm-search__submit {
    padding: 0 12px;
  }

  #annajm-homepage .annajm-collections {
    grid-template-columns: minmax(0, 1fr);
  }

  #annajm-homepage .annajm-collection {
    min-height: 0;
  }
}

@media (min-width: 1600px) {
  #annajm-homepage {
    --ah-wrap: 1320px;
  }
}


/* -------------------------------------------------------------------------
   15. ACCESSIBILITÉ ET IMPRESSION
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #annajm-homepage *,
  #annajm-homepage *::before,
  #annajm-homepage *::after {
    transition: none !important;
    animation: none !important;
  }

  #annajm-homepage .annajm-btn:hover,
  #annajm-homepage .annajm-vitrine__item:hover,
  #annajm-homepage .annajm-collection:hover,
  #annajm-homepage .annajm-collection:focus-within,
  #annajm-homepage .annajm-grid ul.products li.product:hover,
  #annajm-homepage .annajm-grid ul.products li.product:focus-within,
  #annajm-homepage .annajm-post:hover,
  #annajm-homepage .annajm-post:focus-within {
    transform: none;
  }
}

@media (forced-colors: active) {
  #annajm-homepage .annajm-btn,
  #annajm-homepage .annajm-grid li.product .button {
    border: 1px solid ButtonText;
  }
}

@media print {
  #annajm-homepage .annajm-hero,
  #annajm-homepage .annajm-method,
  #annajm-homepage .annajm-final {
    background: none;
    color: #000;
  }

  #annajm-homepage .annajm-search,
  #annajm-homepage .annajm-hero__star,
  #annajm-homepage .annajm-hero__actions,
  #annajm-homepage .annajm-final__actions,
  #annajm-homepage .annajm-grid li.product .button {
    display: none;
  }
}
