/**
 * EGMtheme Layout V2 — 12-Column Grid System
 *
 * Responsive breakpoints:
 *   - Desktop:  default (no media query)
 *   - Tablet:   max-width: 1024px
 *   - Mobile:   max-width: 768px
 *
 * Architecture:
 *   .egm-layout-v2                    — root wrapper
 *     .egm-section                    — full-width section
 *       .egm-section__inner           — container (boxed / narrow / full)
 *         .egm-row                    — flexbox row
 *           .egm-col                  — 12-col grid column
 *             .egm-widget             — widget wrapper
 */

/* ─── Reset / Foundation ──────────────────────────────────── */

.egm-layout-v2,
.egm-layout-v2 *,
.egm-layout-v2 *::before,
.egm-layout-v2 *::after {
  box-sizing: border-box;
}

.egm-layout-v2 {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: inherit;
  color: inherit;
  line-height: inherit;
  /*
   * 🩹 SESSION 370 — LA MARGE ENTRE LE HEADER ET LA PAGE N'APPARTENAIT NI À LA SECTION NI À NOUS.
   *
   * La 369 avait remis à zéro la marge haute de la SECTION (une donnée du Layout Builder, rendue
   * en style inline) et l'écart de 24 px subsistait : il venait d'un cran plus haut, de la règle
   * WordPress `:where(.wp-site-blocks) > * { margin-block-start: 24px }` — le `blockGap` global
   * du thème, qui s'applique à TOUT enfant direct de `.wp-site-blocks`, donc à notre racine.
   * ⭐ *Une marge qu'on a déjà retirée deux fois et qui revient n'est pas la même marge : c'est
   * une autre règle, dans un autre foyer.* Le `:where()` de WordPress a une spécificité NULLE :
   * une seule ligne de classe suffit à la reprendre, et elle ne touche que notre racine.
   */
  margin-block-start: 0;
}

/* ─── Section ─────────────────────────────────────────────── */

.egm-section {
  position: relative;
  width: 100%;
}

.egm-section__inner {
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  /* 📐 539 — `border-box` OBLIGATOIRE, sinon « 1360 » est un mensonge de 32 px. Sans lui,
     la variante `--boxed` ci-dessous rend une boite de 1360 + 2×16 = 1392 pendant que
     l'en-tete et le pied, eux, tiennent 1360 : exactement le decalage que la consigne
     porteur demande de supprimer. ⭐ *Une largeur ne se declare pas sans son modele de
     boite* — c'est la mesure de la boite EXTERIEURE qu'un juge peut verifier. */
  box-sizing: border-box;
}

/* Container variants */
.egm-section--full .egm-section__inner {
  max-width: 100%;
}

/*
 * 🎨 SESSION 370 — LE PLEIN BORD, ET POURQUOI CE N'EST PAS `--full`.
 *
 * `--full` retire le PLAFOND de largeur, ⛔ pas le retrait de 16 px : une section peinte en
 * `--full` laisse donc deux liserés de 16 px du fond de PAGE le long des bords — invisible tant
 * que la section est transparente, criant dès qu'elle porte du noir. Le modèle de l'accueil, lui,
 * pose sa bannière **bord à bord**.
 *
 * ⚠️ Cette règle est une classe SUPPLÉMENTAIRE (`style.custom.className` du Layout Builder), ⛔ pas
 * une modification de `--full` : quatre autres pages (Catalogue, Profil, Premium CTA, Marketplace)
 * utilisent `--full` et n'ont rien demandé. ⭐ *Une règle écrite pour un besoin neuf se pose sur
 * une classe neuve : élargir la règle existante, c'est signer pour tous ses porteurs actuels.*
 *
 * ⇒ La section peinte se charge alors elle-même de son air intérieur (le hero par
 *   `spacing.sectionPadding`, « Espaces » par `section.padding`).
 */
.egm-section--bleed > .egm-section__inner {
  padding-left: 0;
  padding-right: 0;
}

/* 📐 539 — une section « boxed » de la V2 EST une largeur de page : elle rejoint le foyer
   unique (1200 ⇒ `--egm-page-max`). ⛔ `--narrow` ci-dessous ne bouge PAS : ses 800 px ne
   bornent pas la page, ils bornent une colonne de LECTURE (longueur de ligne). */
.egm-section--boxed .egm-section__inner {
  max-width: var(--egm-page-max, 1360px);
  margin-left: auto;
  margin-right: auto;
}

.egm-section--narrow .egm-section__inner {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Row ─────────────────────────────────────────────────── */

.egm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}

/* ─── Column — 12-col grid via CSS custom properties ──────── */

.egm-col {
  --egm-col-d: 12;
  --egm-col-t: var(--egm-col-d);
  --egm-col-m: 12;

  /* Desktop: width based on 12-col fraction */
  flex: 0 0 auto;
  width: calc(var(--egm-col-d) / 12 * 100%);
  min-width: 0;
  min-height: 0;
}

/* When using gap, correct the flex basis */
.egm-row > .egm-col:only-child {
  flex: 1 1 100%;
}

/* ─── Responsive ──────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .egm-col {
    width: calc(var(--egm-col-t) / 12 * 100%);
  }

  .egm-section__inner {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .egm-col {
    width: calc(var(--egm-col-m) / 12 * 100%);
  }

  .egm-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  /* Stack columns to full width only when --egm-col-m is 12 (default).
     Custom mobile widths (e.g. 6/12 = 50%) are preserved via the calc above. */

  .egm-section__inner {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ─── Widget Base ─────────────────────────────────────────── */

.egm-widget {
  position: relative;
  width: 100%;
  display: flow-root;
}

/* ─── Content Widgets ─────────────────────────────────────── */

/* Rich Text */
.egm-widget-richtext {
  word-break: break-word;
  overflow-wrap: break-word;
}

.egm-widget-richtext > *:first-child { margin-top: 0; }
.egm-widget-richtext > *:last-child  { margin-bottom: 0; }

/* Heading */
.egm-widget-heading {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.25;
  color: var(--egmtheme-text, #1e293b);
}

/* Button */
.egm-widget-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--egmtheme-radius-md, 8px);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--egmtheme-transition-colors, background-color .2s, color .2s);
  line-height: 1.5;
}

/* Sizes */
.egm-widget-button--xs {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.egm-widget-button--sm {
  padding: 6px 14px;
  font-size: 0.875rem;
}

.egm-widget-button--md {
  padding: 10px 20px;
  font-size: 1rem;
}

.egm-widget-button--lg {
  padding: 14px 28px;
  font-size: 1.125rem;
}

.egm-widget-button--xl {
  padding: 18px 36px;
  font-size: 1.25rem;
}

/* Variants */
.egm-widget-button--primary {
  background: var(--egmtheme-primary, #7c3aed);
  color: #fff;
}
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--primary:hover {
  background: var(--egmtheme-primary-hover, #6d28d9);
  color: #fff;
}
}

.egm-widget-button--secondary {
  background: var(--egmtheme-secondary, #a78bfa);
  color: #fff;
}
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--secondary:hover {
  background: var(--egmtheme-secondary-hover, #8b5cf6);
  color: #fff;
}
}

.egm-widget-button--outline {
  background: transparent;
  border: 2px solid var(--egmtheme-primary, #7c3aed);
  color: var(--egmtheme-primary, #7c3aed);
}
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--outline:hover {
  background: var(--egmtheme-primary, #7c3aed);
  color: #fff;
}
}

.egm-widget-button--ghost {
  background: transparent;
  color: var(--egmtheme-primary, #7c3aed);
}
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--ghost:hover {
  background: var(--egmtheme-surface-hover, rgba(124, 58, 237, 0.08));
}
}

.egm-widget-button--gradient {
  background: linear-gradient(135deg, var(--egmtheme-primary, #7c3aed), var(--egmtheme-secondary, #a78bfa));
  color: #fff;
}
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--gradient:hover {
  background: linear-gradient(135deg, var(--egmtheme-primary-hover, #6d28d9), var(--egmtheme-primary, #7c3aed));
  color: #fff;
}
}

.egm-widget-button__icon {
  margin-right: 6px;
}

.egm-widget-button-wrap {
  width: 100%;
}

/* New semantic button variants */
.egm-widget-button--success { background: #16a34a; color: #fff; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--success:hover { background: #15803d; color: #fff; }
}

.egm-widget-button--danger { background: #dc2626; color: #fff; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--danger:hover { background: #b91c1c; color: #fff; }
}

.egm-widget-button--warning { background: #f59e0b; color: #1e293b; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--warning:hover { background: #d97706; color: #1e293b; }
}

.egm-widget-button--info { background: #0ea5e9; color: #fff; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--info:hover { background: #0284c7; color: #fff; }
}

.egm-widget-button--dark { background: #1e293b; color: #fff; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--dark:hover { background: #0f172a; color: #fff; }
}

.egm-widget-button--light { background: #f1f5f9; color: #1e293b; border: 1px solid #e2e8f0; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--light:hover { background: #e2e8f0; color: #1e293b; }
}

.egm-widget-button--link { background: transparent; color: var(--egmtheme-primary, #7c3aed); text-decoration: underline; padding: 0; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-button--link:hover { color: var(--egmtheme-primary-hover, #6d28d9); }
}

/* Button full width */
.egm-widget-button--full { display: flex; width: 100%; }

/* Button border-radius variants */
.egm-widget-button--radius-none { border-radius: 0; }
.egm-widget-button--radius-sm   { border-radius: 4px; }
.egm-widget-button--radius-lg   { border-radius: 16px; }
.egm-widget-button--radius-pill { border-radius: 9999px; }

/* Button animations */
.egm-widget-button--anim-lift { transition: transform .2s, box-shadow .2s; }
@media (hover: hover) { /* 📱 797/R13 — pas de survol collé après un tap */
.egm-widget-button--anim-lift:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
}

.egm-widget-button--anim-pulse:hover { animation: egm-btn-pulse .6s; }
@keyframes egm-btn-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }

.egm-widget-button--anim-shine { position: relative; overflow: hidden; }
.egm-widget-button--anim-shine::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transition: left .5s;
}
.egm-widget-button--anim-shine:hover::after { left: 100%; }

/* List */
.egm-widget-list {
  margin: 0;
  padding-left: 1.5em;
  color: var(--egmtheme-text, #1e293b);
}

.egm-widget-list--ul { list-style-type: disc; }
.egm-widget-list--ol { list-style-type: decimal; }

.egm-widget-list--check,
.egm-widget-list--arrow,
.egm-widget-list--star,
.egm-widget-list--icon,
.egm-widget-list--none {
  list-style: none;
  padding-left: 0;
}

.egm-list-icon {
  display: inline-block;
  width: 1.5em;
  text-align: center;
  margin-right: 4px;
  color: var(--egmtheme-primary, #7c3aed);
}

.egm-widget-list li {
  margin-bottom: 0.35em;
}

.egm-widget-list--divider li {
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--egmtheme-border, #e2e8f0);
}
.egm-widget-list--divider li:last-child {
  border-bottom: none;
}

/* Image */
.egm-widget-image {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.egm-widget-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--egmtheme-radius-sm, 4px);
}

.egm-widget-image__img.egm-widget-image--rounded {
  border-radius: var(--egmtheme-radius-full, 9999px);
}

.egm-widget-image__img.egm-widget-image--shadow {
  box-shadow: var(--egmtheme-shadow-md, 0 4px 6px -1px rgba(0,0,0,.1));
}

.egm-widget-image figcaption {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--egmtheme-muted, #94a3b8);
  text-align: center;
}

/* Video */
.egm-widget-video {
  width: 100%;
}

.egm-widget-video__responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.egm-widget-video__responsive iframe,
.egm-widget-video__responsive video,
.egm-widget-video__responsive embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.egm-widget-video video {
  max-width: 100%;
  height: auto;
  border-radius: var(--egmtheme-radius-sm, 4px);
}

/* Spacer */
.egm-widget-spacer {
  width: 100%;
}

/* Spacer responsive heights */
@media (max-width: 1024px) {
  .egm-widget-spacer[style*="--egm-spacer-t"] {
    height: var(--egm-spacer-t) !important;
  }
}

@media (max-width: 768px) {
  .egm-widget-spacer[style*="--egm-spacer-m"] {
    height: var(--egm-spacer-m) !important;
  }
}

/* Divider */
.egm-widget-divider {
  margin: 0;
  border: none;
}

.egm-widget-divider--gradient {
  border: none;
  border-radius: 1px;
}

/* List — icon style */
.egm-widget-list--icon {
  list-style: none;
  padding-left: 0;
}

/* Shortcode & HTML */
.egm-widget-shortcode,
.egm-widget-html {
  width: 100%;
}

/* Embed */
.egm-widget-embed {
  width: 100%;
}

.egm-widget-embed iframe {
  max-width: 100%;
}

/* ─── App Mount Containers ────────────────────────────────── */

.egm-app-mount {
  width: 100%;
  min-height: 40px;
}

.egm-app-mount:empty::before {
  content: '';
  display: block;
  height: 40px;
  background: linear-gradient(90deg, 
    var(--egmtheme-surface, #f8fafc) 25%,
    var(--egmtheme-surface-hover, #f1f5f9) 50%,
    var(--egmtheme-surface, #f8fafc) 75%
  );
  background-size: 200% 100%;
  animation: egm-app-loading 1.5s ease-in-out infinite;
  border-radius: var(--egmtheme-radius-sm, 4px);
}

@keyframes egm-app-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Once app mounts, the pseudo-element disappears */
.egm-app-mount:not(:empty)::before {
  display: none;
}

/* ─── Placeholder (dev fallback) ──────────────────────────── */

.egm-widget__placeholder {
  padding: 16px;
  background: var(--egmtheme-surface, #f8fafc);
  border: 1px dashed var(--egmtheme-border, #e2e8f0);
  border-radius: var(--egmtheme-radius-sm, 4px);
  color: var(--egmtheme-muted, #94a3b8);
  font-size: 0.875rem;
  text-align: center;
}

.egm-widget__error {
  padding: 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--egmtheme-radius-sm, 4px);
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
}

/* ─── Utility: Section overlap / negative margin ──────────── */

.egm-section + .egm-section {
  /* Prevent double-spacing from padded sections */
}

/* ═══════════════════════════════════════════════════════════
   Styles des widgets composés (onglets, accordéon, galerie…)
   ═══════════════════════════════════════════════════════════ */

/* ─── Tabs ────────────────────────────────────────────────── */

.egm-widget-tabs { width: 100%; }

.egm-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--egmtheme-border, #e2e8f0);
  margin-bottom: 0;
}

.egm-tabs__btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--egmtheme-muted, #64748b);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}

@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-tabs__btn:hover { color: var(--egmtheme-text, #1e293b); }
}

.egm-tabs__btn.is-active {
  color: var(--egmtheme-primary, #3b82f6);
  border-bottom-color: var(--egmtheme-primary, #3b82f6);
}

.egm-tabs__panel { padding: 16px 0; display: none; }
.egm-tabs__panel.is-active { display: block; }

/* Pills variant */
.egm-widget-tabs--pills .egm-tabs__nav {
  border-bottom: none;
  gap: 8px;
  margin-bottom: 12px;
}
.egm-widget-tabs--pills .egm-tabs__btn {
  border-radius: 999px;
  border-bottom: none;
  margin-bottom: 0;
  padding: 8px 18px;
}
.egm-widget-tabs--pills .egm-tabs__btn.is-active {
  background: var(--egmtheme-primary, #3b82f6);
  color: #fff;
}

/* Underline variant */
.egm-widget-tabs--underline .egm-tabs__nav { border-bottom: 1px solid var(--egmtheme-border, #e2e8f0); }

/* Vertical variant */
.egm-widget-tabs--layout-vertical {
  display: flex;
  gap: 16px;
}
.egm-widget-tabs--layout-vertical .egm-tabs__nav {
  flex-direction: column;
  border-bottom: none;
  border-right: 2px solid var(--egmtheme-border, #e2e8f0);
  min-width: 140px;
}
.egm-widget-tabs--layout-vertical .egm-tabs__btn {
  text-align: left;
  border-bottom: none;
  border-right: 2px solid transparent;
  margin-bottom: 0;
  margin-right: -2px;
}
.egm-widget-tabs--layout-vertical .egm-tabs__btn.is-active {
  border-right-color: var(--egmtheme-primary, #3b82f6);
}
.egm-widget-tabs--layout-vertical .egm-tabs__panels { flex: 1; }

/* ─── Accordion ───────────────────────────────────────────── */

.egm-widget-accordion { width: 100%; }

.egm-accordion__item {
  border-bottom: 1px solid var(--egmtheme-border, #e2e8f0);
}

.egm-accordion__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--egmtheme-text, #1e293b);
  text-align: left;
  transition: color .2s;
}

@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-accordion__header:hover {
  color: var(--egmtheme-primary, #3b82f6);
}
}

.egm-accordion__icon {
  font-size: 0.9em;
  transition: transform .3s;
  flex-shrink: 0;
  margin-left: 12px;
}

.egm-accordion__body {
  padding: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--egmtheme-muted, #64748b);
}

/* Bordered variant */
.egm-widget-accordion--bordered .egm-accordion__item {
  border: 1px solid var(--egmtheme-border, #e2e8f0);
  border-radius: var(--egmtheme-radius-sm, 6px);
  margin-bottom: 8px;
  padding: 0 16px;
}

/* Shadow variant */
.egm-widget-accordion--shadow .egm-accordion__item {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  border-radius: var(--egmtheme-radius-sm, 6px);
  margin-bottom: 8px;
  padding: 0 16px;
}

/* Minimal variant */
.egm-widget-accordion--minimal .egm-accordion__item {
  border-bottom: none;
}
.egm-widget-accordion--minimal .egm-accordion__header {
  font-weight: 400;
}

/* ─── Icon Box ────────────────────────────────────────────── */

.egm-widget-iconbox {
  width: 100%;
  padding: 20px;
}

.egm-widget-iconbox--top {
  display: flex;
  flex-direction: column;
  align-items: inherit;
}
.egm-widget-iconbox--top[style*="center"] { align-items: center; }
.egm-widget-iconbox--top[style*="right"] { align-items: flex-end; }

.egm-widget-iconbox--left {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}

.egm-iconbox__icon {
  line-height: 1;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.egm-widget-iconbox--left .egm-iconbox__icon {
  margin-bottom: 0;
}

.egm-iconbox__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--egmtheme-text, #1e293b);
}

.egm-iconbox__desc {
  font-size: 0.95rem;
  color: var(--egmtheme-muted, #64748b);
  line-height: 1.6;
}

/* ─── Alert ───────────────────────────────────────────────── */

.egm-widget-alert {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--egmtheme-radius-sm, 6px);
  font-size: 0.95rem;
  line-height: 1.6;
}

.egm-alert__body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.egm-alert__icon { font-size: 1.15em; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.egm-alert__title { font-weight: 600; }

.egm-alert__close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  opacity: 0.5;
  padding: 0 0 0 12px;
  transition: opacity .2s;
}
.egm-alert__close:hover { opacity: 1; }

.egm-widget-alert--info    { background: #eff6ff;  border-left: 4px solid #3b82f6; color: #1e40af; }
.egm-widget-alert--success { background: #f0fdf4;  border-left: 4px solid #22c55e; color: #166534; }
.egm-widget-alert--warning { background: #fffbeb;  border-left: 4px solid #f59e0b; color: #92400e; }
.egm-widget-alert--error   { background: #fef2f2;  border-left: 4px solid #ef4444; color: #991b1b; }

/* ─── Testimonial ─────────────────────────────────────────── */

.egm-widget-testimonial {
  width: 100%;
  margin: 0;
  padding: 24px;
  font-style: normal;
  border: none;
}

.egm-testimonial__rating {
  color: #f59e0b;
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.egm-testimonial__quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--egmtheme-text, #1e293b);
  font-style: italic;
  margin-bottom: 16px;
}

.egm-testimonial__footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.egm-testimonial__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.egm-testimonial__author {
  font-style: normal;
  font-weight: 600;
  color: var(--egmtheme-text, #1e293b);
  display: block;
}

.egm-testimonial__role {
  font-size: 0.85rem;
  color: var(--egmtheme-muted, #64748b);
}

/* Card variant */
.egm-widget-testimonial--card {
  background: var(--egmtheme-surface, #f8fafc);
  border-radius: var(--egmtheme-radius, 8px);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* Bubble variant */
.egm-widget-testimonial--bubble {
  background: var(--egmtheme-surface, #f8fafc);
  border-radius: var(--egmtheme-radius, 8px);
  position: relative;
}
.egm-widget-testimonial--bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 32px;
  width: 16px;
  height: 16px;
  background: var(--egmtheme-surface, #f8fafc);
  transform: rotate(45deg);
}

/* Minimal variant */
.egm-widget-testimonial--minimal {
  padding: 0;
  border-left: 3px solid var(--egmtheme-primary, #3b82f6);
  padding-left: 20px;
}

/* ─── Table ───────────────────────────────────────────────── */

.egm-widget-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.egm-widget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.egm-widget-table th,
.egm-widget-table td {
  padding: 10px 14px;
  text-align: left;
}

.egm-widget-table th {
  font-weight: 600;
  background: var(--egmtheme-surface, #f8fafc);
  color: var(--egmtheme-text, #1e293b);
  border-bottom: 2px solid var(--egmtheme-border, #e2e8f0);
}

.egm-widget-table td {
  border-bottom: 1px solid var(--egmtheme-border, #e2e8f0);
}

.egm-widget-table--striped tbody tr:nth-child(even) {
  background: var(--egmtheme-surface, #f8fafc);
}

.egm-widget-table--bordered th,
.egm-widget-table--bordered td {
  border: 1px solid var(--egmtheme-border, #e2e8f0);
}

@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-table--hover tbody tr:hover {
  background: var(--egmtheme-surface-hover, #f1f5f9);
}
}

/* Table caption */
.egm-widget-table__caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0 0 12px;
  color: var(--egmtheme-text, #1e293b);
}

/* Custom border via CSS variable */
.egm-widget-table[style*="--egm-table-border"] th,
.egm-widget-table[style*="--egm-table-border"] td {
  border-color: var(--egm-table-border);
}

/* Table Theme: Modern */
.egm-widget-table--modern { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,.08); }
.egm-widget-table--modern th { background: var(--egmtheme-primary, #7c3aed); color: #fff; border: none; }
.egm-widget-table--modern td { border-bottom: 1px solid #f1f5f9; }

/* Table Theme: Blue */
.egm-widget-table--blue th { background: #2563eb; color: #fff; }
.egm-widget-table--blue.egm-widget-table--striped tbody tr:nth-child(even) { background: #eff6ff; }

/* Table Theme: Green */
.egm-widget-table--green th { background: #16a34a; color: #fff; }
.egm-widget-table--green.egm-widget-table--striped tbody tr:nth-child(even) { background: #f0fdf4; }

/* Table Theme: Purple */
.egm-widget-table--purple th { background: #7c3aed; color: #fff; }
.egm-widget-table--purple.egm-widget-table--striped tbody tr:nth-child(even) { background: #f5f3ff; }

/* Table Theme: Dark */
.egm-widget-table--dark { background: #1e293b; color: #e2e8f0; }
.egm-widget-table--dark th { background: #0f172a; color: #fff; border-color: #334155; }
.egm-widget-table--dark td { border-color: #334155; color: #cbd5e1; }
.egm-widget-table--dark.egm-widget-table--striped tbody tr:nth-child(even) { background: #0f172a; }
@media (hover: hover) { /* 📱 807 — survol de couleur réservé à la souris (pas collé après un tap) */
.egm-widget-table--dark.egm-widget-table--hover tbody tr:hover { background: #334155; }
}

/* Table Theme: Minimal */
.egm-widget-table--minimal th { background: transparent; font-weight: 700; border-bottom: 2px solid #1e293b; }
.egm-widget-table--minimal td { border-bottom: 1px solid #f1f5f9; }
.egm-widget-table--minimal.egm-widget-table--bordered th,
.egm-widget-table--minimal.egm-widget-table--bordered td { border: none; border-bottom: 1px solid #f1f5f9; }

/* ─── Progress ────────────────────────────────────────────── */

.egm-widget-progress { width: 100%; }

.egm-progress__item { margin-bottom: 16px; }
.egm-progress__item:last-child { margin-bottom: 0; }

.egm-progress__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.egm-progress__label { font-weight: 500; color: var(--egmtheme-text, #1e293b); }
.egm-progress__value { color: var(--egmtheme-muted, #64748b); }

.egm-progress__track {
  background: var(--egmtheme-surface, #e2e8f0);
  overflow: hidden;
}

.egm-widget-progress--rounded .egm-progress__track,
.egm-widget-progress--rounded .egm-progress__fill {
  border-radius: 999px;
}

.egm-widget-progress--square .egm-progress__track,
.egm-widget-progress--square .egm-progress__fill {
  border-radius: 0;
}

.egm-progress__fill {
  height: 100%;
  transition: width 1s ease;
}

.egm-progress__fill--striped {
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,.15) 50%,
    rgba(255,255,255,.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

/* ─── Counter ─────────────────────────────────────────────── */

.egm-widget-counter {
  width: 100%;
  padding: 20px;
}

.egm-counter__value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--egmtheme-text, #1e293b);
  line-height: 1.2;
}

.egm-counter__prefix,
.egm-counter__suffix {
  font-size: 0.7em;
  color: var(--egmtheme-primary, #3b82f6);
}

.egm-counter__label {
  font-size: 1rem;
  color: var(--egmtheme-muted, #64748b);
  margin-top: 8px;
}

/* ─── Gallery ─────────────────────────────────────────────── */

.egm-widget-gallery {
  width: 100%;
}

.egm-gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--egmtheme-radius-sm, 4px);
}

.egm-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

@media (hover: hover) { /* 📱 797/R13 — pas de survol collé après un tap */
.egm-gallery__item:hover img {
  transform: scale(1.05);
}
}

.egm-gallery__item a {
  display: block;
}

.egm-gallery__item figcaption {
  padding: 8px;
  font-size: 0.85rem;
  color: var(--egmtheme-muted, #64748b);
  text-align: center;
}

.egm-widget-gallery--empty {
  padding: 32px;
  text-align: center;
  background: var(--egmtheme-surface, #f8fafc);
  border: 1px dashed var(--egmtheme-border, #e2e8f0);
  border-radius: var(--egmtheme-radius, 8px);
  color: var(--egmtheme-muted, #94a3b8);
}

@media (max-width: 768px) {
  .egm-widget-gallery { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── Social Links ────────────────────────────────────────── */

.egm-sociallink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .2s, opacity .2s;
}

@media (hover: hover) { /* 📱 797/R13 — pas de survol collé après un tap */
.egm-sociallink:hover {
  transform: scale(1.1);
}
}

.egm-sociallink__icon {
  line-height: 1;
}

/* Size */
.egm-widget-sociallinks--size-sm .egm-sociallink { font-size: 1.2rem; padding: 6px; }
.egm-widget-sociallinks--size-md .egm-sociallink { font-size: 1.5rem; padding: 8px; }
.egm-widget-sociallinks--size-lg .egm-sociallink { font-size: 2rem;   padding: 10px; }

/* Style: filled */
.egm-widget-sociallinks--filled .egm-sociallink {
  border-radius: 50%;
  background: var(--egmtheme-surface, #f1f5f9);
}

/* Style: outline */
.egm-widget-sociallinks--outline .egm-sociallink {
  border-radius: 50%;
  border: 1px solid var(--egmtheme-border, #e2e8f0);
}

/* Style: minimal — no extra styling */

/* ─── CTA ─────────────────────────────────────────────────── */

.egm-widget-cta {
  width: 100%;
  padding: 32px 24px;
}

.egm-cta__title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--egmtheme-text, #1e293b);
}

.egm-cta__desc {
  font-size: 1.05rem;
  color: var(--egmtheme-muted, #64748b);
  line-height: 1.6;
  margin-bottom: 20px;
}

.egm-cta__button {
  display: inline-block;
  text-decoration: none;
}

/* Card variant */
.egm-widget-cta--card {
  background: var(--egmtheme-surface, #f8fafc);
  border-radius: var(--egmtheme-radius, 8px);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* Banner variant */
.egm-widget-cta--banner {
  background: var(--egmtheme-primary, #3b82f6);
  border-radius: var(--egmtheme-radius, 8px);
}
.egm-widget-cta--banner .egm-cta__title,
.egm-widget-cta--banner .egm-cta__desc {
  color: #fff;
}
.egm-widget-cta--banner .egm-cta__desc { opacity: 0.9; }

/* Gradient variant */
.egm-widget-cta--gradient {
  background: linear-gradient(135deg, var(--egmtheme-primary, #3b82f6), #8b5cf6);
  border-radius: var(--egmtheme-radius, 8px);
}
.egm-widget-cta--gradient .egm-cta__title,
.egm-widget-cta--gradient .egm-cta__desc {
  color: #fff;
}
.egm-widget-cta--gradient .egm-cta__desc { opacity: 0.9; }

/* ─── Print ───────────────────────────────────────────────── */

@media print {
  .egm-layout-v2 {
    color: #000;
  }

  .egm-app-mount:empty::before {
    display: none;
  }

  .egm-widget-button {
    border: 1px solid #000;
    color: #000;
    background: transparent;
  }

  .egm-widget-video__responsive {
    display: none;
  }
}
