/**
 * VA Elevation - Pages de connexion et d'inscription
 *
 * Une seule feuille pour les quatre pages publiques du compte (connexion,
 * inscription assistant, inscription client, mot de passe oublié). Avant, chaque
 * page recopiait trois cents lignes de styles et elles divergeaient. Elle lit les
 * couleurs de style.css, qui reste la seule source de la charte.
 */

.acces {
    min-height: 100vh;
    min-height: 100dvh; /* 100vh déborde sous la barre d'adresse de Safari sur iPhone */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 48px;
    background:
        radial-gradient(900px 520px at 12% -8%, rgba(255, 255, 255, .09), transparent 62%),
        linear-gradient(160deg, var(--firefly) 0%, var(--firefly-light) 100%);
}

.acces-cadre {
    width: 100%;
    max-width: 480px;
}

.acces-cadre.large {
    max-width: 600px;
}

.acces-retour {
    display: inline-block;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
}

.acces-retour:hover,
.acces-retour:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.acces-carte {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(3, 9, 22, .38);
    overflow: hidden;
}

.acces-entete {
    padding: 28px 28px 8px;
}

.acces-marque {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.acces-marque-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--firefly);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: .5px;
}

.acces-marque-nom {
    font-weight: 700;
    color: var(--firefly);
    line-height: 1.2;
}

.acces-marque-nom span {
    display: block;
    font-weight: 400;
    font-size: 13px;
    color: var(--oslo-gray);
}

.acces-entete h1 {
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
    color: var(--firefly);
    margin-bottom: 6px;
}

.acces-entete p {
    color: var(--oslo-gray);
    font-size: 15px;
}

.acces-corps {
    padding: 20px 28px 28px;
}

.acces-pied {
    padding: 18px 28px 22px;
    background: var(--wild-sand);
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    text-align: center;
}

.acces-pied p + p {
    margin-top: 8px;
}

.acces-pied a {
    font-weight: 600;
}

.acces-legal {
    margin-top: 14px;
    font-size: 13px;
    color: var(--oslo-gray);
}

.acces-legal a {
    font-weight: 400;
    color: var(--oslo-gray);
    text-decoration: underline;
}

/* Bandeaux : erreur, attente, réussite */

.bandeau {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid;
}

.bandeau:focus {
    outline: none;
}

.bandeau strong {
    display: block;
    margin-bottom: 4px;
}

.bandeau ul {
    margin: 6px 0 0 18px;
}

.bandeau a {
    color: inherit;
    text-decoration: underline;
}

.bandeau-erreur {
    background: var(--danger-bg);
    border-color: #b91c1c;
    color: #7f1d1d;
}

.bandeau-attente {
    background: var(--warning-bg);
    border-color: #b45309;
    color: #78350f;
}

.bandeau-info {
    background: var(--info-bg);
    border-color: #1d4ed8;
    color: #1e3a8a;
}

/* Champs */

.champ {
    margin-bottom: 18px;
}

.champ > label,
.champ > .champ-titre {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--mako);
}

.champ .facultatif {
    font-weight: 400;
    color: var(--oslo-gray);
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="tel"],
.champ input[type="url"],
.champ input[type="password"],
.champ select,
.champ textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid #cfd5dd;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 16px; /* 16 px : en dessous, Safari sur iPhone zoome à la saisie */
    color: var(--mako);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.champ textarea {
    min-height: 110px;
    resize: vertical;
}

.champ input:focus-visible,
.champ select:focus-visible,
.champ textarea:focus-visible {
    outline: none;
    border-color: var(--firefly);
    box-shadow: 0 0 0 3px rgba(11, 24, 46, .18);
}

.champ.en-erreur input,
.champ.en-erreur select,
.champ.en-erreur textarea {
    border-color: #b91c1c;
}

.champ-aide {
    margin-top: 6px;
    font-size: 13px;
    color: var(--oslo-gray);
}

.champ-erreur {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
}

.rangee {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 16px;
}

@media (min-width: 560px) {
    .rangee.deux {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mot de passe avec bouton Afficher */

.mdp {
    position: relative;
}

.mdp input {
    padding-right: 96px;
}

.mdp-bascule {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    min-height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: var(--wild-sand);
    color: var(--firefly);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.mdp-bascule:focus-visible {
    outline: 2px solid var(--firefly);
    outline-offset: 2px;
}

/* Choix en cartes (équipe, domaines) */

.choix {
    display: grid;
    gap: 10px;
}

.choix-carte {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid #cfd5dd;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.choix-carte:hover {
    border-color: var(--firefly);
}

.choix-carte:has(input:checked) {
    border-color: var(--firefly);
    background: #f1f4f9;
}

.choix-carte:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(11, 24, 46, .18);
}

.choix-carte input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--firefly);
}

.choix-texte {
    display: flex;
    flex-direction: column;
}

.choix-texte strong {
    color: var(--firefly);
    font-size: 15px;
}

.choix-texte small {
    font-size: 13px;
    color: var(--oslo-gray);
}

fieldset.champ,
fieldset.section {
    border: none;
    min-width: 0;
}

fieldset.champ > legend,
fieldset.section > legend {
    padding: 0;
}

.champ > legend.champ-titre {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--mako);
}

fieldset.section > legend {
    font-size: 17px;
    font-weight: 700;
    color: var(--firefly);
    margin-bottom: 4px;
}

.choix.compact {
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .choix.compact {
        grid-template-columns: 1fr 1fr;
    }
}

.choix.compact .choix-carte {
    align-items: center;
    padding: 12px 14px;
}

.choix.compact .choix-carte input {
    margin-top: 0;
}

/* Équipe imposée par le lien d'inscription */

.equipe-fixe {
    padding: 12px 16px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: #f1f4f9;
    color: var(--firefly);
    font-size: 14px;
}

/* Section qui ne vaut que pour une candidature directe */

.section {
    margin: 26px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
}

.section h2 {
    font-size: 17px;
    color: var(--firefly);
    margin-bottom: 4px;
}

.section > p {
    font-size: 14px;
    color: var(--oslo-gray);
    margin-bottom: 16px;
}

.section[hidden] {
    display: none;
}

/* Fichier */

.champ input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1.5px dashed #cfd5dd;
    border-radius: 10px;
    background: var(--wild-sand);
    font: inherit;
    font-size: 15px;
}

/* Avis de collecte et bouton */

.avis {
    margin: 22px 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--oslo-gray);
}

.avis a {
    color: var(--oslo-gray);
    text-decoration: underline;
}

.bouton-principal {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: var(--firefly);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease;
}

.bouton-principal:hover {
    background: var(--firefly-light);
    color: #fff;
}

.bouton-principal:active {
    transform: translateY(1px);
}

.bouton-principal:focus-visible {
    outline: 3px solid #93a4c4;
    outline-offset: 2px;
}

/* Pendant l'envoi : le bouton se grise pour qu'un second toucher ne crée pas
   un second compte. */
.bouton-principal[disabled] {
    opacity: .7;
    cursor: progress;
}

/* Les deux temps de l'inscription */

.etape-indicateur {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--oslo-gray);
}

.boutons {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.bouton-secondaire {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 1.5px solid #cfd5dd;
    border-radius: 12px;
    background: #fff;
    color: var(--firefly);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.bouton-secondaire:hover {
    border-color: var(--firefly);
}

.bouton-secondaire:focus-visible {
    outline: 3px solid #93a4c4;
    outline-offset: 2px;
}

.bouton-secondaire[disabled] {
    opacity: .7;
    cursor: progress;
}

/* Proposition sur une faute de frappe dans le courriel */

.champ-suggestion {
    margin-top: 6px;
    font-size: 14px;
    color: var(--mako);
}

.champ-suggestion button {
    padding: 0;
    border: none;
    background: none;
    color: var(--firefly);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.champ-aide.aide-ok {
    color: #15803d;
}

.lien-discret {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.ligne-entre {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.ligne-entre label {
    margin-bottom: 6px;
}

/* Champ piège contre les robots : hors écran, jamais rempli par un humain */

.champ-piege {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Écran de fin */

.fin {
    text-align: center;
    padding: 8px 0 4px;
}

.fin-pastille {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--success-bg);
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
}

.fin h2 {
    font-size: 21px;
    color: var(--firefly);
    margin-bottom: 8px;
}

.fin p {
    color: var(--mako);
    margin-bottom: 10px;
}

.fin .bouton-principal {
    margin-top: 18px;
}

@media (max-width: 420px) {
    .acces {
        padding: 16px 12px 32px;
    }

    .acces-entete,
    .acces-corps,
    .acces-pied {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .champ input,
    .champ select,
    .champ textarea,
    .choix-carte,
    .bouton-principal {
        transition: none;
    }
}
