html, body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

* {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f1ece6;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 120px;
    height: 120px;
    background: url('https://i.postimg.cc/SNR1DMsQ/complet-logo.png') no-repeat center/contain;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.7; }
}

.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 40px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
    background: #f1ece6;
    border-radius: 25px;
    padding: 8px 16px;
    gap: 8px;
}

.header-search i {
    color: #666;
    font-size: 0.9rem;
}

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.header-search input::placeholder {
    color: #999;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #001830;
    font-size: 1.1rem;
    transition: background 0.2s;
    text-decoration: none;
}

.header-action-btn:hover {
    background: #f1ece6;
}

.main-content {
    padding-top: calc(36px + 64px + 20px);
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

#hero-spacer {
    display: none;
}

.news-popup.active ~ .main-content {
    filter: blur(8px);
    pointer-events: none;
}

.news-hero {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, #da6f0d 0%, #001830 100%);
    border-radius: 20px;
    margin-bottom: 30px;
}

.hero-content h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
}

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    justify-content: center;
}

.filter-btn {
    padding: 12px 22px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 30px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    color: #001830;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    border-color: #da6f0d;
    color: #da6f0d;
}

.filter-btn.active {
    background: #da6f0d;
    border-color: #da6f0d;
    color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #da6f0d;
}

.news-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-content {
    padding: 24px;
}

.news-card-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.news-card-category.promotion {
    background: #fee2e2;
    color: #dc2626;
}

.news-card-category.nouveaute {
    background: #dbeafe;
    color: #2563eb;
}

.news-card-category.evenement {
    background: #e0e7ff;
    color: #4f46e5;
}

.news-card-category.entreprise {
    background: #d1fae5;
    color: #059669;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #001830;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-card-excerpt {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.no-news-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-news-message i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 16px;
}

.no-news-message p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 100;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.7rem;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: #da6f0d;
}

@media (max-width: 768px) {
    .main-content {
        padding-top: calc(36px + 64px + 12px);
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 72px;
    }

    .header-search {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .news-hero {
        padding: 30px 16px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .news-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        margin-left: -12px;
        margin-right: -12px;
        margin-bottom: 18px;
        padding: 0 12px 6px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .news-filters::-webkit-scrollbar {
        display: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-card {
        border-radius: 14px;
    }

    .news-card-image {
        height: 170px;
    }

    .news-card-content {
        padding: 16px;
    }

    .news-card-title {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .news-card-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 14px;
    }

    .news-card-meta {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        flex: 0 0 auto;
        white-space: nowrap;
        scroll-snap-align: start;
    }
}

@media (max-width: 360px) {
    .main-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .news-hero {
        padding: 24px 12px;
    }

    .hero-content h1 {
        font-size: 1.35rem;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 0.76rem;
    }
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

.news-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.news-popup.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.popup-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-popup.active .popup-container {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.popup-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 90vh;
}

.popup-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
}

.popup-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.popup-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.popup-category.promotion {
    background: #fee2e2;
    color: #dc2626;
}

.popup-category.nouveaute {
    background: #dbeafe;
    color: #2563eb;
}

.popup-category.evenement {
    background: #e0e7ff;
    color: #4f46e5;
}

.popup-category.entreprise {
    background: #d1fae5;
    color: #059669;
}

.popup-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #001830;
    margin-bottom: 12px;
    line-height: 1.3;
}

.popup-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.popup-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

@media (max-width: 480px) {
    .popup-container {
        max-height: 85vh;
    }

    .popup-image {
        height: 180px;
    }

    .popup-body {
        padding: 16px;
    }

    .popup-title {
        font-size: 1.2rem;
    }

    .popup-meta {
        flex-direction: column;
        gap: 8px;
    }
}

.mobile-currency-selector {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.mobile-currency-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #da6f0d;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-currency-selector label i {
    font-size: 0.9rem;
}

.mobile-currency-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.mobile-currency-select:hover,
.mobile-currency-select:focus {
    border-color: #da6f0d;
    background-color: rgba(255,255,255,0.15);
    outline: none;
}

.mobile-currency-select option {
    background: #1f2937;
    color: white;
    padding: 0.5rem;
}

.desktop-search-wrap {
    display: none;
    flex: 1;
    max-width: 400px;
    padding: 0 1rem;
    position: relative;
    overflow: visible;
}

.desktop-search-box {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
    position: relative;
}

.desktop-search-box:focus-within {
    border-color: #da6f0d;
    box-shadow: 0 0 0 3px rgba(218,111,13,0.15);
}

.desktop-search-icon {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.desktop-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    color: #1f2937;
    outline: none;
}

.desktop-search-input::placeholder {
    color: #9ca3af;
}

.desktop-img-search-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-img-search-btn:hover {
    color: #da6f0d;
    background: rgba(218,111,13,0.1);
}

@media (min-width: 1024px) {
    .desktop-search-wrap {
        display: block;
    }
}

.currency-btn-wrapper .desktop-img-search-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.currency-btn-wrapper .desktop-img-search-btn:hover {
    color: #da6f0d;
    background: rgba(218,111,13,0.1);
}

.currency-btn-wrapper {
    position: relative;
}

.currency-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #da6f0d;
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.currency-converter-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 280px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 1rem;
}

.currency-converter-popup.hidden {
    display: none;
}

.currency-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.currency-popup-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.currency-popup-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.currency-popup-close:hover {
    color: #1f2937;
}

.currency-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.currency-popup-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

.currency-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.currency-input-group label {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.currency-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.currency-select:focus {
    border-color: #da6f0d;
    box-shadow: 0 0 0 3px rgba(218,111,13,0.15);
}

.currency-convert-btn {
    background: #da6f0d;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.currency-convert-btn:hover {
    filter: brightness(0.9);
}

.currency-convert-btn:active {
    filter: brightness(0.8);
}

.lp-no-select { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-touch-callout: none; }

#lp-toast {
    position: fixed; bottom: 5rem; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1f2937; color: white;
    padding: 0.65rem 1.25rem; border-radius: 2rem;
    font-size: 0.875rem; font-weight: 500;
    font-family: 'Poppins', sans-serif; white-space: nowrap;
    z-index: 9000; opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    display: flex; align-items: center; gap: 0.5rem;
}
#lp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#lp-toast i    { font-size: 1rem; }
