@import url('categorie.css');
@import url('machine.css');
@import url('formulaire.css');
@import url('dialog.css');
@import url('location.css');

@import url('https://fonts.googleapis.com/css2?family=PT+Sans+Caption:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PT Sans Caption', sans-serif;
    color: var(--light-blue);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

html {
    overflow-x: hidden;
}

:root {
    --light-blue: #98DAFE;
    --darker-white: #F7FAFC;
    --light-green: #b0f2c2;
    --light-red: #f2b0b0;
    --light-black: #28282B;
    --light-grey: #FAF9F6;
}

::selection {
    background-color: var(--light-blue) !important;
    color: var(--darker-white) !important;
}

body {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    background-color: var(--darker-white);
    align-items: center;
    overflow-x: hidden;
}

main {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 100vw;
    flex: 1;
    overflow-x: hidden;
    gap: 15px;
}

h2 {
    text-transform: uppercase;
    font-size: 1.5rem;
    color: var(--light-blue);
    letter-spacing: 0.1em;
    font-weight: bold;
}

header {
    display: flex;
    flex-direction: row;
    width: 100%;
}

header>div:first-child {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

header>div:first-child>a {
    display: flex;
    max-width: 25%;
}

header div:first-child img:first-child {
    width: 100%;
}

#menu-trigger {
    cursor: pointer;
    min-width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#menu-trigger svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

#menu-trigger line {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
    filter: drop-shadow(0 0 0px transparent);
}

#menu-trigger:hover line:nth-child(1) {
    transform: translateY(-2px);
}

#menu-trigger:hover line:nth-child(3) {
    transform: translateY(2px);
}

#side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--darker-white);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 25px;
}

#side-menu.active {
    right: 0;
}

#side-menu nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#side-menu a {
    font-size: 1.5rem;
    color: var(--light-blue);
    letter-spacing: 0.15em;
    text-decoration: none;
    display: flex;
    width: fit-content;
    overflow: hidden;
}

.letter {
    position: relative;
    display: block;
    transition: transform 0.3s cubic-bezier(0.7, 0, 0.3, 1);
    transition-delay: inherit;
}

.letter::after {
    content: attr(data-letter);
    position: absolute;
    top: 100%;
    left: 0;
}

#side-menu a:hover .letter {
    transform: translateY(-100%);
}

#close-menu {
    align-self: flex-end;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    margin-bottom: 15px;
    transition: transform 0.3s ease, color 0.3s ease;
}

#close-menu:hover {
    transform: rotate(90deg) scale(1);
}

.vide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    flex: 1;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--light-grey);
    color: var(--light-black);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: transform 0.5s ease-out;
    font-weight: bold;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

/* ============================= Footer Contact ============================ */

.footer-contact {
    width: 100%;
    background-color: var(--light-blue);
    padding: 40px 15px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

.footer-contact-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    gap: 20px;
}

.footer-title {
    color: var(--darker-white);
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.footer-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

.footer-form .input-container label {
    color: var(--darker-white);
}

.footer-form .input-wrapper input,
.footer-form .input-wrapper textarea {
    border-color: var(--light-blue);
    color: var(--light-blue);
    background: #ffffff;
}

.footer-form .input-wrapper input::placeholder,
.footer-form .input-wrapper textarea::placeholder {
    color: var(--light-blue);
    opacity: 0.6;
}

.footer-form .input-wrapper textarea {
    resize: vertical;
    min-height: 100px;
}

.footer-form .input-wrapper .corners::before,
.footer-form .input-wrapper .corners::after {
    border-color: var(--light-blue);
}

.footer-form button[type="submit"].footer-submit {
    font-size: 1rem;
    font-weight: bold;
    background-color: transparent;
    color: var(--darker-white);
    border: 2px solid var(--darker-white);
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
}

.footer-form button[type="submit"].footer-submit:hover {
    background-color: var(--darker-white);
    color: var(--light-blue);
}

.footer-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 70%;
    gap: 10px;
    margin: 25px 0;
}

.footer-divider::before,
.footer-divider::after {
    content: '';
    flex: 1;
    height: 3px;
    background-color: var(--darker-white);
}

.footer-divider span {
    color: var(--darker-white);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.footer-socials {
    display: flex;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    transition: opacity 0.3s ease;
    text-decoration: none;
    background: transparent;
}

.footer-socials a,
.footer-socials a i {
    color: #ffffff !important;
}

/* ============================= Machines Panel ============================ */

#machines-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--darker-white);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#machines-panel.active {
    right: 0;
}

.machines-panel-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.machines-panel-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#machines-panel-back {
    font-size: 2rem;
    cursor: pointer;
    color: var(--light-blue);
    line-height: 1;
    transition: transform 0.3s ease;
}

#machines-panel-back:hover {
    transform: translateX(-5px);
}

#machines-panel-close {
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--light-blue);
    transition: transform 0.3s ease;
}

#machines-panel-close:hover {
    transform: rotate(90deg);
}

.machines-panel-search {
    width: 100%;
}

.machines-panel-search .input-wrapper {
    margin-bottom: 0;
}

.machines-panel-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-bottom: 15px;
}

#machines-panel .machines-panel-list .machines {
    width: 100%;
    padding-top: 25px;
}

#machines-panel .machine {
    padding: 15px;
    gap: 12px;
}

#machines-panel .machine > div:first-child {
    flex: 1;
    min-width: 0;
    gap: 3px;
}

#machines-panel .machine > div:first-child h3 {
    font-size: 1.1rem;
}

#machines-panel .machine > div:first-child p {
    font-size: 0.9rem;
}

#machines-panel .machine-tarif {
    margin-top: 3px;
    font-size: 1rem !important;
}

#machines-panel .machine-tarif span {
    font-size: 0.8rem;
}

#machines-panel .machine-specs {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 1px;
}

#machines-panel .machine .machine-slider-container {
    flex: 0 0 40%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

#machines-panel .machine .machine-slider-container img {
    object-fit: contain;
}

.machines-panel-loading,
.machines-panel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    font-weight: bold;
    color: var(--light-blue);
    opacity: 0.6;
}

/* ============================= DESKTOP ================================ */

@media (min-width: 768px) {
    h2 {
        font-size: 2.5rem;
    }

    main {
        width: 80%;
        max-width: 1000px;
        gap: 30px;
    }

    header > div:first-child {
        padding: 20px 40px;
    }

    header > div:first-child > a {
        max-width: 8%;
    }

    #close-menu {
        font-size: 3rem;
    }

    #side-menu {
        width: 380px;
        padding: 35px 45px;
    }

    #side-menu a {
        font-size: 1.8rem;
    }

    #side-menu nav {
        gap: 20px;
    }

    .notification {
        font-size: 1rem;
        padding: 18px 40px;
    }

    /* Footer */
    .footer-contact {
        padding: 60px 40px 40px;
        margin-top: 60px;
    }

    .footer-contact-inner {
        max-width: 600px;
    }

    .footer-title {
        font-size: 2rem;
    }

    .footer-socials {
        gap: 30px;
    }

    .footer-socials a {
        width: 56px;
        height: 56px;
        font-size: 2rem;
    }

    /* Machines Panel */
    #machines-panel {
        width: 450px;
        padding: 25px;
    }

    .machines-panel-header {
        margin-bottom: 20px;
    }

    #machines-panel .machine {
        padding: 20px;
        gap: 18px;
    }

    #machines-panel .machine > div:first-child h3 {
        font-size: 1.4rem;
    }

    #machines-panel .machine > div:first-child p {
        font-size: 1rem;
    }

    #machines-panel .machine-tarif {
        font-size: 1.1rem !important;
    }

    #machines-panel .machine-tarif span {
        font-size: 0.9rem;
    }

    #machines-panel .machine-specs {
        font-size: 0.9rem;
    }

    #machines-panel .machine .machine-slider-container {
        flex: 0 0 35%;
    }
}
