/* ==========================================================================
   Portail Offy — feuille de style
   Charte reprise de offy-landing (CHARTE_GRAPHIQUE_Offy) :
   violet #6C63FF · dégradé #7B5BF5 → #C850C0 · bleu nuit #1E2A4A
   Police : Plus Jakarta Sans
   ========================================================================== */

:root {
  --violet: #6C63FF;
  --violet-text: #5A51E6; /* variante assombrie : #6C63FF ne tient pas le contraste AA (4,5:1) en petit corps sur fond clair */
  --gradient-start: #7B5BF5;
  --gradient-end: #C850C0;
  --gradient: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  --gradient-soft: linear-gradient(135deg, rgba(123, 91, 245, 0.12), rgba(200, 80, 192, 0.12));

  --dark: #1E2A4A;
  --bg-light: #F5F6FA;
  --white: #ffffff;

  --text: #1E2A4A;
  --text-muted: rgba(30, 42, 74, 0.66);
  --line: rgba(30, 42, 74, 0.10);
  --line-strong: rgba(30, 42, 74, 0.16);

  --surface: #ffffff;

  --shadow-xs: 0 1px 2px rgba(30, 42, 74, 0.06);
  --shadow: 0 4px 24px rgba(30, 42, 74, 0.08);
  --shadow-md: 0 10px 30px rgba(30, 42, 74, 0.10);
  --shadow-lg: 0 18px 48px rgba(108, 99, 255, 0.16);

  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --container: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-light);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.icon { width: 24px; height: 24px; display: block; }
.icon--sm { width: 18px; height: 18px; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Halo décoratif d'arrière-plan ------------------------------------- */

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 320px at 12% -6%, rgba(123, 91, 245, 0.14), transparent 70%),
    radial-gradient(560px 320px at 92% 4%, rgba(200, 80, 192, 0.10), transparent 70%);
  z-index: 0;
}

/* --- En-tête ------------------------------------------------------------ */

.header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.logo__img { width: 40px; height: 40px; object-fit: contain; }

.logo__text { font-size: 1.06rem; font-weight: 500; letter-spacing: -0.01em; }
.logo__text strong { font-weight: 800; }

.header__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  cursor: pointer;
  transition: color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.header__link:hover {
  color: var(--violet);
  border-color: rgba(108, 99, 255, 0.45);
  box-shadow: var(--shadow-xs);
}

/* --- Héro ---------------------------------------------------------------- */

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.hero { text-align: center; max-width: 640px; margin: 0 auto 48px; }

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--gradient-soft);
  border: 1px solid rgba(108, 99, 255, 0.22);
  color: var(--violet-text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero__accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 54ch;
  margin: 0 auto;
}

/* --- Grille d'applications ---------------------------------------------- */

.apps__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.app__card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  height: 100%;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  overflow: hidden;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

/* Liseré dégradé révélé au survol */
.app__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}

.app__card:hover,
.app__card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(108, 99, 255, 0.35);
  box-shadow: var(--shadow-lg);
}

.app__card:hover::before,
.app__card:focus-visible::before { opacity: 1; }

.app__card:active { transform: translateY(-1px); box-shadow: var(--shadow); }

.app__icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(123, 91, 245, 0.32);
}

.app__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.app__titlerow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app__name {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  background: rgba(30, 42, 74, 0.06);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.app__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.app__status--up {
  color: #15803D;
  background: rgba(22, 163, 74, 0.10);
  border-color: rgba(22, 163, 74, 0.28);
}

.app__status--down {
  color: #B91C1C;
  background: rgba(220, 38, 38, 0.09);
  border-color: rgba(220, 38, 38, 0.30);
}

.app__status--up::before,
.app__status--down::before { opacity: 1; }

.app__desc {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.app__domain {
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--violet-text);
  overflow-wrap: anywhere;
}

.app__arrow {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  transition: transform 220ms var(--ease), color 220ms var(--ease),
              border-color 220ms var(--ease), background 220ms var(--ease);
}

.app__card:hover .app__arrow,
.app__card:focus-visible .app__arrow {
  transform: translateX(3px);
  background: var(--gradient);
  border-color: transparent;
  color: var(--white);
}

/* --- Pied de page -------------------------------------------------------- */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 22px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Entrée en scène (respecte prefers-reduced-motion) ------------------- */

@media (prefers-reduced-motion: no-preference) {
  .hero, .app {
    animation: rise 520ms var(--ease) both;
  }
  .app:nth-child(1) { animation-delay: 90ms; }
  .app:nth-child(2) { animation-delay: 150ms; }
  .app:nth-child(3) { animation-delay: 210ms; }
  .app:nth-child(4) { animation-delay: 270ms; }

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

@media (prefers-reduced-motion: reduce) {
  .app__card, .app__arrow, .header__link { transition: none; }
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 760px) {
  .apps__grid { grid-template-columns: 1fr; gap: 16px; }
  .main { padding: 40px 20px 56px; }
  .hero { margin-bottom: 36px; }
  .app__card { padding: 22px; }
  .app__arrow { display: none; }
}
