/**
 * assets/access.css
 * ------------------------------------------------------------------
 * Styles propres aux pages d'ACCÈS de l'Espace Client (connexion,
 * inscription, mot de passe oublié, réinitialisation, messages
 * d'erreur/succès).
 *
 * Ce fichier NE redéfinit PAS les couleurs de la marque : il
 * réutilise les variables déjà déclarées dans le CSS partagé du site
 * (--primary, --primary-dark, --dark, --orange, --orange-dark,
 * --light, --slate), chargé juste avant ce fichier. Il ajoute
 * uniquement les composants nécessaires à ces pages : plus de navbar
 * ni de footer ici, l'écran ressemble à une application mobile.
 * ------------------------------------------------------------------
 */

.ec-body {
    background: var(--light, #F3F6F8);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--dark, #2C3E50);
    box-sizing: border-box;
}

.ec-body * {
    box-sizing: border-box;
}

.ec-shell {
    width: 100%;
    max-width: 460px;
}

/* Une seule carte "app" par écran : logo, titre, formulaire. Les
   écrans à deux blocs (connexion + inscription) empilent deux
   .ec-card en colonne sur mobile. */
.ec-card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 12px 34px rgba(44, 62, 80, .08);
    padding: 32px 26px;
    margin-bottom: 16px;
}

.ec-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.ec-logo img {
    max-width: 190px;
    height: auto;
}

.ec-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--dark, #2C3E50);
    text-align: center;
    margin: 0 0 6px;
}

.ec-subtitle {
    font-size: 14px;
    color: var(--slate, #566573);
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.5;
}

.ec-field {
    margin-bottom: 16px;
}

.ec-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--slate, #566573);
    margin-bottom: 6px;
}

.ec-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--light, #F3F6F8);
    border: 1.5px solid #E3E8EC;
    border-radius: 12px;
    transition: border-color .2s;
}

.ec-input-wrap:focus-within {
    border-color: var(--primary, #93B336);
}

.ec-input-wrap .ec-ic {
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate, #566573);
    flex-shrink: 0;
}

.ec-input-wrap input,
.ec-input-wrap select {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 14px 14px 14px 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark, #2C3E50);
    outline: none;
    height: 50px;
}

.ec-input-wrap.ec-no-icon input {
    padding-left: 14px;
}

.ec-toggle-pass {
    background: none;
    border: none;
    color: var(--slate, #566573);
    cursor: pointer;
    padding: 0 14px;
    display: flex;
    align-items: center;
}

.ec-toggle-pass:hover {
    color: var(--primary-dark, #5F8F00);
}

/* Bouton principal : même langage visuel que .btn-espace-client /
   .btn-cta-dark déjà définis dans le CSS du site (pilule, gras,
   couleur pleine), décliné en pleine largeur pour un formulaire. */
.ec-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    border-radius: 999px;
    border: none;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .25s, box-shadow .25s;
}

.ec-btn-primary {
    background: var(--primary, #93B336);
    color: #FFFFFF;
}

.ec-btn-primary:hover,
.ec-btn-primary:focus {
    background: var(--primary-dark, #5F8F00);
}

.ec-btn-dark {
    background: var(--dark, #2C3E50);
    color: #FFFFFF;
}

.ec-btn-dark:hover,
.ec-btn-dark:focus {
    background: #1B2833;
}

.ec-btn-orange {
    background: var(--orange-dark, #B87700);
    color: #FFFFFF;
}

.ec-btn-orange:hover,
.ec-btn-orange:focus {
    background: var(--orange, #E69500);
}

.ec-link {
    color: var(--orange-dark, #B87700);
    font-weight: 600;
    text-decoration: none;
    font-size: 13.5px;
}

.ec-link:hover {
    text-decoration: underline;
}

.ec-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.ec-divider-text {
    text-align: center;
    font-size: 12.5px;
    color: var(--slate, #566573);
    margin: 22px 0 14px;
    position: relative;
}

.ec-divider-text::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ECEFEA;
    z-index: 0;
}

.ec-divider-text span {
    background: #FFFFFF;
    position: relative;
    z-index: 1;
    padding: 0 12px;
}

/* Encart RGPD à l'inscription : case à cocher obligatoire + texte
   court, lien vers le détail complet (conditions-generales-de-vente.php). */
.ec-rgpd {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--light, #F3F6F8);
    border: 1px solid #E3E8EC;
    border-radius: 12px;
    padding: 14px;
    margin: 18px 0;
}

.ec-rgpd input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary, #93B336);
    flex-shrink: 0;
}

.ec-rgpd label {
    font-size: 12.5px;
    color: var(--slate, #566573);
    line-height: 1.55;
}

.ec-rgpd a {
    color: var(--orange-dark, #B87700);
    text-decoration: underline;
}

.ec-hint {
    font-size: 12px;
    color: var(--slate, #566573);
    margin-top: 6px;
    line-height: 1.5;
}

/* Messages d'alerte (erreur / succès), pour remplacer les blocs
   <h3 style="color:red"> en inline dispersés dans l'ancien code. */
.ec-alert {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.ec-alert-error {
    background: #FDEDEC;
    border: 1px solid #F5B7B1;
    color: #922B21;
}

.ec-alert-success {
    background: #EAF3DC;
    border: 1px solid var(--primary, #93B336);
    color: var(--primary-dark, #5F8F00);
}

.ec-alert h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.ec-alert p {
    margin: 6px 0 0;
}

.ec-back-home {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: var(--slate, #566573);
    text-decoration: none;
}

.ec-back-home:hover {
    color: var(--primary-dark, #5F8F00);
}

.ec-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ec-captcha-row strong {
    font-size: 14px;
    color: var(--dark, #2C3E50);
    white-space: nowrap;
}

.ec-captcha-row input {
    width: 90px;
    text-align: center;
    font-weight: 800;
    font-size: 17px;
}

@media (min-width: 700px) {
    /* Sur les écrans "connexion" (deux cartes cote a cote : se
       connecter / créer un compte), on passe en deux colonnes. */
    .ec-shell-wide {
        max-width: 860px;
    }

    .ec-two-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
}
