/* =========================
   PAGE PRODUITS
========================= */

.products-page {
    background: #ffffff;
    padding-bottom: 40px;
}

/* =========================
   HERO
========================= */
.products-hero {
    background: #eef6ef;
    padding: 58px 0 52px;
    border-top: 1px solid #e1e8e2;
    border-bottom: 1px solid #e1e8e2;
}

.products-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #2f9e44;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.products-hero-content h1 {
    font-size: 52px;
    line-height: 1.15;
    font-weight: 800;
    color: #1d2329;
    margin-bottom: 16px;
}

.products-hero-content p {
    max-width: 760px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.75;
    color: #55635b;
}

/* =========================
   MENU HORIZONTAL
========================= */
.products-tabs {
    background: #ffffff;
    border-bottom: 1px solid #e3e8e3;
    padding: 18px 0;
}

.products-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.products-tabs-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 999px;
    background: #f0f1f0;
    color: #3e4742;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background: #2f9e44;
    color: #ffffff;
}

.products-search input {
    width: 260px;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8ded9;
    border-radius: 10px;
    background: #fafafa;
    color: #777;
    font-size: 14px;
}

/* =========================
   MENU DÉROULANT (Mobile/Tablette)
========================= */
.tabs-menu-container {
    position: relative;
    display: none;
}

.tabs-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d8ded9;
    border-radius: 8px;
    background: #f0f1f0;
    color: #3e4742;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.tabs-menu-btn:hover {
    background: #e0e2e0;
    border-color: #c0c5c1;
}

.tabs-menu-btn.active {
    background: #2f9e44;
    color: #ffffff;
    border-color: #25853a;
}

.menu-icon {
    font-size: 18px;
    line-height: 1;
}

.tabs-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid #d8ded9;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tabs-menu-dropdown.open {
    max-height: 400px;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    flex-wrap: nowrap !important;
}

.dropdown-content .tab-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 0;
    background: transparent;
    color: #3e4742;
    text-align: left;
    justify-content: flex-start;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content .tab-btn:hover {
    background: #f9f9f9;
}

.dropdown-content .tab-btn:last-child {
    border-bottom: none;
}

.dropdown-content .tab-btn.active {
    background: #eaf7ee;
    color: #2f9e44;
    font-weight: 700;
}

.desktop-menu {
    display: flex !important;
}

/* =========================
   CONTENU / TITRES
========================= */
.applications-section {
    padding: 50px 0 36px;
}

.section-head {
    margin-bottom: 28px;
}

.section-head h2 {
    font-size: 34px;
    font-weight: 800;
    color: #1d2329;
    margin-bottom: 10px;
    line-height: 1.2;
}

.section-head p {
    max-width: 760px;
    font-size: 15px;
    line-height: 1.7;
    color: #66746b;
}

/* =========================
   CARTES
========================= */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.application-card {
    background: #ffffff;
    border: 1px solid #e3e7e3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.application-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.application-card-image {
    position: relative;
    height: 280px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.application-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 12px;
}

.application-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #2f9e44;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
}

.application-mini-label {
    display: inline-block;
    margin-bottom: 10px;
    color: #2f9e44;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.application-card-content {
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.application-card-content h3 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #1f252c;
    margin-bottom: 10px;
}

.application-card-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #5d695f;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(47, 158, 68, 0.2);
    transition: all 0.2s ease;
}

.application-card-content p:hover {
    border-bottom-color: rgba(47, 158, 68, 0.6);
}

/* Tooltip au survol affichant le texte complet */
.application-card-content p::after {
    content: attr(data-full);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: #2f9e44;
    color: #ffffff;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.65;
    white-space: normal;
    width: 320px;
    max-width: calc(100vw - 32px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    margin-bottom: 10px;
    word-wrap: break-word;
    text-align: left;
}

/* Flèche du tooltip */
.application-card-content p::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #2f9e44;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.application-card-content p:hover::after,
.application-card-content p:hover::before {
    opacity: 1;
    visibility: visible;
}

.card-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #2f9e44;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 16px;
    border-radius: 4px;
    transition: background 0.25s ease;
    margin-top: auto;
}

.card-btn:hover {
    background: #25853a;
}

/* =========================
   PRODUITS MIS EN AVANT
========================= */
.featured-products-section {
    padding: 24px 0 10px;
}

.featured-product-banner {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 14px;
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #d8eadb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.featured-arrow {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #2f9e44;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(47, 158, 68, 0.18);
    transition: background 0.25s ease, transform 0.25s ease;
}

.featured-arrow:hover {
    background: #25853a;
    transform: scale(1.05);
}

.featured-slider-window {
    overflow: hidden;
    width: 100%;
}

.featured-slider-track {
    position: relative;
    width: 100%;
    min-height: 180px;
}

.featured-slide {
    display: none;
    width: 100%;
    animation: fadeFeatured 0.35s ease;
}

.featured-slide.active {
    display: block;
}

@keyframes fadeFeatured {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-product-inner {
    display: grid;
    grid-template-columns: 130px 1fr;
    align-items: center;
    gap: 20px;
}

.featured-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-product-image img {
    width: 100%;
    max-width: 115px;
    max-height: 150px;
    object-fit: contain;
    display: block;
}

.featured-product-content h3 {
    font-size: 15px;
    font-weight: 800;
    color: #1f252c;
    margin-bottom: 8px;
    line-height: 1.3;
}

.featured-product-content p {
    font-size: 11px;
    line-height: 1.65;
    color: #67746c;
    margin-bottom: 12px;
}

.featured-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.featured-detail-btn,
.featured-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.featured-detail-btn {
    background: #2f9e44;
    color: #ffffff;
    border: 1px solid #2f9e44;
}

.featured-detail-btn:hover {
    background: #25853a;
    border-color: #25853a;
}

.featured-pdf-btn {
    background: #ffffff;
    color: #2f9e44;
    border: 1px solid #2f9e44;
}

.featured-pdf-btn:hover {
    background: #edf7ee;
}

/* =========================
   MODE LISTE PRODUITS (produits directs)
========================= */
.applications-grid.products-list-mode {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.applications-grid.products-list-mode .article-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    align-items: center;
    background: #f3f4f3;
    border-radius: 14px;
    padding: 18px 22px;
    border: 1px solid #ecefec;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.applications-grid.products-list-mode .article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.applications-grid.products-list-mode .article-item-image {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.applications-grid.products-list-mode .article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.applications-grid.products-list-mode .article-item-content h3 {
    font-size: 22px;
    font-weight: 800;
    color: #2f9e44;
    margin-bottom: 10px;
}

.applications-grid.products-list-mode .article-item-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #5d695f;
    margin-bottom: 18px;
    max-width: 780px;
}

.applications-grid.products-list-mode .article-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2f9e44;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 20px;
    border-radius: 6px;
    transition: background 0.25s ease;
}

.applications-grid.products-list-mode .article-btn:hover {
    background: #25853a;
}

/* =========================
   RESPONSIVE MODE LISTE PRODUITS
========================= */
@media (max-width: 768px) {
    .applications-grid.products-list-mode .article-item {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 16px 18px;
        gap: 16px;
    }

    .applications-grid.products-list-mode .article-item-image {
        max-width: 200px;
        height: 110px;
        margin: 0 auto;
    }

    .applications-grid.products-list-mode .article-item-content h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .applications-grid.products-list-mode .article-item-content p {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .applications-grid.products-list-mode .article-btn {
        font-size: 13px;
        padding: 10px 18px;
        width: auto;
    }
}

@media (max-width: 520px) {
    .applications-grid.products-list-mode .article-item {
        padding: 14px 12px;
        gap: 12px;
    }

    .applications-grid.products-list-mode .article-item-image {
        max-width: 150px;
        height: 100px;
        border-radius: 8px;
    }

    .applications-grid.products-list-mode .article-item-content h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .applications-grid.products-list-mode .article-item-content p {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .applications-grid.products-list-mode .article-btn {
        font-size: 12px;
        padding: 9px 14px;
    }
}

/* =========================
   EMPTY STATE
========================= */
.empty-state {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 1px solid #e1e7e1;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    color: #5d695f;
    font-size: 16px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
    .products-hero-content h1 {
        font-size: 42px;
    }

    .products-hero-content p {
        font-size: 18px;
    }

    .applications-grid {
        gap: 28px;
    }

    .application-card-image {
        height: 230px;
    }

    .application-card-content h3 {
        font-size: 26px;
    }
}

@media (max-width: 900px) {
    .applications-grid {
        grid-template-columns: 1fr;
    }

    .section-head h2 {
        font-size: 30px;
    }

    .application-card-content h3 {
        font-size: 24px;
    }

    .application-card-image {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 44px 0 38px;
    }

    .products-hero-content h1 {
        font-size: 34px;
    }

    .products-hero-content p {
        font-size: 16px;
    }

    .products-tabs-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    /* Afficher le menu déroulant */
    .tabs-menu-container {
        display: block;
        order: 1;
    }

    /* Masquer le menu desktop */
    .products-tabs-menu.desktop-menu {
        display: none !important;
    }

    .products-search {
        order: 2;
        flex-grow: 1;
        min-width: 200px;
    }

    .products-search input {
        width: 100%;
    }

    .applications-section {
        padding: 44px 0 32px;
    }

    .section-head h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .section-head p {
        font-size: 14px;
    }

    .applications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .application-card-image {
        height: 200px;
    }

    .application-card-content {
        padding: 16px 14px 14px;
    }

    .application-card-content h3 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .application-card-content p {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .card-btn {
        font-size: 14px;
        padding: 11px 14px;
    }

    .featured-product-banner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .featured-arrow {
        display: none;
    }

    .featured-product-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
    }

    .featured-product-image img {
        max-width: 100px;
        max-height: 130px;
    }

    .featured-actions {
        justify-content: center;
    }

    .featured-product-content h3 {
        font-size: 14px;
    }

    .featured-product-content p {
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    .tab-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .products-tabs-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .section-head p {
        font-size: 13px;
    }

    .applications-grid {
        gap: 14px;
    }

    .application-card {
        border-radius: 8px;
    }

    .application-card-image {
        height: 160px;
    }

    .application-card-image img {
        padding: 10px;
    }

    .application-badge {
        top: 10px;
        left: 10px;
        font-size: 10px;
        padding: 6px 10px;
    }

    .application-card-content {
        padding: 12px 10px 10px;
    }

    .application-mini-label {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .application-card-content h3 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .application-card-content p {
        font-size: 13px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }

    .card-btn {
        font-size: 12px;
        padding: 9px 12px;
        border-radius: 4px;
    }

    .featured-products-section {
        padding: 18px 0 8px;
    }

    .featured-product-banner {
        padding: 12px;
        gap: 10px;
    }

    .featured-product-content h3 {
        font-size: 13px;
    }

    .featured-product-content p {
        font-size: 10px;
    }

    .featured-detail-btn,
    .featured-pdf-btn {
        padding: 8px 12px;
        font-size: 10px;
    }
}
.card-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.application-card-image,
.article-item-image,
.featured-product-image {
    overflow: hidden;
}

.application-card-image img,
.article-item-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.35s ease;
}

.featured-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.card-image-link:hover img {
    transform: scale(1.02);
}

.search-field {
    width: 100%;
    min-width: 260px;
}