/* ============================================================
   SESAME SMART OPS 360 — Portail Applications Métiers
   Design : clair, professionnel, moderne
   Palette : Navy #1a2b6b · Cyan #1e9de0 · Vert #3dab29
             Orange #f47c20 · Teal #00b8a0 · Violet #7b3fb0
   ============================================================ */

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

:root {
  --bg:         #f0f4f8;
  --bg-card:    #ffffff;
  --border:     #e2e8f0;
  --border-2:   #cbd5e1;
  --txt:        #0f172a;
  --txt-2:      #475569;
  --txt-3:      #94a3b8;
  --navy:       #1a2b6b;
  --navy-light: #2a3f8f;
  --cyan:       #1e9de0;
  --green:      #3dab29;
  --orange:     #f47c20;
  --teal:       #00b8a0;
  --purple:     #7b3fb0;
  --red:        #e53e3e;
  --shadow:     0 1px 4px rgba(15,23,42,.06), 0 4px 16px rgba(15,23,42,.04);
  --shadow-md:  0 4px 24px rgba(15,23,42,.10);
  --shadow-lg:  0 8px 40px rgba(15,23,42,.14);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
}

html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── TOPBAR ─────────────────────────────────────────────── */
#portal-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
}

.p-topbar-inner {
  background: var(--navy);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 18px;
  box-shadow: 0 2px 12px rgba(26,43,107,.25);
}

.p-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.p-topbar-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.p-topbar-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.p-topbar-name {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.p-topbar-name strong { font-weight: 900; color: #fff; }

.p-topbar-tag {
  font-size: 10px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.p-topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.p-topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-sm);
  padding: 6px 14px;
  width: 360px;
  max-width: 100%;
}
.p-topbar-search i { color: rgba(255,255,255,.5); font-size: 13px; }
.p-topbar-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
}
.p-topbar-search input::placeholder { color: rgba(255,255,255,.4); }

.p-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.p-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(61,171,41,.15);
  border: 1px solid rgba(61,171,41,.3);
  color: #7effa0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.p-live-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

.p-clock {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.p-topbar-btn {
  color: rgba(255,255,255,.65);
  font-size: 16px;
  padding: 5px 7px;
  border-radius: var(--r-sm);
  transition: all .15s;
}
.p-topbar-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── HERO ────────────────────────────────────────────────── */
#portal-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1b3f8b 55%, #1a4da0 100%);
  padding: 40px 28px 36px;
}

.p-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.p-hero-left { flex: 1; min-width: 0; }

.p-hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.p-hero-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(61,171,41,.15);
  border: 1px solid rgba(61,171,41,.3);
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.p-hero-badge-live i { font-size: 8px; color: var(--green); }

.p-hero-badge-dev {
  display: inline-flex;
  align-items: center;
  background: rgba(30,157,224,.15);
  border: 1px solid rgba(30,157,224,.3);
  color: #93d0f9;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.p-hero-title {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.p-hero-accent { color: var(--cyan); }

.p-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.p-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.p-hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
  box-shadow: 0 4px 16px rgba(30,157,224,.35);
}
.p-hero-cta-primary:hover { background: #1887bf; transform: translateY(-1px); }

.p-hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  transition: all .15s;
}
.p-hero-cta-secondary:hover { background: rgba(255,255,255,.18); }

.p-hero-stats-row {
  display: flex;
  gap: 28px;
}

.p-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.p-hero-stat-n {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.p-hero-stat-l {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.p-hero-right { flex-shrink: 0; }

.p-hero-logo-wrap {
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-hero-logo-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.3));
}

/* ── STATSBAR ────────────────────────────────────────────── */
#portal-statsbar {
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--border);
  padding: 12px 28px;
}

.p-statsbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.p-statsbar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-2);
}
.p-statsbar-item strong { color: var(--txt); font-weight: 800; }
.p-statsbar-item i { font-size: 14px; }

.p-statsbar-sep {
  width: 1px;
  height: 20px;
  background: var(--border-2);
  flex-shrink: 0;
}

.p-statsbar-prog {
  width: 60px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
}
.p-statsbar-prog-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 3px;
  transition: width .6s ease;
}

/* ── APPS SECTION ────────────────────────────────────────── */
#portal-apps-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* ── FILTERS ─────────────────────────────────────────────── */
.p-filters-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.p-filters-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.p-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--txt-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.p-filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.p-filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.p-filter-count {
  background: rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
}
.p-filter-btn:not(.active) .p-filter-count {
  background: var(--border);
  color: var(--txt-3);
}

.p-filters-cat {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.p-cat-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--txt-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.p-cat-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.p-cat-btn.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #fff;
}

/* ── GRID ─────────────────────────────────────────────────── */
.p-grid-featured {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.p-grid-regular {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* ── APP CARDS ───────────────────────────────────────────── */
.p-app-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.p-app-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border-2);
}

.p-app-card-featured {
  border-color: var(--green);
  background: linear-gradient(135deg, #f0fdf4, #fff);
  box-shadow: 0 4px 24px rgba(61,171,41,.12);
}
.p-app-card-featured:hover {
  box-shadow: 0 8px 40px rgba(61,171,41,.18);
}

/* Card Header */
.p-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.p-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.p-card-version {
  font-size: 10px;
  font-weight: 700;
  color: var(--txt-3);
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 10px;
}

/* Status badges */
.p-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.p-status.live    { background: #dcfce7; color: #166534; }
.p-status.dev     { background: #dbeafe; color: #1e40af; }
.p-status.planned { background: #ede9fe; color: #5b21b6; }
.p-status i { font-size: 8px; }

/* Card Body */
.p-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.p-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--txt);
  letter-spacing: -0.2px;
}

.p-card-short {
  font-size: 12px;
  color: var(--txt-2);
  font-weight: 500;
}

.p-progress-wrap {
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.p-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

.p-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.p-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--txt-2);
  border: 1px solid var(--border);
}

/* Card Footer */
.p-card-footer { margin-top: auto; }

.p-btn-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  border: none;
}
.p-btn-live:hover { background: var(--navy-light); }

.p-btn-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid var(--border-2);
  color: var(--txt-2);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.p-btn-info:hover { border-color: var(--cyan); color: var(--cyan); background: #f0f9ff; }

/* ── PER-APP ICON COLORS ──────────────────────────────────── */
.p-icon-hse           { background: #dcfce7; color: #15803d; }
.p-icon-maintenance   { background: #dbeafe; color: #1d4ed8; }
.p-icon-supply        { background: #fef3c7; color: #b45309; }
.p-icon-fleet         { background: #ede9fe; color: #6d28d9; }
.p-icon-hr            { background: #ffedd5; color: #c2410c; }
.p-icon-academy       { background: #ecfeff; color: #0e7490; }
.p-icon-documents     { background: #f0fdf4; color: #15803d; }
.p-icon-quality       { background: #fdf4ff; color: #7e22ce; }
.p-icon-environment   { background: #f0fdf4; color: #166534; }
.p-icon-security      { background: #eff6ff; color: #1e40af; }
.p-icon-projects      { background: #fff7ed; color: #c2410c; }
.p-icon-analytics     { background: #eff8ff; color: #1e9de0; }
.p-icon-ai            { background: #fdf2f8; color: #9333ea; }
.p-icon-finance       { background: #f0fdf4; color: #166534; }
.p-icon-assets        { background: #fff8f0; color: #ea580c; }
.p-icon-access        { background: #f0f9ff; color: #0369a1; }
.p-icon-communications{ background: #fef9c3; color: #854d0e; }
.p-icon-fueling       { background: #fff7ed; color: #f47c20; }

/* ── MODAL ─────────────────────────────────────────────────── */
#portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#portal-modal-box {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  opacity: 0;
  transition: all .2s ease;
}

/* Modal Header */
.p-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1.5px solid var(--border);
  background: #f8fafc;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.p-modal-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.p-modal-header-info { flex: 1; min-width: 0; }

.p-modal-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--txt);
  letter-spacing: -0.3px;
}

.p-modal-short {
  font-size: 13px;
  color: var(--txt-2);
  margin-top: 2px;
}

.p-modal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.p-modal-close {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--txt-3);
  font-size: 18px;
  background: transparent;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.p-modal-close:hover { background: #f1f5f9; color: var(--txt); }

/* Modal Body */
.p-modal-body { padding: 24px; flex: 1; overflow-y: auto; }

.p-modal-desc {
  font-size: 14px;
  color: var(--txt-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.p-modal-section { margin-bottom: 20px; }

.p-modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--txt-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}
.p-modal-section-title i { color: var(--navy); }

.p-mods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.p-mod-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--txt-2);
  font-weight: 500;
}
.p-mod-item i { color: var(--navy); font-size: 14px; width: 16px; text-align: center; }

/* Roadmap */
.p-rm-list { display: flex; flex-direction: column; gap: 8px; }

.p-rm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.p-rm-item i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }

.p-rm-body { flex: 1; min-width: 0; }
.p-rm-title { font-size: 13px; font-weight: 700; color: var(--txt); }
.p-rm-note { font-size: 11px; color: var(--txt-3); margin-top: 2px; }

/* Modal progress bar */
.p-progress-wrap-lg {
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}
.p-progress-bar-lg {
  height: 100%;
  background: var(--cyan);
  border-radius: 5px;
  transition: width .6s ease;
}

/* Modal Footer */
.p-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1.5px solid var(--border);
  background: #f8fafc;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

.p-btn-notify {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.p-btn-notify:hover { background: var(--navy-light); }

.p-btn-cancel {
  padding: 9px 18px;
  border: 1.5px solid var(--border-2);
  background: var(--bg-card);
  color: var(--txt-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.p-btn-cancel:hover { border-color: var(--txt-2); background: #f1f5f9; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
#portal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--txt-3);
  gap: 12px;
}
#portal-empty i { font-size: 40px; opacity: 0.35; }
#portal-empty h3 { font-size: 16px; font-weight: 700; color: var(--txt-2); }
#portal-empty p { font-size: 13px; }

/* ── TOAST ─────────────────────────────────────────────────── */
.p-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  min-width: 260px;
  max-width: 380px;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  transform: translateY(10px);
}
.p-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.p-toast-info { border-left: 4px solid var(--cyan); }

/* ── RESPONSIVITÉ ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .p-hero-logo-wrap { display: none; }
  .p-hero-stats-row { gap: 18px; }
}

@media (max-width: 768px) {
  /* Topbar */
  #portal-topbar .p-topbar-inner {
    padding: 0 14px;
    height: 54px;
    gap: 10px;
  }
  .p-topbar-center { display: none; }
  .p-topbar-right  { gap: 4px; }
  .p-topbar-btn { padding: 7px 9px; min-width: 38px; min-height: 38px; }
  .p-topbar-btn span { display: none; }
  .p-topbar-logo { width: 30px; height: 30px; }
  .p-topbar-name  { font-size: 13px; }
  .p-topbar-tag   { display: none; }

  /* Hero */
  #portal-hero { padding: 22px 14px 18px; }
  .p-hero-content { flex-direction: column; gap: 16px; }
  .p-hero-title { font-size: 22px; line-height: 1.25; }
  .p-hero-sub   { font-size: 13px; }
  .p-hero-stats-row { gap: 10px; flex-wrap: wrap; }
  .p-hero-stat-n { font-size: 20px; }
  .p-hero-stat-l { font-size: 10px; }
  .p-hero-actions { gap: 8px; }
  .p-hero-cta-primary, .p-hero-cta-secondary { padding: 10px 18px; font-size: 13px; }

  /* Barre de stats */
  .p-statsbar-inner { gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
  .p-statsbar-sep { display: none; }
  .p-statsbar-item { font-size: 12px; }

  /* Filtres */
  #portal-apps-section { padding: 12px 14px 40px; }
  .p-filters-wrap { gap: 8px; flex-direction: column; }
  .p-filters-status { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .p-filters-cat    { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }

  /* Grilles d'apps */
  .p-mods-grid    { grid-template-columns: 1fr; gap: 10px; }
  .p-grid-featured { grid-template-columns: 1fr; gap: 10px; }
  .p-grid-regular  { grid-template-columns: 1fr; gap: 8px; }

  /* App cards */
  .p-app-card { padding: 14px 16px; }
}

@media (max-width: 500px) {
  .p-hero-title   { font-size: 19px; }
  .p-hero-actions { flex-direction: column; width: 100%; }
  .p-hero-cta-primary, .p-hero-cta-secondary { width: 100%; justify-content: center; }
  .p-filters-status { flex-direction: row; }
  .p-statsbar-inner { gap: 6px; }
  #portal-apps-section { padding: 10px 10px 40px; }
}

@media (max-width: 360px) {
  #portal-topbar .p-topbar-inner { padding: 0 10px; }
  .p-hero-title { font-size: 17px; }
  #portal-hero { padding: 16px 10px; }
  .p-app-card { padding: 12px 14px; }
}
