* {
    font-family: sans-serif;
}

*:focus {
    outline: none;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
}

details,
h2 {
    display: block;
    width: 50%;
    margin: 2%;
    margin-left: 25%;
}

details {
    cursor: pointer;
}


/*
First : background-color and border radius
*/

.first {
    background-color: blanchedalmond;
    padding: .5%;
    border-radius: 5px;
}

.first p {
    background-color: white;
    border-radius: 5px;
    padding: 1%;
    margin: 1%;
}


/*
Second : playing with list style
*/

.second summary::-webkit-details-marker {
    display: none;
}

.second summary:before {
    content: "\2714";
    /* the new icon */
    color: #696f7c;
    margin-right: 5px;
}

.second summary:before {
    float: left;
    transform: translateY(-25%);
    content: "\2022";
    color: rgb(255, 0, 0);
    font-size: 200%;
    font-weight: bolder;
}


/*
Third : playing with transition
*/

.third {
    background-color: blanchedalmond;
    padding: .5%;
    border-radius: 5px;
}

.third p {
    background-color: white;
    border-radius: 5px;
    padding: 1%;
    margin: 1%;
    opacity: 0;
}

@keyframes slideIn {
    from {
        margin-top: -6%;
    }
    50% {
        opacity: 0;
    }
    to {
        margin-top: 1%;
        opacity: 1;
    }
}

.third[open] p {
    animation: slideIn 2s forwards;
}


/*
Fourth : We combine transitions and custom list style
*/

.fourth summary::-webkit-details-marker {
    display: none;
}

.fourth summary:before {
    content: "\2714";
    /* the new icon */
    color: #696f7c;
    margin-right: 5px;
}

.fourth summary:before {
    float: left;
    content: "►";
    color: rgb(109, 108, 108);
}

.fourth {
    background-color: blanchedalmond;
    padding: .5%;
    border-radius: 5px;
}

.fourth p {
    background-color: white;
    border-radius: 5px;
    padding: 1%;
    margin: 1%;
    opacity: 0;
}

@keyframes slideIn {
    from {
        margin-top: -6%;
    }
    50% {
        opacity: 0;
    }
    to {
        margin-top: 1%;
        opacity: 1;
    }
}

.fourth[open] p {
    animation: slideIn .5s forwards;
}

@keyframes rotate90 {
    from {
        transform: rotate(0deg);
        content: "►";
    }
    to {
        transform: rotate(90deg);
        content: "►";
    }
}

.fourth[open] summary::before {
    animation: rotate90 .5s;
    content: "▼";
}


/*
The final one !
*/

.final {
    background-color: white;
}

.final summary::-webkit-details-marker {
    display: none;
}

.final summary,
.final summary::before,
.final summary::after {
    transform-origin: bottom left;
    content: "";
    display: block;
    width: 30px;
    height: 0;
    border-bottom: 1px solid black;
    padding-top: 25%;
}

.final summary {
    transition: .5s opacity;
    padding-top: 0;
    border-top: 1px solid black;
    border-bottom: none;
}

.final ul {
    list-style: none;
    margin: 3%;
    opacity: 0;
}

.final li {
    margin: 2%;
    font-size: 200%;
    font-weight: 10;
    border-bottom: 1px solid black;
}

@keyframes slideInFinal {
    from {
        margin-top: -25%;
    }
    50% {
        opacity: 0;
    }
    to {
        margin-top: 1%;
        opacity: 1;
    }
}

.final[open] ul {
    animation: slideInFinal .5s forwards;
}

@keyframes rotateRight {
    from {
        transform: rotate(0deg) translateY(-100%);
    }
    to {
        transform: rotate(45deg) translateY(-100%) translateX(-25%);
    }
}

@keyframes rotateLeft {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-45deg);
    }
}

.final[open] summary::before {
    animation: rotateRight .5s forwards;
}

.final[open] summary::after {
    animation: rotateLeft .5s forwards;
}

.final[open] summary {
    border: none;
}