/* =========================================================================
   ACCUEIL
   ========================================================================= */

.home-hero {
    position: relative;
    padding: 72px 0 84px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.home-hero::after {
    /* fondu du papier vers le blanc à droite, pour laisser respirer les couvertures */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 55%, rgba(255, 255, 255, .9) 100%);
    pointer-events: none;
}

.home-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 48px;
    align-items: center;
}

.home-hero-copy { padding-left: 5%; }

.home-hero h1 {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem);
    line-height: 1;
    letter-spacing: -.03em;
    max-width: 12ch;
    margin-bottom: 22px;
    text-wrap: balance;
}

.home-hero .lead {
    font-size: 1.14rem;
    max-width: 50ch;
    margin-bottom: 28px;
    color: #3B4060;
}

.home-hero .searchbar { max-width: 560px; }

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.home-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 40px;
    margin: 36px 0 0;
    padding-top: 22px;
    border-top: 1px solid rgba(112, 104, 196, .22);
    max-width: 560px;
}

.home-figures div { display: flex; flex-direction: column-reverse; }
.home-figures dt { font-size: .86rem; color: var(--ink-2); }
.home-figures dd {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Éventail de pages de garde */
.home-hero-stack {
    position: relative;
    min-height: 470px;
    display: grid;
    place-items: center;
}

.home-fan {
    position: absolute;
    width: min(300px, 70%);
    transition: transform .4s var(--ease);
}

.home-fan .cover { width: 100%; font-size: 19px; }
.home-fan-1 { transform: translate(0, 0) rotate(-2deg); z-index: 3; }
.home-fan-2 { transform: translate(-20%, 22px) rotate(-7deg); z-index: 2; }
.home-fan-3 { transform: translate(22%, 34px) rotate(6deg); z-index: 1; }
.home-fan-2 .cover, .home-fan-3 .cover { filter: saturate(.85); }

.home-hero-stack:hover .home-fan-2 { transform: translate(-27%, 16px) rotate(-10deg); }
.home-hero-stack:hover .home-fan-3 { transform: translate(29%, 28px) rotate(9deg); }

.home-hero-caption {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 92%;
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: rgba(255, 255, 255, .75);
    font-size: .84rem;
    white-space: nowrap;
    box-shadow: var(--shadow-2);
}

.home-hero-caption a { color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.home-hero-caption .icon { color: var(--marker); width: 16px; height: 16px; }

/* Parcours de publication */
.home-journey { background: var(--paper); border-block: 1px solid var(--line); }

.journey {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    counter-reset: none;
}

.journey li {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--canvas);
}

.journey li:not(:last-child)::after {
    /* le fil entre deux étapes */
    content: "";
    position: absolute;
    top: 40px;
    right: -21px;
    width: 22px;
    border-top: 2px dashed #C7CCDA;
}

.journey h3 { margin: 4px 0 8px; font-size: 1.2rem; }
.journey p { color: var(--ink-2); font-size: .95rem; margin-bottom: 14px; }

/* Classements */
.home-ranks .panel-title { display: flex; align-items: center; gap: 10px; }
.home-ranks .panel-title .icon { color: var(--ink-3); }
.rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.rank .mrow { grid-template-columns: 26px 56px minmax(0, 1fr); counter-increment: rank; }
.rank .mrow::before {
    content: counter(rank);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--ink-3);
    text-align: center;
}
.rank .mrow .cover { width: 56px; font-size: 5.5px; }

/* Bande enseignants */
.home-teachers {
    background:
        radial-gradient(60% 90% at 90% 10%, rgba(49, 65, 168, .55), transparent 70%),
        var(--night);
    color: #fff;
}

.home-teachers h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); max-width: 20ch; }
.home-teachers .lead { color: rgba(255, 255, 255, .72); margin-bottom: 26px; }

.home-teachers-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 48px;
    align-items: center;
}

.home-reco {
    margin: 0;
    padding: 28px;
    border-radius: var(--r-lg);
    background: #fff;
    color: var(--ink);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
    transform: rotate(1.5deg);
}

.home-reco blockquote {
    margin: 16px 0 14px;
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.3;
}

.home-reco figcaption { font-size: .84rem; color: var(--ink-3); }

/* Appel final */
.home-final {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px 40px;
    padding: 40px 44px;
    border-radius: var(--r-xl);
    background: var(--marker);
}

.home-final h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); max-width: 22ch; }
.home-final p { margin: 0; color: #4A3F00; max-width: 52ch; }
.home-final .btn-secondary { background: transparent; border-color: rgba(22, 25, 54, .25); }

@media (max-width: 960px) {
    .home-hero { padding: 44px 0 56px; }
    .home-hero-grid, .home-teachers-grid { grid-template-columns: 1fr; }
    .home-hero-copy { padding-left: 0; }
    .home-hero-stack { min-height: 380px; }
    .home-hero::after { background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.8)); }
    .journey { grid-template-columns: 1fr; }
    .journey li:not(:last-child)::after { top: auto; bottom: -21px; right: auto; left: 40px; width: 0; height: 22px; border-top: 0; border-left: 2px dashed #C7CCDA; }
}

@media (max-width: 720px) {
    .home-hero h1 { font-size: 2.7rem; }
    .home-fan { width: 210px; }
    .home-fan .cover { font-size: 13px; }
    .home-hero-stack { min-height: 330px; }
    .home-final { padding: 28px 22px; }
    .home-final .btn { flex: 1; }
    .home-figures { gap: 8px 24px; }
    .home-figures dd { font-size: 1.6rem; }
}
