/* Styles pour les formulaires - harmonisés avec le dashboard */

/* Labels */
.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Champs de saisie */
.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #fbb023; /* Jaune moutarde vif */
    box-shadow: 0 0 0 3px rgba(251, 176, 35, 0.1);
}

/* Messages d'aide et d'erreur */
.help-text {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Boutons de formulaire - harmonisés avec la palette #2381 */
.btn-primary {
    background: #fbb023; /* Jaune moutarde vif */
    border: none;
    color: #0a0400; /* Noir profond */
    padding: 0.75rem 2rem;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e09e1f; /* Moutarde plus foncée au hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-secondary {
    background: #fb6465; /* Rouge doux */
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #e55a5b; /* Rouge plus foncé */
}

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

/* Grilles de formulaire */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Sections d'information */
.info-section {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-section h4 {
    color: #0369a1;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-section p {
    color: #0c4a6e;
    margin: 0;
    font-size: 0.9rem;
}

/* Sections d'avertissement */
.warning-section {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-section h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.warning-section p {
    color: #78350f;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Badge pour les données en cache */
.cached-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Conseils d'expert */
.expert-advice {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.375rem; /* Même border-radius que le dashboard */
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.expert-advice-good {
    background-color: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.expert-advice-improve {
    background-color: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.advice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.advice-content {
    flex: 1;
}

.advice-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.advice-text {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.advice-suggestion {
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.8;
}

/* Styles pour les champs avec statut */
.form-group input[name="title"],
.form-group input[name="short_description"],
.form-group textarea[name="long_description"] {
    position: relative;
    transition: all 0.3s ease;
}

.field-good {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981;
}

.field-improve {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 1px #f59e0b;
}

.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

.field-neutral {
    border-color: #d1d5db !important;
    box-shadow: none;
}

/* Animation du spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Responsive pour les conseils d'expert */
@media (max-width: 768px) {
    .expert-advice {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .advice-icon {
        font-size: 1rem;
    }
    
    .advice-title {
        font-size: 0.8rem;
    }
    
    .advice-text {
        font-size: 0.8rem;
    }
    
    .advice-suggestion {
        font-size: 0.7rem;
    }
} 