body {
    background: #eee;
    margin: 0;
}
* {
    box-sizing: border-box;
}
main {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
}
.pills {
    width: 100%;
    aspect-ratio: 4/3;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1em 1em;
}
@media (min-aspect-ratio: 4/3) {
    .pills {
        height: 100%;
        width: auto;
        aspect-ratio: 4/3;
    }
}
.pill {
    border: 14px solid color-mix(in srgb, var(--c), black 20%);
    border-radius: 2000em;
    background: #000;
    overflow: hidden;
    display: flex;
    position: relative;
    background: linear-gradient(
        to right, white 50%, var(--c) 50%
    );
}
.pill.v {
    background: linear-gradient(
        to bottom, white 50%, var(--c) 50%
    );
}
.pill:hover {
    margin: -30px;
    z-index: 3;
}
.pill::before {
    content: "";
    inset: 0;
    position: absolute;
    border-radius: 2000em;
    display: block;
    box-shadow: inset 4cqw 4cqw 4cqw rgba(255,255,255,.7), inset -4cqw -4cqw 4cqw rgba(0,0,0,.3)
}

.pill:nth-child(1){
    grid-column: 1;
    grid-row: 1 / span 2;
}
.pill:nth-child(2){
    grid-column: 2 / span 4;
    grid-row: 1 / span 2;
}
.pill:nth-child(3){
    grid-column: 1 / span 2;
}
.pill:nth-child(4){
    grid-column: 3 / span 2;
}
.pill:nth-child(5){
    grid-column: 5 ;
    grid-row: 3/ span 2;
}
.pill:nth-child(6){
    grid-column: 1 / span 4;
}

nav {
    position: absolute;
    top: 0;
    p {
        display: none;
    }
}
body:has(.pill.chapitre1:hover) nav .chapitre1 {display: block; }