<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Nouvelle demande de consultation - Renfort Immo</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            background: #3498db;
            color: white;
            padding: 20px;
            text-align: center;
            margin-bottom: 20px;
        }
        .content {
            background: #f9f9f9;
            padding: 20px;
            border-radius: 5px;
        }
        .field {
            margin-bottom: 15px;
            padding: 10px;
            background: white;
            border-left: 4px solid #3498db;
        }
        .field-label {
            font-weight: bold;
            color: #2c3e50;
        }
        .field-value {
            margin-top: 5px;
        }
        .priority {
            background: #e74c3c;
            color: white;
            padding: 10px;
            text-align: center;
            margin-bottom: 20px;
            border-radius: 5px;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>🏠 Renfort Immo</h1>
        <h2>Nouvelle demande de consultation</h2>
    </div>

    <div class="priority">
        <strong>⚡ Demande urgente - Traiter en priorité</strong>
    </div>

    <div class="content">
        <div class="field">
            <div class="field-label">👤 Profil du demandeur :</div>
            <div class="field-value">{{ data.profile|title }}</div>
        </div>

        {% if data.budget %}
        <div class="field">
            <div class="field-label">💰 Budget estimé :</div>
            <div class="field-value">{{ data.budget|replace({'-': ' '})|title }}</div>
        </div>
        {% endif %}

        <div class="field">
            <div class="field-label">⚠️ Type de projet :</div>
            <div class="field-value">
                {{ data.project_type|map(p => p|replace({'-': ' '})|title)|join(', ') }}
            </div>
        </div>

        <div class="field">
            <div class="field-label">📝 Nom et prénom :</div>
            <div class="field-value">{{ data.name }}</div>
        </div>

        <div class="field">
            <div class="field-label">📧 Email :</div>
            <div class="field-value">
                <a href="mailto:{{ data.email }}">{{ data.email }}</a>
            </div>
        </div>

        <div class="field">
            <div class="field-label">📞 Téléphone :</div>
            <div class="field-value">
                <a href="tel:{{ data.phone }}">{{ data.phone }}</a>
            </div>
        </div>

        {% if data.city %}
        <div class="field">
            <div class="field-label">🏘️ Ville du bien :</div>
            <div class="field-value">{{ data.city }}</div>
        </div>
        {% endif %}

        {% if data.description %}
        <div class="field">
            <div class="field-label">💬 Description de la situation :</div>
            <div class="field-value">{{ data.description|nl2br }}</div>
        </div>
        {% endif %}

        <div class="field" style="border-left: 4px solid #e74c3c; background: #fdf2f2;">
            <div class="field-label">⏰ Date de réception :</div>
            <div class="field-value">{{ "now"|date("d/m/Y à H:i") }}</div>
        </div>

        <div style="text-align: center; margin-top: 30px; padding: 20px; background: #d5f4e6; border-radius: 5px;">
            <h3 style="color: #27ae60; margin: 0;">🎯 Action requise</h3>
            <p style="margin: 10px 0 0 0; color: #2c3e50;">
                Contacter le demandeur dans les <strong>24h</strong> pour la consultation gratuite
            </p>
        </div>
    </div>
</body>
</html>
