/* ========================================
   BUDGET GROUPE MÉTIER - STYLES
   ======================================== */

/* Container principal */
.budget-gm-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Formulaire */
.budget-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Sections */
.budget-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.budget-section.equilibre {
    background: #e7f5ff;
    border-left-color: #0056b3;
}

/* Titres */
.section-title {
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
    font-size: 24px;
    font-weight: 700;
}

.subsection-title {
    margin: 25px 0 15px 0;
    color: #555;
    font-size: 18px;
    font-weight: 600;
}

/* Rangées de formulaire */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group.total-group {
    flex: 1 1 100%;
    max-width: 400px;
    margin-left: auto;
}

/* Labels */
.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

/* Inputs */
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    min-height: 45px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Champs calculés */
.form-group input.calculated {
    background-color: #f5f5f5;
    font-weight: 600;
    cursor: not-allowed;
}

/* Sous-totaux */
.form-group input.subtotal {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Totaux */
.form-group input.total {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-size: 18px;
    font-weight: 700;
    min-height: 50px;
}

/* Totaux principaux */
.form-group input.total-depenses,
.form-group input.total-financement {
    background-color: #cce5ff;
    border-color: #004085;
    color: #004085;
    font-size: 20px;
    font-weight: 700;
    min-height: 55px;
}

/* Reste à financer */
.form-group input.reste {
    background-color: #fff;
    border: 3px solid #333;
    color: #333;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    min-height: 60px;
}

.form-group input.reste.negative {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.form-group input.reste.positive {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Rangée équilibre */
.equilibre-row {
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 2px solid #0073aa;
}

/* Symbole Euro */
.form-group.currency-group {
    position: relative;
}

.currency::after {
    content: " €";
}

/* Boutons */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ddd;
}

.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0073aa;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Messages */
.form-message {
    display: none;
    padding: 15px 20px;
    margin-top: 20px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .budget-form {
        padding: 20px;
    }
    
    .budget-section {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .budget-gm-wrapper {
        padding: 0 10px;
    }
    
    .budget-form {
        padding: 15px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* ========================================
   IMPRESSION
   ======================================== */

@media print {
    .form-actions,
    .form-message {
        display: none !important;
    }
    
    .budget-section {
        page-break-inside: avoid;
    }
    
    .form-group input {
        border: none;
        border-bottom: 1px solid #000;
    }
}
