/* =====================================================================
   Le Géant Sportif brand layer (colours sampled from the official logo):
   blue #3C64A2 · red #E2262F · Algerian green #00612E · white
   Loaded after styles.css on the Le Géant Sportif pages only.
   ===================================================================== */

.lgs {
  --lgs-blue: #3c64a2;
  --lgs-blue-600: #2f5390;
  --lgs-blue-800: #1a3466;
  --lgs-blue-900: #0f2347;
  --lgs-blue-50: #edf2fa;
  --lgs-red: #e2262f;
  --lgs-red-600: #c41d26;
  --lgs-green: #00612e;
  /* Re-map the shared navy tokens to the brand blues (header, bubbles, launcher…) */
  --navy-950: var(--lgs-blue-900);
  --navy-900: var(--lgs-blue-800);
  --navy-800: var(--lgs-blue-600);
  --navy-700: var(--lgs-blue);
}
.lgs :focus-visible { outline-color: rgba(60, 100, 162, .55); }
body.lgs { overflow-x: clip; } /* safety net: decorative stripes/ticker never widen the page */

/* ---------- Logo (cropped from the square source image) ---------- */
.lgs-logo { display: inline-flex; align-items: center; text-decoration: none; }
.lgs-logo__img {
  display: block; width: 190px; aspect-ratio: 1746 / 536;
  background: url("brand/legeant-logo.jpg") 49.6% 49.45% / 114.5% auto no-repeat;
}

/* ---------- Buttons ---------- */
.btn--red { background: var(--lgs-red); color: #fff; box-shadow: 0 10px 24px rgba(226, 38, 47, .35); }
.btn--red:hover { background: var(--lgs-red-600); }
.lgs .btn--primary { background: var(--lgs-red); box-shadow: 0 8px 20px rgba(226, 38, 47, .3); }
.lgs .btn--primary:hover { background: var(--lgs-red-600); }
.lgs .sendbtn { background: var(--lgs-red); }
.lgs .sendbtn:hover { background: var(--lgs-red-600); }
.lgs .chip:hover { border-color: var(--lgs-blue); color: var(--lgs-blue-800); background: var(--lgs-blue-50); }
.lgs .launcher { background: linear-gradient(135deg, var(--lgs-blue), var(--lgs-blue-800)); }
.lgs .launcher__icon { color: #fff; }
.lgs .launcher::after { border-color: rgba(226, 38, 47, .6); }
.lgs .field input:focus, .lgs .field textarea:focus, .lgs .widget__composer textarea:focus { border-color: var(--lgs-blue); box-shadow: 0 0 0 3px rgba(60, 100, 162, .18); }
.lgs .consent input { accent-color: var(--lgs-red); }
.lgs .bubble li::before { background: var(--lgs-red); }
.lgs .msg--visitor .bubble li::before { background: #fff; }
.widget__avatar--lgs { background: #fff; border: 0; position: relative; }
.widget__avatar--lgs span { font: 900 26px/1 Georgia, "Times New Roman", serif; color: var(--lgs-blue); }
.widget__avatar--lgs::after { content: ""; position: absolute; inset-block-start: 6px; inset-inline-end: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--lgs-red); }
.bubble--partial { border-inline-start: 4px solid var(--lgs-blue, #3c64a2) !important; }
.metachip--partial { background: #fff4d6; color: #7a4d00; }

/* ---------- Top bar ---------- */
.lgs-topbar .topbar__inner { min-height: 74px; }
.lgs .nav a, .lgs .topbar__actions .btn { white-space: nowrap; }
@media (max-width: 1240px) { .lgs .nav { display: none; } }
.lgs .nav a:hover { color: var(--lgs-red); }

/* ---------- Ticker ---------- */
.ticker { display: flex; align-items: stretch; background: var(--lgs-red); color: #fff; font-weight: 700; font-size: 14px; overflow: hidden; position: relative; z-index: 2; }
.ticker__badge { flex: none; display: flex; align-items: center; padding: 9px 16px; background: var(--lgs-blue-800); font-style: italic; letter-spacing: .02em; white-space: nowrap; direction: ltr; }
.ticker__viewport { flex: 1; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: flex; width: max-content; animation: tick 32s linear infinite; }
html[dir="rtl"] .ticker__track { animation-name: tick-rtl; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group { display: flex; align-items: center; }
.ticker__item { padding-inline: 18px; white-space: nowrap; }
.ticker__dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0, 97, 46, .9); flex: none; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tick-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- Hero ---------- */
.lgs-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--lgs-blue-800) 0%, var(--lgs-blue) 55%, #4f78b8 100%); }
.lgs-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.lgs-hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.stripe { position: absolute; inset-inline-start: -10%; width: 130%; height: 26px; transform: rotate(-6deg); opacity: .9; animation: stripe 9s ease-in-out infinite; }
.stripe--red { bottom: 64px; background: var(--lgs-red); }
.stripe--green { bottom: 36px; background: var(--lgs-green); animation-delay: -3s; }
.stripe--white { bottom: 8px; background: #fff; opacity: .85; animation-delay: -6s; }
html[dir="rtl"] .stripe { transform: rotate(6deg); }
@keyframes stripe { 0%, 100% { translate: 0 0; } 50% { translate: 3% -6px; } }

.floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; width: 44px; height: 44px; color: rgba(255, 255, 255, .22); animation: drift 12s ease-in-out infinite; }
.floater.f1 { top: 12%; inset-inline-start: 6%; width: 56px; height: 56px; }
.floater.f2 { top: 66%; inset-inline-start: 44%; animation-delay: -2s; }
.floater.f3 { top: 18%; inset-inline-start: 48%; width: 34px; height: 34px; animation-delay: -4s; }
.floater.f4 { top: 74%; inset-inline-start: 4%; animation-delay: -6s; }
.floater.f5 { top: 8%; inset-inline-end: 4%; width: 36px; height: 36px; animation-delay: -8s; }
.floater.f6 { top: 46%; inset-inline-end: 46%; width: 28px; height: 28px; animation-delay: -10s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(10px, -14px) rotate(12deg); }
  66% { transform: translate(-8px, 8px) rotate(-8deg); }
}

.lgs-hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-block: 64px 120px; }
.lgs-hero .eyebrow { color: #fff; background: rgba(255, 255, 255, .12); padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); }
.lgs-hero .eyebrow .dot { background: var(--lgs-red); box-shadow: 0 0 0 4px rgba(226, 38, 47, .3); animation: blinkdot 1.6s ease-in-out infinite; }
@keyframes blinkdot { 50% { opacity: .35; } }
.lgs-hero h1 { font-size: clamp(32px, 4.3vw, 54px); font-weight: 900; text-shadow: 0 2px 18px rgba(15, 35, 71, .35); }
.lgs-hero .lead { color: rgba(255, 255, 255, .85); }
.lgs-hero .hero__stats dt .ic { color: #fff; }
.lgs-hero .hero__stats { border-color: rgba(255, 255, 255, .2); }

/* QR card */
.qrcard {
  position: relative; background: #fff; color: var(--ink); border-radius: 24px; padding: 22px 24px 20px;
  box-shadow: 0 30px 70px rgba(10, 25, 55, .45); text-align: center; max-width: 360px; justify-self: center;
  border-block-start: 6px solid var(--lgs-red);
  animation: cardfloat 7s ease-in-out infinite;
}
@keyframes cardfloat { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
.qrcard__logo { display: flex; justify-content: center; margin-block-end: 8px; }
.qrcard__logo .lgs-logo__img { width: 170px; }
.qrcard__code { position: relative; width: 220px; margin: 6px auto 14px; }
.qrcard__ring { position: absolute; inset: -10px; border-radius: 22px; border: 3px solid var(--lgs-red); animation: ringpulse 2.2s ease-out infinite; }
@keyframes ringpulse { 0% { opacity: .9; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.1); } }
.qrbox { position: relative; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.qrbox svg { display: block; width: 100%; height: auto; }
.qrbox__placeholder { aspect-ratio: 1; display: grid; place-items: center; color: #cbd5e1; }
.qrbox__placeholder .ic { width: 60%; height: 60%; }
.qrcard h2 { font-size: 18px; margin-block-end: 6px; }
.qrcard p { font-size: 14px; }
.qrstatus { margin-block-start: 10px; font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 10px; }
.qrstatus:empty { display: none; }
.qrstatus--ok { background: #e7f6ee; color: var(--lgs-green); }
.qrstatus--warn { background: #fff7e6; color: #8a4b00; }

/* ---------- Section titles ---------- */
.lgs-title { display: flex; align-items: center; gap: 12px; }
.lgs-title__bar { width: 8px; height: 30px; border-radius: 3px; background: linear-gradient(180deg, var(--lgs-red) 0 50%, var(--lgs-green) 50% 100%); flex: none; }

/* ---------- Platform cards ---------- */
.lgs .feature__icon { background: var(--lgs-blue-50); color: var(--lgs-blue); }
.lgs-card { position: relative; overflow: hidden; }
.lgs-card::before {
  content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 4px;
  background: linear-gradient(90deg, var(--lgs-blue), var(--lgs-red));
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
html[dir="rtl"] .lgs-card::before { transform-origin: right; }
.lgs-card:hover::before { transform: scaleX(1); }
.lgs-card:hover .feature__icon { background: var(--lgs-blue); color: #fff; transform: rotate(-6deg) scale(1.06); }
.lgs .feature__icon { transition: background-color .25s, color .25s, transform .25s; }
.soon {
  position: absolute; inset-block-start: 16px; inset-inline-end: 16px;
  padding: 3px 10px; border-radius: 999px; background: var(--lgs-red); color: #fff; font-size: 12px; font-weight: 800;
  animation: soonpulse 1.8s ease-in-out infinite;
}
@keyframes soonpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 38, 47, .45); } 50% { box-shadow: 0 0 0 8px rgba(226, 38, 47, 0); } }

/* ---------- AI section ---------- */
.lgs-ai { position: relative; overflow: hidden; background: var(--lgs-blue-900); color: #fff; }
.lgs-ai__glow {
  position: absolute; inset: -40%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(60, 100, 162, .55) 70%, rgba(226, 38, 47, .35) 80%, transparent 90%);
  animation: spin 18s linear infinite; filter: blur(60px); opacity: .7;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lgs-ai .container { position: relative; }
.lgs-ai__head { max-width: 720px; display: grid; gap: 12px; }
.lgs-ai__head p { color: rgba(255, 255, 255, .78); font-size: 17px; }
.lgs-ai__badge { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: 13px; }
.lgs-ai__card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); }
.lgs-ai__card:hover { border-color: rgba(255, 255, 255, .35); box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.lgs-ai__card h3 { color: #fff; }
.lgs-ai__card p { color: rgba(255, 255, 255, .72); }
.lgs-ai__card .feature__icon { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Footer ---------- */
.lgs-footer { position: relative; background: var(--lgs-blue-900); }
.footer__link { color: #fff; opacity: .75; text-underline-offset: 3px; font-size: 13px; }
.footer__link:hover { opacity: 1; }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Chat polish ---------- */
.chip--in { animation: chipin .35s cubic-bezier(.2, .8, .2, 1.2) both; }
@keyframes chipin { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.sysline--pop { animation: pop .45s cubic-bezier(.2, .9, .3, 1.4); background: #e7f6ee; color: var(--lgs-green, #00612e); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------- Full-screen QR page ---------- */
.qrpage { min-height: 100vh; display: flex; flex-direction: column; background: var(--lgs-blue-800); }
.qrstage { position: relative; flex: 1; display: grid; place-items: center; padding: 32px 16px 120px; overflow: hidden;
  background: linear-gradient(135deg, var(--lgs-blue-900) 0%, var(--lgs-blue) 60%, #4f78b8 100%); }
.qrstage__card {
  position: relative; width: min(560px, 100%); background: #fff; border-radius: 28px; padding: 26px 30px 24px;
  text-align: center; box-shadow: 0 40px 90px rgba(5, 15, 35, .5); border-block-start: 8px solid var(--lgs-red);
  display: grid; justify-items: center; gap: 10px; animation: msgin .5s ease-out;
}
.qrstage__top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; }
.qrstage__top .lgs-logo__img { width: 200px; }
.qrstage__card h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; color: var(--lgs-blue-800); }
.qrstage__code { position: relative; width: min(340px, 72vw); margin: 14px auto 8px; }
.qrcard__ring--2 { animation-delay: 1.1s; }
.qrstage__url { font-size: 13px; color: var(--muted); }
.qrstage__url code { font-size: 13px; background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; color: var(--ink); }
html[dir="rtl"] .qrstage__card .btn .ic { transform: scaleX(-1); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .lgs-hero__inner { grid-template-columns: 1fr; padding-block: 48px 110px; }
  .qrcard { max-width: 340px; }
}
@media (max-width: 640px) {
  .lgs-logo__img { width: 128px; }
  .lgs-topbar .topbar__inner { gap: 12px; }
  .lgs-topbar .topbar__actions .btn { display: none; } /* QR + dashboard links live elsewhere on phones */
  .ticker__badge { display: none; }
  .floater { display: none; }
  .qrcard { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* =====================================================================
   Brand v2 — "front page" identity from the logo.
   Blue and red are the brand colours; green appears ONLY inside the
   Algerian flag (flag cap, hero stripes, footer tricolour).
   ===================================================================== */
.lgs {
  --font: "Changa Variable", "Segoe UI", system-ui, Tahoma, Arial, sans-serif;
  --font-ar: "Changa Variable", "Segoe UI", Tahoma, Arial, sans-serif;
  /* Shared accent tokens re-pointed away from green */
  --green-500: var(--lgs-red);
  --green-400: #ff6b72;
  --green-50: var(--lgs-blue-50);
}
.lgs h1, .lgs h2, .lgs h3, .lgs .section__title { font-family: var(--font); font-weight: 800; }
.lgs .lgs-hero h1 { font-weight: 800; letter-spacing: -.015em; line-height: 1.05; }
html[lang="ar"] .lgs .lgs-hero h1 { letter-spacing: 0; line-height: 1.18; }

/* The red "SPORTIF" tab (square corners, one rounded corner) */
.redtab {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  background: var(--lgs-red); color: #fff; font-family: var(--font); font-weight: 700; font-size: 14px; line-height: 1;
  border-start-end-radius: 14px;
}
/* Section titles: red tab marker instead of the old red/green bar */
.lgs-title__bar { width: 10px; height: 26px; border-radius: 0; border-start-end-radius: 8px; background: var(--lgs-red); }

/* The tagline bar that ends with the Algerian flag (signature element) */
/* Brand lock-up as in the logo: the band always reads left to right and ends with the
   flag on the right, green hoist against the red band, whatever the page language.
   The flag keeps its true 3:2 shape and the full height of the band. */
.bandeau { direction: ltr; display: flex; align-items: stretch; height: 44px; overflow: hidden; border-end-end-radius: 18px; background: var(--lgs-red); box-shadow: 0 10px 24px rgba(18, 39, 77, .18); }
.bandeau__text { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; padding: 4px 18px; line-height: 1.2; background: var(--lgs-red); color: #fff; font-family: var(--font); font-weight: 600; font-size: 15px; }
/* Algerian flag, true 3:2 proportions (never cropped, never mirrored) */
.bandeau__flag { flex: none; height: 100%; width: auto; min-width: 0; aspect-ratio: 3 / 2; display: flex; }
@media (max-width: 480px) { .bandeau__text { font-size: 13px; padding: 4px 12px; line-height: 1.15; } }
.bandeau__flag svg { width: 100%; height: 100%; display: block; }
.bandeau--hero { position: relative; z-index: 3; margin-top: -24px; }
.bandeau--enter { transform-origin: left center; animation: bandeau-in .7s .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bandeau-in { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }

/* Ticker: white dots (no green) */
.ticker__dot { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }

/* Success states use blue */
.qrstatus--ok { background: var(--lgs-blue-50); color: var(--lgs-blue-800); }
.sysline--pop { background: var(--lgs-blue-50); color: var(--lgs-blue-800); }
.lgs .source { background: var(--lgs-blue-50); color: var(--lgs-blue-800); border-color: #c9d7ee; }
.lgs .source small { color: var(--lgs-blue); }

/* Buttons and the widget take the tab shape */
.lgs .btn--red, .lgs .btn--light { border-radius: 0; border-end-end-radius: 16px; }
.lgs .launcher { border-radius: 0; border-start-start-radius: 999px; border-end-start-radius: 999px; border-start-end-radius: 999px; border-end-end-radius: 6px; }
.lgs .widget__head { background: linear-gradient(160deg, var(--lgs-blue) 0%, var(--lgs-blue-800) 100%); border-block-end: 4px solid var(--lgs-red); }
.lgs .widget__id h2 { font-weight: 700; }
.lgs .msg--visitor .bubble { background: var(--lgs-blue); }
.lgs .chip { font-family: var(--font); }

/* Platform cards: red tab corner on hover instead of a gradient wash */
.lgs-card::before { background: var(--lgs-red); height: 5px; }
.lgs .lgs-card:hover .feature__icon { background: var(--lgs-red); }
.lgs .feature__icon { border-radius: 0; border-end-end-radius: 12px; }
.lgs .feature { border-radius: 0; border-end-end-radius: 18px; }

/* The flag now lives in the bandeau, so the hero's diagonal stripes go. */
.lgs-hero .stripe { display: none; }
.lgs-hero__inner { padding-block: 64px 72px; }

/* QR card */
.qrcard { border-radius: 0; border-end-end-radius: 26px; }
.qrstage__card { border-radius: 0; border-end-end-radius: 30px; }
