{% load static %}
<!-- Header avec image de fond pour les pages internes -->
<div class="page-header" style="margin:0;background: linear-gradient(135deg, rgba(30, 24, 16, 0.8), rgba(212, 175, 55, 0.3)), url('{% if header_image %}{% if image_absolute %}{{ header_image }}{% else %}{% static header_image %}{% endif %}{% else %}{% static "assets/img/construction-bg.jpg" %}{% endif %}') center/cover;">
    <div class="container">
        <div class="header-content">
            {% if badge_text %}
            <div class="header-badge">
                <div class="pulse-dot"></div>
                {{ badge_text }}
            </div>
            {% endif %}
            
            <h1 class="header-title">{{ page_title|default:"ECOLUX BTP" }}</h1>
            
            {% if page_description %}
            <p class="header-description">{{ page_description }}</p>
            {% endif %}
            
            {% if breadcrumb %}
            <nav class="breadcrumb">
                <a href="{% url 'app:home' %}" class="breadcrumb-link">Accueil</a>
                {% for crumb in breadcrumb %}
                <span class="breadcrumb-separator">→</span>
                {% if crumb.url %}
                <a href="{{ crumb.url }}" class="breadcrumb-link">{{ crumb.title }}</a>
                {% else %}
                <span class="breadcrumb-current">{{ crumb.title }}</span>
                {% endif %}
                {% endfor %}
            </nav>
            {% endif %}
        </div>
    </div>
</div>

<style>
.page-header {
    position: relative;
    padding: 8rem 0 4rem;
    color: white;
    overflow: hidden;
    margin-top: 5rem;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(30, 24, 16, 0.7),
        rgba(212, 175, 55, 0.2),
        rgba(30, 24, 16, 0.6)
    );
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-light);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(30, 24, 16, 0.5);
}

.header-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(30, 24, 16, 0.3);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.breadcrumb-link:hover {
    color: var(--secondary-light);
    background: rgba(212, 175, 55, 0.1);
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.breadcrumb-current {
    color: var(--secondary-light);
    font-weight: 600;
}

@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .breadcrumb {
        justify-content: center;
        font-size: 0.875rem;
    }
}
</style>
