/* =============================================
   Cellule de Mondialisation — Portail National
   Shared Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Cairo:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&display=swap');

:root {
  /* Brand Colors */
  --navy:    #0A1628;
  --navy2:   #0F1F3D;
  --blue:    #1A4F8A;
  --blue2:   #2563EB;
  --gold:    #C9A84C;
  --gold2:   #F0C040;
  --green:   #0E7C4A;
  --green2:  #10B981;
  --red:     #C53030;

  /* Surfaces */
  --surface:  #111827;
  --surface2: #1C2B40;
  --surface3: #243450;
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.14);

  /* Text */
  --text:   #E8EDF5;
  --text2:  #C5CFDF;
  --muted:  #7B8BA4;
  --muted2: #556070;

  /* UI */
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

[dir="rtl"] body,
[dir="rtl"] { font-family: 'Cairo', sans-serif; }

/* ---- TYPOGRAPHY ---- */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
[dir="rtl"] .font-display { font-family: 'Cairo', sans-serif; }

h1,h2,h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3 { font-family: 'Cairo', sans-serif; font-weight: 700; }

h1 { font-size: clamp(28px,5vw,52px); font-weight: 900; }
h2 { font-size: clamp(22px,3.5vw,36px); font-weight: 700; }
h3 { font-size: clamp(16px,2vw,22px); font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; font-family: 'Plus Jakarta Sans', sans-serif; }

/* ---- NAVBAR ---- */
.intl-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(10,22,40,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.nav-brand-text { display: flex; flex-direction: column; }
.nav-brand-text .top { font-family: 'Playfair Display', serif; font-size: 15px; font-weight: 700; color: var(--gold); line-height: 1; }
.nav-brand-text .bot { font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
[dir="rtl"] .nav-brand-text .top { font-family: 'Cairo', sans-serif; }

.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.07);
  color: var(--text);
}
.nav-links a.active { color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---- LANG SWITCHER ---- */
.lang-sw {
  display: flex; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.lang-sw button {
  padding: 5px 11px; font-size: 11px; font-weight: 700;
  cursor: pointer; color: var(--muted);
  border: none; background: none; transition: all 0.2s;
  letter-spacing: 0.5px;
}
.lang-sw button.active { background: var(--blue2); color: white; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all 0.25s; font-family: inherit;
}
.btn-primary { background: var(--blue2); color: white; }
.btn-primary:hover { background: #3B82F6; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.4); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: var(--navy); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.35); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--border2); }
.btn-green { background: var(--green); color: white; }
.btn-green:hover { background: var(--green2); transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: var(--red); color: white; }

/* ---- CARDS ---- */
.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-sm { padding: 16px; border-radius: 10px; }
.card-hover { transition: all 0.25s; }
.card-hover:hover { transform: translateY(-4px); border-color: rgba(37,99,235,0.35); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }

/* ---- BADGES ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
}
.badge-blue   { background: rgba(37,99,235,0.15); color: #6BA4FF; border: 1px solid rgba(37,99,235,0.25); }
.badge-gold   { background: rgba(201,168,76,0.15); color: var(--gold2); border: 1px solid rgba(201,168,76,0.25); }
.badge-green  { background: rgba(16,185,129,0.12); color: var(--green2); border: 1px solid rgba(16,185,129,0.25); }
.badge-red    { background: rgba(197,48,48,0.12); color: #FC8181; border: 1px solid rgba(197,48,48,0.25); }
.badge-muted  { background: var(--surface3); color: var(--muted); border: 1px solid var(--border); }

/* ---- SECTION TITLES ---- */
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: ''; width: 28px; height: 2px; background: var(--gold); border-radius: 2px;
}
[dir="rtl"] .section-eyebrow { flex-direction: row-reverse; }
[dir="rtl"] .section-eyebrow::before { display: none; }
[dir="rtl"] .section-eyebrow::after {
  content: ''; width: 28px; height: 2px; background: var(--gold); border-radius: 2px;
}

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

/* ---- TABLES ---- */
.intl-table { width: 100%; border-collapse: collapse; }
.intl-table th {
  text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
[dir="rtl"] .intl-table th { text-align: right; }
.intl-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text2);
}
[dir="rtl"] .intl-table td { text-align: right; }
.intl-table tr:hover td { background: rgba(255,255,255,0.03); }
.intl-table tr:last-child td { border-bottom: none; }

/* ---- FORM ---- */
.intl-input {
  width: 100%; background: var(--surface3);
  border: 1px solid var(--border2); border-radius: 10px;
  padding: 12px 16px; color: var(--text);
  font-family: inherit; font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.intl-input:focus { border-color: var(--blue2); }
.intl-input::placeholder { color: var(--muted2); }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; }
.form-group { margin-bottom: 18px; }

/* ---- PROGRESS ---- */
.progress-bar { width: 100%; height: 5px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue2), var(--gold)); border-radius: 99px; }

/* ---- AVATAR ---- */
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: white; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
}

/* ---- SIDEBAR LAYOUT ---- */
.app-layout { display: flex; min-height: calc(100vh - 68px); }
.sidebar {
  width: 240px; background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 2px;
}
[dir="rtl"] .sidebar { border-right: none; border-left: 1px solid var(--border); }
.sidebar-section { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted2); padding: 12px 12px 6px; margin-top: 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all 0.2s;
}
.sidebar-link:hover { background: var(--surface2); color: var(--text); }
.sidebar-link.active { background: rgba(37,99,235,0.15); color: #6BA4FF; }
.sidebar-link .icon { font-size: 16px; width: 20px; text-align: center; }
.main-content { flex: 1; padding: 32px; overflow-y: auto; }

/* ---- STATS ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
}
.stat-value { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 900; margin: 6px 0 4px; }
[dir="rtl"] .stat-value { font-family: 'Cairo', sans-serif; }
.stat-label { font-size: 12px; color: var(--muted); }

/* ---- HERO DECORATIONS ---- */
.hero-glow {
  position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none; opacity: 0.25;
}

/* ---- ACCORDION ---- */
.acc-item {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 11px; overflow: hidden; margin-bottom: 6px; transition: border-color 0.2s;
}
.acc-item.open { border-color: rgba(37,99,235,0.35); }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; background: none; border: none;
  cursor: pointer; color: var(--text); gap: 12px; text-align: left;
  font-family: inherit; font-size: 14px; font-weight: 500;
}
[dir="rtl"] .acc-trigger { text-align: right; flex-direction: row-reverse; }
.acc-trigger:hover { background: rgba(255,255,255,0.03); }
.acc-arrow { color: var(--muted); transition: transform 0.3s; font-size: 12px; flex-shrink: 0; }
.acc-item.open .acc-arrow { transform: rotate(180deg); color: var(--blue2); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.acc-item.open .acc-body { max-height: 600px; }
.acc-inner { padding: 0 20px 20px; font-size: 14px; color: var(--muted); line-height: 1.8; border-top: 1px solid var(--border); padding-top: 16px; }

/* ---- UTILITY ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.text-blue { color: #6BA4FF; }
.text-green { color: var(--green2); }
.text-red { color: #FC8181; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes shimmer { 0%,100% { opacity:0.4; } 50% { opacity:1; } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
@keyframes spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }

.animate-up { animation: fadeUp 0.55s ease-out both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .intl-nav { padding: 0 20px; }
  .nav-links { display: none; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 16px; }
}
