/*
 * ==========================================================
 * YM BONS CADEAUX
 * Styles publics
 * ==========================================================
 */

.ybc-public {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}


.ybc-public *,
.ybc-public *::before,
.ybc-public *::after {
    box-sizing: border-box;
}


/*
 * ==========================================================
 * FORMULAIRE
 * ==========================================================
 */

.ybc-gift-card-form {
    width: 100%;
}


.ybc-form-section {
    margin-bottom: 30px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}


.ybc-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}


.ybc-section-heading h2 {
    margin: 0 0 5px;
    padding: 0;
    font-size: 22px;
    line-height: 1.3;
}


.ybc-section-heading p {
    margin: 0;
    opacity: 0.75;
}


.ybc-section-number {
    display: flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2271b1;
    color: #ffffff;
    font-weight: 700;
}


/*
 * ==========================================================
 * PRESTATIONS
 * ==========================================================
 */

.ybc-public-services {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}


.ybc-public-service {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}


.ybc-public-service > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}


.ybc-service-selector {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.ybc-public-service:hover .ybc-service-selector {
    border-color: #b7b7b7;
    transform: translateY(-2px);
}


.ybc-public-service-selected .ybc-service-selector,
.ybc-public-service > input:checked + .ybc-service-selector {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
}


.ybc-public-service-image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}


.ybc-public-service-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.ybc-public-service-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}


.ybc-public-service-title {
    display: block;
    margin-bottom: 10px;
    font-size: 19px;
    font-weight: 700;
}


.ybc-public-service-description {
    display: block;
    flex: 1;
    margin-bottom: 18px;
    line-height: 1.6;
    opacity: 0.75;
}


.ybc-public-service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.ybc-public-service-price {
    font-size: 21px;
}


.ybc-public-service-choice {
    padding: 6px 12px;
    border-radius: 30px;
    background: #f0f0f0;
    font-size: 13px;
    font-weight: 600;
}


.ybc-public-service-selected
.ybc-public-service-choice,
.ybc-public-service
> input:checked
+ .ybc-service-selector
.ybc-public-service-choice {
    background: #2271b1;
    color: #ffffff;
}


/*
 * ==========================================================
 * CHAMPS
 * ==========================================================
 */

.ybc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


.ybc-field {
    width: 100%;
}


.ybc-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}


.ybc-field label > span {
    color: #d63638;
}


.ybc-field label small {
    font-weight: 400;
    opacity: 0.7;
}


.ybc-field input[type="text"],
.ybc-field input[type="email"],
.ybc-field input[type="tel"],
.ybc-field textarea {
    display: block;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #c7c7c7;
    border-radius: 7px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    box-shadow: none;
}


.ybc-field textarea {
    min-height: 130px;
    resize: vertical;
}


.ybc-field input:focus,
.ybc-field textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.12);
}


.ybc-field > small {
    display: block;
    margin-top: 7px;
    opacity: 0.7;
}


.ybc-character-counter {
    text-align: right;
}


/*
 * ==========================================================
 * MODE DE REMISE
 * ==========================================================
 */

.ybc-delivery-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}


.ybc-delivery-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}


.ybc-delivery-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}


.ybc-delivery-box {
    display: block;
    height: 100%;
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    transition: border-color 0.2s ease;
}


.ybc-delivery-box strong {
    display: block;
    margin-bottom: 6px;
}


.ybc-delivery-box small {
    display: block;
    line-height: 1.5;
    opacity: 0.75;
}


.ybc-delivery-option
> input:checked
+ .ybc-delivery-box {
    border-color: #2271b1;
}


.ybc-beneficiary-email {
    margin-top: 20px;
}


.ybc-beneficiary-email[hidden] {
    display: none !important;
}


/*
 * ==========================================================
 * BOUTON
 * ==========================================================
 */

.ybc-form-final {
    text-align: center;
}


.ybc-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 28px;
    border: 0;
    border-radius: 7px;
    background: #2271b1;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}


.ybc-submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


.ybc-payment-information {
    margin: 10px 0 0;
    font-size: 13px;
    opacity: 0.7;
}


/*
 * ==========================================================
 * MESSAGES
 * ==========================================================
 */

.ybc-public-message {
    padding: 18px 20px;
    border-radius: 8px;
}


.ybc-public-message strong {
    display: block;
    margin-bottom: 5px;
}


.ybc-public-message p {
    margin: 0;
}


.ybc-public-message-info {
    margin-bottom: 20px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
}


/*
 * ==========================================================
 * RESPONSIVE
 * ==========================================================
 */

@media screen and (max-width: 900px) {

    .ybc-public-services {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

}


@media screen and (max-width: 700px) {

    .ybc-form-section {
        padding: 20px;
    }


    .ybc-public-services,
    .ybc-form-grid,
    .ybc-delivery-options {
        grid-template-columns: 1fr;
    }


    .ybc-public-service-image {
        height: 180px;
    }


    .ybc-section-heading {
        gap: 10px;
    }


    .ybc-section-heading h2 {
        font-size: 19px;
    }


    .ybc-section-number {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

}

.ybc-public-message-success {
    margin-bottom: 20px;
    background: #edf8ef;
    border: 1px solid #b7dfbf;
}


.ybc-public-message-warning {
    margin-bottom: 20px;
    background: #fff8e5;
    border: 1px solid #e8d38a;
}


.ybc-public-message-error {
    margin-bottom: 20px;
    background: #fcf0f1;
    border: 1px solid #e7b7bc;
}
/* ==========================================================
 * PANIER MULTI-BONS
 * ========================================================== */
.ybc-add-service {
    border: 0;
    border-radius: 30px;
    padding: 8px 14px;
    background: #2271b1;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ybc-cart { margin-top: 28px; padding: 22px; border: 1px solid #e5e5e5; border-radius: 10px; background: #fafafa; }
.ybc-cart h3 { margin: 0 0 15px; }
.ybc-cart-empty { opacity: .7; }
.ybc-cart-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #e5e5e5; }
.ybc-cart-item:first-child { border-top: 0; }
.ybc-cart-item small { display: block; margin-top: 3px; opacity: .65; }
.ybc-cart-item-price { font-weight: 700; white-space: nowrap; }
.ybc-cart-remove { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eee; font-size: 20px; cursor: pointer; }
.ybc-cart-footer { margin-top: 12px; padding-top: 15px; border-top: 1px solid #ddd; text-align: right; font-size: 20px; }
.ybc-multi-toggle { display: flex; gap: 12px; padding: 16px; margin-bottom: 22px; border: 1px solid #d8e4ee; border-radius: 10px; background: #f5f9fc; cursor: pointer; }
.ybc-multi-toggle small { display: block; margin-top: 4px; opacity: .7; }
.ybc-beneficiary-card { padding: 20px; margin-top: 16px; border: 1px solid #e5e5e5; border-radius: 10px; background: #fafafa; }
.ybc-beneficiary-card h4 { margin: 0 0 18px; font-size: 17px; }
.ybc-help-text { opacity: .75; }
[hidden] { display: none !important; }
@media screen and (max-width:700px) { .ybc-cart-item { grid-template-columns: 1fr auto; } .ybc-cart-remove { grid-column: 2; } }


/* ==========================================================
 * PARTICIPANTS AU CADEAU
 * ========================================================== */
.ybc-contributors-section {
    margin-top: 24px;
}

.ybc-contributors-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d8e4ee;
    border-radius: 10px;
    background: #f8fbfd;
    cursor: pointer;
}

.ybc-contributors-toggle input {
    margin-top: 3px;
}

.ybc-contributors-toggle strong,
.ybc-contributors-toggle small {
    display: block;
}

.ybc-contributors-toggle small {
    margin-top: 4px;
    opacity: .72;
    line-height: 1.45;
}

.ybc-contributors-fields {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
}

.ybc-contributors-fields[hidden] {
    display: none !important;
}
