/* ===== Page "Créer mon espace client" — ac-register-page ===== */

.ac-register-wrap {
    max-width: 960px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.ac-reg-title {
    font-family: 'Syne', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #524235;
    margin: 0 0 32px;
}

/* ---- Cartes ---- */
.ac-reg-card {
    background: #fff;
    border: 1px solid #E5E5E2;
    border-radius: 0;
    padding: 30px;
    margin-bottom: 24px;
}

.ac-reg-card__title {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #524235;
    margin: 0 0 22px;
}

.ac-reg-note {
    font-size: 14px;
    color: #95877A;
    margin: 14px 0 0;
}

/* ---- Segmented toggles (Particulier/Pro, Madame/Monsieur) ---- */
.ac-seg {
    display: flex;
    border: 1px solid #E5E5E2;
    margin-bottom: 24px;
    max-width: 420px;
}

.ac-seg__opt {
    flex: 1;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.ac-seg__opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ac-seg__opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    font-size: 17px;
    font-weight: 500;
    color: #524235;
    transition: all .15s ease;
}

.ac-seg__opt + .ac-seg__opt span { border-left: 1px solid #E5E5E2; }

.ac-seg__opt.is-active span {
    box-shadow: inset 0 0 0 2px #8FBD46;
    color: #524235;
    font-weight: 600;
}

/* ---- Email pré-rempli validé ---- */
.ac-input-valid { position: relative; }

.ac-input-valid input {
    border-color: #8FBD46 !important;
    padding-right: 44px;
}

.ac-input-check {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* ---- Règles mot de passe ---- */
.ac-pw-rules {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.ac-pw-rules li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    color: #95877A;
    line-height: 1.9;
}

.ac-pw-rules li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 1px solid #E5E5E2;
    border-radius: 50%;
    background: #fff;
}

.ac-pw-rules li.is-ok { color: #524235; }

.ac-pw-rules li.is-ok::before {
    border-color: #8FBD46;
    background: #8FBD46 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2l2.2 2.3 4.8-4.9' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center center no-repeat;
}

/* ---- Grille 2 colonnes ---- */
.ac-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

@media (max-width: 640px) {
    .ac-grid-2 { grid-template-columns: 1fr; }
}

/* ---- Recherche entreprise ---- */
.ac-company-search {
    display: block;
}

.ac-company-search .ac-form-group {
    margin-top: 30px;
}

.ac-company-or {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    font-family: 'niveau-grotesk';
    font-size: 17px;
    color: #524235;
}

.ac-company-or::before,
.ac-company-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E5E2;
}

.ac-company-search-btn {
    width: 100%;
    margin-top: 30px;
    border-radius: 0;
}

/* ---- Mon entreprise : champs verrouillés remplis par la recherche ---- */
#billing_company[readonly],
#ac_siret[readonly],
#ac_tva[readonly],
#ac_forme_juridique[readonly] {
    background: #F5F5F4 !important;
}

.ac-company-results { margin-top: 12px; }

.ac-company-results button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 1px solid #E5E5E2;
    border-top: none;
    background: #fff;
    font-size: 15px;
    color: #524235;
    cursor: pointer;
}

.ac-company-results button:first-child { border-top: 1px solid #E5E5E2; }
.ac-company-results button:hover { background: #F7F7F4; }
.ac-company-results button small { display: block; color: #95877A; }

/* ---- Checkboxes légales ---- */
.ac-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #524235;
    cursor: pointer;
    margin: 18px 0 0;
}

.ac-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #8FBD46;
    margin-top: 1px;
}

.ac-check--legal a { color: #524235; text-decoration: underline; }
.ac-check--legal a:hover { color: #8FBD46; }

.ac-reg-legal { margin: 8px 0 0; }

/* ---- Bouton submit ---- */
.ac-reg-submit {
    width: 100%;
    height: 62px;
    margin-top: 28px;
    font-size: 18px !important;
    border-radius: 0;
}

/* ---- Bloc info données personnelles ---- */
.ac-reg-info {
    background: #F5F3EF;
    padding: 28px 30px;
    margin-top: 32px;
}

.ac-reg-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #524235;
    margin: 0 0 12px;
}

.ac-reg-info p {
    font-size: 15px;
    line-height: 1.65;
    color: #524235;
    margin: 0 0 10px;
}

.ac-reg-info p:last-child { margin-bottom: 0; }

/* ---- Champs de livraison (dépliés) ---- */
.ac-ship-fields {
    border-top: 1px solid #E5E5E2;
    margin-top: 20px;
    padding-top: 24px;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ac-reg-card { padding: 20px; }
    .ac-reg-title { font-size: 24px; }
}

ul.woocommerce-error {
    margin: 0;
}

/* ---- Notices WooCommerce : toast flottant hors flux (ne pousse pas le layout) ---- */
body.ac-register-page .woocommerce-error,
body.ac-register-page .woocommerce-message,
body.ac-register-page .woocommerce-info {
    position: fixed !important;
    top: 20px;
    right: 20px;
    left: auto;
    z-index: 999999;
    width: 360px;
    max-width: calc(100vw - 40px);
    margin: 0 !important;
    padding: 18px 46px 18px 20px !important;
    background: #fff !important;
    border: none !important;
    border-left: 4px solid #6B9113 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.12) !important;
    list-style: none !important;
    font-family: 'niveau-grotesk';
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    animation: acoxNotifIn .4s ease both;
}

body.ac-register-page .woocommerce-error {
    border-left-color: #d63031 !important;
}

body.ac-register-page .woocommerce-error::before,
body.ac-register-page .woocommerce-message::before,
body.ac-register-page .woocommerce-info::before {
    display: none !important;
}

body.ac-register-page .woocommerce-error li,
body.ac-register-page .woocommerce-message li,
body.ac-register-page .woocommerce-info li {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.ac-register-page .woocommerce-error li + li { margin-top: 6px !important; }

body.ac-register-page .woocommerce-error a,
body.ac-register-page .woocommerce-message a,
body.ac-register-page .woocommerce-info a {
    color: #524235;
    text-decoration: underline;
}

.ac-notice-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    color: #95877A;
    cursor: pointer;
}

.ac-notice-close:hover { color: #524235; }

/* ---- Champs : meme style commun que identification / contact ---- */
.ac-register-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="hidden"]),
.ac-register-form textarea {
    border: 1px solid #95877A !important;
    background: transparent !important;
    border-radius: 0 !important;
    height: 50px !important;
    box-shadow: none !important;
    font-size: 17px !important;
    font-family: "niveau-grotesk" !important;
    color: #524235 !important;
    padding: 10px 47px 10px 17px !important;
    width: 100%;
}
.ac-register-form select {
    border: 1px solid #95877A !important;
    background: transparent !important;
    border-radius: 0 !important;
    height: 50px !important;
    box-shadow: none !important;
    font-size: 17px !important;
    font-family: "niveau-grotesk" !important;
    color: #524235 !important;
    padding: 10px 17px !important;
    width: 100%;
}
.ac-register-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="file"]):not([type="hidden"]):focus,
.ac-register-form select:focus,
.ac-register-form textarea:focus {
    background: transparent !important;
    border-color: #95877A !important;
    outline: none !important;
    box-shadow: 0 0 0 3px #E5E5E2 !important;
}

/* ---- Labels : identiques a la page identification ---- */
.ac-register-form .ac-form-group label {
    color: #524235 !important;
    font-size: 17px !important;
    font-family: "niveau-grotesk" !important;
    font-weight: 400 !important;
    margin-bottom: 3px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* ---- Recherche entreprise : alignee sur la hauteur commune ---- */
.ac-company-search input {
    height: 50px !important;
    border: 1px solid #95877A !important;
    border-right: none !important;
    padding: 10px 17px !important;
    font-size: 17px !important;
    font-family: "niveau-grotesk" !important;
    color: #524235 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.ac-company-search-btn {
    height: 50px !important;
}

h1.ac-reg-title {
    font-size: 50px;
    text-align: center;
    margin: 50px 0;
}
h2.ac-reg-card__title {
    font-size: 25px;
    color: #524235;
}
.ac-reg-card {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

.ac-seg {
    border: none;
    margin-bottom: 24px;
    max-width: 100%;
    gap: 15px;
}

ul.ac-pw-rules {
    background: #F5F5F4;
    padding: 25px;
}

.ac-pw-rules li {
    color: #524235;
    font-size: 17px;
}

.ac-seg__opt + .ac-seg__opt span, .ac-seg__opt span {
    border: 1px solid #E5E5E2;
}
.ac-seg__opt.is-active span {
    font-size: 17px;
    font-weight: 500;
}

.ac-reg-card {
    padding: 40px 50px;
}

.ac-seg__opt span {
    height: 70px;
}
.ac-reg-card__title {
    margin: 0 0 35px;
}
.ac-reg-card .ac-form-group {
    margin-top: 30px;
}

.ac-grid-2 {
    gap: 0 15px;
}
.ac-seg.ac-seg--civility {
    margin-bottom: 0;
}
.ac-reg-legal, button.ac-btn-primary.ac-reg-submit, .ac-reg-info {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

/* ---- Bloc regles mot de passe : titre + etats ok/ko comme la maquette ---- */
.ac-pw-rules li.ac-pw-rules-title {
    padding-left: 0;
    font-weight: 700;
    color: #524235;
    margin-bottom: 4px;
}
.ac-pw-rules li.ac-pw-rules-title::before {
    display: none;
}
.ac-pw-rules li::before {
    border: none;
    background: #E2574C url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%278%27 height=%278%27 viewBox=%270 0 8 8%27%3E%3Cpath d=%27M1.6 1.6l4.8 4.8M6.4 1.6l-4.8 4.8%27 stroke=%27%23fff%27 stroke-width=%271.4%27 stroke-linecap=%27round%27/%3E%3C/svg%3E") center center no-repeat;
}
.ac-pw-rules li.is-ok::before {
    border: none;
    background: #8FBD46 url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2710%27 height=%2710%27 viewBox=%270 0 10 10%27%3E%3Cpath d=%27M1.5 5.2l2.2 2.3 4.8-4.9%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%271.6%27 stroke-linecap=%27round%27/%3E%3C/svg%3E") center center no-repeat;
}

/* ---- Note coordonnees : icone info inline ---- */
.ac-reg-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.ac-reg-note svg {
    flex-shrink: 0;
}

label.ac-check.ac-check--legal span {
    font-size: 17px;
    font-family: 'niveau-grotesk';
    line-height: 1.2;
}
button.ac-btn-primary.ac-reg-submit {
    font-family: 'Syne' !important;
    font-size: 18px;
    font-weight: bold;
}
.ac-reg-info {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    background: #F5F5F4;
    padding: 32px;
}
.ac-reg-info h3 {
    font-size: 17px;
    font-family: 'niveau-grotesk';
}
.ac-reg-info p {
    font-size: 17px;
    color: #524235;
    margin: 0 0 20px;
    font-family: 'niveau-grotesk';
    line-height: 1.5;
}
button.ac-btn-primary.ac-reg-submit {
    margin: 30px auto 40px auto;
}

.ac-reg-info h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

p.ac-reg-note {
    font-size: 17px;
    color: #524235;
    font-family: 'Syne';
}

.ac-reg-info h3 {
    font-family: 'niveau-grotesk' !important;
}
body.ac-register-page #content .col-full {
    position: relative;
    z-index: 1;
}
