/* --- Variables & Réinitialisation --- */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

/* --- Barre de Navigation --- */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logo-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    color: var(--text-main);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

/* Barre de recherche pro */
.search-container {
    position: relative;
    width: 450px;
}

.search-container i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-container input {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid transparent;
    padding: 10px 40px 10px 40px;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-container input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.shortcut-key {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.btn-primary-action {
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary-action:hover {
    background: var(--primary-hover);
}

/* --- Contenu Principal --- */
.main-content {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 24px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
}

.section-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.section-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.tab {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab.active, .tab:hover {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

/* --- Grille des Cartes d'Applications --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.card-top {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.app-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.app-heading h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.dev-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.app-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

/* Badges métadonnées & sécurité */
.app-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.meta-badge {
    background: #f1f5f9;
    color: var(--text-main);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.security-badge {
    background: var(--success-bg);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Bouton de téléchargement de la carte */
.card-footer {
    margin-top: auto;
}

.btn-download {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

/* --- Pied de page --- */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: white;
    padding: 30px 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

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

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