/* ==========================================================================
   EPN — Accueil
   ========================================================================== */

/* --- 1. Hero : un rayon de librairie ------------------------------------- */
.hero {
  position: relative;
  background: var(--bleu-nuit);
  color: #fff;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6.5rem);
}
/* Réglure de cahier, très basse en contraste : l'arrière-plan reste du papier. */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .055) 0 1px,
    transparent 1px 34px
  );
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.hero::after {
  content: "";
  position: absolute;
  right: -14%; top: -30%;
  width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(233, 164, 23, .24), transparent 62%);
}
.hero > .cadre { position: relative; z-index: 1; }

.hero-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 960px) { .hero-grille { grid-template-columns: 1fr; } }

.hero-marque {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--t-mini);
  color: var(--safran-clair);
  margin-bottom: var(--e3);
}
.hero-marque::before {
  content: ""; width: 28px; height: 2px; background: var(--safran); border-radius: 2px;
}

.hero h1 {
  font-size: var(--t-affiche);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--e3);
  max-width: 15ch;
}
.hero-accroche {
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: #C3D2E9;
  max-width: 46ch;
  margin-bottom: var(--e4);
}
.hero-boutons { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: var(--e5); }

.hero-chiffres {
  display: flex; flex-wrap: wrap; gap: var(--e4);
  padding-top: var(--e3);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero-chiffres div strong {
  display: block;
  font-family: var(--titre);
  font-size: 1.9rem; font-weight: 600; color: var(--safran-clair);
  line-height: 1;
}
.hero-chiffres div span { font-size: var(--t-mini); color: #93A9CC; }

/* --- Le rayon ------------------------------------------------------------ */
.rayon { position: relative; padding-bottom: var(--e3); }
.rayon-livres {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(.5rem, 1.4vw, 1.1rem);
  perspective: 1200px;
}
.rayon-livres img {
  width: clamp(74px, 14vw, 150px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px 7px 7px 2px;
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07);
  transform-origin: bottom center;
  animation: pose-livre .8s cubic-bezier(.22, .8, .3, 1) backwards;
  animation-delay: calc(var(--i) * 110ms + 120ms);
}
.rayon-livres img:nth-child(2) { width: clamp(84px, 16vw, 172px); }
.rayon-livres img:nth-child(4) { width: clamp(80px, 15vw, 162px); }

@keyframes pose-livre {
  from { opacity: 0; transform: translateY(34px) rotate(-3deg); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rayon-livres img { animation: none; }
}

/* Tablette du rayon */
.rayon-tablette {
  margin-top: -6px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, transparent, rgba(233, 164, 23, .9) 12%, rgba(233, 164, 23, .9) 88%, transparent);
}
.rayon-legende {
  text-align: center;
  font-size: var(--t-mini);
  color: #7E93B8;
  margin-top: var(--e2);
}

/* --- 2. Bandeau de repères ----------------------------------------------- */
.reperes { background: var(--blanc); border-bottom: 1px solid var(--papier-bord); }
.reperes-grille {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--e3);
  padding-block: var(--e4);
}
@media (max-width: 860px) { .reperes-grille { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .reperes-grille { grid-template-columns: 1fr; } }
.repere { display: flex; gap: .9rem; align-items: flex-start; }
.repere svg { flex: 0 0 auto; width: 24px; height: 24px; color: var(--bleu); margin-top: 2px; }
.repere h3 { font-family: var(--texte); font-size: .95rem; font-weight: 600; margin: 0 0 .2rem; }
.repere p { font-size: var(--t-mini); color: var(--encre-douce); margin: 0; }

/* --- 3. Cartes de niveau ------------------------------------------------- */
.grille-niveaux {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--e3);
}
@media (max-width: 900px) { .grille-niveaux { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* --- 4. Nouveautés par onglet ------------------------------------------- */
.onglets {
  display: flex; flex-wrap: wrap; gap: .4rem;
  border-bottom: 1px solid var(--papier-bord);
  margin-bottom: var(--e4);
}
.onglet {
  appearance: none; border: 0; background: none;
  font: inherit; font-size: .95rem; font-weight: 600;
  color: var(--encre-douce);
  padding: .8rem 1.1rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.onglet:hover { color: var(--bleu); }
.onglet[aria-selected="true"] { color: var(--encre); border-bottom-color: var(--safran); }

/* --- 5. Collections en aperçu ------------------------------------------- */
.bande-collections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--e2);
}
.puce-collection {
  display: block;
  padding: var(--e3);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-moyen);
  text-decoration: none;
  color: #fff;
  transition: background var(--transition), border-color var(--transition);
}
.puce-collection:hover { background: rgba(255, 255, 255, .06); border-color: var(--safran); }
.puce-collection strong { display: block; font-family: var(--titre); font-size: 1.15rem; margin-bottom: .3rem; }
.puce-collection span { font-size: var(--t-mini); color: #93A9CC; }

/* --- 6. Bloc « à qui s'adresse EPN » ------------------------------------- */
.public-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
@media (max-width: 860px) { .public-grille { grid-template-columns: 1fr; } }
.public-liste { list-style: none; padding: 0; margin: var(--e3) 0 0; }
.public-liste li {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid var(--papier-bord);
}
.public-liste li:last-child { border-bottom: 1px solid var(--papier-bord); }
.public-liste strong { display: block; }
.public-liste span { font-size: var(--t-petit); color: var(--encre-douce); }
.public-liste svg { width: 20px; height: 20px; color: var(--safran); flex: 0 0 auto; margin-top: 3px; }

.mosaique {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.mosaique img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: 2px 6px 6px 2px;
  box-shadow: var(--ombre-livre);
}
.mosaique img:nth-child(2) { transform: translateY(18px); }
.mosaique img:nth-child(5) { transform: translateY(18px); }
