/* ==========================================================================
   GOONS - shared public site chrome: skip link, fixed nav, buttons, footer.
   Loaded by BOTH the marketing homepage (marketing.css) and the /play pages
   (play.css), so the header and logo are identical everywhere.
   Self-contained: owns the --play-* tokens it needs.
   ========================================================================== */

:root {
    --play-bg: #05050a;
    --play-surface-2: rgba(255, 255, 255, 0.055);
    --play-border: rgba(255, 255, 255, 0.09);
    --play-border-strong: rgba(255, 255, 255, 0.16);
    --play-text: #f2f4ff;
    --play-muted: rgba(232, 236, 255, 0.62);
    --play-faint: rgba(232, 236, 255, 0.42);
    --play-magenta: #ff2bd6;
    --play-cyan: #00e5ff;
    --play-lime: #6bff9e;
    --play-container: 1240px;
    --play-font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --play-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Roboto Mono', monospace;
    --accent: var(--play-cyan);
    --accent-soft: rgba(0, 229, 255, 0.14);
    --accent-glow: rgba(0, 229, 255, 0.38);
    --accent-line: rgba(0, 229, 255, 0.32);
}

/* marketing.css sets a Helvetica body font - the nav keeps its own. */
.play-skip,
.play-nav,
.play-btn {
    font-family: var(--play-font);
}

/* Buttons ---------------------------------------------------------------- */
.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.play-btn--primary {
    background: linear-gradient(102deg, var(--play-magenta), var(--play-cyan));
    color: #05050a;
    box-shadow: 0 14px 38px rgba(255, 43, 214, 0.3);
}

.play-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(0, 229, 255, 0.36);
}

.play-btn--ghost {
    background: var(--play-surface-2);
    border-color: var(--play-border-strong);
    color: var(--play-text);
}

.play-btn--ghost:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-line), 0 16px 40px rgba(0, 0, 0, 0.45);
}

.play-btn--accent {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent);
}

.play-btn--accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 32px var(--accent-glow);
}

/* ---------------------------------------------------------------------------
   Le chrome doit gagner sur `.play-page > *` (play.css), qui pose
   `position: relative; z-index: 1` sur tous les enfants directs du body.
   Cette regle a la MEME specificite que `.play-nav` : des que play.css est
   chargee apres cette feuille - ce que font toutes les pages - elle gagnait a
   l'anciennete et repassait le header en `position: relative`. Consequences :
   header dans le flux (plus fixe, et pousse de 20px par le lien d'evitement
   lui aussi repasse en relative), puis recouvert sur /login et /register par
   le backdrop `position: fixed` de `.auth-shell`, qui se retrouvait au-dessus
   a z-index egal. On monte donc la specificite : le chrome tient quel que soit
   l'ordre de chargement des feuilles.
   --------------------------------------------------------------------------- */
.play-page > .play-nav {
    position: fixed;
    z-index: 1000;
}

.play-page > .play-skip {
    position: absolute;
}

.play-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    border-radius: 0 0 12px 0;
    background: var(--play-cyan);
    color: #05050a;
    font-weight: 700;
}

.play-skip:focus { left: 0; }

.play-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--play-border);
    background: rgba(5, 5, 10, 0.72);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.play-nav-inner {
    max-width: var(--play-container);
    margin: 0 auto;
    padding: 13px 28px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.play-nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: var(--play-text);
}

.play-nav-logo .mark {
    display: inline-flex;
    transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.play-nav-logo .mark svg {
    width: 30px;
    height: 30px;
    display: block;
    overflow: visible;
    transition: filter 0.32s ease;
}

/* The mark comes alive on hover: a signal runs through the waveform and the
   frame breathes - same idiom as the splash loader, shared by both logos. */
.play-nav-logo .scan,
.play-footer-logo .scan {
    stroke-dasharray: 24 100;
    stroke-dashoffset: 124;
    opacity: 0;
}

.play-nav-logo .wave,
.play-footer-logo .wave { transition: opacity 0.32s ease; }

.play-nav-logo .wordmark em,
.play-footer-logo .wordmark em { transition: color 0.32s ease; }

.play-nav-logo:hover .mark,
.play-nav-logo:focus-visible .mark,
.play-footer-logo:hover .mark,
.play-footer-logo:focus-visible .mark { transform: scale(1.09); }

.play-nav-logo:hover .mark svg,
.play-nav-logo:focus-visible .mark svg,
.play-footer-logo:hover .mark svg,
.play-footer-logo:focus-visible .mark svg { filter: drop-shadow(0 0 9px rgba(0, 229, 255, 0.5)); }

.play-nav-logo:hover .wave,
.play-nav-logo:focus-visible .wave,
.play-footer-logo:hover .wave,
.play-footer-logo:focus-visible .wave { opacity: 0.3; }

.play-nav-logo:hover .scan,
.play-nav-logo:focus-visible .scan,
.play-footer-logo:hover .scan,
.play-footer-logo:focus-visible .scan {
    opacity: 1;
    animation: playBrandScan 1.15s linear infinite;
}

.play-nav-logo:hover .frame,
.play-nav-logo:focus-visible .frame,
.play-footer-logo:hover .frame,
.play-footer-logo:focus-visible .frame { animation: playBrandFrame 1.15s ease-in-out infinite; }

.play-nav-logo:hover .wordmark em,
.play-nav-logo:focus-visible .wordmark em,
.play-footer-logo:hover .wordmark em,
.play-footer-logo:focus-visible .wordmark em { color: var(--play-cyan); }

@keyframes playBrandScan {
    from { stroke-dashoffset: 124; }
    to   { stroke-dashoffset: 0; }
}

@keyframes playBrandFrame {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

/* Animation off: keep the still mark rather than a frozen dash fragment. */
@media (prefers-reduced-motion: reduce) {
    .play-nav-logo:hover .scan,
    .play-nav-logo:focus-visible .scan,
    .play-footer-logo:hover .scan,
    .play-footer-logo:focus-visible .scan { display: none; }

    .play-nav-logo:hover .wave,
    .play-nav-logo:focus-visible .wave,
    .play-footer-logo:hover .wave,
    .play-footer-logo:focus-visible .wave { opacity: 1; }
}


.play-nav-logo .wordmark {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.play-nav-logo .wordmark em {
    font-style: normal;
    font-weight: 500;
    color: var(--play-faint);
    margin-left: 6px;
    letter-spacing: 0.14em;
}

.play-nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-right: auto;
}

.play-nav-links a {
    position: relative;
    color: var(--play-muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: color 0.22s ease;
}

.play-nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -7px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--play-magenta), var(--play-cyan));
    transition: right 0.28s ease;
}

.play-nav-links a:hover { color: var(--play-text); }
.play-nav-links a:hover::after,
.play-nav-links a.is-current::after { right: 0; }
.play-nav-links a.is-current { color: var(--play-text); }

.play-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-nav-signin {
    color: var(--play-muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: color 0.22s ease;
}

.play-nav-signin:hover { color: var(--play-text); }

.play-btn--sm {
    padding: 10px 18px;
    font-size: 13.5px;
}

@media (max-width: 900px) {
    .play-nav-links { display: none; }
    .play-nav-inner { padding: 12px 18px; gap: 16px; }
    .play-nav-actions { margin-left: auto; }
}

@media (max-width: 720px) {
    .play-nav-signin { display: none; }
    .play-btn--sm { width: auto; }
}

/* ==========================================================================
   FOOTER - includes/play-footer.php (homepage + every /play page)
   Prefixed classes only, so it never collides with marketing.css `.footer`.
   ========================================================================== */

.play-footer {
    position: relative;
    z-index: 10;
    margin-top: 40px;
    padding: 68px 0 30px;
    border-top: 1px solid var(--play-border);
    background: rgba(3, 3, 8, 0.7);
    font-family: var(--play-font);
    color: var(--play-text);
}

.play-footer * { box-sizing: border-box; }

.play-footer .play-container {
    width: 100%;
    max-width: var(--play-container);
    margin: 0 auto;
    padding: 0 28px;
}

.play-footer-grid {
    display: grid;
    /* Brand block + one column per app category. The count is passed inline by
       play-footer.php so a category never wraps under the brand block. */
    grid-template-columns: minmax(210px, 1.35fr) repeat(var(--play-footer-cols, 4), minmax(120px, 1fr));
    gap: 36px;
    padding-bottom: 44px;
}

/* Second tier (Company / Support / Connect) has no brand column. */
.play-footer-grid--site {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding-top: 40px;
    border-top: 1px solid var(--play-border);
}

/* Logo - same mark and wordmark as the fixed nav, one notch larger. */
.play-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    text-decoration: none;
    color: var(--play-text);
}

.play-footer-logo .mark {
    display: inline-flex;
    transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.play-footer-logo .mark svg {
    width: 34px;
    height: 34px;
    display: block;
    overflow: visible;
    transition: filter 0.32s ease;
}

.play-footer-logo .wordmark {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.play-footer-logo .wordmark em {
    font-style: normal;
    font-weight: 500;
    color: var(--play-faint);
    margin-left: 6px;
    letter-spacing: 0.14em;
}

.play-footer-brand p {
    margin: 0 0 22px;
    max-width: 42ch;
    color: var(--play-muted);
    font-size: 14px;
    line-height: 1.7;
}

.play-footer-col h3 {
    margin: 0 0 16px;
    font-family: var(--play-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--play-faint);
}

.play-footer-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.play-footer-col a {
    color: var(--play-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.play-footer-col a:hover { color: var(--play-cyan); }

/* Socials ---------------------------------------------------------------- */
.play-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.play-social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--play-border-strong);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--play-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.play-social-icon:hover {
    color: var(--play-cyan);
    border-color: var(--play-cyan);
    background: rgba(0, 229, 255, 0.1);
}

/* Bottom bar ------------------------------------------------------------- */
.play-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    padding-top: 26px;
    border-top: 1px solid var(--play-border);
    color: var(--play-faint);
    font-size: 13px;
}

.play-footer-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.play-footer-version {
    font-family: var(--play-mono);
    font-size: 11px;
    opacity: 0.75;
}

/* Mention de l'editeur : une rangee a elle seule sous la barre du bas.
   Sans flex-basis:100% elle deviendrait une 4e colonne du flex parent et se
   ferait ecraser entre le copyright et les liens legaux. `order` la place
   apres eux malgre sa position dans le HTML. */
.play-footer-publisher {
    flex: 0 0 100%;
    order: 10;
    margin: 4px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--play-border);
    font-size: 12px;
    line-height: 1.7;
    color: var(--play-faint);
    opacity: 0.85;
}

.play-footer-publisher a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.play-footer-publisher a:hover { color: var(--play-text); }

.play-footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.play-footer-legal a {
    color: var(--play-faint);
    text-decoration: none;
    transition: color 0.2s ease;
}

.play-footer-legal a:hover { color: var(--play-text); }

.play-footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-family: var(--play-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--play-faint);
}

.play-footer-stats span {
    color: var(--play-lime);
    font-weight: 700;
}

/* Too many app categories to keep on one line - fall back to auto-fit. */
@media (max-width: 1120px) {
    .play-footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 34px;
    }
    .play-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .play-footer { padding-top: 52px; }
    .play-footer .play-container { padding: 0 18px; }
    .play-footer-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 30px; }
    .play-footer-grid--site { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 30px; }
    .play-footer-brand { grid-column: 1 / -1; }
    .play-footer-bottom { flex-direction: column; align-items: flex-start; }
}
