<!DOCTYPE html>
<html lang="fr">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>{{ t_title }}</title>
  <style>
    @media (prefers-color-scheme: dark) {
      .email-body   { background-color: #0f172a !important; }
      .email-card   { background-color: #1e293b !important; box-shadow: none !important; }
      .email-title  { color: #f1f5f9 !important; }
      .email-name   { color: #f1f5f9 !important; }
      .email-text   { color: #cbd5e1 !important; }
      .email-url    { color: #64748b !important; }
      .email-footer { color: #475569 !important; }
      .email-hr     { border-top-color: #334155 !important; }
      .email-ignore { color: #64748b !important; }
      .email-greeting { color: #94a3b8 !important; }
    }
  </style>
</head>
<body class="email-body" style="margin:0;padding:0;background:#f4f6f9;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;">
  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#f4f6f9;padding:40px 16px;" class="email-body">
    <tr>
      <td align="center">
        <table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width:560px;">

          <!-- Logo -->
          <tr>
            <td align="center" style="padding-bottom:24px;">
              <table cellpadding="0" cellspacing="0" border="0" style="display:inline-table;">
                <tr>
                  <td style="width:44px;height:44px;background:#2563eb;border-radius:10px;text-align:center;vertical-align:middle;">
                    <span style="font-size:26px;font-weight:800;color:#ffffff;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;line-height:44px;display:block;">R</span>
                  </td>
                </tr>
              </table>
            </td>
          </tr>

          <!-- Card -->
          <tr>
            <td class="email-card" style="background:#ffffff;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,0.08);padding:40px 40px 32px;">

              <h1 class="email-title" style="margin:0 0 8px;font-size:22px;font-weight:700;color:#111827;line-height:1.3;">
                {{ t_title }}
              </h1>

              <p class="email-greeting" style="margin:0 0 20px;font-size:15px;color:#6b7280;">
                {{ t_greeting }} <strong class="email-name" style="color:#111827;">{{ username }}</strong>,
              </p>

              <p class="email-text" style="margin:0 0 28px;font-size:15px;color:#374151;line-height:1.6;">
                {{ t_body }}
              </p>

              <!-- CTA -->
              <table cellpadding="0" cellspacing="0" border="0" style="margin-bottom:28px;">
                <tr>
                  <td style="background:#2563eb;border-radius:8px;">
                    <a href="{{ reset_url }}"
                       style="display:inline-block;padding:13px 28px;font-size:15px;font-weight:600;color:#ffffff;text-decoration:none;letter-spacing:0.01em;">
                      {{ t_btn }}
                    </a>
                  </td>
                </tr>
              </table>

              <!-- Fallback URL -->
              <p class="email-url" style="margin:0 0 24px;font-size:12px;color:#9ca3af;word-break:break-all;">
                {{ reset_url }}
              </p>

              <hr class="email-hr" style="border:none;border-top:1px solid #e5e7eb;margin:0 0 20px;">

              <p class="email-ignore" style="margin:0;font-size:13px;color:#9ca3af;line-height:1.5;">
                {{ t_ignore }}
              </p>
            </td>
          </tr>

          <!-- Footer -->
          <tr>
            <td align="center" style="padding-top:24px;">
              <p class="email-footer" style="margin:0;font-size:12px;color:#9ca3af;">{{ email }}</p>
            </td>
          </tr>

        </table>
      </td>
    </tr>
  </table>
</body>
</html>
