/*
Theme Name: Digitaland Blog Theme
Description: Thème WordPress reproduisant exactement le design Digitaland de zoomedia.ma
Version: 2.0.0
Author: Digitaland
*/

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

:root {
  /* Colors - Digitaland theme updated to match Next.js */
  --primary: #7A5FA6;
  --primary-dark: #6A4F96;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --accent: #f8fafc;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  font-size: 16px;
  antialiased: true;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

/* Header Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Force header to stay fixed on mobile */
@media (max-width: 767px) {
  .site-header {
    position: fixed !important;
    top: 0 !important;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--foreground);
  font-size: 24px;
  font-weight: bold;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-dot {
  color: var(--primary);
  transition: color 0.3s ease;
}

.logo:hover .logo-dot {
  color: var(--primary-dark);
}

/* Desktop Navigation */
.main-nav {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  text-decoration: none;
  color: rgba(10, 10, 10, 0.7);
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: rgba(248, 250, 252, 0.05);
}

/* Services Dropdown */
.services-dropdown {
  position: relative;
  display: inline-block;
}

.services-trigger {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: rgba(10, 10, 10, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.services-trigger:hover {
  color: var(--foreground);
  background-color: rgba(248, 250, 252, 0.05);
}

.services-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.services-dropdown:hover .services-trigger::after {
  transform: rotate(180deg);
}

.services-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 20px;
  min-width: 500px;
  max-width: 600px;
  display: none;
  z-index: 60;
  margin-top: 8px;
}

.services-dropdown:hover .services-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 1024px) {
  .services-content {
    min-width: 400px;
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  .services-content {
    left: 0;
    right: 0;
    transform: none;
    margin: 8px 16px 0 16px;
    min-width: auto;
    max-width: none;
    grid-template-columns: 1fr;
  }
}

.service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--foreground);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.service-item:hover {
  background-color: var(--accent);
  color: var(--primary);
  border-color: var(--border);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.service-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  margin-top: 1px;
  flex-shrink: 0;
}

.service-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--foreground);
}

.service-item:hover .service-content h4 {
  color: var(--primary);
}

.service-content p {
  font-size: 12px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* Header Actions */
.header-actions {
  display: none;
  align-items: center;
  gap: 12px;
}

@media (min-width: 768px) {
  .header-actions {
    display: flex;
  }
}

.cta-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--foreground);
  color: var(--background);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.cta-button:hover {
  background-color: var(--primary);
  color: white;
}

/* Mobile Navigation */
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.hamburger-btn {
  position: relative;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 60;
}

.hamburger-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background-color: var(--foreground);
  transition: all 0.3s ease;
}

.hamburger-line:nth-child(1) {
  top: 8px;
}

.hamburger-line:nth-child(2) {
  top: 15px;
}

.hamburger-line:nth-child(3) {
  top: 22px;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: none;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--background);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 55;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateY(0);
}

.mobile-menu-content {
  padding: 24px 16px;
}

.mobile-nav-item {
  margin-bottom: 16px;
}

.mobile-nav-link {
  display: block;
  padding: 16px 0;
  color: var(--foreground);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.mobile-services-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  background: transparent;
  border: none;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
}

.mobile-services-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0;
}

.mobile-services-content.active {
  max-height: 1000px;
  opacity: 1;
  padding: 12px 0;
}

.mobile-service-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  margin: 4px 0;
  border-radius: 8px;
  text-decoration: none;
  color: var(--foreground);
  transition: all 0.2s ease;
}

.mobile-service-item:hover {
  background-color: var(--accent);
  color: var(--primary);
}

.mobile-service-item .service-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--foreground);
}

.mobile-service-item:hover .service-content h4 {
  color: var(--primary);
}

.mobile-service-item .service-content p {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* Footer Styles */
.site-footer {
  background-color: rgba(241, 245, 249, 0.5);
  color: var(--muted-foreground);
  padding: 48px 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-brand {
    align-items: flex-start;
    text-align: left;
  }
}

.footer-logo {
  color: var(--foreground);
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
  display: inline-block;
}

.footer-tagline {
  font-size: 14px;
  margin: 2px 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-social {
    align-items: flex-end;
  }
}

.social-title {
  font-size: 14px;
  margin-bottom: 8px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-copyright {
  font-size: 12px;
}

/* Main Content */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Blog specific styles - Enhanced for modern design */
.blog-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 16px;
}

/* Modern Single Post Styles */
.modern-single {
  max-width: 1024px;
  padding: 120px 16px 80px;
}

@media (min-width: 768px) {
  .modern-single {
    padding: 192px 32px 128px;
  }
}

.single-post-wrapper {
  max-width: 4xl;
  margin: 0 auto;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
  margin-bottom: 32px;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
  list-style: none;
  padding: 0;
}

.breadcrumb-list a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-list a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--muted-foreground);
}

.current-page {
  color: var(--foreground);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Modern Article Header */
.modern-blog-header {
  margin-bottom: 48px;
}

/* Category Badge */
.category-badge {
  display: inline-flex;
  align-items: center;
  background-color: rgba(122, 95, 166, 0.1);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

/* Modern Blog Title */
.modern-blog-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--foreground);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .modern-blog-title {
    font-size: 3rem;
  }
}

/* Modern Meta Information */
.modern-blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 32px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

/* Modern Featured Image */
.modern-featured-image {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 48px;
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modern-featured-image:hover .featured-img {
  transform: scale(1.02);
}

/* Modern Blog Content */
.modern-blog-content {
  margin-bottom: 64px;
}

.article-prose {
  font-size: 18px;
  line-height: 1.7;
  color: var(--foreground);
  max-width: none;
}

.article-prose h1 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--foreground);
  margin: 48px 0 24px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .article-prose h1 {
    font-size: 2.5rem;
  }
}

.article-prose h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--foreground);
  margin: 40px 0 20px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .article-prose h2 {
    font-size: 1.875rem;
  }
}

.article-prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 32px 0 16px;
  line-height: 1.25;
}

@media (min-width: 768px) {
  .article-prose h3 {
    font-size: 1.5rem;
  }
}

.article-prose p {
  font-size: 16px;
  color: var(--foreground);
  margin-bottom: 24px;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .article-prose p {
    font-size: 18px;
  }
}

.article-prose ul {
  list-style-type: disc;
  list-style-position: inside;
  margin-bottom: 24px;
  color: var(--muted-foreground);
}

.article-prose ol {
  list-style-type: decimal;
  list-style-position: inside;
  margin-bottom: 24px;
  color: var(--muted-foreground);
}

.article-prose li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .article-prose li {
    font-size: 18px;
  }
}

.article-prose blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
  margin: 32px 0;
  background-color: rgba(122, 95, 166, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--muted-foreground);
}

.article-prose code {
  background-color: var(--muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: var(--foreground);
}

.article-prose pre {
  background-color: var(--muted);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.article-prose pre code {
  background-color: transparent;
  padding: 0;
  font-size: 14px;
}

.article-prose a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.article-prose a:hover {
  color: var(--primary-dark);
}

.article-prose img {
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 32px 0;
  max-width: 100%;
  height: auto;
}

.article-prose strong {
  font-weight: 600;
  color: var(--foreground);
}

.article-prose em {
  font-style: italic;
}

/* Modern Tags Section */
.modern-tags-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.tags-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  background-color: var(--muted);
  color: var(--muted-foreground);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tag-item:hover {
  background-color: var(--primary);
  color: white;
}

/* Modern Post Navigation */
.modern-post-navigation {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.post-nav-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .post-nav-links {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(122, 95, 166, 0.1);
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 20px;
  text-decoration: none;
  color: var(--foreground);
  height: 100%;
}

.nav-prev .nav-link {
  flex-direction: row;
}

.nav-next .nav-link {
  flex-direction: row-reverse;
}

.nav-arrow {
  font-size: 20px;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-arrow {
  transform: scale(1.1);
}

.nav-content {
  flex: 1;
  margin: 0 16px;
}

.nav-prev .nav-content {
  text-align: left;
}

.nav-next .nav-content {
  text-align: right;
}

.nav-label {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.3;
}

/* Back to Blog Link */
.back-to-blog-modern {
  display: flex;
  justify-content: center;
}

.back-to-blog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.back-to-blog-link:hover {
  color: var(--primary);
}

.back-icon {
  width: 16px;
  height: 16px;
}

/* Modern Author Bio */
.modern-author-bio {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px;
  background-color: var(--accent);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 48px;
}

.author-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.author-content {
  flex: 1;
}

.author-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.author-description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin: 0;
}

/* Responsive adjustments for modern design */
@media (max-width: 767px) {
  .modern-blog-title {
    font-size: 2rem;
  }
  
  .modern-blog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .modern-author-bio {
    flex-direction: column;
    text-align: center;
  }

  .author-content {
    text-align: left;
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.transition-all {
  transition: all 0.2s ease;
}

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

/* Legacy blog styles (for existing posts) */
.blog-post {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.blog-post:last-child {
  border-bottom: none;
}

.blog-title {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-title a {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-title a:hover {
  color: var(--primary);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.blog-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.read-more:hover::after {
  transform: translateX(4px);
}

/* Enhanced blog listing styles */
.blog-featured-image {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.blog-featured-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-featured-image:hover img {
  transform: scale(1.02);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #121212;
    --card-foreground: #fafafa;
    --muted: #212121;
    --muted-foreground: #999999;
    --border: #262626;
    --accent: #1a1a1a;
  }
}

/* Print styles */
@media print {
  .site-header,
  .site-footer,
  .breadcrumb-nav,
  .modern-post-navigation,
  .back-to-blog-modern {
    display: none;
  }
  
  .modern-single {
    padding: 20px 0;
  }
  
  .modern-blog-title {
    font-size: 24px;
    color: #000;
  }
  
  .article-prose {
    font-size: 12px;
    line-height: 1.4;
    color: #000;
  }
} 