
/* ==========================================================================
   TEKKI-FI — Feuille de style officielle
   Mobile-first | PHP / React | FinTech souveraine
   Palette : Emeraude #08766b | Navy | Or | Blanc
   ========================================================================== */

/* 1. Variables globales */
:root {
  --color-primary: #08766b;
  --color-primary-dark: #065f56;
  --color-primary-deep: #044b44;
  --color-primary-light: #e6f4f1;
  --color-primary-soft: #f0f9f7;

  --color-emerald-950: #022c22;
  --color-emerald-900: #064e3b;
  --color-emerald-800: #065f46;
  --color-emerald-700: #047857;
  --color-emerald-600: #059669;
  --color-emerald-500: #10b981;
  --color-emerald-100: #d1fae5;
  --color-emerald-50: #ecfdf5;

  --color-gold-400: #fbbf24;
  --color-gold-500: #f59e0b;
  --color-gold-600: #d97706;

  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;

  --color-success: #15803d;
  --color-success-bg: #f0fdf4;
  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;
  --color-danger: #b91c1c;
  --color-danger-bg: #fef2f2;
  --color-info: #0369a1;
  --color-info-bg: #f0f9ff;

  --font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-sm: 0 1px 3px rgb(15 23 42 / 0.08), 0 1px 2px rgb(15 23 42 / 0.04);
  --shadow-md: 0 4px 10px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 28px rgb(15 23 42 / 0.12);
  --shadow-focus: 0 0 0 3px rgb(8 118 107 / 0.18);

  --container-width: 1152px;
  --header-height: 64px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.25s ease;
}

/* 2. Reset et normalisation */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  padding: 0 0 3rem;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-slate-900);
  background: var(--color-slate-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

ul,
ol {
  padding-left: 1.25rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-top: 0;
}

:focus-visible {
  outline: 3px solid rgb(8 118 107 / 0.35);
  outline-offset: 2px;
}

/* 3. Utilitaires de structure */
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.page-main {
  padding-top: 1.5rem;
}

.section {
  margin-block: 2rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0;
  color: var(--color-slate-900);
  font-size: var(--font-size-xl);
  font-weight: 800;
  line-height: 1.25;
}

.section-description {
  margin: 0.35rem 0 0;
  color: var(--color-slate-500);
  font-size: var(--font-size-sm);
}

.text-muted { color: var(--color-slate-500); }
.text-primary { color: var(--color-primary); }
.text-gold { color: var(--color-gold-500); }
.text-center { text-align: center; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* 4. Header et navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  color: #fff;
  background: var(--color-emerald-950);
  border-bottom: 1px solid var(--color-emerald-800);
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--header-height);
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.75rem;
}

.brand-icon {
  display: flex;
  flex: 0 0 2.5rem;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-slate-900);
  background: linear-gradient(135deg, var(--color-gold-400), var(--color-emerald-500));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 1.125rem;
  font-weight: 800;
}

.brand-copy { min-width: 0; }

.brand-title {
  margin: 0;
  color: #fff;
  font-size: var(--font-size-lg);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin: 0.2rem 0 0;
  color: var(--color-emerald-100);
  font-size: var(--font-size-xs);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.badge-state {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.65rem;
  color: var(--color-emerald-100);
  background: var(--color-emerald-900);
  border: 1px solid var(--color-emerald-700);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.user-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  color: #fff;
  background: var(--color-emerald-800);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 700;
  white-space: nowrap;
}

/* 5. Bannière d'impact */
.impact-banner {
  position: relative;
  overflow: hidden;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--color-emerald-900),
    var(--color-primary),
    var(--color-slate-900)
  );
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.impact-banner-content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.banner-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  color: var(--color-slate-900);
  background: var(--color-gold-400);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.banner-title {
  margin: 0.85rem 0 0;
  color: #fff;
  font-size: var(--font-size-2xl);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.banner-desc {
  max-width: 42rem;
  margin: 0.65rem 0 0;
  color: var(--color-emerald-100);
  font-size: var(--font-size-sm);
  line-height: 1.65;
}

.banner-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.18);
}

.stat-item { min-width: 0; }

.stat-value {
  color: var(--color-gold-400);
  font-size: var(--font-size-xl);
  font-weight: 850;
  line-height: 1.2;
}

.stat-label {
  margin-top: 0.25rem;
  color: var(--color-emerald-100);
  font-size: var(--font-size-xs);
}

/* 6. Alertes et notifications */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.alert-success {
  color: var(--color-success);
  background: var(--color-success-bg);
  border-color: #bbf7d0;
}

.alert-warning {
  color: var(--color-warning);
  background: var(--color-warning-bg);
  border-color: #fde68a;
}

.alert-danger {
  color: var(--color-danger);
  background: var(--color-danger-bg);
  border-color: #fecaca;
}

.alert-info {
  color: var(--color-info);
  background: var(--color-info-bg);
  border-color: #bae6fd;
}

.alert-title {
  margin: 0 0 0.2rem;
  font-weight: 800;
}

.alert p:last-child { margin-bottom: 0; }

/* 7. Grille des projets */
.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.project-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 10rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-slate-900), var(--color-slate-800));
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(2 6 23 / 0.2), rgb(2 6 23 / 0.75));
}

.media-badges,
.video-play-btn {
  position: relative;
  z-index: 1;
}

.media-badges {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge-region {
  padding: 0.3rem 0.65rem;
  color: #fff;
  background: rgb(8 118 107 / 0.92);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.badge-type {
  padding: 0.25rem 0.6rem;
  color: var(--color-slate-900);
  background: var(--color-gold-400);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-align: right;
}

.video-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-slate-100);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #fff;
  background: rgb(255 255 255 / 0.2);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
}

.card-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.category-tag {
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.project-roi {
  color: var(--color-slate-500);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

.project-roi strong { color: var(--color-primary); }

.project-title {
  margin: 0.3rem 0 0;
  color: var(--color-slate-900);
  font-size: var(--font-size-base);
  font-weight: 800;
  line-height: 1.4;
}

.promoter-name {
  margin: 0.35rem 0 0;
  color: var(--color-slate-500);
  font-size: var(--font-size-xs);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.75rem;
  color: var(--color-slate-500);
  font-size: var(--font-size-xs);
}

/* 8. Progression du financement */
.progress-container { margin-top: 1.15rem; }

.progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.progress-raised { color: var(--color-slate-700); }
.progress-percent { color: var(--color-primary); }

.progress-bar-bg {
  width: 100%;
  height: 0.625rem;
  overflow: hidden;
  background: var(--color-slate-100);
  border-radius: var(--radius-full);
}

.progress-bar-fill {
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, var(--color-primary), var(--color-emerald-500));
  border-radius: var(--radius-full);
  transition: width 0.45s ease;
}

.progress-target {
  margin: 0.35rem 0 0;
  color: var(--color-slate-400);
  font-size: var(--font-size-xs);
}

/* 9. Impact et abondement */
.impact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.7rem;
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-100);
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
}

.impact-label { color: var(--color-slate-600); }

.impact-value {
  color: var(--color-slate-900);
  font-weight: 800;
  text-align: right;
}

.matching-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  border: 1px solid #b9e2db;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
}

/* 10. Simulateur d'impact */
.impact-simulator {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.simulator-title {
  margin: 0 0 1rem;
  font-size: var(--font-size-lg);
  font-weight: 800;
}

.simulator-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.simulator-result {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-primary-soft);
  border: 1px solid #cce8e2;
  border-radius: var(--radius-md);
}

.simulator-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-slate-700);
  font-size: var(--font-size-sm);
}

.simulator-total {
  padding-top: 0.75rem;
  border-top: 1px solid #b9e2db;
  color: var(--color-primary-dark);
  font-size: var(--font-size-lg);
  font-weight: 850;
}

/* 11. Formulaires et contrôles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-label {
  color: var(--color-slate-700);
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.form-control,
.input-amount,
.select-payment,
.form-textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.6rem 0.75rem;
  color: var(--color-slate-900);
  background: #fff;
  border: 1px solid var(--color-slate-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.input-amount:focus,
.select-payment:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-focus);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-help {
  color: var(--color-slate-500);
  font-size: var(--font-size-xs);
}

.form-error {
  color: var(--color-danger);
  font-size: var(--font-size-xs);
}

.invest-form {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-slate-100);
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.input-amount,
.select-payment {
  min-width: 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary,
.btn-invest {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-invest:hover {
  color: #fff;
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-gold {
  color: var(--color-slate-900);
  background: var(--color-gold-400);
  border-color: var(--color-gold-400);
}

.btn-gold:hover { background: var(--color-gold-500); }

.btn-outline {
  color: var(--color-primary);
  background: transparent;
  border-color: var(--color-primary);
}

.btn-outline:hover {
  color: #fff;
  background: var(--color-primary);
}

.btn-invest {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-size: var(--font-size-xs);
  box-shadow: var(--shadow-sm);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn-invest:disabled {
  color: var(--color-slate-500);
  background: var(--color-slate-200);
  border-color: var(--color-slate-200);
  box-shadow: none;
}

/* 12. Badges de statut */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 800;
  line-height: 1.4;
}

.badge-pending { color: #92400e; background: #fef3c7; }
.badge-completed { color: #166534; background: #dcfce7; }
.badge-failed { color: #991b1b; background: #fee2e2; }
.badge-neutral { color: var(--color-slate-700); background: var(--color-slate-100); }

/* 13. Cartes et tableaux de bord */
.card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.kpi-card {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.kpi-label {
  color: var(--color-slate-500);
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.kpi-value {
  margin-top: 0.4rem;
  color: var(--color-slate-900);
  font-size: var(--font-size-2xl);
  font-weight: 850;
  line-height: 1.2;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-slate-100);
  font-size: var(--font-size-sm);
}

.data-table th {
  color: var(--color-slate-600);
  background: var(--color-slate-50);
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.data-table tbody tr:hover { background: var(--color-slate-50); }
.data-table tbody tr:last-child td { border-bottom: 0; }

/* 14. Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  background: rgb(2 6 23 / 0.65);
}

.modal {
  width: min(100%, 520px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 850;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-slate-600);
  background: var(--color-slate-100);
  border: 0;
  border-radius: var(--radius-full);
}

/* 15. États de chargement et listes */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem 1rem;
  color: var(--color-slate-500);
  font-size: var(--font-size-sm);
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--color-slate-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: tekki-spin 0.8s linear infinite;
}

@keyframes tekki-spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  padding: 2.5rem 1rem;
  color: var(--color-slate-500);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--color-slate-300);
  border-radius: var(--radius-lg);
}

.empty-state i {
  margin-bottom: 0.75rem;
  color: var(--color-slate-400);
  font-size: 2rem;
}

/* 16. Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.5rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0.4rem 0.65rem;
  color: var(--color-slate-700);
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

.pagination .active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* 17. Pied de page */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  color: var(--color-slate-500);
  background: #fff;
  border-top: 1px solid var(--color-slate-200);
  font-size: var(--font-size-xs);
  text-align: center;
}

.site-footer a {
  color: var(--color-primary);
  font-weight: 700;
}

/* 18. Responsive tablette */
@media (min-width: 640px) {
  .container {
    width: min(100% - 3rem, var(--container-width));
  }

  .impact-banner { padding: 2rem; }
  .banner-title { font-size: var(--font-size-3xl); }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .simulator-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 19. Responsive desktop */
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .impact-banner { padding: 2.25rem; }
}

/* 20. Petits écrans */
@media (max-width: 480px) {
  .container {
    width: min(100% - 1.25rem, var(--container-width));
  }

  .site-header,
  .header-content {
    min-height: 60px;
  }

  .brand-subtitle { max-width: 175px; font-size: 0.68rem; }
  .header-actions { gap: 0.4rem; }
  .badge-state { display: none; }

  .user-wallet {
    padding: 0.4rem 0.55rem;
    font-size: var(--font-size-xs);
  }

  .impact-banner {
    padding: 1.15rem;
    border-radius: var(--radius-lg);
  }

  .banner-title { font-size: 1.35rem; }
  .banner-stats { gap: 0.5rem; }
  .stat-value { font-size: 1.05rem; }
  .stat-label { font-size: 0.68rem; }
  .card-body { padding: 1rem; }
  .form-row { flex-direction: column; }

  .input-amount,
  .select-payment {
    width: 100%;
  }
}

/* 21. Accessibilité : réduction des animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 22. Impression */
@media print {
  body {
    padding: 0;
    color: #000;
    background: #fff;
  }

  .site-header {
    position: static;
    color: #000;
    background: #fff;
    border-bottom: 1px solid #ccc;
  }

  .header-actions,
  .invest-form,
  .btn,
  .site-footer {
    display: none !important;
  }

  .project-card,
  .card,
  .kpi-card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* ==========================================================================
   23. Direction artistique premium — TEKKI-FI / Poppins
   ========================================================================== */

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  background:
    radial-gradient(circle at 8% 8%, rgb(8 118 107 / 0.055), transparent 25rem),
    linear-gradient(180deg, #f8fbfa 0%, #f5f8f7 48%, #f8fafc 100%);
}

.container { max-width: 1180px; }

/* Navigation */
.site-header {
  min-height: 72px;
  background: linear-gradient(110deg, #032b27 0%, #064e46 58%, #08766b 100%);
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  box-shadow: 0 8px 24px rgb(2 44 34 / 0.13);
  backdrop-filter: blur(14px);
}

.header-content { min-height: 72px; }
.brand-logo { gap: 0.9rem; }

.brand-icon {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffd56a 0%, #fbbf24 45%, #10b981 100%);
  box-shadow: 0 7px 18px rgb(0 0 0 / 0.18);
}

.brand-title {
  font-size: 1.2rem;
  letter-spacing: 0.035em;
}

.brand-subtitle {
  color: #c5eee5;
  font-size: 0.68rem;
  letter-spacing: 0.01em;
}

.badge-state {
  padding: 0.42rem 0.8rem;
  background: rgb(255 255 255 / 0.09);
  border-color: rgb(255 255 255 / 0.18);
  color: #e0fff6;
}

.user-wallet {
  min-height: 40px;
  padding-inline: 0.95rem;
  background: #fbbf24;
  color: #18251f;
  border-radius: 11px;
  box-shadow: 0 5px 14px rgb(0 0 0 / 0.12);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.user-wallet:hover {
  color: #18251f;
  background: #fcd34d;
  transform: translateY(-1px);
}

/* Bannière */
.impact-banner {
  isolation: isolate;
  min-height: 300px;
  margin-top: 1.8rem;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 18%, rgb(16 185 129 / 0.28), transparent 17rem),
    radial-gradient(circle at 72% 100%, rgb(251 191 36 / 0.12), transparent 19rem),
    linear-gradient(118deg, #032b27 0%, #075e54 54%, #0f172a 100%);
  box-shadow: 0 22px 55px rgb(2 44 34 / 0.18);
}

.impact-banner::after {
  position: absolute;
  z-index: -1;
  right: -5rem;
  bottom: -10rem;
  width: 24rem;
  height: 24rem;
  content: "";
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgb(255 255 255 / 0.025),
    0 0 0 58px rgb(255 255 255 / 0.02);
}

.banner-tag {
  padding: 0.42rem 0.9rem;
  letter-spacing: 0.075em;
  box-shadow: 0 5px 15px rgb(0 0 0 / 0.12);
}

.banner-title {
  max-width: 760px;
  margin-top: 1.1rem;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.17;
  letter-spacing: -0.045em;
}

.banner-desc {
  max-width: 650px;
  margin-top: 0.9rem;
  color: #d6f5ec;
  font-size: 0.94rem;
  line-height: 1.8;
}

.banner-stats {
  max-width: 650px;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
}

.stat-value {
  font-size: clamp(1.15rem, 2.4vw, 1.65rem);
  letter-spacing: -0.035em;
}

.stat-label {
  margin-top: 0.35rem;
  line-height: 1.5;
}

/* Titres de sections */
.section { margin-block: 2.4rem; }
.section-header { margin-bottom: 1.25rem; }

.section-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.035em;
}

.section-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #b77905;
  background: #fff4d6;
  border-radius: 12px;
  font-size: 0.95rem;
}

.section-description {
  margin-top: 0.4rem;
  line-height: 1.7;
}

/* Cartes projets */
.projects-grid { gap: 1.35rem; }

.project-card {
  position: relative;
  border-color: #e5ece9;
  border-radius: 20px;
  box-shadow: 0 5px 18px rgb(15 23 42 / 0.045);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: #b9ddd5;
  box-shadow: 0 18px 38px rgb(8 118 107 / 0.12);
}

.card-media {
  min-height: 172px;
  padding: 1.15rem;
  background:
    radial-gradient(circle at 82% 15%, rgb(16 185 129 / 0.25), transparent 8rem),
    linear-gradient(135deg, #0f2928 0%, #123f3a 55%, #0f172a 100%);
}

.card-media::after {
  position: absolute;
  right: 1.2rem;
  bottom: -2.8rem;
  width: 8rem;
  height: 8rem;
  content: "";
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgb(255 255 255 / 0.025);
}

.badge-region {
  background: rgb(8 118 107 / 0.94);
  border: 1px solid rgb(255 255 255 / 0.15);
}

.badge-type {
  max-width: 58%;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.play-icon {
  width: 40px;
  height: 40px;
  color: #fbbf24;
  background: rgb(255 255 255 / 0.13);
  border: 1px solid rgb(255 255 255 / 0.2);
}

.card-body { padding: 1.3rem; }
.category-tag { letter-spacing: 0.07em; }

.project-title {
  margin-top: 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
}

.promoter-name { margin-top: 0.45rem; }
.project-meta { margin-top: 0.9rem; }

.matching-badge {
  padding: 0.34rem 0.65rem;
  background: #e8f6f2;
  border-color: #cce8df;
  color: #08675d;
}

.progress-container { margin-top: 1.25rem; }

.progress-bar-bg {
  height: 9px;
  background: #edf2f0;
}

.progress-bar-fill {
  background: linear-gradient(90deg, #08766b, #16a085);
  box-shadow: 0 0 10px rgb(8 118 107 / 0.18);
}

.impact-box {
  padding: 0.8rem 0.85rem;
  background: linear-gradient(110deg, #f4faf8, #f8fafc);
  border-color: #e7f0ed;
}

.impact-value {
  color: #08766b;
  font-size: 0.95rem;
}

/* Formulaire d'investissement */
.invest-form {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top-color: #edf1ef;
}

.form-row { gap: 0.6rem; }

.input-amount,
.select-payment {
  min-height: 44px;
  padding-inline: 0.8rem;
  background: #fbfdfc;
  border-color: #dce7e3;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.78rem;
}

.input-amount:focus,
.select-payment:focus {
  outline: none;
  border-color: #08766b;
  box-shadow: 0 0 0 3px rgb(8 118 107 / 0.12);
}

.btn-invest {
  min-height: 46px;
  border-radius: 12px;
  background: linear-gradient(105deg, #08766b, #066257);
  box-shadow: 0 7px 16px rgb(8 118 107 / 0.17);
  letter-spacing: 0.005em;
}

.btn-invest:hover:not(:disabled) {
  background: linear-gradient(105deg, #066257, #044b44);
  box-shadow: 0 10px 20px rgb(8 118 107 / 0.22);
  transform: translateY(-1px);
}

.form-help {
  display: block;
  margin-top: 0.6rem;
  line-height: 1.55;
}

/* Simulateur */
.impact-simulator {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-color: #dcebe6;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.055);
}

.impact-simulator::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, #08766b, #10b981, #fbbf24);
}

.simulator-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.simulator-title i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #e8f6f2;
  border-radius: 12px;
}

.simulator-result {
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding: 1.15rem;
  background: linear-gradient(125deg, #eff9f6, #f8fbfa);
  border: 1px solid #d5ebe4;
  border-radius: 15px;
}

.simulator-line { font-size: 0.9rem; }

.simulator-line strong {
  color: #0f2928;
  font-variant-numeric: tabular-nums;
}

.simulator-total {
  margin-top: 0.2rem;
  padding-top: 0.95rem;
  border-top-color: #c8e4db;
  color: #075e54;
  font-size: 1rem;
}

.simulator-total strong {
  color: #08766b;
  font-size: 1.2rem;
}

/* Alertes et pied de page */
.alert {
  border-radius: 14px;
  box-shadow: 0 3px 12px rgb(15 23 42 / 0.035);
}

.site-footer {
  margin-top: 4rem;
  padding-block: 2rem;
  background: #fff;
  border-top: 1px solid #e5eeea;
  line-height: 1.8;
}

.site-footer p { margin-bottom: 0.35rem; }


/* Tablette et mobile */
@media (max-width: 640px) {
  .site-header,
  .header-content {
    min-height: 66px;
  }

  .brand-icon {
    width: 41px;
    height: 41px;
    flex-basis: 41px;
  }

  .brand-title { font-size: 1.05rem; }

  .brand-subtitle {
    max-width: 155px;
    font-size: 0.62rem;
  }

  .user-wallet {
    min-height: 36px;
    padding-inline: 0.65rem;
    font-size: 0.72rem;
  }

  .impact-banner {
    min-height: auto;
    margin-top: 1rem;
    padding: 1.35rem;
    border-radius: 20px;
  }

  .banner-title { font-size: 1.75rem; }
  .banner-desc { font-size: 0.85rem; }
  .banner-stats { gap: 0.65rem; }
  .stat-value { font-size: 1.05rem; }
  .stat-label { font-size: 0.66rem; }
  .projects-grid { gap: 1rem; }
  .project-card:hover { transform: none; }
  .card-media { min-height: 155px; }
  .card-body { padding: 1.05rem; }
  .simulator-line { font-size: 0.82rem; }
}

@media (max-width: 380px) {
  .brand-subtitle { display: none; }
  .user-wallet span { display: none; }

  .banner-stats {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .stat-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

/* Accessibilité : réduction des animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Accessibilité : texte réservé aux lecteurs d'écran */
.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;
}

/* Impression */
@media print {
  body {
    padding: 0;
    color: #000;
    background: #fff;
  }

  .site-header {
    position: static;
    color: #000;
    background: #fff;
    border-bottom: 1px solid #ccc;
  }

  .header-actions,
  .invest-form,
  .btn,
  .site-footer {
    display: none !important;
  }

  .project-card,
  .card,
  .kpi-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
