/* WEB — déclinaison rose du système visuel PRINT / CHARTE */

:root {
  --section-color: #ff18cf;
  --section-rgb: 255 24 207;
}

body[data-page="web"] .liquid,
body[data-page="web"] .cherry {
  fill: var(--section-color);
}

body[data-page="web"] .brand {
  color: var(--section-color);
  background: none;
  -webkit-text-fill-color: var(--section-color);
  text-shadow: 0 0 6px rgb(var(--section-rgb) / .55), 0 0 15px rgb(var(--section-rgb) / .24);
}

body[data-page="web"] .brand-role,
body[data-page="web"] .brand-separator {
  color: var(--section-color);
  -webkit-text-fill-color: var(--section-color);
  text-shadow: 0 0 6px rgb(var(--section-rgb) / .55), 0 0 15px rgb(var(--section-rgb) / .24);
}

body[data-page="web"] .print-heading-sign > div > span {
  background: var(--yellow);
  box-shadow: 4px 4px 0 rgba(255, 24, 207, .46), 0 0 12px rgba(255, 242, 0, .24);
}

body[data-page="web"] .print-heading h1 {
  letter-spacing: .04em;
}

body[data-page="web"] .print-heading-icon rect,
body[data-page="web"] .print-heading-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="web"] .print-heading-icon .icon-thin {
  stroke-width: 2.6;
  opacity: .78;
}

.js body[data-page="web"] .print-heading-icon rect {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
}

.js body[data-page="web"].strip-ready .print-heading-icon rect {
  animation: printIconDraw .88s cubic-bezier(.16, 1, .3, 1) .74s both;
}

body[data-page="web"] .page-transition {
  background:
    radial-gradient(circle at 43% 46%, rgba(255, 24, 207, .17), transparent 27%),
    radial-gradient(circle at 58% 57%, rgba(139, 45, 255, .14), transparent 31%),
    #020512;
}

body[data-page="web"] .page-transition::before,
body[data-page="web"] .page-transition::after {
  background: linear-gradient(90deg, transparent, #ff18cf, #8b2dff, #ff18cf, transparent);
  box-shadow: 0 0 12px rgba(255, 24, 207, .5), 0 0 20px rgba(139, 45, 255, .24);
}

body[data-page="web"] .web-shell {
  background:
    linear-gradient(#020714, #020714) padding-box,
    conic-gradient(from var(--screen-angle), #ff18cf, #8b2dff 22%, #ff18cf 43%, #b356ff 64%, #ff18cf 82%, #8b2dff) border-box;
}

body[data-page="web"] .web-shell::before {
  background: conic-gradient(from var(--screen-angle), #ff18cf, transparent 16%, #8b2dff, transparent 38%, #ff18cf, transparent 61%, #a64dff, transparent 82%, #ff18cf);
}

body[data-page="web"] .web-strip {
  overflow: hidden;
  background: #050a18;
}

body[data-page="web"] #printGallery > .print-row {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
}

body[data-page="web"] #printGallery > .print-row + .print-row {
  margin-top: -1px !important;
}

body[data-page="web"] #printGallery img {
  display: block;
  max-width: none;
  margin: 0;
}

.web-chapter-label,
.web-section-label {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 0;
  padding: clamp(26px, 4vw, 50px) 18px clamp(22px, 3.4vw, 42px);
  color: #fffaf4;
  background:
    linear-gradient(90deg, transparent, rgb(var(--section-rgb) / .15) 50%, transparent),
    #07112b;
  border-block: 1px solid rgb(var(--section-rgb) / .34);
  text-align: center;
}

.web-chapter-label span,
.web-section-label span {
  color: #ffb0eb;
  font-size: clamp(.56rem, .9vw, .74rem);
  font-weight: 950;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.web-chapter-label strong,
.web-section-label strong {
  color: var(--section-color);
  font-family: var(--display);
  font-size: clamp(2.25rem, 5.5vw, 5rem);
  font-weight: 950;
  letter-spacing: .025em;
  line-height: .82;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgb(var(--section-rgb) / .46), 0 0 28px rgb(var(--section-rgb) / .2);
}

.web-section-label::after {
  content: "";
  width: clamp(58px, 8vw, 96px);
  height: 3px;
  margin-top: 8px;
  background: var(--section-color);
  box-shadow: 0 0 10px rgb(var(--section-rgb) / .72);
}

.web-live {
  scroll-margin-top: 100px;
  background: #050a18;
}

.web-window-bar,
.web-game-head {
  position: relative;
  z-index: 4;
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  color: #fffaf4;
  background:
    linear-gradient(90deg, rgb(var(--section-rgb) / .11), transparent 42%),
    #081126;
  border-bottom: 1px solid rgb(var(--section-rgb) / .4);
}

.web-window-bar {
  grid-template-columns: 1fr;
  padding: 8px;
}

.web-window-bar > strong,
.web-game-head > strong {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  letter-spacing: .04em;
  line-height: .86;
  text-transform: uppercase;
}

.web-window-dots {
  display: flex;
  gap: 6px;
}

.web-window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--section-color);
  box-shadow: 0 0 7px rgb(var(--section-rgb) / .6);
}

.web-window-dots i:nth-child(2) { opacity: .62; }
.web-window-dots i:nth-child(3) { opacity: .28; }

.web-open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgb(var(--section-rgb) / .65);
  border-radius: 3px;
  color: var(--section-color);
  background: rgb(var(--section-rgb) / .06);
  font-size: .57rem;
  font-weight: 950;
  letter-spacing: .13em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  animation: webActionSignal 2.8s ease-in-out infinite;
}

.web-open-wide {
  width: 100%;
  min-height: 42px;
  font-size: .63rem;
  letter-spacing: .17em;
}

.web-open-link:hover,
.web-open-link:focus-visible {
  color: #07112b;
  background: var(--section-color);
  box-shadow: 0 0 17px rgb(var(--section-rgb) / .42);
  outline: none;
  animation-play-state: paused;
}

@keyframes webActionSignal {
  0%, 100% {
    border-color: rgba(255, 24, 207, .58);
    box-shadow: inset 0 0 10px rgba(255, 24, 207, .04), 0 0 8px rgba(255, 24, 207, .12);
    transform: translateY(0);
  }
  50% {
    border-color: rgba(184, 81, 255, .92);
    box-shadow: inset 0 0 15px rgba(139, 45, 255, .1), 0 0 16px rgba(255, 24, 207, .3);
    transform: translateY(-1px);
  }
}

.web-browser-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(rgb(var(--section-rgb) / .12) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgb(var(--section-rgb) / .1) 1px, transparent 1px) 0 0 / 34px 100%,
    #050a18;
}

.web-browser-frame iframe,
.web-game-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.js .web-live:not(.in-view) .web-browser-frame iframe {
  opacity: .06;
  clip-path: inset(49.5% 0);
  filter: brightness(.08) saturate(.2);
}

.js .web-live.in-view .web-browser-frame iframe {
  animation: webScreenBoot 1.4s linear both;
}

@keyframes webScreenBoot {
  0%, 10% { opacity: .04; clip-path: inset(49.6% 0); filter: brightness(.04) saturate(.15); transform: scaleX(.88); }
  11%, 20% { opacity: 1; clip-path: inset(48.7% 0); filter: brightness(2.7) saturate(.3); transform: scaleX(1.025); }
  21%, 30% { opacity: .1; clip-path: inset(49.4% 0); filter: brightness(.12); }
  31%, 52% { opacity: 1; clip-path: inset(22% 0); filter: brightness(1.45) saturate(.78); transform: scaleX(1); }
  53%, 61% { opacity: .35; clip-path: inset(31% 0); filter: brightness(.38); }
  62%, 82% { opacity: 1; clip-path: inset(2% 0); filter: brightness(1.12); }
  100% { opacity: 1; clip-path: inset(0); filter: none; transform: none; }
}

.web-reader {
  border-top: 1px solid rgb(var(--section-rgb) / .34);
  background: #07112b;
}

.web-reader .reader-page {
  background: #050a18;
}

.web-reader-desktop .reader-page { aspect-ratio: 16 / 10; }
.web-reader-mobile .reader-page { aspect-ratio: 4 / 5; }

body[data-page="web"] .web-reader .reader-page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.web-reader-tag {
  position: absolute;
  z-index: 8;
  top: 13px;
  left: 14px;
  padding: 6px 9px 5px;
  border: 1px solid rgb(var(--section-rgb) / .56);
  color: var(--section-color);
  background: rgba(7, 17, 43, .82);
  box-shadow: 0 0 12px rgb(var(--section-rgb) / .2);
  font-size: .5rem;
  font-weight: 950;
  letter-spacing: .17em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.web-banners {
  display: grid;
  gap: 0;
  background: #f4f4f2;
}

body[data-page="web"] .web-banners img {
  width: 100%;
  height: auto;
}

body[data-page="web"] .web-banners img + img {
  margin-top: -1px;
}

.web-games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: rgb(var(--section-rgb) / .42);
}

.web-game-card {
  min-width: 0;
  background: #07112b;
}

.web-game-head {
  grid-template-columns: 1fr auto;
  min-height: 58px;
}

.web-game-cocktail .web-game-head > strong { color: #29ff63; }
.web-game-blackjack .web-game-head > strong { color: #fff200; }

.web-game-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #030718;
}

.web-game-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgb(var(--section-rgb) / .24);
  box-shadow: inset 0 0 34px rgba(3, 7, 24, .28);
}

.web-game-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.96) contrast(1.03);
  transition: filter .45s ease, transform .65s cubic-bezier(.2, .8, .2, 1);
}

.web-game-card:hover .web-game-preview img {
  filter: saturate(1.06) contrast(1.06) brightness(1.04);
  transform: scale(1.012);
}

.web-game-poster {
  position: relative;
  isolation: isolate;
  min-height: clamp(260px, 34vw, 440px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  overflow: hidden;
  color: var(--game-color);
  background:
    linear-gradient(rgb(var(--section-rgb) / .08) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgb(var(--section-rgb) / .08) 1px, transparent 1px) 0 0 / 34px 100%,
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--game-color) 22%, transparent), transparent 42%),
    #030718;
  text-align: center;
}

.web-game-poster::before,
.web-game-poster::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.web-game-poster::before {
  width: min(76%, 390px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--game-color) 50%, transparent);
  border-radius: 50%;
  box-shadow:
    inset 0 0 42px color-mix(in srgb, var(--game-color) 8%, transparent),
    0 0 34px color-mix(in srgb, var(--game-color) 16%, transparent);
}

.web-game-poster::after {
  inset: auto 8% 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--game-color), transparent);
  box-shadow: 0 0 12px var(--game-color);
  opacity: .72;
}

.web-game-poster-cocktail { --game-color: #29ff63; }
.web-game-poster-blackjack { --game-color: #fff200; }

.web-game-orbit {
  position: absolute;
  width: min(56%, 290px);
  aspect-ratio: 1;
  border: 1px dashed color-mix(in srgb, var(--game-color) 44%, transparent);
  border-radius: 50%;
  animation: webGameOrbit 18s linear infinite;
}

.web-game-symbol {
  min-width: 70px;
  min-height: 70px;
  display: grid;
  place-items: center;
  padding: 9px;
  border: 1px solid currentColor;
  border-radius: 18px;
  color: var(--game-color);
  background: rgba(3, 7, 24, .88);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--game-color) 11%, transparent), 0 0 22px color-mix(in srgb, var(--game-color) 32%, transparent);
  font-size: 1.25rem;
  font-weight: 950;
}

.web-game-poster strong {
  color: #fffaf4;
  font-family: var(--display);
  font-size: clamp(2.35rem, 5.2vw, 4.8rem);
  line-height: .9;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow: 0 0 15px color-mix(in srgb, var(--game-color) 54%, transparent);
}

.web-game-poster small {
  color: var(--game-color);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

@keyframes webGameOrbit {
  to { transform: rotate(1turn); }
}

.web-game-card iframe {
  aspect-ratio: 16 / 11;
  height: auto;
  background: #030718;
}

body[data-page="web"] .data-trace::after {
  background: linear-gradient(90deg, transparent, #ffe1f8 18%, var(--section-color) 48%, #fff1fc 72%, transparent);
}

body[data-page="web"] .trace-vertical::after {
  background: linear-gradient(180deg, transparent, #ffe1f8 18%, var(--section-color) 48%, #fff1fc 72%, transparent);
}

body[data-page="web"] .project-menu-link .menu-spectrum-stroke { stroke: url(#projectMenuSpectrumWeb); }
body[data-page="web"] .project-menu-link .menu-spectrum-fill { fill: url(#projectMenuSpectrumWeb); }
body[data-page="web"] .leaf-cocktail-icon .leaf-spectrum-stroke { stroke: url(#leafMenuSpectrumWeb); }
body[data-page="web"] .leaf-cocktail-icon .leaf-spectrum-fill { fill: url(#leafMenuSpectrumWeb); }

body[data-page="web"] .leaf-nav .leaf-menu-entry[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, #081126);
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--accent) 8%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 22%, transparent);
}

body[data-page="web"] .leaf-nav .leaf-menu-entry[aria-current="page"] .leaf-service-icon {
  transform: translateY(-1px) rotate(-2deg) scale(1.045);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 72%, transparent));
}

body[data-page="web"] .leaf-nav .leaf-menu-entry[aria-current="page"] > i {
  color: #081126;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 55%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  body[data-page="web"],
  body[data-page="web"] * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M3 2 20 14l-8 2 4 8-4 2-4-8-5 6Z' fill='%23ff18cf' stroke='%23fffaf4' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, auto !important;
  }
}

@media (max-width: 900px) {
  .web-games { grid-template-columns: 1fr; }
  .web-game-card iframe { aspect-ratio: 16 / 10; }
  .web-game-poster { min-height: clamp(250px, 64vw, 390px); }
  .web-game-preview { aspect-ratio: 16 / 9.6; }
}

@media (max-width: 800px) {
  body[data-page="web"] .print-heading h1 { font-size: clamp(5.4rem, 26vw, 7.4rem); }

  .web-chapter-label,
  .web-section-label {
    gap: 7px;
    padding: 22px 12px 19px;
  }

  .web-chapter-label strong,
  .web-section-label strong {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .web-browser-frame { aspect-ratio: 4 / 3; }

  .web-window-bar,
  .web-game-head {
    min-height: 50px;
    padding: 7px 9px;
  }

  .web-open-link {
    min-height: 32px;
    padding-inline: 8px;
    font-size: .5rem;
    letter-spacing: .08em;
  }

  .web-reader-desktop .reader-page { aspect-ratio: 4 / 3; }
  .web-reader-mobile .reader-page { aspect-ratio: 3 / 4; }
}

@media (max-width: 520px) {
  .web-window-dots { display: none; }
  .web-browser-frame { aspect-ratio: 1 / 1; }
  .web-reader-tag { top: 8px; left: 8px; font-size: .42rem; }
  .web-game-head { grid-template-columns: 1fr; gap: 8px; align-items: start; }
  .web-game-head .web-open-link { justify-self: start; }
  .web-game-card iframe { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="web"] .web-shell,
  body[data-page="web"] .web-shell::before,
  .js .web-live.in-view .web-browser-frame iframe,
  .web-open-link {
    animation: none !important;
  }

  .js .web-live .web-browser-frame iframe {
    opacity: 1;
    clip-path: none;
    filter: none;
    transform: none;
  }
}

/* Phase 1 : les applications restent remplacées par un aperçu léger tant que
   leur fenêtre n’approche pas réellement de la zone de lecture. */
.web-frame-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.web-game-frame {
  width: 100%;
  aspect-ratio: 16 / 11;
  background: #030718;
}

.web-game-card .web-game-frame iframe {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.web-frame-shell iframe {
  transition: opacity .22s ease;
}

.web-frame-shell:not(.is-loaded) iframe {
  opacity: 0 !important;
  pointer-events: none;
}

.web-frame-placeholder {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px;
  color: #fffaf4;
  background:
    linear-gradient(rgb(var(--section-rgb) / .12) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgb(var(--section-rgb) / .1) 1px, transparent 1px) 0 0 / 34px 100%,
    radial-gradient(circle at 50% 48%, rgb(var(--section-rgb) / .18), transparent 58%),
    #030718;
  text-align: center;
  transition: opacity .2s ease, visibility .2s ease;
}

.web-frame-placeholder strong {
  color: currentColor;
  font-size: clamp(1.1rem, 3.4vw, 2.25rem);
  font-weight: 950;
  letter-spacing: .06em;
  line-height: .95;
  text-transform: uppercase;
  text-shadow: 0 0 14px currentColor;
}

.web-frame-mark {
  display: grid;
  min-width: 58px;
  min-height: 58px;
  place-items: center;
  padding: 8px;
  border: 1px solid currentColor;
  border-radius: 14px;
  color: var(--section-color);
  background: rgba(7, 17, 43, .82);
  box-shadow: inset 0 0 18px rgb(var(--section-rgb) / .12), 0 0 18px rgb(var(--section-rgb) / .26);
  font-size: 1.1rem;
  font-weight: 950;
  letter-spacing: .06em;
}

.web-frame-cocktail .web-frame-mark { color: #29ff63; }
.web-frame-blackjack .web-frame-mark { color: #fff200; }
.web-frame-mci .web-frame-mark { color: var(--section-color); }

.web-frame-load {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--section-color);
  background: #07112b;
  font: inherit;
  font-size: .53rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.web-frame-load:hover,
.web-frame-load:focus-visible {
  color: #07112b;
  background: var(--section-color);
  box-shadow: 0 0 17px rgb(var(--section-rgb) / .42);
  outline: none;
}

.web-frame-shell.is-loading .web-frame-load {
  opacity: .46;
  pointer-events: none;
}

.web-frame-shell.is-loaded .web-frame-placeholder {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .web-game-frame { aspect-ratio: 16 / 10; }
}

@media (max-width: 520px) {
  .web-game-frame { aspect-ratio: 4 / 3; }
  .web-frame-cocktail {
    height: min(660px, 158vw);
    min-height: 540px;
    aspect-ratio: auto;
  }
  .web-frame-placeholder { gap: 9px; padding: 14px; }
  .web-frame-mark { min-width: 48px; min-height: 48px; }
  .web-game-poster {
    min-height: 250px;
  }
  .web-game-symbol {
    min-width: 58px;
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .web-frame-shell iframe,
  .web-frame-placeholder { transition: none !important; }
  .web-game-orbit { animation: none !important; }
}

/* Le cahier des charges garde le curseur rose de la page WEB. */
@media (hover: hover) and (pointer: fine) {
  body[data-page="web"] .web-reader,
  body[data-page="web"] .web-reader *,
  body[data-page="web"] .reader-stage,
  body[data-page="web"] .reader-controls,
  body[data-page="web"] .reader-range {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M3 2 20 14l-8 2 4 8-4 2-4-8-5 6Z' fill='%23ff18cf' stroke='%23fffaf4' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 3 2, auto !important;
  }
}
