/* ============================================================
   WC Demande de Cotation — Styles
   ============================================================ */

/* ── Bouton principal ── */
.wcc-cotation-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a6b3a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(26,107,58,.30);
    text-decoration: none !important;
}
.wcc-cotation-btn:hover,
.wcc-cotation-btn:focus-visible {
    background: #145530 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,107,58,.40);
    outline: none;
}
.wcc-cotation-btn:active { transform: translateY(0); }
.wcc-cotation-btn svg { flex-shrink: 0; }

/* ── Overlay / Modal ── */
.wcc-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.wcc-modal[hidden] { display: none; }

.wcc-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.60);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.wcc-modal__container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    margin: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
    overflow: hidden;
    animation: wccSlideIn .3s cubic-bezier(.22,1,.36,1) both;
}

@keyframes wccSlideIn {
    from { opacity: 0; transform: translateY(32px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Bouton fermer ── */
.wcc-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,.07);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    color: #555;
}
.wcc-modal__close:hover { background: rgba(0,0,0,.15); }

/* ── Header modal ── */
.wcc-modal__header {
    background: linear-gradient(135deg, #1a6b3a 0%, #2e8b57 100%);
    color: #fff;
    padding: 32px 32px 24px;
    text-align: center;
}
.wcc-modal__icon { font-size: 36px; line-height: 1; margin-bottom: 10px; }

.wcc-modal__header h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff !important;
}
.wcc-modal__subtitle {
    margin: 0 0 12px;
    font-size: 13.5px;
    color: rgba(255,255,255,.88);
    line-height: 1.5;
}
.wcc-modal__subtitle strong { color: #fff; }

.wcc-modal__product-tag {
    display: inline-block;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
}
.wcc-modal__product-tag:empty { display: none; }

/* ── Formulaire ── */
#wcc-cotation-form {
    padding: 0 0 8px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c5e0ce #f5f5f5;
}
#wcc-cotation-form::-webkit-scrollbar { width: 6px; }
#wcc-cotation-form::-webkit-scrollbar-track { background: #f5f5f5; }
#wcc-cotation-form::-webkit-scrollbar-thumb { background: #b0d0bb; border-radius: 3px; }

/* ── Sections ── */
.wcc-section {
    padding: 20px 28px;
    border-bottom: 1px solid #eef2ee;
}
.wcc-section:last-of-type { border-bottom: none; }

.wcc-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #1a3a28;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wcc-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #1a6b3a;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Grille checkboxes ── */
.wcc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
}

/* ── Liste radios ── */
.wcc-radio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wcc-radio-list--cols {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

/* ── Options (checkbox & radio) ── */
.wcc-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1.5px solid #e0e9e3;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #fafcfb;
    min-height: 40px;
}
.wcc-option:hover { border-color: #2e8b57; background: #f0f8f3; }

.wcc-option input[type="checkbox"],
.wcc-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* custom checkbox box */
.wcc-option__box {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c0d4c7;
    border-radius: 4px;
    background: #fff;
    transition: all .15s;
    position: relative;
}
.wcc-option input[type="checkbox"]:checked ~ .wcc-option__box {
    background: #1a6b3a;
    border-color: #1a6b3a;
}
.wcc-option input[type="checkbox"]:checked ~ .wcc-option__box::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* custom radio dot */
.wcc-option__dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c0d4c7;
    border-radius: 50%;
    background: #fff;
    transition: all .15s;
    position: relative;
}
.wcc-option input[type="radio"]:checked ~ .wcc-option__dot {
    border-color: #1a6b3a;
}
.wcc-option input[type="radio"]:checked ~ .wcc-option__dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #1a6b3a;
    border-radius: 50%;
}

.wcc-option:has(input:checked) {
    border-color: #1a6b3a;
    background: #f0f8f3;
}

.wcc-option__label {
    font-size: 13.5px;
    color: #2d4a38;
    line-height: 1.3;
}

/* ── Sous-section ── */
.wcc-sub-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #d9ead2;
}
.wcc-sub-label {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #5a7a68;
    margin: 0 0 10px;
}

/* ── Section contact ── */
.wcc-section--contact { background: #f8fbf9; }

.wcc-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.wcc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.wcc-field--full { grid-column: 1 / -1; }

.wcc-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #3d5c48;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.wcc-field label span { color: #e74c3c; }

.wcc-field input,
.wcc-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d0e0d5 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #2d4a38;
    background: #fff !important;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    outline: none;
}
.wcc-field input:focus,
.wcc-field textarea:focus {
    border-color: #1a6b3a !important;
    box-shadow: 0 0 0 3px rgba(26,107,58,.12) !important;
}
.wcc-field input.wcc-invalid,
.wcc-field textarea.wcc-invalid {
    border-color: #e74c3c !important;
}

/* ── Erreur ── */
.wcc-error {
    margin: 0 28px;
    padding: 12px 16px;
    background: #fef0f0;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #c0392b;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Footer modal ── */
.wcc-modal__footer {
    padding: 16px 28px 28px;
    background: #f8fbf9;
    border-top: 1px solid #e8f0ea;
}

.wcc-fee-notice {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12.5px;
    color: #5a7a68;
    margin: 0 0 16px;
    line-height: 1.5;
}
.wcc-fee-notice strong { color: #1a6b3a; }
.wcc-fee-notice svg { flex-shrink: 0; margin-top: 1px; }

/* ── Bouton submit ── */
.wcc-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #1a6b3a, #2e8b57) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 16px 24px !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 5px 18px rgba(26,107,58,.35);
    letter-spacing: .2px;
}
.wcc-submit-btn:hover:not(:disabled) {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(26,107,58,.45);
}
.wcc-submit-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}
.wcc-submit-btn__text,
.wcc-submit-btn__loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes wccSpin {
    to { transform: rotate(360deg); }
}
.wcc-spin { animation: wccSpin .8s linear infinite; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .wcc-modal { padding: 0; align-items: flex-end; }
    .wcc-modal__container {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }
    .wcc-modal__header { padding: 24px 20px 18px; }
    .wcc-section { padding: 16px 18px; }
    .wcc-modal__footer { padding: 14px 18px 22px; }
    .wcc-contact-grid { grid-template-columns: 1fr; }
    .wcc-checkbox-grid { grid-template-columns: 1fr 1fr; }
    #wcc-cotation-form { max-height: 75vh; }
}
