:root {
    /* Palette inspirée de la capture : Vert Forêt élégant, Corail dynamique et accents dorés */
    --hero-dark: #064e3b;
    --hero-mid: #047857;
    --hero-teal: #0f766e;
    --accent-coral: #e11d48;
    --accent-coral-hover: #be123c;
    --accent-gold: #f59e0b;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Barre de navigation supérieure */
.nav-bar {
    background-color: #032b21;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-bar a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s;
}
.nav-bar a:hover {
    color: var(--accent-gold);
}
.nav-tag {
    color: #a7f3d0;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Hero Header (fidèle à la capture) */
header {
    background: linear-gradient(135deg, var(--hero-dark) 0%, var(--hero-mid) 50%, var(--hero-teal) 100%);
    color: #ffffff;
    padding: 4.5rem 2rem 3.5rem;
    text-align: center;
    border-bottom: 4px solid var(--accent-coral);
}
header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}
header p {
    color: #d1fae5;
    max-width: 780px;
    margin: 0 auto 2.2rem;
    font-size: 1.12rem;
    line-height: 1.6;
}

/* Raccourcis gélules (Pill-nav bar) */
.sub-nav-bar {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.sub-nav-bar a {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.sub-nav-bar a:hover,
.sub-nav-bar a.active {
    background-color: #ffffff;
    color: var(--hero-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Conteneur */
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Grille des 3 Cartes Majeures (exactement comme la capture) */
.hub-portals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.2rem;
    margin-bottom: 5rem;
}
.portal-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 2rem 2.2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}
.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -5px rgba(6, 78, 59, 0.15);
    border-color: #34d399;
}
.portal-card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}
.portal-card h3 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #064e3b;
    margin-bottom: 1rem;
}
.portal-card p {
    color: #64748b;
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    min-height: 4.8rem;
}
.portal-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-coral-hover));
    color: #ffffff;
    padding: 0.95rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.25);
    transition: all 0.2s ease-in-out;
}
.portal-btn:hover {
    background: linear-gradient(135deg, var(--hero-mid), var(--hero-dark));
    box-shadow: 0 6px 15px rgba(4, 120, 87, 0.35);
    transform: translateY(-2px);
}

/* Titres de sous-sections de catalogue */
.category-title {
    font-size: 1.7rem;
    color: var(--hero-dark);
    margin-bottom: 2rem;
    border-left: 6px solid var(--accent-coral);
    padding-left: 1rem;
    display: flex;
    align-items: center;
}

/* Grille de produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}
.product-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 22px -3px rgba(6, 78, 59, 0.12);
    border-color: #34d399;
}
.product-img {
    width: 100%;
    height: 195px;
    object-fit: contain;
    margin-bottom: 1.2rem;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 0.4rem;
}
.product-card h4 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 1.4rem;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.35;
}
.btn-card {
    display: inline-block;
    background: linear-gradient(135deg, var(--hero-mid), var(--hero-dark));
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}
.btn-card:hover {
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-coral-hover));
    transform: translateY(-1px);
}

/* Section Ebooks Gratuits Spécifique */
.free-badge-card {
    border: 2px dashed #059669 !important;
    background: #f0fdf4 !important;
}

/* Pied de page */
footer {
    background-color: #032b21;
    color: #cbd5e1;
    padding: 3.5rem 1.5rem 2.5rem;
    border-top: 4px solid var(--accent-coral);
    font-size: 0.95rem;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--accent-gold);
}