/* =============== */
/*  Base / Reset   */
/* =============== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #eaf0ff;
  background: #070b16;
  overflow-x: hidden;
}

/* Fond décoratif (grille + halos) */
.bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(64, 156, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 85% 20%, rgba(165, 72, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 50% 90%, rgba(0, 255, 196, 0.10), transparent 55%),
    linear-gradient(180deg, #070b16 0%, #050814 100%);
}

.bg::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
}

/* =============== */
/*  Views          */
/* =============== */
.view[hidden]{ display: none !important; }

/* =============== */
/*  Header         */
/* =============== */
.header{
  padding: 42px 18px 10px;
}

.brand{
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #cfe2ff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.titles h1{
  margin: 0;
  font-size: clamp(22px, 2.7vw, 34px);
  letter-spacing: 0.2px;
}

.titles p{
  margin: 6px 0 0;
  opacity: 0.80;
  font-size: 14px;
}

/* Bouton retour (au-dessus du brand, dans les vues secondaires) */
.back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 980px;
  margin: 0 auto 18px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #cfe2ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.back__arrow{
  font-size: 15px;
  transition: transform 180ms ease;
}

.back:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
}

.back:hover .back__arrow{
  transform: translateX(-3px);
}

/* le conteneur du bouton retour est lui-même centré comme .brand */
#view-bts .header, #view-bts1 .header, #view-bts2 .header, #view-ciel .header{
  display: flex;
  flex-direction: column;
}

#view-bts .back, #view-bts1 .back, #view-bts2 .back, #view-ciel .back{
  align-self: center;
}

/* =============== */
/*  Layout         */
/* =============== */
.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 18px 26px;
}

.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.grid--3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
  .grid--3{ grid-template-columns: 1fr; }
}

/* La vue d'accueil : cartes un peu plus hautes pour marquer les 2 grands choix */
#view-home .card p{
  min-height: 84px;
}

/* =============== */
/*  Cards          */
/* =============== */
.card{
  position: relative;
  text-decoration: none;
  color: inherit;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  overflow: hidden;

  transform: translateY(10px);
  opacity: 0;
  animation: enter 650ms ease forwards;
}

.card:nth-child(1){ animation-delay: 20ms; }
.card:nth-child(2){ animation-delay: 80ms; }
.card:nth-child(3){ animation-delay: 140ms; }
.card:nth-child(4){ animation-delay: 200ms; }
.card:nth-child(5){ animation-delay: 260ms; }

@keyframes enter{
  to { transform: translateY(0); opacity: 1; }
}

.card::before{
  content:"";
  position:absolute;
  inset: -2px;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

/* halos par carte */
.card--blue::before{
  background: radial-gradient(500px 220px at 25% 15%, rgba(64,156,255,0.35), transparent 60%);
}
.card--violet::before{
  background: radial-gradient(520px 240px at 30% 20%, rgba(165,72,255,0.32), transparent 60%);
}
.card--red::before{
  background: radial-gradient(520px 240px at 30% 20%, rgba(255, 86, 116, 0.28), transparent 60%);
}
.card--green::before{
  background: radial-gradient(520px 240px at 30% 20%, rgba(0, 255, 196, 0.18), transparent 60%);
}
.card--orange::before{
  background: radial-gradient(520px 240px at 30% 20%, rgba(255, 170, 64, 0.20), transparent 60%);
}
.card--teal::before{
  background: radial-gradient(520px 240px at 30% 20%, rgba(34, 211, 238, 0.22), transparent 60%);
}

.card:hover::before{ opacity: 1; }

.card:hover{
  transform: translateY(-4px);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 22px 60px rgba(0,0,0,0.48);
}

.card:focus{
  outline: none;
}

.card:focus-visible{
  outline: 3px solid rgba(255,255,255,0.28);
  outline-offset: 4px;
}

.card__top{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tag{
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  white-space: nowrap;
}

.chip{
  font-size: 12px;
  opacity: 0.85;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  text-align: right;
}

/* titres + texte */
.card h2{
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: 0.2px;
}

.card p{
  margin: 0;
  opacity: 0.82;
  line-height: 1.55;
  font-size: 14px;
  min-height: 70px;
}

.card__bottom{
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cta{
  font-weight: 700;
  font-size: 14px;
  opacity: 0.95;
}

.arrow{
  font-size: 18px;
  opacity: 0.9;
  transform: translateX(0);
  transition: transform 220ms ease;
}

.card:hover .arrow{
  transform: translateX(4px);
}

.lock{
  font-size: 14px;
  opacity: 0.9;
}

/* =============== */
/* Disabled cards  */
/* =============== */
.card--disabled{
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none; /* pas cliquable tant que pas de lien */
}

.card--disabled:hover{
  transform: none;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.card--disabled::before{
  opacity: 0.25; /* garde un peu de glow mais discret */
}

/* =============== */
/* Lien secondaire */
/* =============== */
.more-link{
  text-align: center;
  margin: 22px 0 0;
}

.more-link a{
  color: #cfe2ff;
  opacity: 0.85;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding-bottom: 2px;
  transition: opacity 180ms ease, border-color 180ms ease;
}

.more-link a:hover{
  opacity: 1;
  border-color: rgba(255,255,255,0.55);
}

/* =============== */
/* Footer          */
/* =============== */
.footer{
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0.72;
  font-size: 12px;
}

.sep{ opacity: 0.5; }

/* Préférence utilisateur: moins d’animations */
@media (prefers-reduced-motion: reduce){
  .card{ animation: none; opacity: 1; transform: none; }
  .card:hover{ transform: none; }
  .arrow{ transition: none; }
  .back__arrow{ transition: none; }
}
