/**** Importation des polices DM Sans et Alan Sans ****/

@import url('https://fonts.googleapis.com/css2?family=Alan+Sans:wght@300..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/**** Variables CSS ****/

:root {
    --blue: #232946;
    --white: #fffffe;
    --purple: #b8c1ec;
    --orange: #ffc0ad;
    /*#ffd700;*/
    --font-title: "Alan Sans", sans-serif;
    --font: "DM Sans", sans-serif;
}

/**** Reset ****/

*,
::before,
::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

button {
    border: none;
    outline: none;
}

a,
button {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-title);
    text-align: center;
}

h2 {
    font-size: 2rem;
    text-transform: capitalize;
}

h2,
h3 {
    margin-bottom: 30px;
}

h3 {
    font-size: 1.7rem;
}

p {
    font-size: 1.2rem;
    line-height: 1.7;
}

section {
    padding: 40px;
    height: auto;
}

ul {
    list-style-type: none;
}

a,
p,
button {
    font-family: var(--font);
}

/**** body ****/

body {
    min-height: 100vh;
    display: flex;
    font-family: var(--font);
}

/**** Style identique pour certains éléments HTML ****/

header,
.navigation,
.navigation__list,
.burger__btn,
.about,
.skills__list,
.services,
.hobbies__list,
.arrow__btn,
.projects__cards__container,
.card__front,
.card__back,
.button,
footer,
.footer__contact,
.footer__contact__list {
    display: flex;
    justify-content: center;
    align-items: center;
}

body,
.navigation,
.navigation__list,
.about,
.services,
.hobbies__list__card,
.card__front,
.card__back,
footer,
.footer__contact {
    flex-direction: column;
}

.skills__list,
.projects__cards__container,
.hobbies__list,
.footer__contact__list {
    flex-wrap: wrap;
    gap: 30px;
}

body,
header,
.navigation,
.navigation__list__item:hover>.link::after,
.services__carousel,
.services__carousel__card,
.projects__cards__container .hobbies__card__image {
    width: 100%;
}

#particles,
.about__avatar img,
.skills__list__item img,
.hobbies__list__card img,
.card,
.card__front,
.card__back,
.card__front__image img {
    width: 100%;
    height: 100%;
}

header,
footer {
    background-color: var(--blue);
    color: var(--white);
}

.about,
.services,
.hobbies,
.card__front,
.card__back {
    background-color: var(--white);
}

.skills,
.projects {
    background-color: var(--purple);
}

.about,
.services,
.hobbies,
.projects,
.skills,
.card__front,
.card__back,
.btn,
.btn__github,
.skills__list__item h4,
.carousel__indicator {
    color: var(--blue);
}

.skills__subtitle,
.services__subtitle,
.projects__subtitle,
.projects__cards__title,
.hobbies__subtitle {
    margin-bottom: 60px;
}

.navigation,
.burger__btn,
.arrow__btn {
    position: fixed;
}

.btn,
.btn__github {
    font-weight: 600;
}

.skills__subtitle,
.services__subtitle,
.projects__subtitle,
.hobbies__subtitle,
.btn,
.btn__github {
    font-size: 1.2rem;
    text-align: center;
}

/**** header ****/

header {
    height: 100vh;
    font-family: var(--font-title)
}

#particles {
    position: absolute;
    top: 0;
    left: 0;
}

.navigation {
    top: 0;
    left: 0;
    min-height: 50vh;
    background-color: var(--blue);
    padding: 30px 40px;
    border-bottom: 2px solid var(--orange);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.73, 0.11, 0.67, 0.84);
}

.navigation.active {
    transform: translate(0);
    z-index: 2;
}

.link {
    display: block;
    margin: 10px 0;
    font-size: 1.2rem;
    font-family: var(--font);
    color: var(--orange);
}

.navigation__list__item>.link::after {
    content: "";
    display: block;
    width: 0;
    height: 4px;
    margin-top: 3px;
    background-color: var(--orange);
    transition: width 0.3s ease-in-out;
}

.burger__btn {
    top: 30px;
    right: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    background-color: transparent;
    padding: 16px;
    z-index: 10;
}

.burger__btn__bar {
    position: absolute;
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--orange);
    transition: transform 0.3s ease-in-out,
        opacity 0.1s ease-in-out;
}

.b1 {
    transform: translateY(-10px);
}

.b3 {
    transform: translateY(10px);
}

.burger__btn.active .b1 {
    transform: translateY(0) rotate(135deg);
}

.burger__btn.active .b2 {
    opacity: 0;
}

.burger__btn.active .b3 {
    transform: translateY(0) rotate(-135deg);
}

.info__text {
    text-align: center;
    padding: 20px;
}

.info__text__title {
    font-size: 3.4rem;
    text-shadow: 2px 2px 2px rgba(248, 248, 248, 0.6);
    line-height: 1.5;
    font-weight: 700;
    margin-block: 20px;
}

.info__text__subtitle {
    font-size: 2.4rem;
}

/**** main ****/

.main__content {
    flex-grow: 1;
}

/**** section about *****/

.about__avatar {
    width: 260px;
    height: 260px;
}

.about__description {
    width: 80%;
    text-align: left;
    margin-bottom: 30px;
}

.wave__emoji {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: wave 1.8s linear infinite;
}

/**** Animation wave ****/

@keyframes wave {

    0%,
    50%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-10deg);
    }

    20% {
        transform: rotate(12deg);
    }

    40% {
        transform: rotate(9deg);
    }
}

.wave__emoji img {
    height: 1.2rem;
    width: 1.2rem;
    margin-left: 4px;
}

.hello {
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 0;
    line-height: 1.4;
}

.btn {
    padding: 12px 16px;
    background-color: var(--orange);
    border-radius: 10px;
    transition: background-color 0.3s ease-in-out;
}

.btn:hover {
    background-color: var(--purple);
}

/**** section skills ****/

.skills__presentation {
    margin-bottom: 60px;
}

.skills__list {
    margin-block: 40px;
}

.skills__list__item {
    width: 70px;
    height: 70px;
    transition: display 0.3s ease-in-out,
        transform 0.3s ease-in-out;
    margin-bottom: 20px;
}

.skills__list__item:hover {
    transform: scale(1.07);
}

.skills__list__item h4 {
    margin-top: 6px;
    font-size: 1rem;
    display: none;
}

.skills__list__item:hover h4 {
    display: block;
}

/**** div separator ****/

.separator {
    width: 75%;
    border: 1px solid var(--white);
    margin: 60px auto;
}

/**** section services ****/

.services__carousel {
    position: relative;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.services__carousel__card {
    display: none;
    text-align: center;
    padding: 16px;
}

.services__carousel__card img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.services__carousel__card.active {
    display: block;
    animation: fade 1s ease-out;
}

/**** animation fade  ****/

@keyframes fade {
    to {
        opacity: 1;
    }
}

.services__carousel__card__text {
    text-align: center;
    margin-block: 20px;
}

.carousel__indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
}

/**** section projects *****/

.project__card__wrapper {
    position: relative;
    width: 28%;
    height: 300px;
    perspective: 2000px;
    perspective-origin: bottom;
    margin-bottom: 40px;
}

.project__card__wrapper:hover .card {
    transform: rotateY(180deg);
}

.card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
    color: var(--white);
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 1px 6px 0 rgba(32, 33, 36, 0.69);
}

.card__front,
.card__back {
    position: absolute;
    border-radius: 8px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
}

.card__back {
    transform: rotateY(180deg);
    padding: 20px;
}

.card__back__description {
    font-size: 1.2rem;
    line-height: 1.7;
    font-weight: 500;
    text-align: center;
    margin-bottom: 30px;
}

.button {
    margin-block: 30px;
}

.btn__github {
    position: relative;
    z-index: 1;
}

.btn__github::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -7%;
    transform: translateY(-50%);
    display: block;
    z-index: -1;
    width: calc(1.2rem * 2);
    height: calc(1.2rem * 2);
    border-radius: calc(1.2rem);
    background-color: var(--orange);
    transition: width 0.6s cubic-bezier(0.8, 0, 0.24, 0.99);
}

.btn__github:hover::before {
    width: calc(100% + 12%);
}

/**** section hobbies ****/

.hobbies__list__card {
    width: 30%;
    height: auto;
    display: flex;
}

.hobbies__list__card__image {
    height: 200px;
}

.hobbies__list__card__image img {
    border-radius: 50%;
    object-fit: cover;
    animation: rotationImage 3.5s infinite linear;
}

/**** Animation rotationImage ****/

@keyframes rotationImage {
    to {
        transform: rotateY(360deg);
    }
}

.hobbies__list__card__title {
    font-size: 1.2rem;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
}

/***** arrow  btn *****/

.arrow__btn {
    right: 6px;
    bottom: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.arrow__btn i {
    font-size: 2rem;
    color: var(--orange);
}

/**** section footer contact ****/

footer {
    font-size: 1.2rem;
    padding: 40px;
}

.footer__contact__title {
    margin-bottom: 60px;
}

.footer__contact__list__item {
    margin-bottom: 12px;
    border-radius: 6px;
    transition: color 0.3s ease-in-out;
}

.footer__contact__list__item i {
    width: 20px;
    padding-left: 0;
    padding-right: 30px;
}

.footer__contact__list__item a,
.footer__contact__list__item i {
    color: var(--purple);
}

.footer__contact__list__item:hover a,
.footer__contact__list__item:hover i {
    color: var(--orange);
}

.footer__copyright {
    text-align: center;
}

/**** classe reveal pour créer un effet d'apparition au défilement. J'utilise du CSS pour gérer l'animation d'apparition. ****/

[class*="reveal-"] {
    opacity: 0;
    transform: translateY(30px);
}

.reveal__visible {
    opacity: 1;
    transform: translateY(0);
    transition: 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-1 {
    transition-delay: 0.1s;
}

.reveal-2 {
    transition-delay: 0.2s;
}

.reveal-3 {
    transition-delay: 0.3s;
}

.reveal-4 {
    transition-delay: 0.4s;
}

.reveal-5 {
    transition-delay: 0.5s;
}

/**** Responsive design version tablette ****/

@media screen and (max-width: 991px) {
    .burger__btn {
        width: 32px;
        height: 32px;
    }

    .info__text__title {
        font-size: 3.2rem;
    }

    .info__text__subtitle {
        font-size: 2.2rem;
    }

    .project__card__wrapper {
        width: 45%;
    }
}

/**** Responsive design version mobile ****/

@media screen and (max-width: 767px) {
    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.6rem;
    }

    .info__text__title {
        font-size: 3rem;
    }

    .info__text__subtitle {
        font-size: 2rem;
        line-height: 1.5;
    }

    .about__description,
    .project__card__wrapper {
        width: 95%;
    }

    .card__back__description {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
}