/**
 * Styles généraux du formulaire de commande
 * Plugin: La Fée D'Lys - Bon de Commande
 */

/* ===================================================================== */
/* CONTAINER PRINCIPAL */
/* ===================================================================== */

.lfd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===================================================================== */
/* TITRES */
/* ===================================================================== */

.lfd-container h2 {
    color: #333;
    margin-bottom: 20px;
}

.lfd-container h3 {
    color: #444;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 24px;
}

.lfd-container h4 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
}

.lfd-container h6 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

/* ===================================================================== */
/* FORMULAIRE - INFORMATIONS CLIENT */
/* ===================================================================== */

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

/* ===================================================================== */
/* LABELS */
/* ===================================================================== */

.lfd-container label {
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
    font-size: 14px;
    display: block;
}

/* ===================================================================== */
/* CHAMPS INPUT ET SELECT */
/* ===================================================================== */

.lfd-container input,
.lfd-container select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.lfd-container input:focus,
.lfd-container select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.lfd-container input[type="number"] {
    -moz-appearance: textfield;
}

.lfd-container input[type="number"]::-webkit-inner-spin-button,
.lfd-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===================================================================== */
/* BOUTONS GÉNÉRAUX */
/* ===================================================================== */

.lfd-container button {
    padding: 12px 30px;
    background-color: #CC621C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.lfd-container button:hover {
    background-color: #CC6633;
    transform: translateY(-1px);
}

.lfd-container button:active {
    transform: translateY(0);
}

/* Bouton "Ajouter une ligne" */
#ajouter_ligne {
    background-color: #4CAF50;
    display: block;
    margin: 20px 0;
}

#ajouter_ligne:hover {
    background-color: #45a049;
}

/* ===================================================================== */
/* BOUTON DE VALIDATION */
/* ===================================================================== */

#btn_valider_commande {
    background-color: #2196F3;
    font-size: 18px;
    padding: 15px 40px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s, opacity 0.3s, transform 0.2s;
}

#btn_valider_commande:hover:not(:disabled) {
    background-color: #0b7dda;
    transform: translateY(-2px);
}

#btn_valider_commande:disabled {
    background-color: #95A5A6;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* ===================================================================== */
/* LIGNE DE COMMANDE */
/* ===================================================================== */

.ligne-commande {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.ligne-commande:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* En-tête de la ligne */
.ligne-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Bouton supprimer */
.supprimer_ligne {
    background-color: #e74c3c;
    padding: 5px 15px;
    font-size: 14px;
}

.supprimer_ligne:hover {
    background-color: #c0392b;
}

/* Contenu de la ligne */
.ligne-content {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

/* ===================================================================== */
/* CHAMPS DE LA LIGNE */
/* ===================================================================== */

/* Champ produit avec bouton info */
.form-field-produit {
    flex: 2;
    min-width: 200px;
}

.produit-with-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.produit-with-info select {
    flex: 1;
}

/* Champs options (saveur, option, finition) */
.form-field {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

/* Champ quantité */
.form-field-quantite {
    min-width: 100px;
    display: flex;
    flex-direction: column;
}

/* ===================================================================== */
/* AFFICHAGES DE PRIX */
/* ===================================================================== */

.prix-display,
.total-display {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
}

.prix-display {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
}

.total-display {
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.prix-display .label,
.total-display .label {
    font-size: 12px;
    display: block;
    color: #666;
    margin-bottom: 2px;
}

.prix-display .value {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.total-display .value {
    font-weight: bold;
    font-size: 18px;
    color: #721c24;
}

/* ===================================================================== */
/* LIBELLÉ COMPLET */
/* ===================================================================== */

.libelle-display {
    margin-top: 10px;
    padding: 12px 15px;
    background-color: #e3f2fd;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

.libelle-display .label {
    font-size: 12px;
    color: #1976d2;
    font-weight: bold;
}

.libelle-display .value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    margin-left: 10px;
}

/* ===================================================================== */
/* TOTAL DE LA COMMANDE */
/* ===================================================================== */

.total-container {
    text-align: right;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.total-container h3 {
    margin: 0;
    font-size: 22px;
}

#montant_total_commande {
    color: #4CAF50;
    font-size: 28px;
    font-weight: bold;
}

/* ===================================================================== */
/* SECTION CGV */
/* ===================================================================== */

.cgv-container {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.cgv-container label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}

.cgv-container input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.cgv-container span {
    font-size: 14px;
    line-height: 1.5;
}

.cgv-container a {
    color: #2196F3;
    text-decoration: underline;
    font-weight: bold;
}

.cgv-container a:hover {
    color: #0b7dda;
}

.required {
    color: #d32f2f;
    font-weight: bold;
}

.note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* ===================================================================== */
/* RESPONSIVE */
/* ===================================================================== */

@media screen and (max-width: 768px) {
    .lfd-container {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .ligne-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-field-produit,
    .form-field,
    .form-field-quantite {
        min-width: 100%;
    }
    
    .ligne-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .supprimer_ligne {
        width: 100%;
    }
    
    .total-container {
        text-align: center;
    }
    
    #btn_valider_commande {
        max-width: 100%;
    }
}