/* THYRKA — pop-ups « avantages » : 8 mises en page, communes à l'Espace patron et à l'aperçu de la console. */
.pop { --pb: #121C2E; --pf: #E8EEF8; --pm: #9FB0C8; --pl: #1C2940; --pa: #00B89B; --ph: #F4B400;
  position: relative; width: min(420px, 100%); max-height: calc(100vh - 36px); overflow: hidden auto; background: var(--pb); color: var(--pf);
  border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); font-family: inherit; text-align: left; }
[data-theme="light"] .pop-ov .pop { --pb: #fff; --pf: #0F1B2D; --pm: #5B6B82; --pl: #EEF2F7; }
.pop.in { animation: popUp .35s cubic-bezier(.2, .9, .3, 1.2); }
.pop-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #0F2D5B, #00B89B); }
.pop-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pop-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center; z-index: 3; cursor: pointer; }
.pop-body { position: relative; padding: 18px 22px 22px; }
.pop-t { margin: 0 0 8px; font-size: 21px; line-height: 1.25; font-weight: 800; color: inherit; }
.pop-body p { margin: 0 0 16px; color: var(--pm); font-size: 14.5px; line-height: 1.55; white-space: pre-line; }
.pop-hl { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -.5px; color: var(--ph); margin: 0 0 8px; }
.pop-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.pop-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--pl); cursor: pointer; transition: width .2s, background .2s; }
.pop-dots i.on { width: 22px; background: var(--pa); }
.pop-act { display: grid; gap: 8px; }
.pop-btn { width: 100%; border: 0; border-radius: 12px; padding: 12px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; background: var(--pa); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--pa) 35%, transparent); }
.pop-btn.pop-later { background: var(--pl); color: var(--pf); box-shadow: none; }

/* Côte à côte (texte | image) et inversé (image | texte) */
.pop--split, .pop--split-left { width: min(760px, 100%); display: grid; grid-template-columns: 1fr 1fr; }
.pop--split .pop-media, .pop--split-left .pop-media { aspect-ratio: auto; min-height: 340px; height: 100%; }
.pop--split .pop-media { order: 2; }
.pop--split .pop-body, .pop--split-left .pop-body { display: flex; flex-direction: column; justify-content: center; padding: 34px 30px; }
.pop--split .pop-t, .pop--split-left .pop-t { font-size: 25px; }

/* Titre posé sur l'image */
.pop--cover .pop-media { aspect-ratio: 4 / 3; }
.pop--cover .pop-media::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.pop--cover .pop-media .pop-t { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; color: #fff; font-size: 26px; font-style: italic; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); margin: 0; }

/* Carte icône : image ronde centrée */
.pop--icon { width: min(360px, 100%); text-align: center; padding-top: 28px; }
.pop--icon .pop-media { width: 150px; height: 150px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; box-shadow: 0 0 0 14px color-mix(in srgb, var(--ph) 16%, transparent); }
.pop--icon .pop-x { background: var(--pl); color: var(--pf); }
.pop--icon .pop-btn { border-radius: 99px; }

/* Festif : cadeau, confettis, grand chiffre */
.pop--festive { width: min(380px, 100%); text-align: center; overflow: visible auto; }
.pop--festive .pop-media { width: 72%; aspect-ratio: 16 / 11; margin: 24px auto 0; border-radius: 18px; background: transparent; }
.pop--festive .pop-media img { object-fit: contain; }
.pop--festive .pop-hl { color: #FF5A5F; font-size: 40px; }
.pop--festive .pop-btn { border-radius: 99px; background: #FF5A5F; box-shadow: 0 8px 20px rgba(255, 90, 95, .35); }
.pop--festive .pop-btn.pop-later { box-shadow: none; background: transparent; color: var(--pm); text-decoration: underline; font-size: 13px; padding: 6px; }
.pop-cf { position: absolute; inset: 0 0 45%; pointer-events: none; z-index: 2; }
.pop-cf i { position: absolute; width: 9px; height: 5px; border-radius: 2px; animation: popCf 2.4s ease-in-out infinite alternate; }

/* Image en fond, texte blanc dessus */
.pop--fullbg { width: min(460px, 100%); min-height: 440px; display: flex; align-items: flex-end; text-align: center; color: #fff; }
.pop--fullbg .pop-media { position: absolute; inset: 0; aspect-ratio: auto; }
.pop--fullbg .pop-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(5, 10, 20, .35), rgba(5, 10, 20, .78) 45%, rgba(5, 10, 20, .94)); }
.pop--fullbg .pop-body { text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.pop--fullbg .pop-body { width: 100%; padding: 30px 26px 26px; }
.pop--fullbg .pop-body p { color: rgba(255, 255, 255, .85); }
.pop--fullbg .pop-hl { color: #fff; font-size: 44px; }
.pop--fullbg .pop-t { text-transform: uppercase; letter-spacing: 1px; font-size: 17px; }
.pop--fullbg .pop-btn { background: #FF5A5F; box-shadow: none; border-radius: 6px; }
.pop--fullbg .pop-btn.pop-later { background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }

/* Classique : titre, image, texte, bouton */
.pop--classic { width: min(440px, 100%); }
.pop--classic .pop-body { padding: 26px 24px 24px; }
.pop--classic .pop-t { color: var(--pa); font-weight: 600; font-size: 24px; margin-bottom: 14px; padding-right: 30px; }
.pop--classic .pop-media { border-radius: 10px; margin-bottom: 14px; }
.pop--classic .pop-btn { border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; font-size: 13.5px; }

/* Petits écrans (téléphone, ou aperçu « téléphone » de la console) : les patrons ouvrent surtout l'Espace patron sur mobile.
   Carte pleine largeur collée en bas (geste du pouce), styles côte à côte empilés, images moins hautes pour que le
   bouton reste visible sans défiler, grandes zones de toucher (48 px). */
@container popbox (max-width: 560px) {
  .pop { width: 100%; }
  .pop-body { padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .pop-t { font-size: 19px; }
  .pop-body p { font-size: 14px; margin-bottom: 14px; }
  .pop-hl { font-size: 30px; }
  .pop-btn { min-height: 48px; padding: 12px; }
  .pop-x { width: 36px; height: 36px; top: 8px; right: 8px; }
  .pop--split, .pop--split-left { display: block; }
  .pop--split .pop-media, .pop--split-left .pop-media { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .pop--split .pop-body, .pop--split-left .pop-body { padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .pop--split .pop-t, .pop--split-left .pop-t { font-size: 19px; }
  .pop--cover .pop-media { aspect-ratio: 16 / 11; }
  .pop--cover .pop-media .pop-t { font-size: 22px; left: 16px; bottom: 12px; }
  .pop--icon { padding-top: 22px; }
  .pop--icon .pop-media { width: 112px; height: 112px; box-shadow: 0 0 0 10px color-mix(in srgb, var(--ph) 16%, transparent); }
  .pop--festive .pop-media { width: 62%; margin-top: 18px; }
  .pop--festive .pop-hl { font-size: 34px; }
  .pop--festive .pop-btn.pop-later { min-height: 40px; }
  .pop--fullbg { min-height: min(420px, 78vh); }
  .pop--fullbg .pop-hl { font-size: 36px; }
  .pop--classic .pop-body { padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .pop--classic .pop-t { font-size: 21px; }
  .pop--classic .pop-media { aspect-ratio: 16 / 9; }
}
@media (max-height: 640px) { .pop-media { max-height: 34vh; } .pop--icon .pop-media, .pop--festive .pop-media { max-height: none; } }
@keyframes popUp { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes popCf { to { translate: 0 8px; rotate: 40deg; } }
@media (prefers-reduced-motion: reduce) { .pop.in, .pop-cf i { animation: none; } }
