/* =========================================================
   Onboarding Aagriflow : inscription, vérification du code
   S'appuie sur les variables définies dans login.css
   ========================================================= */

:root {
    --onb-primaire: #0062cc;
    --onb-primaire-fonce: #09519e;
    --onb-texte: #1f2937;
    --onb-gris: #6b7280;
    --onb-bordure: #d9dee5;
    --onb-fond-doux: #f3f5f8;
    --onb-rayon: 10px;
}

/* ---------- Liens ---------- */
.lien-auth {
    color: var(--onb-primaire);
    text-decoration: none;
    font-weight: 600;
}
.lien-auth:hover { color: var(--onb-primaire-fonce); text-decoration: underline; }

.btn-auth:disabled { background-color: #7aa7d9; border-color: #7aa7d9; }

/* ---------- Mise en page de l'inscription ---------- */
.auth-split--onboarding .auth-visual { flex: 0 0 38%; max-width: 38%; }
.auth-split--onboarding .auth-form   { flex: 0 0 62%; max-width: 62%; min-height: 100vh; overflow-y: auto; }

@media (max-width: 767.98px) {
    .auth-split--onboarding .auth-form { flex: 0 0 100%; max-width: 100%; }
}

.onb-logo { height: 34px; width: auto; }
.onb-container { max-width: 580px; padding-bottom: 2rem; }

.onb-surtitre {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--onb-gris);
}
.onb-titre {
    font-family: var(--font-title);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--color-blue-corporate);
}

/* ---------- Indicateur d'étapes ---------- */
.onb-stepper {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    counter-reset: etape;
}
.onb-stepper li {
    flex: 1;
    position: relative;
    text-align: center;
    font-size: .75rem;
    color: var(--onb-gris);
}
.onb-stepper li::before {
    content: attr(data-numero);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 auto .4rem;
    border-radius: 50%;
    border: 1.5px solid var(--onb-bordure);
    background: #fff;
    font-weight: 700;
    font-size: .8rem;
    position: relative;
    z-index: 1;
    transition: all .2s ease;
}
.onb-stepper li + li::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 1.5px;
    background: var(--onb-bordure);
}
.onb-stepper li.active { color: var(--color-blue-corporate); font-weight: 700; }
.onb-stepper li.active::before {
    border-color: var(--color-blue-corporate);
    background: var(--color-blue-corporate);
    color: #fff;
}
.onb-stepper li.fait::before {
    content: '\2713';
    border-color: var(--color-blue-corporate);
    color: var(--color-blue-corporate);
}
.onb-stepper li.fait + li::after,
.onb-stepper li.active::after { background: var(--color-blue-corporate); }

@media (max-width: 575.98px) {
    .onb-stepper li span { display: none; }
    .onb-stepper li.active span { display: block; }
}

/* ---------- Champs ---------- */
.form-label { font-size: .875rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }

.onb-input,
.onb-prefixe {
    border-radius: var(--onb-rayon);
    border-color: var(--onb-bordure);
    padding: .65rem .9rem;
}
.onb-prefixe { background: var(--onb-fond-doux); color: var(--onb-gris); font-weight: 600; }
.onb-input:focus {
    border-color: var(--color-blue-corporate);
    box-shadow: 0 0 0 .2rem rgba(13, 44, 84, .12);
}
.onb-btn-oeil {
    border: 1px solid var(--onb-bordure);
    border-left: 0;
    border-radius: 0 var(--onb-rayon) var(--onb-rayon) 0;
    color: var(--onb-gris);
    background: #fff;
}

.onb-note {
    font-size: .85rem;
    color: #4b5563;
    background: var(--onb-fond-doux);
    border-radius: var(--onb-rayon);
    padding: .75rem 1rem;
}

/* ---------- Cartes de choix du profil ---------- */
.onb-choix {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.25rem;
    border: 1.5px solid var(--onb-bordure);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.onb-choix:hover { border-color: #aab4c3; }
.onb-choix.selectionne {
    border-color: var(--color-blue-corporate);
    box-shadow: 0 0 0 3px rgba(13, 44, 84, .08);
}
.onb-choix-icone {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--onb-fond-doux);
    color: var(--color-blue-corporate);
    font-size: 1.2rem;
    margin-bottom: .35rem;
}
.onb-choix.selectionne .onb-choix-icone { background: var(--color-blue-corporate); color: #fff; }
.onb-choix-titre { font-weight: 700; color: var(--onb-texte); }
.onb-choix-texte { font-size: .85rem; color: var(--onb-gris); line-height: 1.45; }

/* ---------- Puces de sélection (produits) ---------- */
.onb-puce span {
    display: inline-block;
    padding: .45rem 1rem;
    border: 1.5px solid var(--onb-bordure);
    border-radius: 999px;
    background: #fff;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    user-select: none;
}
.onb-puce span i { display: none; }
.onb-puce input:checked + span {
    border-color: var(--color-blue-corporate);
    background: var(--color-blue-corporate);
    color: #fff;
}
.onb-puce input:checked + span i { display: inline; }
.onb-puce input:focus-visible + span { outline: 2px solid var(--onb-primaire); outline-offset: 2px; }

/* ---------- Dépôt de fichiers ---------- */
.onb-depot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 1rem;
    border: 1.5px dashed #b8c1cd;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
    width: 100%;
}
.onb-depot:hover, .onb-depot.survol { border-color: var(--color-blue-corporate); background: #fafbfd; }
.onb-depot.est-invalide { border-color: #dc3545; }
.onb-depot-vide i { font-size: 1.4rem; color: var(--color-blue-corporate); }
.onb-depot-plein { width: 100%; }
.onb-depot-apercu {
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    border-radius: 6px;
    margin-bottom: .4rem;
}
.onb-depot-pdf { font-size: 2.2rem; color: #6b7280; display: block; margin-bottom: .3rem; }

/* ---------- Règles du mot de passe ---------- */
.onb-regles li { color: var(--onb-gris); }
.onb-regles li i { font-size: .7rem; margin-right: .35rem; }
.onb-regles li.ok { color: #2e7d32; }

/* ---------- Récapitulatif ---------- */
.onb-recap-bloc {
    border: 1px solid var(--onb-bordure);
    border-radius: 12px;
    background: #fff;
    margin-bottom: .75rem;
}
.onb-recap-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--onb-bordure);
    font-weight: 700;
    font-size: .875rem;
    color: var(--color-blue-corporate);
}
.onb-recap-entete button { font-size: .8rem; }
.onb-recap dl { margin: 0; padding: .6rem 1rem; }
.onb-recap dl div { display: flex; gap: 1rem; padding: .25rem 0; font-size: .875rem; }
.onb-recap dt { flex: 0 0 42%; color: var(--onb-gris); font-weight: 500; }
.onb-recap dd { margin: 0; color: var(--onb-texte); font-weight: 600; word-break: break-word; }

/* ---------- Navigation ---------- */
.onb-nav { border-top: 1px solid var(--onb-bordure); }

/* ---------- Écrans finaux ---------- */
.onb-final-icone {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue-corporate);
    color: #fff;
    font-size: 1.6rem;
}
.onb-final-icone--neutre { background: var(--onb-fond-doux); color: var(--color-blue-corporate); }

.onb-suite li {
    display: flex;
    gap: .9rem;
    padding: .65rem 0;
    position: relative;
}
.onb-suite li > span {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--onb-bordure);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--onb-gris);
    background: #fff;
}
.onb-suite li.fait > span { background: var(--color-blue-corporate); border-color: var(--color-blue-corporate); color: #fff; }
.onb-suite strong { display: block; font-size: .9rem; color: var(--onb-texte); }
.onb-suite small { color: var(--onb-gris); }

/* ---------- Saisie du code ---------- */
.onb-code-case {
    width: 52px;
    height: 58px;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--onb-rayon);
    border-color: var(--onb-bordure);
    color: var(--onb-texte);
}
.onb-code-case:focus {
    border-color: var(--color-blue-corporate);
    box-shadow: 0 0 0 .2rem rgba(13, 44, 84, .12);
}
.onb-code.est-invalide .onb-code-case { border-color: #dc3545; }

@media (max-width: 380px) {
    .onb-code-case { width: 42px; height: 50px; font-size: 1.25rem; }
}

/* ---------- Alertes de la page de connexion ---------- */
.alert-login-detail { border-radius: 12px; font-size: .9rem; text-align: left; }
