/* Pages d'acces client reprises de l'ancien ToutLike : inscription (Téléphone
   ou E-mail), connexion par numero / identifiant / e-mail, mot de passe
   oublie. Couleurs et rayons = jetons de customer.css : le mode sombre et les
   themes clients suivent seuls. */

/* Refonte du 23/11/2026 (demande d'Ousmane : « pas moderne, beaucoup de
   texte ») : une colonne, des etiquettes courtes, les indications dans les
   placeholders, un seul bouton plein. La carte, le bandeau de pictogrammes,
   le titre et le lien vers l'autre fenetre sont dans customer.css
   (.auth-shell, .auth-modal, .auth-product-gallery, .auth-title,
   .auth-switch) : ils servent aussi aux pages de verification.
   Champs de 44 px partout ; texte a 15 px sur ordinateur, 16 px sur
   telephone (pas de zoom force sur iPhone). */
.tl-auth-foot a, .tl-terms a { font-weight: 700; color: var(--brand); }

/* Choix du contact principal : Téléphone / E-mail */
.tl-method {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}
.tl-method button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: color-mix(in srgb, var(--muted) 72%, var(--ink));
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.tl-method button:hover { color: var(--ink-strong); }
.tl-method button svg { color: var(--muted); }
/* Choix actif : pastille claire, pas un second bouton plein. */
.tl-method button.is-active {
    background: var(--panel);
    color: var(--ink-strong);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 2px 8px rgba(15, 23, 42, .08);
}
.tl-method button.is-active svg { color: var(--brand); }
:root[data-theme="dark"] .tl-method button.is-active {
    background: color-mix(in srgb, var(--ink-strong) 12%, var(--panel));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
:root[data-theme="dark"] .tl-method button.is-active svg { color: var(--brand-bright); }
.tl-method button:focus-visible { outline: 0; box-shadow: var(--ring); }

.tl-auth-form .field { margin-bottom: 14px; }
.tl-auth-form .field[hidden] { display: none; }
.tl-auth-form label { margin-bottom: 6px; font-size: 13px; font-weight: 650; }
/* « Mot de passe oublié ? » garde une zone de clic haute sans pousser le champ */
.tl-auth-form .label-row { align-items: center; margin-bottom: 6px; }
.tl-auth-form .label-row label { margin-bottom: 0; }
.tl-auth-form .label-row .mini-link { min-height: 32px; margin: -7px 0; font-size: 12.5px; font-weight: 600; }
.tl-auth-form input:not([type="hidden"]):not([type="checkbox"]),
.tl-auth-form select { min-height: 44px; padding-top: 9px; padding-bottom: 9px; font-size: 15px; }
.tl-auth-form .phone-dial { min-height: 44px; }
.tl-auth-form .input-wrap .input-trail { width: 40px; height: 40px; }
.tl-auth-form .help { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.tl-auth-form .err,
.tl-mini-card .err {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 6px;
    color: var(--bad);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.tl-auth-form .err::before,
.tl-mini-card .err::before {
    content: "!";
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--bad);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* Bouton principal : attente visible pendant l'envoi */
.tl-submit { position: relative; min-height: 46px; margin-top: 6px; font-size: 15px; gap: 8px; }
.tl-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
}
.tl-submit.is-loading .tl-spinner { display: inline-block; animation: tlSpin .72s linear infinite; }
.tl-submit.is-loading { cursor: progress; opacity: .92; }
@keyframes tlSpin { to { transform: rotate(360deg); } }

.tl-terms { margin: 12px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.tl-auth-foot {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* Mot de passe oublie / nouveau mot de passe : carte centree */
.tl-mini-shell { display: grid; place-items: start center; padding: clamp(8px, 3vw, 28px) 0; }
.tl-mini-card { width: 100%; max-width: 400px; margin: 0; text-align: left; }
.tl-mini-card h1 { margin: 8px 0 4px; font-size: clamp(20px, 2.6vw, 22px); line-height: 1.15; }
.tl-mini-card > .muted { margin: 0 0 12px; font-size: 13px; line-height: 1.45; }
.tl-mini-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
}
.tl-mini-card form .field input:not([type="hidden"]) { min-height: 42px; font-size: 14px; }
.tl-mini-card .button.block { min-height: 42px; }
.tl-help-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 12px 0 0;
    padding: 9px 11px;
    border: 1px solid rgba(var(--brand-rgb), .22);
    border-radius: var(--r-md);
    background: var(--brand-soft);
    color: var(--ink);
    font-size: 12.5px;
    line-height: 1.4;
}
.tl-help-box svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }
.tl-help-box a { font-weight: 700; color: var(--brand); }
:root[data-theme="dark"] .tl-help-box a,
:root[data-theme="dark"] .tl-auth-foot a,
:root[data-theme="dark"] .tl-terms a { color: var(--brand-bright); }

/* Separateur « ou » et bouton Google a la hauteur des champs */
.tl-auth-form ~ .divider-or { margin: 14px 0; }
.tl-auth-form ~ .button.google { min-height: 44px; }

/* Telephone : texte a 16 px, iPhone ne zoome pas dans le champ. Le bandeau
   de pictogrammes reste : il ne prend qu'une ligne. */
@media (max-width: 640px) {
    .tl-method button { min-height: 40px; }
    .tl-auth-form input:not([type="hidden"]):not([type="checkbox"]),
    .tl-auth-form select,
    .tl-mini-card form .field input:not([type="hidden"]) { min-height: 44px; font-size: 16px; }
    .tl-auth-form .phone-dial { min-height: 44px; }
    .tl-mini-card .button.block { min-height: 44px; }
    .tl-auth-form .label-row .mini-link { min-height: 44px; margin: -13px 0; }
    .auth-switch a,
    .auth-switch button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .tl-submit.is-loading .tl-spinner { animation: none; }
    .tl-method button { transition: none; }
}
