/* ═══════════════════════════════════════════════════════════════
   TELEADMIN.COM - Design System
   Cohérent avec l'écosystème Teleadmin
   ═══════════════════════════════════════════════════════════════ */

/* === Variables === */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #2d3a4f;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-hero: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 60%);

    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);

    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;

    --transition: all 0.3s ease;
}

/* === Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* === Header === */
header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a.active {
    color: var(--accent);
}

/* === Dropdown === */
.dropdown {
    position: relative;
}

.ecosystem-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.ecosystem-link:hover {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.ecosystem-link .arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    box-shadow: var(--shadow-hover);
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.dropdown-item a:hover {
    background: rgba(99, 102, 241, 0.1);
}

.dropdown-item.hub a {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
}

.dropdown-item.current a {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--primary);
}

.site-icon {
    font-size: 1.5rem;
}

.site-info {
    flex: 1;
}

.site-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.site-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Language Toggle === */
.lang-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-card);
    padding: 0.25rem;
    border-radius: 8px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* === Hero === */
.hero {
    padding: 10rem 2rem 6rem;
    text-align: center;
    background: var(--gradient-hero);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* === Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
}

.badge-accent {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--accent);
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* === Grid === */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* === Services Cards === */
.service-card {
    background: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.service-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 500;
    transition: var(--transition);
}

.service-link:hover {
    gap: 0.75rem;
}

/* === Stats === */
.stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    padding: 3rem 0;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* === Features List === */
.features-list {
    display: grid;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-content h4 {
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === CTA Section === */
.cta-section {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    padding: 4rem;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === Footer === */
footer {
    background: var(--bg-card);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* === Tables === */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

th {
    background: var(--bg-card);
    font-weight: 600;
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* === Mobile Menu === */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === Responsive === */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 8rem 1.5rem 4rem;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .stats {
        gap: 2rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .card, .service-card {
        padding: 1.5rem;
    }

    .cta-section {
        padding: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* === Utilities === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }
