/* ============================================
   Blog HK - Design System (Part 3: Admin + Responsive)
   ============================================ */

/* Footer */
.footer { background:var(--color-primary); color:rgba(255,255,255,0.7); padding:var(--space-3xl) 0 var(--space-xl); margin-top:auto; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.5fr; gap:var(--space-2xl); margin-bottom:var(--space-2xl); }
.footer h4 { color:var(--color-white); font-size:1rem; margin-bottom:var(--space-lg); font-family:var(--font-body); font-weight:600; }
.footer-about p { font-size:1rem; line-height:1.7; color:rgba(255,255,255,0.9); font-weight:400; margin-bottom:var(--space-lg); }
.footer-about .navbar-logo { margin-bottom:var(--space-md); color:var(--color-white); }

/* Social Links */
.footer-social h4 { margin-bottom:var(--space-md); }
.social-links { display:flex; gap:var(--space-md); }
.social-link { 
    width:40px; 
    height:40px; 
    border-radius:50%; 
    background:rgba(255,255,255,0.1); 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    color:rgba(255,255,255,0.8); 
    transition:all var(--transition-base); 
}
.social-link:hover { 
    background:var(--color-accent); 
    color:var(--color-primary); 
    transform:translateY(-2px); 
}

/* Footer Sections */
.footer-links li { margin-bottom:var(--space-sm); }
.footer-links a { color:rgba(255,255,255,0.7); font-size:0.9rem; transition:color var(--transition-fast); }
.footer-links a:hover { color:var(--color-accent); }

/* Contact Items */
.footer-contact li { margin-bottom:var(--space-md); }
.contact-item { 
    display:flex; 
    align-items:center; 
    gap:var(--space-sm); 
    color:rgba(255,255,255,0.8); 
    font-size:0.9rem; 
}
.contact-item svg { 
    color:var(--color-accent); 
    flex-shrink:0; 
}

/* Footer Bottom */
.footer-bottom { padding-top:var(--space-xl); border-top:1px solid rgba(255,255,255,0.1); }
.footer-bottom-content { 
    display:flex; 
    align-items:center; 
    justify-content:space-between; 
    font-size:0.85rem; 
}
.footer-bottom-links { 
    display:flex; 
    gap:var(--space-lg); 
}
.footer-bottom-links a { 
    color:rgba(255,255,255,0.7); 
    transition:color var(--transition-fast); 
}
.footer-bottom-links a:hover { 
    color:var(--color-accent); 
}

/* About Page */
.about-hero { display:grid; grid-template-columns:400px 1fr; gap:var(--space-3xl); align-items:center; }
.about-photo { border-radius:var(--radius-xl); overflow:hidden; box-shadow:var(--shadow-xl); }
.about-photo img { width:100%; height:500px; object-fit:cover; }
.about-expertise { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-xl); margin-top:var(--space-3xl); }
.expertise-card { background:var(--color-white); padding:var(--space-xl); border-radius:var(--radius-lg); box-shadow:var(--shadow-card); text-align:center; transition:all var(--transition-base); border:1px solid var(--color-border-light); }
.expertise-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-card-hover); border-color:var(--color-accent-glow); }
.expertise-icon { width:56px; height:56px; background:var(--color-accent-glow); border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; font-size:1.5rem; margin:0 auto var(--space-md); }

/* Contact Page */
.contact-layout { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3xl); }
.contact-info-card { display:flex; align-items:flex-start; gap:var(--space-md); padding:var(--space-lg); background:var(--color-bg-alt); border-radius:var(--radius-md); margin-bottom:var(--space-md); }
.contact-info-icon { width:48px; height:48px; background:var(--color-primary); color:var(--color-accent); border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0; }

/* Pagination */
.pagination { display:flex; align-items:center; justify-content:center; gap:var(--space-sm); margin-top:var(--space-3xl); }
.pagination a,.pagination span { display:flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:var(--radius-sm); font-weight:600; font-size:0.9rem; transition:all var(--transition-fast); }
.pagination a { color:var(--color-text); border:1px solid var(--color-border); }
.pagination a:hover { background:var(--color-primary); color:var(--color-white); border-color:var(--color-primary); }
.pagination .active { background:var(--color-primary); color:var(--color-white); border:1px solid var(--color-primary); }

/* Popular Articles */
.popular-list { counter-reset:popular; }
.popular-item { display:flex; align-items:flex-start; gap:var(--space-lg); padding:var(--space-lg) 0; border-bottom:1px solid var(--color-border-light); counter-increment:popular; }
.popular-item:last-child { border-bottom:none; }
.popular-item::before { content:counter(popular, decimal-leading-zero); font-family:var(--font-heading); font-size:2rem; font-weight:700; color:var(--color-accent); min-width:50px; line-height:1; }
.popular-item-content h3 { font-size:1.1rem; margin-bottom:var(--space-xs); }
.popular-item-content h3 a { color:var(--color-text); }
.popular-item-content h3 a:hover { color:var(--color-accent); }
.popular-item-meta { font-size:0.85rem; color:var(--color-text-muted); display:flex; gap:var(--space-md); }

/* Category Filter */
.category-filter { display:flex; flex-wrap:wrap; gap:var(--space-sm); margin-bottom:var(--space-2xl); justify-content:center; }
.category-filter a { padding:0.5rem 1.25rem; border-radius:50px; font-size:0.9rem; font-weight:500; color:var(--color-text); background:var(--color-bg-alt); border:1px solid var(--color-border); transition:all var(--transition-fast); }
.category-filter a:hover,.category-filter a.active { background:var(--color-primary); color:var(--color-white); border-color:var(--color-primary); }

/* ============================================
   Admin Styles
   ============================================ */
.admin-layout { display:grid; grid-template-columns:250px 1fr; min-height:100vh; }
.admin-sidebar { background:var(--color-primary); padding:var(--space-xl); color:var(--color-white); position:sticky; top:0; height:100vh; overflow-y:auto; }
.admin-sidebar-logo { font-family:var(--font-heading); font-size:1.25rem; font-weight:700; color:var(--color-white); margin-bottom:var(--space-2xl); padding-bottom:var(--space-lg); border-bottom:1px solid rgba(255,255,255,0.1); display:flex; align-items:center; gap:var(--space-sm); text-decoration:none; }
.admin-sidebar-logo span { color:var(--color-accent); }
.admin-nav { display:flex; flex-direction:column; gap:var(--space-xs); }
.admin-nav a { display:flex; align-items:center; gap:var(--space-md); padding:var(--space-md); color:rgba(255,255,255,0.7); border-radius:var(--radius-sm); font-size:0.9rem; font-weight:500; transition:all var(--transition-fast); }
.admin-nav a:hover,.admin-nav a.active { background:rgba(255,255,255,0.1); color:var(--color-white); }
.admin-nav a.active { background:rgba(201,162,39,0.15); color:var(--color-accent); }
.admin-main { padding:var(--space-2xl); background:var(--color-bg); overflow-y:auto; }
.admin-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:var(--space-2xl); }
.admin-header h1 { font-size:1.75rem; }

/* Stats */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-lg); margin-bottom:var(--space-2xl); }
.stat-card { background:var(--color-white); border-radius:var(--radius-lg); padding:var(--space-xl); box-shadow:var(--shadow-card); border:1px solid var(--color-border-light); }
.stat-card-icon { width:48px; height:48px; border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; font-size:1.25rem; margin-bottom:var(--space-md); }
.stat-card-icon.blue { background:rgba(37,99,235,0.1); }
.stat-card-icon.green { background:rgba(5,150,105,0.1); }
.stat-card-icon.gold { background:var(--color-accent-glow); }
.stat-card-icon.purple { background:rgba(139,92,246,0.1); }
.stat-card .number { font-family:var(--font-heading); font-size:2rem; font-weight:700; color:var(--color-primary); line-height:1; }
.stat-card .label { font-size:0.85rem; color:var(--color-text-muted); margin-top:var(--space-xs); }

/* Admin Table */
.admin-table { width:100%; background:var(--color-white); border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-card); border:1px solid var(--color-border-light); border-collapse:collapse; }
.admin-table thead { background:var(--color-bg-alt); }
.admin-table th { padding:var(--space-md) var(--space-lg); text-align:left; font-size:0.8rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--color-text-muted); }
.admin-table td { padding:var(--space-md) var(--space-lg); border-top:1px solid var(--color-border-light); font-size:0.92rem; vertical-align:middle; }
.admin-table tbody tr { transition:background var(--transition-fast); }
.admin-table tbody tr:hover { background:var(--color-bg-alt); }
.admin-table .actions { display:flex; gap:var(--space-sm); }

.admin-card { background:var(--color-white); border-radius:var(--radius-lg); padding:var(--space-xl); box-shadow:var(--shadow-card); border:1px solid var(--color-border-light); margin-bottom:var(--space-xl); }
.admin-card h3 { font-size:1.15rem; margin-bottom:var(--space-lg); padding-bottom:var(--space-sm); border-bottom:1px solid var(--color-border-light); }

/* Éditeur Quill (type Word) */
.hk-editor-shell {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-white);
}
.hk-editor-shell .ql-toolbar.ql-snow {
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    padding: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 5;
}
.hk-editor-shell .ql-container.ql-snow {
    border: none;
    font-family: var(--font-body);
    font-size: 1.02rem;
}
.hk-editor-shell .ql-editor {
    min-height: 460px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    line-height: 1.75;
    color: var(--color-text);
}
.hk-editor-shell .ql-editor p,
.hk-editor-shell .ql-editor h1,
.hk-editor-shell .ql-editor h2,
.hk-editor-shell .ql-editor h3 {
    margin-bottom: 1rem;
}
.hk-editor-shell .ql-editor h1 { font-size: 1.9rem; }
.hk-editor-shell .ql-editor h2 { font-size: 1.5rem; }
.hk-editor-shell .ql-editor h3 { font-size: 1.25rem; }
.hk-editor-shell .ql-editor blockquote { margin: 1rem 0; }
.hk-editor-shell .ql-editor pre.ql-syntax {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}
.hk-editor-shell .ql-editor img { max-width: 100%; border-radius: 8px; }
.hk-editor-shell .ql-editor iframe.ql-video { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 8px; }
.hk-editor-shell .ql-toolbar .ql-header select { width: auto; min-width: 110px; }

/* Login */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--color-primary); padding:var(--space-xl); }
.login-card { background:var(--color-white); border-radius:var(--radius-xl); padding:var(--space-3xl); width:100%; max-width:420px; box-shadow:var(--shadow-xl); }
.login-card h1 { font-size:1.75rem; text-align:center; margin-bottom:var(--space-xs); }
.login-card .subtitle { text-align:center; color:var(--color-text-muted); margin-bottom:var(--space-2xl); }
.login-logo { text-align:center; margin-bottom:var(--space-xl); }
.login-logo .navbar-logo-icon { width:56px; height:56px; font-size:1.4rem; margin:0 auto; }

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.animate-on-scroll { opacity:0; transform:translateY(20px); transition:opacity 0.6s ease,transform 0.6s ease; }
.animate-on-scroll.visible { opacity:1; transform:translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width:1024px) {
    .hero-inner { grid-template-columns:1fr; text-align:center; }
    .hero-content { max-width:100%; }
    .hero-buttons { justify-content:center; }
    .hero-stats { justify-content:center; }
    .hero-image { display:none; }
    .article-layout { grid-template-columns:1fr; }
    .sidebar { position:static; }
    .grid-3 { grid-template-columns:repeat(2,1fr); }
    .stats-grid { grid-template-columns:repeat(2,1fr); }
    .footer-grid { grid-template-columns:repeat(2,1fr); }
    .about-hero { grid-template-columns:1fr; text-align:center; }
    .about-expertise { grid-template-columns:repeat(2,1fr); }
    .contact-layout { grid-template-columns:1fr; }
}
@media (max-width:768px) {
    html { font-size:15px; }
    h1 { font-size:2rem; } h2 { font-size:1.5rem; }
    .container { padding:0 var(--space-md); }
    .section { padding:var(--space-2xl) 0; }
    .hero { padding:var(--space-2xl) 0; }
    .hero h1 { font-size:2.25rem; }
    .navbar-nav { position:fixed; top:0; right:-100%; width:280px; height:100vh; background:var(--color-white); flex-direction:column; padding:80px var(--space-xl) var(--space-xl); box-shadow:var(--shadow-xl); transition:right var(--transition-base); align-items:stretch; z-index:999; }
    .navbar-nav.mobile-open { right:0; }
    .navbar-nav a { padding:var(--space-md); font-size:1.05rem; }
    .hamburger { display:flex; }
    .mobile-overlay { position:fixed; inset:0; background:var(--color-overlay); z-index:998; display:none; }
    .mobile-overlay.active { display:block; }
    .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
    .stats-grid { grid-template-columns:1fr 1fr; }
    .footer-grid { grid-template-columns:1fr; }
    .footer-bottom { flex-direction:column; gap:var(--space-sm); text-align:center; }
    .article-header h1 { font-size:1.75rem; }
    .hero-stats { flex-direction:column; gap:var(--space-md); }
    .about-expertise { grid-template-columns:1fr; }
    .admin-layout { grid-template-columns:1fr; }
    .admin-sidebar { position:fixed; left:-280px; width:250px; z-index:1000; transition:left var(--transition-base); }
    .admin-sidebar.open { left:0; }
}
@media (max-width:480px) {
    .hero h1 { font-size:1.85rem; }
    .hero-buttons { flex-direction:column; }
    .hero-buttons .btn { width:100%; }
    .form-inline { flex-direction:column; }
    .stats-grid { grid-template-columns:1fr; }
    .card-body { padding:var(--space-md); }
}

/* Utilities */
.text-center { text-align:center; }
.text-muted { color:var(--color-text-muted); }
.text-accent { color:var(--color-accent); }
.text-sm { font-size:0.85rem; }
.mt-1 { margin-top:var(--space-md); }
.mt-2 { margin-top:var(--space-xl); }
.mt-3 { margin-top:var(--space-2xl); }
.mb-1 { margin-bottom:var(--space-md); }
.mb-2 { margin-bottom:var(--space-xl); }
.mb-3 { margin-bottom:var(--space-2xl); }
.w-full { width:100%; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* Public home hero: mobile composition */
@media (max-width:1024px) {
    .hero { padding:clamp(4rem,10vw,5.5rem) 0 0; }
    .hero-inner { gap:2.75rem; }
    .hero-image { display:block; width:min(100%,620px); margin:0 auto; padding:0 0 1.25rem; }
    .hero-image-wrapper { box-shadow:14px 15px 0 rgba(201,162,39,.16),var(--shadow-xl); }
    .hero-image-wrapper img { height:clamp(280px,52vw,440px); }
    .hero-image-orbit-one { top:-1.25rem; right:-1.25rem; }
}

@media (max-width:768px) {
    .hero { padding-top:3.5rem; background:var(--color-primary); }
    .hero::before { background:radial-gradient(circle at 78% 42%,rgba(201,162,39,.23),transparent 0 25%),radial-gradient(circle at 6% 100%,rgba(37,99,235,.14),transparent 0 28%); }
    .hero::after { opacity:.12; }
    .hero-inner { gap:2.25rem; }
    .hero-label { margin-bottom:1.2rem; }
    .hero h1 { font-size:clamp(2.75rem,13vw,3.65rem); line-height:1.02; }
    .hero-subtitle { max-width:34rem; margin-right:auto; margin-left:auto; font-size:1rem; line-height:1.7; }
    .hero-buttons { justify-content:center; }
    .hero-stats { display:grid; grid-template-columns:repeat(3,1fr); width:100%; gap:.75rem; margin-top:2rem; padding-top:1.4rem; }
    .hero-stat { min-width:0; text-align:center; }
    .hero-stat-number { font-size:1.45rem; }
    .hero-stat-label { font-size:.68rem; line-height:1.35; }
    .hero-image { display:block; width:calc(100% + 1rem); margin-left:-.5rem; }
    .hero-image-wrapper { border-radius:18px; box-shadow:10px 11px 0 rgba(201,162,39,.15),var(--shadow-lg); }
    .hero-image-wrapper img { height:300px; }
    .hero-image-kicker { top:1rem; left:1rem; font-size:.63rem; }
    .hero-image-badge { right:1.25rem; bottom:1.25rem; left:1.25rem; padding-top:.75rem; text-align:left; }
    .hero-image-badge strong { font-size:1.1rem; }
    .hero-image-orbit { display:none; }
}

@media (max-width:480px) {
    .hero { padding-top:3rem; }
    .hero-buttons { display:grid; grid-template-columns:1fr; width:100%; }
    .hero-buttons .btn { width:100%; }
    .hero-stats { gap:.35rem; }
    .hero-stat-number { font-size:1.28rem; }
    .hero-stat-label { font-size:.62rem; }
    .hero-image-wrapper img { height:250px; }
}
