/* ============================================
   COMMON.CSS - Styles partagés entre toutes les pages
   ChezBaba Marketplace
   ============================================ */

/* ============================================
   1. VARIABLES CSS
   ============================================ */
:root {
    --blue: #318ce7;
    --alibaba-blue: #2563eb;
    --black: #000000;
    --darkgray1: #333333;
    --darkgray: #999999;
    --lightgray1: #d9d9d9;
    --lightgray: #f5f5f5;
    --slategray: #404E4D;
    --green: #758e4f;
    --white: #ffffff;
    --orange: #EA9010; 
    --pink: #FD6C9E;
    --teal: #17a2b8;
    --alibaba-orange: #ff6900;
    --alibaba-green: #00a86b;
    --alibaba-gray: #f5f5f5;
    --alibaba-dark: #333;
}

/* ============================================
   2. RESET CSS
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--darkgray1);
}

/* ============================================
   3. NAVIGATION
   ============================================ */
nav {
    width: 100%;
    background-color: var(--white);
    border-bottom: 1px solid var(--lightgray1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navBar {
    display: flex;
    flex-direction: column;
}

.navBar_connexion_inscription {
    padding: 8px 15px;
    border-bottom: 1px solid var(--lightgray1);
    font-size: 12px;
    background: linear-gradient(90deg, var(--lightgray) 0%, var(--white) 100%);
}

.navBar_connexion_inscrption_text {
    margin: 0;
}

.connexion_link, 
.inscription_link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.connexion_link:hover,
.inscription_link:hover {
    color: var(--alibaba-blue);
}

.aide_link {
    text-decoration: none;
    color: var(--darkgray);
    margin-left: 15px;
    font-size: 11px;
    transition: color 0.3s ease;
}
.logo-icone-mobile{
    display: none;
}


.aide_link:hover {
    color: var(--blue);
}

.logo_searchBar_button {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 15px;
    border-bottom: 1px solid var(--lightgray1);
}

.nav_logo {
    flex-shrink: 0;
}

.logo_link {
    text-decoration: none;
    color: var(--slategray);
    font-size: 24px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
}

.logo_link:hover {
    transform: scale(1.05);
    color: var(--blue);
}

.baba {
    color: var(--blue);
}

.search_input_button {
    flex: 1;
    display: flex;
    gap: 8px;
}

.search_input {
    flex: 1;
    height: 40px;
    border-radius: 20px;
    border: 2px solid var(--lightgray1);
    background-color: var(--lightgray);
    padding: 0 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search_input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 10px rgba(49, 140, 231, 0.1);
}

.search_button {
    padding: 0 20px;
    height: 40px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--blue) 0%, #4A9EF2 100%);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search_button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(49, 140, 231, 0.3);
}

.button_icons {
    display: none;
}

.categorie_navigation {
    display: flex;
    align-items: center;
    background: var(--lightgray);
}

.categorie {
    padding: 12px 15px;
    border-right: 1px solid var(--lightgray1);
}

.categorieBtn {
    background-color: transparent;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--darkgray1);
    transition: color 0.3s ease;
}

.categorieBtn:hover {
    color: var(--blue);
}

.categorieBtn i {
    margin-right: 8px;
}

.navigation {
    flex: 1;
    overflow-x: auto;
}

.navigation::-webkit-scrollbar {
    height: 3px;
}

.navigation::-webkit-scrollbar-track {
    background: var(--lightgray1);
}

.navigation::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 2px;
}

.navigation ul {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 12px 15px;
    white-space: nowrap;
}

.navigation ul li a {
    text-decoration: none;
    color: var(--darkgray);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navigation ul li a:hover {
    color: var(--blue);
    transform: scale(1.05);
}

/* Icônes mobiles */
.search-icon-mobile,
.mobile-category-icon {
    display: none;
}

/* ============================================
   4. FOOTER
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--darkgray1) 0%, var(--slategray) 100%);
    color: var(--white);
    padding: 50px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-logo-section h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--blue);
    transform: translateY(-3px);
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: var(--blue);
}

.footer-contact-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
    line-height: 1.8;
}

.footer-contact-info strong {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85em;
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85em;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--blue);
}

/* ============================================
   5. MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9ff 100%);
    border-radius: 25px;
    padding: 35px 25px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.4s ease-out;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--darkgray1);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--darkgray);
    font-size: 1em;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--darkgray);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: rgba(49, 140, 231, 0.1);
    color: var(--blue);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--darkgray1);
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--lightgray1);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(49, 140, 231, 0.1);
}

.form-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue) 0%, #4A9EF2 100%);
    color: var(--white);
    padding: 14px 30px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(49, 140, 231, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--blue);
    padding: 14px 30px;
    border: 2px solid var(--blue);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--blue);
    color: var(--white);
    transform: translateY(-1px);
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--lightgray1);
}

.modal-footer p {
    color: var(--darkgray);
    margin-bottom: 5px;
    font-size: 0.9em;
}

.modal-footer a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.seller-highlight {
    background: linear-gradient(135deg, var(--orange) 0%, #FFB347 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.seller-highlight h3 {
    margin-bottom: 8px;
    font-size: 1.2em;
    font-weight: 600;
}

.seller-highlight p {
    opacity: 0.95;
    font-size: 0.95em;
}

/* Scrollbar styling pour modals */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--lightgray);
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--blue);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--slategray);
}

/* ============================================
   6. MENU MOBILE OVERLAY
   ============================================ */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 9999;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-overlay.active {
    display: flex;
}

.mobile-overlay-header {
    background: linear-gradient(135deg, var(--slategray) 0%, var(--darkgray1) 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-overlay-header h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8em;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-overlay-content {
    flex: 1;
    padding: 20px;
}

.mobile-nav-section {
    margin-bottom: 30px;
}

.mobile-nav-section h3 {
    font-size: 1.2em;
    color: var(--darkgray1);
    margin-bottom: 15px;
    font-weight: 600;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 15px;
}

.mobile-nav-links a {
    color: var(--darkgray);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover {
    background-color: var(--lightgray);
    color: var(--blue);
}

.mobile-category-simple {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--darkgray);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-category-simple:hover {
    background-color: var(--lightgray);
    color: var(--blue);
}

.mobile-category-simple i {
    font-size: 1.2em;
    color: var(--blue);
}

.mobile-overlay-footer {
    background-color: var(--lightgray);
    padding: 20px;
    border-top: 1px solid var(--lightgray1);
}

.mobile-auth-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mobile-auth-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-auth-btn.primary {
    background: linear-gradient(135deg, var(--blue) 0%, #4A9EF2 100%);
    color: var(--white);
}

.mobile-auth-btn.secondary {
    background-color: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
}

.mobile-auth-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   7. ANIMATIONS
   ============================================ */
.slide-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.slide-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.success-message {
    background: linear-gradient(135deg, var(--green) 0%, #8CAF6B 100%);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   8. UTILITAIRES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2em;
    color: var(--darkgray1);
    font-weight: 700;
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: var(--darkgray);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   9. RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .navigation {
        display: none;
    }
    .navBar_connexion_inscription{
        display: none;
    }
    .categorie_navigation {
        display: none;
    }
    .logo-icone-mobile{
        display: flex;
        flex-direction: row;
        flex-direction: row;
        padding: 2px 0 2px 0;
        /* background-color: red; */
        gap: 15px;
        justify-content: end;
        padding-right: 10px;  
        width: 100%;
        /* background-color: gray; */

    }
    
      .mobile-logo{
        /* background-color: #000000; */
        text-decoration: none;
        color: var(--slategray);
        font-size: 24px;
        font-weight: bold;
        display: inline-block;
        transition: all 0.3s ease;
        width: 70%;
        /* background-color: red; */
    }
    .nav-mobile-logo{
        padding-right: 100px;
    }
    .mobile-icone{
        width: 30%;
        /* background-color: yellow; */
    }
    .icone i{
        font-size: 1.5em;
        color: var(--black);
    }
    .icone a:hover i{
        color: var(--blue);
        transform: translateY(-2px);
    }
    .button_icons {
        display: none;
    }
  
    .logo_link{
        display: none;
    }

    

    .logo_searchBar_button {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        gap: 10px;
        border-bottom: 1px solid var(--lightgray1);
        flex-wrap: nowrap;
        border-top: solid 1px var(--lightgray1);

    }

    .nav_logo {
        flex-shrink: 0;
        width: auto;
    }

    .logo_link {
        font-size: 24px;
    }

    .search-icon-mobile,
    .mobile-category-icon {
        display: flex;
    }

    .search_input_button {
        flex: 1;
        display: flex;
        align-items: center;
        position: relative;
        min-width: 0;
    }

    .search_input {
        width: 100%;
        height: 40px;
        border-radius: 20px;
        border: 2px solid var(--lightgray1);
        background-color: var(--lightgray);
        padding: 0 50px 0 15px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .search_button {
        display: none;
    }

    .search-icon-mobile {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        background: var(--blue);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 12px;
        cursor: pointer;
        z-index: 1;
    }

    .mobile-category-icon {
        width: 40px;
        height: 40px;
        background: var(--blue);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
        margin-left: 10px;
    }

    .mobile-category-icon:hover {
        background: var(--slategray);
        transform: translateY(-2px);
    }
}

/* ============================================
   10. RESPONSIVE - TABLET & DESKTOP
   ============================================ */
@media (min-width: 480px) {
    .footer-social {
        justify-content: flex-start;
    }

    .search_button {
        padding: 0 25px;
    }
}

@media (min-width: 768px) {
    .button_icons {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    .navBar_connexion_inscription{
        display: no;
    }

    .button_vendre {
        padding: 12px 24px;
        background-color: var(--white);
        color: var(--slategray);
        border: 2px solid var(--lightgray1);
        border-radius: 25px;
        font-size: 14px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .button_vendre:hover {
        background-color: var(--blue);
        color: var(--white);
        border-color: var(--blue);
    }

    .icone {
        color: var(--darkgray1);
        font-size: 24px;
        cursor: pointer;
        display: inline-block;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .icone:hover {
        color: var(--blue);
        transform: translateY(-2px);
    }

    .logo_link {
        font-size: 32px;
    }

    .nav_logo {
        flex-shrink: 0;
        margin-right: 20px;
    }

    .navBar_connexion_inscription {
        padding: 8px 25px;
        font-size: 14px;
    }

    .logo_searchBar_button {
        padding: 15px 25px;
    }

    .search_input {
        height: 45px;
        font-size: 16px;
    }

    .search_button {
        height: 45px;
        font-size: 16px;
    }

    .categorieBtn {
        font-size: 16px;
    }

    .navigation ul {
        gap: 35px;
        padding: 15px 25px;
    }

    .navigation ul li a {
        font-size: 15px;
    }

    .aide_link {
        display: inline;
        margin-left: 15px;
        font-size: 14px;
    }

    .section-padding {
        padding: 80px 30px;
    }

    .section-title {
        font-size: 2.5em;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .section-padding {
        padding: 100px 40px;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 40px;
    }

    .navigation ul {
        gap: 50px;
        padding: 15px 40px;
    }
}