/* Pages de compte : connexion, inscription, mot de passe oublié, réinitialisation.
   Maquettes WebConnexion, WebInscription et WebMotDePasse de la planche Casbah Pop. */

.cpt {
    max-width: 1240px;
    margin: 0 auto;
    padding: calc(var(--cp-nav-h) + 48px) 24px 72px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: stretch;
}
.cpt--etroit { max-width: 620px; }

/* Panneau coloré de gauche */
.cpt-panneau {
    flex: 1 1 400px;
    min-width: 0;
    position: relative;
    background: var(--cp-vert);
    color: var(--cp-blanc);
    border: 3px solid var(--cp-encre);
    border-radius: 32px;
    box-shadow: 0 8px 0 var(--cp-encre);
    padding: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.cpt-panneau--bleu { background: var(--cp-bleu); }
.cpt-panneau-motif { position: absolute; inset: 0; width: 100%; height: 100%; }
.cpt-panneau > *:not(.cpt-panneau-motif) { position: relative; }
.cpt-etiquette {
    align-self: flex-start;
    background: var(--cp-sable);
    color: var(--cp-encre);
    border: 2px solid var(--cp-encre);
    border-radius: 999px;
    padding: 5px 14px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.cpt-accroche {
    margin: 0;
    font-family: var(--cp-titre);
    font-weight: 800;
    font-size: clamp(40px, 4.4vw, 60px);
    line-height: .95;
}
.cpt-accroche span { color: var(--cp-sable); }
.cpt-sous { margin: 0; font-size: 18px; font-weight: 700; color: var(--cp-bleu-clair); }
.cpt-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cpt-chips span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cp-blanc);
    color: var(--cp-encre);
    border: 2px solid var(--cp-encre);
    border-radius: 14px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 15px;
}
.cpt-chips i { color: var(--cp-vert); }
.cpt-atouts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 17px; font-weight: 700; }
.cpt-atouts li { display: flex; gap: 10px; align-items: center; }
.cpt-atouts svg { flex-shrink: 0; }
.cpt-bulle {
    align-self: flex-start;
    background: var(--cp-blanc);
    color: var(--cp-encre);
    border: var(--cp-trait);
    border-radius: 22px 22px 22px 6px;
    box-shadow: var(--cp-ombre);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cpt-bulle [lang="ar"] { font-weight: 700; font-size: 22px; line-height: 1.2; align-self: flex-start; }
.cpt-bulle strong { font-family: var(--cp-titre); font-size: 22px; line-height: 1.05; }
.cpt-bulle > span:last-child { font-size: 14px; color: var(--cp-gris); font-weight: 600; }
.cpt-fino { align-self: flex-end; width: 170px; height: 240px; object-fit: contain; margin: auto -10px -50px 0; }

/* Carte du formulaire */
.cpt-carte {
    flex: 1 1 440px;
    min-width: 0;
    background: var(--cp-blanc);
    border: 3px solid var(--cp-encre);
    border-radius: 32px;
    box-shadow: 0 8px 0 var(--cp-encre);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.cpt-carte h1 { margin: 0; font-size: 40px; line-height: 1; }
.cpt-carte .cpt-intro { margin: 6px 0 0; font-size: 17px; color: var(--cp-gris); line-height: 1.5; }
.cpt-gratuit {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--cp-vert-clair);
    color: var(--cp-vert-fonce);
    border: 2px solid var(--cp-vert);
    border-radius: 999px;
    padding: 4px 12px;
    font-weight: 800;
    font-size: 14px;
}
.cpt-icone { width: 72px; height: 72px; position: relative; display: flex; align-items: center; justify-content: center; }
.cpt-icone svg:first-child { position: absolute; inset: 0; }
.cpt-icone svg:last-child { position: relative; }

/* Boutons Google et Apple côte à côte */
.cpt-sociaux { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cpt-sociaux > form { display: none; }
.cpt-sociaux > .cpt-google, .cpt-sociaux > .btn-apple-auth { flex: 1 1 200px; }
.cpt-google { display: flex; justify-content: center; min-height: 44px; }
.cpt-sociaux .btn-apple-auth {
    height: 52px;
    margin: 0 !important;
    max-width: none !important;
    border: var(--cp-trait);
    border-radius: 16px;
    box-shadow: 0 4px 0 #000;
    background: var(--cp-encre);
    font-family: var(--cp-titre);
    font-weight: 800;
    font-size: 17px;
}
.cpt-sociaux .btn-apple-auth:hover { background: #22372A; }
.cpt-sociaux .auth-flash-danger { flex: 1 1 100%; }

.cpt-ou { display: flex; align-items: center; gap: 12px; color: var(--cp-gris); font-weight: 800; font-size: 14px; }
.cpt-ou::before, .cpt-ou::after { content: ''; flex: 1; height: 2px; background: var(--cp-chaux-trait); }

/* Champs */
.cpt-form { display: flex; flex-direction: column; gap: 14px; }
.cpt-champ { display: flex; flex-direction: column; gap: 6px; }
.cpt-champ label { font-weight: 800; font-size: 15px; }
.cpt-champ input, .cpt-champ select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: var(--cp-chaux);
    border: 2px solid var(--cp-encre);
    border-radius: 14px;
    font-family: var(--cp-texte);
    font-size: 16px;
    font-weight: 600;
    color: var(--cp-encre);
}
.cpt-champ select { padding: 0 12px; font-weight: 700; }
.cpt-champ input:focus, .cpt-champ select:focus { outline: 3px solid var(--cp-bleu-clair); outline-offset: 0; border-color: var(--cp-bleu); background: var(--cp-blanc); }
.cpt-champ input.is-invalid { border-color: var(--cp-rouge); }
.cpt-aide { font-size: 13px; color: var(--cp-gris); }
.cpt-erreur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: #B02A20; }
.cpt-mdp { position: relative; }
.cpt-mdp input { padding-right: 52px; }
.cpt-oeil {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--cp-gris);
}
.cpt-oeil:hover { background: var(--cp-chaux-trait); color: var(--cp-encre); }
.cpt-duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.cpt-case { display: flex; align-items: flex-start; gap: 10px; font-weight: 700; font-size: 15px; line-height: 1.4; }
.cpt-case input { width: 20px; height: 20px; accent-color: var(--cp-vert); flex-shrink: 0; margin-top: 1px; }
.cpt-case a { font-weight: 800; }
.cpt-ligne { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.cpt-ligne a { font-weight: 800; font-size: 15px; }
.cpt-valider { width: 100%; min-height: 58px; font-size: 20px; border-radius: 18px; }
.cpt-bas { margin: 6px 0 0; text-align: center; font-size: 16px; color: var(--cp-gris); }
.cpt-bas a { font-weight: 800; }
.cpt-retour { align-self: center; font-weight: 800; font-size: 16px; text-decoration: none; }

/* Messages */
.auth-flash-danger, .auth-flash-info, .cpt-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 2px solid var(--cp-encre);
    border-radius: 16px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
}
.auth-flash-danger, .cpt-message--erreur { background: #FBE3E0; color: #8E2219; border-color: var(--cp-rouge); }
.auth-flash-info, .cpt-message--ok { background: var(--cp-vert-clair); color: var(--cp-vert-fonce); border-color: var(--cp-vert); }

@media (max-width: 640px) {
    .cpt { padding: calc(var(--cp-nav-h) + 20px) 16px 48px; gap: 24px; }
    .cpt-panneau, .cpt-carte { padding: 24px 20px; border-radius: 26px; }
    .cpt-carte h1 { font-size: 32px; }
    .cpt-fino { width: 130px; height: 180px; margin-bottom: -40px; }
    /* Sur téléphone, le formulaire d'abord : on vient pour se connecter. */
    .cpt-panneau { order: 2; }
}
