<!DOCTYPE html>
<html lang="{{ lang|default:'fr' }}">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ page_title }}</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .container {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 30px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        .icon {
            font-size: 48px;
            margin-bottom: 16px;
        }
        h1 {
            color: {{ header_color }};
            font-size: 24px;
            margin: 0 0 16px;
        }
        .message {
            font-size: 16px;
            color: #555;
            margin-bottom: 24px;
        }
        .submit-btn {
            display: inline-block;
            padding: 12px 32px;
            background-color: {{ header_color }};
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
        }
        .submit-btn:hover {
            opacity: 0.9;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="icon">{{ status_icon|safe }}</div>
        <h1>{{ heading }}</h1>
        <form id="rsvp-form" method="post" action="{{ post_url }}">
            <input type="hidden" name="token" value="{{ token }}">
            <input type="hidden" name="action" value="{{ action }}">
            <noscript>
                <button type="submit" class="submit-btn">{{ submit_label }}</button>
            </noscript>
            <p class="message" id="loading-msg">...</p>
        </form>
    </div>
    <script>
        document.getElementById('rsvp-form').submit();
    </script>
</body>
</html>
