/*
 * Formation pages on the Mediweb Formations engine. Hand-written (no build
 * step): the layout classes of the formation and registration pages still
 * come from the previous checkout plugin's stylesheet; only what the new
 * booking block adds is defined here. The account area, at the end, is
 * self-contained.
 */

.mwf-qty {
    display: flex;
    align-items: center;
}

.mwf-qty__btn {
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.mwf-qty__btn:disabled {
    cursor: default;
    opacity: 0.35;
}

.mwf-qty input {
    max-width: 30px;
    border-style: none;
    background-color: transparent;
    text-align: center;
}

.mwf-qty.is-closed input {
    opacity: 0.35;
}

.mwf-book__closed {
    display: inline-block;
    margin-left: 6px;
    padding: 0 10px;
    border-radius: 40px;
    background: #CF2121;
    color: #fff;
    font-size: 13px;
}

.mwf-book__hint {
    color: #7D4E37;
}

.mwf-book__error {
    margin: 0 0 16px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    color: #A32D2D;
    font-weight: 500;
}

/* Registration page (page-templates/pre-inscription.php) */

.mwf-signup {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin: 40px 0 80px;
}

.mwf-signup__lines {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.mwf-signup__lines li {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid #F2EDE7;
}

.mwf-signup__lines li span:last-child {
    white-space: nowrap;
    font-weight: 500;
}

.mwf-signup__total {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    font-size: 22px;
}

.mwf-signup__total strong {
    color: #CA7850;
    font-weight: 500;
}

.mwf-signup__back {
    color: #9E5930;
    text-decoration: underline;
}

.mwf-signup__person {
    margin: 24px 0 0;
    padding: 24px;
    border: 1px solid #F2EDE7;
    border-radius: 24px;
}

.mwf-signup__person legend {
    padding: 0 8px;
    font-weight: 500;
}

.mwf-signup__person legend span {
    margin-left: 8px;
    color: #7D4E37;
    font-weight: 400;
}

.mwf-signup__person .inscription-row + .inscription-row {
    margin-top: 24px;
}

.mwf-signup__me {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: none;
    color: #9E5930;
    text-decoration: underline;
    cursor: pointer;
}

.mwf-signup__message {
    margin-top: 24px;
}

.mwf-signup__message textarea {
    width: 100%;
}

.mwf-signup__consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mwf-signup__consent input {
    margin-top: 4px;
}

.mwf-signup__consent a {
    color: #9E5930;
    text-decoration: underline;
}

.mwf-signup__error {
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #FBE6E6;
    color: #A32D2D;
    font-weight: 500;
}

.mwf-result {
    padding-bottom: 80px;
}

.mwf-result p {
    max-width: 640px;
    margin: 0 auto 12px;
}

/* Merci: "Se connecter à mon espace" above "Retour aux formations". */
.mwf-result__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 40px;
}

/* Account area (page-templates/mon-compte.php, woocommerce/myaccount/*).
 * Self-contained: nothing here relies on the previous plugin's stylesheet.
 * The section templates of the plugin (Mes formations, Ressources
 * pédagogiques…) are styled through their data-mwf hooks. */

.mwf-page {
    position: relative;
    z-index: 10;
    padding: 64px 0 96px;
    border-radius: 25px 25px 0 0;
    background: #fff;
    font-family: Montserrat, sans-serif;
    color: #231F20;
}

.mwf-page__inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 15px;
}

.mwf-page__title {
    margin: 0 0 40px;
    font-family: Montserrat, sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #231F20;
}

.mwf-account {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.woocommerce-account .mwf-account .woocommerce-MyAccount-navigation,
.woocommerce-account .mwf-account .woocommerce-MyAccount-content {
    float: none;
    width: auto;
}

.mwf-account__nav {
    display: flex;
    flex: 0 0 270px;
    flex-direction: column;
    gap: 24px;
}

.mwf-account__nav ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mwf-account__nav li {
    margin: 0;
    padding: 0;
}

.mwf-account__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border-left: 2px solid transparent;
    border-radius: 10px;
    color: #6F5B4E;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s, background-color .2s;
}

.mwf-account__link svg {
    flex: none;
    width: 20px;
    height: 20px;
}

.mwf-account__link:hover,
.mwf-account__link:focus-visible {
    color: #231F20;
}

.mwf-account__link:hover svg,
.mwf-account__link.is-active svg {
    color: #CA7850;
}

.mwf-account__link.is-active {
    border-left-color: #CA7850;
    background: #F6F2EE;
    color: #231F20;
    font-weight: 600;
}

.mwf-account__logout {
    min-height: 40px;
    font-size: 14px;
}

.mwf-account__content {
    flex: 1;
    min-width: 0;
}

.mwf-account__content > [data-mwf],
.mwf-account__section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mwf-account__content h2,
.mwf-account__content h3 {
    margin: 0;
    font-family: Montserrat, sans-serif;
    letter-spacing: normal;
    text-transform: none;
}

.mwf-account__content h2 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
    color: #CA7850;
}

.mwf-account__content h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #231F20;
}

.mwf-account__content p {
    margin: 0;
    color: #6F5B4E;
    line-height: 1.6;
}

/* Tableau de bord */

.mwf-account__next {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px;
    border-radius: 20px;
    background: #F6F2EE;
    color: #231F20;
    text-decoration: none;
    transition: box-shadow .2s;
}

a.mwf-account__next:hover {
    box-shadow: 0 6px 18px rgba(92, 72, 59, .12);
}

.mwf-account__next img {
    flex: none;
    width: 200px;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
}

.mwf-account__next-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.mwf-account__next-text strong {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.mwf-account__badge {
    padding: 6px 14px;
    border-radius: 999px;
    background: #CA7850;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.mwf-account__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mwf-account__stats a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid #EADBD0;
    border-radius: 20px;
    color: #6F5B4E;
    text-decoration: none;
    transition: border-color .2s;
}

.mwf-account__stats a:hover {
    border-color: #CA7850;
}

.mwf-account__stats strong {
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
    color: #CA7850;
}

/* Mes formations (plugin template) */

[data-mwf="account-formations"] > div {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

[data-mwf="account-formations"] > div > a,
[data-mwf="account-formations"] > div > div {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-radius: 20px;
    background: #F6F2EE;
    color: #231F20;
    text-decoration: none;
    transition: box-shadow .2s;
}

[data-mwf="account-formations"] > div > a:hover {
    box-shadow: 0 6px 18px rgba(92, 72, 59, .12);
}

[data-mwf="account-formations"] .opacity-70 {
    opacity: .7;
}

[data-mwf="account-formations"] img {
    flex: none;
    width: 132px;
    height: 110px;
    border-radius: 16px;
    object-fit: cover;
}

[data-mwf="account-formations"] > div > * > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

[data-mwf="account-formations"] > div > * > div > span {
    color: #CA7850;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

[data-mwf="account-formations"] > div > * > div > p:first-of-type {
    color: #231F20;
    font-size: 18px;
    font-weight: 600;
}

[data-mwf="account-formations"] > div > a > span:last-child {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 50%;
    background: #fff;
}

/* Ressources pédagogiques and Mes documents (plugin templates) */

[data-mwf="account-ressources"] section,
[data-mwf="account-documents"] section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 20px;
    background: #F6F2EE;
}

[data-mwf="account-ressources"] ul,
[data-mwf="account-documents"] ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

[data-mwf="account-ressources"] li a,
[data-mwf="account-documents"] li a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #9E5930;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
}

[data-mwf="account-ressources"] li a::before,
[data-mwf="account-documents"] li a::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M5 21h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Forms: Mon profil, login, lost and new password */

.mwf-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.mwf-form__card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 28px;
    border: 0;
    border-radius: 20px;
    background: #F6F2EE;
}

.woocommerce .mwf-form__card.login,
.woocommerce .mwf-form__card.lost_reset_password {
    margin: 0;
    padding: 28px;
    border: 0;
    border-radius: 20px;
}

.mwf-form__card legend {
    float: left;
    width: 100%;
    margin: 0 0 4px;
    padding: 0;
    color: #231F20;
    font-size: 18px;
    font-weight: 600;
}

.mwf-form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.mwf-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.mwf-form label > span {
    color: #231F20;
    font-size: 14px;
    font-weight: 500;
}

.mwf-form input[type="text"],
.mwf-form input[type="email"],
.mwf-form input[type="tel"],
.mwf-form input[type="password"] {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #EADBD0;
    border-radius: 12px;
    background: #fff;
    color: #231F20;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    transition: border-color .2s;
}

.mwf-form input:focus {
    border-color: #CA7850;
}

.mwf-form__hint {
    font-size: 14px;
}

.mwf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border: 0;
    border-radius: 999px;
    background: #CA7850;
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s;
}

.mwf-btn:hover,
.mwf-btn:focus-visible {
    background: #9E5930;
    color: #fff;
}

.mwf-auth {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 520px;
}

.mwf-auth .mwf-btn {
    align-self: flex-start;
}

.mwf-auth__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    font-size: 14px;
}

.mwf-auth__line a,
.mwf-auth__note a {
    color: #9E5930;
    text-decoration: underline;
}

.mwf-auth__note {
    margin: 0;
    color: #6F5B4E;
    font-size: 14px;
    line-height: 1.6;
}

.mwf-form .mwf-check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.mwf-check input {
    width: 18px;
    height: 18px;
    accent-color: #CA7850;
}

.mwf-check span {
    font-weight: 400;
}

/* Connexion / Créer mon compte (woocommerce/myaccount/form-login.php) */

.mwf-auth__panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mwf-auth__panel[hidden] {
    display: none;
}

.mwf-auth:has(.mwf-auth__panel--wide:not([hidden])) {
    max-width: 760px;
}

.mwf-auth__switch {
    padding: 0;
    border: 0;
    background: none;
    color: #9E5930;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.mwf-pass {
    position: relative;
    display: block;
}

.mwf-form .mwf-pass input {
    padding-right: 52px;
}

.mwf-pass__toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: flex;
    padding: 6px;
    border: 0;
    background: none;
    color: #6F5B4E;
    cursor: pointer;
    transform: translateY(-50%);
}

.mwf-pass__toggle:hover,
.mwf-pass__toggle:focus-visible {
    color: #CA7850;
}

.mwf-pass__toggle [hidden] {
    display: none;
}

.mwf-form .mwf-check--top {
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
}

.mwf-check--top input {
    flex: none;
    margin-top: 2px;
}

.mwf-check a {
    color: #9E5930;
    text-decoration: underline;
}

/* WooCommerce notices in the account area */

.mwf-page .woocommerce-message,
.mwf-page .woocommerce-info,
.mwf-page .woocommerce-error {
    margin: 0 0 24px;
    border-top-color: #CA7850;
    border-radius: 12px;
    background: #F6F2EE;
    font-family: Montserrat, sans-serif;
}

.mwf-page .woocommerce-message::before,
.mwf-page .woocommerce-info::before {
    color: #CA7850;
}

@media (max-width: 991px) {
    .mwf-account {
        flex-direction: column;
        gap: 24px;
    }

    .mwf-account__nav {
        flex-basis: auto;
        width: 100%;
    }

    .mwf-account__nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mwf-account__link {
        min-height: 40px;
        padding: 0 12px;
    }
}

@media (max-width: 767px) {
    .mwf-page {
        padding: 32px 0 64px;
    }

    .mwf-page__title {
        margin-bottom: 24px;
        font-size: 26px;
    }

    .mwf-account__next,
    [data-mwf="account-formations"] > div > a,
    [data-mwf="account-formations"] > div > div {
        flex-direction: column;
        align-items: flex-start;
    }

    .mwf-account__next img,
    [data-mwf="account-formations"] img {
        width: 100%;
        height: 160px;
    }

    [data-mwf="account-formations"] > div > a > span:last-child {
        display: none;
    }

    .mwf-account__nav {
        gap: 8px;
    }

    .mwf-account__nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .mwf-account__nav ul .mwf-account__link {
        gap: 8px;
        min-height: 48px;
        padding: 6px 10px;
        border-left: 0;
        background: #FBF8F5;
        font-size: 13px;
    }

    .mwf-account__nav ul .mwf-account__link.is-active {
        background: #F6F2EE;
        box-shadow: inset 0 -2px 0 #CA7850;
    }

    .mwf-account__stats {
        grid-template-columns: 1fr;
    }

    .mwf-form__card {
        padding: 20px;
    }
}

/* Registration questions (Formations — Réglages), in each participant's
 * block. Fields and radios keep the form's own look (.input-box,
 * .radio-button of the previous plugin's stylesheet). */

.mwf-signup__questions {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F2EDE7;
}

.mwf-signup__questions-title {
    margin: 0;
    color: #7D4E37;
    font-weight: 500;
}

.mwf-signup__question {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.mwf-signup__question legend {
    margin-bottom: 10px;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
}

.mwf-signup__question .radio-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mwf-signup__question .radio-button p {
    margin: 0;
}

.mwf-signup__question textarea {
    width: 100%;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #231F20;
    background: transparent;
    font: inherit;
    resize: vertical;
}

.mwf-signup__question textarea:focus {
    border-color: #CA7850;
    outline: none;
}

.mwf-signup__question [data-mwf-other-text] {
    max-width: 420px;
    margin-left: 24px;
}

/* Mes documents: a document icon rather than the download arrow. */
[data-mwf="account-documents"] li a::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E");
}
