/* --- HERO BANNER --- */
.hero-section {
    position: relative;
    background-color: #030712;
    padding: 6rem 0;
    color: #ffffff;
    overflow: hidden;
    text-align: center;
}
@media (min-width: 1024px) { .hero-section { padding: 9rem 0; } }

.hero-bg-img {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-tag {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    display: block;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    max-width: 64rem;
    margin: 0 auto;
    line-height: 1.1;
}
@media (min-width: 640px) { .hero-title { font-size: 4.5rem; } }
.hero-title .text-primary { color: var(--primary); }

.hero-desc {
    max-width: 42rem;
    margin: 1.5rem auto 0;
    font-size: 1rem;
    color: #d1d5db;
    font-weight: 500;
    line-height: 1.625;
}
@media (min-width: 640px) { .hero-desc { font-size: 1.25rem; } }

/* --- ARTICLE A LA UNE (FEATURED) --- */
.featured-section {
    padding: 5rem 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}
.dark .featured-section { background-color: rgba(38, 28, 28, 0.2); }

.featured-card {
    background-color: rgba(248, 250, 252, 0.8);
    padding: 1.5rem;
    border-radius: 3rem;
    box-shadow: var(--shadow-premium);
    display: grid;
    gap: 3rem;
    align-items: center;
}
.dark .featured-card { background-color: var(--surface); }
@media (min-width: 640px) { .featured-card { padding: 2.5rem; } }
@media (min-width: 1024px) { .featured-card { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

.featured-img-wrapper {
    height: 400px;
    overflow: hidden;
    border-radius: 2rem;
    position: relative;
}
@media (min-width: 1024px) { .featured-img-wrapper { grid-column: span 7 / span 7; } }

.featured-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s;
}
.featured-img-wrapper:hover img { transform: scale(1.05); }

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background-color: var(--primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
}

.featured-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 1024px) { .featured-info { grid-column: span 5 / span 5; } }

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.featured-title {
    font-size: 1.875rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.025em;
}
@media (min-width: 640px) { .featured-title { font-size: 2.25rem; } }

.featured-desc {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.625;
    color: var(--text);
}
.dark .featured-desc { color: #94a3b8; }

.btn-read {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #000000;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: background-color 0.2s;
    width: max-content;
}
.dark .btn-read { background-color: var(--primary); }
.btn-read:hover { background-color: var(--primary); }
.dark .btn-read:hover { background-color: var(--primary-hover); }

/* --- STICKY BARRE DE FILTRES --- */
.filters-section {
    padding: 1.5rem 0;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 5rem;
    z-index: 40;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: space-between;
    align-items: center;
}
@media (min-width: 1024px) { .filters-container { flex-direction: row; } }

.filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}
@media (min-width: 1024px) { .filters-group { width: auto; } }

#category-filters button {
    padding: 0.625rem 1.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
    font-family: inherit;
}

/* Classes utilitaires d'état gérées par le JS */
.bg-primary { background-color: var(--primary) !important; }
.text-white { color: #ffffff !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important; }
.bg-white { background-color: #ffffff !important; }
.dark .dark\:bg-surface-dark { background-color: var(--surface) !important; }
.text-black { color: #000000 !important; }
.dark .dark\:text-slate-300 { color: #cbd5e1 !important; }

.search-wrapper {
    position: relative;
    width: 100%;
}
@media (min-width: 1024px) { .search-wrapper { width: 20rem; } }

.search-icon {
    position: absolute;
    left: 1rem;
    top: 0.875rem;
    color: #94a3b8;
    font-size: 1.25rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.875rem;
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-slate);
    outline: none;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.dark .search-input { background-color: var(--surface); color: var(--text-main); }
.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(194, 30, 30, 0.2);
}

/* --- GRILLE D'ARTICLES --- */
.articles-section {
    padding: 6rem 0;
    width: 100%;
}

.articles-grid {
    display: grid;
    gap: 2.5rem;
}
@media (min-width: 640px) { .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .articles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.project-card {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark .project-card { background-color: var(--surface); }
.project-card:hover {
    transform: translateY(-6px);
}

.hover-scale {
    overflow: hidden;
    height: 13rem;
    position: relative;
}
.hover-scale img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .hover-scale img {
    transform: scale(1.05);
}

.card-body {
    padding: 2rem;
}

.card-tag {
    font-size: 10px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 900;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s;
}
.project-card:hover .card-title {
    color: var(--primary);
}

.card-desc {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.625;
    color: var(--text-slate);
}
.dark .card-desc { color: #94a3b8; }

.card-footer {
    padding: 0 2rem 2rem;
    margin-top: auto;
}

.card-footer-border {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(229, 225, 225, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dark .card-footer-border {
    border-top: 1px solid rgba(56, 41, 41, 0.4);
}

.card-link {
    color: var(--primary);
    font-weight: 900;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
}
.card-link:hover { color: var(--primary-hover); }

/* Écran d'erreur de recherche vide */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
    background-color: #ffffff;
    border: 2px dashed var(--border);
    border-radius: 1.5rem;
}
.dark .empty-state { background-color: var(--surface); }
.empty-state-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 0.75rem;
}
.empty-state-text {
    font-weight: 700;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* --- BLOC NEWSLETTER --- */
.newsletter-section {
    padding: 3rem 0;
    margin-bottom: 6rem;
    width: 100%;
}

.newsletter-box {
    padding: 2.5rem;
    background-color: #0f172a;
    color: #ffffff;
    border-radius: 3.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    display: grid;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 640px) { .newsletter-box { padding: 5rem; } }
@media (min-width: 1024px) { .newsletter-box { grid-template-columns: repeat(12, minmax(0, 1fr)); } }

.newsletter-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 1024px) { .newsletter-info { grid-column: span 7 / span 7; } }

.newsletter-tag {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    display: block;
}

.newsletter-title {
    font-size: 1.875rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.2;
}
@media (min-width: 640px) { .newsletter-title { font-size: 3rem; } }

.newsletter-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}
@media (min-width: 640px) { .newsletter-desc { font-size: 1rem; } }

.newsletter-form-wrapper {
    width: 100%;
}
@media (min-width: 1024px) { .newsletter-form-wrapper { grid-column: span 5 / span 5; } }

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 640px) { .newsletter-form { flex-direction: row; } }

.newsletter-input {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    color: #ffffff;
    flex-grow: 1;
    font-weight: 500;
    outline: none;
    font-family: inherit;
}
.newsletter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(194, 30, 30, 0.4);
}

.newsletter-submit {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.newsletter-submit:hover { background-color: var(--primary-hover); }
