/* home.css — Écran d'accueil (sélecteur de cas d'usage) affiché après connexion.
   Additif : n'altère aucun style existant. Réutilise les variables de variables.css. */

#home {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--pbg) 0%, rgba(243, 239, 247, 0) 60%),
    var(--bg);
}

#home.on { display: flex; }

/* En-tête */
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 56px;
  background: var(--wh);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
}

.home-top-l { display: flex; align-items: center; gap: 11px; }
.home-top-l img { width: 30px; height: 30px; object-fit: contain; }
.home-brand { font-size: 16px; font-weight: 600; color: var(--pri); }
.home-brand em { font-style: normal; font-weight: 400; color: var(--sec); }

.home-top-r { display: flex; align-items: center; gap: 14px; }

.home-sbadge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--gn3);
  background: var(--gn2); padding: 5px 11px; border-radius: 20px;
}
.home-sbadge i { width: 7px; height: 7px; border-radius: 50%; background: var(--gn); }

.home-gear {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--bd); border-radius: 8px; background: var(--wh);
  color: var(--tx2); cursor: pointer; transition: .15s;
}
.home-gear:hover { color: var(--pri); border-color: var(--pbd); background: var(--pbg); }
.home-gear svg { width: 18px; height: 18px; }

/* Corps */
.home-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
}

.home-hero { text-align: center; margin-bottom: 38px; }
.home-hero h1 {
  font-size: 30px; font-weight: 700; color: var(--tx);
  letter-spacing: -.5px; margin-bottom: 10px;
}
.home-hero h1 em { font-style: normal; color: var(--pri); }
.home-hero p { font-size: 15px; color: var(--tx2); max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* Grille de tuiles */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 300px));
  gap: 20px;
  width: 100%;
  max-width: 960px;
}

.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  background: var(--wh);
  border: 1px solid var(--bd);
  border-radius: 16px;
  padding: 26px 24px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(88, 60, 110, .12);
  border-color: var(--pbd);
}

.home-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--pbg);
  color: var(--pri);
}
.home-card-icon svg { width: 26px; height: 26px; }

.home-card h3 { font-size: 16px; font-weight: 600; color: var(--tx); margin: 0; }
.home-card p { font-size: 13px; color: var(--tx2); line-height: 1.55; margin: 0; }

.home-card-arrow {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--pri);
  padding-top: 6px;
}
.home-card-arrow svg { width: 15px; height: 15px; }

/* Tuile mise en avant (nouveau) */
.home-card.feature {
  background: linear-gradient(160deg, var(--pri) 0%, var(--prl) 100%);
  border-color: transparent;
}
.home-card.feature h3,
.home-card.feature p,
.home-card.feature .home-card-arrow { color: #fff; }
.home-card.feature p { color: rgba(255, 255, 255, .82); }
.home-card.feature .home-card-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.home-card.feature:hover { box-shadow: 0 12px 32px rgba(88, 60, 110, .35); }

.home-badge-new {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  background: var(--am); color: #fff;
  padding: 3px 9px; border-radius: 20px;
}

.home-foot { margin-top: 34px; font-size: 12px; color: var(--tx3); }

/* Bouton retour accueil dans la topbar de l'app */
.btn-home {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-right: 4px;
  border: 1px solid var(--bd); border-radius: 8px; background: var(--wh);
  color: var(--tx2); cursor: pointer; transition: .15s;
}
.btn-home:hover { color: var(--pri); border-color: var(--pbd); background: var(--pbg); }
.btn-home svg { width: 18px; height: 18px; }

@media (max-width: 820px) {
  .home-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); max-width: 560px; }
}
@media (max-width: 540px) {
  .home-grid { grid-template-columns: 1fr; max-width: 360px; }
  .home-hero h1 { font-size: 24px; }
}
