/**
 * Styles de formulaires partagés - OTO Events
 */

/* Conteneur de champ */
.form-group {
    margin-bottom: 1rem;
}

/* Labels */
.form-label,
.form-label-styled {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

/* Inputs, selects, textareas */
.form-input,
.form-input-styled,
.form-select,
.form-textarea {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.form-input:focus,
.form-input-styled:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder,
.form-input-styled::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

/* Textarea spécifique */
.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Select spécifique */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
}

/* Checkbox et radio */
.form-checkbox,
.form-radio {
    width: 18px;
    height: 18px;
    color: #3b82f6;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
}

.form-radio {
    border-radius: 50%;
}

.form-checkbox:checked,
.form-radio:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-checkbox:focus,
.form-radio:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Texte d'aide */
.form-help,
.form-help-styled {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* Erreurs */
.form-error {
    font-size: 13px;
    color: #dc2626;
    margin-top: 4px;
}

.form-input-error {
    border-color: #dc2626;
}

.form-input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary,
.btn-install {
    color: #fff;
    background-color: #3b82f6;
}

.btn-primary:hover,
.btn-install:hover {
    background-color: #2563eb;
}

.btn-secondary {
    color: #374151;
    background-color: #e5e7eb;
}

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

.btn-success {
    color: #fff;
    background-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    color: #fff;
    background-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Cards */
.card,
.card-styled {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 32px;
}

.card-sm {
    padding: 24px;
}

/* Alertes */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-error,
.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Section titles */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

/* Input group (label + input + help text) */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group:last-child {
    margin-bottom: 0;
}
