/*
Theme Name: Akra Theme V2
Theme URI: https://amineakra.com
Author: Amine Akra
Author URI: https://amineakra.com
Description: Thème premium pour freelance marketing digital — dark mode, glassmorphism, templates complets pour services et cas clients.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akra-theme-v2
Tags: dark-mode, portfolio, freelance, marketing, one-page, custom-post-types
*/

/* ============================================================
   DESIGN SYSTEM — VARIABLES CSS
   ============================================================ */

:root {
  /* === COULEURS PRINCIPALES === */
  --bg:           #0a0b0f;
  --bg-2:         #0f1117;
  --bg-3:         #141720;
  --bg-card:      #1a1d26;
  --bg-hover:     #1e2235;

  --blue:         #3b82f6;
  --blue-light:   #60a5fa;
  --blue-dark:    #1d4ed8;
  --cyan:         #06b6d4;
  --purple:       #a855f7;
  --green:        #10b981;
  --orange:       #f97316;
  --red:          #ef4444;
  --pink:         #ec4899;

  /* === TEXTE === */
  --ink:          #f1f5f9;
  --ink-2:        #cbd5e1;
  --ink-3:        #94a3b8;
  --ink-4:        #64748b;

  /* === BORDURES === */
  --border:       rgba(148, 163, 184, 0.10);
  --border-hover: rgba(148, 163, 184, 0.25);
  --border-active: var(--blue);

  /* === GLASSMORPHISM === */
  --glass:        rgba(15, 23, 42, 0.40);
  --glass-light:  rgba(30, 41, 59, 0.50);
  --glass-strong: rgba(10, 11, 15, 0.70);
  --blur:         blur(20px);
  --blur-sm:      blur(10px);

  /* === GRADIENTS === */
  --grad-blue:    linear-gradient(135deg, var(--blue) 0%, var(--cyan) 100%);
  --grad-purple:  linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  --grad-card:    linear-gradient(160deg, rgba(59,130,246,0.08) 0%, rgba(6,182,212,0.04) 100%);
  --grad-hero:    linear-gradient(135deg, #0a0b0f 0%, #0d1829 50%, #0a0b0f 100%);

  /* === OMBRES === */
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.25);
  --shadow-md:    0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg:    0 16px 48px rgba(0,0,0,0.45);
  --shadow-blue:  0 8px 32px rgba(59,130,246,0.25);
  --shadow-blue-lg: 0 16px 56px rgba(59,130,246,0.35);

  /* === TYPOGRAPHIE === */
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* === RAYONS === */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-2xl:  28px;
  --r-full: 999px;

  /* === TRANSITIONS === */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:   150ms;
  --t-med:    300ms;
  --t-slow:   500ms;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  background-image: var(--grad-hero);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--ink); }

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */

.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }
.text-5xl  { font-size: 3rem; }
.text-6xl  { font-size: 3.75rem; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }

.section {
  padding: 80px 0;
}

.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.grid { display: grid; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ============================================================
   COMPONENTS — BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--t-med) var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  outline: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--grad-blue);
  color: white;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue-lg);
  color: white;
}

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

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--glass-light);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-light);
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
}

.btn-ghost:hover { gap: 12px; }

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.0625rem;
}

/* ============================================================
   COMPONENTS — CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  transition: all var(--t-med) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
  z-index: 0;
  border-radius: inherit;
}

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

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

.card > * { position: relative; z-index: 1; }

/* Glassmorphism card variant */
.card-glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,0.06),
    var(--shadow-sm);
}

/* ============================================================
   COMPONENTS — BADGES & TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 500;
}

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-light);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  color: var(--ink-3);
  transition: all var(--t-fast);
}

.tag:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  background: rgba(59,130,246,0.08);
}

/* ============================================================
   COMPONENTS — SECTION HEADERS
   ============================================================ */

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue-light);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 20px;
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

h2.section-title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--ink-3);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Gradient text */
.gradient-text {
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   COMPONENTS — DIVIDERS
   ============================================================ */

.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ============================================================
   COMPONENTS — STATS
   ============================================================ */

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--grad-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-top: 6px;
}

/* ============================================================
   COMPONENTS — FAQ ACCORDION
   ============================================================ */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--t-med);
}

.faq-item.is-open { border-color: var(--blue); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color var(--t-fast);
}

.faq-question:hover { color: var(--blue-light); }

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-med) var(--ease-out);
  color: var(--ink-3);
  font-size: 18px;
  line-height: 1;
}

.faq-item.is-open .faq-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow) var(--ease-out), padding var(--t-med);
  padding: 0 24px;
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* ============================================================
   COMPONENTS — BREADCRUMB
   ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-4);
  margin-bottom: 32px;
}

.breadcrumb a { color: var(--ink-4); transition: color var(--t-fast); }
.breadcrumb a:hover { color: var(--blue-light); }
.breadcrumb .sep { color: var(--ink-4); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

@keyframes scroll-infinite {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(59,130,246,0.3); }
  50%       { box-shadow: 0 0 40px rgba(59,130,246,0.5); }
}

/* Scroll-triggered classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   COMPONENTS — SCROLL PROGRESS BAR
   ============================================================ */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--grad-blue);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */

.show-mobile { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block; }
  .section { padding: 56px 0; }
  .section-lg { padding: 72px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
}
