/* ============================================================
   maPtitePanne.fr — CSS page d'accueil
   ============================================================ */

/* ------------------------------------------------------------
   Hero — barre de recherche centrale
   ------------------------------------------------------------ */
.home-hero {
    background: linear-gradient(135deg, #2C2C2C 0%, #3d3d3d 100%);
    padding: 2.5rem var(--gap) 2rem;
    text-align: center;
}

.home-hero h1 {
    color: #fff;
    font-size: var(--font-size-2xl);
    margin-bottom: .5rem;
}
@media (min-width: 600px) {
    .home-hero h1 { font-size: var(--font-size-3xl); }
}

.home-hero .hero-sub {
    color: #bbb;
    font-size: var(--font-size);
    margin-bottom: 1.75rem;
}

.hero-search {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-search input {
    flex: 1;
    height: 52px;
    padding: 0 1.1rem;
    border: none;
    font-size: var(--font-size);
    background: #fff;
    min-width: 0;
}
.hero-search input:focus { outline: none; }
.hero-search button {
    height: 52px;
    padding: 0 1.25rem;
    background: var(--color-primary);
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s;
    white-space: nowrap;
}
.hero-search button:hover { background: var(--color-primary-dark); }

.hero-examples {
    margin-top: .9rem;
    font-size: var(--font-size-sm);
    color: #888;
}
.hero-examples a {
    color: #bbb;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.hero-examples a:hover { color: var(--color-primary); }

/* ------------------------------------------------------------
   Section catégories
   ------------------------------------------------------------ */
.home-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem var(--gap) 0;
}

.section-title {
    font-size: var(--font-size-xl);
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--color-border);
}
.section-title span {
    color: var(--color-primary);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .875rem;
}
@media (min-width: 500px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .cat-grid { grid-template-columns: repeat(6, 1fr); }
}

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.1rem .75rem;
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    text-align: center;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.cat-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
}
.cat-card img {
    width: 44px;
    height: 44px;
}
.cat-card-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
}

/* ------------------------------------------------------------
   Section derniers articles
   ------------------------------------------------------------ */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    margin-top: .25rem;
}

.home-article-card {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color .2s, box-shadow .2s;
}
.home-article-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.home-article-card h3 {
    font-size: var(--font-size);
    margin: 0 0 .35rem;
    color: var(--color-text);
    transition: color .15s;
}
.home-article-card:hover h3 { color: var(--color-primary); }

.home-article-card .card-resume {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-article-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .6rem;
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}
.card-cat-label {
    color: var(--color-primary);
    font-weight: 500;
}
