/* ============================================
   FICHIER CSS PRINCIPAL - THEME DARK GLASS
   ============================================ */

/* Import des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* Font Awesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Toastify - Toast notifications */
@import url('https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css');

/* ============================================
   VARIABLES CSS - DARK GLASS THEME
   ============================================ */

:root {
    /* Couleurs de fond */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a24;
    
    /* Couleurs d'accent */
    --accent-primary: #06b6d4;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    
    /* Couleurs de texte */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Shadows */
    --shadow-glow: 0 0 60px rgba(6, 182, 212, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Success, Error, Warning */
    --color-success: #22c55e;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
}

/* ============================================
   BASE STYLES
   ============================================ */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Fond avec gradient et grille subtile */
.dark-glass-bg {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.08), transparent),
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        var(--bg-primary);
    background-size: 100% 100%, 100% 100%, 60px 60px, 60px 60px, 100% 100%;
    background-attachment: fixed;
}

/* ============================================
   GLASS EFFECTS
   ============================================ */

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.glass-card-glow {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   BUTTONS - Dark Glass Style
   ============================================ */

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* ============================================
   INPUTS - Dark Glass Style
   ============================================ */

.input-dark {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
    width: 100%;
}

.input-dark:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.input-dark::placeholder {
    color: var(--text-muted);
}

.input-dark-with-icon {
    padding-left: 48px;
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.input-group .input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

.badge-violet {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* ============================================
   CARDS
   ============================================ */

.url-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
}

.url-card:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.1);
}

.url-card .short-url {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
    font-weight: 500;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar-dark {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* ============================================
   TABLES
   ============================================ */

.table-dark {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.table-dark td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.table-dark tr:hover td {
    background: var(--glass-bg);
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* ============================================
   TOASTS - Dark Glass Style
   ============================================ */

.toastify {
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 500 !important;
    padding: 16px 20px !important;
    min-height: 56px !important;
    backdrop-filter: blur(20px) !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

.animate-glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ============================================
   UTILITIES
   ============================================ */

.glow-cyan {
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
}

.glow-violet {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

.border-glow {
    border: 1px solid transparent;
    background: 
        linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        var(--accent-gradient) border-box;
}
