/* =====================================================================
   Landing Page (index.css)
   ===================================================================== */

/* ─── Language visibility toggle ───────────────────────────────────── */
html[lang="fr"] [data-lang="en"],
html:not([lang="fr"]) [data-lang="fr"] {
    display: none !important;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* ─── Menu bar ─────────────────────────────────────────────────────── */
.menu-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1.5rem 0.75rem;
    background-color: rgb(248 250 252 / 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #0f172a;
    text-decoration: none;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.menu-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-switch {
    padding: 0.4rem 0.65rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.lang-switch:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.menu-open {
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    background-color: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.menu-open:hover {
    background-color: #334155;
}

/* ─── Hero Section ─────────────────────────────────────────────────── */
.hero-section {
    max-width: 980px;
    margin: 3.5rem auto 4rem auto;
    padding: 0 1.25rem;
}

.hero-text {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.hero-text h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.hero-text p {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 660px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.hero-primary,
.hero-secondary {
    padding: 0.75rem 1.45rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.hero-primary {
    background-color: #4f46e5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.hero-primary:hover {
    background-color: #4338ca;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.hero-secondary {
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #0f172a;
}

.hero-secondary:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.hero-text .hero-note {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: #64748b;
}

@media (max-width: 680px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
}

/* ─── Hero App Preview Window ──────────────────────────────────────── */
.hero-preview-window {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    margin-top: 2.5rem;
}

.preview-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.65rem 1rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.chrome-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #475569;
}

.chrome-address {
    margin-left: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #0f172a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.preview-content {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 480px;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#preview-messages {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    background-color: #090d16;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 28px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#preview-messages[hidden] {
    display: none;
}


#preview-messages .preview-img {
    height: 85%;
    width: auto;
    max-width: 90%;
    object-fit: contain;

    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12); 
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.7),   
        0 1px 3px 0 rgba(0, 0, 0, 0.4);            
    
    display: block;
}

/* ─── Features Grid ────────────────────────────────────────────────── */
.features-section {
    max-width: 980px;
    margin: 4.5rem auto;
    padding: 0 1.25rem;
}

.section-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4F46E5;
    margin: 0 0 0.5rem 0;
}

.section-subtext {
    font-size: 1.05rem;
    color: #64748b;
    margin: 0;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 760px) {
    .highlight-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.feature-card .badge {
    align-self: flex-start;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.feature-card h3 {
    margin: 0.85rem 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.015em;
}

.feature-card p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.tech-tags li {
    background: #f8fafc;
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* ─── 4th Card (Image Slot) ────────────────────────────────────────── */
.feature-card-media {
    padding: 0;
    overflow: hidden;
    position: relative;
    min-height: 280px;
    background: #0f172a;
    border-color: #cbd5e1;
}

.feature-card-media .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feature-card-media:hover .card-img {
    transform: scale(1.02);
}

/* ─── Image Fallback Placeholder ───────────────────────────────────── */
.image-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background: repeating-linear-gradient(
        45deg,
        #111827,
        #111827 10px,
        #1e293b 10px,
        #1e293b 20px
    );
    color: #94a3b8;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.has-placeholder .preview-img,
.has-placeholder .card-img {
    display: none !important;
}

.has-placeholder .image-fallback {
    display: flex;
}

.fallback-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.image-fallback strong {
    color: #f8fafc;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.image-fallback span {
    font-size: 0.8rem;
    max-width: 300px;
    line-height: 1.4;
}

/* ─── Architecture Dark Section ────────────────────────────────────── */
.architecture-section {
    background: #090d16;
    border-top: 1px solid #1e293b;
    border-bottom: 1px solid #1e293b;
    padding: 4.5rem 1.25rem 5rem;
}

.architecture-inner {
    max-width: 980px;
    margin: 0 auto;
}

.section-heading-dark {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-heading-dark h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
}

.section-heading-dark p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0;
}

figure.overview-diagram {
    margin: 0 auto;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

figure.overview-diagram svg {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    min-width: 680px; /* Protects legible typography on smaller screens */
    max-width: 920px;
}

/* ─── Footer ───────────────────────────────────────────────────────── */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
    font-size: 0.85rem;
    color: #64748b;
}

.site-footer p {
    margin: 0;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.site-footer a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: #0f172a;
}


.features {
    max-width: 980px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 0;
    text-align: center;
}

.features-text {
    max-width: 760px;
    margin: 0 auto;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #64748b;
}

.features-text strong {
    font-weight: 600;
    color: #334155;
}


/* ─── Hero App Preview Window ──────────────────────────────────────── */
.hero-preview-window {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    margin-top: 2.5rem;
}

.preview-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.chrome-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #475569;
}

.preview-tabs {
    display: flex;
    gap: 4px;
    margin-left: 0.75rem;
}

.preview-tab {
    padding: 0.25rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}

.preview-tab:hover {
    background: #273449;
    color: #e2e8f0;
}

.preview-tab[aria-selected="true"] {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

.preview-tab:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.chrome-address {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #0f172a;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.preview-content {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-content[hidden] {
    display: none;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

@media (max-width: 520px) {
    .chrome-address {
        display: none;
    }
}