/* ============================================================================
 *  Univers Détergent — Landing (QR code)
 *  Design & code : Zentrix — zentrixdz.com
 *  Palette alignée sur le design system UD (#312783 / #e30613).
 * ========================================================================== */

:root {
  --primary: #312783;
  --primary-light: #3b2f96;
  --primary-dark: #241c63;
  --primary-deep: #17123a;
  --accent: #e30613;

  --text: #17133f;
  --text-muted: #56537d;
  --text-faint: #9b9ab8;

  --bg: #e9ecf9;
  --surface: #ffffff;
  --surface-soft: #f8f9fe;
  --border: #e5e8f7;
  --border-soft: #eef0fa;

  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-2xl: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 6px -2px rgba(35, 28, 99, .10);
  --shadow-card: 0 1px 2px rgba(35, 28, 99, .04), 0 20px 44px -30px rgba(35, 28, 99, .5);
  /* ombre à plusieurs niveaux : c'est elle qui donne la profondeur */
  --shadow-float:
    0 1px 2px rgba(35, 28, 99, .05),
    0 8px 16px -8px rgba(35, 28, 99, .12),
    0 28px 50px -26px rgba(28, 22, 78, .38),
    0 60px 110px -50px rgba(23, 18, 58, .55);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   DÉCOR 3D — bulles de savon sur trois plans, avec parallaxe
   ========================================================================== */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* dégradés de fond superposés (« mesh ») */
.scene__mesh {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(58% 44% at 12% 6%,   rgba(96, 78, 224, .34), transparent 62%),
    radial-gradient(46% 38% at 92% 22%,  rgba(255, 60, 90, .15),  transparent 60%),
    radial-gradient(60% 46% at 78% 92%,  rgba(46, 150, 240, .26), transparent 64%),
    radial-gradient(52% 40% at 24% 78%,  rgba(140, 100, 240, .18), transparent 62%),
    linear-gradient(165deg, #f5f7ff 0%, #e9edfb 46%, #e3e8f9 100%);
}

.scene__layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* une bulle de savon : corps transparent, rebord lumineux, irisation */
.orb {
  position: absolute;
  inset-inline-start: var(--x);
  inset-block-start: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background:
    radial-gradient(circle at 70% 70%, rgba(255, 108, 180, .26), transparent 45%),
    radial-gradient(circle at 28% 76%, rgba(72, 198, 255, .32), transparent 47%),
    radial-gradient(circle at 80% 28%, rgba(146, 124, 255, .26), transparent 45%),
    radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, .14) 0%,
      rgba(255, 255, 255, .05) 64%,
      rgba(255, 255, 255, .40) 85%,
      rgba(228, 236, 255, .92) 95%,
      rgba(255, 255, 255, 0) 100%);
  box-shadow: 0 20px 44px -28px rgba(38, 30, 108, .40);
  animation: drift var(--dur, 16s) ease-in-out var(--t, 0s) infinite;
}
/* reflet spéculaire principal (en haut à gauche) */
.orb::before {
  content: '';
  position: absolute;
  inset-inline-start: 18%;
  inset-block-start: 14%;
  width: 27%;
  height: 21%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 72%);
  transform: rotate(-24deg);
}
/* rebond de lumière (en bas à droite) */
.orb::after {
  content: '';
  position: absolute;
  inset-inline-end: 23%;
  inset-block-end: 17%;
  width: 15%;
  height: 11%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 74%);
}

/* profondeur de champ : les plans lointains sont plus flous et plus pâles */
.scene__layer:nth-child(2) .orb { filter: blur(3.5px); opacity: .62; }
.scene__layer:nth-child(3) .orb { filter: blur(1.2px); opacity: .78; }
.scene__layer:nth-child(4) .orb { opacity: .92; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(9px, -20px, 0) scale(1.035); }
  66%      { transform: translate3d(-11px, -9px, 0) scale(.975); }
}

/* grain fin : casse les dégradés et donne un rendu « matière » */
.scene__grain {
  position: absolute;
  inset: 0;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- layout --------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  padding: 18px 16px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* --- sélecteur de langue -------------------------------------------------- */
.langbar {
  position: relative;
  align-self: center;
  display: flex;
  padding: 4px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
}
.langbar::before {
  content: '';
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: var(--pill-w, 0);
  transform: translateX(var(--pill-x, 0));
  background: linear-gradient(140deg, var(--primary-light), var(--primary-dark));
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 18px -10px rgba(36, 28, 99, .95),
              inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .45s var(--ease), width .45s var(--ease);
}
.langbar button {
  position: relative;
  z-index: 1;
  padding: 8px 17px;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: color .35s var(--ease);
}
.langbar button[aria-pressed="true"] { color: #fff; }

/* --- carte principale ----------------------------------------------------- */
.card {
  position: relative;
  background: rgba(255, 255, 255, .955);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;
}

/* bandeau dégradé + bulles */
.hero {
  position: relative;
  height: 132px;
  background:
    radial-gradient(120% 130% at 15% 0%, #4f40bd 0%, transparent 55%),
    radial-gradient(90% 120% at 100% 100%, #171049 0%, transparent 60%),
    linear-gradient(140deg, var(--primary-light), var(--primary-dark));
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}
.hero__bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
/* voile lumineux sur le haut du bandeau */
.hero__bubbles::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 62%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent);
}
.hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent, var(--accent) 22%, var(--accent) 78%, transparent);
  opacity: .9;
  z-index: 1;
}
.bubble {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 72% 70%, rgba(255, 150, 200, .12), transparent 46%),
    radial-gradient(circle at 28% 74%, rgba(120, 215, 255, .16), transparent 48%),
    radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, .05) 0%,
      rgba(255, 255, 255, .02) 66%,
      rgba(255, 255, 255, .20) 87%,
      rgba(255, 255, 255, .46) 96%,
      rgba(255, 255, 255, 0) 100%);
  animation: float 9s ease-in-out infinite;
}
.bubble::before {
  content: '';
  position: absolute;
  inset-inline-start: 19%;
  inset-block-start: 15%;
  width: 26%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .58), rgba(255, 255, 255, 0) 72%);
  transform: rotate(-24deg);
}
.bubble--1 { width: 74px; height: 74px; inset-block-start: -22px; inset-inline-start: 8%;  animation-delay: -.4s; }
.bubble--2 { width: 34px; height: 34px; inset-block-start: 58px;  inset-inline-start: 24%; animation-delay: -2.2s; }
.bubble--3 { width: 96px; height: 96px; inset-block-start: 44px;  inset-inline-end: 6%;    animation-delay: -1.2s; }
.bubble--4 { width: 22px; height: 22px; inset-block-start: 22px;  inset-inline-end: 27%;   animation-delay: -3.4s; }
.bubble--5 { width: 48px; height: 48px; inset-block-end: -16px;   inset-inline-start: 42%; animation-delay: -2.8s; }
.bubble--6 { width: 16px; height: 16px; inset-block-start: 84px;  inset-inline-start: 12%; animation-delay: -1.8s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* plaque du logo — elle flotte au-dessus du bandeau */
.hero__plate {
  position: absolute;
  z-index: 2;
  inset-block-end: -46px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 216px;
  height: 118px;
  padding: 16px 22px;
  background: linear-gradient(160deg, #ffffff 0%, #fdfdff 52%, #f4f5fc 100%);
  border-radius: var(--radius-xl);
  box-shadow:
    0 1px 1px rgba(23, 18, 58, .06),
    0 10px 20px -10px rgba(23, 18, 58, .28),
    0 26px 48px -22px rgba(23, 18, 58, .5),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  overflow: hidden;
  animation: plate 7s ease-in-out infinite;
}
:root[dir="rtl"] .hero__plate { transform: translateX(50%); }
@keyframes plate {
  0%, 100% { margin-block-start: 0; }
  50%      { margin-block-start: -5px; }
}
/* reflet qui balaie la plaque */
.hero__sheen {
  position: absolute;
  inset-block: -60%;
  inset-inline-start: -40%;
  width: 42%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: rotate(14deg);
  animation: sheen 6.5s ease-in-out 1.4s infinite;
}
@keyframes sheen {
  0%, 62%  { inset-inline-start: -45%; }
  92%, 100% { inset-inline-start: 125%; }
}
.logo { position: relative; width: 100%; height: auto; }

.card__body { padding: 66px 18px 24px; }

/* --- intro ---------------------------------------------------------------- */
.intro { text-align: center; margin-bottom: 24px; }
.welcome {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 4px 13px 5px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(227, 6, 19, .07);
  border-radius: var(--radius-pill);
}
.welcome::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(227, 6, 19, .55);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(227, 6, 19, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(227, 6, 19, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 6, 19, 0); }
}
:root[lang="ar"] .welcome { letter-spacing: 0; text-transform: none; font-size: .8rem; }

.tagline {
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -.01em;
  color: var(--text);
}
:root[lang="ar"] .tagline { letter-spacing: 0; font-size: 1.3rem; }

/* --- titre-filet ---------------------------------------------------------- */
.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.rule::before, .rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.rule--muted { justify-content: center; margin-bottom: 12px; }
:root[lang="ar"] .rule { letter-spacing: 0; text-transform: none; font-size: .82rem; }

/* --- liste des applications ----------------------------------------------- */
.apps { display: flex; flex-direction: column; gap: 9px; }

.app {
  --tint: var(--primary);
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  background: linear-gradient(160deg, #fbfcff, #f4f6fd);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease),
              border-color .32s var(--ease), background .32s var(--ease);
}
a.app:hover, a.app:focus-visible {
  background: linear-gradient(160deg, #fff, color-mix(in srgb, var(--tint) 6%, #fff));
  border-color: color-mix(in srgb, var(--tint) 30%, var(--border));
  box-shadow: 0 10px 18px -12px color-mix(in srgb, var(--tint) 60%, transparent),
              0 24px 40px -26px color-mix(in srgb, var(--tint) 90%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateY(-3px);
  outline: none;
}
a.app:active { transform: translateY(-1px) scale(.99); }

/* pastille d'icône en relief */
.app__icon {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  color: #fff;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--tint) 62%, #fff) 0%,
    var(--tint) 52%,
    color-mix(in srgb, var(--tint) 78%, #000) 100%);
  border-radius: 16px;
  box-shadow:
    0 2px 4px -1px color-mix(in srgb, var(--tint) 55%, transparent),
    0 10px 18px -10px color-mix(in srgb, var(--tint) 95%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(0, 0, 0, .18);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
}
/* reflet vitré sur la moitié haute */
.app__icon::after {
  content: '';
  position: absolute;
  inset: 1px 1px 52%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .04));
  border-radius: 15px 15px 46% 46%;
}
a.app:hover .app__icon {
  transform: translateY(-1px) scale(1.07) rotate(-2deg);
  box-shadow:
    0 3px 6px -1px color-mix(in srgb, var(--tint) 55%, transparent),
    0 16px 26px -12px color-mix(in srgb, var(--tint) 95%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(0, 0, 0, .18);
}
.app__icon svg { position: relative; width: 23px; height: 23px; }

.app__body { flex: 1; min-width: 0; }
.app__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -.01em;
}
:root[lang="ar"] .app__name { letter-spacing: 0; }
.app__desc {
  font-size: .805rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app__chevron {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  color: #c8c7dd;
  transition: transform .32s var(--ease), color .32s var(--ease);
}
:root[dir="rtl"] .app__chevron { transform: scaleX(-1); }
a.app:hover .app__chevron { color: var(--tint); transform: translateX(3px); }
:root[dir="rtl"] a.app:hover .app__chevron { transform: scaleX(-1) translateX(3px); }

/* état « bientôt » */
.app--soon {
  background: rgba(252, 252, 254, .7);
  border-style: dashed;
  box-shadow: none;
}
.app--soon .app__icon {
  color: #a9a8c4;
  background: linear-gradient(150deg, #f6f7fc, #e7e9f3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
              inset 0 -2px 6px rgba(90, 90, 130, .10);
}
.app--soon .app__icon::after { display: none; }
.app--soon .app__name { color: #6e6c92; }
.app--soon .app__desc { color: var(--text-faint); }
.badge {
  padding: 2px 9px 3px;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
:root[lang="ar"] .badge { letter-spacing: 0; text-transform: none; font-size: .7rem; }

/* --- marques -------------------------------------------------------------- */
.brands__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 94px;
  padding: 14px 16px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .82));
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgba(35, 28, 99, .05),
    0 12px 24px -18px rgba(35, 28, 99, .45),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.brand:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(35, 28, 99, .06),
    0 24px 40px -22px rgba(35, 28, 99, .5),
    inset 0 1px 0 rgba(255, 255, 255, .95);
}
.brand img {
  width: auto; height: auto;
  max-width: calc(100% * var(--scale, 1));
  max-height: calc(100% * var(--scale, 1));
  object-fit: contain;
}
.brand__text {
  display: none;
  font-size: .9rem;
  font-weight: 900;
  color: var(--brand-color, var(--primary));
}
.brand.is-fallback img { display: none; }
.brand.is-fallback .brand__text { display: block; }

/* --- pied de page --------------------------------------------------------- */
.footer {
  display: flex;
  justify-content: center;
  padding-block-start: 18px;
  border-block-start: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 -1px 0 rgba(49, 39, 131, .06);
}

.credit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
}
.credit a {
  position: relative;
  font-weight: 900;
  color: var(--primary);
  transition: color .3s var(--ease);
}
.credit a::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: -2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.credit a:hover { color: var(--accent); }
.credit a:hover::after { transform: scaleX(1); }

/* --- animations d'entrée -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  animation: rise .8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.apps > li {
  opacity: 0;
  transform: translateY(12px);
  animation: rise .6s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .apps > li, .bubble, .orb, .hero__plate, .hero__sheen, .welcome::before {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero__sheen { display: none; }
  * { transition-duration: .01ms !important; }
}

/* --- écrans plus larges --------------------------------------------------- */
@media (min-width: 560px) {
  .page { padding-block: 32px 40px; gap: 30px; }
  .hero { height: 148px; }
  .hero__plate { width: 240px; height: 128px; inset-block-end: -50px; }
  .card__body { padding: 74px 26px 28px; }
  .tagline { font-size: 1.32rem; }
  :root[lang="ar"] .tagline { font-size: 1.42rem; }
  .app { padding: 14px 15px; }
  .brands__list { grid-template-columns: repeat(4, 1fr); }
  .brand { height: 88px; padding: 12px 14px; }
}

@media (max-width: 360px) {
  .app__desc { white-space: normal; }
  .langbar button { padding: 8px 13px; font-size: .78rem; }
}
