:root{
  --bg:#F3F5FF;
  --txt:#14162B;
  --muted:#6B6F86;
  --purple:#3B19B6;
  --card:#FFFFFF;
  --shadow: 0 10px 30px rgba(20,22,43,.10);
  --r-xl: 28px;
  --r-lg: 20px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--txt);
}
.home{
  max-width:1100px;
  margin:0 auto;
  padding:22px 18px 50px;
}
.linkedinEmbed {
  width: 100%;
  overflow: hidden;
}
.homeHeader__hello{
  margin:0 0 4px;
  font-size:52px;
  font-weight:900;
  letter-spacing:-.02em;
}
.homeHeader__welcome{
  margin:0 0 16px;
  font-size:22px;
}

.sectionHead{
  display:flex;
  align-items:center;
  gap:12px;
}
.sectionHead--between{
  justify-content:space-between;
}
.sectionTitle{
  margin:18px 0 12px;
  font-weight:900;
  letter-spacing:.06em;
  color:#20264D;
}
.sectionLink{
  color:var(--purple);
  text-decoration:none;
  font-weight:900;
}

.featuresGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.featureCard{
  text-decoration:none;
  color:inherit;
  background:var(--card);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow);
  padding:18px;
  min-height:140px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.featureCard__title{
  font-weight:900;
  font-size:18px;
}
.featureCard__desc{
  color:var(--muted);
  font-size:14px;
  line-height:1.35;
  margin-top:6px;
}

.newsAndNotif{
  display:grid;
  grid-template-columns:1.5fr .9fr;
  gap:16px;
  margin-top:6px;
}

.newsCard{
  background:var(--purple);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.newsCard__inner{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  align-items:center;
  gap:14px;
  padding:22px;
}
.newsCard__left{
  color:white;
}
.newsCard__headline{
  font-size:28px;
  font-weight:900;
  line-height:1.05;
  margin:0 0 16px;
}
.btn{
  display:inline-block;
  background:white;
  color:var(--purple);
  padding:12px 18px;
  border-radius:999px;
  font-weight:900;
  text-decoration:none;
}
.newsCard__img{
  width:100%;
  height:auto;
  border-radius:var(--r-lg);
  display:block;
}

.notifBlock{
  background:var(--card);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow);
  padding:16px;
}
.notifHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.notifBadge{
  background:var(--purple);
  color:white;
  padding:4px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
}
.notifList{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.notif{
  border-radius:16px;
  padding:12px 12px;
  background:#F1F3FF;
}
.notif__title{
  font-weight:900;
  margin-bottom:2px;
}
.notif__msg{
  color:var(--muted);
  font-size:14px;
  line-height:1.25;
}
.notif__link{
  display:inline-block;
  margin-top:6px;
  color:var(--purple);
  font-weight:900;
  text-decoration:none;
}
.notifEmpty{
  color:var(--muted);
}

.carouselSection{
  margin-top:10px;
}
.carouselShell{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  align-items:center;
  gap:10px;
}

.carousel{
  overflow:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.carousel::-webkit-scrollbar{display:none}
.carousel__track{
  display:flex;
  gap:18px;
  padding:2px;
}

.carouselBtn{
  height:44px;
  width:44px;
  border:0;
  border-radius:999px;
  background:rgba(59,25,182,.12);
  color:var(--purple);
  font-size:26px;
  cursor:pointer;
}

.card{
  min-width:300px;
  background:var(--card);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow);
  text-decoration:none;
  color:inherit;
  overflow:hidden;
  scroll-snap-align:start;
}
.card__imgWrap{
  height:180px;
  background:#EDEFFF;
  position:relative;
}
.card__img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.card__fav{
  position:absolute;
  right:12px;
  top:12px;
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#9AA0B6;
}
.card__title{
  padding:14px 16px 0;
  font-weight:900;
  font-size:20px;
  line-height:1.12;
  min-height:54px;
}
.card__foot{
  padding:12px 16px 16px;
}
.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(59,25,182,.10);
  color:var(--purple);
  font-weight:900;
}
.pill::before{
  content:"⏱";
  display:inline-block;
}
.linkLike{
  color:#A6A9BD;
  font-weight:900;
}

.socialSection{
  margin-top:18px;
}
.socialRow{
  display:flex;
  gap:16px;
  padding-top:10px;
}
.socialChip{
  height:74px;
  width:74px;
  border-radius:999px;
  background:var(--purple);
  color:white;
  text-decoration:none;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
}

/* ✅ Overlay d’erreur : caché par défaut, visible seulement si hidden est retiré */
.fatal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  align-items:center;
  justify-content:center;
  padding:20px;
  display:none; /* important */
}
.fatal:not([hidden]){
  display:flex;
}

.fatal__card{
  max-width:560px;
  background:white;
  border-radius:20px;
  padding:18px 18px 16px;
  box-shadow:var(--shadow);
}
.fatal__title{
  font-weight:900;
  font-size:18px;
  margin-bottom:8px;
}
.fatal__msg{
  color:#2a2f55;
  margin-bottom:10px;
  white-space:pre-wrap;
}
.fatal__hint{
  color:#6b6f86;
  font-size:13px;
}
code{
  background:#f2f4ff;
  padding:2px 6px;
  border-radius:8px;
}

/* ✅ sécurité générale : hidden doit toujours cacher */
[hidden]{ display:none !important; }

@media (max-width:980px){
  .featuresGrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .newsAndNotif{grid-template-columns:1fr}
  .carouselShell{grid-template-columns:1fr}
  .carouselBtn{display:none}
  .card{min-width:260px}
}
