:root {
  --nuit: #0B2233; --bleu: #0B6E99; --bleu-fonce: #08506F; --ambre: #E2A74F;
  --texte: #0F1E2B; --gris: #5A6875; --bord: #C9D3DC; --fond: #F3F5F7; --erreur: #A1352A;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; color: var(--texte); background: var(--fond); }

/* --- Mise en page : panneau de marque à gauche, formulaire à droite --- */
.auth { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-marque { flex: 1 1 420px; background: var(--nuit); color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-carre { width: 44px; height: 44px; border-radius: 12px; background: var(--bleu);
  display: grid; place-items: center; font-family: Sora, sans-serif; font-weight: 700; }
.logo strong { display: block; font-family: Sora, sans-serif; }
.logo small { color: #9FB3C2; }
.surtitre { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ambre); font-weight: 700; }
.auth-accroche h1 { font-family: Sora, sans-serif; font-size: 40px; line-height: 1.15; margin: 16px 0; }
.auth-accroche p { color: #C9D6E0; line-height: 1.6; max-width: 480px; }
.metiers { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.metiers li { border: 1px solid #2A4F68; border-radius: 999px; padding: 8px 14px; font-size: 13px; color: #DCE6EE; }

/* --- Logo de l'entreprise --- */
.logo-image { width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain;
  padding: 4px; border-radius: 12px; background: #fff; }

.auth-formulaire { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.carte { width: 100%; max-width: 420px; }
.carte h2 { font-family: Sora, sans-serif; font-size: 28px; margin: 0 0 8px; }
.sous-titre { color: var(--gris); margin: 0 0 24px; }

/* --- Sélecteur Utilisateur / Administrateur --- */
.segment { display: flex; gap: 4px; padding: 4px; margin: 0 0 20px; background: #E6EBF0; border: 0; border-radius: 12px; }
.segment-option { flex: 1; position: relative; }
.segment-option input { position: absolute; opacity: 0; }
.segment-option span { display: flex; align-items: center; justify-content: center; min-height: 44px;
  border-radius: 9px; font-weight: 700; font-size: 14px; color: #4A5966; cursor: pointer; }
.segment-option input:checked + span { background: #fff; color: var(--texte); box-shadow: 0 1px 3px rgba(15,30,43,.12); }
.segment-option input:focus-visible + span { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* --- Champs du formulaire --- */
.champ { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.champ label { font-size: 13px; font-weight: 700; }
.champ input { height: 48px; padding: 0 14px; border: 1px solid var(--bord); border-radius: 12px;
  font: inherit; font-size: 15px; background: #fff; color: var(--texte); }
.champ input:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }

/* Liste déroulante (Direction) */
.champ select {
  height: 48px; padding: 0 40px 0 14px; border: 1px solid var(--bord); border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--texte); background-color: #fff; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6875' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.champ select:focus { outline: 2px solid var(--bleu); outline-offset: 1px; border-color: var(--bleu); }

.errorlist { list-style: none; margin: 0; padding: 0; color: var(--erreur); font-size: 13px; }

/* --- Boutons et liens --- */
.bouton { width: 100%; min-height: 50px; margin-top: 8px; border: 0; border-radius: 12px; background: var(--bleu);
  color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.bouton:hover { background: var(--bleu-fonce); }
.bas { text-align: center; color: var(--gris); font-size: 14px; margin-top: 20px; }
.bas a { color: var(--bleu); font-weight: 700; text-decoration: none; }

/* Quand "Administrateur" est coché : on affiche la note et on cache le lien d'inscription */
.note-admin { display: none; padding: 12px 14px; margin-top: 16px; border-radius: 12px;
  background: #FBF1E2; color: #6B4510; font-size: 13px; line-height: 1.5; }
.carte:has(input[value="admin"]:checked) .note-admin { display: block; }
.carte:has(input[value="admin"]:checked) .bas { display: none; }

/* --- Messages --- */
.alerte { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alerte-error { background: #FBEAE7; color: #7E2A20; }
.alerte-success { background: #E3F2EA; color: #1F6B45; }
.alerte-info { background: #E6F1F6; color: #0A5A7D; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }