/* =============================================================
   WooCommerce Quote Generator — styles frontend
   ============================================================= */

/* ── Conteneur global ── */
#quote-form-wrapper {
    max-width: 680px;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #2d2d2d;
}

#quote-form-wrapper h2 {
    color: #1B3A6B;
    margin-bottom: 24px;
    font-size: 22px;
    border-bottom: 3px solid #2E5FA3;
    padding-bottom: 10px;
}

/* ── Labels & inputs standard ── */
#quote-form label {
    display: block;
    font-weight: bold;
    color: #1B3A6B;
    margin-top: 16px;
    margin-bottom: 5px;
    font-size: 13px;
}

#quote-form input[type="text"],
#quote-form input[type="email"],
#quote-form input[type="tel"],
#quote-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #C8D6EE;
    border-radius: 6px;
    font-size: 14px;
    color: #2d2d2d;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

#quote-form input[type="text"]:focus,
#quote-form input[type="email"]:focus,
#quote-form input[type="tel"]:focus,
#quote-form textarea:focus {
    border-color: #2E5FA3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 95, 163, 0.12);
}

#quote-form textarea {
    min-height: 90px;
    resize: vertical;
}

/* ── Bouton soumettre ── */
.wqg-submit {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background-color: #1B3A6B;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background-color 0.2s;
}

.wqg-submit:hover {
    background-color: #2E5FA3;
}

/* Bouton "Générer un devis" dans le panier */
#generate-quote {
    margin-right: 20px;
}

/* =============================================================
   Section ADMIN — ajout manuel de produits
   ============================================================= */

#wqg-admin-section {
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed #2E5FA3;
    border-radius: 8px;
    background-color: #F0F5FF;
}

.wqg-admin-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.wqg-admin-badge {
    background-color: #1B3A6B;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.wqg-admin-header strong {
    color: #1B3A6B;
    font-size: 14px;
}

.wqg-admin-header small {
    color: #7A94BF;
    font-size: 12px;
}

/* ── Message "aucun produit" ── */
#wqg-no-items {
    color: #7A94BF;
    font-style: italic;
    font-size: 13px;
    margin: 4px 0 12px;
    padding: 10px;
    text-align: center;
    background: #fff;
    border: 1px dashed #C8D6EE;
    border-radius: 6px;
}

/* ── Ligne produit manuelle ── */
.wqg-manual-row {
    background: #fff;
    border: 1px solid #C8D6EE;
    border-radius: 8px;
    padding: 14px 14px 14px 14px;
    margin-bottom: 12px;
    position: relative;
}

/* Grille des champs dans la ligne */
.wqg-row-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    padding-right: 28px; /* espace pour le bouton × */
}

.wqg-field-desc  { flex: 1 1 200px; }
.wqg-field-qty   { flex: 0 0 68px; }
.wqg-field-tva   { flex: 0 0 96px; }
.wqg-field-ht    { flex: 0 0 110px; }
.wqg-field-ttc   { flex: 0 0 140px; }

.wqg-row-fields label {
    display: block;
    font-size: 10px;
    font-weight: bold;
    color: #1B3A6B;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wqg-row-fields input[type="text"],
.wqg-row-fields input[type="number"],
.wqg-row-fields select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #C8D6EE;
    border-radius: 5px;
    font-size: 13px;
    color: #2d2d2d;
    background: #fff;
    box-sizing: border-box;
}

.wqg-row-fields input:focus,
.wqg-row-fields select:focus {
    border-color: #2E5FA3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 95, 163, 0.12);
}

/* Affichage TTC calculé (champ en lecture seule) */
.wqg-ttc-display {
    width: 100%;
    padding: 7px 10px;
    background: #EEF4FF;
    border: 1px solid #C8D6EE;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #1B3A6B;
    box-sizing: border-box;
    text-align: right;
    line-height: 1.4;
    min-height: 33px;
}

/* Bouton supprimer la ligne */
.wqg-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #c0392b;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 1px 4px;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.wqg-remove:hover {
    background-color: #FFECEC;
}

/* Bouton ajouter une ligne */
#wqg-add-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 8px 18px;
    background-color: #2E5FA3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#wqg-add-item:hover {
    background-color: #1B3A6B;
}
