/* Déclarations @font-face */

/* Astaghfirulloh */
@font-face {
    font-family: 'Astaghfirulloh';
    src: url('/font/Astaghfirulloh/AstaghfirullohDemoRegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Roboto Variable Fonts (recommandées) */
@font-face {
    font-family: 'Roboto Variable';
    src: url('/font/Roboto/Roboto-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Variable';
    src: url('/font/Roboto/Roboto-Italic-VariableFont_wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* Roboto Static Fonts (fallbacks) */
@font-face {
    font-family: 'Roboto';
    src: url('/font/Roboto/static/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/font/Roboto/static/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/font/Roboto/static/Roboto-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/font/Roboto/static/Roboto-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/font/Roboto/static/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tangerine';
    src: url('/font/Tangerine/Tangerine-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tangerine';
    src: url('/font/Tangerine/Tangerine-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Variables CSS */
:root {
    /* Familles de polices */
    --font-astaghfirulloh: 'Astaghfirulloh', serif;
    --font-tangerine: 'Tangerine', serif;
    --font-roboto-variable: 'Roboto Variable', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-roboto: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-primary: var(--font-roboto-variable);
    --font-secondary: var(--font-tangerine);
    --font-arabic: var(--font-astaghfirulloh);

    /* Palette orientale */
    --color-primary: #E5C8B8;
    --color-primary-light: #f7eeea;
    --color-primary-very-light: #FCFBFA;
    --color-primary-hard: #9B674B;
    --color-secondary: #444444;
    --color-secondary-light: #666666;
}

body {
    margin: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
}

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

.container {
    font-family: var(--font-primary);
    display: flex;
    height: 100vh;
}

#content {
    flex: 1;
    overflow-y: auto;
}

.insert {

    background-color: var(--color-primary-light);
    color: var(--color-secondary);
    padding: 8px 25px 25px 25px;
    border-radius: 15px;
}

.insert-w {

    color: var(--color-secondary);
    padding: 8px 25px 25px 25px;
    border-radius: 15px;
    border: 1px solid var(--color-primary);
}

.cart-header {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-primary);
    margin-bottom: 20px;
}

.cart-header h1 {
    font-size: 1.6rem;
    font-weight: 200;
    margin-bottom: 2px;
}

.cart-header p {
    font-size: 0.9rem;
    font-weight: 200;
    margin-bottom: 0;
}

.m-a {
    margin-right: auto;
    margin-left: auto;
    display: block;
}

.flex-align {
    display: flex;
    align-items: center;
}

/* -- MARGIN-TOP -- */

.mt-xs {
    margin-top: 5px;
}

.mt-sm {
    margin-top: 10px;
}

.mt-md {
    margin-top: 20px;
}

.mt-lg {
    margin-top: 30px;
}

.mt-xl {
    margin-top: 40px;
}

.mt-xxl {
    margin-top: 50px;
}

/* -- MARGIN-RIGHT -- */

.mr-xs {
    margin-top: 5px;
}

.mr-sm {
    margin-right: 10px;
}

.mr-md {
    margin-right: 20px;
}

.mr-lg {
    margin-right: 30px;
}

.mr-xl {
    margin-right: 40px;
}

.mr-xxl {
    margin-right: 50px;
}

.clickable {
    cursor: pointer;
}


/* ---- L A N G U A G E   &   C U R R E N C Y    L I S T E ---- */

#language, #currency {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 6;
    height: 100vh;
    width: 100vw;
    background-color: rgba(255, 255, 255, 0.5);

}

.container-selected {

    margin: auto;
    width: 80%;
    max-width: 300px;
    height: 80%;
    max-height: 600px;

}

.item-selected {
    width: 100%;
    height: 100%;
    background-color: white;
    padding: 20px 0;
    border-radius: 15px;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.item-selected a {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--color-primary);
    font-size: 1.2rem;
    font-family: var(--font-primary);
    color: var(--color-secondary-light);
    text-decoration: none;
}

.item-selected p {
    margin-right: 10px;
}

.close-selected-list {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    color: white;
    border: 1px solid var(--color-primary);
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* ------------------------ B T N---------------------------- */

.button {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 300;
}

.no-deco {
    text-decoration: none;
}

.button_picto {

    border: 1px solid var(--color-primary) !important;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    text-decoration: none;
    align-items: center;
}

.button_picto_big {

    border: 1px solid var(--color-primary) !important;
    padding: 11px 22px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    text-decoration: none;
    align-items: center;
    font-size: 18px;
}

.btn_bg_white {
    background-color: white;
    color: var(--color-secondary);
}

.btn_bg_pink {
    background-color: var(--color-primary);
    color: white;
}

.btn_bg_pink_hard {
    background-color: var(--color-primary-hard);
    color: white;
}

.button_picto p {

    margin-right: 5px;
}

.button_picto_big p {

    margin-right: 10px;
}

/* -------------------------------------------------------- */

.popup-bandeau {
    background: var(--color-primary-light);
    color: var(--color-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid var(--color-primary);
}

.step-actions {
    flex-wrap: wrap;
}

@media (max-width: 450px) {

    .step-actions {
        flex-direction: column-reverse;
        gap: 15px;
    }

}


header {

    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--color-primary-very-light);
    font-family: var(--font-primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-menu {
    cursor: pointer;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    display: none;
}

.burger-menu lord-icon {

    display: none;

}

.burger-menu div {
    width: 40px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 10px;
    transition: all 0.3s ease;
}


.header-close-btn {
    display: none;
}

.nav-btn {
    padding: 0 25px 25px 25px;
    display: flex;
    justify-content: space-between;
}

.link-menu {
    height: 80px;
    padding-left: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid darkgray;
    font-weight: 200;
}

.link-menu a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 1.1rem;

}


.nav-btn-out-header {
    display: none;
    background-color: white;
    width: 100%;
    justify-content: space-between;
}

.nav-btn-out-header lord-icon, .nav-btn lord-icon {
    cursor: pointer;
}




/* Overlay pour fermer le menu mobile */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1000px) {

    .burger-menu {
        display: block;
    }

    .nav-btn-out-header {
        display: flex;
        padding: 2px 8px;
        position: absolute;
        background-color: var(--color-primary-very-light);
        z-index: 2;
        border-bottom: 1px solid var(--color-primary);
    }

    .nav-btn {
        margin-top: 10px;
    }

    .header-close-btn {
        display: flex;
        justify-content: flex-end;
        padding: 10px 15px 0 0;
        cursor: pointer;
    }

    header {
        position: fixed;
        top: 0;
        left: -250px;
        transition: left 0.3s ease;
        z-index: 5;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);

    }

    .active {
        left: 0;
    }

    .bloc {
        display: block;
    }

    .menu {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }

    .btn-header {
        height: 140px;
    }

    .menu-overlay {
        display: block;
    }

    .link-menu {
        height: 80px;
        padding-left: 20px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid darkgray;
        font-weight: 200;
    }

    .link-menu {

        height: 65px;

    }

    .menu {
        justify-content: flex-start;
    }

    .link-menu a {
        font-size: 1rem;
    }

}





.bloc-logo {

    padding: 63px 20px 0 20px;
}




.logo {

    display: block;
    width: 320px;
    height: auto;
    margin: auto;

}

.search-form {
    width: 100%;
    max-width: 800px;
    margin: 40px auto 0 auto;
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    padding: 4px 0 4px 10px;

    display: flex;
    justify-content: space-between;
}

.search-input {
    border: none;
    outline: none;
    width: 100%;
    padding: 10px;
    flex: 1;
    font-family: var(--font-primary);
    font-size: 16px;
}

/* Styles pour les icônes de recherche */
.search-icon,
.advanced-search-icon {
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.search-icon:hover,
.advanced-search-icon:hover {
    transform: scale(1.1);
}

.search-icon:active,
.advanced-search-icon:active {
    transform: scale(0.95);
}

/* Séparateur visuel entre les icônes */
.advanced-search-icon {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 8px;
    margin-left: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-form {
        max-width: 95%;
        padding: 2px 0 2px 8px;
    }

    .search-input {
        font-size: 14px;
        padding: 8px;
    }

    .search-icon,
    .advanced-search-icon {
        width: 35px !important;
        height: 35px !important;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 250px;
    }

    .search-form {
        margin: 30px auto 0 auto;
    }

    .search-input {
        font-size: 13px;
        padding: 6px;
    }

    .search-icon,
    .advanced-search-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

footer {
    background-color: var(--color-secondary);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 300;
    padding: 15px 20px;
}

.link-footer {
    text-decoration: none;
    color: white;
}

.data-footer {
    display: grid;
    align-items: anchor-center;
}

@media (min-width: 706px) {
    .data-footer {
        width: 80%;
        grid-template-areas: "A B C";
    }
}

@media (max-width: 705px) {
    .data-footer {

        grid-template-areas: "C C C"
                             "B B B"
                             "A A A";
    }

    .elm-footer {
        margin-bottom: 15px;
    }
}

.rs a img {
    width: 40px;
}

.copy {
    grid-area: A;
}

.rs {
    grid-area: B;
    margin-right: 20px;
}

.link {
    grid-area: C;
}

/* Chat flottant - Styles cohérents avec globale.css */

.chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Bouton flottant */
.btn-chat {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease-in-out;
}

.btn-chat:hover {
    transform: scale(1.05);
}

.picto-chat {
    background-color: white;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    position: relative;
}

#icon-open {
    width:50px;height:50px
}


.picto-chat:hover {
    background-color: var(--color-primary-very-light);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.question-chat {
    font-size: 0.875rem;
    font-weight: 500;
    background-color: white;
    color: #374151;
    padding: 8px 12px;
    border-radius: 20px;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    transition: opacity 0.2s ease-in-out;
}

/* Badge de notification */
.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc2626;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 0.2s ease-in-out;
}

.chat-badge.show {
    transform: scale(1);
}

/* Container du chat */
.chat-container {
    position: absolute;
    bottom: 105px;
    right: 0;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0) translateY(20px);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 450px) {

    .picto-chat {
        width: 50px;
        height: 50px;
        opacity: 0.9;
    }


    #icon-open {
        width:40px;height:40px
    }

}


.chat-container.open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header du chat */
.chat-header {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.chat-close:hover {
    opacity: 1;
}

/* Zone des messages */
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--color-primary-very-light);
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Messages */
.message {
    display: flex;
    /*margin-bottom: 8px;*/
    animation: fadeInUp 0.3s ease-out;
}

.message.visitor {
    justify-content: flex-end;
}

.message.seller {
    justify-content: flex-start;
    background-color: var(--color-primary-very-light);
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.875rem;
    line-height: 1.4;
    position: relative;
}

.message.visitor .message-bubble {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border-bottom-right-radius: 4px;
}

.message.seller .message-bubble {
    background-color: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

.message.seller .message-time {
    text-align: left;
}

/* Indicateur de frappe */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    max-width: 75%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out;
}

.typing-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: typingDot 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Zone de saisie */
.chat-input-container {
    padding: 16px;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    position: relative;
}


.chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 80px;
    transition: border-color 0.2s ease-in-out;
    resize: none;
    overflow: hidden;
}

.chat-input::-webkit-scrollbar {
    display: none;
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.chat-send {
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.chat-send:hover {
    background-color: var(--color-primary);
    transform: scale(1.05);
}

.chat-send:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Message de bienvenue */
.welcome-message {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.email-notification-notice {
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    color: #0c5460;
    font-size: 13px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
    position: absolute;
    width: 99%;
    top: 10px;
    left: 0.5%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Styles pour les traductions */
.message-content {
    /* Style pour le message principal */
}

.message-translation {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.8em;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #6b7280;
}

.message-translation span {
    font-style: normal;
}

.message.seller .message-translation {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.message.visitor .message-translation {
    border-top-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
}


.system-message {
    font-size: 13px;
    color: var(--color-secondary);
}

/* Responsive */
@media (max-width: 480px) {
    .chat-container {
        position: fixed;
        width: calc(100vw - 40px);
        height: 78vh;
        right: 20px;
        top: 11vh;
    }

    .question-chat {
        display: none;
    }
    
    .message-translation {
        font-size: 0.75em;
        margin-top: 4px;
        padding-top: 4px;
    }
}