.main-prom{
    margin-bottom: 3rem;
}

.hero-section {
    padding: 30px 30px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-section h1 {
    font-size: 27px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--outline-variant);
    background: var(--surface-container-lowest);
    font-size: 16px;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
}

/* Promotion Grid */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 1rem 0 4rem;
}

.promo-card {
    background: var(--surface-container-lowest);
    border-radius: 1rem;
    border: 1px solid rgba(219, 194, 176, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-5px);
}

.promo-header {
    padding: 24px 20px 16px;
}

.promo-header h3 {
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 8px;
}

.badge {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 1rem;
    text-transform: uppercase;
}

.badge-ongoing { background: rgba(32, 201, 151, 0.3); color: #20C997; }
.badge-finished { background: rgb(103, 5, 141, 0.3); color: #67058d; }

.promo-count {
    padding: 0 0 20px;
    font-size: 14px;
    color: var(--gray-600);
}

.promo-image {
    height: 200px;
    margin: 0;
    border-radius: 1rem;
    background-size: cover;
    background-position: center;
}

.promo-footer {
    padding: 0 24px 24px;
    margin-top: auto;
}

.cta-banner{
    padding: 2rem;
    border-radius: 1rem;
}

.cta-banner h2{
    font-size: 18px;
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.main-prom{
    margin-bottom: 3rem;
}

/* ===== HERO ===== */
.hero-section {
    padding: 30px 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

@media (min-width: 768px) {
   .hero-section {
        flex-direction: row;
        align-items: flex-end;
    }
}

.header{
    flex: 1;
    min-width: 250px;
}

.hero-section h1 {
    font-size: 27px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 14px;
    color: var(--gray-500);
}

.search-container {
    position: relative;
    align-self: stretch;
    width: 100%;
    flex: 0 0 300px;
}

@media (max-width: 425px) {
    .search-container{
        flex: none;
    }
}

@media (min-width: 768px) {
   .search-container {
        align-self: center;
        width: 300px;
        flex-shrink: 0;
    }
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border-radius: 1rem;
    border: 1px solid var(--gray-200);
    background: var(--surface-container-lowest);
    font-size: 16px;
    outline: none;
}

/* ===== PROMOTION GRID ===== */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr; /* MOBILE: 1 colonne <640px */
    gap: 15px;
    padding: 1rem 0 4rem;
}

/* MINI TABLETTE: 2 colonnes 640px - 767px */
@media (min-width: 640px) and (max-width: 900px) {
   .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* TABLETTE + MINI DESKTOP: 3 colonnes 768px - 1199px */
@media (min-width: 901px) and (max-width: 1199px) {
   .promo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* DESKTOP: 4 colonnes 1200px - 1919px */
@media (min-width: 1200px) and (max-width: 1919px) {
   .promo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 4K: 5 colonnes >=1920px */
@media (min-width: 1920px) {
   .promo-grid {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1800px; /* évite que ça fasse 5 cartes toutes fines */
        margin: 0 auto;
    }
}

/* ===== PROMO CARD ===== */
.promo-card {
    background: var(--surface-container-lowest);
    border-radius: 1rem;
    border: 1px solid rgba(219, 194, 176, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-5px);
}

.promo-header {
    padding: 24px 20px 16px;
    position: relative;
}

.promo-header h3 {
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 8px;
}

.badge {
    position: absolute;
    top: 24px;
    right: 20px;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 1rem;
    text-transform: uppercase;
}

.badge-ongoing { background: rgba(32, 201, 151, 0.3); color: #20C997; }
.badge-finished { background: rgba(103, 5, 141, 0.3); color: #67058d; }

.promo-count {
    padding: 0 0 20px;
    font-size: 14px;
    color: var(--gray-600);
}

.promo-image {
    height: 200px;
    margin: 0;
    border-radius: 0 0 1rem 1rem;
    width: 100%;
    object-fit: cover;
}

/* ===== BORDURES ===== */
/* 2 COL: bordure sur colonne 2 */
@media (min-width: 640px) and (max-width: 767px) {
   .promo-card:not(:nth-child(2n+1)) {
        border-left: 2px solid var(--gray-200);
    }
}

/* 3 COL: bordure sur colonne 2 et 3 */
@media (min-width: 768px) and (max-width: 1199px) {
   .promo-card:not(:nth-child(3n+1)) {
        border-left: 2px solid var(--gray-200);
    }
}

/* 4 COL: bordure sur colonne 2, 3 et 4 */
@media (min-width: 1200px) and (max-width: 1919px) {
   .promo-card:not(:nth-child(4n+1)) {
        border-left: 2px solid var(--gray-200);
    }
}

/* 5 COL: bordure sur colonne 2, 3, 4 et 5 */
@media (min-width: 1920px) {
   .promo-card:not(:nth-child(5n+1)) {
        border-left: 2px solid var(--gray-200);
    }
}

/* ===== CTA BANNER ===== */
.cta-banner{
    background: var(--gradient-main);
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    color: white;
    flex-wrap: wrap;
}

.cta-banner h2{
    font-size: 18px;
    font-weight: 800;
    flex: 1;
}

.btn-cta {
    background: white;
    color: var(--brand-dark);
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

@media (max-width: 640px) {
   .cta-banner { flex-direction: column; text-align: center; }
}