:root {
    --primary: #198754;
    --secondary: #f9a825;
    --text: #333;
    --light: #f5f5f5;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

/* Bouton flottant en bas à droite */
.scroll-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: scale(0);
}

.scroll-btn.show {
    opacity: 1;
    transform: scale(1);
}

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


.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--white);
}

.logo svg {
    width: 50px;
    height: 50px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
}

#logoSoumawale {
    width: 17rem;
}

.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: transparent; /* Transparent by default */
    box-shadow: none; /* No box-shadow initially */
    padding: 1rem 5%;
    transition: background 0.3s, box-shadow 0.3s; /* Smooth transition */
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: -2rem auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    /* color: var(--primary);*/
    font-weight: bold;
    /*border-bottom: 2px solid var(--primary);*/
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.auth-buttons .btn {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.auth-buttons .btn:hover {
    background-color: #1b5e20;
}

.auth-buttons .btn-signup {
    background-color: var(--secondary);
    color: var(--white);
}

.auth-buttons .btn-signup:hover {
    background-color: #c17900;
}


.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('../img/h_main.jpeg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* L'effet "trous de ruche" avec un fond hexagonal */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.7) 30%, transparent 31%) 0 0,
    radial-gradient(circle, rgba(0, 0, 0, 0.7) 30%, transparent 31%) 50% 50%;
    background-size: 4px 3px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

/* Section hero-content pour limiter la largeur du contenu */
.hero-content {
    max-width: 800px;
    padding: 2rem;
    z-index: 2;
}

/* Style du titre et de la description */
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    z-index: 2; /* Texte au-dessus de l'effet */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    z-index: 2; /* Texte au-dessus de l'effet */
}


.cta-button {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.features {
    padding: 5rem 2rem;
    background: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1375px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.products-preview {
    padding: 5rem 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-content {
    padding: 1.5rem 1.5rem 0rem;
}

.product-category {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-price {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.testimonials {
    padding: 4rem 2rem;
}

.testimonials-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright a {
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

.copyright a:hover {
    color: var(--white);
}


@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-content {
        flex-direction: column;
    }

    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        font-size: 12px;
    }
}

#connectedName {
    color: #FFFFFF;
}

.profile-info {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    text-transform: uppercase;
}

.profile-menu a,
.profile-menu button {
    display: block;
    text-align: left;
    width: 100%;
    text-decoration: none;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 22px;
    align-items: center;
    border-top: 1px solid #ebebeb;
}

.profile-menu a:hover,
.profile-menu button:hover {
    background-color: var(--primary) !important;
}

.profile-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.profile-menu-item {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    border: none;
    background: none;
    cursor: pointer;
}

.profile-menu-item:hover {
    color: #FFFFFF;
    border-right: 4px solid var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
    height: 45px;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 60rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    padding: 4rem;
    position: relative;
    height: 55rem;
    overflow-y: scroll;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    border-radius: 500rem;
}

.modal-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: #333;
    margin-top: -2rem;
}

.modal-body img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.modal-body p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}


.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--white);
    cursor: pointer;
    position: absolute;
    left: 1rem;
    top: 60%;
    transform: translateY(-50%);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    background: #494948;
    padding-top: 1rem;
    transition: left 0.3s ease-in-out;
    z-index: 4;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.mobile-nav.active {
    left: 0; /* Apparition */
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 5rem;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease-in-out;
}

.mobile-nav-links a i {
    font-size: 18px;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.mobile-nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-auth-buttons {
    margin-top: auto;
    padding: 1rem;
}

.mobile-auth-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease-in-out;
}

.mobile-auth-buttons .btn-login {
    background: var(--primary);
}

.mobile-auth-buttons .btn-login:hover {
    background: #1b5e20;
}

.mobile-auth-buttons .btn-signup {
    background: var(--secondary);
    margin-top: 10px;
}

.mobile-auth-buttons .btn-signup:hover {
    background: #c17900;
}


@media screen and (max-width: 768px) {
    #logoSoumawale {
        width: 15rem;
    }

    .mobile-menu-toggle {
        display: block;
        margin-right: 4rem;
    }

    .nav-links, .auth-buttons {
        display: none;
    }

    .profile-info {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }

    .profile-info {
        display: none;
    }
}


/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    flex-grow: 1;
}

.toast-close {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

.toast-body {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transition: width linear;
}

/* Toast Types */
.toast-success::before {
    background: var(--primary-color);
}

.toast-success .toast-icon {
    color: var(--primary-color);
}

.toast-success .toast-progress-bar {
    background: var(--primary-color);
}

.toast-error::before {
    background: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-error .toast-progress-bar {
    background: #ef4444;
}

.toast-warning::before {
    background: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning .toast-progress-bar {
    background: #f59e0b;
}

.toast-info::before {
    background: #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-info .toast-progress-bar {
    background: #3b82f6;
}

/* Toast Animation */
@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}
