/* Pages publiques en ambiance « pro » — inscription (/register) et
   confirmation d'e-mail (/verify-email).
   Reprises des maquettes `mockups/register.html` et `mockups/verify-email.html`.

   ⚠️ Chargée uniquement par ces pages (via <HeadContent>). Même ambiance que
   /login (fond #242424, cards #3A3A3A) mais avec le vocabulaire de classes des
   maquettes ; app.css garde de son côté les classes .auth-* de /login. */

  :root {
    --brand-orange: #DE4A1D;
    --brand-orange-dark: #C43D14;
    --brand-gold: #ECA926;
    --beige: #F5D395;
    --cream: #FFF4EA;
    /* Ambiance "web pro" : plus sombre que les pages publiques (#343434) */
    --page-dark: #242424;
    --card-dark: #3A3A3A;
    --text-light: #DCDCDC;
    --text-white: #FFF4EA;
    --border-dark: #555555;
    --black: #242424;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--page-dark);
    color: var(--text-white);
    line-height: 1.5;
    min-height: 100vh;
    display: flex; flex-direction: column;
  }
  a { color: inherit; text-decoration: none; }

  /* ---- NAVBAR SIMPLIFIÉE ---- */
  .nav {
    background: rgba(27, 27, 27, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
  }
  .nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .nav-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 22px; }
  .nav-brand img { width: 36px; height: 36px; }
  .nav-back {
    color: var(--text-light); font-size: 14px; font-weight: 500;
    transition: color .2s;
  }
  .nav-back:hover { color: var(--brand-orange); }

  /* ---- MAIN ---- */
  main {
    flex: 1;
    padding: 60px 24px 80px;
    position: relative;
  }
  main::before {
    content: ""; position: absolute; inset: 0;
    background:
      radial-gradient(circle at 80% 0%, rgba(222, 74, 29, 0.10), transparent 45%),
      radial-gradient(circle at 10% 90%, rgba(236, 169, 38, 0.08), transparent 50%);
    pointer-events: none;
  }
  .container { max-width: 580px; margin: 0 auto; position: relative; z-index: 1; }

  .header { text-align: center; margin-bottom: 32px; }
  .header img.logo { width: 56px; height: auto; display: block; margin: 0 auto 14px; }
  .header h1 {
    font-size: clamp(28px, 4vw, 38px); font-weight: 800;
    letter-spacing: -0.02em; line-height: 1.1;
    margin-bottom: 10px;
  }
  .header h1 .accent { color: var(--brand-orange); }
  .header p {
    font-size: 15px; color: var(--text-light);
    max-width: 420px; margin: 0 auto;
  }

  /* ---- CARD ---- */
  .form-card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  }
  @media (max-width: 540px) { .form-card { padding: 28px 22px; } }

  .section-title {
    font-size: 11px; font-weight: 700;
    color: var(--brand-gold); letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-dark);
  }
  .section + .section { margin-top: 28px; }

  .field { margin-bottom: 18px; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
  @media (max-width: 540px) {
    .field-row { grid-template-columns: 1fr; gap: 18px; margin-bottom: 0; }
    .field-row .field { margin-bottom: 18px; }
  }

  .label {
    display: block;
    font-size: 11px; font-weight: 700;
    color: var(--cream); letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px; padding-left: 2px;
  }
  .input, .select {
    width: 100%;
    background: var(--page-dark);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    padding: 13px 16px;
    font-family: inherit; font-size: 15px;
    color: var(--text-white);
    transition: border-color .2s, box-shadow .2s;
  }
  .input::placeholder { color: #999; }
  .input:focus, .select:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(222, 74, 29, 0.18);
  }
  .select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23DCDCDC' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
    cursor: pointer;
  }
  .select option { background: var(--page-dark); color: var(--text-white); }
  .field-help {
    font-size: 12px; color: #aaa; margin-top: 6px; padding-left: 2px;
  }

  /* Password reveal eye */
  .password-wrap { position: relative; }
  .password-wrap .input { padding-right: 44px; }
  .toggle-pw {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer;
    color: var(--text-light); padding: 4px; border-radius: 6px;
    display: flex; align-items: center;
  }
  .toggle-pw:hover { color: var(--brand-orange); }
  .toggle-pw svg { width: 20px; height: 20px; }

  /* Conditional registration number field (SIRET / RNA) */
  .field-conditional {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transition: max-height .4s cubic-bezier(.2,.7,.2,1),
                opacity .35s ease,
                margin-bottom .4s ease;
  }
  .field-conditional.is-open {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 18px;
  }

  /* ---- CHECKBOX ---- */
  .cgu {
    display: flex; gap: 10px;
    margin: 22px 0 4px;
    font-size: 13px; color: var(--text-light);
    align-items: flex-start;
  }
  .cgu input[type="checkbox"] {
    accent-color: var(--brand-orange);
    width: 16px; height: 16px;
    margin-top: 2px;
    cursor: pointer; flex-shrink: 0;
  }
  .cgu a {
    color: var(--brand-orange); text-decoration: underline;
  }

  .submit {
    width: 100%;
    background: var(--brand-orange);
    color: var(--cream); border: none;
    border-radius: 12px;
    padding: 15px 24px;
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
    margin-top: 18px;
  }
  .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(222, 74, 29, 0.4);
    background: var(--brand-orange-dark);
  }

  .alt-action {
    text-align: center; font-size: 14px; color: var(--text-light);
    margin-top: 22px;
  }
  .alt-action a {
    color: var(--brand-orange); font-weight: 700;
  }
  .alt-action a:hover { text-decoration: underline; }

  /* ---- FOOTER ---- */
  footer {
    background: #1B1B1B;
    padding: 32px 32px;
    text-align: center;
    border-top: 1px solid var(--border-dark);
  }
  footer .foot-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 800; margin-bottom: 10px;
  }
  footer .foot-brand img { width: 24px; height: 24px; }
  footer .foot-links { margin-bottom: 14px; }
  footer .foot-links a {
    color: var(--text-light); margin: 0 10px; font-size: 13px;
  }
  footer .foot-links a:hover { color: var(--brand-orange); }
  footer .copy { color: #888; font-size: 12px; }

  /* =====================================================================
     PAGE VERIFY-EMAIL (mockups/verify-email.html)
     Même ambiance, mais un <main> centré et une carte de confirmation.
     Les deux pages partagent ce fichier : ce qui diffère est porté par la
     classe de page posée sur <main>, jamais par le sélecteur nu.
     ===================================================================== */
  :root { --success: #34C759; }

  main.page-verify {
    padding: 60px 24px;
    display: flex; align-items: center; justify-content: center;
  }
  main.page-verify::before {
    background:
      radial-gradient(circle at 50% 0%, rgba(52, 199, 89, 0.10), transparent 50%),
      radial-gradient(circle at 50% 100%, rgba(222, 74, 29, 0.08), transparent 55%);
  }

  .card {
    width: 100%; max-width: 460px;
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 48px 36px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    position: relative; z-index: 1;
  }

  .icon-wrap {
    width: 88px; height: 88px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(52, 199, 89, 0.15);
    border: 2px solid var(--success);
    animation: pop .55s cubic-bezier(.2,.7,.2,1) both;
  }
  .icon-wrap svg { width: 44px; height: 44px; color: var(--success); }

  /* Variante d'échec : le lien est expiré ou déjà utilisé. */
  .icon-wrap.is-error {
    background: rgba(222, 74, 29, 0.15);
    border-color: var(--brand-orange);
  }
  .icon-wrap.is-error svg { color: var(--brand-orange); }

  @keyframes pop {
    0% { transform: scale(.6); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .icon-wrap { animation: none; }
  }

  .card h1 {
    font-size: 28px; font-weight: 800;
    letter-spacing: -0.02em; margin-bottom: 12px;
  }
  .card p.message {
    color: var(--text-light); font-size: 15px;
    margin-bottom: 28px;
  }

  .cta {
    display: inline-block;
    background: var(--brand-orange);
    color: var(--cream); border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
  }
  .cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(222, 74, 29, 0.4);
    background: var(--brand-orange-dark);
  }

  /* ---- Erreurs de validation ----
     Blazor pose `.validation-message` sur chaque message et `.invalid` sur le
     champ fautif. Une erreur doit trancher avec le gris des textes d'aide, sans
     reprendre l'orange des CTA — cet orange-là veut dire « action », pas
     « problème ». D'où une teinte dédiée, plus rouge et plus claire. */
  :root { --error: #FF6B5B; }

  .validation-message {
    display: block;
    margin-top: 6px;
    padding-left: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--error);
  }

  .input.invalid, .select.invalid, .textarea.invalid { border-color: var(--error); }
  .input.invalid:focus, .select.invalid:focus, .textarea.invalid:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(255, 107, 91, 0.2);
  }

  /* Bandeau d'erreur en tête de formulaire (échec côté serveur). */
  .form-error {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--error);
    border-left-width: 3px;
    border-radius: 10px;
    background: rgba(255, 107, 91, 0.12);
    color: var(--error);
    font-size: 14px;
    font-weight: 600;
  }

  /* ---- Panneau de résultat ----
     Inscription terminée, message envoyé : ce n'est plus un formulaire mais une
     réponse. On le centre comme la carte de /verify-email, qui joue le même rôle,
     plutôt que de garder l'alignement à gauche d'un formulaire à remplir.
     La largeur du texte est bornée pour que les lignes centrées restent lisibles. */
  .form-card--notice { text-align: center; }

  .form-card--notice .section-title {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 18px;
  }

  .form-card--notice p:not(.form-error) {
    max-width: 44ch;
    margin-left: auto;
    margin-right: auto;
  }

  .form-card--notice .form-error { justify-content: center; }
