/**
 * Homepage Sections — monpetitelectro
 * BEM, 10 sections, responsive 4 breakpoints
 */

/* ==========================================================================
   S1 — HERO
   ========================================================================== */

.hp-hero {
    padding: var(--spacing-2xl) 0;
    background: var(--zinc-50);
}

.hp-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: stretch;
}

/* Slider */
.hp-hero__slider {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    min-height: 420px;
}

.hp-hero__swiper {
    height: 100%;
}

.hp-hero__swiper .swiper-slide {
    height: auto;
}

.hp-hero__slide {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    padding: var(--spacing-3xl) var(--spacing-2xl);
    min-height: 420px;
}

.hp-hero__slide-content {
    max-width: 520px;
}

.hp-hero__surtitre {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
}

.hp-hero__title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 var(--spacing-md);
}

.hp-hero__subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin: 0 0 var(--spacing-xl);
}

.hp-hero__actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hp-hero__actions .btn--primary {
    background: #fff;
    color: var(--accent-dark);
    border-color: #fff;
}
.hp-hero__actions .btn--primary:hover {
    background: var(--zinc-100);
    border-color: var(--zinc-100);
}

.hp-hero__actions .btn--outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}
.hp-hero__actions .btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.hp-hero__pagination {
    bottom: 16px !important;
}
.hp-hero__pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}
.hp-hero__pagination .swiper-pagination-bullet-active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

.hp-hero__fallback {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    padding: var(--spacing-3xl) var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    min-height: 420px;
}
.hp-hero__fallback .hp-hero__title {
    color: #fff;
}
.hp-hero__fallback .hp-hero__subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* Bloc SEO hero */
.hp-hero__seo {
    background: #fff;
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hp-hero__seo-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0 0 var(--spacing-lg);
    line-height: 1.3;
}

.hp-hero__seo-content {
    font-size: var(--font-size-sm);
    color: var(--zinc-600);
    line-height: 1.8;
}
.hp-hero__seo-content p {
    margin: 0 0 var(--spacing-md);
}
.hp-hero__seo-content p:last-child {
    margin-bottom: 0;
}
.hp-hero__seo-content a {
    color: var(--accent);
    text-decoration: underline;
}
.hp-hero__seo-content a:hover {
    color: var(--accent-hover);
}

/* ==========================================================================
   S2 — REASSURANCE
   ========================================================================== */

.hp-reassurance {
    background: #fff;
    border-top: 1px solid var(--zinc-200);
    border-bottom: 1px solid var(--zinc-200);
    padding: var(--spacing-lg) 0;
}

.hp-reassurance__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.hp-reassurance__item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.hp-reassurance__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: 50%;
    color: var(--accent);
}
.hp-reassurance__icon svg {
    width: 20px;
    height: 20px;
}

.hp-reassurance__text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hp-reassurance__title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--zinc-900);
}

.hp-reassurance__text {
    font-size: var(--font-size-xs);
    color: var(--zinc-500);
}

/* ==========================================================================
   S3 — CATEGORIES
   ========================================================================== */

.hp-categories {
    padding: var(--spacing-3xl) 0;
}

.hp-categories__header {
    margin-bottom: var(--spacing-xl);
}

.hp-categories__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0;
}

.hp-categories__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-lg);
}

.hp-categories__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background: #fff;
    border: 1px solid var(--zinc-200);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: var(--zinc-900);
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.hp-categories__card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.08);
    background: var(--accent-light);
}

.hp-categories__icon-wrap {
    margin-bottom: var(--spacing-md);
}

.hp-categories__name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin: 0 0 var(--spacing-xs);
    color: var(--zinc-900);
}

.hp-categories__desc {
    font-size: var(--font-size-xs);
    color: var(--zinc-500);
    margin: 0 0 var(--spacing-sm);
    line-height: 1.4;
}

.hp-categories__count {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 10px;
    border-radius: var(--border-radius-pill);
}

/* ==========================================================================
   S4 — BESTSELLERS
   ========================================================================== */

.hp-bestsellers {
    padding: var(--spacing-3xl) 0;
    background: var(--zinc-50);
}

.hp-bestsellers__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xl);
}

.hp-bestsellers__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0;
}

.hp-bestsellers__link {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.hp-bestsellers__link:hover {
    color: var(--accent-hover);
}

.hp-bestsellers__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   S5 — PROMO BANNER
   ========================================================================== */

.hp-promo {
    padding: var(--spacing-2xl) 0;
}

.hp-promo__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-xl);
    background: var(--accent);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl) var(--spacing-3xl);
}

.hp-promo__content {
    flex: 1;
}

.hp-promo__badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-dark);
    background: var(--secondary-light);
    padding: 4px 12px;
    border-radius: var(--border-radius-pill);
    margin-bottom: var(--spacing-sm);
}

.hp-promo__mention {
    display: block;
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xs);
}

.hp-promo__title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: #fff;
    margin: 0 0 var(--spacing-sm);
}

.hp-promo__subtitle {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.hp-promo__btn {
    flex-shrink: 0;
    background: #fff;
    color: var(--accent-dark);
    border-color: #fff;
    font-weight: 600;
}
.hp-promo__btn:hover {
    background: var(--zinc-100);
    border-color: var(--zinc-100);
}

/* ==========================================================================
   S6 — NOUVEAUTES + ABOUT
   ========================================================================== */

.hp-newabout {
    padding: var(--spacing-3xl) 0;
}

.hp-newabout__grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: var(--spacing-xl);
    align-items: stretch;
}

/* Left — New products */
.hp-newabout__products {
    display: flex;
    flex-direction: column;
}

.hp-newabout__products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.hp-newabout__products-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0;
}

.hp-newabout__products-link {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.hp-newabout__products-link:hover {
    color: var(--accent-hover);
}

.hp-newabout__products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    flex: 1;
}

.hp-newabout__product-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: #fff;
    border: 1px solid var(--zinc-200);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--zinc-900);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.hp-newabout__product-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.hp-newabout__product-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--zinc-50);
}
.hp-newabout__product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hp-newabout__product-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.hp-newabout__product-name {
    font-size: var(--font-size-xs);
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-newabout__product-price {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--accent);
}
.hp-newabout__product-price del {
    color: var(--zinc-400);
    font-weight: 400;
    font-size: var(--font-size-xs);
}
.hp-newabout__product-price ins {
    text-decoration: none;
}

/* Right — About block */
.hp-newabout__about {
    background: var(--zinc-900);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.hp-newabout__about .wordmark {
    font-size: 20px;
}

.hp-newabout__about-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.hp-newabout__about-text {
    font-size: var(--font-size-sm);
    color: var(--zinc-400);
    line-height: 1.6;
}
.hp-newabout__about-text p {
    margin: 0 0 var(--spacing-sm);
}
.hp-newabout__about-text p:last-child {
    margin-bottom: 0;
}

.hp-newabout__stats {
    display: flex;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--zinc-700);
}

.hp-newabout__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hp-newabout__stat-number {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--accent);
}

.hp-newabout__stat-label {
    font-size: var(--font-size-xs);
    color: var(--zinc-400);
}

.hp-newabout__engagement {
    background: var(--zinc-800);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
}
.hp-newabout__engagement p {
    font-size: var(--font-size-xs);
    color: var(--zinc-300);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   S7 — SELECTION PAR CATEGORIE
   ========================================================================== */

.hp-selection {
    padding: var(--spacing-3xl) 0;
    background: var(--zinc-50);
}

.hp-selection__header {
    margin-bottom: var(--spacing-xl);
}

.hp-selection__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0;
}

.hp-selection__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.hp-selection__card {
    background: #fff;
    border: 1px solid var(--zinc-200);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hp-selection__card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--zinc-100);
}

.hp-selection__card-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--zinc-900);
    margin: 0;
    flex: 1;
}

.hp-selection__card-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: var(--border-radius-pill);
}

.hp-selection__card-list {
    list-style: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    margin: 0;
    flex: 1;
}

.hp-selection__card-item {
    border-bottom: 1px solid var(--zinc-100);
}
.hp-selection__card-item:last-child {
    border-bottom: 0;
}

.hp-selection__card-item a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    text-decoration: none;
    color: var(--zinc-700);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}
.hp-selection__card-item a:hover {
    color: var(--accent);
}

.hp-selection__card-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.hp-selection__card-product-name {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-selection__card-product-price {
    font-weight: 600;
    color: var(--zinc-900);
    white-space: nowrap;
    font-size: var(--font-size-xs);
}

.hp-selection__card-btn {
    display: block;
    text-align: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--zinc-100);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.hp-selection__card-btn:hover {
    background: var(--accent-light);
}

/* ==========================================================================
   S8 — MARQUES
   ========================================================================== */

.hp-brands {
    padding: var(--spacing-3xl) 0;
}

.hp-brands__header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.hp-brands__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0;
}

.hp-brands__grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--spacing-md);
}

.hp-brands__card {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--zinc-200);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.hp-brands__card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.hp-brands__logo {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    filter: grayscale(1) opacity(0.5);
    transition: filter var(--transition-base);
}
.hp-brands__card:hover .hp-brands__logo {
    filter: none;
}

.hp-brands__name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--zinc-500);
    transition: color var(--transition-fast);
}
.hp-brands__card:hover .hp-brands__name {
    color: var(--accent);
}

/* ==========================================================================
   NEWSLETTER
   ========================================================================== */

.hp-newsletter {
    padding: var(--spacing-2xl) 0;
    background: var(--zinc-50);
}

.hp-newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-2xl);
}

.hp-newsletter__content {
    flex: 1;
}

.hp-newsletter__title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--zinc-900);
    margin: 0 0 var(--spacing-xs);
}

.hp-newsletter__subtitle {
    font-size: var(--font-size-sm);
    color: var(--zinc-500);
    margin: 0;
}

.hp-newsletter__form {
    flex-shrink: 0;
}

.hp-newsletter__field {
    display: flex;
    gap: 0;
}

.hp-newsletter__input {
    width: 280px;
    padding: 10px 16px;
    border: 1px solid var(--zinc-300);
    border-right: 0;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--zinc-900);
    background: #fff;
    transition: border-color var(--transition-fast);
}
.hp-newsletter__input:focus {
    outline: none;
    border-color: var(--accent);
}
.hp-newsletter__input::placeholder {
    color: var(--zinc-400);
}

.hp-newsletter__btn {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    white-space: nowrap;
}

.hp-newsletter__message {
    font-size: var(--font-size-xs);
    margin: var(--spacing-sm) 0 0;
    min-height: 18px;
}
.hp-newsletter__message--success {
    color: var(--color-success);
}
.hp-newsletter__message--error {
    color: var(--color-error);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* 1200px */
@media (max-width: 1200px) {
    .hp-categories__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hp-brands__grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* 992px */
@media (max-width: 992px) {
    .hp-hero__grid {
        grid-template-columns: 1fr;
    }

    .hp-hero__slider {
        min-height: 340px;
    }

    .hp-hero__slide {
        min-height: 340px;
        padding: var(--spacing-2xl);
    }

    .hp-hero__title {
        font-size: var(--font-size-2xl);
    }

    .hp-hero__fallback {
        min-height: 340px;
        padding: var(--spacing-2xl);
    }

    .hp-reassurance__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hp-bestsellers__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hp-newabout__grid {
        grid-template-columns: 1fr;
    }

    .hp-newabout__about {
        order: -1;
    }

    .hp-selection__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-brands__grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .hp-newsletter__inner {
        flex-direction: column;
        text-align: center;
    }

    .hp-newsletter__form {
        width: 100%;
        max-width: 440px;
    }

    .hp-newsletter__input {
        width: 100%;
        flex: 1;
    }

    .hp-promo__inner {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-2xl);
    }
}

/* 768px */
@media (max-width: 768px) {
    .hp-hero__slide {
        min-height: 280px;
        padding: var(--spacing-xl);
    }

    .hp-hero__slider {
        min-height: 280px;
    }

    .hp-hero__title {
        font-size: var(--font-size-xl);
    }

    .hp-hero__subtitle {
        font-size: var(--font-size-sm);
    }

    .hp-hero__fallback {
        min-height: 280px;
        padding: var(--spacing-xl);
    }

    .hp-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-bestsellers__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-newabout__products-grid {
        grid-template-columns: 1fr;
    }

    .hp-selection__grid {
        grid-template-columns: 1fr;
    }

    .hp-brands__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hp-promo__title {
        font-size: var(--font-size-xl);
    }
}

/* 480px */
@media (max-width: 480px) {
    .hp-hero {
        padding: var(--spacing-lg) 0;
    }

    .hp-hero__slide {
        min-height: 240px;
        padding: var(--spacing-lg);
    }

    .hp-hero__slider {
        min-height: 240px;
    }

    .hp-hero__fallback {
        min-height: 240px;
        padding: var(--spacing-lg);
    }

    .hp-hero__actions {
        flex-direction: column;
    }

    .hp-reassurance__grid {
        grid-template-columns: 1fr;
    }

    .hp-categories__grid {
        grid-template-columns: 1fr 1fr;
    }

    .hp-categories__card {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .hp-bestsellers__grid {
        grid-template-columns: 1fr 1fr;
    }

    .hp-newabout__stats {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    .hp-brands__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-newsletter__field {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hp-newsletter__input {
        border-right: 1px solid var(--zinc-300);
        border-radius: var(--border-radius-sm);
    }

    .hp-newsletter__btn {
        border-radius: var(--border-radius-sm);
    }

    .hp-promo__inner {
        padding: var(--spacing-xl);
    }

    .hp-promo__title {
        font-size: var(--font-size-lg);
    }
}
