/**
 * Modern Forms CSS - FluxCP-NG
 * Design moderne 2025 pour tous les formulaires
 */

/* ============================================
   CONTENEUR FORMULAIRE
   ============================================ */

.modern-form-container {
    max-width: 600px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.modern-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.modern-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.modern-form-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ============================================
   GROUPES DE CHAMPS
   ============================================ */

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group label .help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #95a5a6;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    cursor: help;
    transition: background 0.3s ease;
}

.form-group label .help-icon:hover {
    background: #7f8c8d;
}

/* ============================================
   INPUTS TEXT, EMAIL, PASSWORD
   ============================================ */

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    background: #ffffff;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:hover:not(:focus) {
    border-color: #bdc3c7;
}

.form-control::placeholder {
    color: #95a5a6;
    font-size: 14px;
}

.form-control.error {
    border-color: #e74c3c;
    background: #fff5f5;
}

.form-control.success {
    border-color: #27ae60;
    background: #f0fff4;
}

/* ============================================
   SELECT
   ============================================ */

.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #f8f9fa url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23333" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>') no-repeat right 16px center;
    background-size: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-select:hover:not(:focus) {
    border-color: #bdc3c7;
}

/* ============================================
   RADIO BUTTONS & CHECKBOXES
   ============================================ */

.form-radio-group,
.form-checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-radio,
.form-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.form-radio input[type="radio"],
.form-checkbox input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.form-radio input[type="radio"] {
    border-radius: 50%;
}

.form-checkbox input[type="checkbox"] {
    border-radius: 4px;
}

.form-radio input[type="radio"]:checked,
.form-checkbox input[type="checkbox"]:checked {
    background: #3498db;
    border-color: #3498db;
}

.form-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-radio:hover input[type="radio"],
.form-checkbox:hover input[type="checkbox"] {
    border-color: #3498db;
}

.form-radio label,
.form-checkbox label {
    margin: 0;
    font-weight: 500;
    color: #555;
    cursor: pointer;
}

/* ============================================
   DATE PICKER
   ============================================ */

.form-date-group {
    display: flex;
    gap: 12px;
}

.form-date-group select,
.date-field select {
    flex: 1;
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #333;
    background: #f8f9fa url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23333" d="M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z"/></svg>') no-repeat right 12px center;
    background-size: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-date-group select:focus,
.date-field select:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.date-field {
    display: flex;
    gap: 12px;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 4px 12px rgba(235, 51, 73, 0.3);
}

.btn-block {
    width: 100%;
    display: block;
}

/* ============================================
   MESSAGES D'AIDE & ERREURS
   ============================================ */

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.4;
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #e74c3c;
    font-weight: 500;
}

.form-success {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #27ae60;
    font-weight: 500;
}

/* ============================================
   ALERT BOXES
   ============================================ */

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #1976d2;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #388e3c;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #f57c00;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #d32f2f;
}

