/*
Theme Name: Astra Enfant Petit Musulman
Template: astra
Description: Thème enfant d'Astra pour Petit Musulman : design doux et épuré pour les enfants et leurs parents.
Version: 1.0.0
Text Domain: astra-child-petit-musulman
*/

/* ==========================================================================
   1. Variables (palette Astra : turquoise / bleu nuit) + accents enfants
   ========================================================================== */
:root {
  --pm-turq: #5ce1e6;
  --pm-teal: #25c3c9;
  --pm-navy: #1e293b;
  --pm-slate: #334155;
  --pm-sky: #f0f5fa;
  --pm-mint: #e3f9fa;
  --pm-sun: #ffd166;
  --pm-sun-dark: #f4b942;
  --pm-rose: #ffe3ea;
  --pm-white: #ffffff;
  --pm-radius: 22px;
  --pm-radius-sm: 14px;
  --pm-shadow: 0 10px 30px rgba(30, 41, 59, .08);
  --pm-shadow-hover: 0 16px 36px rgba(30, 41, 59, .14);
  --pm-font-title: "Amiri", "Baloo 2", "Nunito", system-ui, sans-serif;
  --pm-font-body: "Amiri", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ==========================================================================
   2. Base : typographie et couleurs
   ========================================================================== */
body,
button,
input,
select,
textarea {
  font-family: var(--pm-font-body);
  color: var(--pm-slate);
}
body { font-size: 18px; line-height: 1.7; background: var(--pm-white); }
h1, h2, h3, h4, h5, h6,
.entry-title, .ast-archive-title, .site-title {
  font-family: var(--pm-font-title);
  color: var(--pm-navy);
  line-height: 1.18;
  letter-spacing: -.01em;
}
h1 { font-weight: 800; }
h2, h3, h4 { font-weight: 700; }
a { color: #0f8f95; text-underline-offset: 3px; }
a:hover { color: var(--pm-navy); }
:focus-visible { outline: 3px solid var(--pm-sun-dark); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--pm-turq); color: var(--pm-navy); }

/* ==========================================================================
   3. Boutons (blocs, WooCommerce, formulaires)
   ========================================================================== */
.wp-block-button__link,
.ast-button, .button,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit,
button[type="submit"], input[type="submit"] {
  font-family: var(--pm-font-title);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: .8em 1.7em;
  background: var(--pm-sun);
  color: var(--pm-navy);
  border: 2px solid var(--pm-sun);
  box-shadow: 0 5px 0 var(--pm-sun-dark);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.wp-block-button__link:hover,
.ast-button:hover, .button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
button[type="submit"]:hover, input[type="submit"]:hover {
  background: #ffdd8c;
  color: var(--pm-navy);
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--pm-sun-dark);
}
.wp-block-button.is-style-outline .wp-block-button__link,
.pm-btn-ghost .wp-block-button__link {
  background: transparent;
  color: var(--pm-navy);
  border: 2px solid var(--pm-navy);
  box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.pm-btn-ghost .wp-block-button__link:hover { background: var(--pm-navy); color: #fff; transform: none; box-shadow: none; }
.pm-btn-teal .wp-block-button__link { background: var(--pm-teal); border-color: var(--pm-teal); box-shadow: 0 5px 0 #1a9ea4; }
.pm-btn-teal .wp-block-button__link:hover { background: var(--pm-turq); box-shadow: 0 3px 0 #1a9ea4; }
.woocommerce a.add_to_cart_button, .woocommerce a.button.product_type_simple,
.woocommerce button.single_add_to_cart_button {
  background: var(--pm-teal); border-color: var(--pm-teal); color: var(--pm-navy); box-shadow: 0 5px 0 #1a9ea4;
}
.woocommerce a.add_to_cart_button:hover, .woocommerce button.single_add_to_cart_button:hover {
  background: var(--pm-turq); box-shadow: 0 3px 0 #1a9ea4; color: var(--pm-navy);
}

/* ==========================================================================
   4. En-tête et menu
   ========================================================================== */
.main-header-bar, .ast-primary-header-bar {
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 2px 18px rgba(30, 41, 59, .07);
  border-bottom: 0;
}
.ast-primary-header-bar { backdrop-filter: blur(8px); }
.main-header-menu > .menu-item > .menu-link {
  font-family: var(--pm-font-title);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--pm-navy);
  border-radius: 999px;
  padding: .45em 1em;
  transition: background .15s ease;
}
.main-header-menu > .menu-item:hover > .menu-link,
.main-header-menu > .current-menu-item > .menu-link { background: var(--pm-mint); color: var(--pm-navy); }
.main-header-menu .sub-menu {
  border-radius: var(--pm-radius-sm);
  box-shadow: var(--pm-shadow-hover);
  border: 0;
  padding: .5em;
}
.main-header-menu .sub-menu .menu-link { border-radius: 10px; font-weight: 600; }
.main-header-menu .sub-menu .menu-item:hover > .menu-link { background: var(--pm-mint); }
.ast-header-woo-cart .count { background: var(--pm-sun); color: var(--pm-navy); font-weight: 800; }

/* ==========================================================================
   5. Mise en page générale des pages en blocs
   ========================================================================== */
.pm-page .entry-content > * { margin-block-start: 0; }
.pm-section { padding: clamp(3rem, 7vw, 5.5rem) 1.25rem; }
.pm-wrap { max-width: 1180px; margin-inline: auto; }
.pm-center { text-align: center; }
.pm-kicker {
  display: inline-block;
  font-family: var(--pm-font-title);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0f8f95;
  background: var(--pm-mint);
  padding: .3em 1em;
  border-radius: 999px;
  margin-bottom: .8rem;
}
.pm-section-title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 .5rem; }
.pm-section-lead { max-width: 640px; margin: 0 auto 2.2rem; font-size: 1.12rem; }

/* ---------- Hero ---------- */
.pm-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(92, 225, 230, .35) 0, transparent 38%),
    radial-gradient(circle at 92% 80%, rgba(255, 209, 102, .35) 0, transparent 34%),
    linear-gradient(180deg, #f6fcfd 0%, #eaf8f9 100%);
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem clamp(3rem, 7vw, 6rem);
}
.pm-hero::before, .pm-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
}
.pm-hero::before {
  width: 70px; height: 70px; top: 9%; right: 8%; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23ffd166' d='M40 6a26 26 0 1 0 18 44A22 22 0 0 1 40 6z'/%3E%3C/svg%3E");
  animation: pm-float 6s ease-in-out infinite;
}
.pm-hero::after {
  width: 34px; height: 34px; bottom: 14%; left: 6%; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%2325c3c9' d='M32 2l8 20 22 2-17 14 6 22-19-12-19 12 6-22L2 24l22-2z'/%3E%3C/svg%3E");
  animation: pm-float 7s ease-in-out infinite reverse;
}
@keyframes pm-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(6deg); } }
.pm-hero .wp-block-columns { align-items: center; gap: 2.5rem; max-width: 1180px; margin-inline: auto; }
.pm-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); margin: 0 0 1rem; }
.pm-hero h1 em { font-style: normal; color: #0f8f95; position: relative; white-space: nowrap; }
.pm-hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .05em; height: .28em; z-index: -1;
  background: var(--pm-sun); border-radius: 999px; opacity: .85;
}
.pm-hero p.pm-hero-text { font-size: 1.2rem; max-width: 520px; }
.pm-hero .wp-block-image img {
  border-radius: 38% 62% 55% 45% / 48% 42% 58% 52%;
  box-shadow: var(--pm-shadow-hover);
  border: 8px solid #fff;
  width: 100%; height: auto; object-fit: cover; aspect-ratio: 1 / 1;
}
.pm-hero .wp-block-buttons { gap: .9rem; margin-top: 1.4rem; }

/* ---------- Bandeau de réassurance ---------- */
.pm-trust { background: var(--pm-navy); color: #fff; padding: 1.4rem 1.25rem; }
.pm-trust ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem 1.5rem; }
.pm-trust li { display: flex; align-items: center; gap: .7rem; font-family: var(--pm-font-title); font-weight: 600; font-size: 1.05rem; margin: 0; }
.pm-trust .pm-ico { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: rgba(92, 225, 230, .16); color: var(--pm-turq); }
.pm-trust .pm-ico .pm-svg { width: 22px; height: 22px; }

/* ---------- Cartes catégories ---------- */
.pm-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pm-card {
  background: #fff;
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.pm-card:hover { transform: translateY(-6px); box-shadow: var(--pm-shadow-hover); color: inherit; }
.pm-card-img { aspect-ratio: 4 / 3; background: var(--pm-mint); overflow: hidden; }
.pm-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pm-card:hover .pm-card-img img { transform: scale(1.06); }
.pm-card-body { padding: 1.1rem 1.3rem 1.4rem; }
.pm-card-body h3 { font-size: 1.28rem; margin: 0 0 .3rem; }
.pm-card-body p { margin: 0; font-size: .98rem; }
.pm-card-more { display: inline-block; margin-top: .7rem; font-family: var(--pm-font-title); font-weight: 700; color: #0f8f95; }
.pm-bg-sky { background: var(--pm-sky); }
.pm-bg-mint { background: var(--pm-mint); }

/* ---------- Outils gratuits (accueil) ---------- */
.pm-tools-band {
  background: linear-gradient(135deg, var(--pm-navy) 0%, #2a3a55 100%);
  color: #fff; border-radius: 34px; padding: clamp(2rem, 5vw, 3.5rem);
  position: relative; overflow: hidden;
}
.pm-tools-band h2, .pm-tools-band h3 { color: #fff; }
.pm-tools-band .pm-kicker { background: rgba(92, 225, 230, .18); color: var(--pm-turq); }
.pm-tool-tile {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--pm-radius-sm); padding: 1.2rem 1.3rem; color: #fff; text-decoration: none;
  display: block; transition: background .2s ease, transform .2s ease;
}
.pm-tool-tile:hover { background: rgba(255, 255, 255, .16); transform: translateY(-4px); color: #fff; }
.pm-tool-tile .pm-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: rgba(92, 225, 230, .16); color: var(--pm-turq); margin-bottom: .7rem; }
.pm-tool-tile .pm-ico .pm-svg { width: 26px; height: 26px; }
.pm-tool-tile strong { font-family: var(--pm-font-title); font-size: 1.15rem; display: block; }
.pm-tool-tile small { opacity: .85; font-size: .95rem; }

/* ---------- Valeurs / parents ---------- */
.pm-values { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pm-value { background: #fff; border-radius: var(--pm-radius); padding: 1.6rem; box-shadow: var(--pm-shadow); }
.pm-value .pm-ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--pm-mint); color: #0f8f95; margin-bottom: .8rem; }
.pm-value .pm-ico .pm-svg { width: 28px; height: 28px; }
.pm-value:nth-child(2) .pm-ico { color: #b7791f; }
.pm-value:nth-child(3) .pm-ico { color: #d6466f; }
.pm-value:nth-child(2) .pm-ico { background: #fff3d1; }
.pm-value:nth-child(3) .pm-ico { background: var(--pm-rose); }
.pm-value h3 { font-size: 1.25rem; margin: 0 0 .3rem; }
.pm-value p { margin: 0; font-size: 1rem; }

/* ---------- Appel final ---------- */
.pm-cta {
  background: linear-gradient(135deg, var(--pm-teal) 0%, var(--pm-turq) 100%);
  border-radius: 34px; padding: clamp(2rem, 5vw, 3.5rem); text-align: center; color: var(--pm-navy);
}
.pm-cta h2 { color: var(--pm-navy); margin-top: 0; }
.pm-cta .wp-block-buttons { justify-content: center; }

/* ---------- Derniers articles (bloc Gutenberg) ---------- */
.wp-block-latest-posts.is-grid { gap: 1.4rem; }
.wp-block-latest-posts.is-grid li {
  background: #fff; border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); overflow: hidden;
  margin: 0; padding-bottom: 1rem; transition: transform .2s ease, box-shadow .2s ease;
}
.wp-block-latest-posts.is-grid li:hover { transform: translateY(-5px); box-shadow: var(--pm-shadow-hover); }
.wp-block-latest-posts__featured-image { margin: 0 0 .8rem; }
.wp-block-latest-posts__featured-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.wp-block-latest-posts a.wp-block-latest-posts__post-title { font-family: var(--pm-font-title); font-weight: 700; font-size: 1.2rem; color: var(--pm-navy); text-decoration: none; display: block; padding: 0 1.2rem; }
.wp-block-latest-posts__post-excerpt { padding: .4rem 1.2rem 0; font-size: .98rem; }

/* ==========================================================================
   6. Boutique WooCommerce
   ========================================================================== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: #fff; border-radius: var(--pm-radius); box-shadow: var(--pm-shadow);
  padding: 0 0 1.2rem; overflow: hidden; text-align: center; transition: transform .2s ease, box-shadow .2s ease;
}
.woocommerce ul.products li.product:hover { transform: translateY(-6px); box-shadow: var(--pm-shadow-hover); }
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
.woocommerce ul.products li.product a img { border-radius: 0; margin-bottom: .8rem; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--pm-font-title); font-weight: 700; font-size: 1.12rem; color: var(--pm-navy); padding: 0 1rem;
}
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price {
  color: #0f8f95; font-family: var(--pm-font-title); font-weight: 800; font-size: 1.25rem;
}
.woocommerce ul.products li.product .price del { color: #94a3b8; font-weight: 600; }
.woocommerce span.onsale {
  background: var(--pm-sun); color: var(--pm-navy); font-family: var(--pm-font-title); font-weight: 800;
  border-radius: 999px; min-height: 0; min-width: 0; line-height: 1; padding: .55em 1em;
}
.woocommerce div.product .product_title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--pm-radius); }
.woocommerce-tabs ul.tabs li { border-radius: 999px 999px 0 0 !important; }
.woocommerce-breadcrumb, .ast-breadcrumbs-wrapper { font-size: .92rem; }
.pm-product-points { list-style: none; padding: 0; margin: 1rem 0; }
.pm-product-points li { padding-left: 1.7em; position: relative; margin-bottom: .35rem; }
.pm-product-points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 1em; height: 1em; background: #0f8f95; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.pm-note { background: var(--pm-sky); border-left: 5px solid var(--pm-teal); border-radius: 0 var(--pm-radius-sm) var(--pm-radius-sm) 0; padding: 1rem 1.2rem; }

/* ==========================================================================
   7. Blog
   ========================================================================== */
.ast-article-post, .blog .ast-article-inner, .archive .ast-article-inner {
  border-radius: var(--pm-radius);
}
.ast-separate-container .ast-article-post, .ast-separate-container .ast-article-single {
  border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); border: 0;
}
.entry-title a { color: var(--pm-navy); text-decoration: none; }
.entry-title a:hover { color: #0f8f95; }
.single-post .entry-content h2 { margin-top: 2.2rem; }
.single-post .entry-content h3 { margin-top: 1.6rem; }
.entry-content blockquote, .wp-block-quote {
  border-left: 5px solid var(--pm-teal); background: var(--pm-mint); border-radius: 0 var(--pm-radius-sm) var(--pm-radius-sm) 0; padding: 1rem 1.4rem;
}
.wp-block-details { background: var(--pm-sky); border-radius: var(--pm-radius-sm); padding: .9rem 1.2rem; margin-bottom: .7rem; }
.wp-block-details summary { cursor: pointer; font-family: var(--pm-font-title); font-weight: 700; color: var(--pm-navy); }
.wp-block-table table { border-radius: var(--pm-radius-sm); overflow: hidden; }
.wp-block-table thead { background: var(--pm-navy); color: #fff; }
.wp-block-table td, .wp-block-table th { border-color: #dbe5ee; padding: .6em .9em; }
.pm-encart {
  background: linear-gradient(135deg, var(--pm-mint), #fff); border: 2px dashed var(--pm-teal);
  border-radius: var(--pm-radius); padding: 1.3rem 1.5rem; margin: 2rem 0;
}
.pm-encart p { margin: 0; }

/* ==========================================================================
   8. Pied de page
   ========================================================================== */
.pm-footer { background: var(--pm-navy); color: #cbd5e1; padding: 3.5rem 1.25rem 2rem; }
.pm-footer a { color: #e2e8f0; text-decoration: none; }
.pm-footer a:hover { color: var(--pm-turq); text-decoration: underline; }
.pm-footer-grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.pm-footer h4 { color: #fff; font-size: 1.1rem; margin: 0 0 .8rem; }
.pm-footer ul { list-style: none; margin: 0; padding: 0; }
.pm-footer li { margin-bottom: .45rem; font-size: .98rem; }
.pm-footer-brand strong { font-family: var(--pm-font-title); font-size: 1.5rem; color: #fff; display: block; margin-bottom: .4rem; }
.pm-footer-brand p { margin: 0; font-size: .98rem; max-width: 330px; }
.pm-footer-bottom { max-width: 1180px; margin: 2.4rem auto 0; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; }
.site-footer { display: none; }
@media (max-width: 860px) { .pm-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .pm-footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   9. Outils d'apprentissage
   ========================================================================== */
.pm-tool { background: #fff; border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: 2rem; }
.pm-tool > h2 { margin-top: 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.pm-tool-intro { margin: 0 0 1.2rem; }
.pm-letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .6rem; margin-bottom: 1.2rem; direction: rtl; }
.pm-letter {
  font-family: "Amiri", "Noto Naskh Arabic", "Scheherazade New", "Traditional Arabic", serif;
  font-size: 2.2rem; line-height: 1.4; background: var(--pm-sky); color: var(--pm-navy);
  border: 2px solid transparent; border-radius: var(--pm-radius-sm); padding: .15em 0; cursor: pointer;
  box-shadow: none; transition: background .15s, transform .15s;
}
.pm-letter:hover, .pm-letter.is-active { background: var(--pm-mint); border-color: var(--pm-teal); color: var(--pm-navy); transform: translateY(-2px); box-shadow: none; }
.pm-letter-detail {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: center;
  background: linear-gradient(135deg, var(--pm-mint), #fff); border-radius: var(--pm-radius); padding: 1.2rem 1.6rem; min-height: 150px;
}
.pm-letter-big { font-family: "Noto Naskh Arabic", "Amiri", "Scheherazade New", serif; font-size: 6rem; line-height: 1.2; color: var(--pm-navy); min-width: 110px; text-align: center; }
.pm-letter-detail h3 { margin: 0 0 .2rem; font-size: 1.5rem; }
.pm-letter-detail p { margin: .15rem 0; }
.pm-arabic-word { font-family: "Noto Naskh Arabic", "Amiri", serif; font-size: 1.7rem; direction: rtl; display: inline-block; }
.pm-speak { margin-top: .6rem; }
.pm-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; max-width: 520px; margin: 1rem auto; }
.pm-mcard {
  aspect-ratio: 1; border: 0; border-radius: var(--pm-radius-sm); background: var(--pm-teal); color: transparent;
  font-size: 2.2rem; cursor: pointer; display: grid; place-items: center; box-shadow: 0 5px 0 #1a9ea4; padding: 0;
  font-family: "Noto Naskh Arabic", "Amiri", serif; transition: transform .2s;
}
.pm-mcard::before { content: "?"; color: #fff; font-family: var(--pm-font-title); font-size: 1.8rem; position: absolute; }
.pm-mcard { position: relative; }
.pm-mcard.is-open, .pm-mcard.is-done { background: #fff; color: var(--pm-navy); box-shadow: inset 0 0 0 3px var(--pm-teal); }
.pm-mcard.is-open::before, .pm-mcard.is-done::before { content: none; }
.pm-mcard.is-done { background: var(--pm-mint); }
.pm-quiz-q { font-family: var(--pm-font-title); font-size: 1.35rem; font-weight: 700; color: var(--pm-navy); margin: .6rem 0 1rem; }
.pm-quiz-opts { display: grid; gap: .6rem; }
.pm-quiz-opts button { text-align: left; background: var(--pm-sky); border: 2px solid transparent; box-shadow: none; color: var(--pm-navy); border-radius: var(--pm-radius-sm); }
.pm-quiz-opts button:hover { background: var(--pm-mint); transform: none; box-shadow: none; }
.pm-quiz-opts button.is-good { background: #d6f5dd; border-color: #34a853; }
.pm-quiz-opts button.is-bad { background: #fde1e1; border-color: #e45757; }
.pm-quiz-feedback { margin-top: 1rem; min-height: 1.6em; font-weight: 700; }
.pm-quiz-score { font-family: var(--pm-font-title); font-size: 1.1rem; color: #0f8f95; }
.pm-tasbih { text-align: center; }
.pm-tasbih-count { font-family: var(--pm-font-title); font-size: 4.5rem; font-weight: 800; color: var(--pm-navy); line-height: 1; }
.pm-tasbih-phrase { font-family: "Noto Naskh Arabic", "Amiri", serif; font-size: 2.2rem; direction: rtl; margin: .2rem 0; }
.pm-tasbih-trans { margin: 0 0 1rem; }
.pm-tasbih-btn { width: 150px; height: 150px; border-radius: 50%; font-size: 1.3rem; }
.pm-tasbih-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }
@media (max-width: 560px) {
  .pm-letter-detail { grid-template-columns: 1fr; text-align: center; }
  .pm-letter-big { font-size: 5rem; }
}

/* ==========================================================================
   9 bis. Compléments de mise en page des pages en blocs
   ========================================================================== */
.pm-wrap-section > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.pm-wrap-section > .woocommerce, .pm-wrap-section > .wp-block-shortcode { max-width: 1180px; }
.pm-center, .pm-center .pm-section-title, .pm-center .pm-section-lead { text-align: center; }
.pm-center .pm-section-lead { margin-left: auto; margin-right: auto; }
.pm-center-buttons { justify-content: center; margin-top: 2rem; }
.pm-tools-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 1.6rem 0; }
.pm-tools-band > p { max-width: 640px; }
.pm-tools-band .wp-block-buttons { margin-top: .5rem; }
.pm-trust ul { padding-inline: 0; }
.pm-section ul.products, .pm-section .woocommerce ul.products { margin-top: 2rem; }
.wp-block-latest-posts.wp-block-latest-posts__list { padding: 0; margin-top: 2rem; }
.wp-block-latest-posts__list li { list-style: none; }
.page-hero { text-align: center; }
.pm-page-hero { background: linear-gradient(180deg, #f6fcfd 0%, #eaf8f9 100%); padding: clamp(2rem, 5vw, 3.5rem) 1.25rem; text-align: center; }
.pm-page-hero h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.pm-page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }
.pm-prose { max-width: 820px; margin-left: auto; margin-right: auto; padding: 2rem 1.25rem 4rem; }
.pm-prose h2 { margin-top: 2rem; font-size: 1.6rem; }
.pm-prose h3 { margin-top: 1.4rem; }
.pm-todo { background: #fff3d1; border-left: 5px solid var(--pm-sun-dark); padding: .8rem 1.1rem; border-radius: 0 var(--pm-radius-sm) var(--pm-radius-sm) 0; font-weight: 600; }

.pm-svg { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.pm-h-ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--pm-mint); color: #0f8f95; margin-right: .6rem; vertical-align: middle; }
.pm-h-ico .pm-svg { width: 24px; height: 24px; }
.button .pm-svg, button .pm-svg { margin-right: .25em; }
.pm-mname { font-family: var(--pm-font-title); font-size: 1.05rem; font-weight: 700; }

/* ==========================================================================
   10. Responsive et accessibilité
   ========================================================================== */
@media (max-width: 781px) {
  body { font-size: 17px; }
  .pm-hero .wp-block-columns { gap: 1.5rem; }
  .pm-hero .wp-block-image { max-width: 380px; margin-inline: auto; }
  .pm-hero::before { width: 46px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Blog : encart boutique et barre latérale
   ========================================================================== */
.pm-reco { margin: 3rem 0 1rem; padding: 1.6rem; background: var(--pm-sky); border-radius: var(--pm-radius); }
.pm-reco .pm-reco-title { margin: 0 0 .3rem; font-size: 1.45rem; }
.pm-reco p { margin: 0 0 1rem; }
.pm-reco-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1.2rem; }
.pm-reco-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--pm-radius-sm); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--pm-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.pm-reco-card:hover { transform: translateY(-4px); box-shadow: var(--pm-shadow-hover); color: inherit; }
.pm-reco-img { display: block; aspect-ratio: 4 / 3; background: var(--pm-mint); overflow: hidden; }
.pm-reco-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-reco-name { font-family: var(--pm-font-title); font-weight: 700; font-size: 1.05rem; color: var(--pm-navy); padding: .7rem .9rem 0; line-height: 1.25; }
.pm-reco-more { padding: .15rem .9rem .8rem; font-weight: 700; color: #0f8f95; font-size: .95rem; }
.pm-reco-actions { margin-bottom: 0 !important; display: flex; flex-wrap: wrap; gap: .7rem; }
.pm-btn-ghost-link { background: transparent; color: var(--pm-navy); border-color: var(--pm-navy); box-shadow: none; }
.pm-btn-ghost-link:hover { background: var(--pm-navy); color: #fff; transform: none; box-shadow: none; }

.pm-side-box { background: #fff; border-radius: var(--pm-radius); box-shadow: var(--pm-shadow); padding: 1.2rem; margin-bottom: 1.4rem; }
.pm-side-title { margin: 0 0 .8rem; font-size: 1.25rem; }
.pm-side-cats { display: grid; gap: .7rem; }
.pm-side-cats .pm-reco-card { flex-direction: row; align-items: center; box-shadow: none; background: var(--pm-sky); }
.pm-side-cats .pm-reco-img { width: 74px; aspect-ratio: 1; flex: none; }
.pm-side-cats .pm-reco-name { padding: 0 .7rem; font-size: .98rem; }
.pm-side-cats .pm-reco-more { display: none; }
.pm-side-tools { background: linear-gradient(135deg, var(--pm-navy), #2a3a55); color: #fff; }
.pm-side-tools .pm-side-title { color: #fff; }
.pm-side-tools p { margin: 0 0 1rem; font-size: .98rem; }
.widget-area .widget, #secondary .widget { border-radius: var(--pm-radius); }

/* ==========================================================================
   En-tête collant (l'option d'Astra est réservée à la version Pro)
   ========================================================================== */
#masthead { position: sticky; top: 0; z-index: 999; }
.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar #masthead { top: 46px; } }

/* ==========================================================================
   Quiz des compagnons
   ========================================================================== */
.pm-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin-top: 1rem; }
.pm-comp-card { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; background: var(--pm-sky); color: var(--pm-navy); border: 2px solid transparent; box-shadow: none; border-radius: var(--pm-radius-sm); padding: .9rem 1rem; font-family: var(--pm-font-title); font-weight: 700; }
.pm-comp-card:hover { background: var(--pm-mint); border-color: var(--pm-teal); transform: translateY(-2px); box-shadow: none; }
.pm-comp-card .pm-comp-ar { font-family: "Noto Naskh Arabic", "Amiri", serif; font-size: 1.3rem; font-weight: 400; direction: rtl; color: #0f8f95; }
.pm-comp-card small { font-family: var(--pm-font-body); font-weight: 600; color: var(--pm-slate); font-size: .88rem; }
.pm-comp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; background: linear-gradient(135deg, var(--pm-mint), #fff); border-radius: var(--pm-radius); padding: .9rem 1.2rem; margin-bottom: 1rem; }
.pm-comp-head strong { font-family: var(--pm-font-title); font-size: 1.3rem; color: var(--pm-navy); }
.pm-comp-head .pm-comp-ar { font-family: "Noto Naskh Arabic", "Amiri", serif; font-size: 1.4rem; direction: rtl; color: #0f8f95; display: block; }
.pm-progress { height: 8px; background: var(--pm-sky); border-radius: 999px; overflow: hidden; margin-bottom: .8rem; }
.pm-progress span { display: block; height: 100%; background: var(--pm-teal); border-radius: 999px; transition: width .3s ease; }

/* ==========================================================================
   Accueil : barre de menu floutée au-dessus du hero, collée en haut, sans masquer le contenu
   ========================================================================== */
.ast-theme-transparent-header #masthead { position: fixed !important; top: 0; left: 0; right: 0; width: 100%; z-index: 999; }
.admin-bar.ast-theme-transparent-header #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar.ast-theme-transparent-header #masthead { top: 46px; } }
/* Le hero commence sous la barre : on ajoute sa hauteur au haut du hero */
.ast-theme-transparent-header .pm-hero { padding-top: calc(92px + clamp(2rem, 5vw, 3.5rem)); }

/* Le croissant décoratif du hero doit rester visible sous la barre de menu */
.ast-theme-transparent-header .pm-hero::before { top: 150px; right: 7%; }
@media (max-width: 781px) { .ast-theme-transparent-header .pm-hero::before { top: 120px; right: 5%; } }

/* Raccourcis vers les rubriques du blog */
.pm-chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0 0 1.8rem; }
.pm-chip { display: inline-block; padding: .5em 1.1em; border-radius: 999px; background: var(--pm-mint); color: var(--pm-navy); font-family: var(--pm-font-title); font-weight: 700; text-decoration: none; transition: background .15s, transform .15s; }
.pm-chip:hover { background: var(--pm-turq); color: var(--pm-navy); transform: translateY(-2px); }

/* ==========================================================================
   Blog et rubriques : 2 articles par ligne (1 seul sur mobile)
   ========================================================================== */
.blog .site-main > .ast-row,
.archive .site-main > .ast-row,
.search-results .site-main > .ast-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
  margin: 0;
}
.blog .site-main > .ast-row > article.ast-article-post,
.archive .site-main > .ast-row > article.ast-article-post,
.search-results .site-main > .ast-row > article.ast-article-post {
  width: auto !important;
  max-width: none;
  margin: 0 !important;
  padding: 0 !important;
  float: none;
  background: #fff;
  border-radius: var(--pm-radius);
  box-shadow: var(--pm-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog .site-main > .ast-row > article.ast-article-post:hover,
.archive .site-main > .ast-row > article.ast-article-post:hover { transform: translateY(-4px); box-shadow: var(--pm-shadow-hover); }
.blog .ast-article-post .ast-article-inner,
.archive .ast-article-post .ast-article-inner { box-shadow: none; background: transparent; padding: 0; margin: 0; }
.blog .ast-article-post .post-thumb-img-content img,
.archive .ast-article-post .post-thumb-img-content img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.blog .ast-article-post .post-content > *:not(.ast-blog-featured-section),
.archive .ast-article-post .post-content > *:not(.ast-blog-featured-section) { padding-left: 1.3rem; padding-right: 1.3rem; }
.blog .ast-article-post .entry-header,
.archive .ast-article-post .entry-header { padding-top: 1rem; }
.blog .ast-article-post .entry-title,
.archive .ast-article-post .entry-title { font-size: 1.3rem; line-height: 1.25; margin-bottom: .5rem; }
.blog .ast-article-post .ast-excerpt-container,
.archive .ast-article-post .ast-excerpt-container { padding-bottom: 1.2rem; font-size: .98rem; }
@media (max-width: 640px) {
  .blog .site-main > .ast-row,
  .archive .site-main > .ast-row,
  .search-results .site-main > .ast-row { grid-template-columns: 1fr; }
}

/* Accueil : derniers articles en grille de 3 colonnes, centrée */
.pm-wrap-section ul.wp-block-latest-posts.is-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  width: 100%;
  max-width: 1180px;
  margin: 2rem auto 0 !important;
  padding: 0;
  list-style: none;
}
.pm-wrap-section ul.wp-block-latest-posts.is-grid > li { width: auto !important; margin: 0 !important; }
@media (max-width: 980px) { .pm-wrap-section ul.wp-block-latest-posts.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pm-wrap-section ul.wp-block-latest-posts.is-grid { grid-template-columns: 1fr; } }

/* Accueil : catégories sur 4 colonnes (2 lignes de 4 avec 8 cartes) */
.pm-grid.pm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) { .pm-grid.pm-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pm-grid.pm-grid-4 { grid-template-columns: 1fr; } }

/* Accueil : les 5 jeux sur une seule ligne */
.pm-tools-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.pm-tools-grid .pm-tool-tile { padding: 1rem 1.1rem; }
.pm-tools-grid .pm-tool-tile strong { font-size: 1.05rem; line-height: 1.25; }
.pm-tools-grid .pm-tool-tile small { font-size: .88rem; line-height: 1.4; }
.pm-tool-tile, .pm-tool-tile:hover, .pm-tool-tile * { text-decoration: none; }
@media (max-width: 1100px) { .pm-tools-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }

/* Cartes produits : contenu centré avec marges intérieures (catégorie, titre, prix, bouton) */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .3rem 1.2rem 0;
}
.woocommerce ul.products li.product .astra-shop-summary-wrap > * { max-width: 100%; }
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price { text-align: center; padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
.woocommerce ul.products li.product .ast-woo-product-category { margin-top: .6rem; font-size: .9rem; }
.woocommerce ul.products li.product .button { margin: .6rem 0 0; align-self: center; }
/* Si le thème ne regroupe pas le contenu : mêmes marges sur chaque élément */
.woocommerce ul.products li.product > .ast-woo-product-category,
.woocommerce ul.products li.product > .price,
.woocommerce ul.products li.product > .woocommerce-loop-product__title,
.woocommerce ul.products li.product > .button { margin-left: auto; margin-right: auto; padding-left: 1.2rem; padding-right: 1.2rem; text-align: center; }

/* Plan du site */
.pm-plan { max-width: 900px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
.pm-plan section { margin-bottom: 2rem; }
.pm-plan h2 { font-size: 1.6rem; margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 3px solid var(--pm-turq); }
.pm-plan h3 { font-size: 1.15rem; margin: 1.1rem 0 .3rem; }
.pm-plan ul { margin: 0 0 .6rem 1.2rem; }
.pm-plan li { margin-bottom: .3rem; }
