/* =========================================================================
   L'EXPERTISE E-COMMERCE — composants & styles de section
   -------------------------------------------------------------------------
   theme.json gère la palette, les polices et l'échelle typo (variables
   --wp--preset--*). Ce fichier ne fait QUE les composants réutilisables et
   les finitions premium. Mobile-first, sobre, contrastes AA, focus visibles.
   ========================================================================= */

:root {
  --ex-violet:        #471546;
  --ex-violet-fonce:  #2D0D2B;
  --ex-or:            #D6B27A;
  --ex-or-clair:      #E4CBA1;
  --ex-blanc-casse:   #F8F5F1;
  --ex-noir:          #141414;
  --ex-anthracite:    #2B2B31;
  --ex-gris-moyen:    #6B6B73;
  --ex-gris-clair:    #E6E3DF;

  --ex-radius:        14px;
  --ex-radius-sm:     10px;
  --ex-shadow-soft:   0 10px 30px -12px rgba(20, 20, 20, .18);
  --ex-shadow-card:   0 18px 50px -20px rgba(45, 13, 43, .35);
  --ex-transition:    .25s cubic-bezier(.22, .61, .36, 1);
  --ex-maxw:          1180px;
}

/* -------------------------------------------------------------------------
   1. RÉGLAGES GLOBAUX & RYTHME
   ------------------------------------------------------------------------- */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Espacements généreux entre les sections (compositions aérées). */
.wp-block-group.ex-section {
  padding-top: clamp(3.5rem, 8vw, 7rem);
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
}

/* Largeur de lecture confortable. */
.ex-measure { max-width: 42rem; }

/* Surtitre / eyebrow doré au-dessus des H2. */
.ex-eyebrow {
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ex-or);
  margin-bottom: .5rem;
  display: inline-block;
}

/* -------------------------------------------------------------------------
   2. SECTIONS VIOLETTES (≥70% des aplats)
   ------------------------------------------------------------------------- */

.has-violet-background-color,
.has-violet-fonce-background-color {
  color: var(--ex-blanc-casse);
}
.has-violet-background-color :where(h1,h2,h3,h4,p,li),
.has-violet-fonce-background-color :where(h1,h2,h3,h4,p,li),
.has-marque-gradient-background :where(h1,h2,h3,h4,p,li),
.has-violet-radial-gradient-background :where(h1,h2,h3,h4,p,li) {
  color: var(--ex-blanc-casse);
}
/* Les titres restent clairs sur violet, mais on peut accentuer en or via .has-or-color */
.has-or-color { color: var(--ex-or) !important; }

/* -------------------------------------------------------------------------
   3. BOUTONS — primaire (or), secondaire (bordé), lien animé
   ------------------------------------------------------------------------- */

/* Primaire : reprend la couleur or de theme.json + élévation au hover. */
.wp-block-button__link {
  transition: transform var(--ex-transition), background-color var(--ex-transition), box-shadow var(--ex-transition), color var(--ex-transition);
  box-shadow: 0 6px 18px -10px rgba(214, 178, 122, .9);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background-color: var(--ex-or-clair) !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgba(214, 178, 122, .95);
}
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--ex-or-clair);
  outline-offset: 3px;
}

/* Secondaire : style « outline » bordé or, fond transparent. */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border: 1.5px solid var(--ex-or);
  color: var(--ex-or) !important;
  box-shadow: none;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--ex-or) !important;
  color: var(--ex-violet-fonce) !important;
  transform: translateY(-2px);
}
/* Variante outline claire sur fond violet. */
.wp-block-button.is-style-outline.ex-on-violet .wp-block-button__link {
  border-color: var(--ex-blanc-casse);
  color: var(--ex-blanc-casse) !important;
}
.wp-block-button.is-style-outline.ex-on-violet .wp-block-button__link:hover {
  background: var(--ex-blanc-casse) !important;
  color: var(--ex-violet-fonce) !important;
}

/* État désactivé. */
.wp-block-button__link[disabled],
.wp-block-button.is-disabled .wp-block-button__link {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* Liens accents : soulignement animé au hover. */
.ex-link-anim a,
a.ex-link-anim {
  color: var(--ex-or);
  text-decoration: none;
  background-image: linear-gradient(var(--ex-or), var(--ex-or));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--ex-transition);
}
.ex-link-anim a:hover,
a.ex-link-anim:hover { background-size: 100% 1.5px; }

/* -------------------------------------------------------------------------
   4. CARTES
   ------------------------------------------------------------------------- */

/* Carte claire : fond blanc cassé, ombre légère, coins arrondis. */
.ex-card {
  background: var(--ex-blanc-casse);
  border: 1px solid var(--ex-gris-clair);
  border-radius: var(--ex-radius);
  box-shadow: var(--ex-shadow-soft);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  height: 100%;
  transition: transform var(--ex-transition), box-shadow var(--ex-transition);
}
.ex-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ex-shadow-card);
}
.ex-card h3, .ex-card h4 { margin-top: 0; }

/* Carte sur fond violet (sur section violette) : surface légèrement éclaircie. */
.ex-card--violet {
  background: rgba(248, 245, 241, .05);
  border: 1px solid rgba(214, 178, 122, .25);
  box-shadow: none;
}
.ex-card--violet:hover { border-color: rgba(214, 178, 122, .6); }

/* Carte statistique : fond violet, chiffre or, libellé clair. */
.ex-stat {
  background: linear-gradient(135deg, var(--ex-violet) 0%, var(--ex-violet-fonce) 100%);
  border-radius: var(--ex-radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  border: 1px solid rgba(214, 178, 122, .2);
  height: 100%;
}
.ex-stat .ex-stat__num {
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 600;
  font-size: clamp(2.75rem, 6vw, 4rem);
  line-height: 1;
  color: var(--ex-or);
  display: block;
}
.ex-stat .ex-stat__label {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ex-blanc-casse);
  margin-top: .5rem;
}

/* Carte stat claire (sur fond clair) : inverse. */
.ex-stat--light {
  background: var(--ex-blanc-casse);
  border: 1px solid var(--ex-gris-clair);
}
.ex-stat--light .ex-stat__label { color: var(--ex-gris-moyen); }

/* -------------------------------------------------------------------------
   5. ICÔNES OR (ligne fine 2px, arrondies)
   ------------------------------------------------------------------------- */

.ex-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1.5px solid rgba(214, 178, 122, .45);
  color: var(--ex-or);
  margin-bottom: 1rem;
}
.ex-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Puce dorée pour listes « value stack ». */
.ex-list-check { list-style: none; padding-left: 0; }
.ex-list-check li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: .75rem;
  line-height: 1.6;
}
.ex-list-check li::before {
  content: "";
  position: absolute;
  left: 0; top: .35em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232D0D2B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat,
    var(--ex-or);
}

/* -------------------------------------------------------------------------
   6. TYPO FINITIONS
   ------------------------------------------------------------------------- */

/* Chiffres / data en Inter SemiBold. */
.ex-data { font-family: var(--wp--preset--font-family--inter); font-weight: 600; }

/* Prix barré (ancrage). */
.ex-strike { text-decoration: line-through; opacity: .6; }

/* Citation premium (témoignages). */
.ex-quote {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.4;
  font-style: italic;
}

/* Filet doré décoratif. */
.ex-rule {
  width: 56px; height: 2px;
  background: var(--ex-or);
  border: 0;
  margin: 0 0 1.25rem;
}
.ex-rule.is-centered { margin-left: auto; margin-right: auto; }

/* Badge (Shopify Partner, experte Woo, rareté…). */
.ex-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--wp--preset--font-family--inter);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(214, 178, 122, .45);
  color: var(--ex-or);
  background: rgba(214, 178, 122, .06);
}
.ex-badge--solid { background: var(--ex-or); color: var(--ex-violet-fonce); border-color: var(--ex-or); }

/* -------------------------------------------------------------------------
   7. EMPLACEMENTS IMAGE (placeholders charte)
   ------------------------------------------------------------------------- */

.ex-img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  border-radius: var(--ex-radius);
  border: 1.5px dashed rgba(214, 178, 122, .5);
  background: linear-gradient(135deg, rgba(71,21,70,.06), rgba(214,178,122,.08));
  color: var(--ex-gris-moyen);
  font-family: var(--wp--preset--font-family--inter);
  font-size: 14px;
  padding: 2rem;
}
.ex-img-slot--onviolet {
  border-color: rgba(214, 178, 122, .6);
  background: rgba(248, 245, 241, .04);
  color: var(--ex-or-clair);
}

/* -------------------------------------------------------------------------
   8. BLOC « POUR QUI / PAS POUR QUI »
   ------------------------------------------------------------------------- */

.ex-fit { border-radius: var(--ex-radius); padding: clamp(1.5rem, 3vw, 2.25rem); height: 100%; }
.ex-fit--yes { background: rgba(214, 178, 122, .10); border: 1px solid rgba(214, 178, 122, .4); }
.ex-fit--no  { background: rgba(107, 107, 115, .10); border: 1px solid var(--ex-gris-clair); }
.ex-fit h3 { display: flex; align-items: center; gap: .5rem; }

/* -------------------------------------------------------------------------
   9. FAQ (blocs Details/Summary natifs)
   ------------------------------------------------------------------------- */

.wp-block-details {
  border-bottom: 1px solid var(--ex-gris-clair);
  padding: 1.1rem 0;
}
.wp-block-details summary {
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
  color: var(--ex-violet);
}
.has-violet-background-color .wp-block-details summary,
.has-violet-fonce-background-color .wp-block-details summary { color: var(--ex-blanc-casse); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
  content: "+";
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--ex-or); line-height: 1;
  transition: transform var(--ex-transition);
}
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details p { margin-top: .75rem; color: var(--ex-gris-moyen); }
.has-violet-background-color .wp-block-details p,
.has-violet-fonce-background-color .wp-block-details p { color: rgba(248,245,241,.8); }

/* -------------------------------------------------------------------------
   10. TIMELINE « 3 JOURS » / « COMMENT ÇA MARCHE »
   ------------------------------------------------------------------------- */

.ex-step { position: relative; padding-left: 0; }
.ex-step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  font-family: var(--wp--preset--font-family--cormorant);
  font-weight: 600; font-size: 1.5rem;
  background: var(--ex-or); color: var(--ex-violet-fonce);
  margin-bottom: 1rem;
}

/* -------------------------------------------------------------------------
   11. NOTE / ENCART DISCRET (sortie secondaire subordonnée)
   ------------------------------------------------------------------------- */

.ex-aside {
  border-left: 3px solid var(--ex-or);
  background: rgba(214, 178, 122, .07);
  border-radius: 0 var(--ex-radius-sm) var(--ex-radius-sm) 0;
  padding: 1.25rem 1.5rem;
  font-size: 15px;
}

/* -------------------------------------------------------------------------
   12. ACCESSIBILITÉ & MOUVEMENT
   ------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--ex-or);
  outline-offset: 2px;
  border-radius: 4px;
}

.ex-skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ex-or); color: var(--ex-violet-fonce);
  padding: .75rem 1.25rem; z-index: 100000; font-weight: 600;
}
.ex-skip-link:focus { left: 1rem; top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------------------------------------------------------------
   13. PETITS UTILITAIRES DE MISE EN PAGE
   ------------------------------------------------------------------------- */

.ex-center { text-align: center; }
.ex-mt-0 { margin-top: 0; }
.ex-shadow { box-shadow: var(--ex-shadow-card); border-radius: var(--ex-radius); }
.ex-round { border-radius: var(--ex-radius); overflow: hidden; }

/* Grille de colonnes : ne jamais coller sur mobile. */
@media (max-width: 781px) {
  .wp-block-columns.ex-section { gap: 1.25rem; }
}
