/* Page d'accueil (hub) */
body.hub { overflow: auto; overflow-x: clip; height: auto; min-height: 100%; }
.hub .topbar { position: sticky; top: 0; z-index: 50; }
.hub main { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
/* Accueil : les sections des outils sont un peu plus larges, le reste garde la colonne (sans 100vw, qui compte la barre de défilement) */
.hub main.home { max-width: none; padding: 0; }
.home > :not(.features) { width: calc(100% - 40px); max-width: 1140px; margin-left: auto; margin-right: auto; }

.hub-nav { display: flex; gap: 4px; margin-left: 24px; }
.hub-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.hub-nav a:hover { color: var(--text); background: var(--surface-2); }
.hub-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.hub .account-btn { color: var(--text); text-decoration: none; }
.hub .account-meta b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Barre du haut : se resserre par paliers (mesurée en PT/ES/FR, connecté avec un pseudo de 20 caractères).
   Un lien ajouté au menu impose de revoir ces seuils. Sous 761 px, il est remplacé par le bouton de menu (app.css). */
@media (max-width: 1439px) {
  .hub .topbar .logo-tag { display: none; }
}
@media (min-width: 761px) and (max-width: 1299px) {
  .hub-nav { margin-left: 8px; }
  .hub-nav a { padding: 8px; }
  .hub-nav a[href^="#"] { display: none; } /* raccourcis vers les sections de l'accueil */
}
@media (min-width: 761px) and (max-width: 979px) {
  .hub .account .btn-primary, .hub .account-meta { display: none; }
}
@media (min-width: 761px) and (max-width: 849px) {
  .hub .topbar .logo-text { display: none; }
}

.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
a.btn { text-decoration: none; }

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  padding: 64px 0 48px;
  position: relative;
}
.hero-kicker {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font); font-size: 13px; font-weight: 800; line-height: 1.4; letter-spacing: .12em;
  color: var(--pink);
}
.hero h1 {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(44px, 7vw, 84px);
  line-height: .98;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 12px 0 18px;
}
.hero h1 span { display: block; color: var(--accent); }
.hero .lead { font-size: 18px; color: #d4d4d8; max-width: 34em; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats { display: flex; gap: 32px; margin: 36px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.hero-stats dd { margin: 0; font-family: var(--display); font-weight: var(--display-weight); font-size: 40px; line-height: 1.1; }

.hero-map {
  position: relative;
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 760 / 1094;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
  transform: rotate(2deg);
  transition: transform .3s ease;
}
.hero-map:hover { transform: rotate(0) scale(1.01); }
.hero-map img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-map-dots { position: absolute; inset: 0; z-index: 1; }
.hero-map-dots i {
  position: absolute;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px #fff;
  animation: pulse 2.4s ease-in-out infinite;
}
.hero-map-badge {
  position: absolute;
  left: 16px; bottom: 16px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 10, 20, .8);
  border: 1px solid var(--border-strong);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
@keyframes pulse { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .hero-map-dots i { animation: none; } .hero-map { transform: none; } }

/* --- Blocs --- */
.block { padding: 40px 0; }
.block-head { margin-bottom: 20px; }
.block-head h2 { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(28px, 4vw, 40px); text-transform: uppercase; letter-spacing: .02em; margin: 6px 0 0; line-height: 1.05; }
.block-head .eyebrow { color: var(--teal); }

/* --- Une section par outil : visuel d'un côté puis de l'autre --- */
.features { scroll-margin-top: var(--topbar-h); margin-top: 24px; }
.feature {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  height: clamp(330px, 27vw, 420px);
  overflow: hidden;
}
.feature-map { --c: var(--pink); }
.feature-checklist { --c: var(--teal); }
.feature-garage { --c: var(--orange); }
.feature-money { --c: var(--success); }
.feature-art {
  position: absolute; inset: 0 0 0 auto;
  height: 100%; aspect-ratio: 14 / 9; max-width: 56%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 24%, #000 94%, transparent);
}
.feature:nth-child(even) .feature-art {
  inset: 0 auto 0 0;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 24%, #000 94%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 24%, #000 94%, transparent);
}
/* fondu haut et bas, pour que les bandes s'enchaînent */
.feature-art img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}
.feature-in { position: relative; display: flex; align-items: center; max-width: 1180px; height: 100%; margin: 0 auto; padding: 0 20px; pointer-events: none; }
.feature:nth-child(even) .feature-in { justify-content: flex-end; }
.feature-text { width: 43%; display: flex; flex-direction: column; align-items: flex-start; pointer-events: auto; }
.feature-text .eyebrow { color: var(--c); }
.feature-text h2 {
  max-width: 100%;
  margin: 10px 0 16px;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.feature-text p { margin: 0 0 26px; max-width: 26em; color: #d4d4d8; font-size: 17px; line-height: 1.55; }
.feature-cta { height: 52px; padding: 0 24px; background: var(--c); color: var(--bg); font-size: 16px; font-weight: 700; transition: filter .2s; }
.feature-cta:hover { filter: brightness(1.15); }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.card-lg { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); min-width: 0; }

.feed, .top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.feed a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.feed a:hover { background: var(--surface-2); }
.feed-ico { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 20px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.feed-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feed-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-txt small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-empty { color: var(--muted); padding: 10px; }
.feed-empty a { color: var(--pink); }
.link-more { display: inline-block; margin-top: 12px; color: var(--pink); font-weight: 700; text-decoration: none; }

.top li:not(.feed-empty) { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); }
.top li:first-child:not(.feed-empty) { background: rgba(255, 210, 63, .07); }
.top-pos { width: 22px; font-family: var(--display); font-weight: var(--display-weight); font-size: 20px; color: var(--faint); text-align: center; }
.top li:first-child .top-pos { color: var(--yellow); }
.top-rep { font-weight: 800; color: var(--yellow); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { padding: 22px; border-radius: var(--radius); border: 1px dashed var(--border-strong); }
.step b { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--bg); font-family: var(--display); font-weight: var(--display-weight); font-size: 18px; }
.step h3 { margin: 14px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.steps-foot { color: var(--muted); margin: 18px 0 0; }
.steps-foot a { color: var(--pink); font-weight: 700; }

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

/* --- Responsive --- */
@media (max-width: 1000px) {
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 36px 0 24px; text-align: left; }
  .hero-map { max-width: 300px; transform: none; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .hero-stats { flex-wrap: wrap; gap: 20px; justify-content: space-between; }
  .hero-stats dd { font-size: 32px; }
  .steps { grid-template-columns: 1fr; }
  .block { padding: 28px 0; }
  .hub main { padding: 0 16px; }
  .home > :not(.features) { width: calc(100% - 32px); }
}
/* Sur téléphone : le visuel au-dessus, le texte dessous */
@media (max-width: 760px) {
  .feature { height: auto; padding-bottom: 38px; }
  .feature-art, .feature:nth-child(even) .feature-art {
    position: relative; inset: auto;
    width: 100%; max-width: none; height: auto; aspect-ratio: 14 / 9;
    -webkit-mask-image: none; mask-image: none;
  }
  .feature-art img {
    -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 78%, transparent);
    mask-image: linear-gradient(transparent, #000 10%, #000 78%, transparent);
  }
  .feature-in { height: auto; padding: 0 16px; }
  .feature-text { width: 100%; }
  .feature-text h2 { font-size: clamp(34px, 10.5vw, 48px); }
  .feature-text p { font-size: 16px; }
  .feature-cta { width: 100%; justify-content: center; }
}
