/*
 * Popup Maker — popups D + J styles
 * Source: Design/resineo-popups-finalists.html (sections #v-d + #v-j)
 * Keep in sync if mockup is iterated.
 */

/* ════════════════════════════════════════════════════
   Popup Maker container overrides
   Hide default close button (we use our own .pum-close
   inside .popup-d / .popup-j wrappers)
   Reset container so our wrapper card is the visible card
   IDs differ per environment: 4105/4109 on staging, 4245/4246
   on production. Both sets are listed so a single popups.css
   file works on either environment without rewriting.
   Selectors using `:has()` would be cleaner but :has on
   .pum-overlay is unreliable across Popup Maker versions.
   ════════════════════════════════════════════════════ */
#pum-4105 .pum-container > .pum-close,
#pum-4109 .pum-container > .pum-close,
#pum-4245 .pum-container > .pum-close,
#pum-4246 .pum-container > .pum-close {
  display: none !important;
}
#pum-4105 .pum-container,
#pum-4109 .pum-container,
#pum-4245 .pum-container,
#pum-4246 .pum-container {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: calc(100vw - 40px) !important;
}
#pum-4105 .pum-container,
#pum-4245 .pum-container {
  width: 480px !important;
}
#pum-4109 .pum-container,
#pum-4246 .pum-container {
  width: 760px !important;
}

/* Lighter overlay so the page content stays visible behind the popup */
#pum-4105.pum-overlay,
#pum-4109.pum-overlay,
#pum-4245.pum-overlay,
#pum-4246.pum-overlay {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

  /* ════════════════════════════════════════════════════
     POPUP D — "Élégance Naturelle" (from v2)
     Scoped vars under #v-d
     ════════════════════════════════════════════════════ */
  .popup-d {
    --gold: #9C8863;
    --gold-light: #c4ad7e;
    --gold-pale: #f5f0e8;
    --dark: #1a1a1a;
    --charcoal: #2d2d2d;
    --text: #555;
    --text-light: #888;
    --white: #fff;
  }

  @keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .popup-d-wrap {
    position: relative; z-index: 5;
    animation: slideUp .5s cubic-bezier(.16,1,.3,1) both;
  }

  .popup-d {
    width: 100%; max-width: 480px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
      0 25px 80px rgba(0,0,0,0.3),
      0 0 0 1px rgba(156,136,99,0.1);
    position: relative;
    font-family: 'Titillium Web', sans-serif;
  }
  .popup-d .close {
    position: absolute; z-index: 10; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 1.5px solid rgba(156,136,99,0.45);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .3s;
  }
  .popup-d .close:hover { background: #fff; transform: rotate(90deg); }
  .popup-d .close svg { width: 12px; height: 12px; }
  .popup-d .close line { stroke: var(--gold); stroke-width: 2; stroke-linecap: round; }

  .popup-d .top-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  }

  .popup-d .content { padding: 28px 36px 36px; }

  .popup-d .eyebrow {
    font: 600 11px/1 'Titillium Web', sans-serif;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
  }

  .popup-d h2 {
    font: 400 30px/1.2 'Titillium Web', sans-serif;
    color: var(--dark);
    margin: 0 0 6px !important;
  }
  .popup-d h2 em {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    color: var(--gold);
  }

  .popup-d .subtitle {
    font: 400 15px/1.5 'Inter', system-ui, sans-serif;
    color: var(--text-light);
    margin-bottom: 28px;
  }

  /* Testimonial */
  .popup-d .testimonial {
    background: linear-gradient(135deg, #faf8f4, #f5f0e8);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
    position: relative;
  }
  .popup-d .testimonial::before {
    content: '\201C';
    font: 700 60px/1 'Noto Serif', Georgia, serif;
    color: rgba(156,136,99,0.15);
    position: absolute; top: 8px; left: 18px;
  }
  .popup-d .testimonial p {
    font: 400 14px/1.65 'Inter', system-ui, sans-serif;
    color: var(--text);
    font-style: italic;
    position: relative; z-index: 1;
    padding-left: 4px;
    margin: 0 !important;
  }
  .popup-d .testimonial-full { display: none; }
  .popup-d .testimonial.expanded .testimonial-full { display: block; }
  .popup-d .testimonial-full p { margin-top: 10px !important; }
  /* Fade overlay on testimonial preview (collapsed state only) — hints there's more to read */
  .popup-d .testimonial:not(.expanded) .testimonial-preview::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 24px;
    right: 24px;
    height: 36px;
    background: linear-gradient(to bottom, rgba(245,240,232,0), rgba(245,240,232,1));
    pointer-events: none;
    z-index: 2;
  }
  .popup-d .read-more-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    background: none; border: none;
    color: var(--gold);
    font: 600 11px/1 'Titillium Web', sans-serif;
    letter-spacing: 1.2px; text-transform: uppercase;
    cursor: pointer;
    border-bottom: 1px solid rgba(156,136,99,0.4);
    padding-bottom: 2px;
    transition: color .2s, border-color .2s;
    position: relative; z-index: 1;
  }
  .popup-d .read-more-btn:hover { color: #866f4e; border-color: var(--gold); }
  .popup-d .testimonial-footer {
    display: flex; align-items: center; gap: 12px;
    margin-top: 14px; position: relative; z-index: 1;
  }
  .popup-d .testimonial-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--gold); color: var(--white);
    font: 600 14px/36px 'Titillium Web', sans-serif;
    text-align: center;
  }
  .popup-d .testimonial-name {
    font: 600 13px/1 'Inter', system-ui, sans-serif;
    color: var(--dark);
  }
  .popup-d .testimonial-stars {
    display: flex; gap: 2px;
    margin-top: 3px;
  }
  .popup-d .testimonial-stars svg {
    width: 13px; height: 13px;
    fill: #e8b92a; stroke: none;
  }

  /* Trust strip — original Résineo pictograms */
  .popup-d .trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 28px;
  }
  .popup-d .trust-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    text-align: center;
  }
  .popup-d .trust-icon {
    width: 58px; height: 58px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .popup-d .trust-icon svg { width: 100%; height: 100%; display: block; }
  .popup-d .trust-label {
    font: 500 13px/19px 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1A2C35;
  }

  /* CTA charte — anthracite pill + white border + white arrow circle */
  .popup-d .cta {
    display: flex; align-items: center;
    width: max-content; max-width: 100%;
    margin-left: auto; margin-right: auto;
    gap: 14px;
    padding: 12px 8px 12px 28px;
    background: #4E4E4E;
    color: #fff;
    font: 700 13px/1 'Titillium Web', sans-serif;
    letter-spacing: 1.5px; text-transform: uppercase;
    text-decoration: none;
    border: 6px solid #fff;
    border-radius: 100px;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
  }
  .popup-d .cta:hover { background: #3A3A3A; transform: translateY(-1px); }
  .popup-d .cta-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }
  .popup-d .cta:hover .cta-arrow { transform: translate(2px, -2px); }
  .popup-d .cta-arrow svg {
    width: 14px; height: 14px;
    stroke: #4E4E4E; fill: none;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  }
  .popup-d .fine-print {
    text-align: center; margin-top: 14px;
    font: 300 12px/1 'Titillium Web', sans-serif;
    color: #bbb;
  }

  /* ════════════════════════════════════════════════════
     POPUP J — "Magazine Split 50/50" (from v4)
     Scoped vars under #v-j
     ════════════════════════════════════════════════════ */
  .popup-j {
    --gold: #C9BBA0;
    --gold-dark: #B0A288;
    --gold-deep: #8B7A50;
    --content: #4E4E4E;
    --content-light: #5C5C5C;
    --content-dark: #3A3A3A;
    --text: #4E4E4E;
    --text-muted: #6B6560;
    --text-light: #8A847B;
    --cream: #FAF7F2;
    --sand: #F5F1EB;
    --white: #FFFFFF;
    --heading: 'Titillium Web', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;
    --display: 'Noto Serif', Georgia, serif;
    --img-piscine: url('/guides/wp-content/uploads/sites/2/2026/05/moquette-pierre-terrasse-popup.jpg');
  }

  @keyframes popIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }

  .popup-j {
    position: relative; z-index: 5;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 760px; max-width: calc(100vw - 40px);
    display: grid; grid-template-columns: 1fr 1fr;
    min-height: 420px;
  }
  .popup-j .popup-close {
    position: absolute; z-index: 10; top: 16px; right: 16px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 1.5px solid rgba(156,136,99,0.45);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .3s;
  }
  .popup-j .popup-close:hover { background: #fff; transform: rotate(90deg); }
  .popup-j .popup-close svg { width: 12px; height: 12px; }
  .popup-j .popup-close line { stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; }

  .popup-j .photo {
    background: var(--img-piscine) center/cover no-repeat;
    position: relative;
  }
  .popup-j .photo::after {
    content: 'UNE RÉALISATION RÉSINEO';
    position: absolute; bottom: 14px; left: 16px;
    font-family: var(--heading); font-size: 10px; font-weight: 600;
    letter-spacing: 2px; color: var(--white);
    background: rgba(0,0,0,0.35);
    padding: 4px 10px; border-radius: 3px;
    backdrop-filter: blur(4px);
  }
  .popup-j .body {
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
    background: #FFFFFF;
  }
  .popup-j .eyebrow {
    font-family: var(--heading); font-weight: 600;
    font-size: 11px; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--gold-deep);
    margin: 0 0 14px;
  }
  .popup-j h3 {
    font-family: var(--heading); font-weight: 400;
    font-size: 30px; line-height: 1.2;
    margin: 0 0 16px !important; color: var(--content);
  }
  .popup-j h3 em {
    font-family: var(--display); font-style: italic;
    font-weight: 400; color: var(--gold-deep);
    display: block;
  }
  .popup-j .lead {
    font-family: var(--body); font-size: 14px; line-height: 1.55;
    color: var(--text-muted); margin: 0 0 24px !important;
  }
  /* CTA charte — anthracite pill + white border + white arrow circle */
  .popup-j .cta {
    display: flex; align-items: center;
    width: max-content; max-width: 100%;
    margin-left: auto; margin-right: auto;
    align-self: center;
    gap: 14px;
    padding: 12px 8px 12px 28px;
    background: #4E4E4E;
    color: #fff;
    font: 700 13px/1 'Titillium Web', sans-serif;
    letter-spacing: 1.5px; text-transform: uppercase;
    text-decoration: none;
    border: 6px solid #fff;
    border-radius: 100px;
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: pointer;
  }
  .popup-j .cta:hover { background: #3A3A3A; transform: translateY(-1px); }
  .popup-j .cta-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }
  .popup-j .cta:hover .cta-arrow { transform: translate(2px, -2px); }
  .popup-j .cta-arrow svg {
    width: 14px; height: 14px;
    stroke: #4E4E4E; fill: none;
    stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  }
  /* Trust strip — same pictogram style as popup D */
  .popup-j .trust-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 22px;
  }
  .popup-j .trust-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    text-align: center;
  }
  .popup-j .trust-icon {
    width: 58px; height: 58px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .popup-j .trust-icon svg { width: 100%; height: 100%; display: block; }
  .popup-j .trust-label {
    font: 500 12px/17px 'Inter', system-ui, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1A2C35;
  }

  /* Responsive popups */
  @media (max-width: 700px) {
    .popup-j { grid-template-columns: 1fr; }
    .popup-j .photo { min-height: 200px; }
    .popup-j .body { padding: 32px 28px; }
  }
  @media (max-width: 520px) {
    .popup-d .content { padding-left: 24px; padding-right: 24px; }
    .popup-d h2 { font-size: 26px; }
  }
