/* ═══════════════════════════════════════════════════════════════
   NowCode — Showroom Web Design
   Styles communs à toutes les démos plein écran
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --anthracite: #0a0c12;
    --anthracite-light: #12161D;
    --cyan: #15E9F2;
    --cyan-soft: #3AB2CD;
    --silver: #D2DEE3;
    --off-white: #F0F9FC;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--anthracite);
    color: var(--silver);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ─── Bouton retour (présent sur chaque démo) ─── */
.demo-back {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    background: rgba(18, 22, 29, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(21, 233, 242, 0.25);
    border-radius: 100px;
    color: var(--silver);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.demo-back:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateX(-3px);
    box-shadow: 0 4px 24px rgba(21, 233, 242, 0.2);
}

.demo-back svg {
    width: 16px;
    height: 16px;
}

/* ─── Badge NowCode en haut à droite ─── */
.demo-brand {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(18, 22, 29, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(210, 222, 227, 0.1);
    border-radius: 100px;
    font-family: var(--font-code);
    font-size: 0.72rem;
    color: var(--silver);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.demo-brand-dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    animation: brand-pulse 2s infinite;
}

@keyframes brand-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(21, 233, 242, 0.5); }
    50%      { opacity: 0.5; box-shadow: 0 0 0 6px rgba(21, 233, 242, 0); }
}

/* ─── Scene plein écran (utilisée par chaque démo) ─── */
.demo-scene {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--anthracite);
}

/* ─── Titre animé lettre-par-lettre (classe réutilisable) ─── */
.demo-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 9rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--off-white);
    position: relative;
    z-index: 10;
    margin: 0;
}

.demo-title .letter {
    display: inline-block;
    transform: translateY(40%);
    opacity: 0;
    animation: letter-rise 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
    background: linear-gradient(180deg, var(--off-white) 0%, var(--silver) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.demo-title .letter.accent {
    background: linear-gradient(180deg, var(--cyan) 0%, var(--cyan-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(21, 233, 242, 0.35));
}

@keyframes letter-rise {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ─── Sous-titre et CTA sous le titre ─── */
.demo-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: rgba(210, 222, 227, 0.75);
    text-align: center;
    margin-top: 1.5rem;
    max-width: 560px;
    font-weight: 300;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fade-up 1s ease 1.4s forwards;
}

.demo-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
    padding: 0.9rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--anthracite);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none;
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fade-up 1s ease 1.8s forwards;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.demo-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 50px rgba(21, 233, 242, 0.25);
}

.demo-cta .arrow {
    transition: transform 0.3s ease;
}

.demo-cta:hover .arrow {
    transform: translateX(4px);
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Wrapper du contenu centré (texte au-dessus des effets) ─── */
.demo-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 100%;
    width: 100%;
}

/* Par défaut, empêche un titre d'être cassé en plusieurs lignes */
.demo-title {
    white-space: nowrap;
    max-width: 100%;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    .demo-back { top: 1rem; left: 1rem; padding: 0.55rem 0.9rem; font-size: 0.78rem; }
    .demo-brand { top: 1rem; right: 1rem; }
}
