/* Styles pour les formulaires d'administration */

/* Conteneur de formulaire */
.form-container {
    background: #111419;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Sections de formulaire */
.card {
    background-color: #111419;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--color-primary-yellow) 0%, #f0c000 100%);
    color: var(--color-primary-dark);
    padding: 1.5rem;
    border-bottom: 2px solid #d4a900;
}

.card-header h2 {
    margin: 0;
    font-weight: 700;
}

.card-body {
    padding: 2rem;
}

/* Groupes de contrôle de formulaire */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.95rem;
}

.form-group label .required {
    color: #dc2626;
    margin-left: 0.25rem;
}

/* Champs de saisie */
.input-field {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius-md);
    background-color: #111419;
    color: #e5e7eb;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary-yellow);
    box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.1);
    background-color: #111419;
}

.input-field:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.input-field.is-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.input-field.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Zone de texte */
textarea.input-field {
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

/* Boutons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: var(--font-family);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-yellow) 0%, #f0c000 100%);
    color: var(--color-primary-dark);
    border: 2px solid #d4a900;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f0c000 0%, #e8b800 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 196, 48, 0.3);
}

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

.btn-secondary {
    background-color: #6b7280;
    color: #ffffff;
    border: 2px solid #4b5563;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
    border: 2px solid #b91c1c;
}

.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #059669;
    color: #ffffff;
    border: 2px solid #047857;
}

.btn-success:hover {
    background-color: #047857;
    transform: translateY(-2px);
}

/* Messages d'alerte */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius-md);
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-success h5 {
    color: #047857;
    margin-bottom: 0.5rem;
}

.alert-danger {
    background-color: #fef2f2;
    color: #7f1d1d;
    border-left-color: #dc2626;
}

.alert-danger h5 {
    color: #b91c1c;
    margin-bottom: 0.5rem;
}

.alert-warning {
    background-color: #fffbeb;
    color: #78350f;
    border-left-color: #f59e0b;
}

.alert ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

/* Sections d'items dynamiques */
.ability-item,
.variant-item {
    background-color: #111419;
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    transition: all var(--transition-normal);
}

.ability-item:hover,
.variant-item:hover {
    background-color: #111419;
    border-color: var(--color-primary-yellow);
    box-shadow: 0 2px 8px rgba(244, 196, 48, 0.15);
}

.ability-item h4,
.variant-item h4 {
    color: var(--color-primary-dark);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.remove-ability,
.remove-variant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background-color: transparent;
    color: #6b7280;
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-sm);
}

.remove-ability:hover,
.remove-variant:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Indicateurs de validation */
.text-red-500 {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.text-gray-500 {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-4xl {
    font-size: 2.25rem;
}

/* Grille responsive */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .flex.gap-4 {
        flex-direction: column;
    }
}

/* Espacements */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* Utilités */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.block { display: block; }
.flex { display: flex; }
.hidden { display: none; }

.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* États de focus et accessibilité */
button:focus,
select:focus,
input:focus,
textarea:focus {
    outline: none;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ability-item,
.alert {
    animation: slideIn 0.3s ease-out;
}
