/* ========================= */
/*        RESET & BASE       */
/* ========================= */

html,
body {
    overflow-x: hidden;
}

:root {
    --color-primary: #ff7a3d;
    --color-secondary: #ffb566;
    --color-accent: #ffda9c;

    --text-main: #2c2c2c;

    --bg-light: #fff7ee;
    --bg-clear: #ffefcc;
    --bg-dark: #fbe2ba;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    max-width: 1600px;
    margin: 0 auto;
}

p {
    line-height: 1.6;
}

/* ========================= */
/*          HEADER           */
/* ========================= */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background: var(--bg-clear);
    z-index: 9999;

    /* stabilité */
    height: 72px;
    /* plus fort que min-height */
    box-sizing: border-box;
}

header .logo,
header nav.main-header,
header .contact {
    display: flex;
    align-items: center;
    height: 100%;
}

header a {
    display: inline-flex;
    /* mieux que flex pour un lien */
    align-items: center;
    height: 100%;
    line-height: 1;
    /* ok */
    white-space: nowrap;
    /* évite les micro retours */
}

.logo a {
    border-radius: 25px;
    background: linear-gradient(90deg, var(--bg-dark), var(--bg-clear));
    padding: 5px 18px;
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-main);
}

nav.main-header {
    display: flex;
    justify-content: space-evenly;
    width: 50%;
}

nav.main-header a,
.contact a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
}

/* ========================= */
/*        MENU BURGER        */
/* ========================= */

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    cursor: pointer;
    z-index: 2500;
}

.burger span {
    width: 100%;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s ease;
}

.burger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.35s ease;
    z-index: 2000;
}

.mobile-menu.mobile-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-size: 1.7em;
    font-weight: 600;
    margin: 20px 0;
    color: var(--text-main);
    text-decoration: none;
}

@media (max-width: 900px) {
    .burger {
        display: flex;
    }

    .main-header,
    .contact {
        display: none !important;
    }
}

/* ========================= */
/*         HERO              */
/* ========================= */

.bg-fp {
    background-color: var(--bg-clear);
    padding: 20px 0 50px;
    border-radius: 0 0 50% 50% / 0 0 5% 5%;
}

.firstpart {
    margin: 40px;
    display: flex;
    gap: 40px;
}

.firstpart-left {
    width: 40%;
}

.firstpart-right {
    width: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dev {
    width: fit-content;
    padding: 8px 20px;
    border-radius: 15px;
    background: linear-gradient(90deg, var(--bg-dark), var(--bg-clear));
    margin-bottom: 15px;
}

.but-discutons {
    margin-top: 20px;
    padding: 12px 25px;
    border-radius: 6px;
    background: var(--color-secondary);
    box-shadow: var(--shadow-soft);
    width: fit-content;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.but-discutons:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.but-discutons a {
    text-decoration: none;
    color: inherit;
}

/* Supprime la couleur visitée */
.but-discutons a:visited {
    color: inherit;
}

/* Supprime l'effet focus visuel par défaut */
.but-discutons a:focus,
.but-discutons a:active {
    outline: none;
    color: inherit;
}

.background-circle {
    width: 50%;
    min-height: 250px;
    border-radius: 58% 42% 52% 48% / 26% 45% 55% 74%;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image {
    width: 100%;
    height: 200px;
    background-image: url('./assets/067c2eef-c288-45d9-808f-57c43340f6d1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ========================= */
/*       SERVICES            */
/* ========================= */

.background-sp {
    background-color: var(--bg-dark);
    padding-bottom: 50px;
}

.secondpart {
    margin: 40px;
    padding-top: 20px;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: var(--bg-clear);
    width: 30%;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

/* ========================= */
/*       CAROUSEL            */
/* ========================= */

.slider {
    background: var(--bg-clear);
    box-shadow: var(--shadow-soft);
    height: 100px;
    overflow: hidden;
    margin: 50px auto;
    width: 100%;
}

.slide-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.slide {
    width: 250px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide img {
    height: 60px;
    object-fit: contain;
}

/* ========================= */
/*       RESPONSIVE          */
/* ========================= */

@media (max-width: 1100px) {
    .cards {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        width: 45%;
    }
}

@media (max-width: 900px) {
    .firstpart {
        flex-direction: column;
        margin: 20px;
        text-align: center;
    }

    .firstpart-left,
    .firstpart-right {
        width: 100%;
    }

    .background-circle {
        width: 80%;
        min-height: 220px;
    }

    .but-discutons {
        margin: 20px auto 0;
    }
}

@media (max-width: 700px) {
    .card {
        width: 100%;
    }

    .secondpart,
    .firstpart {
        margin: 20px;
    }
}

@media (max-width: 600px) {
    .slide {
        width: 180px;
    }

    .slide img {
        height: 45px;
    }
}