/* =====================================================
   Module Devis — Styles Front Office
   ===================================================== */

.devis-container {
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- CARDS --- */
.devis-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.devis-card-title {
    font-size: 1.4rem;
    color: #2d4154;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2d4154;
    display: flex;
    align-items: center;
    gap: 10px;
}

.devis-section-title {
    font-size: 1.1rem;
    color: #2d4154;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- FORM --- */
.devis-card .form-group { margin-bottom: 18px; }
.devis-card label { font-weight: 600; color: #333; font-size: 0.9rem; margin-bottom: 5px; }
.devis-card .required { color: #e74c3c; }

.devis-product-preview {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.devis-cart-summary {
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.devis-cart-summary h3 {
    font-size: 1rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.devis-mini-table {
    width: 100%;
    font-size: 0.9rem;
}

.devis-mini-table th {
    background: #e0e0e0;
    padding: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.devis-mini-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
}

.btn-devis-submit {
    padding: 12px 30px;
    font-size: 1.05rem;
    border-radius: 6px;
    font-weight: 600;
}

.btn-devis-submit i { vertical-align: middle; margin-right: 6px; }

.devis-info-card {
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
}

.devis-info-card h3 {
    font-size: 1.05rem;
    color: #2d4154;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.devis-info-card ol { padding-left: 20px; }
.devis-info-card ol li { margin-bottom: 8px; font-size: 0.9rem; line-height: 1.5; }

.devis-contact-info {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 15px;
}

.devis-contact-info h4 { font-size: 0.95rem; margin-bottom: 8px; }
.devis-contact-info p { font-size: 0.85rem; margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.devis-contact-info i { font-size: 16px; color: #2d4154; }

/* --- LIST --- */
.devis-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.devis-list-header h1 {
    font-size: 1.3rem;
    color: #2d4154;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.devis-table { font-size: 0.9rem; }
.devis-table th { background: #f5f7fa; font-weight: 600; color: #555; font-size: 0.85rem; }

/* --- STATUS BADGES --- */
.devis-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.devis-status-0 { background: #fff3cd; color: #856404; }
.devis-status-1 { background: #d1ecf1; color: #0c5460; }
.devis-status-2 { background: #cce5ff; color: #004085; }
.devis-status-3 { background: #d4edda; color: #155724; }
.devis-status-4 { background: #f8d7da; color: #721c24; }
.devis-status-5 { background: #e2e3e5; color: #383d41; }

/* --- DETAIL --- */
.devis-detail-header {
    background: #f5f7fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.devis-detail-header h1 { font-size: 1.4rem; color: #2d4154; margin: 0 0 8px; }
.devis-meta { color: #999; font-size: 0.9rem; margin: 0; }
.devis-info-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.devis-info-box h4 {
    font-size: 1rem;
    color: #2d4154;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.devis-info-box p { margin-bottom: 6px; font-size: 0.9rem; display: flex; align-items: center; gap: 6px; }
.devis-info-box i { font-size: 16px; color: #999; }

.devis-products-table { font-size: 0.9rem; }
.devis-products-table th { background: #f5f7fa; font-size: 0.8rem; text-transform: uppercase; color: #555; }
.devis-totals { margin-top: 15px; }
.devis-totals table { background: #f9fafb; border: 1px solid #e0e0e0; border-radius: 6px; }
.devis-grand-total td { background: #e8f5e9; font-size: 1.1rem; font-weight: bold; }

.devis-admin-message {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.devis-admin-message h4 { color: #1565c0; font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.devis-actions {
    text-align: center;
    margin: 25px 0;
    padding: 25px;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.devis-actions h4 { margin-bottom: 15px; }
.devis-action-form { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.devis-action-form .btn { min-width: 200px; padding: 12px 25px; }

/* --- MESSAGES --- */
.devis-message {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.devis-msg-admin { background: #e3f2fd; border-left: 4px solid #2196F3; }
.devis-msg-customer { background: #fff3e0; border-left: 4px solid #FF9800; }

.devis-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.devis-message-header i { font-size: 14px; vertical-align: middle; }
.devis-message-date { color: #999; font-size: 0.8rem; }

.devis-reply-form {
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.devis-reply-form h4 { font-size: 1rem; margin-bottom: 12px; }

/* --- HOOK BUTTONS --- */
.devis-product-button { margin: 15px 0; }
.devis-product-button .btn {
    border: 2px solid #2d4154;
    color: #2d4154;
    font-weight: 600;
    transition: all 0.2s;
    border-radius: 6px;
}

.devis-product-button .btn:hover {
    background: #2d4154;
    color: #fff;
}

.devis-cart-button { margin: 15px 0; }
.devis-cart-footer .btn {
    border: 2px solid #2d4154;
    color: #2d4154;
    font-weight: 600;
}

.devis-cart-footer .btn:hover {
    background: #2d4154;
    color: #fff;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .devis-card { padding: 20px; }
    .devis-card-title { font-size: 1.1rem; }
    .devis-detail-header .text-right { text-align: left !important; margin-top: 10px; }
    .devis-products-table { font-size: 0.75rem; }
    .devis-action-form { flex-direction: column; }
    .devis-action-form .btn { width: 100%; }
}
