/* === Apps hub — Sprint 1 (dense marketing) === */

.apps-page { background: #FFF9F0; }

/* ============ HERO (dark) ============ */
.apps-hero {
  background: linear-gradient(135deg, #0B1F1C 0%, #0F3330 55%, #1A4A42 100%);
  color: #FFF9F0;
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.apps-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(0, 150, 136, 0.25), transparent 60%);
  pointer-events: none;
}
.apps-hero .container { position: relative; z-index: 1; }

.apps-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7EE0D0;
  padding: 6px 14px;
  border: 1px solid rgba(126, 224, 208, 0.35);
  border-radius: 999px;
  margin-bottom: 24px;
  background: rgba(126, 224, 208, 0.08);
}

.apps-hero-title {
  font-family: var(--font-display, "Montserrat", sans-serif);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 20px;
  color: #FFF9F0;
  max-width: 780px;
}
.apps-hero-title em {
  color: #7EE0D0;
  font-style: normal;
}

.apps-hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 249, 240, 0.75);
  max-width: 640px;
  margin: 0 0 32px;
}

.apps-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ BOUTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all .2s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn svg { width: 18px; height: 18px; }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }

.btn-primary {
  background: var(--teal, #009688);
  color: #fff;
}
.btn-primary:hover {
  background: #007A6E;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(0, 150, 136, 0.6);
}

.btn-ghost {
  background: transparent;
  color: #FFF9F0;
  border: 1px solid rgba(255, 249, 240, 0.25);
}
.btn-ghost:hover {
  background: rgba(255, 249, 240, 0.08);
  border-color: rgba(255, 249, 240, 0.5);
}

.btn-disabled {
  background: #E8EAE8;
  color: #5A6663;
  cursor: not-allowed;
}

/* ============ SECTION LISTE ============ */
.apps-list-section {
  padding: clamp(56px, 7vw, 96px) 0;
}

.apps-section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.apps-section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal, #009688);
  margin-bottom: 12px;
  padding-left: 22px;
  position: relative;
}
.apps-section-kicker::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 14px; height: 2px;
  background: var(--teal, #009688);
  transform: translateY(-50%);
}
.apps-section-head h2 {
  font-family: var(--font-display, "Montserrat", sans-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink, #001a17);
  margin: 0 0 12px;
  line-height: 1.15;
}
.apps-section-head p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft, #3a4a47);
  margin: 0;
}

/* ============ GRILLE ============ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* ============ CARD ============ */
.app-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 26, 23, 0.08);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 26, 23, 0.04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -12px rgba(0, 26, 23, 0.14);
  border-color: rgba(0, 150, 136, 0.2);
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.app-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--app-color, #009688) 14%, transparent);
  color: var(--app-color, #009688);
  flex-shrink: 0;
}
.app-card-icon svg { width: 26px; height: 26px; stroke-width: 2; }

.app-card-meta { flex: 1; min-width: 0; }
.app-card-title {
  font-family: var(--font-display, "Montserrat", sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink, #001a17);
  margin: 0 0 2px;
  line-height: 1.25;
}
.app-card-subtitle {
  font-size: 0.82rem;
  color: #5A6663;
}

/* ============ BADGE ============ */
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.app-badge span { font-size: 0.6em; }
.status-live { background: #D1F4E0; color: #0A6B3B; }
.status-beta { background: #FCEFCB; color: #8A5A00; }
.status-soon { background: #E3E6F7; color: #3B47A8; }

/* ============ DESC + TAGS ============ */
.app-card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft, #3a4a47);
  margin: 0 0 14px;
}

.app-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.app-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: #F0F2F0;
  color: #3a4a47;
  border: 1px solid rgba(0, 26, 23, 0.05);
}

/* ============ PREVIEW (placeholder screenshot) ============ */
.app-card-preview {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--app-color, #009688) 10%, #FFF9F0) 0%,
    color-mix(in srgb, var(--app-color, #009688) 30%, #FFF9F0) 100%);
  display: grid;
  place-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--app-color, #009688);
  position: relative;
  overflow: hidden;
}
.app-card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.4), transparent 70%);
  pointer-events: none;
}
.app-card-preview svg {
  width: 40px; height: 40px;
  stroke-width: 1.5;
  opacity: 0.9;
  z-index: 1;
}
.app-card-preview-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink, #001a17);
  opacity: 0.5;
  z-index: 1;
}

/* ============ ACTIONS ============ */
.app-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
}
.app-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #001a17);
  text-decoration: none;
  transition: color .2s ease;
}
.app-card-link:hover { color: var(--teal, #009688); }

/* ============ CTA BANNER ============ */
.apps-cta-banner {
  padding: 0 0 clamp(64px, 8vw, 96px);
}
.apps-cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #0B1F1C 0%, #0F3330 100%);
  color: #FFF9F0;
  border-radius: 20px;
  box-shadow: 0 20px 40px -20px rgba(11, 31, 28, 0.4);
  flex-wrap: wrap;
}
.apps-cta-banner-content {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}
.apps-cta-banner-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(126, 224, 208, 0.12);
  color: #7EE0D0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.apps-cta-banner-icon svg { width: 26px; height: 26px; }
.apps-cta-banner-content strong {
  display: block;
  font-family: var(--font-display, "Montserrat", sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.apps-cta-banner-content p {
  font-size: 0.9rem;
  color: rgba(255, 249, 240, 0.72);
  margin: 0;
  line-height: 1.5;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .apps-grid { grid-template-columns: 1fr; gap: 18px; }
  .app-card { padding: 20px; }
  .apps-cta-banner-inner { padding: 22px; }
  .apps-cta-banner-inner .btn { width: 100%; justify-content: center; }
  .apps-hero-actions .btn { flex: 1; justify-content: center; min-width: 0; }
  .app-card-actions { flex-direction: column-reverse; align-items: stretch; }
  .app-card-actions .btn { justify-content: center; }
  .app-card-link { text-align: center; }
}

/* ============ PATCH v2.1 — Couleur des boutons par app + mobile 1 col ============ */

/* Bouton principal prend la couleur de l'app dans laquelle il est */
.app-card .btn-primary {
  background: var(--app-color, #009688);
}
.app-card .btn-primary:hover {
  background: var(--app-color, #009688);
  filter: brightness(0.85);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--app-color, #009688) 60%, transparent);
}

/* Lien "Voir les détails" en teal au survol */
.app-card-link:hover { color: var(--teal, #009688); }

/* Forcer 1 colonne en dessous de 768px (mobile confortable) */
@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
