/* ============================================================
   CL Saddle Order — Styles frontend
   ============================================================ */

/* Bouton "Finaliser le bon de commande" dans le configurateur */
#cl-so-finalize-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.4rem;
    background: #2c2c2c;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .01em;
    transition: background .2s, opacity .15s;
    white-space: nowrap;
}

#cl-so-finalize-btn:hover {
    background: #4a4a4a;
}

#cl-so-finalize-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

#cl-so-finalize-btn.redirecting {
    background: #8b6e4e;
}

#cl-so-finalize-btn svg {
    flex-shrink: 0;
}

/* Masquer le bouton panier natif — géré aussi en JS mais au cas où */
.mkl_pc_footer .configurator-add-to-cart,
.mkl_pc_footer button[name="add-to-cart"],
.mkl_pc_footer .single_add_to_cart_button {
    display: none !important;
}

/* ============================================================
   Page bon de commande
   ============================================================ */
.cl-so-page {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    font-family: inherit;
}

.cl-so-page h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 .25rem;
}

.cl-so-page .cl-subtitle {
    color: #777;
    font-size: .92rem;
    margin-bottom: 2rem;
}

.cl-so-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cl-so-back {
    font-size: .85rem;
    color: #999;
    text-decoration: none;
    margin-top: .5rem;
}

.cl-so-back:hover { color: #444; }

/* Notice */
.cl-so-notice {
    padding: .85rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: .9rem;
    display: none;
}

.cl-so-notice.success {
    background: #e8f5ee;
    border: 1px solid #9fd1b2;
    color: #2a5e3f;
}

.cl-so-notice.error {
    background: #fde8e8;
    border: 1px solid #f5a0a0;
    color: #7d2020;
}

/* Layout 2 colonnes */
.cl-so-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 800px) {
    .cl-so-layout { grid-template-columns: 1fr; }
}

/* Colonne visuel */
.cl-so-visual {
    background: #f8f7f5;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.cl-so-visual img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,.12);
}

.cl-so-visual-placeholder {
    background: #eee;
    border-radius: 8px;
    padding: 4rem 1rem;
    color: #aaa;
    font-size: .88rem;
}

/* Tableau options */
.cl-so-options {
    margin-top: 1.25rem;
}

.cl-so-options h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .6rem;
    color: #333;
}

.cl-so-options table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.cl-so-options table th {
    background: #2c2c2c;
    color: #fff;
    padding: .5rem .9rem;
    text-align: left;
    font-weight: 500;
}

.cl-so-options table td {
    padding: .5rem .9rem;
    border-bottom: 1px solid #eee;
    color: #444;
}

.cl-so-options table tr:nth-child(even) td {
    background: #fafaf8;
}

.cl-so-options table .td-layer {
    color: #888;
    font-size: .82rem;
}

/* Prix */
.cl-so-price-summary {
    background: #f8f7f5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.cl-so-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
    font-size: .9rem;
}

.cl-so-price-row .label {
    color: #666;
}

.cl-so-price-row.total {
    border-top: 1px solid #ddd;
    margin-top: .5rem;
    padding-top: .75rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2c2c2c;
}

/* Boutons d'action en bas du récap */
.cl-so-recap-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cl-so-btn-edit {
    flex: 1;
    padding: .8rem 1rem;
    background: #fff;
    border: 1.5px solid #aaa;
    border-radius: 7px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    color: #444;
    transition: border-color .2s, color .2s;
    text-align: center;
}

.cl-so-btn-edit:hover {
    border-color: #555;
    color: #222;
}

/* Colonne formulaire */
.cl-so-form-card {
    background: #fff;
    border: 1px solid #e5e4e0;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
}

.cl-so-form-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #eee;
    color: #2c2c2c;
}

.cl-so-field {
    margin-bottom: .95rem;
}

.cl-so-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cl-so-field input,
.cl-so-field textarea,
.cl-so-field select {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid #d4d3cf;
    border-radius: 6px;
    font-size: .9rem;
    color: #2c2c2c;
    background: #fafaf8;
    transition: border-color .15s;
    box-sizing: border-box;
}

.cl-so-field input:focus,
.cl-so-field textarea:focus {
    outline: none;
    border-color: #8b6e4e;
    background: #fff;
}

.cl-so-field textarea {
    min-height: 90px;
    resize: vertical;
}

.cl-so-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

@media (max-width: 480px) {
    .cl-so-grid-2 { grid-template-columns: 1fr; }
}

.cl-so-submit-btn {
    width: 100%;
    padding: .95rem;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: .75rem;
    letter-spacing: .02em;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.cl-so-submit-btn:hover { background: #444; }
.cl-so-submit-btn:disabled { background: #bbb; cursor: not-allowed; }

.cl-so-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 1.25rem 0;
}

.cl-so-section-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: .75rem;
}
