/* ═══════════════════════════════ K-INFO-INT ══════════════════════════════ */
:root {
    --primary:      #0f172a;
    --secondary:    #f59e0b;
    --accent:       #38bdf8;
    --bg-dark:      #020617;
    --text-main:    #f8fafc;
    --text-muted:   #94a3b8;
    --glass:        rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius-card:  20px;
    --transition:   0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Arabic font */
[lang="ar"] body,
[lang="ar"] input,
[lang="ar"] textarea,
[lang="ar"] select,
[lang="ar"] button {
    font-family: 'Cairo', 'Outfit', sans-serif;
}

img { max-width: 100%; display: block; }

/* ─── Scroll Reveal ──────────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ─── Hero animation (pure CSS, no JS needed) ─────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-content {
    animation: fadeInUp 0.9s ease-out both;
}

/* ─── Glassmorphism Card ─────────────────────────────────────────────────────── */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    padding: 2rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    border-color: var(--secondary);
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    padding: 1.25rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: padding var(--transition), background var(--transition);
}
header.scrolled {
    padding: 0.75rem 5%;
    background: rgba(2, 6, 23, 0.97);
}

/* ─── Logo ───────────────────────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1002;
}
.logo img  { height: 38px; width: auto; }
.logo span { color: var(--secondary); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }

/* ─── Nav ────────────────────────────────────────────────────────────────────── */
nav ul {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition);
    white-space: nowrap;
}
nav a:hover,
nav a.nav-active { color: var(--secondary); }

/* ─── Language Switcher ──────────────────────────────────────────────────────── */
.lang-switcher {
    display: flex;
    gap: 0.2rem;
    background: var(--glass);
    padding: 0.3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}
.lang-switcher span {
    padding: 0.2rem 0.65rem;
    border-radius: 15px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
    user-select: none;
    letter-spacing: 0.03em;
}
.lang-switcher span.active {
    background: var(--secondary);
    color: var(--primary);
}

/* ─── Hamburger ──────────────────────────────────────────────────────────────── */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 1002;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 10% 5rem;
    background:
        linear-gradient(rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.90)),
        url('assets/hero-bg.png') center / cover no-repeat;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #fff;
}
.hero-highlight {
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2.25rem;
}
.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--secondary);
    color: var(--primary);
}
.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--secondary);
    color: var(--text-main);
}
.btn-outline:hover {
    background: var(--secondary);
    color: var(--primary);
    transform: translateY(-2px);
}
.btn:disabled,
.btn.loading {
    opacity: 0.65;
    pointer-events: none;
}

/* ─── Sections ───────────────────────────────────────────────────────────────── */
section { padding: 6rem 10%; }
.section-alt { background: rgba(15, 23, 42, 0.45); }

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}
h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}
.page-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto;
}

/* ─── Grid ───────────────────────────────────────────────────────────────────── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }

label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 0.82rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.97rem;
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
input:focus, textarea:focus, select:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}
select option { background: #0f172a; color: var(--text-main); }
textarea { resize: vertical; min-height: 120px; }

/* File drop zone */
.file-drop {
    position: relative;
    border: 2px dashed var(--glass-border);
    padding: 1.75rem 1rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.file-drop:hover,
.file-drop.drag-over {
    border-color: var(--secondary);
    background: rgba(245, 158, 11, 0.05);
}
.file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    padding: 0;
    background: none;
    border: none;
}
.file-name { color: var(--text-muted); font-size: 0.9rem; }
.file-name.selected { color: var(--secondary); font-weight: 600; }

/* Alerts */
.alert {
    display: none;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
    font-size: 0.95rem;
}
.alert.show { display: block; }
.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
}
.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
footer {
    padding: 3rem 10%;
    background: #010409;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.9rem;
}
.footer-tagline { color: var(--text-muted); margin-top: 0.5rem; }

/* ─── RTL overrides ──────────────────────────────────────────────────────────── */
[dir="rtl"] nav ul      { flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher { direction: ltr; }
[dir="rtl"] .glass-card ul { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .hero-btns  { direction: rtl; }
[dir="rtl"] .grid-2     { direction: rtl; }

/* ─── Responsive : Tablet ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    nav ul   { gap: 1.25rem; }
    section  { padding: 5rem 7%; }
}

/* ─── Responsive : Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    /* Dropdown glissant sous le header */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--glass-border);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.38s ease;
    }
    nav.open { max-height: 75vh; }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 5% 1.25rem;
        align-items: flex-start;
    }
    nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--glass-border);
    }
    nav ul li:last-child { border-bottom: none; }

    nav a {
        display: block;
        padding: 0.9rem 0;
        font-size: 1.05rem;
    }
    .lang-switcher {
        margin: 0.75rem 0 0.25rem;
        border: none;
        background: none;
        padding: 0;
    }

    section   { padding: 4rem 5%; }
    .hero     { padding: 7rem 6% 4rem; }
    h2        { margin-bottom: 2rem; }

    .grid     { grid-template-columns: 1fr; }
    .grid-2   { grid-template-columns: 1fr; }

    .why-card { flex-direction: column !important; }
    .why-card > div { min-width: unset !important; }
    .why-card img { width: 100%; border-radius: 16px; }
}

@media (max-width: 480px) {
    .logo span { display: none; }
    .hero h1   { font-size: 1.85rem; }
    .btn       { padding: 0.75rem 1.5rem; font-size: 0.88rem; }
    footer     { padding: 2rem 5%; }
}
